Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / 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 this.getBufIfOpen ();
4075 if ((off | len | (off + len) | (b.length - (off + len))) < 0) {
4076 throw  new IndexOutOfBoundsException ();
4077 } else if (len == 0) {
4078 return 0;
4079 }var n = 0;
4080 for (; ; ) {
4081 var nread = this.read1 (b, off + n, len - n);
4082 if (nread <= 0) return (n == 0) ? nread : n;
4083 n += nread;
4084 if (n >= len) return n;
4085 var input = this.$in;
4086 if (input != null && input.available () <= 0) return n;
4087 }
4088 }, "~A,~N,~N");
4089 Clazz_overrideMethod (c$, "skip", 
4090 function (n) {
4091 this.getBufIfOpen ();
4092 if (n <= 0) {
4093 return 0;
4094 }var avail = this.count - this.pos;
4095 if (avail <= 0) {
4096 if (this.markpos < 0) return this.getInIfOpen ().skip (n);
4097 this.fill ();
4098 avail = this.count - this.pos;
4099 if (avail <= 0) return 0;
4100 }var skipped = (avail < n) ? avail : n;
4101 this.pos += skipped;
4102 return skipped;
4103 }, "~N");
4104 Clazz_overrideMethod (c$, "available", 
4105 function () {
4106 var n = this.count - this.pos;
4107 var avail = this.getInIfOpen ().available ();
4108 return n > (2147483647 - avail) ? 2147483647 : n + avail;
4109 });
4110 Clazz_overrideMethod (c$, "mark", 
4111 function (readlimit) {
4112 this.marklimit = readlimit;
4113 this.markpos = this.pos;
4114 }, "~N");
4115 Clazz_overrideMethod (c$, "reset", 
4116 function () {
4117 this.getBufIfOpen ();
4118 if (this.markpos < 0) throw  new java.io.IOException ("Resetting to invalid mark");
4119 this.pos = this.markpos;
4120 });
4121 Clazz_overrideMethod (c$, "markSupported", 
4122 function () {
4123 return true;
4124 });
4125 Clazz_overrideMethod (c$, "close", 
4126 function () {
4127 var input = this.$in;
4128 this.$in = null;
4129 if (input != null) input.close ();
4130 return;
4131 });
4132 Clazz_defineStatics (c$,
4133 "DEFAULT_BUFFER_SIZE", 8192);
4134 });
4135 Clazz_load (["java.io.InputStream"], "java.io.FilterInputStream", null, function () {
4136 c$ = Clazz_decorateAsClass (function () {
4137 this.$in = null;
4138 Clazz_instantialize (this, arguments);
4139 }, java.io, "FilterInputStream", java.io.InputStream);
4140 Clazz_makeConstructor (c$, 
4141 function ($in) {
4142 Clazz_superConstructor (this, java.io.FilterInputStream, []);
4143 this.$in = $in;
4144 }, "java.io.InputStream");
4145 Clazz_defineMethod (c$, "readByteAsInt", 
4146 function () {
4147 return this.$in.readByteAsInt ();
4148 });
4149 Clazz_defineMethod (c$, "read", 
4150 function (b, off, len) {
4151 return this.$in.read (b, off, len);
4152 }, "~A,~N,~N");
4153 Clazz_defineMethod (c$, "skip", 
4154 function (n) {
4155 return this.$in.skip (n);
4156 }, "~N");
4157 Clazz_defineMethod (c$, "available", 
4158 function () {
4159 return this.$in.available ();
4160 });
4161 Clazz_defineMethod (c$, "close", 
4162 function () {
4163 this.$in.close ();
4164 });
4165 Clazz_defineMethod (c$, "mark", 
4166 function (readlimit) {
4167 this.$in.mark (readlimit);
4168 }, "~N");
4169 Clazz_defineMethod (c$, "reset", 
4170 function () {
4171 this.$in.reset ();
4172 });
4173 Clazz_defineMethod (c$, "markSupported", 
4174 function () {
4175 return this.$in.markSupported ();
4176 });
4177 });
4178 Clazz_load (null, "java.io.InputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4179 c$ = Clazz_declareType (java.io, "InputStream");
4180 Clazz_defineMethod (c$, "read", 
4181 function (b, off, len) {
4182 if (b == null) {
4183 throw  new NullPointerException ();
4184 } else if (off < 0 || len < 0 || len > b.length - off) {
4185 throw  new IndexOutOfBoundsException ();
4186 } else if (len == 0) {
4187 return 0;
4188 }var c = this.readByteAsInt ();
4189 if (c == -1) {
4190 return -1;
4191 }b[off] = c;
4192 var i = 1;
4193 try {
4194 for (; i < len; i++) {
4195 c = this.readByteAsInt ();
4196 if (c == -1) {
4197 break;
4198 }b[off + i] = c;
4199 }
4200 } catch (ee) {
4201 if (Clazz_exceptionOf (ee, java.io.IOException)) {
4202 } else {
4203 throw ee;
4204 }
4205 }
4206 return i;
4207 }, "~A,~N,~N");
4208 Clazz_defineMethod (c$, "skip", 
4209 function (n) {
4210 var remaining = n;
4211 var nr;
4212 if (java.io.InputStream.skipBuffer == null) java.io.InputStream.skipBuffer =  Clazz_newByteArray (2048, 0);
4213 var localSkipBuffer = java.io.InputStream.skipBuffer;
4214 if (n <= 0) {
4215 return 0;
4216 }while (remaining > 0) {
4217 nr = this.read (localSkipBuffer, 0, Math.min (2048, remaining));
4218 if (nr < 0) {
4219 break;
4220 }remaining -= nr;
4221 }
4222 return n - remaining;
4223 }, "~N");
4224 Clazz_defineMethod (c$, "available", 
4225 function () {
4226 return 0;
4227 });
4228 Clazz_defineMethod (c$, "close", 
4229 function () {
4230 });
4231 Clazz_defineMethod (c$, "mark", 
4232 function (readlimit) {
4233 }, "~N");
4234 Clazz_defineMethod (c$, "reset", 
4235 function () {
4236 throw  new java.io.IOException ("mark/reset not supported");
4237 });
4238 Clazz_defineMethod (c$, "markSupported", 
4239 function () {
4240 return false;
4241 });
4242 Clazz_defineMethod (c$, "resetStream", 
4243 function () {
4244 });
4245 Clazz_defineStatics (c$,
4246 "SKIP_BUFFER_SIZE", 2048,
4247 "skipBuffer", null);
4248 });
4249 Clazz_load (["java.io.Reader"], "java.io.BufferedReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException", "JU.SB"], function () {
4250 c$ = Clazz_decorateAsClass (function () {
4251 this.$in = null;
4252 this.cb = null;
4253 this.nChars = 0;
4254 this.nextChar = 0;
4255 this.markedChar = -1;
4256 this.readAheadLimit = 0;
4257 this.skipLF = false;
4258 this.markedSkipLF = false;
4259 Clazz_instantialize (this, arguments);
4260 }, java.io, "BufferedReader", java.io.Reader);
4261 Clazz_defineMethod (c$, "setSize", 
4262  function (sz) {
4263 if (sz <= 0) throw  new IllegalArgumentException ("Buffer size <= 0");
4264 this.cb =  Clazz_newCharArray (sz, '\0');
4265 this.nextChar = this.nChars = 0;
4266 }, "~N");
4267 Clazz_makeConstructor (c$, 
4268 function ($in) {
4269 Clazz_superConstructor (this, java.io.BufferedReader, [$in]);
4270 this.$in = $in;
4271 this.setSize (8192);
4272 }, "java.io.Reader");
4273 Clazz_defineMethod (c$, "ensureOpen", 
4274  function () {
4275 if (this.$in == null) throw  new java.io.IOException ("Stream closed");
4276 });
4277 Clazz_defineMethod (c$, "fill", 
4278  function () {
4279 var dst;
4280 if (this.markedChar <= -1) {
4281 dst = 0;
4282 } else {
4283 var delta = this.nextChar - this.markedChar;
4284 if (delta >= this.readAheadLimit) {
4285 this.markedChar = -2;
4286 this.readAheadLimit = 0;
4287 dst = 0;
4288 } else {
4289 if (this.readAheadLimit <= this.cb.length) {
4290 System.arraycopy (this.cb, this.markedChar, this.cb, 0, delta);
4291 this.markedChar = 0;
4292 dst = delta;
4293 } else {
4294 var ncb =  Clazz_newCharArray (this.readAheadLimit, '\0');
4295 System.arraycopy (this.cb, this.markedChar, ncb, 0, delta);
4296 this.cb = ncb;
4297 this.markedChar = 0;
4298 dst = delta;
4299 }this.nextChar = this.nChars = delta;
4300 }}var n;
4301 do {
4302 n = this.$in.read (this.cb, dst, this.cb.length - dst);
4303 } while (n == 0);
4304 if (n > 0) {
4305 this.nChars = dst + n;
4306 this.nextChar = dst;
4307 }});
4308 Clazz_defineMethod (c$, "read1", 
4309  function (cbuf, off, len) {
4310 if (this.nextChar >= this.nChars) {
4311 if (len >= this.cb.length && this.markedChar <= -1 && !this.skipLF) {
4312 return this.$in.read (cbuf, off, len);
4313 }this.fill ();
4314 }if (this.nextChar >= this.nChars) return -1;
4315 if (this.skipLF) {
4316 this.skipLF = false;
4317 if (this.cb[this.nextChar] == '\n') {
4318 this.nextChar++;
4319 if (this.nextChar >= this.nChars) this.fill ();
4320 if (this.nextChar >= this.nChars) return -1;
4321 }}var n = Math.min (len, this.nChars - this.nextChar);
4322 System.arraycopy (this.cb, this.nextChar, cbuf, off, n);
4323 this.nextChar += n;
4324 return n;
4325 }, "~A,~N,~N");
4326 Clazz_defineMethod (c$, "read", 
4327 function (cbuf, off, len) {
4328 {
4329 this.ensureOpen ();
4330 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4331 throw  new IndexOutOfBoundsException ();
4332 } else if (len == 0) {
4333 return 0;
4334 }var n = this.read1 (cbuf, off, len);
4335 if (n <= 0) return n;
4336 while ((n < len) && this.$in.ready ()) {
4337 var n1 = this.read1 (cbuf, off + n, len - n);
4338 if (n1 <= 0) break;
4339 n += n1;
4340 }
4341 return n;
4342 }}, "~A,~N,~N");
4343 Clazz_defineMethod (c$, "readLine1", 
4344  function (ignoreLF) {
4345 var s = null;
4346 var startChar;
4347 {
4348 this.ensureOpen ();
4349 var omitLF = ignoreLF || this.skipLF;
4350 for (; ; ) {
4351 if (this.nextChar >= this.nChars) this.fill ();
4352 if (this.nextChar >= this.nChars) {
4353 if (s != null && s.length () > 0) return s.toString ();
4354 return null;
4355 }var eol = false;
4356 var c = String.fromCharCode (0);
4357 var i;
4358 if (omitLF && (this.cb[this.nextChar] == '\n')) this.nextChar++;
4359 this.skipLF = false;
4360 omitLF = false;
4361 charLoop : for (i = this.nextChar; i < this.nChars; i++) {
4362 c = this.cb[i];
4363 if ((c == '\n') || (c == '\r')) {
4364 eol = true;
4365 break charLoop;
4366 }}
4367 startChar = this.nextChar;
4368 this.nextChar = i;
4369 if (eol) {
4370 var str;
4371 if (s == null) {
4372 str =  String.instantialize (this.cb, startChar, i - startChar);
4373 } else {
4374 s.appendCB (this.cb, startChar, i - startChar);
4375 str = s.toString ();
4376 }this.nextChar++;
4377 if (c == '\r') {
4378 this.skipLF = true;
4379 }return str;
4380 }if (s == null) s = JU.SB.newN (80);
4381 s.appendCB (this.cb, startChar, i - startChar);
4382 }
4383 }}, "~B");
4384 Clazz_defineMethod (c$, "readLine", 
4385 function () {
4386 return this.readLine1 (false);
4387 });
4388 Clazz_overrideMethod (c$, "skip", 
4389 function (n) {
4390 if (n < 0) {
4391 throw  new IllegalArgumentException ("skip value is negative");
4392 }{
4393 this.ensureOpen ();
4394 var r = n;
4395 while (r > 0) {
4396 if (this.nextChar >= this.nChars) this.fill ();
4397 if (this.nextChar >= this.nChars) break;
4398 if (this.skipLF) {
4399 this.skipLF = false;
4400 if (this.cb[this.nextChar] == '\n') {
4401 this.nextChar++;
4402 }}var d = this.nChars - this.nextChar;
4403 if (r <= d) {
4404 this.nextChar += r;
4405 r = 0;
4406 break;
4407 }r -= d;
4408 this.nextChar = this.nChars;
4409 }
4410 return n - r;
4411 }}, "~N");
4412 Clazz_defineMethod (c$, "ready", 
4413 function () {
4414 {
4415 this.ensureOpen ();
4416 if (this.skipLF) {
4417 if (this.nextChar >= this.nChars && this.$in.ready ()) {
4418 this.fill ();
4419 }if (this.nextChar < this.nChars) {
4420 if (this.cb[this.nextChar] == '\n') this.nextChar++;
4421 this.skipLF = false;
4422 }}return (this.nextChar < this.nChars) || this.$in.ready ();
4423 }});
4424 Clazz_overrideMethod (c$, "markSupported", 
4425 function () {
4426 return true;
4427 });
4428 Clazz_overrideMethod (c$, "mark", 
4429 function (readAheadLimit) {
4430 if (readAheadLimit < 0) {
4431 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4432 }{
4433 this.ensureOpen ();
4434 this.readAheadLimit = readAheadLimit;
4435 this.markedChar = this.nextChar;
4436 this.markedSkipLF = this.skipLF;
4437 }}, "~N");
4438 Clazz_overrideMethod (c$, "reset", 
4439 function () {
4440 {
4441 this.ensureOpen ();
4442 if (this.markedChar < 0) throw  new java.io.IOException ((this.markedChar == -2) ? "Mark invalid" : "Stream not marked");
4443 this.nextChar = this.markedChar;
4444 this.skipLF = this.markedSkipLF;
4445 }});
4446 Clazz_defineMethod (c$, "close", 
4447 function () {
4448 {
4449 if (this.$in == null) return;
4450 this.$in.close ();
4451 this.$in = null;
4452 this.cb = null;
4453 }});
4454 Clazz_defineStatics (c$,
4455 "INVALIDATED", -2,
4456 "UNMARKED", -1,
4457 "DEFAULT_CHAR_BUFFER_SIZE", 8192,
4458 "DEFAULT_EXPECTED_LINE_LENGTH", 80);
4459 });
4460 Clazz_load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4461 c$ = Clazz_decorateAsClass (function () {
4462 this.buf = null;
4463 this.pos = 0;
4464 this.$mark = 0;
4465 this.count = 0;
4466 Clazz_instantialize (this, arguments);
4467 }, java.io, "ByteArrayInputStream", java.io.InputStream);
4468 Clazz_makeConstructor (c$, 
4469 function (buf) {
4470 Clazz_superConstructor (this, java.io.ByteArrayInputStream, []);
4471 this.buf = buf;
4472 this.pos = 0;
4473 this.count = buf.length;
4474 }, "~A");
4475 Clazz_overrideMethod (c$, "readByteAsInt", 
4476 function () {
4477 return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1;
4478 });
4479 Clazz_overrideMethod (c$, "read", 
4480 function (b, off, len) {
4481 if (b == null) {
4482 throw  new NullPointerException ();
4483 } else if (off < 0 || len < 0 || len > b.length - off) {
4484 throw  new IndexOutOfBoundsException ();
4485 }if (this.pos >= this.count) {
4486 return -1;
4487 }var avail = this.count - this.pos;
4488 if (len > avail) {
4489 len = avail;
4490 }if (len <= 0) {
4491 return 0;
4492 }System.arraycopy (this.buf, this.pos, b, off, len);
4493 this.pos += len;
4494 return len;
4495 }, "~A,~N,~N");
4496 Clazz_overrideMethod (c$, "skip", 
4497 function (n) {
4498 var k = this.count - this.pos;
4499 if (n < k) {
4500 k = n < 0 ? 0 : n;
4501 }this.pos += k;
4502 return k;
4503 }, "~N");
4504 Clazz_overrideMethod (c$, "available", 
4505 function () {
4506 return this.count - this.pos;
4507 });
4508 Clazz_overrideMethod (c$, "markSupported", 
4509 function () {
4510 return true;
4511 });
4512 Clazz_overrideMethod (c$, "mark", 
4513 function (readAheadLimit) {
4514 this.$mark = this.pos;
4515 }, "~N");
4516 Clazz_overrideMethod (c$, "resetStream", 
4517 function () {
4518 });
4519 Clazz_overrideMethod (c$, "reset", 
4520 function () {
4521 this.pos = this.$mark;
4522 });
4523 Clazz_overrideMethod (c$, "close", 
4524 function () {
4525 });
4526 });
4527 Clazz_load (["java.io.Closeable"], "java.io.Reader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.NullPointerException"], function () {
4528 c$ = Clazz_decorateAsClass (function () {
4529 this.lock = null;
4530 this.skipBuffer = null;
4531 Clazz_instantialize (this, arguments);
4532 }, java.io, "Reader", null, java.io.Closeable);
4533 Clazz_makeConstructor (c$, 
4534 function (lock) {
4535 if (lock == null) {
4536 throw  new NullPointerException ();
4537 }this.lock = lock;
4538 }, "~O");
4539 Clazz_defineMethod (c$, "skip", 
4540 function (n) {
4541 if (n < 0) throw  new IllegalArgumentException ("skip value is negative");
4542 var nn = Math.min (n, 8192);
4543 {
4544 if ((this.skipBuffer == null) || (this.skipBuffer.length < nn)) this.skipBuffer =  Clazz_newCharArray (nn, '\0');
4545 var r = n;
4546 while (r > 0) {
4547 var nc = this.read (this.skipBuffer, 0, Math.min (r, nn));
4548 if (nc == -1) break;
4549 r -= nc;
4550 }
4551 return n - r;
4552 }}, "~N");
4553 Clazz_defineMethod (c$, "ready", 
4554 function () {
4555 return false;
4556 });
4557 Clazz_defineMethod (c$, "markSupported", 
4558 function () {
4559 return false;
4560 });
4561 Clazz_defineMethod (c$, "mark", 
4562 function (readAheadLimit) {
4563 throw  new java.io.IOException ("mark() not supported");
4564 }, "~N");
4565 Clazz_defineMethod (c$, "reset", 
4566 function () {
4567 throw  new java.io.IOException ("reset() not supported");
4568 });
4569 Clazz_defineStatics (c$,
4570 "MAX_SKIP_BUFFE_SIZE", 8192);
4571 });
4572 Clazz_load (["java.io.Reader"], "java.io.StringReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException"], function () {
4573 c$ = Clazz_decorateAsClass (function () {
4574 this.str = null;
4575 this.length = 0;
4576 this.next = 0;
4577 this.$mark = 0;
4578 Clazz_instantialize (this, arguments);
4579 }, java.io, "StringReader", java.io.Reader);
4580 Clazz_makeConstructor (c$, 
4581 function (s) {
4582 Clazz_superConstructor (this, java.io.StringReader, [s]);
4583 this.str = s;
4584 this.length = s.length;
4585 }, "~S");
4586 Clazz_defineMethod (c$, "ensureOpen", 
4587  function () {
4588 if (this.str == null) throw  new java.io.IOException ("Stream closed");
4589 });
4590 Clazz_overrideMethod (c$, "read", 
4591 function (cbuf, off, len) {
4592 {
4593 this.ensureOpen ();
4594 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4595 throw  new IndexOutOfBoundsException ();
4596 } else if (len == 0) {
4597 return 0;
4598 }if (this.next >= this.length) return -1;
4599 var n = Math.min (this.length - this.next, len);
4600 this.str.getChars (this.next, this.next + n, cbuf, off);
4601 this.next += n;
4602 return n;
4603 }}, "~A,~N,~N");
4604 Clazz_overrideMethod (c$, "skip", 
4605 function (ns) {
4606 {
4607 this.ensureOpen ();
4608 if (this.next >= this.length) return 0;
4609 var n = Math.min (this.length - this.next, ns);
4610 n = Math.max (-this.next, n);
4611 this.next += n;
4612 return n;
4613 }}, "~N");
4614 Clazz_overrideMethod (c$, "ready", 
4615 function () {
4616 {
4617 this.ensureOpen ();
4618 return true;
4619 }});
4620 Clazz_overrideMethod (c$, "markSupported", 
4621 function () {
4622 return true;
4623 });
4624 Clazz_overrideMethod (c$, "mark", 
4625 function (readAheadLimit) {
4626 if (readAheadLimit < 0) {
4627 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4628 }{
4629 this.ensureOpen ();
4630 this.$mark = this.next;
4631 }}, "~N");
4632 Clazz_overrideMethod (c$, "reset", 
4633 function () {
4634 {
4635 this.ensureOpen ();
4636 this.next = this.$mark;
4637 }});
4638 Clazz_overrideMethod (c$, "close", 
4639 function () {
4640 this.str = null;
4641 });
4642 });
4643 Clazz_declarePackage ("JU");
4644 Clazz_load (null, "JU.Base64", ["JU.SB"], function () {
4645 c$ = Clazz_declareType (JU, "Base64");
4646 c$.getBytes64 = Clazz_defineMethod (c$, "getBytes64", 
4647 function (bytes) {
4648 return JU.Base64.getBase64 (bytes).toBytes (0, -1);
4649 }, "~A");
4650 c$.getBase64 = Clazz_defineMethod (c$, "getBase64", 
4651 function (bytes) {
4652 var nBytes = bytes.length;
4653 var sout =  new JU.SB ();
4654 if (nBytes == 0) return sout;
4655 for (var i = 0, nPad = 0; i < nBytes && nPad == 0; ) {
4656 if (i % 75 == 0 && i != 0) sout.append ("\r\n");
4657 nPad = (i + 2 == nBytes ? 1 : i + 1 == nBytes ? 2 : 0);
4658 var outbytes = ((bytes[i++] << 16) & 0xFF0000) | ((nPad == 2 ? 0 : bytes[i++] << 8) & 0x00FF00) | ((nPad >= 1 ? 0 : bytes[i++]) & 0x0000FF);
4659 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 18) & 0x3F));
4660 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 12) & 0x3F));
4661 sout.appendC (nPad == 2 ? '=' : JU.Base64.base64.charAt ((outbytes >> 6) & 0x3F));
4662 sout.appendC (nPad >= 1 ? '=' : JU.Base64.base64.charAt (outbytes & 0x3F));
4663 }
4664 return sout;
4665 }, "~A");
4666 c$.decodeBase64 = Clazz_defineMethod (c$, "decodeBase64", 
4667 function (strBase64) {
4668 var nBytes = 0;
4669 var ch;
4670 var pt0 = strBase64.indexOf (";base64,") + 1;
4671 if (pt0 > 0) pt0 += 7;
4672 var chars64 = strBase64.toCharArray ();
4673 var len64 = chars64.length;
4674 if (len64 == 0) return  Clazz_newByteArray (0, 0);
4675 for (var i = len64; --i >= pt0; ) nBytes += ((ch = (chars64[i]).charCodeAt (0) & 0x7F) == 65 || JU.Base64.decode64[ch] > 0 ? 3 : 0);
4676
4677 nBytes = nBytes >> 2;
4678 var bytes =  Clazz_newByteArray (nBytes, 0);
4679 var offset = 18;
4680 for (var i = pt0, pt = 0, b = 0; i < len64; i++) {
4681 if (JU.Base64.decode64[ch = (chars64[i]).charCodeAt (0) & 0x7F] > 0 || ch == 65 || ch == 61) {
4682 b |= JU.Base64.decode64[ch] << offset;
4683 offset -= 6;
4684 if (offset < 0) {
4685 bytes[pt++] = ((b & 0xFF0000) >> 16);
4686 if (pt < nBytes) bytes[pt++] = ((b & 0xFF00) >> 8);
4687 if (pt < nBytes) bytes[pt++] = (b & 0xFF);
4688 offset = 18;
4689 b = 0;
4690 }}}
4691 return bytes;
4692 }, "~S");
4693 Clazz_defineStatics (c$,
4694 "base64", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
4695 "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]));
4696 });
4697 Clazz_declarePackage ("JU");
4698 Clazz_load (["java.lang.Enum"], "JU.Encoding", null, function () {
4699 c$ = Clazz_declareType (JU, "Encoding", Enum);
4700 Clazz_defineEnumConstant (c$, "NONE", 0, []);
4701 Clazz_defineEnumConstant (c$, "UTF8", 1, []);
4702 Clazz_defineEnumConstant (c$, "UTF_16BE", 2, []);
4703 Clazz_defineEnumConstant (c$, "UTF_16LE", 3, []);
4704 Clazz_defineEnumConstant (c$, "UTF_32BE", 4, []);
4705 Clazz_defineEnumConstant (c$, "UTF_32LE", 5, []);
4706 });
4707 Clazz_declarePackage ("java.util");
4708 Clazz_load (["java.lang.RuntimeException"], "java.util.MissingResourceException", null, function () {
4709 c$ = Clazz_decorateAsClass (function () {
4710 this.className = null;
4711 this.key = null;
4712 Clazz_instantialize (this, arguments);
4713 }, java.util, "MissingResourceException", RuntimeException);
4714 Clazz_makeConstructor (c$, 
4715 function (s, className, key) {
4716 Clazz_superConstructor (this, java.util.MissingResourceException, [s]);
4717 this.className = className;
4718 this.key = key;
4719 }, "~S,~S,~S");
4720 Clazz_makeConstructor (c$, 
4721 function (message, className, key, cause) {
4722 Clazz_superConstructor (this, java.util.MissingResourceException, [message, cause]);
4723 this.className = className;
4724 this.key = key;
4725 }, "~S,~S,~S,Throwable");
4726 Clazz_defineMethod (c$, "getClassName", 
4727 function () {
4728 return this.className;
4729 });
4730 Clazz_defineMethod (c$, "getKey", 
4731 function () {
4732 return this.key;
4733 });
4734 });
4735 Clazz_declarePackage ("jssun.misc");
4736 Clazz_load (null, "jssun.misc.MessageUtils", ["java.lang.Character", "$.StringBuffer"], function () {
4737 c$ = Clazz_declareType (jssun.misc, "MessageUtils");
4738 Clazz_makeConstructor (c$, 
4739 function () {
4740 });
4741 c$.subst = Clazz_defineMethod (c$, "subst", 
4742 function (patt, arg) {
4743 var args =  Clazz_newArray (-1, [arg]);
4744 return jssun.misc.MessageUtils.subst (patt, args);
4745 }, "~S,~S");
4746 c$.subst = Clazz_defineMethod (c$, "subst", 
4747 function (patt, arg1, arg2) {
4748 var args =  Clazz_newArray (-1, [arg1, arg2]);
4749 return jssun.misc.MessageUtils.subst (patt, args);
4750 }, "~S,~S,~S");
4751 c$.subst = Clazz_defineMethod (c$, "subst", 
4752 function (patt, arg1, arg2, arg3) {
4753 var args =  Clazz_newArray (-1, [arg1, arg2, arg3]);
4754 return jssun.misc.MessageUtils.subst (patt, args);
4755 }, "~S,~S,~S,~S");
4756 c$.subst = Clazz_defineMethod (c$, "subst", 
4757 function (patt, args) {
4758 var result =  new StringBuffer ();
4759 var len = patt.length;
4760 for (var i = 0; i >= 0 && i < len; i++) {
4761 var ch = patt.charAt (i);
4762 if (ch == '%') {
4763 if (i != len) {
4764 var index = Character.digit (patt.charAt (i + 1), 10);
4765 if (index == -1) {
4766 result.append (patt.charAt (i + 1));
4767 i++;
4768 } else if (index < args.length) {
4769 result.append (args[index]);
4770 i++;
4771 }}} else {
4772 result.append (ch);
4773 }}
4774 return result.toString ();
4775 }, "~S,~A");
4776 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4777 function (propName, arg) {
4778 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg);
4779 }, "~S,~S");
4780 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4781 function (propName, arg1, arg2) {
4782 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2);
4783 }, "~S,~S,~S");
4784 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4785 function (propName, arg1, arg2, arg3) {
4786 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2, arg3);
4787 }, "~S,~S,~S,~S");
4788 c$.toStderr = Clazz_defineMethod (c$, "toStderr", 
4789 function (msg) {
4790 {
4791 System.out.println(msg);
4792 }}, "~S");
4793 c$.toStdout = Clazz_defineMethod (c$, "toStdout", 
4794 function (msg) {
4795 {
4796 System.out.println(msg);
4797 }}, "~S");
4798 c$.err = Clazz_defineMethod (c$, "err", 
4799 function (s) {
4800 jssun.misc.MessageUtils.toStderr (s + "\n");
4801 }, "~S");
4802 c$.out = Clazz_defineMethod (c$, "out", 
4803 function (s) {
4804 jssun.misc.MessageUtils.toStdout (s + "\n");
4805 }, "~S");
4806 c$.where = Clazz_defineMethod (c$, "where", 
4807 function () {
4808 {
4809 System.out.println(Clazz_getStackTrace());
4810 }});
4811 });
4812 Clazz_declarePackage ("java.awt");
4813 Clazz_load (["java.awt.geom.Dimension2D"], "java.awt.Dimension", null, function () {
4814 c$ = Clazz_decorateAsClass (function () {
4815 this.width = 0;
4816 this.height = 0;
4817 Clazz_instantialize (this, arguments);
4818 }, java.awt, "Dimension", java.awt.geom.Dimension2D);
4819 Clazz_makeConstructor (c$, 
4820 function () {
4821 this.construct (0, 0);
4822 });
4823 Clazz_makeConstructor (c$, 
4824 function (d) {
4825 this.construct (d.width, d.height);
4826 }, "java.awt.Dimension");
4827 Clazz_makeConstructor (c$, 
4828 function (width, height) {
4829 Clazz_superConstructor (this, java.awt.Dimension, []);
4830 this.width = width;
4831 this.height = height;
4832 }, "~N,~N");
4833 Clazz_overrideMethod (c$, "getWidth", 
4834 function () {
4835 return this.width;
4836 });
4837 Clazz_overrideMethod (c$, "getHeight", 
4838 function () {
4839 return this.height;
4840 });
4841 Clazz_defineMethod (c$, "setSize", 
4842 function (width, height) {
4843 this.width = Clazz_doubleToInt (Math.ceil (width));
4844 this.height = Clazz_doubleToInt (Math.ceil (height));
4845 }, "~N,~N");
4846 Clazz_defineMethod (c$, "getSize", 
4847 function () {
4848 return  new java.awt.Dimension (this.width, this.height);
4849 });
4850 Clazz_defineMethod (c$, "setSize", 
4851 function (d) {
4852 this.setSize (d.width, d.height);
4853 }, "java.awt.Dimension");
4854 Clazz_defineMethod (c$, "setSize", 
4855 function (width, height) {
4856 this.width = width;
4857 this.height = height;
4858 }, "~N,~N");
4859 Clazz_overrideMethod (c$, "equals", 
4860 function (obj) {
4861 if (Clazz_instanceOf (obj, java.awt.Dimension)) {
4862 var d = obj;
4863 return (this.width == d.width) && (this.height == d.height);
4864 }return false;
4865 }, "~O");
4866 Clazz_overrideMethod (c$, "hashCode", 
4867 function () {
4868 var sum = this.width + this.height;
4869 return Clazz_doubleToInt (sum * (sum + 1) / 2) + this.width;
4870 });
4871 Clazz_overrideMethod (c$, "toString", 
4872 function () {
4873 return this.getClass ().getName () + "[width=" + this.width + ",height=" + this.height + "]";
4874 });
4875 });
4876 Clazz_declarePackage ("java.awt.geom");
4877 Clazz_load (null, "java.awt.geom.Dimension2D", ["java.lang.InternalError"], function () {
4878 c$ = Clazz_declareType (java.awt.geom, "Dimension2D", null, Cloneable);
4879 Clazz_makeConstructor (c$, 
4880 function () {
4881 });
4882 Clazz_defineMethod (c$, "setSize", 
4883 function (d) {
4884 this.setSize (d.getWidth (), d.getHeight ());
4885 }, "java.awt.geom.Dimension2D");
4886 Clazz_defineMethod (c$, "clone", 
4887 function () {
4888 try {
4889 return Clazz_superCall (this, java.awt.geom.Dimension2D, "clone", []);
4890 } catch (e) {
4891 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
4892 throw  new InternalError ();
4893 } else {
4894 throw e;
4895 }
4896 }
4897 });
4898 });
4899 Clazz_declarePackage ("java.awt");
4900 Clazz_load (["java.awt.Container"], "java.awt.Panel", ["java.awt.FlowLayout"], function () {
4901 c$ = Clazz_declareType (java.awt, "Panel", java.awt.Container);
4902 Clazz_makeConstructor (c$, 
4903 function () {
4904 Clazz_superConstructor (this, java.awt.Panel, []);
4905 this.setPanel ();
4906 });
4907 Clazz_defineMethod (c$, "setPanel", 
4908 function () {
4909 this.setAppContext ();
4910 this.setLayout ( new java.awt.FlowLayout ());
4911 });
4912 Clazz_makeConstructor (c$, 
4913 function (layout) {
4914 Clazz_superConstructor (this, java.awt.Panel, []);
4915 if (layout == null) layout =  new java.awt.FlowLayout ();
4916 this.setAppContext ();
4917 this.setLayout (layout);
4918 }, "java.awt.LayoutManager");
4919 Clazz_overrideMethod (c$, "constructComponentName", 
4920 function () {
4921 {
4922 return "panel" + java.awt.Panel.nameCounter++;
4923 }});
4924 Clazz_defineMethod (c$, "addNotify", 
4925 function () {
4926 if (this.peer == null) this.peer = this.getToolkit ().createPanel (this);
4927 Clazz_superCall (this, java.awt.Panel, "addNotify", []);
4928 });
4929 Clazz_defineStatics (c$,
4930 "base", "panel",
4931 "nameCounter", 0);
4932 });
4933 Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){
4934 c$=Clazz_decorateAsClass(function(){
4935 this.firstIndex=0;
4936 this.lastIndex=0;
4937 this.array=null;
4938 Clazz_instantialize(this,arguments);
4939 },java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);
4940
4941 Clazz_overrideConstructor(c$,
4942 function(){
4943 this.setup(0);
4944 });
4945
4946 Clazz_defineMethod(c$, "setup",
4947 function(capacity){
4948 //Clazz_superConstructor(this,java.util.ArrayList,[]);
4949 this.firstIndex=this.lastIndex=0;
4950 try{
4951 this.array=this.newElementArray(capacity);
4952 }catch(e){
4953 if(Clazz_instanceOf(e,NegativeArraySizeException)){
4954 throw new IllegalArgumentException();
4955 }else{
4956 throw e;
4957 }
4958 }
4959 },"~N");
4960 /*
4961 Clazz_makeConstructor(c$,
4962 function(collection){
4963 Clazz_superConstructor(this,java.util.ArrayList,[]);
4964 var size=collection.size();
4965 this.firstIndex=this.lastIndex=0;
4966 this.array=this.newElementArray(size+(Math.floor(size/10)));
4967 this.addAll(collection);
4968 },"java.util.Collection");
4969
4970 */
4971
4972 Clazz_defineMethod(c$,"newElementArray",
4973 ($fz=function(size){
4974 return new Array(size);
4975 },$fz.isPrivate=true,$fz),"~N");
4976
4977 Clazz_overrideMethod(c$,"add",
4978 function(location,object){
4979
4980 if (arguments.length == 1) {
4981         // coming from Java methods, e.g. Collections.list()
4982         // location is actually the object
4983         return this.add1(location);
4984 }
4985 var size=this.size();
4986 if(0<location&&location<size){
4987 if(this.firstIndex==0&&this.lastIndex==this.array.length){
4988 this.growForInsert(location,1);
4989 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex==this.array.length){
4990 System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,location);
4991 }else{
4992 var index=location+this.firstIndex;
4993 System.arraycopy(this.array,index,this.array,index+1,size-location);
4994 this.lastIndex++;
4995 }this.array[location+this.firstIndex]=object;
4996 }else if(location==0){
4997 if(this.firstIndex==0){
4998 this.growAtFront(1);
4999 }this.array[--this.firstIndex]=object;
5000 }else if(location==size){
5001 if(this.lastIndex==this.array.length){
5002 this.growAtEnd(1);
5003 }this.array[this.lastIndex++]=object;
5004 }else{
5005 throw new IndexOutOfBoundsException();
5006 }this.modCount++;
5007 },"~N,~O");
5008
5009 Clazz_overrideMethod(c$,"add1",
5010 function(object){
5011 if(this.lastIndex==this.array.length){
5012 this.growAtEnd(1);
5013 }this.array[this.lastIndex++]=object;
5014 this.modCount++;
5015 return true;
5016 },"~O");
5017
5018 /* BH disallow addAll(int,List)
5019  * 
5020 Clazz_defineMethod(c$,"addAll",
5021 function(location,collection){
5022 var size=this.size();
5023 if(location<0||location>size){
5024 throw new IndexOutOfBoundsException();
5025 }var growSize=collection.size();
5026 if(0<location&&location<size){
5027 if(this.array.length-size<growSize){
5028 this.growForInsert(location,growSize);
5029 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex>this.array.length-growSize){
5030 var newFirst=this.firstIndex-growSize;
5031 if(newFirst<0){
5032 var index=location+this.firstIndex;
5033 System.arraycopy(this.array,index,this.array,index-newFirst,size-location);
5034 this.lastIndex-=newFirst;
5035 newFirst=0;
5036 }System.arraycopy(this.array,this.firstIndex,this.array,newFirst,location);
5037 this.firstIndex=newFirst;
5038 }else{
5039 var index=location+this.firstIndex;
5040 System.arraycopy(this.array,index,this.array,index+growSize,size-location);
5041 this.lastIndex+=growSize;
5042 }}else if(location==0){
5043 this.growAtFront(growSize);
5044 this.firstIndex-=growSize;
5045 }else if(location==size){
5046 if(this.lastIndex>this.array.length-growSize){
5047 this.growAtEnd(growSize);
5048 }this.lastIndex+=growSize;
5049 }if(growSize>0){
5050 var it=collection.iterator();
5051 var index=location+this.firstIndex;
5052 var end=index+growSize;
5053 while(index<end){
5054 this.array[index++]=it.next();
5055 }
5056 this.modCount++;
5057 return true;
5058 }return false;
5059 },"~N,java.util.Collection");
5060
5061  */
5062
5063 Clazz_overrideMethod(c$,"addAll",
5064 function(collection){
5065 var growSize=collection.size();
5066 if(growSize>0){
5067         if(this.lastIndex>this.array.length-growSize){
5068                 this.growAtEnd(growSize);
5069 }
5070 var it=collection.iterator();
5071 var end=this.lastIndex+growSize;
5072 while(this.lastIndex<end){
5073         this.array[this.lastIndex++]=it.next();
5074 }
5075 this.modCount++;
5076 return true;
5077 }return false;
5078 },"java.util.Collection");
5079
5080 Clazz_overrideMethod(c$,"clear",
5081 function(){
5082 if(this.firstIndex!=this.lastIndex){
5083 this.fill(this.firstIndex,this.lastIndex);
5084 this.firstIndex=this.lastIndex=0;
5085 this.modCount++;
5086 }});
5087
5088 Clazz_defineMethod(c$,"fill", function(i1, i2) { // BH
5089 for (var i = i2; --i >= i1;)
5090 this.array[i] = null;
5091 },"~N,~N");
5092
5093 Clazz_defineMethod(c$,"clone",
5094 function(){
5095 try{
5096 var newList=Clazz_superCall(this,java.util.ArrayList,"clone",[]);
5097 newList.array=this.array.clone();
5098 return newList;
5099 }catch(e){
5100 if(Clazz_instanceOf(e,CloneNotSupportedException)){
5101 return null;
5102 }else{
5103 throw e;
5104 }
5105 }
5106 });
5107 Clazz_overrideMethod(c$,"contains",
5108 function(object){
5109 if(object!=null){
5110 for(var i=this.firstIndex;i<this.lastIndex;i++){
5111 if(object.equals(this.array[i])){
5112 return true;
5113 }}
5114 }else{
5115 for(var i=this.firstIndex;i<this.lastIndex;i++){
5116 if(this.array[i]==null){
5117 return true;
5118 }}
5119 }return false;
5120 },"~O");
5121 Clazz_defineMethod(c$,"ensureCapacity",
5122 function(minimumCapacity){
5123 if(this.array.length<minimumCapacity){
5124 if(this.firstIndex>0){
5125 this.growAtFront(minimumCapacity-this.array.length);
5126 }else{
5127 this.growAtEnd(minimumCapacity-this.array.length);
5128 }}},"~N");
5129 Clazz_overrideMethod(c$,"get",
5130 function(location){
5131 if(0<=location&&location<this.size()){
5132 return this.array[this.firstIndex+location];
5133 }throw new IndexOutOfBoundsException();
5134 },"~N");
5135
5136
5137 Clazz_defineMethod(c$,"growAtEnd",
5138 ($fz=function(required){
5139 var size=this.size();
5140 if(this.firstIndex>=required-(this.array.length-this.lastIndex)){
5141         var newLast=this.lastIndex-this.firstIndex;
5142         if(size>0){
5143                 System.arraycopy(this.array,this.firstIndex,this.array,0,size);
5144                 var start=newLast<this.firstIndex?this.firstIndex:newLast;
5145                 this.fill(start,this.array.length);
5146         }
5147         this.firstIndex=0;
5148         this.lastIndex=newLast;
5149 }else{
5150         var increment=Math.floor(size/2);
5151         if(required>increment){
5152                 increment=required;
5153         }
5154         if(increment<12){
5155                 increment=12;
5156         }
5157         var newArray=this.newElementArray(size+increment);
5158         if(size>0){
5159                 System.arraycopy(this.array,this.firstIndex,newArray,this.firstIndex,size);
5160         }
5161         this.array=newArray;
5162 }
5163
5164 },$fz.isPrivate=true,$fz),"~N");
5165 Clazz_defineMethod(c$,"growAtFront",
5166 ($fz=function(required){
5167 var size=this.size();
5168 if(this.array.length-this.lastIndex>=required){
5169 var newFirst=this.array.length-size;
5170 if(size>0){
5171 System.arraycopy(this.array,this.firstIndex,this.array,newFirst,size);
5172 var length=this.firstIndex+size>newFirst?newFirst:this.firstIndex+size;
5173 this.fill(this.firstIndex,length);
5174 }this.firstIndex=newFirst;
5175 this.lastIndex=this.array.length;
5176 }else{
5177 var increment=Math.floor(size/2);
5178 if(required>increment){
5179 increment=required;
5180 }if(increment<12){
5181 increment=12;
5182 }var newArray=this.newElementArray(size+increment);
5183 if(size>0){
5184 System.arraycopy(this.array,this.firstIndex,newArray,newArray.length-size,size);
5185 }this.firstIndex=newArray.length-size;
5186 this.lastIndex=newArray.length;
5187 this.array=newArray;
5188 }},$fz.isPrivate=true,$fz),"~N");
5189 Clazz_defineMethod(c$,"growForInsert",
5190 ($fz=function(location,required){
5191 var size=this.size();
5192 var increment=Math.floor(size/2);
5193 if(required>increment){
5194 increment=required;
5195 }if(increment<12){
5196 increment=12;
5197 }var newArray=this.newElementArray(size+increment);
5198 if(location<Math.floor(size/2)){
5199 var newFirst=newArray.length-(size+required);
5200 System.arraycopy(this.array,location,newArray,location+increment,size-location);
5201 System.arraycopy(this.array,this.firstIndex,newArray,newFirst,location);
5202 this.firstIndex=newFirst;
5203 this.lastIndex=newArray.length;
5204 }else{
5205 System.arraycopy(this.array,this.firstIndex,newArray,0,location);
5206 System.arraycopy(this.array,location,newArray,location+required,size-location);
5207 this.firstIndex=0;
5208 this.lastIndex+=required;
5209 }this.array=newArray;
5210 },$fz.isPrivate=true,$fz),"~N,~N");
5211 Clazz_overrideMethod(c$,"indexOf",
5212 function(object){
5213 if(object!=null){
5214 for(var i=this.firstIndex;i<this.lastIndex;i++){
5215 if(object.equals(this.array[i])){
5216 return i-this.firstIndex;
5217 }}
5218 }else{
5219 for(var i=this.firstIndex;i<this.lastIndex;i++){
5220 if(this.array[i]==null){
5221 return i-this.firstIndex;
5222 }}
5223 }return-1;
5224 },"~O");
5225 Clazz_overrideMethod(c$,"isEmpty",
5226 function(){
5227 return this.lastIndex==this.firstIndex;
5228 });
5229 Clazz_overrideMethod(c$,"lastIndexOf",
5230 function(object){
5231 if(object!=null){
5232 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5233 if(object.equals(this.array[i])){
5234 return i-this.firstIndex;
5235 }}
5236 }else{
5237 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5238 if(this.array[i]==null){
5239 return i-this.firstIndex;
5240 }}
5241 }return-1;
5242 },"~O");
5243 Clazz_overrideMethod(c$,"remove",
5244 function(location){
5245 var result;
5246 var size=this.size();
5247 if(0<=location&&location<size){
5248 if(location==size-1){
5249 result=this.array[--this.lastIndex];
5250 this.array[this.lastIndex]=null;
5251 }else if(location==0){
5252 result=this.array[this.firstIndex];
5253 this.array[this.firstIndex++]=null;
5254 }else{
5255 var elementIndex=this.firstIndex+location;
5256 result=this.array[elementIndex];
5257 if(location<Math.floor(size/2)){
5258 System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,location);
5259 this.array[this.firstIndex++]=null;
5260 }else{
5261 System.arraycopy(this.array,elementIndex+1,this.array,elementIndex,size-location-1);
5262 this.array[--this.lastIndex]=null;
5263 }}}else{
5264 throw new IndexOutOfBoundsException();
5265 }this.modCount++;
5266 return result;
5267 },"~N"); 
5268
5269 Clazz_defineMethod(c$, "removeObject", function(o) {
5270         var i = this.indexOf(o);
5271         if (i < 0)return null;
5272         return this.remove(i);
5273 }, "~O");
5274
5275 Clazz_overrideMethod(c$,"removeRange",
5276 function(start,end){
5277 if(start>=0&&start<=end&&end<=this.size()){
5278 if(start==end){
5279 return;
5280 }var size=this.size();
5281 if(end==size){
5282         this.fill(this.firstIndex+start,this.lastIndex);
5283 this.lastIndex=this.firstIndex+start;
5284 }else if(start==0){
5285         this.fill(this.firstIndex,this.firstIndex+end);
5286 this.firstIndex+=end;
5287 }else{
5288 System.arraycopy(this.array,this.firstIndex+end,this.array,this.firstIndex+start,size-end);
5289 var newLast=this.lastIndex+start-end;
5290 this.fill(newLast,this.lastIndex);
5291 this.lastIndex=newLast;
5292 }this.modCount++;
5293 }else{
5294 throw new IndexOutOfBoundsException();
5295 }},"~N,~N");
5296 Clazz_overrideMethod(c$,"set",
5297 function(location,object){
5298 if(0<=location&&location<this.size()){
5299 var result=this.array[this.firstIndex+location];
5300 this.array[this.firstIndex+location]=object;
5301 return result;
5302 }throw new IndexOutOfBoundsException();
5303 },"~N,~O");
5304 Clazz_overrideMethod(c$,"size",
5305 function(){
5306 return this.lastIndex-this.firstIndex;
5307 });
5308 /*
5309 Clazz_defineMethod(c$,"toArray",
5310 function(){
5311 var size=this.size();
5312 var result=new Array(size);
5313 System.arraycopy(this.array,this.firstIndex,result,0,size);
5314 return result;
5315 });
5316 */
5317
5318 Clazz_overrideMethod(c$,"toArray",
5319 function(contents){
5320 var size=this.size();
5321 if(!contents || size>contents.length)
5322         contents= new Array(size);
5323 System.arraycopy(this.array,this.firstIndex,contents,0,size);
5324 if(size<contents.length){
5325 contents[size]=null;
5326 }return contents;
5327 },"~O");
5328 Clazz_defineMethod(c$,"trimToSize",
5329 function(){
5330 var size=this.size();
5331 var newArray=this.newElementArray(size);
5332 System.arraycopy(this.array,this.firstIndex,newArray,0,size);
5333 this.array=newArray;
5334 this.firstIndex=0;
5335 this.lastIndex=this.array.length;
5336 });
5337 });
5338 // BH 8/25/2014 1:10:59 AM  - removed indirect access/inner class business.
5339
5340 Clazz_load(["java.util.AbstractCollection","$.Iterator","$.List","$.ListIterator","$.RandomAccess","$.NoSuchElementException"],"java.util.AbstractList",["java.lang.IllegalArgumentException","$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){
5341 c$=Clazz_decorateAsClass(function(){
5342 this.modCount=0;
5343
5344
5345
5346 //if(!Clazz_isClassDefined("java.util.AbstractList.SimpleListIterator")){
5347 //java.util.AbstractList.$AbstractList$SimpleListIterator$();
5348 //}
5349 //if(!Clazz_isClassDefined("java.util.AbstractList.FullListIterator")){
5350 //java.util.AbstractList.$AbstractList$FullListIterator$();
5351 //}
5352
5353
5354
5355 Clazz_instantialize(this,arguments);
5356 },java.util,"AbstractList",java.util.AbstractCollection,java.util.List);
5357 Clazz_defineMethod(c$,"add",
5358 function(location,object){
5359 throw new UnsupportedOperationException();
5360 },"~N,~O");
5361 Clazz_defineMethod(c$,"add",
5362 function(object){
5363 this.add(this.size(),object);
5364 return true;
5365 },"~O");
5366 Clazz_defineMethod(c$,"addAll",
5367 function(location,collection){
5368 var it=collection.iterator();
5369 while(it.hasNext()){
5370 this.add(location++,it.next());
5371 }
5372 return!collection.isEmpty();
5373 },"~N,java.util.Collection");
5374 Clazz_overrideMethod(c$,"clear",
5375 function(){
5376 this.removeRange(0,this.size());
5377 });
5378 Clazz_overrideMethod(c$,"equals",
5379 function(object){
5380 if(this===object){
5381 return true;
5382 }if(Clazz_instanceOf(object,java.util.List)){
5383 var list=object;
5384 if(list.size()!=this.size()){
5385 return false;
5386 }var it1=this.iterator();
5387 var it2=list.iterator();
5388 while(it1.hasNext()){
5389 var e1=it1.next();
5390 var e2=it2.next();
5391 if(!(e1==null?e2==null:e1.equals(e2))){
5392 return false;
5393 }}
5394 return true;
5395 }return false;
5396 },"~O");
5397 Clazz_overrideMethod(c$,"hashCode",
5398 function(){
5399 var result=1;
5400 var it=this.iterator();
5401 while(it.hasNext()){
5402 var object=it.next();
5403 result=(31*result)+(object==null?0:object.hashCode());
5404 }
5405 return result;
5406 });
5407 Clazz_overrideMethod(c$,"indexOf",
5408 function(object){
5409 var it=this.listIterator();
5410 if(object!=null){
5411 while(it.hasNext()){
5412 if(object.equals(it.next())){
5413 return it.previousIndex();
5414 }}
5415 }else{
5416 while(it.hasNext()){
5417 if(it.next()==null){
5418 return it.previousIndex();
5419 }}
5420 }return-1;
5421 },"~O");
5422 Clazz_overrideMethod(c$,"iterator",
5423 function(){
5424 return new java.util.AbstractListSimpleListIterator(this); // Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null);
5425 });
5426 Clazz_overrideMethod(c$,"lastIndexOf",
5427 function(object){
5428 var it=this.listIterator(this.size());
5429 if(object!=null){
5430 while(it.hasPrevious()){
5431 if(object.equals(it.previous())){
5432 return it.nextIndex();
5433 }}
5434 }else{
5435 while(it.hasPrevious()){
5436 if(it.previous()==null){
5437 return it.nextIndex();
5438 }}
5439 }return-1;
5440 },"~O");
5441 //Clazz_defineMethod(c$,"listIterator",
5442 //function(){
5443 //return this.listIterator(0);
5444 //});
5445 Clazz_defineMethod(c$,"listIterator",
5446 function(location){
5447 location || (location = 0);
5448 return new java.util.AbstractListFullListIterator(this, location);//Clazz_innerTypeInstance(java.util.AbstractList.FullListIterator,this,null,location);
5449 },"~N");
5450 Clazz_defineMethod(c$,"remove",
5451 function(location){
5452 throw new UnsupportedOperationException();
5453 },"~N");
5454 Clazz_defineMethod(c$,"removeRange",
5455 function(start,end){
5456 var it=this.listIterator(start);
5457 for(var i=start;i<end;i++){
5458 it.next();
5459 it.remove();
5460 }
5461 },"~N,~N");
5462 Clazz_overrideMethod(c$,"set",
5463 function(location,object){
5464 throw new UnsupportedOperationException();
5465 },"~N,~O");
5466 Clazz_overrideMethod(c$,"subList",
5467 function(start,end){
5468 if(0<=start&&end<=this.size()){
5469 if(start<=end){
5470 if(Clazz_instanceOf(this,java.util.RandomAccess)){
5471 return new java.util.AbstractList.SubAbstractListRandomAccess(this,start,end);
5472 }return new java.util.AbstractList.SubAbstractList(this,start,end);
5473 }throw new IllegalArgumentException();
5474 }throw new IndexOutOfBoundsException();
5475 },"~N,~N");
5476
5477
5478
5479 //c$.$AbstractList$SimpleListIterator$=function(){
5480
5481 Clazz_pu$h(self.c$);
5482
5483 c$=Clazz_decorateAsClass(function(){
5484 //Clazz_prepareCallback(this,arguments);
5485 this.pos=-1;
5486 this.expectedModCount=0;
5487 this.lastPosition=-1;
5488 Clazz_instantialize(this,arguments);
5489 },java.util,"AbstractListSimpleListIterator",null,java.util.Iterator);
5490
5491
5492 Clazz_makeConstructor(c$,
5493 function(a){
5494 this._list = a;
5495 this.expectedModCount=a.modCount;
5496 }, "java.util.AbstractList");
5497
5498 Clazz_overrideMethod(c$,"hasNext",
5499 function(){
5500 return this.pos+1<this._list.size();
5501 });
5502 Clazz_overrideMethod(c$,"next",
5503 function(){
5504 if(this.expectedModCount==this._list.modCount){
5505 try{
5506 var a=this._list.get(this.pos+1);
5507 this.lastPosition=++this.pos;
5508 return a;
5509 }catch(e){
5510 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5511 throw new java.util.NoSuchElementException();
5512 }else{
5513 throw e;
5514 }
5515 }
5516 }throw new java.util.ConcurrentModificationException();
5517 });
5518 Clazz_overrideMethod(c$,"remove",
5519 function(){
5520 if(this.expectedModCount==this._list.modCount){
5521 try{
5522 this._list.remove(this.lastPosition);
5523 }catch(e){
5524 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5525 throw new IllegalStateException();
5526 }else{
5527 throw e;
5528 }
5529 }
5530 if(this._list.modCount!=this.expectedModCount){
5531 this.expectedModCount++;
5532 }if(this.pos==this.lastPosition){
5533 this.pos--;
5534 }this.lastPosition=-1;
5535 }else{
5536 throw new java.util.ConcurrentModificationException();
5537 }});
5538
5539 c$=Clazz_p0p();
5540 //};
5541
5542
5543 //c$.$AbstractList$FullListIterator$=function(){
5544 Clazz_pu$h(self.c$);
5545 c$=Clazz_decorateAsClass(function(){
5546 //Clazz_prepareCallback(this,arguments);
5547 Clazz_instantialize(this,arguments);
5548 },java.util,"AbstractListFullListIterator",java.util.AbstractListSimpleListIterator,java.util.ListIterator);
5549
5550 //,Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null,Clazz_inheritArgs));
5551
5552 Clazz_makeConstructor(c$,
5553 function(a,b){
5554 Clazz_superConstructor(this,java.util.AbstractListFullListIterator,[a]);
5555 if(0<=b&&b<=this._list.size()){
5556 this.pos=b-1;
5557 }else{
5558 throw new IndexOutOfBoundsException();
5559 }},"java.util.AbstractList,~N");
5560 Clazz_overrideMethod(c$,"add",
5561 function(a){
5562 if(this.expectedModCount==this._list.modCount){
5563 try{
5564 this._list.add(this.pos+1,a);
5565 }catch(e){
5566 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5567 throw new java.util.NoSuchElementException();
5568 }else{
5569 throw e;
5570 }
5571 }
5572 this.pos++;
5573 this.lastPosition=-1;
5574 if(this._list.modCount!=this.expectedModCount){
5575 this.expectedModCount++;
5576 }}else{
5577 throw new java.util.ConcurrentModificationException();
5578 }},"~O");
5579 Clazz_overrideMethod(c$,"hasPrevious",
5580 function(){
5581 return this.pos>=0;
5582 });
5583 Clazz_overrideMethod(c$,"nextIndex",
5584 function(){
5585 return this.pos+1;
5586 });
5587 Clazz_overrideMethod(c$,"previous",
5588 function(){
5589 if(this.expectedModCount==this._list.modCount){
5590 try{
5591 var a=this._list.get(this.pos);
5592 this.lastPosition=this.pos;
5593 this.pos--;
5594 return a;
5595 }catch(e){
5596 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5597 throw new java.util.NoSuchElementException();
5598 }else{
5599 throw e;
5600 }
5601 }
5602 }throw new java.util.ConcurrentModificationException();
5603 });
5604 Clazz_overrideMethod(c$,"previousIndex",
5605 function(){
5606 return this.pos;
5607 });
5608 Clazz_overrideMethod(c$,"set",
5609 function(a){
5610 if(this.expectedModCount==this._list.modCount){
5611 try{
5612 this._list.set(this.lastPosition,a);
5613 }catch(e){
5614 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5615 throw new IllegalStateException();
5616 }else{
5617 throw e;
5618 }
5619 }
5620 }else{
5621 throw new java.util.ConcurrentModificationException();
5622 }},"~O");
5623 c$=Clazz_p0p();
5624 //};
5625
5626
5627
5628
5629 Clazz_pu$h(self.c$);
5630 c$=Clazz_declareType(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);
5631 c$=Clazz_p0p();
5632
5633
5634
5635
5636 Clazz_pu$h(self.c$);
5637 c$=Clazz_decorateAsClass(function(){
5638 this.fullList=null;
5639 this.offset=0;
5640 this.$size=0;
5641 Clazz_instantialize(this,arguments);
5642 },java.util.AbstractList,"SubAbstractList",java.util.AbstractList);
5643 Clazz_makeConstructor(c$,
5644 function(a,b,c){
5645 Clazz_superConstructor(this,java.util.AbstractList.SubAbstractList);
5646 this.fullList=a;
5647 this.modCount=this.fullList.modCount;
5648 this.offset=b;
5649 this.$size=c-b;
5650 },"java.util.AbstractList,~N,~N");
5651 Clazz_defineMethod(c$,"add",
5652 function(a,b){
5653 if(this.modCount==this.fullList.modCount){
5654 if(0<=a&&a<=this.$size){
5655 this.fullList.add(a+this.offset,b);
5656 this.$size++;
5657 this.modCount=this.fullList.modCount;
5658 }else{
5659 throw new IndexOutOfBoundsException();
5660 }}else{
5661 throw new java.util.ConcurrentModificationException();
5662 }},"~N,~O");
5663 Clazz_defineMethod(c$,"addAll",
5664 function(a,b){
5665 if(this.modCount==this.fullList.modCount){
5666 if(0<=a&&a<=this.$size){
5667 var c=this.fullList.addAll(a+this.offset,b);
5668 if(c){
5669 this.$size+=b.size();
5670 this.modCount=this.fullList.modCount;
5671 }return c;
5672 }throw new IndexOutOfBoundsException();
5673 }throw new java.util.ConcurrentModificationException();
5674 },"~N,java.util.Collection");
5675 Clazz_defineMethod(c$,"addAll",
5676 function(a){
5677 if(this.modCount==this.fullList.modCount){
5678 var b=this.fullList.addAll(this.offset+this.$size,a);
5679 if(b){
5680 this.$size+=a.size();
5681 this.modCount=this.fullList.modCount;
5682 }return b;
5683 }throw new java.util.ConcurrentModificationException();
5684 },"java.util.Collection");
5685 Clazz_defineMethod(c$,"get",
5686 function(a){
5687 if(this.modCount==this.fullList.modCount){
5688 if(0<=a&&a<this.$size){
5689 return this.fullList.get(a+this.offset);
5690 }throw new IndexOutOfBoundsException();
5691 }throw new java.util.ConcurrentModificationException();
5692 },"~N");
5693 Clazz_overrideMethod(c$,"iterator",
5694 function(){
5695 return this.listIterator(0);
5696 });
5697 Clazz_defineMethod(c$,"listIterator",
5698 function(a){
5699 if(this.modCount==this.fullList.modCount){
5700 if(0<=a&&a<=this.$size){
5701 return new java.util.AbstractList.SubAbstractList.SubAbstractListIterator(this.fullList.listIterator(a+this.offset),this,this.offset,this.$size);
5702 }throw new IndexOutOfBoundsException();
5703 }throw new java.util.ConcurrentModificationException();
5704 },"~N");
5705 Clazz_defineMethod(c$,"remove",
5706 function(a){
5707 if(this.modCount==this.fullList.modCount){
5708 if(0<=a&&a<this.$size){
5709 var b=this.fullList.remove(a+this.offset);
5710 this.$size--;
5711 this.modCount=this.fullList.modCount;
5712 return b;
5713 }throw new IndexOutOfBoundsException();
5714 }throw new java.util.ConcurrentModificationException();
5715 },"~N");
5716 Clazz_defineMethod(c$,"removeRange",
5717 function(a,b){
5718 if(a!=b){
5719 if(this.modCount==this.fullList.modCount){
5720 this.fullList.removeRange(a+this.offset,b+this.offset);
5721 this.$size-=b-a;
5722 this.modCount=this.fullList.modCount;
5723 }else{
5724 throw new java.util.ConcurrentModificationException();
5725 }}},"~N,~N");
5726 Clazz_defineMethod(c$,"set",
5727 function(a,b){
5728 if(this.modCount==this.fullList.modCount){
5729 if(0<=a&&a<this.$size){
5730 return this.fullList.set(a+this.offset,b);
5731 }throw new IndexOutOfBoundsException();
5732 }throw new java.util.ConcurrentModificationException();
5733 },"~N,~O");
5734 Clazz_overrideMethod(c$,"size",
5735 function(){
5736 return this.$size;
5737 });
5738 Clazz_defineMethod(c$,"sizeChanged",
5739 function(a){
5740 if(a){
5741 this.$size++;
5742 }else{
5743 this.$size--;
5744 }this.modCount=this.fullList.modCount;
5745 },"~B");
5746 Clazz_pu$h(self.c$);
5747 c$=Clazz_decorateAsClass(function(){
5748 this.subList=null;
5749 this.iterator=null;
5750 this.start=0;
5751 this.end=0;
5752 Clazz_instantialize(this,arguments);
5753 },java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);
5754 Clazz_makeConstructor(c$,
5755 function(a,b,c,d){
5756 this.iterator=a;
5757 this.subList=b;
5758 this.start=c;
5759 this.end=this.start+d;
5760 },"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");
5761 Clazz_defineMethod(c$,"add",
5762 function(a){
5763 this.iterator.add(a);
5764 this.subList.sizeChanged(true);
5765 this.end++;
5766 },"~O");
5767 Clazz_overrideMethod(c$,"hasNext",
5768 function(){
5769 return this.iterator.nextIndex()<this.end;
5770 });
5771 Clazz_overrideMethod(c$,"hasPrevious",
5772 function(){
5773 return this.iterator.previousIndex()>=this.start;
5774 });
5775 Clazz_defineMethod(c$,"next",
5776 function(){
5777 if(this.iterator.nextIndex()<this.end){
5778 return this.iterator.next();
5779 }throw new java.util.NoSuchElementException();
5780 });
5781 Clazz_defineMethod(c$,"nextIndex",
5782 function(){
5783 return this.iterator.nextIndex()-this.start;
5784 });
5785 Clazz_defineMethod(c$,"previous",
5786 function(){
5787 if(this.iterator.previousIndex()>=this.start){
5788 return this.iterator.previous();
5789 }throw new java.util.NoSuchElementException();
5790 });
5791 Clazz_defineMethod(c$,"previousIndex",
5792 function(){
5793 var a=this.iterator.previousIndex();
5794 if(a>=this.start){
5795 return a-this.start;
5796 }return-1;
5797 });
5798 Clazz_defineMethod(c$,"remove",
5799 function(){
5800 this.iterator.remove();
5801 this.subList.sizeChanged(false);
5802 this.end--;
5803 });
5804 Clazz_defineMethod(c$,"set",
5805 function(a){
5806 this.iterator.set(a);
5807 },"~O");
5808 c$=Clazz_p0p();
5809 c$=Clazz_p0p();
5810 });
5811 // 4/23/2015 1:20:24 PM BH removing need for array.getClass().getComponentType()
5812
5813 Clazz_load(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){
5814 c$=Clazz_declareType(java.util,"AbstractCollection",null,java.util.Collection);
5815 Clazz_makeConstructor(c$,
5816 function(){
5817 });
5818 Clazz_overrideMethod(c$,"add",
5819 function(object){
5820 throw new UnsupportedOperationException();
5821 },"~O");
5822 Clazz_overrideMethod(c$,"addAll",
5823 function(collection){
5824 var result=false;
5825 var it=collection.iterator();
5826 while(it.hasNext()){
5827 if(this.add(it.next())){
5828 result=true;
5829 }}
5830 return result;
5831 },"java.util.Collection");
5832 Clazz_overrideMethod(c$,"clear",
5833 function(){
5834 var it=this.iterator();
5835 while(it.hasNext()){
5836 it.next();
5837 it.remove();
5838 }
5839 });
5840 Clazz_overrideMethod(c$,"contains",
5841 function(object){
5842 var it=this.iterator();
5843 if(object!=null){
5844 while(it.hasNext()){
5845 if(object.equals(it.next())){
5846 return true;
5847 }}
5848 }else{
5849 while(it.hasNext()){
5850 if(it.next()==null){
5851 return true;
5852 }}
5853 }return false;
5854 },"~O");
5855 Clazz_overrideMethod(c$,"containsAll",
5856 function(collection){
5857 var it=collection.iterator();
5858 while(it.hasNext()){
5859 if(!this.contains(it.next())){
5860 return false;
5861 }}
5862 return true;
5863 },"java.util.Collection");
5864 Clazz_overrideMethod(c$,"isEmpty",
5865 function(){
5866 return this.size()==0;
5867 });
5868 Clazz_overrideMethod(c$,"remove",
5869 function(object){
5870 var it=this.iterator();
5871 if(object!=null){
5872 while(it.hasNext()){
5873 if(object.equals(it.next())){
5874 it.remove();
5875 return true;
5876 }}
5877 }else{
5878 while(it.hasNext()){
5879 if(it.next()==null){
5880 it.remove();
5881 return true;
5882 }}
5883 }return false;
5884 },"~O");
5885 Clazz_overrideMethod(c$,"removeAll",
5886 function(collection){
5887 var result=false;
5888 var it=this.iterator();
5889 while(it.hasNext()){
5890 if(collection.contains(it.next())){
5891 it.remove();
5892 result=true;
5893 }}
5894 return result;
5895 },"java.util.Collection");
5896 Clazz_overrideMethod(c$,"retainAll",
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_defineMethod(c$,"toArray",
5908 function(){
5909 var size=this.size();
5910 var index=0;
5911 var it=this.iterator();
5912 var array=new Array(size);
5913 while(index<size){
5914 array[index++]=it.next();
5915 }
5916 return array;
5917 });
5918 Clazz_defineMethod(c$,"toArray",
5919 function(contents){
5920 var size=this.size();
5921 var index=0;
5922 // if(size>contents.length){  // BH unnec
5923 //var ct=contents.getClass().getComponentType();
5924 //contents=java.lang.reflect.Array.newInstance(ct,size);
5925 //}
5926 for(var entry,$entry=this.iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
5927 contents[index++]=entry;
5928 }
5929 if(index<contents.length){
5930 contents[index]=null;
5931 }return contents;
5932 },"~A");
5933 Clazz_overrideMethod(c$,"toString",
5934 function(){
5935 if(this.isEmpty()){
5936 return"[]";
5937 }var buffer=new StringBuilder(this.size()*16);
5938 buffer.append('[');
5939 var it=this.iterator();
5940 while(it.hasNext()){
5941 var next=it.next();
5942 if(next!==this){
5943 buffer.append(next);
5944 }else{
5945 buffer.append("(this Collection)");
5946 }if(it.hasNext()){
5947 buffer.append(", ");
5948 }}
5949 buffer.append(']');
5950 return buffer.toString();
5951 });
5952 });
5953 Clazz_declarePackage ("java.awt");
5954 Clazz_load (null, "java.awt.ComponentOrientation", ["java.util.Locale"], function () {
5955 c$ = Clazz_decorateAsClass (function () {
5956 this.orientation = 0;
5957 Clazz_instantialize (this, arguments);
5958 }, java.awt, "ComponentOrientation");
5959 Clazz_defineMethod (c$, "isHorizontal", 
5960 function () {
5961 return (this.orientation & 2) != 0;
5962 });
5963 Clazz_defineMethod (c$, "isLeftToRight", 
5964 function () {
5965 return (this.orientation & 4) != 0;
5966 });
5967 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
5968 function (locale) {
5969 var lang = locale.getLanguage ();
5970 if ("iw".equals (lang) || "ar".equals (lang) || "fa".equals (lang) || "ur".equals (lang)) {
5971 return java.awt.ComponentOrientation.RIGHT_TO_LEFT;
5972 } else {
5973 return java.awt.ComponentOrientation.LEFT_TO_RIGHT;
5974 }}, "java.util.Locale");
5975 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
5976 function (bdl) {
5977 var result = null;
5978 try {
5979 result = bdl.getObject ("Orientation");
5980 } catch (e) {
5981 if (Clazz_exceptionOf (e, Exception)) {
5982 } else {
5983 throw e;
5984 }
5985 }
5986 if (result == null) {
5987 result = java.awt.ComponentOrientation.getOrientation (bdl.getLocale ());
5988 }if (result == null) {
5989 result = java.awt.ComponentOrientation.getOrientation (java.util.Locale.getDefault ());
5990 }return result;
5991 }, "java.util.ResourceBundle");
5992 Clazz_makeConstructor (c$, 
5993  function (value) {
5994 this.orientation = value;
5995 }, "~N");
5996 Clazz_defineStatics (c$,
5997 "UNK_BIT", 1,
5998 "HORIZ_BIT", 2,
5999 "LTR_BIT", 4);
6000 c$.LEFT_TO_RIGHT = c$.prototype.LEFT_TO_RIGHT =  new java.awt.ComponentOrientation (6);
6001 c$.RIGHT_TO_LEFT = c$.prototype.RIGHT_TO_LEFT =  new java.awt.ComponentOrientation (2);
6002 c$.UNKNOWN = c$.prototype.UNKNOWN =  new java.awt.ComponentOrientation (7);
6003 });
6004 Clazz_declarePackage ("java.security");
6005 Clazz_load (["java.security.AccessControlContext"], "java.security.AccessController", null, function () {
6006 c$ = Clazz_declareType (java.security, "AccessController", null, java.security.AccessControlContext);
6007 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6008 function (action) {
6009 return action.run ();
6010 }, "java.security.PrivilegedAction");
6011 c$.getContext = Clazz_defineMethod (c$, "getContext", 
6012 function () {
6013 return  new java.security.AccessController ();
6014 });
6015 Clazz_overrideMethod (c$, "checkPermission", 
6016 function (perm) {
6017 return true;
6018 }, "~O");
6019 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6020 function (action, context) {
6021 return action.run ();
6022 }, "java.security.PrivilegedAction,java.security.AccessControlContext");
6023 });
6024 Clazz_declarePackage ("java.security");
6025 Clazz_declareInterface (java.security, "AccessControlContext");
6026 // BH minor efficiencies only
6027
6028 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(){
6029 c$=Clazz_decorateAsClass(function(){
6030 this.elementCount=0;
6031 this.elementData=null;
6032 this.loadFactor=0;
6033 this.threshold=0;
6034 this.modCount=0;
6035 Clazz_instantialize(this,arguments);
6036 },java.util,"HashMap",java.util.AbstractMap,[java.util.Map,Cloneable,java.io.Serializable]);
6037 Clazz_defineMethod(c$,"newElementArray",
6038 function(s){
6039 return new Array(s);
6040 },"~N");
6041 //Clazz_makeConstructor(c$,
6042 //function(){
6043 //this.construct(16);
6044 //});
6045 //Clazz_makeConstructor(c$,
6046 //function(capacity){
6047 //Clazz_superConstructor(this,java.util.HashMap,[]);
6048 //if(capacity>=0){
6049 //this.elementCount=0;
6050 //this.elementData=this.newElementArray(capacity==0?1:capacity);
6051 //this.loadFactor=0.75;
6052 //this.computeMaxSize();
6053 //}else{
6054 //throw new IllegalArgumentException();
6055 //}},"~N");
6056 Clazz_makeConstructor(c$,
6057 function(){
6058 this.construct(16);
6059 });
6060 Clazz_makeConstructor(c$,
6061 function(capacity){
6062 Clazz_superConstructor(this,java.util.HashMap,[]);
6063 if(capacity>=0){
6064 this.elementCount=0;
6065 this.elementData=this.newElementArray(capacity==0?1:capacity);
6066 this.loadFactor=0.75;
6067 this.computeMaxSize();
6068 }else{
6069 throw new IllegalArgumentException();
6070 }},"~N");
6071 Clazz_makeConstructor(c$,
6072 function(capacity,loadFactor){
6073 Clazz_superConstructor(this,java.util.HashMap,[]);
6074 if(capacity>=0&&loadFactor>0){
6075 this.elementCount=0;
6076 this.elementData=this.newElementArray(capacity==0?1:capacity);
6077 this.loadFactor=loadFactor;
6078 this.computeMaxSize();
6079 }else{
6080 throw new IllegalArgumentException();
6081 }},"~N,~N");
6082 Clazz_makeConstructor(c$,
6083 function(map){
6084 this.construct(map.size()<6?11:map.size()*2);
6085 Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6086 },"java.util.Map");
6087
6088
6089 /*
6090 Clazz_makeConstructor(c$,
6091 function(capacity,loadFactor){
6092 this.doConstruct(capacity,loadFactor);
6093 },"~N,~N");
6094
6095 Clazz_defineMethod(c$, "doConstruct",
6096 function(capacity,loadFactor) {
6097 capacity || (capacity = 16);
6098 loadFactor || (loadFactor = 0.75);
6099 if (typeof capacity != "number") {
6100  var map = capacity;
6101  this.loadFactor=loadFactor;
6102  this.elementData=this.newElementArray(map.size()<6?11:map.size()*2);
6103  this.computeMaxSize();
6104  this.putAllHM(map);
6105  return;
6106 }
6107
6108 //Clazz_superConstructor(this,java.util.HashMap,[]);
6109 if(capacity>=0&&loadFactor>0){
6110 this.elementData=this.newElementArray(capacity==0?1:capacity);
6111 this.loadFactor=loadFactor;
6112 this.computeMaxSize();
6113 }else{
6114 throw new IllegalArgumentException();
6115 }
6116 },"~N,~N");
6117
6118 //Clazz_makeConstructor(c$,
6119 //function(map){
6120 //this.construct(map.size()<6?11:map.size()*2);
6121 //Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6122 //},"java.util.Map");
6123
6124 */
6125 Clazz_overrideMethod(c$,"clear",
6126 function(){
6127 if(this.elementCount>0){
6128 this.elementCount=0;
6129 java.util.Arrays.fill(this.elementData,null);
6130 this.modCount++;
6131 }});
6132 Clazz_defineMethod(c$,"clone",
6133 function(){
6134   return this.cloneHM();
6135 });
6136
6137 Clazz_defineMethod(c$,"cloneHM",
6138 function(){
6139 try{
6140 var map=this.cloneAM();//Clazz_superCall(this,java.util.HashMap,"clone",[]);
6141 map.elementData=this.newElementArray(this.elementData.length);
6142 var entry;
6143 for(var i=0;i<this.elementData.length;i++){
6144 if((entry=this.elementData[i])!=null){
6145 map.elementData[i]=entry.clone();
6146 }}
6147 return map;
6148 }catch(e){
6149 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6150 return null;
6151 }else{
6152 throw e;
6153 }
6154 }
6155 });
6156
6157 Clazz_defineMethod(c$,"computeMaxSize",
6158 ($fz=function(){
6159 this.threshold=Math.round((this.elementData.length*this.loadFactor));
6160 },$fz.isPrivate=true,$fz));
6161 Clazz_overrideMethod(c$,"containsKey",
6162 function(key){
6163 return this.getEntry(key)!=null;
6164 },"~O");
6165 Clazz_defineMethod(c$,"keysEqual",
6166 function(k1,entry){
6167 var k1Hash=k1==null?0:k1.hashCode();
6168 if(k1Hash!=entry.origKeyHash){
6169 return false;
6170 }if(k1==null&&entry.key==null){
6171 return true;
6172 }return k1.equals(entry.key);
6173 },"~O,java.util.HashMap.Entry");
6174 Clazz_overrideMethod(c$,"containsValue",
6175 function(value){
6176 if(value!=null){
6177 for(var i=this.elementData.length;--i>=0;){
6178 var entry=this.elementData[i];
6179 while(entry!=null){
6180 if(value.equals(entry.value)){
6181 return true;
6182 }entry=entry.next;
6183 }
6184 }
6185 }else{
6186 for(var i=this.elementData.length;--i>=0;){
6187 var entry=this.elementData[i];
6188 while(entry!=null){
6189 if(entry.value==null){
6190 return true;
6191 }entry=entry.next;
6192 }
6193 }
6194 }return false;
6195 },"~O");
6196 Clazz_overrideMethod(c$,"entrySet",
6197 function(){
6198 return new java.util.HashMap.HashMapEntrySet(this);
6199 });
6200 Clazz_overrideMethod(c$,"get",
6201 function(key){
6202 var m=this.getEntry(key);
6203 if(m!=null){
6204 return m.value;
6205 }return null;
6206 },"~O");
6207 Clazz_defineMethod(c$,"getEntry",
6208 function(key){
6209 var index=this.getModuloHash(key);
6210 return this.findEntry(key,index);
6211 },"~O");
6212 Clazz_defineMethod(c$,"getModuloHash",
6213 function(key){
6214 if(key==null){
6215 return 0;
6216 }return(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6217 },"~O");
6218 Clazz_defineMethod(c$,"findEntry",
6219 function(key,index){
6220 var m;
6221 m=this.elementData[index];
6222 if(key!=null){
6223 while(m!=null&&!this.keysEqual(key,m)){
6224 m=m.next;
6225 }
6226 }else{
6227 while(m!=null&&m.key!=null){
6228 m=m.next;
6229 }
6230 }return m;
6231 },"~O,~N");
6232 Clazz_overrideMethod(c$,"isEmpty",
6233 function(){
6234 return this.elementCount==0;
6235 });
6236 Clazz_overrideMethod(c$,"keySet",
6237 function(){
6238 if(this.$keySet==null){
6239 this.$keySet=((Clazz_isClassDefined("java.util.HashMap$1")?0:java.util.HashMap.$HashMap$1$()),Clazz_innerTypeInstance(java.util.HashMap$1,this,null));
6240 }return this.$keySet;
6241 });
6242 Clazz_overrideMethod(c$,"put",
6243 function(key,value){
6244 var index=this.getModuloHash(key);
6245 var entry=this.findEntry(key,index);
6246 if(entry==null){
6247 this.modCount++;
6248 if(++this.elementCount>this.threshold){
6249 this.rehash();
6250 index=key==null?0:(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6251 }entry=this.createEntry(key,index,value);
6252 return null;
6253 }var result=entry.value;
6254 entry.value=value;
6255 return result;
6256 },"~O,~O");
6257 Clazz_defineMethod(c$,"createEntry",
6258 function(key,index,value){
6259 var entry=new java.util.HashMap.Entry(key,value);
6260 entry.next=this.elementData[index];
6261 this.elementData[index]=entry;
6262 return entry;
6263 },"~O,~N,~O");
6264 Clazz_defineMethod(c$,"putAll",
6265 function(map){
6266 if(!map.isEmpty()){
6267 var capacity=this.elementCount+map.size();
6268 if(capacity>this.threshold){
6269 this.rehash(capacity);
6270 }
6271 this.putAllHM(map);
6272
6273 }},"java.util.Map");
6274 Clazz_defineMethod(c$,"rehash",
6275 function(capacity){
6276 var length=(capacity==0?1:capacity<<1);
6277 var newData=this.newElementArray(length);
6278 for(var i=0;i<this.elementData.length;i++){
6279 var entry=this.elementData[i];
6280 while(entry!=null){
6281 var key=entry.key;
6282 var index=key==null?0:(key.hashCode()&0x7FFFFFFF)%length;
6283 var next=entry.next;
6284 entry.next=newData[index];
6285 newData[index]=entry;
6286 entry=next;
6287 }
6288 }
6289 this.elementData=newData;
6290 this.computeMaxSize();
6291 },"~N");
6292 Clazz_defineMethod(c$,"rehash",
6293 function(){
6294 this.rehash(this.elementData.length);
6295 });
6296 Clazz_overrideMethod(c$,"remove",
6297 function(key){
6298 var entry=this.removeEntry(key);
6299 if(entry!=null){
6300 return entry.value;
6301 }return null;
6302 },"~O");
6303 Clazz_defineMethod(c$,"removeEntry",
6304 function(key){
6305 var index=0;
6306 var entry;
6307 var last=null;
6308 if(key!=null){
6309 index=(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6310 entry=this.elementData[index];
6311 while(entry!=null&&!this.keysEqual(key,entry)){
6312 last=entry;
6313 entry=entry.next;
6314 }
6315 }else{
6316 entry=this.elementData[0];
6317 while(entry!=null&&entry.key!=null){
6318 last=entry;
6319 entry=entry.next;
6320 }
6321 }if(entry==null){
6322 return null;
6323 }if(last==null){
6324 this.elementData[index]=entry.next;
6325 }else{
6326 last.next=entry.next;
6327 }this.modCount++;
6328 this.elementCount--;
6329 return entry;
6330 },"~O");
6331 Clazz_overrideMethod(c$,"size",
6332 function(){
6333 return this.elementCount;
6334 });
6335 Clazz_overrideMethod(c$,"values",
6336 function(){
6337 if(this.valuesCollection==null){
6338 this.valuesCollection=((Clazz_isClassDefined("java.util.HashMap$2")?0:java.util.HashMap.$HashMap$2$()),Clazz_innerTypeInstance(java.util.HashMap$2,this,null));
6339 }return this.valuesCollection;
6340 });
6341 c$.$HashMap$1$=function(){
6342 Clazz_pu$h(self.c$);
6343 c$=Clazz_declareAnonymous(java.util,"HashMap$1",java.util.AbstractSet);
6344 Clazz_overrideMethod(c$,"contains",
6345 function(object){
6346 return this.b$["java.util.HashMap"].containsKey(object);
6347 },"~O");
6348 Clazz_overrideMethod(c$,"size",
6349 function(){
6350 return this.b$["java.util.HashMap"].size();
6351 });
6352 Clazz_overrideMethod(c$,"clear",
6353 function(){
6354 this.b$["java.util.HashMap"].clear();
6355 });
6356 Clazz_overrideMethod(c$,"remove",
6357 function(key){
6358 if(this.b$["java.util.HashMap"].containsKey(key)){
6359 this.b$["java.util.HashMap"].remove(key);
6360 return true;
6361 }return false;
6362 },"~O");
6363 Clazz_overrideMethod(c$,"iterator",
6364 function(){
6365 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"]);
6366 });
6367 c$=Clazz_p0p();
6368 };
6369 c$.$HashMap$1$1$=function(){
6370 Clazz_pu$h(self.c$);
6371 c$=Clazz_declareAnonymous(java.util,"HashMap$1$1",null,java.util.MapEntry.Type);
6372 Clazz_overrideMethod(c$,"get",
6373 function(entry){
6374 return entry.key;
6375 },"java.util.MapEntry");
6376 c$=Clazz_p0p();
6377 };
6378 c$.$HashMap$2$=function(){
6379 Clazz_pu$h(self.c$);
6380 c$=Clazz_declareAnonymous(java.util,"HashMap$2",java.util.AbstractCollection);
6381 Clazz_overrideMethod(c$,"contains",
6382 function(object){
6383 return this.b$["java.util.HashMap"].containsValue(object);
6384 },"~O");
6385 Clazz_overrideMethod(c$,"size",
6386 function(){
6387 return this.b$["java.util.HashMap"].size();
6388 });
6389 Clazz_overrideMethod(c$,"clear",
6390 function(){
6391 this.b$["java.util.HashMap"].clear();
6392 });
6393 Clazz_overrideMethod(c$,"iterator",
6394 function(){
6395 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"]);
6396 });
6397 c$=Clazz_p0p();
6398 };
6399 c$.$HashMap$2$1$=function(){
6400 Clazz_pu$h(self.c$);
6401 c$=Clazz_declareAnonymous(java.util,"HashMap$2$1",null,java.util.MapEntry.Type);
6402 Clazz_overrideMethod(c$,"get",
6403 function(entry){
6404 return entry.value;
6405 },"java.util.MapEntry");
6406 c$=Clazz_p0p();
6407 };
6408 Clazz_pu$h(self.c$);
6409 c$=Clazz_decorateAsClass(function(){
6410 this.origKeyHash=0;
6411 this.next=null;
6412 Clazz_instantialize(this,arguments);
6413 },java.util.HashMap,"Entry",java.util.MapEntry);
6414 Clazz_makeConstructor(c$,
6415 function(a,b){
6416 Clazz_superConstructor(this,java.util.HashMap.Entry,[a,b]);
6417 this.origKeyHash=(a==null?0:a.hashCode());
6418 },"~O,~O");
6419 Clazz_defineMethod(c$,"clone",
6420 function(){
6421 var a=Clazz_superCall(this,java.util.HashMap.Entry,"clone",[]);
6422 if(this.next!=null){
6423 a.next=this.next.clone();
6424 }return a;
6425 });
6426 c$=Clazz_p0p();
6427 Clazz_pu$h(self.c$);
6428 c$=Clazz_decorateAsClass(function(){
6429 this.position=0;
6430 this.expectedModCount=0;
6431 this.type=null;
6432 this.canRemove=false;
6433 this.entry=null;
6434 this.lastEntry=null;
6435 this.associatedMap=null;
6436 Clazz_instantialize(this,arguments);
6437 },java.util.HashMap,"HashMapIterator",null,java.util.Iterator);
6438 Clazz_makeConstructor(c$,
6439 function(a,b){
6440 this.associatedMap=b;
6441 this.type=a;
6442 this.expectedModCount=b.modCount;
6443 },"java.util.MapEntry.Type,java.util.HashMap");
6444 Clazz_overrideMethod(c$,"hasNext",
6445 function(){
6446 if(this.entry!=null){
6447 return true;
6448 }while(this.position<this.associatedMap.elementData.length){
6449 if(this.associatedMap.elementData[this.position]==null){
6450 this.position++;
6451 }else{
6452 return true;
6453 }}
6454 return false;
6455 });
6456 Clazz_defineMethod(c$,"checkConcurrentMod",
6457 function(){
6458 if(this.expectedModCount!=this.associatedMap.modCount){
6459 throw new java.util.ConcurrentModificationException();
6460 }});
6461 Clazz_overrideMethod(c$,"next",
6462 function(){
6463 this.checkConcurrentMod();
6464 if(!this.hasNext()){
6465 throw new java.util.NoSuchElementException();
6466 }var a;
6467 if(this.entry==null){
6468 a=this.lastEntry=this.associatedMap.elementData[this.position++];
6469 this.entry=this.lastEntry.next;
6470 }else{
6471 if(this.lastEntry.next!==this.entry){
6472 this.lastEntry=this.lastEntry.next;
6473 }a=this.entry;
6474 this.entry=this.entry.next;
6475 }this.canRemove=true;
6476 return this.type.get(a);
6477 });
6478 Clazz_overrideMethod(c$,"remove",
6479 function(){
6480 this.checkConcurrentMod();
6481 if(!this.canRemove){
6482 throw new IllegalStateException();
6483 }this.canRemove=false;
6484 this.associatedMap.modCount++;
6485 if(this.lastEntry.next===this.entry){
6486 while(this.associatedMap.elementData[--this.position]==null){
6487 ;}
6488 this.associatedMap.elementData[this.position]=this.associatedMap.elementData[this.position].next;
6489 this.entry=null;
6490 }else{
6491 this.lastEntry.next=this.entry;
6492 }this.associatedMap.elementCount--;
6493 this.expectedModCount++;
6494 });
6495 c$=Clazz_p0p();
6496 Clazz_pu$h(self.c$);
6497 c$=Clazz_decorateAsClass(function(){
6498 this.associatedMap=null;
6499 Clazz_instantialize(this,arguments);
6500 },java.util.HashMap,"HashMapEntrySet",java.util.AbstractSet);
6501 Clazz_makeConstructor(c$,
6502 function(a){
6503 Clazz_superConstructor(this,java.util.HashMap.HashMapEntrySet,[]);
6504 this.associatedMap=a;
6505 },"java.util.HashMap");
6506 Clazz_defineMethod(c$,"hashMap",
6507 function(){
6508 return this.associatedMap;
6509 });
6510 Clazz_overrideMethod(c$,"size",
6511 function(){
6512 return this.associatedMap.elementCount;
6513 });
6514 Clazz_overrideMethod(c$,"clear",
6515 function(){
6516 this.associatedMap.clear();
6517 });
6518 Clazz_overrideMethod(c$,"remove",
6519 function(a){
6520 if(this.contains(a)){
6521 this.associatedMap.remove((a).getKey());
6522 return true;
6523 }return false;
6524 },"~O");
6525 Clazz_overrideMethod(c$,"contains",
6526 function(a){
6527 if(Clazz_instanceOf(a,java.util.Map.Entry)){
6528 var b=this.associatedMap.getEntry((a).getKey());
6529 return a.equals(b);
6530 }return false;
6531 },"~O");
6532 Clazz_overrideMethod(c$,"iterator",
6533 function(){
6534 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);
6535 });
6536 c$.$HashMap$HashMapEntrySet$1$=function(){
6537 Clazz_pu$h(self.c$);
6538 c$=Clazz_declareAnonymous(java.util,"HashMap$HashMapEntrySet$1",null,java.util.MapEntry.Type);
6539 Clazz_overrideMethod(c$,"get",
6540 function(a){
6541 return a;
6542 },"java.util.MapEntry");
6543 c$=Clazz_p0p();
6544 };
6545 c$=Clazz_p0p();
6546 Clazz_defineStatics(c$,
6547 "DEFAULT_SIZE",16);
6548 });
6549 Clazz_load(["java.util.Map"],"java.util.MapEntry",null,function(){
6550 c$=Clazz_decorateAsClass(function(){
6551 this.key=null;
6552 this.value=null;
6553 Clazz_instantialize(this,arguments);
6554 },java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);
6555 Clazz_makeConstructor(c$,
6556 function(theKey){
6557 this.key=theKey;
6558 },"~O");
6559 Clazz_makeConstructor(c$,
6560 function(theKey,theValue){
6561 this.key=theKey;
6562 this.value=theValue;
6563 },"~O,~O");
6564 Clazz_defineMethod(c$,"clone",
6565 function(){
6566 try{
6567 return Clazz_superCall(this,java.util.MapEntry,"clone",[]);
6568 }catch(e){
6569 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6570 return null;
6571 }else{
6572 throw e;
6573 }
6574 }
6575 });
6576 Clazz_overrideMethod(c$,"equals",
6577 function(object){
6578 if(this===object){
6579 return true;
6580 }if(Clazz_instanceOf(object,java.util.Map.Entry)){
6581 var entry=object;
6582 return(this.key==null?entry.getKey()==null:this.key.equals(entry.getKey()))&&(this.value==null?entry.getValue()==null:this.value.equals(entry.getValue()));
6583 }return false;
6584 },"~O");
6585 Clazz_overrideMethod(c$,"getKey",
6586 function(){
6587 return this.key;
6588 });
6589 Clazz_overrideMethod(c$,"getValue",
6590 function(){
6591 return this.value;
6592 });
6593 Clazz_overrideMethod(c$,"hashCode",
6594 function(){
6595 return(this.key==null?0:this.key.hashCode())^(this.value==null?0:this.value.hashCode());
6596 });
6597 Clazz_overrideMethod(c$,"setValue",
6598 function(object){
6599 var result=this.value;
6600 this.value=object;
6601 return result;
6602 },"~O");
6603 Clazz_overrideMethod(c$,"toString",
6604 function(){
6605 return this.key+"="+this.value;
6606 });
6607 Clazz_declareInterface(java.util.MapEntry,"Type");
6608 });
6609 Clazz_load(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){
6610 c$=Clazz_declareType(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);
6611 Clazz_overrideMethod(c$,"equals",
6612 function(object){
6613 if(this===object){
6614 return true;
6615 }if(Clazz_instanceOf(object,java.util.Set)){
6616 var s=object;
6617 return this.size()==s.size()&&this.containsAll(s);
6618 }return false;
6619 },"~O");
6620 Clazz_overrideMethod(c$,"hashCode",
6621 function(){
6622 var result=0;
6623 var it=this.iterator();
6624 while(it.hasNext()){
6625 var next=it.next();
6626 result+=next==null?0:next.hashCode();
6627 }
6628 return result;
6629 });
6630 Clazz_overrideMethod(c$,"removeAll",
6631 function(collection){
6632 var result=false;
6633 if(this.size()<=collection.size()){
6634 var it=this.iterator();
6635 while(it.hasNext()){
6636 if(collection.contains(it.next())){
6637 it.remove();
6638 result=true;
6639 }}
6640 }else{
6641 var it=collection.iterator();
6642 while(it.hasNext()){
6643 result=this.remove(it.next())||result;
6644 }
6645 }return result;
6646 },"java.util.Collection");
6647 });
6648 Clazz_load(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){
6649 c$=Clazz_decorateAsClass(function(){
6650 this.$keySet=null;
6651 this.valuesCollection=null;
6652 Clazz_instantialize(this,arguments);
6653 },java.util,"AbstractMap",null,java.util.Map);
6654 Clazz_makeConstructor(c$,
6655 function(){
6656 });
6657 Clazz_overrideMethod(c$,"clear",
6658 function(){
6659 this.entrySet().clear();
6660 });
6661 Clazz_overrideMethod(c$,"containsKey",
6662 function(key){
6663 var it=this.entrySet().iterator();
6664 if(key!=null){
6665 while(it.hasNext()){
6666 if(key.equals(it.next().getKey())){
6667 return true;
6668 }}
6669 }else{
6670 while(it.hasNext()){
6671 if(it.next().getKey()==null){
6672 return true;
6673 }}
6674 }return false;
6675 },"~O");
6676 Clazz_overrideMethod(c$,"containsValue",
6677 function(value){
6678 var it=this.entrySet().iterator();
6679 if(value!=null){
6680 while(it.hasNext()){
6681 if(value.equals(it.next().getValue())){
6682 return true;
6683 }}
6684 }else{
6685 while(it.hasNext()){
6686 if(it.next().getValue()==null){
6687 return true;
6688 }}
6689 }return false;
6690 },"~O");
6691 Clazz_overrideMethod(c$,"equals",
6692 function(object){
6693 if(this===object){
6694 return true;
6695 }if(Clazz_instanceOf(object,java.util.Map)){
6696 var map=object;
6697 if(this.size()!=map.size()){
6698 return false;
6699 }var objectSet=map.entrySet();
6700 var it=this.entrySet().iterator();
6701 while(it.hasNext()){
6702 if(!objectSet.contains(it.next())){
6703 return false;
6704 }}
6705 return true;
6706 }return false;
6707 },"~O");
6708 Clazz_overrideMethod(c$,"get",
6709 function(key){
6710 var it=this.entrySet().iterator();
6711 if(key!=null){
6712 while(it.hasNext()){
6713 var entry=it.next();
6714 if(key.equals(entry.getKey())){
6715 return entry.getValue();
6716 }}
6717 }else{
6718 while(it.hasNext()){
6719 var entry=it.next();
6720 if(entry.getKey()==null){
6721 return entry.getValue();
6722 }}
6723 }return null;
6724 },"~O");
6725 Clazz_overrideMethod(c$,"hashCode",
6726 function(){
6727 var result=0;
6728 var it=this.entrySet().iterator();
6729 while(it.hasNext()){
6730 result+=it.next().hashCode();
6731 }
6732 return result;
6733 });
6734 Clazz_overrideMethod(c$,"isEmpty",
6735 function(){
6736 return this.size()==0;
6737 });
6738 Clazz_overrideMethod(c$,"keySet",
6739 function(){
6740 if(this.$keySet==null){
6741 this.$keySet=((Clazz_isClassDefined("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1,this,null));
6742 }return this.$keySet;
6743 });
6744 Clazz_overrideMethod(c$,"put",
6745 function(key,value){
6746 throw new UnsupportedOperationException();
6747 },"~O,~O");
6748 Clazz_overrideMethod(c$,"putAll",
6749 function(map){
6750   this.putAllAM(map);
6751 },"java.util.Map");
6752
6753 Clazz_overrideMethod(c$,"putAllAM",
6754 function(map){
6755 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
6756 this.put(entry.getKey(),entry.getValue());
6757 }
6758 },"java.util.Map");
6759
6760 Clazz_overrideMethod(c$,"remove",
6761 function(key){
6762 var it=this.entrySet().iterator();
6763 if(key!=null){
6764 while(it.hasNext()){
6765 var entry=it.next();
6766 if(key.equals(entry.getKey())){
6767 it.remove();
6768 return entry.getValue();
6769 }}
6770 }else{
6771 while(it.hasNext()){
6772 var entry=it.next();
6773 if(entry.getKey()==null){
6774 it.remove();
6775 return entry.getValue();
6776 }}
6777 }return null;
6778 },"~O");
6779 Clazz_overrideMethod(c$,"size",
6780 function(){
6781 return this.entrySet().size();
6782 });
6783 Clazz_overrideMethod(c$,"toString",
6784 function(){
6785 if(this.isEmpty()){
6786 return"{}";
6787 }var buffer=new StringBuilder(this.size()*28);
6788 buffer.append('{');
6789 var it=this.entrySet().iterator();
6790 while(it.hasNext()){
6791 var entry=it.next();
6792 var key=entry.getKey();
6793 if(key!==this){
6794 buffer.append(key);
6795 }else{
6796 buffer.append("(this Map)");
6797 }buffer.append('=');
6798 var value=entry.getValue();
6799 if(value!==this){
6800 buffer.append(value);
6801 }else{
6802 buffer.append("(this Map)");
6803 }if(it.hasNext()){
6804 buffer.append(", ");
6805 }}
6806 buffer.append('}');
6807 return buffer.toString();
6808 });
6809 Clazz_overrideMethod(c$,"values",
6810 function(){
6811 if(this.valuesCollection==null){
6812 this.valuesCollection=((Clazz_isClassDefined("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$()),Clazz_innerTypeInstance(java.util.AbstractMap$2,this,null));
6813 }return this.valuesCollection;
6814 });
6815 Clazz_defineMethod(c$,"clone",
6816 function(){
6817 return  this.cloneAM();
6818 });
6819
6820 Clazz_defineMethod(c$,"cloneAM",
6821 function(){
6822 var result = Clazz_clone(this);
6823 //var result=Clazz_superCall(this,java.util.AbstractMap,"clone",[]);
6824 result.$keySet=null;
6825 result.valuesCollection=null;
6826 return result;
6827 });
6828
6829 c$.$AbstractMap$1$=function(){
6830 Clazz_pu$h(self.c$);
6831 c$=Clazz_declareAnonymous(java.util,"AbstractMap$1",java.util.AbstractSet);
6832 Clazz_overrideMethod(c$,"contains",
6833 function(object){
6834 return this.b$["java.util.AbstractMap"].containsKey(object);
6835 },"~O");
6836 Clazz_overrideMethod(c$,"size",
6837 function(){
6838 return this.b$["java.util.AbstractMap"].size();
6839 });
6840 Clazz_overrideMethod(c$,"iterator",
6841 function(){
6842 return((Clazz_isClassDefined("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1$1,this,null));
6843 });
6844 c$=Clazz_p0p();
6845 };
6846 c$.$AbstractMap$1$1$=function(){
6847 Clazz_pu$h(self.c$);
6848 c$=Clazz_decorateAsClass(function(){
6849 Clazz_prepareCallback(this,arguments);
6850 this.setIterator=null;
6851 Clazz_instantialize(this,arguments);
6852 },java.util,"AbstractMap$1$1",null,java.util.Iterator);
6853 Clazz_prepareFields(c$,function(){
6854 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6855 });
6856 Clazz_overrideMethod(c$,"hasNext",
6857 function(){
6858 return this.setIterator.hasNext();
6859 });
6860 Clazz_overrideMethod(c$,"next",
6861 function(){
6862 return this.setIterator.next().getKey();
6863 });
6864 Clazz_overrideMethod(c$,"remove",
6865 function(){
6866 this.setIterator.remove();
6867 });
6868 c$=Clazz_p0p();
6869 };
6870 c$.$AbstractMap$2$=function(){
6871 Clazz_pu$h(self.c$);
6872 c$=Clazz_declareAnonymous(java.util,"AbstractMap$2",java.util.AbstractCollection);
6873 Clazz_overrideMethod(c$,"size",
6874 function(){
6875 return this.b$["java.util.AbstractMap"].size();
6876 });
6877 Clazz_overrideMethod(c$,"contains",
6878 function(object){
6879 return this.b$["java.util.AbstractMap"].containsValue(object);
6880 },"~O");
6881 Clazz_overrideMethod(c$,"iterator",
6882 function(){
6883 return((Clazz_isClassDefined("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$2$1,this,null));
6884 });
6885 c$=Clazz_p0p();
6886 };
6887 c$.$AbstractMap$2$1$=function(){
6888 Clazz_pu$h(self.c$);
6889 c$=Clazz_decorateAsClass(function(){
6890 Clazz_prepareCallback(this,arguments);
6891 this.setIterator=null;
6892 Clazz_instantialize(this,arguments);
6893 },java.util,"AbstractMap$2$1",null,java.util.Iterator);
6894 Clazz_prepareFields(c$,function(){
6895 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6896 });
6897 Clazz_overrideMethod(c$,"hasNext",
6898 function(){
6899 return this.setIterator.hasNext();
6900 });
6901 Clazz_overrideMethod(c$,"next",
6902 function(){
6903 return this.setIterator.next().getValue();
6904 });
6905 Clazz_overrideMethod(c$,"remove",
6906 function(){
6907 this.setIterator.remove();
6908 });
6909 c$=Clazz_p0p();
6910 };
6911 });
6912 Clazz_declarePackage ("java.awt.image");
6913 c$ = Clazz_declareInterface (java.awt.image, "ImageObserver");
6914 Clazz_defineStatics (c$,
6915 "WIDTH", 1,
6916 "HEIGHT", 2,
6917 "PROPERTIES", 4,
6918 "SOMEBITS", 8,
6919 "FRAMEBITS", 16,
6920 "ALLBITS", 32,
6921 "ERROR", 64,
6922 "ABORT", 128);
6923 // BH removed inner class 
6924 Clazz_load(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException"],function(){
6925 c$=Clazz_decorateAsClass(function(){
6926 this.$name=null;
6927 this.$ordinal=0;
6928 Clazz_instantialize(this,arguments);
6929 },java.lang,"Enum",null,[java.io.Serializable,Comparable]);
6930 Clazz_makeConstructor(c$,
6931 function(name,ordinal){
6932 this.$name=name;
6933 this.$ordinal=ordinal;
6934 },"~S,~N");
6935 Clazz_defineMethod(c$,"name",
6936 function(){
6937 return this.$name;
6938 });
6939 Clazz_defineMethod(c$,"ordinal",
6940 function(){
6941 return this.$ordinal;
6942 });
6943 Clazz_overrideMethod(c$,"toString",
6944 function(){
6945 return this.$name;
6946 });
6947 Clazz_overrideMethod(c$,"equals",
6948 function(other){
6949 return this===other;
6950 },"~O");
6951 Clazz_overrideMethod(c$,"hashCode",
6952 function(){
6953 return this.$ordinal+(this.$name==null?0:this.$name.hashCode());
6954 });
6955 Clazz_overrideMethod(c$,"clone",
6956 function(){
6957 throw new CloneNotSupportedException(("KA004"));
6958 });
6959 Clazz_overrideMethod(c$,"compareTo",
6960 function(o){
6961 return this.$ordinal-o.$ordinal;
6962 },"~O");
6963 Clazz_defineMethod(c$,"getDeclaringClass",
6964 function(){
6965 var myClass=this.getClass();
6966 var mySuperClass=myClass.getSuperclass();
6967 if(Enum===mySuperClass){
6968 return myClass;
6969 }return mySuperClass;
6970 });
6971 c$.$valueOf=Clazz_defineMethod(c$,"$valueOf",
6972 function(enumType,name){
6973 if((enumType==null)||(name==null)){
6974 throw new NullPointerException(("KA001"));
6975 }var values=Enum.getValues(enumType);
6976 if(values==null){
6977 throw new IllegalArgumentException(("KA005"));
6978 }for(var enumConst,$enumConst=0,$$enumConst=values;$enumConst<$$enumConst.length&&((enumConst=$$enumConst[$enumConst])||true);$enumConst++){
6979 if(enumConst.$name.equals(name)){
6980 return enumConst;
6981 }}
6982 throw new IllegalArgumentException(("KA006"));
6983 },"Class,~S");
6984 c$.getValues=Clazz_defineMethod(c$,"getValues",
6985 function(enumType){
6986 return enumType.values();
6987 },"Class");
6988
6989 //c$.$Enum$1$=function(){
6990 //Clazz_pu$h(self.c$);
6991
6992 //c$=Clazz_declareAnonymous(null,"Enum$1",null,java.security.PrivilegedExceptionAction);
6993 //Clazz_overrideMethod(c$,"run",
6994 //function(){
6995 //var valsMethod=this.f$.enumType.getMethod("values",null);
6996 //valsMethod.setAccessible(true);
6997 //return valsMethod;
6998 //});
6999 //c$=Clazz_p0p();
7000 //};
7001
7002
7003 });
7004 Clazz_declarePackage ("java.applet");
7005 Clazz_declareInterface (java.applet, "AppletStub");
7006 Clazz_declarePackage ("java.applet");
7007 Clazz_declareInterface (java.applet, "AppletContext");
7008 Clazz_declarePackage ("javajs.api");
7009 Clazz_declareInterface (javajs.api, "JSInterface");
7010 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){
7011 c$=Clazz_declareType(java.lang,"StringBuilder",AbstractStringBuilder,[Appendable,CharSequence,java.io.Serializable]);
7012 Clazz_makeConstructor(c$,
7013 function(seq){
7014 Clazz_superConstructor(this,StringBuilder,[seq.toString()]);
7015 },"CharSequence");
7016 Clazz_defineMethod(c$,"append",
7017 function(b){
7018 this.append0(b?"true":"false");
7019 return this;
7020 },"~B");
7021 Clazz_defineMethod(c$,"append",
7022 function(c){
7023 this.append0(c);
7024 return this;
7025 },"~N");
7026 Clazz_defineMethod(c$,"append",
7027 function(i){
7028 this.append0(Integer.toString(i));
7029 return this;
7030 },"~N");
7031 Clazz_defineMethod(c$,"append",
7032 function(lng){
7033 this.append0(Long.toString(lng));
7034 return this;
7035 },"~N");
7036 Clazz_defineMethod(c$,"append",
7037 function(f){
7038 this.append0(Float.toString(f));
7039 return this;
7040 },"~N");
7041 Clazz_defineMethod(c$,"append",
7042 function(d){
7043 this.append0(Double.toString(d));
7044 return this;
7045 },"~N");
7046 Clazz_defineMethod(c$,"append",
7047 function(obj){
7048 if(obj==null){
7049 this.appendNull();
7050 }else{
7051 this.append0(obj.toString());
7052 }return this;
7053 },"~O");
7054 Clazz_defineMethod(c$,"append",
7055 function(str){
7056 this.append0(str);
7057 return this;
7058 },"~S");
7059 Clazz_defineMethod(c$,"append",
7060 function(sb){
7061 if(sb==null){
7062 this.appendNull();
7063 }else{
7064 this.append0(sb.getValue(),0,sb.length());
7065 }return this;
7066 },"StringBuffer");
7067 Clazz_defineMethod(c$,"append",
7068 function(ch){
7069 this.append0(ch);
7070 return this;
7071 },"~A");
7072 Clazz_defineMethod(c$,"append",
7073 function(str,offset,len){
7074 this.append0(str,offset,len);
7075 return this;
7076 },"~A,~N,~N");
7077 Clazz_defineMethod(c$,"append",
7078 function(csq){
7079 if(csq==null){
7080 this.appendNull();
7081 }else{
7082 this.append0(csq.toString());
7083 }return this;
7084 },"CharSequence");
7085 Clazz_defineMethod(c$,"append",
7086 function(csq,start,end){
7087 this.append0(csq,start,end);
7088 return this;
7089 },"CharSequence,~N,~N");
7090 Clazz_defineMethod(c$,"$delete",
7091 function(start,end){
7092 this.delete0(start,end);
7093 return this;
7094 },"~N,~N");
7095 Clazz_defineMethod(c$,"deleteCharAt",
7096 function(index){
7097 this.deleteCharAt0(index);
7098 return this;
7099 },"~N");
7100 Clazz_defineMethod(c$,"insert",
7101 function(offset,b){
7102 this.insert0(offset,b?"true":"false");
7103 return this;
7104 },"~N,~B");
7105 Clazz_defineMethod(c$,"insert",
7106 function(offset,c){
7107 this.insert0(offset,c);
7108 return this;
7109 },"~N,~N");
7110 Clazz_defineMethod(c$,"insert",
7111 function(offset,i){
7112 this.insert0(offset,Integer.toString(i));
7113 return this;
7114 },"~N,~N");
7115 Clazz_defineMethod(c$,"insert",
7116 function(offset,l){
7117 this.insert0(offset,Long.toString(l));
7118 return this;
7119 },"~N,~N");
7120 Clazz_defineMethod(c$,"insert",
7121 function(offset,f){
7122 this.insert0(offset,Float.toString(f));
7123 return this;
7124 },"~N,~N");
7125 Clazz_defineMethod(c$,"insert",
7126 function(offset,d){
7127 this.insert0(offset,Double.toString(d));
7128 return this;
7129 },"~N,~N");
7130 Clazz_defineMethod(c$,"insert",
7131 function(offset,obj){
7132 this.insert0(offset,obj==null?"null":obj.toString());
7133 return this;
7134 },"~N,~O");
7135 Clazz_defineMethod(c$,"insert",
7136 function(offset,str){
7137 this.insert0(offset,str);
7138 return this;
7139 },"~N,~S");
7140 Clazz_defineMethod(c$,"insert",
7141 function(offset,ch){
7142 this.insert0(offset,ch);
7143 return this;
7144 },"~N,~A");
7145 Clazz_defineMethod(c$,"insert",
7146 function(offset,str,strOffset,strLen){
7147 this.insert0(offset,str,strOffset,strLen);
7148 return this;
7149 },"~N,~A,~N,~N");
7150 Clazz_defineMethod(c$,"insert",
7151 function(offset,s){
7152 this.insert0(offset,s==null?"null":s.toString());
7153 return this;
7154 },"~N,CharSequence");
7155 Clazz_defineMethod(c$,"insert",
7156 function(offset,s,start,end){
7157 this.insert0(offset,s,start,end);
7158 return this;
7159 },"~N,CharSequence,~N,~N");
7160 Clazz_defineMethod(c$,"replace",
7161 function(start,end,str){
7162 this.replace0(start,end,str);
7163 return this;
7164 },"~N,~N,~S");
7165 Clazz_defineMethod(c$,"reverse",
7166 function(){
7167 this.reverse0();
7168 return this;
7169 });
7170 });
7171 Clazz_load(null,"java.lang.AbstractStringBuilder",["java.io.InvalidObjectException","java.lang.ArrayIndexOutOfBoundsException","$.IndexOutOfBoundsException","$.NegativeArraySizeException","$.NullPointerException","$.StringIndexOutOfBoundsException"],function(){
7172 c$=Clazz_decorateAsClass(function(){
7173 this.value=null;
7174 this.count=0;
7175 this.shared=false;
7176 Clazz_instantialize(this,arguments);
7177 },java.lang,"AbstractStringBuilder");
7178 Clazz_defineMethod(c$,"getValue",
7179 function(){
7180 return this.value;
7181 });
7182 Clazz_defineMethod(c$,"shareValue",
7183 function(){
7184 this.shared=true;
7185 return this.value;
7186 });
7187 Clazz_defineMethod(c$,"set",
7188 function(val,len){
7189 if(val==null)val=Clazz_newArray(0,'\0');
7190 if(val.length<len)throw new java.io.InvalidObjectException(("K0199"));
7191 this.shared=false;
7192 this.value=val;
7193 this.count=len;
7194 },"~A,~N");
7195 Clazz_makeConstructor(c$,
7196 function(){
7197 this.value=Clazz_newArray(16,'\0');
7198 });
7199 Clazz_makeConstructor(c$,
7200 function(capacity){
7201 if(capacity<0)throw new NegativeArraySizeException();
7202 this.value=Clazz_newArray(capacity,'\0');
7203 },"~N");
7204 Clazz_makeConstructor(c$,
7205 function(string){
7206 this.count=string.length;
7207 this.shared=false;
7208 this.value=Clazz_newArray(this.count+16,'\0');
7209 string.getChars(0,this.count,this.value,0);
7210 },"~S");
7211 Clazz_defineMethod(c$,"enlargeBuffer",
7212 ($fz=function(min){
7213 var twice=(this.value.length<<1)+2;
7214 var newData=Clazz_newArray(min>twice?min:twice,'\0');
7215 System.arraycopy(this.value,0,newData,0,this.count);
7216 this.value=newData;
7217 this.shared=false;
7218 },$fz.isPrivate=true,$fz),"~N");
7219 Clazz_defineMethod(c$,"appendNull",
7220 function(){
7221 var newSize=this.count+4;
7222 if(newSize>this.value.length){
7223 this.enlargeBuffer(newSize);
7224 }else if(this.shared){
7225 this.value=this.value.clone();
7226 this.shared=false;
7227 }this.value[this.count++]='n';
7228 this.value[this.count++]='u';
7229 this.value[this.count++]='l';
7230 this.value[this.count++]='l';
7231 });
7232 Clazz_defineMethod(c$,"append0",
7233 function(chars){
7234 var newSize=this.count+chars.length;
7235 if(newSize>this.value.length){
7236 this.enlargeBuffer(newSize);
7237 }else if(this.shared){
7238 this.value=this.value.clone();
7239 this.shared=false;
7240 }System.arraycopy(chars,0,this.value,this.count,chars.length);
7241 this.count=newSize;
7242 },"~A");
7243 Clazz_defineMethod(c$,"append0",
7244 function(chars,start,length){
7245 if(chars==null){
7246 throw new NullPointerException();
7247 }if(start>=0&&0<=length&&length<=chars.length-start){
7248 var newSize=this.count+length;
7249 if(newSize>this.value.length){
7250 this.enlargeBuffer(newSize);
7251 }else if(this.shared){
7252 this.value=this.value.clone();
7253 this.shared=false;
7254 }System.arraycopy(chars,start,this.value,this.count,length);
7255 this.count=newSize;
7256 }else{
7257 throw new ArrayIndexOutOfBoundsException();
7258 }},"~A,~N,~N");
7259 Clazz_defineMethod(c$,"append0",
7260 function(ch){
7261 if(this.count==this.value.length){
7262 this.enlargeBuffer(this.count+1);
7263 }if(this.shared){
7264 this.value=this.value.clone();
7265 this.shared=false;
7266 }this.value[this.count++]=ch;
7267 },"~N");
7268 Clazz_defineMethod(c$,"append0",
7269 function(string){
7270 if(string==null){
7271 this.appendNull();
7272 return;
7273 }var adding=string.length;
7274 var newSize=this.count+adding;
7275 if(newSize>this.value.length){
7276 this.enlargeBuffer(newSize);
7277 }else if(this.shared){
7278 this.value=this.value.clone();
7279 this.shared=false;
7280 }string.getChars(0,adding,this.value,this.count);
7281 this.count=newSize;
7282 },"~S");
7283 Clazz_defineMethod(c$,"append0",
7284 function(s,start,end){
7285 if(s==null)s="null";
7286 if(start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7287 this.append0(s.subSequence(start,end).toString());
7288 },"CharSequence,~N,~N");
7289 Clazz_defineMethod(c$,"capacity",
7290 function(){
7291 return this.value.length;
7292 });
7293 Clazz_defineMethod(c$,"charAt",
7294 function(index){
7295 if(index<0||index>=this.count)throw new StringIndexOutOfBoundsException(index);
7296 return this.value[index];
7297 },"~N");
7298 Clazz_defineMethod(c$,"delete0",
7299 function(start,end){
7300 if(start>=0){
7301 if(end>this.count){
7302 end=this.count;
7303 }if(end==start){
7304 return;
7305 }if(end>start){
7306 var length=this.count-end;
7307 if(length>0){
7308 if(!this.shared){
7309 System.arraycopy(this.value,end,this.value,start,length);
7310 }else{
7311 var newData=Clazz_newArray(this.value.length,'\0');
7312 System.arraycopy(this.value,0,newData,0,start);
7313 System.arraycopy(this.value,end,newData,start,length);
7314 this.value=newData;
7315 this.shared=false;
7316 }}this.count-=end-start;
7317 return;
7318 }}throw new StringIndexOutOfBoundsException();
7319 },"~N,~N");
7320 Clazz_defineMethod(c$,"deleteCharAt0",
7321 function(location){
7322 if(0>location||location>=this.count)throw new StringIndexOutOfBoundsException(location);
7323 var length=this.count-location-1;
7324 if(length>0){
7325 if(!this.shared){
7326 System.arraycopy(this.value,location+1,this.value,location,length);
7327 }else{
7328 var newData=Clazz_newArray(this.value.length,'\0');
7329 System.arraycopy(this.value,0,newData,0,location);
7330 System.arraycopy(this.value,location+1,newData,location,length);
7331 this.value=newData;
7332 this.shared=false;
7333 }}this.count--;
7334 },"~N");
7335 Clazz_defineMethod(c$,"ensureCapacity",
7336 function(min){
7337 if(min>this.value.length){
7338 this.enlargeBuffer(min);
7339 }},"~N");
7340 Clazz_defineMethod(c$,"getChars",
7341 function(start,end,dest,destStart){
7342 if(start>this.count||end>this.count||start>end){
7343 throw new StringIndexOutOfBoundsException();
7344 }System.arraycopy(this.value,start,dest,destStart,end-start);
7345 },"~N,~N,~A,~N");
7346 Clazz_defineMethod(c$,"insert0",
7347 function(index,chars){
7348 if(0>index||index>this.count){
7349 throw new StringIndexOutOfBoundsException(index);
7350 }if(chars.length!=0){
7351 this.move(chars.length,index);
7352 System.arraycopy(chars,0,this.value,index,chars.length);
7353 this.count+=chars.length;
7354 }},"~N,~A");
7355 Clazz_defineMethod(c$,"insert0",
7356 function(index,chars,start,length){
7357 if(0<=index&&index<=this.count){
7358 if(start>=0&&0<=length&&length<=chars.length-start){
7359 if(length!=0){
7360 this.move(length,index);
7361 System.arraycopy(chars,start,this.value,index,length);
7362 this.count+=length;
7363 }return;
7364 }throw new StringIndexOutOfBoundsException("offset "+start+", len "+length+", array.length "+chars.length);
7365 }throw new StringIndexOutOfBoundsException(index);
7366 },"~N,~A,~N,~N");
7367 Clazz_defineMethod(c$,"insert0",
7368 function(index,ch){
7369 if(0>index||index>this.count){
7370 throw new ArrayIndexOutOfBoundsException(index);
7371 }this.move(1,index);
7372 this.value[index]=ch;
7373 this.count++;
7374 },"~N,~N");
7375 Clazz_defineMethod(c$,"insert0",
7376 function(index,string){
7377 if(0<=index&&index<=this.count){
7378 if(string==null)string="null";
7379 var min=string.length;
7380 if(min!=0){
7381 this.move(min,index);
7382 string.getChars(0,min,this.value,index);
7383 this.count+=min;
7384 }}else{
7385 throw new StringIndexOutOfBoundsException(index);
7386 }},"~N,~S");
7387 Clazz_defineMethod(c$,"insert0",
7388 function(index,s,start,end){
7389 if(s==null)s="null";
7390 if(index<0||index>this.count||start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7391 this.insert0(index,s.subSequence(start,end).toString());
7392 },"~N,CharSequence,~N,~N");
7393 Clazz_defineMethod(c$,"length",
7394 function(){
7395 return this.count;
7396 });
7397 Clazz_defineMethod(c$,"move",
7398 ($fz=function(size,index){
7399 var newSize;
7400 if(this.value.length-this.count>=size){
7401 if(!this.shared){
7402 System.arraycopy(this.value,index,this.value,index+size,this.count-index);
7403 return;
7404 }newSize=this.value.length;
7405 }else{
7406 var a=this.count+size;
7407 var b=(this.value.length<<1)+2;
7408 newSize=a>b?a:b;
7409 }var newData=Clazz_newArray(newSize,'\0');
7410 System.arraycopy(this.value,0,newData,0,index);
7411 System.arraycopy(this.value,index,newData,index+size,this.count-index);
7412 this.value=newData;
7413 this.shared=false;
7414 },$fz.isPrivate=true,$fz),"~N,~N");
7415 Clazz_defineMethod(c$,"replace0",
7416 function(start,end,string){
7417 if(start>=0){
7418 if(end>this.count)end=this.count;
7419 if(end>start){
7420 var stringLength=string.length;
7421 var diff=end-start-stringLength;
7422 if(diff>0){
7423 if(!this.shared){
7424 System.arraycopy(this.value,end,this.value,start+stringLength,this.count-end);
7425 }else{
7426 var newData=Clazz_newArray(this.value.length,'\0');
7427 System.arraycopy(this.value,0,newData,0,start);
7428 System.arraycopy(this.value,end,newData,start+stringLength,this.count-end);
7429 this.value=newData;
7430 this.shared=false;
7431 }}else if(diff<0){
7432 this.move(-diff,end);
7433 }else if(this.shared){
7434 this.value=this.value.clone();
7435 this.shared=false;
7436 }string.getChars(0,stringLength,this.value,start);
7437 this.count-=diff;
7438 return;
7439 }if(start==end){
7440 if(string==null)throw new NullPointerException();
7441 this.insert0(start,string);
7442 return;
7443 }}throw new StringIndexOutOfBoundsException();
7444 },"~N,~N,~S");
7445 Clazz_defineMethod(c$,"reverse0",
7446 function(){
7447 if(this.count<2){
7448 return;
7449 }if(!this.shared){
7450 for(var i=0,end=this.count,mid=Math.floor(this.count/2);i<mid;i++){
7451 var temp=this.value[--end];
7452 this.value[end]=this.value[i];
7453 this.value[i]=temp;
7454 }
7455 }else{
7456 var newData=Clazz_newArray(this.value.length,'\0');
7457 for(var i=0,end=this.count;i<this.count;i++){
7458 newData[--end]=this.value[i];
7459 }
7460 this.value=newData;
7461 this.shared=false;
7462 }});
7463 Clazz_defineMethod(c$,"setCharAt",
7464 function(index,ch){
7465 if(0>index||index>=this.count){
7466 throw new StringIndexOutOfBoundsException(index);
7467 }if(this.shared){
7468 this.value=this.value.clone();
7469 this.shared=false;
7470 }this.value[index]=ch;
7471 },"~N,~N");
7472 Clazz_defineMethod(c$,"setLength",
7473 function(length){
7474 if(length<0)throw new StringIndexOutOfBoundsException(length);
7475 if(this.count<length){
7476 if(length>this.value.length){
7477 this.enlargeBuffer(length);
7478 }else{
7479 if(this.shared){
7480 var newData=Clazz_newArray(this.value.length,'\0');
7481 System.arraycopy(this.value,0,newData,0,this.count);
7482 this.value=newData;
7483 this.shared=false;
7484 }else{
7485 for(var i=this.count;i<length;i++){
7486 this.value[i]=String.fromCharCode(0);
7487 }
7488 }}}this.count=length;
7489 },"~N");
7490 Clazz_defineMethod(c$,"substring",
7491 function(start){
7492 if(0<=start&&start<=this.count){
7493 if(start==this.count)return"";
7494 this.shared=true;
7495 return String.instantialize(start,this.count-start,this.value);
7496 }throw new StringIndexOutOfBoundsException(start);
7497 },"~N");
7498 Clazz_defineMethod(c$,"substring",
7499 function(start,end){
7500 if(0<=start&&start<=end&&end<=this.count){
7501 if(start==end)return"";
7502 this.shared=true;
7503 return String.instantialize(this.value,start,end-start);
7504 }throw new StringIndexOutOfBoundsException();
7505 },"~N,~N");
7506 Clazz_overrideMethod(c$,"toString",
7507 function(){
7508 if(this.count==0)return"";
7509 if(this.count>=256&&this.count<=(this.value.length>>1))return String.instantialize(this.value,0,this.count);
7510 this.shared=true;
7511 return String.instantialize(0,this.count,this.value);
7512 });
7513 Clazz_defineMethod(c$,"subSequence",
7514 function(start,end){
7515 return this.substring(start,end);
7516 },"~N,~N");
7517 Clazz_defineMethod(c$,"indexOf",
7518 function(string){
7519 return this.indexOf(string,0);
7520 },"~S");
7521 Clazz_defineMethod(c$,"indexOf",
7522 function(subString,start){
7523 if(start<0)start=0;
7524 var subCount=subString.length;
7525 if(subCount>0){
7526 if(subCount+start>this.count)return-1;
7527 var firstChar=subString.charAt(0);
7528 while(true){
7529 var i=start;
7530 var found=false;
7531 for(;i<this.count;i++)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7532 found=true;
7533 break;
7534 }
7535 if(!found||subCount+i>this.count)return-1;
7536 var o1=i;
7537 var o2=0;
7538 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7539 }
7540 if(o2==subCount)return i;
7541 start=i+1;
7542 }
7543 }return(start<this.count||start==0)?start:this.count;
7544 },"~S,~N");
7545 Clazz_defineMethod(c$,"lastIndexOf",
7546 function(string){
7547 return this.lastIndexOf(string,this.count);
7548 },"~S");
7549 Clazz_defineMethod(c$,"lastIndexOf",
7550 function(subString,start){
7551 var subCount=subString.length;
7552 if(subCount<=this.count&&start>=0){
7553 if(subCount>0){
7554 if(start>this.count-subCount)start=this.count-subCount;
7555 var firstChar=subString.charAt(0);
7556 while(true){
7557 var i=start;
7558 var found=false;
7559 for(;i>=0;--i)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7560 found=true;
7561 break;
7562 }
7563 if(!found)return-1;
7564 var o1=i;
7565 var o2=0;
7566 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7567 }
7568 if(o2==subCount)return i;
7569 start=i-1;
7570 }
7571 }return start<this.count?start:this.count;
7572 }return-1;
7573 },"~S,~N");
7574 Clazz_defineMethod(c$,"trimToSize",
7575 function(){
7576 if(this.count<this.value.length){
7577 var newValue=Clazz_newArray(this.count,'\0');
7578 System.arraycopy(this.value,0,newValue,0,this.count);
7579 this.value=newValue;
7580 this.shared=false;
7581 }});
7582 Clazz_defineStatics(c$,
7583 "INITIAL_CAPACITY",16);
7584 });
7585 // BH adjusted to have only one sort method.
7586 // BH -- added Java 6  copyOfRange
7587
7588 Clazz_load(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){
7589 c$=Clazz_declareType(java.util,"Arrays");
7590
7591 c$.copyOfRange = Clazz_defineMethod (c$, "copyOfRange", 
7592 function (original, from, to) {
7593 to = Math.min(original.length, to);
7594 var newLength = to - from;
7595 if (newLength < 0) throw  new IllegalArgumentException (from + " > " + to);
7596 if (original.slice)
7597   return original.slice(from, to);
7598   // MSIE and Chrome do not have Int32Array.slice()
7599 var c = Clazz_newIntArray(newLength, 0);
7600 for (var i = 0; i < newLength; i++)
7601   c[i] = original[from++];
7602 return c;  
7603 }, "~A,~N,~N");
7604
7605 c$.sort=Clazz_overrideMethod(c$,"sort",
7606 function(a,c,d,e){
7607   switch (arguments.length) {
7608   case 1:
7609     var aux=a.sort(function(o1,o2){
7610       if(typeof o1=="string"||o1 instanceof Comparable){
7611         return o1.compareTo(o2);
7612       }
7613       return o1-o2;
7614       });
7615     for(var i=0;i<a.length;i++){
7616       a[i]=aux[i];
7617     }
7618     return;
7619   case 2:
7620     var aux=a.sort(function(o1,o2){
7621       if(c!=null){
7622         return c.compare(o1,o2);
7623       }else if(typeof o1=="string"||o1 instanceof Comparable){
7624         return o1.compareTo(o2);
7625       }
7626       return o1-o2;
7627       });
7628     for(var i=0;i<a.length;i++){
7629       a[i]=aux[i];
7630     }
7631     return;
7632   case 3:
7633     var fromIndex = c;
7634     var toIndex = d;
7635     this.rangeCheck(a.length,fromIndex,toIndex);
7636     var aux=new Array();
7637     for(var i=fromIndex;i<toIndex;i++){
7638       aux[i-fromIndex]=a[i];
7639     }
7640     aux=aux.sort(function(o1,o2){
7641       if(typeof o1=="string"||o1 instanceof Comparable){
7642         return o1.compareTo(o2);
7643       }
7644       return o1-o2;
7645       });
7646     for(var i=fromIndex;i<toIndex;i++){
7647       a[i]=aux[i-fromIndex];
7648     }
7649     return;
7650   case 4:  
7651     var fromIndex = c;
7652     var toIndex = d;
7653     c = e;
7654     this.rangeCheck(a.length,fromIndex,toIndex);
7655     var aux=new Array();
7656     for(var i=fromIndex;i<toIndex;i++){
7657       aux[i-fromIndex]=a[i];
7658     }
7659     aux=aux.sort(function(o1,o2){
7660       if(c!=null){
7661         return c.compare(o1,o2);
7662       }else if(typeof o1=="string"||o1 instanceof Comparable){
7663         return o1.compareTo(o2);
7664       }
7665       return o1-o2;
7666       });
7667     for(var i=fromIndex;i<toIndex;i++){
7668       a[i]=aux[i-fromIndex];
7669     }
7670   }
7671 });
7672
7673 c$.rangeCheck=Clazz_defineMethod(c$,"rangeCheck",
7674 ($fz=function(arrayLen,fromIndex,toIndex){
7675 if(fromIndex>toIndex)throw new IllegalArgumentException("fromIndex("+fromIndex+") > toIndex("+toIndex+")");
7676 if(fromIndex<0)throw new ArrayIndexOutOfBoundsException(fromIndex);
7677 if(toIndex>arrayLen)throw new ArrayIndexOutOfBoundsException(toIndex);
7678 },$fz.isPrivate=true,$fz),"~N,~N,~N");
7679 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7680 function(a,key){
7681 var low=0;
7682 var high=a.length-1;
7683 while(low<=high){
7684 var mid=(low+high)>>1;
7685 var midVal=a[mid];
7686 if(midVal<key)low=mid+1;
7687 else if(midVal>key)high=mid-1;
7688 else return mid;
7689 }
7690 return-(low+1);
7691 },"~A,~N");
7692 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7693 function(a,key){
7694 var low=0;
7695 var high=a.length-1;
7696 while(low<=high){
7697 var mid=(low+high)>>1;
7698 var midVal=a[mid];
7699 var cmp=(midVal).compareTo(key);
7700 if(cmp<0)low=mid+1;
7701 else if(cmp>0)high=mid-1;
7702 else return mid;
7703 }
7704 return-(low+1);
7705 },"~A,~O");
7706 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7707 function(a,key,c){
7708 if(c==null)return java.util.Arrays.binarySearch(a,key);
7709 var low=0;
7710 var high=a.length-1;
7711 while(low<=high){
7712 var mid=(low+high)>>1;
7713 var midVal=a[mid];
7714 var cmp=c.compare(midVal,key);
7715 if(cmp<0)low=mid+1;
7716 else if(cmp>0)high=mid-1;
7717 else return mid;
7718 }
7719 return-(low+1);
7720 },"~A,~O,java.util.Comparator");
7721 c$.equals=Clazz_defineMethod(c$,"equals",
7722 function(a,a2){
7723 if(a===a2)return true;
7724 if(a==null||a2==null)return false;
7725 var length=a.length;
7726 if(a2.length!=length)return false;
7727 for(var i=0;i<length;i++){
7728 var o1=a[i];
7729 var o2=a2[i];
7730 {
7731 if(!(o1==null?o2==null:(o1.equals==null?o1==o2:o1.equals(o2))))return false;
7732 }}
7733 return true;
7734 },"~A,~A");
7735
7736 c$.fill=Clazz_overrideMethod(c$,"fill",
7737 function(a,fromIndex,toIndex,val){
7738 if (arguments.length == 2) {
7739                 val = fromIndex;
7740                 fromIndex = 0;
7741                 toIndex = a.length;
7742         }       
7743         java.util.Arrays.rangeCheck(a.length,fromIndex,toIndex);
7744         for(var i=fromIndex;i<toIndex;i++)a[i]=val;
7745 });
7746
7747 c$.asList=Clazz_defineMethod(c$,"asList",
7748 function(a){
7749 return new java.util.Arrays.ArrayList(arguments.length == 1 && Clazz_getClassName(a) == "Array" ? a : arguments); // BH must be T...
7750 },"~A");
7751 Clazz_pu$h(self.c$);
7752 c$=Clazz_decorateAsClass(function(){
7753 this.a=null;
7754 Clazz_instantialize(this,arguments);
7755 },java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);
7756 Clazz_makeConstructor(c$,
7757 function(a){
7758 Clazz_superConstructor(this,java.util.Arrays.ArrayList,[]);
7759 if(a==null)throw new NullPointerException();
7760 this.a=a;
7761 },"~A");
7762 Clazz_overrideMethod(c$,"size",
7763 function(){
7764 return this.a.length;
7765 });
7766 Clazz_defineMethod(c$,"toArray",
7767 function(){
7768 return this.a.clone();
7769 });
7770 Clazz_overrideMethod(c$,"get",
7771 function(a){
7772 return this.a[a];
7773 },"~N");
7774 Clazz_overrideMethod(c$,"set",
7775 function(a,b){
7776 var c=this.a[a];
7777 this.a[a]=b;
7778 return c;
7779 },"~N,~O");
7780 Clazz_overrideMethod(c$,"indexOf",
7781 function(a){
7782 if(a==null){
7783 for(var b=0;b<this.a.length;b++)if(this.a[b]==null)return b;
7784
7785 }else{
7786 for(var b=0;b<this.a.length;b++)if(a.equals(this.a[b]))return b;
7787
7788 }return-1;
7789 },"~O");
7790 Clazz_overrideMethod(c$,"contains",
7791 function(a){
7792 return this.indexOf(a)!=-1;
7793 },"~O");
7794 c$=Clazz_p0p();
7795 Clazz_defineStatics(c$,
7796 "INSERTIONSORT_THRESHOLD",7);
7797 });
7798 Clazz_declarePackage ("java.util");
7799 Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () {
7800 c$ = Clazz_decorateAsClass (function () {
7801 this.language = null;
7802 this.country = null;
7803 this.variant = null;
7804 this.hashCodeValue = 0;
7805 Clazz_instantialize (this, arguments);
7806 }, java.util, "Locale", null, [Cloneable, java.io.Serializable]);
7807 Clazz_makeConstructor (c$, 
7808 function (language, country, variant) {
7809 this.language = language.intern ();
7810 this.country = country.intern ();
7811 this.variant = variant.intern ();
7812 }, "~S,~S,~S");
7813 Clazz_makeConstructor (c$, 
7814 function (language, country) {
7815 this.construct (language, country, "");
7816 }, "~S,~S");
7817 Clazz_makeConstructor (c$, 
7818 function (language) {
7819 this.construct (language, "", "");
7820 }, "~S");
7821 Clazz_makeConstructor (c$, 
7822  function (language, country, flag) {
7823 this.language = language;
7824 this.country = country;
7825 this.variant = "";
7826 }, "~S,~S,~B");
7827 c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", 
7828  function (key, language, country) {
7829 var locale =  new java.util.Locale (language, country, false);
7830 java.util.Locale.cache.put (key, locale);
7831 return locale;
7832 }, "~S,~S,~S");
7833 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
7834 function (language, country, variant) {
7835 if (language == null || country == null || variant == null) {
7836 throw  new NullPointerException ();
7837 }var sb =  new StringBuilder ();
7838 sb.append (language).append ('_').append (country).append ('_').append (variant);
7839 var key = sb.toString ();
7840 var locale = java.util.Locale.cache.get (key);
7841 if (locale == null) {
7842 locale =  new java.util.Locale (language, country, variant);
7843 var l = java.util.Locale.cache.put (key, locale);
7844 if (l != null) {
7845 locale = l;
7846 }}return locale;
7847 }, "~S,~S,~S");
7848 c$.getDefault = Clazz_defineMethod (c$, "getDefault", 
7849 function () {
7850 if (java.util.Locale.defaultLocale == null) {
7851 var language;
7852 var country;
7853 var variant;
7854 language = "en";
7855 country = "";
7856 variant = "";
7857 java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant);
7858 }return java.util.Locale.defaultLocale;
7859 });
7860 c$.setDefault = Clazz_defineMethod (c$, "setDefault", 
7861 function (newLocale) {
7862 if (newLocale == null) throw  new NullPointerException ("Can't set default locale to NULL");
7863 java.util.Locale.defaultLocale = newLocale;
7864 }, "java.util.Locale");
7865 Clazz_defineMethod (c$, "getLanguage", 
7866 function () {
7867 return this.language;
7868 });
7869 Clazz_defineMethod (c$, "getCountry", 
7870 function () {
7871 return this.country;
7872 });
7873 Clazz_defineMethod (c$, "getVariant", 
7874 function () {
7875 return this.variant;
7876 });
7877 Clazz_overrideMethod (c$, "toString", 
7878 function () {
7879 var l = this.language.length != 0;
7880 var c = this.country.length != 0;
7881 var v = this.variant.length != 0;
7882 var result =  new StringBuilder (this.language);
7883 if (c || (l && v)) {
7884 result.append ('_').append (this.country);
7885 }if (v && (l || c)) {
7886 result.append ('_').append (this.variant);
7887 }return result.toString ();
7888 });
7889 Clazz_defineMethod (c$, "getDisplayLanguage", 
7890 function () {
7891 return this.getDisplayLanguage (java.util.Locale.getDefault ());
7892 });
7893 Clazz_defineMethod (c$, "getDisplayLanguage", 
7894 function (inLocale) {
7895 return this.getDisplayString (this.language, inLocale, 0);
7896 }, "java.util.Locale");
7897 Clazz_defineMethod (c$, "getDisplayCountry", 
7898 function () {
7899 return this.getDisplayCountry (java.util.Locale.getDefault ());
7900 });
7901 Clazz_defineMethod (c$, "getDisplayCountry", 
7902 function (inLocale) {
7903 return this.getDisplayString (this.country, inLocale, 1);
7904 }, "java.util.Locale");
7905 Clazz_defineMethod (c$, "getDisplayString", 
7906  function (code, inLocale, type) {
7907 if (code.length == 0) {
7908 return "";
7909 }if (inLocale == null) {
7910 throw  new NullPointerException ();
7911 }return inLocale.toString ();
7912 }, "~S,java.util.Locale,~N");
7913 Clazz_defineMethod (c$, "getDisplayVariant", 
7914 function () {
7915 return this.getDisplayVariant (java.util.Locale.getDefault ());
7916 });
7917 Clazz_defineMethod (c$, "getDisplayVariant", 
7918 function (inLocale) {
7919 if (this.variant.length == 0) return "";
7920 return this.variant;
7921 }, "java.util.Locale");
7922 Clazz_defineMethod (c$, "getDisplayName", 
7923 function () {
7924 return this.getDisplayName (java.util.Locale.getDefault ());
7925 });
7926 Clazz_defineMethod (c$, "getDisplayName", 
7927 function (inLocale) {
7928 return inLocale.toString ();
7929 }, "java.util.Locale");
7930 Clazz_defineMethod (c$, "clone", 
7931 function () {
7932 try {
7933 var that = Clazz_superCall (this, java.util.Locale, "clone", []);
7934 return that;
7935 } catch (e) {
7936 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
7937 throw  new InternalError ();
7938 } else {
7939 throw e;
7940 }
7941 }
7942 });
7943 Clazz_overrideMethod (c$, "hashCode", 
7944 function () {
7945 var hc = this.hashCodeValue;
7946 if (hc == 0) {
7947 hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4);
7948 this.hashCodeValue = hc;
7949 }return hc;
7950 });
7951 Clazz_overrideMethod (c$, "equals", 
7952 function (obj) {
7953 if (this === obj) return true;
7954 if (!(Clazz_instanceOf (obj, java.util.Locale))) return false;
7955 var other = obj;
7956 return this.language === other.language && this.country === other.country && this.variant === other.variant;
7957 }, "~O");
7958 c$.cache = c$.prototype.cache =  new java.util.HashMap (32);
7959 c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", "");
7960 c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", "");
7961 Clazz_defineStatics (c$,
7962 "DISPLAY_LANGUAGE", 0,
7963 "DISPLAY_COUNTRY", 1,
7964 "defaultLocale", null);
7965 });
7966 Clazz_declarePackage ("java.awt.event");
7967 Clazz_load (["java.util.EventListener"], "java.awt.event.ActionListener", null, function () {
7968 Clazz_declareInterface (java.awt.event, "ActionListener", java.util.EventListener);
7969 });
7970 Clazz_declarePackage ("java.awt.event");
7971 Clazz_load (["java.util.EventListener"], "java.awt.event.AdjustmentListener", null, function () {
7972 Clazz_declareInterface (java.awt.event, "AdjustmentListener", java.util.EventListener);
7973 });
7974 Clazz_declarePackage ("java.awt.event");
7975 Clazz_load (["java.util.EventListener"], "java.awt.event.ComponentListener", null, function () {
7976 Clazz_declareInterface (java.awt.event, "ComponentListener", java.util.EventListener);
7977 });
7978 Clazz_declarePackage ("java.awt.event");
7979 Clazz_load (["java.util.EventListener"], "java.awt.event.ContainerListener", null, function () {
7980 Clazz_declareInterface (java.awt.event, "ContainerListener", java.util.EventListener);
7981 });
7982 Clazz_declarePackage ("java.awt.event");
7983 Clazz_load (["java.util.EventListener"], "java.awt.event.FocusListener", null, function () {
7984 Clazz_declareInterface (java.awt.event, "FocusListener", java.util.EventListener);
7985 });
7986 Clazz_declarePackage ("java.awt.event");
7987 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyBoundsListener", null, function () {
7988 Clazz_declareInterface (java.awt.event, "HierarchyBoundsListener", java.util.EventListener);
7989 });
7990 Clazz_declarePackage ("java.awt.event");
7991 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyListener", null, function () {
7992 Clazz_declareInterface (java.awt.event, "HierarchyListener", java.util.EventListener);
7993 });
7994 Clazz_declarePackage ("java.awt.event");
7995 Clazz_load (["java.util.EventListener"], "java.awt.event.InputMethodListener", null, function () {
7996 Clazz_declareInterface (java.awt.event, "InputMethodListener", java.util.EventListener);
7997 });
7998 Clazz_declarePackage ("java.awt.event");
7999 Clazz_load (["java.util.EventListener"], "java.awt.event.ItemListener", null, function () {
8000 Clazz_declareInterface (java.awt.event, "ItemListener", java.util.EventListener);
8001 });
8002 Clazz_declarePackage ("java.awt.event");
8003 Clazz_load (["java.util.EventListener"], "java.awt.event.KeyListener", null, function () {
8004 Clazz_declareInterface (java.awt.event, "KeyListener", java.util.EventListener);
8005 });
8006 Clazz_declarePackage ("java.awt.event");
8007 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseListener", null, function () {
8008 Clazz_declareInterface (java.awt.event, "MouseListener", java.util.EventListener);
8009 });
8010 Clazz_declarePackage ("java.awt.event");
8011 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseMotionListener", null, function () {
8012 Clazz_declareInterface (java.awt.event, "MouseMotionListener", java.util.EventListener);
8013 });
8014 Clazz_declarePackage ("java.awt.event");
8015 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseWheelListener", null, function () {
8016 Clazz_declareInterface (java.awt.event, "MouseWheelListener", java.util.EventListener);
8017 });
8018 Clazz_declarePackage ("java.awt.event");
8019 Clazz_load (["java.util.EventListener"], "java.awt.event.TextListener", null, function () {
8020 Clazz_declareInterface (java.awt.event, "TextListener", java.util.EventListener);
8021 });
8022 Clazz_declarePackage ("java.awt.event");
8023 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowFocusListener", null, function () {
8024 Clazz_declareInterface (java.awt.event, "WindowFocusListener", java.util.EventListener);
8025 });
8026 Clazz_declarePackage ("java.awt.event");
8027 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowListener", null, function () {
8028 Clazz_declareInterface (java.awt.event, "WindowListener", java.util.EventListener);
8029 });
8030 Clazz_declarePackage ("java.awt.event");
8031 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowStateListener", null, function () {
8032 Clazz_declareInterface (java.awt.event, "WindowStateListener", java.util.EventListener);
8033 });
8034 Clazz_declarePackage ("java.awt");
8035 Clazz_load (null, "java.awt.Cursor", ["java.lang.IllegalArgumentException"], function () {
8036 c$ = Clazz_decorateAsClass (function () {
8037 this.type = 0;
8038 this.name = null;
8039 Clazz_instantialize (this, arguments);
8040 }, java.awt, "Cursor");
8041 c$.getPredefinedCursor = Clazz_defineMethod (c$, "getPredefinedCursor", 
8042 function (type) {
8043 if (type < 0 || type > 13) {
8044 throw  new IllegalArgumentException ("illegal cursor type");
8045 }var c = java.awt.Cursor.predefinedPrivate[type];
8046 if (c == null) {
8047 java.awt.Cursor.predefinedPrivate[type] = c =  new java.awt.Cursor (type);
8048 }if (java.awt.Cursor.predefined[type] == null) {
8049 java.awt.Cursor.predefined[type] = c;
8050 }return c;
8051 }, "~N");
8052 c$.getSystemCustomCursor = Clazz_defineMethod (c$, "getSystemCustomCursor", 
8053 function (name) {
8054 return null;
8055 }, "~S");
8056 c$.getDefaultCursor = Clazz_defineMethod (c$, "getDefaultCursor", 
8057 function () {
8058 return java.awt.Cursor.getPredefinedCursor (0);
8059 });
8060 Clazz_makeConstructor (c$, 
8061 function (type) {
8062 if (type < 0 || type > 13) {
8063 throw  new IllegalArgumentException ("illegal cursor type");
8064 }this.type = type;
8065 this.name = "TODO_CURSOR";
8066 }, "~N");
8067 Clazz_makeConstructor (c$, 
8068 function (name) {
8069 this.type = -1;
8070 this.name = name;
8071 }, "~S");
8072 Clazz_defineMethod (c$, "getType", 
8073 function () {
8074 return this.type;
8075 });
8076 Clazz_defineMethod (c$, "getName", 
8077 function () {
8078 return this.name;
8079 });
8080 Clazz_overrideMethod (c$, "toString", 
8081 function () {
8082 return this.getClass ().getName () + "[" + this.getName () + "]";
8083 });
8084 Clazz_defineStatics (c$,
8085 "DEFAULT_CURSOR", 0,
8086 "CROSSHAIR_CURSOR", 1,
8087 "TEXT_CURSOR", 2,
8088 "WAIT_CURSOR", 3,
8089 "SW_RESIZE_CURSOR", 4,
8090 "SE_RESIZE_CURSOR", 5,
8091 "NW_RESIZE_CURSOR", 6,
8092 "NE_RESIZE_CURSOR", 7,
8093 "N_RESIZE_CURSOR", 8,
8094 "S_RESIZE_CURSOR", 9,
8095 "W_RESIZE_CURSOR", 10,
8096 "E_RESIZE_CURSOR", 11,
8097 "HAND_CURSOR", 12,
8098 "MOVE_CURSOR", 13);
8099 c$.predefined = c$.prototype.predefined =  new Array (14);
8100 c$.predefinedPrivate = c$.prototype.predefinedPrivate =  new Array (14);
8101 Clazz_defineStatics (c$,
8102 "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"])]),
8103 "CUSTOM_CURSOR", -1);
8104 });
8105 Clazz_declarePackage ("java.awt");
8106 Clazz_load (["java.lang.Error"], "java.awt.AWTError", null, function () {
8107 c$ = Clazz_declareType (java.awt, "AWTError", Error);
8108 });
8109 Clazz_declarePackage ("java.awt");
8110 Clazz_load (null, "java.awt.Insets", ["java.lang.InternalError"], function () {
8111 c$ = Clazz_decorateAsClass (function () {
8112 this.top = 0;
8113 this.left = 0;
8114 this.bottom = 0;
8115 this.right = 0;
8116 Clazz_instantialize (this, arguments);
8117 }, java.awt, "Insets", null, [Cloneable, java.io.Serializable]);
8118 Clazz_makeConstructor (c$, 
8119 function (top, left, bottom, right) {
8120 this.top = top;
8121 this.left = left;
8122 this.bottom = bottom;
8123 this.right = right;
8124 }, "~N,~N,~N,~N");
8125 Clazz_defineMethod (c$, "set", 
8126 function (top, left, bottom, right) {
8127 this.top = top;
8128 this.left = left;
8129 this.bottom = bottom;
8130 this.right = right;
8131 }, "~N,~N,~N,~N");
8132 Clazz_overrideMethod (c$, "equals", 
8133 function (obj) {
8134 if (Clazz_instanceOf (obj, java.awt.Insets)) {
8135 var insets = obj;
8136 return ((this.top == insets.top) && (this.left == insets.left) && (this.bottom == insets.bottom) && (this.right == insets.right));
8137 }return false;
8138 }, "~O");
8139 Clazz_overrideMethod (c$, "hashCode", 
8140 function () {
8141 var sum1 = this.left + this.bottom;
8142 var sum2 = this.right + this.top;
8143 var val1 = Clazz_doubleToInt (sum1 * (sum1 + 1) / 2) + this.left;
8144 var val2 = Clazz_doubleToInt (sum2 * (sum2 + 1) / 2) + this.top;
8145 var sum3 = val1 + val2;
8146 return Clazz_doubleToInt (sum3 * (sum3 + 1) / 2) + val2;
8147 });
8148 Clazz_overrideMethod (c$, "toString", 
8149 function () {
8150 return this.getClass ().getName () + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]";
8151 });
8152 Clazz_defineMethod (c$, "clone", 
8153 function () {
8154 try {
8155 return Clazz_superCall (this, java.awt.Insets, "clone", []);
8156 } catch (e) {
8157 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8158 throw  new InternalError ();
8159 } else {
8160 throw e;
8161 }
8162 }
8163 });
8164 });
8165 Clazz_declarePackage ("java.awt");
8166 Clazz_load (["java.util.Map", "$.HashMap"], "java.awt.RenderingHints", ["java.lang.IllegalArgumentException", "$.InternalError", "java.util.Collections"], function () {
8167 c$ = Clazz_decorateAsClass (function () {
8168 this.hintmap = null;
8169 Clazz_instantialize (this, arguments);
8170 }, java.awt, "RenderingHints", null, [java.util.Map, Cloneable]);
8171 Clazz_prepareFields (c$, function () {
8172 this.hintmap =  new java.util.HashMap (7);
8173 });
8174 Clazz_overrideMethod (c$, "size", 
8175 function () {
8176 return this.hintmap.size ();
8177 });
8178 Clazz_overrideMethod (c$, "isEmpty", 
8179 function () {
8180 return this.hintmap.isEmpty ();
8181 });
8182 Clazz_overrideMethod (c$, "containsKey", 
8183 function (key) {
8184 return this.hintmap.containsKey (key);
8185 }, "~O");
8186 Clazz_overrideMethod (c$, "containsValue", 
8187 function (value) {
8188 return this.hintmap.containsValue (value);
8189 }, "~O");
8190 Clazz_overrideMethod (c$, "get", 
8191 function (key) {
8192 return this.hintmap.get (key);
8193 }, "~O");
8194 Clazz_overrideMethod (c$, "put", 
8195 function (key, value) {
8196 if (!(key).isCompatibleValue (value)) {
8197 throw  new IllegalArgumentException (value + " incompatible with " + key);
8198 }return this.hintmap.put (key, value);
8199 }, "~O,~O");
8200 Clazz_defineMethod (c$, "add", 
8201 function (hints) {
8202 this.hintmap.putAll (hints.hintmap);
8203 }, "java.awt.RenderingHints");
8204 Clazz_overrideMethod (c$, "clear", 
8205 function () {
8206 this.hintmap.clear ();
8207 });
8208 Clazz_overrideMethod (c$, "remove", 
8209 function (key) {
8210 return this.hintmap.remove (key);
8211 }, "~O");
8212 Clazz_overrideMethod (c$, "putAll", 
8213 function (m) {
8214 if (java.awt.RenderingHints.isInstance (m)) {
8215 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.hintmap.put (entry.getKey (), entry.getValue ());
8216
8217 } else {
8218 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.put (entry.getKey (), entry.getValue ());
8219
8220 }}, "java.util.Map");
8221 Clazz_overrideMethod (c$, "keySet", 
8222 function () {
8223 return this.hintmap.keySet ();
8224 });
8225 Clazz_overrideMethod (c$, "values", 
8226 function () {
8227 return this.hintmap.values ();
8228 });
8229 Clazz_overrideMethod (c$, "entrySet", 
8230 function () {
8231 return java.util.Collections.unmodifiableMap (this.hintmap).entrySet ();
8232 });
8233 Clazz_overrideMethod (c$, "equals", 
8234 function (o) {
8235 if (Clazz_instanceOf (o, java.awt.RenderingHints)) {
8236 return this.hintmap.equals ((o).hintmap);
8237 } else if (Clazz_instanceOf (o, java.util.Map)) {
8238 return this.hintmap.equals (o);
8239 }return false;
8240 }, "~O");
8241 Clazz_overrideMethod (c$, "hashCode", 
8242 function () {
8243 return this.hintmap.hashCode ();
8244 });
8245 Clazz_overrideMethod (c$, "clone", 
8246 function () {
8247 var rh;
8248 try {
8249 {
8250 rh = Clazz_clone(this);
8251 if (this.hintmap != null) { rh.hintmap =
8252 this.hintmap.cloneHM(); }
8253 }} catch (e) {
8254 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8255 throw  new InternalError ();
8256 } else {
8257 throw e;
8258 }
8259 }
8260 return rh;
8261 });
8262 Clazz_overrideMethod (c$, "toString", 
8263 function () {
8264 if (this.hintmap == null) {
8265 return this.getClass ().getName () + "@" + Integer.toHexString (this.hashCode ()) + " (0 hints)";
8266 }return this.hintmap.toString ();
8267 });
8268 Clazz_pu$h(self.c$);
8269 c$ = Clazz_decorateAsClass (function () {
8270 this.privatekey = 0;
8271 Clazz_instantialize (this, arguments);
8272 }, java.awt.RenderingHints, "Key");
8273 Clazz_defineMethod (c$, "getIdentity", 
8274  function () {
8275 return this.getClass ().getName () + "@" + Integer.toHexString (System.identityHashCode (this.getClass ())) + ":" + Integer.toHexString (this.privatekey);
8276 });
8277 Clazz_defineMethod (c$, "recordIdentity", 
8278  function (a) {
8279 var b = a.getIdentity ();
8280 var c = java.awt.RenderingHints.Key.identitymap.get (b);
8281 if (c != null) {
8282 var d = c;
8283 if (d != null && d.getClass () === a.getClass ()) {
8284 throw  new IllegalArgumentException (b + " already registered");
8285 }}java.awt.RenderingHints.Key.identitymap.put (b, a);
8286 }, "java.awt.RenderingHints.Key");
8287 Clazz_makeConstructor (c$, 
8288 function (a) {
8289 this.privatekey = a;
8290 this.recordIdentity (this);
8291 }, "~N");
8292 Clazz_defineMethod (c$, "intKey", 
8293 function () {
8294 return this.privatekey;
8295 });
8296 Clazz_overrideMethod (c$, "equals", 
8297 function (a) {
8298 return this === a;
8299 }, "~O");
8300 c$.identitymap = c$.prototype.identitymap =  new java.util.HashMap (17);
8301 c$ = Clazz_p0p ();
8302 Clazz_pu$h(self.c$);
8303 c$ = Clazz_decorateAsClass (function () {
8304 this.description = null;
8305 Clazz_instantialize (this, arguments);
8306 }, java.awt.RenderingHints, "SunKey", java.awt.RenderingHints.Key);
8307 Clazz_makeConstructor (c$, 
8308 function (a, b) {
8309 Clazz_superConstructor (this, java.awt.RenderingHints.SunKey, [a]);
8310 this.description = b;
8311 }, "~N,~S");
8312 Clazz_defineMethod (c$, "getIndex", 
8313 function () {
8314 return this.privatekey;
8315 });
8316 Clazz_overrideMethod (c$, "toString", 
8317 function () {
8318 return this.description;
8319 });
8320 Clazz_overrideMethod (c$, "isCompatibleValue", 
8321 function (a) {
8322 if (Clazz_instanceOf (a, java.awt.RenderingHints.Value)) {
8323 return (a).isCompatibleKey (this);
8324 }return false;
8325 }, "~O");
8326 c$ = Clazz_p0p ();
8327 Clazz_pu$h(self.c$);
8328 c$ = Clazz_decorateAsClass (function () {
8329 this.myKey = null;
8330 this.index = 0;
8331 this.description = null;
8332 Clazz_instantialize (this, arguments);
8333 }, java.awt.RenderingHints, "Value");
8334 c$.register = Clazz_defineMethod (c$, "register", 
8335  function (a, b) {
8336 var c = a.getIndex ();
8337 var d = b.getIndex ();
8338 if (java.awt.RenderingHints.Value.ValueObjects[c][d] != null) {
8339 throw  new InternalError ("duplicate index: " + d);
8340 }java.awt.RenderingHints.Value.ValueObjects[c][d] = b;
8341 }, "java.awt.RenderingHints.SunKey,java.awt.RenderingHints.Value");
8342 c$.get = Clazz_defineMethod (c$, "get", 
8343 function (a, b) {
8344 return java.awt.RenderingHints.Value.ValueObjects[a][b];
8345 }, "~N,~N");
8346 Clazz_makeConstructor (c$, 
8347 function (a, b, c) {
8348 this.myKey = a;
8349 this.index = b;
8350 this.description = c;
8351 java.awt.RenderingHints.Value.register (a, this);
8352 }, "java.awt.RenderingHints.SunKey,~N,~S");
8353 Clazz_defineMethod (c$, "getIndex", 
8354 function () {
8355 return this.index;
8356 });
8357 Clazz_overrideMethod (c$, "toString", 
8358 function () {
8359 return this.description;
8360 });
8361 Clazz_defineMethod (c$, "isCompatibleKey", 
8362 function (a) {
8363 return this.myKey === a;
8364 }, "java.awt.RenderingHints.SunKey");
8365 Clazz_overrideMethod (c$, "hashCode", 
8366 function () {
8367 return this.description.hashCode ();
8368 });
8369 Clazz_overrideMethod (c$, "equals", 
8370 function (a) {
8371 return this === a;
8372 }, "~O");
8373 c$.ValueObjects = c$.prototype.ValueObjects =  Clazz_newArray (9, 8, null);
8374 c$ = Clazz_p0p ();
8375 Clazz_pu$h(self.c$);
8376 c$ = Clazz_declareType (java.awt.RenderingHints, "LCDContrastKey", java.awt.RenderingHints.SunKey);
8377 Clazz_overrideMethod (c$, "isCompatibleValue", 
8378 function (a) {
8379 if (Clazz_instanceOf (a, Integer)) {
8380 var b = (a).intValue ();
8381 return b >= 100 && b <= 250;
8382 }return false;
8383 }, "~O");
8384 c$ = Clazz_p0p ();
8385 Clazz_defineStatics (c$,
8386 "NUM_KEYS", 9,
8387 "VALS_PER_KEY", 8,
8388 "INTKEY_RENDERING", 0,
8389 "INTVAL_RENDER_DEFAULT", 0,
8390 "INTVAL_RENDER_SPEED", 1,
8391 "INTVAL_RENDER_QUALITY", 2,
8392 "INTKEY_ANTIALIASING", 1,
8393 "INTVAL_ANTIALIAS_DEFAULT", 0,
8394 "INTVAL_ANTIALIAS_OFF", 1,
8395 "INTVAL_ANTIALIAS_ON", 2,
8396 "INTKEY_TEXT_ANTIALIASING", 2,
8397 "INTVAL_TEXT_ANTIALIAS_DEFAULT", 0,
8398 "INTVAL_TEXT_ANTIALIAS_OFF", 1,
8399 "INTVAL_TEXT_ANTIALIAS_ON", 2,
8400 "INTVAL_TEXT_ANTIALIAS_GASP", 3,
8401 "INTVAL_TEXT_ANTIALIAS_LCD_HRGB", 4,
8402 "INTVAL_TEXT_ANTIALIAS_LCD_HBGR", 5,
8403 "INTVAL_TEXT_ANTIALIAS_LCD_VRGB", 6,
8404 "INTVAL_TEXT_ANTIALIAS_LCD_VBGR", 7,
8405 "INTKEY_FRACTIONALMETRICS", 3,
8406 "INTVAL_FRACTIONALMETRICS_DEFAULT", 0,
8407 "INTVAL_FRACTIONALMETRICS_OFF", 1,
8408 "INTVAL_FRACTIONALMETRICS_ON", 2,
8409 "INTKEY_DITHERING", 4,
8410 "INTVAL_DITHER_DEFAULT", 0,
8411 "INTVAL_DITHER_DISABLE", 1,
8412 "INTVAL_DITHER_ENABLE", 2,
8413 "INTKEY_INTERPOLATION", 5,
8414 "INTVAL_INTERPOLATION_NEAREST_NEIGHBOR", 0,
8415 "INTVAL_INTERPOLATION_BILINEAR", 1,
8416 "INTVAL_INTERPOLATION_BICUBIC", 2,
8417 "INTKEY_ALPHA_INTERPOLATION", 6,
8418 "INTVAL_ALPHA_INTERPOLATION_DEFAULT", 0,
8419 "INTVAL_ALPHA_INTERPOLATION_SPEED", 1,
8420 "INTVAL_ALPHA_INTERPOLATION_QUALITY", 2,
8421 "INTKEY_COLOR_RENDERING", 7,
8422 "INTVAL_COLOR_RENDER_DEFAULT", 0,
8423 "INTVAL_COLOR_RENDER_SPEED", 1,
8424 "INTVAL_COLOR_RENDER_QUALITY", 2,
8425 "INTKEY_STROKE_CONTROL", 8,
8426 "INTVAL_STROKE_DEFAULT", 0,
8427 "INTVAL_STROKE_NORMALIZE", 1,
8428 "INTVAL_STROKE_PURE", 2,
8429 "INTKEY_AATEXT_LCD_CONTRAST", 100);
8430 c$.KEY_RENDERING = c$.prototype.KEY_RENDERING =  new java.awt.RenderingHints.SunKey (0, "Global rendering quality key");
8431 c$.VALUE_RENDER_SPEED = c$.prototype.VALUE_RENDER_SPEED =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 1, "Fastest rendering methods");
8432 c$.VALUE_RENDER_QUALITY = c$.prototype.VALUE_RENDER_QUALITY =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 2, "Highest quality rendering methods");
8433 c$.VALUE_RENDER_DEFAULT = c$.prototype.VALUE_RENDER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 0, "Default rendering methods");
8434 c$.KEY_ANTIALIASING = c$.prototype.KEY_ANTIALIASING =  new java.awt.RenderingHints.SunKey (1, "Global antialiasing enable key");
8435 c$.VALUE_ANTIALIAS_ON = c$.prototype.VALUE_ANTIALIAS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 2, "Antialiased rendering mode");
8436 c$.VALUE_ANTIALIAS_OFF = c$.prototype.VALUE_ANTIALIAS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 1, "Nonantialiased rendering mode");
8437 c$.VALUE_ANTIALIAS_DEFAULT = c$.prototype.VALUE_ANTIALIAS_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 0, "Default antialiasing rendering mode");
8438 c$.KEY_FRACTIONALMETRICS = c$.prototype.KEY_FRACTIONALMETRICS =  new java.awt.RenderingHints.SunKey (3, "Fractional metrics enable key");
8439 c$.VALUE_FRACTIONALMETRICS_ON = c$.prototype.VALUE_FRACTIONALMETRICS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 2, "Fractional text metrics mode");
8440 c$.VALUE_FRACTIONALMETRICS_OFF = c$.prototype.VALUE_FRACTIONALMETRICS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 1, "Integer text metrics mode");
8441 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");
8442 c$.KEY_DITHERING = c$.prototype.KEY_DITHERING =  new java.awt.RenderingHints.SunKey (4, "Dithering quality key");
8443 c$.VALUE_DITHER_ENABLE = c$.prototype.VALUE_DITHER_ENABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 2, "Dithered rendering mode");
8444 c$.VALUE_DITHER_DISABLE = c$.prototype.VALUE_DITHER_DISABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 1, "Nondithered rendering mode");
8445 c$.VALUE_DITHER_DEFAULT = c$.prototype.VALUE_DITHER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 0, "Default dithering mode");
8446 c$.KEY_INTERPOLATION = c$.prototype.KEY_INTERPOLATION =  new java.awt.RenderingHints.SunKey (5, "Image interpolation method key");
8447 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");
8448 c$.VALUE_INTERPOLATION_BILINEAR = c$.prototype.VALUE_INTERPOLATION_BILINEAR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 1, "Bilinear image interpolation mode");
8449 c$.VALUE_INTERPOLATION_BICUBIC = c$.prototype.VALUE_INTERPOLATION_BICUBIC =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 2, "Bicubic image interpolation mode");
8450 c$.KEY_ALPHA_INTERPOLATION = c$.prototype.KEY_ALPHA_INTERPOLATION =  new java.awt.RenderingHints.SunKey (6, "Alpha blending interpolation method key");
8451 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");
8452 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");
8453 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");
8454 c$.KEY_COLOR_RENDERING = c$.prototype.KEY_COLOR_RENDERING =  new java.awt.RenderingHints.SunKey (7, "Color rendering quality key");
8455 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");
8456 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");
8457 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");
8458 c$.KEY_STROKE_CONTROL = c$.prototype.KEY_STROKE_CONTROL =  new java.awt.RenderingHints.SunKey (8, "Stroke normalization control key");
8459 c$.VALUE_STROKE_DEFAULT = c$.prototype.VALUE_STROKE_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 0, "Default stroke normalization");
8460 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");
8461 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");
8462 c$.KEY_TEXT_ANTIALIASING = c$.prototype.KEY_TEXT_ANTIALIASING =  new java.awt.RenderingHints.SunKey (2, "Text-specific antialiasing enable key");
8463 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");
8464 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");
8465 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");
8466 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");
8467 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");
8468 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");
8469 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");
8470 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");
8471 c$.KEY_TEXT_ANTIALIAS_LCD_CONTRAST = c$.prototype.KEY_TEXT_ANTIALIAS_LCD_CONTRAST =  new java.awt.RenderingHints.LCDContrastKey (100, "Text-specific LCD contrast key");
8472 c$.KEY_TEXT_LCD_CONTRAST = c$.prototype.KEY_TEXT_LCD_CONTRAST = java.awt.RenderingHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST;
8473 });
8474 //BH note: a declared static superclass must come before a static class referencing it
8475
8476 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(){
8477 c$=Clazz_declareType(java.util,"Collections");
8478 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8479 function(list,object){
8480 if(list==null){
8481 throw new NullPointerException();
8482 }if(list.isEmpty()){
8483 return-1;
8484 }var key=object;
8485 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8486 var it=list.listIterator();
8487 while(it.hasNext()){
8488 var result;
8489 if((result=key.compareTo(it.next()))<=0){
8490 if(result==0){
8491 return it.previousIndex();
8492 }return-it.previousIndex()-1;
8493 }}
8494 return-list.size()-1;
8495 }var low=0;
8496 var mid=list.size();
8497 var high=mid-1;
8498 var result=-1;
8499 while(low<=high){
8500 mid=(low+high)>>1;
8501 if((result=key.compareTo(list.get(mid)))>0){
8502 low=mid+1;
8503 }else if(result==0){
8504 return mid;
8505 }else{
8506 high=mid-1;
8507 }}
8508 return-mid-(result<0?1:2);
8509 },"java.util.List,~O");
8510 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8511 function(list,object,comparator){
8512 if(comparator==null){
8513 return java.util.Collections.binarySearch(list,object);
8514 }if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8515 var it=list.listIterator();
8516 while(it.hasNext()){
8517 var result;
8518 if((result=comparator.compare(object,it.next()))<=0){
8519 if(result==0){
8520 return it.previousIndex();
8521 }return-it.previousIndex()-1;
8522 }}
8523 return-list.size()-1;
8524 }var low=0;
8525 var mid=list.size();
8526 var high=mid-1;
8527 var result=-1;
8528 while(low<=high){
8529 mid=(low+high)>>1;
8530 if((result=comparator.compare(object,list.get(mid)))>0){
8531 low=mid+1;
8532 }else if(result==0){
8533 return mid;
8534 }else{
8535 high=mid-1;
8536 }}
8537 return-mid-(result<0?1:2);
8538 },"java.util.List,~O,java.util.Comparator");
8539 c$.copy=Clazz_defineMethod(c$,"copy",
8540 function(destination,source){
8541 if(destination.size()<source.size()){
8542 throw new ArrayIndexOutOfBoundsException();
8543 }var srcIt=source.iterator();
8544 var destIt=destination.listIterator();
8545 while(srcIt.hasNext()){
8546 try{
8547 destIt.next();
8548 }catch(e){
8549 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
8550 throw new ArrayIndexOutOfBoundsException();
8551 }else{
8552 throw e;
8553 }
8554 }
8555 destIt.set(srcIt.next());
8556 }
8557 },"java.util.List,java.util.List");
8558 c$.enumeration=Clazz_defineMethod(c$,"enumeration",
8559 function(collection){
8560 var c=collection;
8561
8562 if (!Clazz_isClassDefined("java.util.Collections$1"))
8563         java.util.Collections.$Collections$1$(c);
8564
8565 var x = Clazz_innerTypeInstance(java.util.Collections$1,this,null);
8566
8567 return x;
8568 },"java.util.Collection");
8569
8570 c$.fill=Clazz_defineMethod(c$,"fill",
8571 function(list,object){
8572 var it=list.listIterator();
8573 while(it.hasNext()){
8574 it.next();
8575 it.set(object);
8576 }
8577 },"java.util.List,~O");
8578 c$.max=Clazz_defineMethod(c$,"max",
8579 function(collection){
8580 var it=collection.iterator();
8581 var max=it.next();
8582 while(it.hasNext()){
8583 var next=it.next();
8584 if(max.compareTo(next)<0){
8585 max=next;
8586 }}
8587 return max;
8588 },"java.util.Collection");
8589 c$.max=Clazz_defineMethod(c$,"max",
8590 function(collection,comparator){
8591 var it=collection.iterator();
8592 var max=it.next();
8593 while(it.hasNext()){
8594 var next=it.next();
8595 if(comparator.compare(max,next)<0){
8596 max=next;
8597 }}
8598 return max;
8599 },"java.util.Collection,java.util.Comparator");
8600 c$.min=Clazz_defineMethod(c$,"min",
8601 function(collection){
8602 var it=collection.iterator();
8603 var min=it.next();
8604 while(it.hasNext()){
8605 var next=it.next();
8606 if(min.compareTo(next)>0){
8607 min=next;
8608 }}
8609 return min;
8610 },"java.util.Collection");
8611 c$.min=Clazz_defineMethod(c$,"min",
8612 function(collection,comparator){
8613 var it=collection.iterator();
8614 var min=it.next();
8615 while(it.hasNext()){
8616 var next=it.next();
8617 if(comparator.compare(min,next)>0){
8618 min=next;
8619 }}
8620 return min;
8621 },"java.util.Collection,java.util.Comparator");
8622 c$.nCopies=Clazz_defineMethod(c$,"nCopies",
8623 function(length,object){
8624 return new java.util.Collections.CopiesList(length,object);
8625 },"~N,~O");
8626 c$.reverse=Clazz_defineMethod(c$,"reverse",
8627 function(list){
8628 var size=list.size();
8629 var front=list.listIterator();
8630 var back=list.listIterator(size);
8631 for(var i=0;i<Math.floor(size/2);i++){
8632 var frontNext=front.next();
8633 var backPrev=back.previous();
8634 front.set(backPrev);
8635 back.set(frontNext);
8636 }
8637 },"java.util.List");
8638 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8639 function(){
8640 return new java.util.Collections.ReverseComparator();
8641 });
8642 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8643 function(c){
8644 if(c==null){
8645 return java.util.Collections.reverseOrder();
8646 }return new java.util.Collections.ReverseComparatorWithComparator(c);
8647 },"java.util.Comparator");
8648 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8649 function(list){
8650 java.util.Collections.shuffle(list,new java.util.Random());
8651 },"java.util.List");
8652 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8653 function(list,random){
8654 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8655 var array=list.toArray();
8656 for(var i=array.length-1;i>0;i--){
8657 var index=random.nextInt()%(i+1);
8658 if(index<0){
8659 index=-index;
8660 }var temp=array[i];
8661 array[i]=array[index];
8662 array[index]=temp;
8663 }
8664 var i=0;
8665 var it=list.listIterator();
8666 while(it.hasNext()){
8667 it.next();
8668 it.set(array[i++]);
8669 }
8670 }else{
8671 var rawList=list;
8672 for(var i=rawList.size()-1;i>0;i--){
8673 var index=random.nextInt()%(i+1);
8674 if(index<0){
8675 index=-index;
8676 }rawList.set(index,rawList.set(i,rawList.get(index)));
8677 }
8678 }},"java.util.List,java.util.Random");
8679 c$.singleton=Clazz_defineMethod(c$,"singleton",
8680 function(object){
8681 return new java.util.Collections.SingletonSet(object);
8682 },"~O");
8683 c$.singletonList=Clazz_defineMethod(c$,"singletonList",
8684 function(object){
8685 return new java.util.Collections.SingletonList(object);
8686 },"~O");
8687 c$.singletonMap=Clazz_defineMethod(c$,"singletonMap",
8688 function(key,value){
8689 return new java.util.Collections.SingletonMap(key,value);
8690 },"~O,~O");
8691 c$.sort=Clazz_defineMethod(c$,"sort",
8692 function(list){
8693 var array=list.toArray();
8694 java.util.Arrays.sort(array);
8695 var i=0;
8696 var it=list.listIterator();
8697 while(it.hasNext()){
8698 it.next();
8699 it.set(array[i++]);
8700 }
8701 },"java.util.List");
8702 c$.sort=Clazz_defineMethod(c$,"sort",
8703 function(list,comparator){
8704 var array=list.toArray(new Array(list.size()));
8705 java.util.Arrays.sort(array,comparator);
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,java.util.Comparator");
8713 c$.swap=Clazz_defineMethod(c$,"swap",
8714 function(list,index1,index2){
8715 if(list==null){
8716 throw new NullPointerException();
8717 }if(index1==index2){
8718 return;
8719 }var rawList=list;
8720 rawList.set(index2,rawList.set(index1,rawList.get(index2)));
8721 },"java.util.List,~N,~N");
8722 c$.replaceAll=Clazz_defineMethod(c$,"replaceAll",
8723 function(list,obj,obj2){
8724 var index;
8725 var found=false;
8726 while((index=list.indexOf(obj))>-1){
8727 found=true;
8728 list.set(index,obj2);
8729 }
8730 return found;
8731 },"java.util.List,~O,~O");
8732 c$.rotate=Clazz_defineMethod(c$,"rotate",
8733 function(lst,dist){
8734 var list=lst;
8735 var size=list.size();
8736 if(size==0){
8737 return;
8738 }var normdist;
8739 if(dist>0){
8740 normdist=dist%size;
8741 }else{
8742 normdist=size-((dist%size)*(-1));
8743 }if(normdist==0||normdist==size){
8744 return;
8745 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8746 var temp=list.get(0);
8747 var index=0;
8748 var beginIndex=0;
8749 for(var i=0;i<size;i++){
8750 index=(index+normdist)%size;
8751 temp=list.set(index,temp);
8752 if(index==beginIndex){
8753 index=++beginIndex;
8754 temp=list.get(beginIndex);
8755 }}
8756 }else{
8757 var divideIndex=(size-normdist)%size;
8758 var sublist1=list.subList(0,divideIndex);
8759 var sublist2=list.subList(divideIndex,size);
8760 java.util.Collections.reverse(sublist1);
8761 java.util.Collections.reverse(sublist2);
8762 java.util.Collections.reverse(list);
8763 }},"java.util.List,~N");
8764 c$.indexOfSubList=Clazz_defineMethod(c$,"indexOfSubList",
8765 function(list,sublist){
8766 var size=list.size();
8767 var sublistSize=sublist.size();
8768 if(sublistSize>size){
8769 return-1;
8770 }if(sublistSize==0){
8771 return 0;
8772 }var firstObj=sublist.get(0);
8773 var index=list.indexOf(firstObj);
8774 if(index==-1){
8775 return-1;
8776 }while(index<size&&(size-index>=sublistSize)){
8777 var listIt=list.listIterator(index);
8778 if((firstObj==null)?listIt.next()==null:firstObj.equals(listIt.next())){
8779 var sublistIt=sublist.listIterator(1);
8780 var difFound=false;
8781 while(sublistIt.hasNext()){
8782 var element=sublistIt.next();
8783 if(!listIt.hasNext()){
8784 return-1;
8785 }if((element==null)?listIt.next()!=null:!element.equals(listIt.next())){
8786 difFound=true;
8787 break;
8788 }}
8789 if(!difFound){
8790 return index;
8791 }}index++;
8792 }
8793 return-1;
8794 },"java.util.List,java.util.List");
8795 c$.lastIndexOfSubList=Clazz_defineMethod(c$,"lastIndexOfSubList",
8796 function(list,sublist){
8797 var sublistSize=sublist.size();
8798 var size=list.size();
8799 if(sublistSize>size){
8800 return-1;
8801 }if(sublistSize==0){
8802 return size;
8803 }var lastObj=sublist.get(sublistSize-1);
8804 var index=list.lastIndexOf(lastObj);
8805 while((index>-1)&&(index+1>=sublistSize)){
8806 var listIt=list.listIterator(index+1);
8807 if((lastObj==null)?listIt.previous()==null:lastObj.equals(listIt.previous())){
8808 var sublistIt=sublist.listIterator(sublistSize-1);
8809 var difFound=false;
8810 while(sublistIt.hasPrevious()){
8811 var element=sublistIt.previous();
8812 if(!listIt.hasPrevious()){
8813 return-1;
8814 }if((element==null)?listIt.previous()!=null:!element.equals(listIt.previous())){
8815 difFound=true;
8816 break;
8817 }}
8818 if(!difFound){
8819 return listIt.nextIndex();
8820 }}index--;
8821 }
8822 return-1;
8823 },"java.util.List,java.util.List");
8824 c$.list=Clazz_defineMethod(c$,"list",
8825 function(enumeration){
8826 var list=new java.util.ArrayList();
8827 while(enumeration.hasMoreElements()){
8828 list.add(enumeration.nextElement());
8829 }
8830 return list;
8831 },"java.util.Enumeration");
8832 c$.synchronizedCollection=Clazz_defineMethod(c$,"synchronizedCollection",
8833 function(collection){
8834 if(collection==null){
8835 throw new NullPointerException();
8836 }return new java.util.Collections.SynchronizedCollection(collection);
8837 },"java.util.Collection");
8838 c$.synchronizedList=Clazz_defineMethod(c$,"synchronizedList",
8839 function(list){
8840 if(list==null){
8841 throw new NullPointerException();
8842 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8843 return new java.util.Collections.SynchronizedRandomAccessList(list);
8844 }return new java.util.Collections.SynchronizedList(list);
8845 },"java.util.List");
8846 c$.synchronizedMap=Clazz_defineMethod(c$,"synchronizedMap",
8847 function(map){
8848 if(map==null){
8849 throw new NullPointerException();
8850 }return new java.util.Collections.SynchronizedMap(map);
8851 },"java.util.Map");
8852 c$.synchronizedSet=Clazz_defineMethod(c$,"synchronizedSet",
8853 function(set){
8854 if(set==null){
8855 throw new NullPointerException();
8856 }return new java.util.Collections.SynchronizedSet(set);
8857 },"java.util.Set");
8858 c$.synchronizedSortedMap=Clazz_defineMethod(c$,"synchronizedSortedMap",
8859 function(map){
8860 if(map==null){
8861 throw new NullPointerException();
8862 }return new java.util.Collections.SynchronizedSortedMap(map);
8863 },"java.util.SortedMap");
8864 c$.synchronizedSortedSet=Clazz_defineMethod(c$,"synchronizedSortedSet",
8865 function(set){
8866 if(set==null){
8867 throw new NullPointerException();
8868 }return new java.util.Collections.SynchronizedSortedSet(set);
8869 },"java.util.SortedSet");
8870 c$.unmodifiableCollection=Clazz_defineMethod(c$,"unmodifiableCollection",
8871 function(collection){
8872 if(collection==null){
8873 throw new NullPointerException();
8874 }return new java.util.Collections.UnmodifiableCollection(collection);
8875 },"java.util.Collection");
8876 c$.unmodifiableList=Clazz_defineMethod(c$,"unmodifiableList",
8877 function(list){
8878 if(list==null){
8879 throw new NullPointerException();
8880 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8881 return new java.util.Collections.UnmodifiableRandomAccessList(list);
8882 }return new java.util.Collections.UnmodifiableList(list);
8883 },"java.util.List");
8884 c$.unmodifiableMap=Clazz_defineMethod(c$,"unmodifiableMap",
8885 function(map){
8886 if(map==null){
8887 throw new NullPointerException();
8888 }return new java.util.Collections.UnmodifiableMap(map);
8889 },"java.util.Map");
8890 c$.unmodifiableSet=Clazz_defineMethod(c$,"unmodifiableSet",
8891 function(set){
8892 if(set==null){
8893 throw new NullPointerException();
8894 }return new java.util.Collections.UnmodifiableSet(set);
8895 },"java.util.Set");
8896 c$.unmodifiableSortedMap=Clazz_defineMethod(c$,"unmodifiableSortedMap",
8897 function(map){
8898 if(map==null){
8899 throw new NullPointerException();
8900 }return new java.util.Collections.UnmodifiableSortedMap(map);
8901 },"java.util.SortedMap");
8902 c$.unmodifiableSortedSet=Clazz_defineMethod(c$,"unmodifiableSortedSet",
8903 function(set){
8904 if(set==null){
8905 throw new NullPointerException();
8906 }return new java.util.Collections.UnmodifiableSortedSet(set);
8907 },"java.util.SortedSet");
8908 c$.frequency=Clazz_defineMethod(c$,"frequency",
8909 function(c,o){
8910 if(c==null){
8911 throw new NullPointerException();
8912 }if(c.isEmpty()){
8913 return 0;
8914 }
8915 var result=0;
8916 var itr=c.iterator();
8917 while(itr.hasNext()){
8918 var e=itr.next();
8919 if(o==null?e==null:o.equals(e)){
8920 result++;
8921 }}
8922 return result;
8923 },"java.util.Collection,~O");
8924
8925 c$.emptyList=Clazz_defineMethod(c$,"emptyList",
8926 function(){
8927 return java.util.Collections.EMPTY_LIST;
8928 });
8929 c$.emptySet=Clazz_defineMethod(c$,"emptySet",
8930 function(){
8931 return java.util.Collections.EMPTY_SET;
8932 });
8933 c$.emptyMap=Clazz_defineMethod(c$,"emptyMap",
8934 function(){
8935 return java.util.Collections.EMPTY_MAP;
8936 });
8937 c$.checkedCollection=Clazz_defineMethod(c$,"checkedCollection",
8938 function(c,type){
8939 return new java.util.Collections.CheckedCollection(c,type);
8940 },"java.util.Collection,Class");
8941 c$.checkedMap=Clazz_defineMethod(c$,"checkedMap",
8942 function(m,keyType,valueType){
8943 return new java.util.Collections.CheckedMap(m,keyType,valueType);
8944 },"java.util.Map,Class,Class");
8945 c$.checkedList=Clazz_defineMethod(c$,"checkedList",
8946 function(list,type){
8947 if(Clazz_instanceOf(list,java.util.RandomAccess)){
8948 return new java.util.Collections.CheckedRandomAccessList(list,type);
8949 }return new java.util.Collections.CheckedList(list,type);
8950 },"java.util.List,Class");
8951 c$.checkedSet=Clazz_defineMethod(c$,"checkedSet",
8952 function(s,type){
8953 return new java.util.Collections.CheckedSet(s,type);
8954 },"java.util.Set,Class");
8955 c$.checkedSortedMap=Clazz_defineMethod(c$,"checkedSortedMap",
8956 function(m,keyType,valueType){
8957 return new java.util.Collections.CheckedSortedMap(m,keyType,valueType);
8958 },"java.util.SortedMap,Class,Class");
8959 c$.checkedSortedSet=Clazz_defineMethod(c$,"checkedSortedSet",
8960 function(s,type){
8961 return new java.util.Collections.CheckedSortedSet(s,type);
8962 },"java.util.SortedSet,Class");
8963 c$.addAll=Clazz_defineMethod(c$,"addAll",
8964 function(c,a){
8965 var modified=false;
8966 for(var i=0;i<a.length;i++){
8967 modified=new Boolean(modified|c.add(a[i])).valueOf();
8968 }
8969 return modified;
8970 },"java.util.Collection,~A");
8971 c$.disjoint=Clazz_defineMethod(c$,"disjoint",
8972 function(c1,c2){
8973 if((Clazz_instanceOf(c1,java.util.Set))&&!(Clazz_instanceOf(c2,java.util.Set))||(c2.size())>c1.size()){
8974 var tmp=c1;
8975 c1=c2;
8976 c2=tmp;
8977 }var it=c1.iterator();
8978 while(it.hasNext()){
8979 if(c2.contains(it.next())){
8980 return false;
8981 }}
8982 return true;
8983 },"java.util.Collection,java.util.Collection");
8984 c$.checkType=Clazz_defineMethod(c$,"checkType",
8985 function(obj,type){
8986 if(!type.isInstance(obj)){
8987 throw new ClassCastException("Attempt to insert "+obj.getClass()+" element into collection with element type "+type);
8988 }return obj;
8989 },"~O,Class");
8990
8991 c$.$Collections$1$=function(c){
8992 Clazz_pu$h(self.c$);
8993 c$=Clazz_decorateAsClass(function(){
8994 Clazz_prepareCallback(this,arguments);
8995 this.it=null;
8996 Clazz_instantialize(this,arguments);
8997 },java.util,"Collections$1",null,java.util.Enumeration);
8998
8999 Clazz_prepareFields(c$,function(){
9000 this.it=c.iterator();
9001 });
9002
9003 Clazz_defineMethod(c$,"hasMoreElements",
9004 function(){
9005 return this.it.hasNext();
9006 });
9007 Clazz_defineMethod(c$,"nextElement",
9008 function(){
9009 return this.it.next();
9010 });
9011 c$=Clazz_p0p();
9012 };
9013
9014 Clazz_pu$h(self.c$);
9015 c$=Clazz_decorateAsClass(function(){
9016 this.n=0;
9017 this.element=null;
9018 Clazz_instantialize(this,arguments);
9019 },java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);
9020 Clazz_makeConstructor(c$,
9021 function(a,b){
9022 Clazz_superConstructor(this,java.util.Collections.CopiesList,[]);
9023 if(a<0){
9024 throw new IllegalArgumentException();
9025 }this.n=a;
9026 this.element=b;
9027 },"~N,~O");
9028 Clazz_overrideMethod(c$,"contains",
9029 function(a){
9030 return this.element==null?a==null:this.element.equals(a);
9031 },"~O");
9032 Clazz_overrideMethod(c$,"size",
9033 function(){
9034 return this.n;
9035 });
9036 Clazz_overrideMethod(c$,"get",
9037 function(a){
9038 if(0<=a&&a<this.n){
9039 return this.element;
9040 }throw new IndexOutOfBoundsException();
9041 },"~N");
9042 c$=Clazz_p0p();
9043 Clazz_pu$h(self.c$);
9044 c$=Clazz_declareType(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);
9045 Clazz_overrideMethod(c$,"contains",
9046 function(a){
9047 return false;
9048 },"~O");
9049 Clazz_overrideMethod(c$,"size",
9050 function(){
9051 return 0;
9052 });
9053 Clazz_overrideMethod(c$,"get",
9054 function(a){
9055 throw new IndexOutOfBoundsException();
9056 },"~N");
9057 c$=Clazz_p0p();
9058 Clazz_pu$h(self.c$);
9059 c$=Clazz_declareType(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);
9060 Clazz_overrideMethod(c$,"contains",
9061 function(a){
9062 return false;
9063 },"~O");
9064 Clazz_overrideMethod(c$,"size",
9065 function(){
9066 return 0;
9067 });
9068 Clazz_overrideMethod(c$,"iterator",
9069 function(){
9070 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));
9071 });
9072 c$.$Collections$EmptySet$1$=function(){
9073 Clazz_pu$h(self.c$);
9074 c$=Clazz_declareAnonymous(java.util,"Collections$EmptySet$1",null,java.util.Iterator);
9075 Clazz_overrideMethod(c$,"hasNext",
9076 function(){
9077 return false;
9078 });
9079 Clazz_overrideMethod(c$,"next",
9080 function(){
9081 throw new java.util.NoSuchElementException();
9082 });
9083 Clazz_overrideMethod(c$,"remove",
9084 function(){
9085 throw new UnsupportedOperationException();
9086 });
9087 c$=Clazz_p0p();
9088 };
9089 c$=Clazz_p0p();
9090 Clazz_pu$h(self.c$);
9091 c$=Clazz_declareType(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);
9092 Clazz_overrideMethod(c$,"containsKey",
9093 function(a){
9094 return false;
9095 },"~O");
9096 Clazz_overrideMethod(c$,"containsValue",
9097 function(a){
9098 return false;
9099 },"~O");
9100 Clazz_overrideMethod(c$,"entrySet",
9101 function(){
9102 return java.util.Collections.EMPTY_SET;
9103 });
9104 Clazz_overrideMethod(c$,"get",
9105 function(a){
9106 return null;
9107 },"~O");
9108 Clazz_overrideMethod(c$,"keySet",
9109 function(){
9110 return java.util.Collections.EMPTY_SET;
9111 });
9112 Clazz_overrideMethod(c$,"values",
9113 function(){
9114 return java.util.Collections.EMPTY_LIST;
9115 });
9116 c$=Clazz_p0p();
9117 Clazz_pu$h(self.c$);
9118 c$=Clazz_declareType(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);
9119 Clazz_overrideMethod(c$,"compare",
9120 function(a,b){
9121 var c=b;
9122 return c.compareTo(a);
9123 },"~O,~O");
9124 c$=Clazz_p0p();
9125 Clazz_pu$h(self.c$);
9126 c$=Clazz_decorateAsClass(function(){
9127 this.comparator=null;
9128 Clazz_instantialize(this,arguments);
9129 },java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);
9130 Clazz_makeConstructor(c$,
9131 function(a){
9132 this.comparator=a;
9133 },"java.util.Comparator");
9134 Clazz_defineMethod(c$,"compare",
9135 function(a,b){
9136 return this.comparator.compare(b,a);
9137 },"~O,~O");
9138 c$=Clazz_p0p();
9139 Clazz_pu$h(self.c$);
9140 c$=Clazz_decorateAsClass(function(){
9141 this.element=null;
9142 Clazz_instantialize(this,arguments);
9143 },java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);
9144 Clazz_makeConstructor(c$,
9145 function(a){
9146 Clazz_superConstructor(this,java.util.Collections.SingletonSet,[]);
9147 this.element=a;
9148 },"~O");
9149 Clazz_overrideMethod(c$,"contains",
9150 function(a){
9151 return this.element==null?a==null:this.element.equals(a);
9152 },"~O");
9153 Clazz_overrideMethod(c$,"size",
9154 function(){
9155 return 1;
9156 });
9157 Clazz_overrideMethod(c$,"iterator",
9158 function(){
9159 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));
9160 });
9161 c$.$Collections$SingletonSet$1$=function(){
9162 Clazz_pu$h(self.c$);
9163 c$=Clazz_decorateAsClass(function(){
9164 Clazz_prepareCallback(this,arguments);
9165 this.$hasNext=true;
9166 Clazz_instantialize(this,arguments);
9167 },java.util,"Collections$SingletonSet$1",null,java.util.Iterator);
9168 Clazz_overrideMethod(c$,"hasNext",
9169 function(){
9170 return this.$hasNext;
9171 });
9172 Clazz_overrideMethod(c$,"next",
9173 function(){
9174 if(this.$hasNext){
9175 this.$hasNext=false;
9176 return this.b$["java.util.Collections.SingletonSet"].element;
9177 }throw new java.util.NoSuchElementException();
9178 });
9179 Clazz_overrideMethod(c$,"remove",
9180 function(){
9181 throw new UnsupportedOperationException();
9182 });
9183 c$=Clazz_p0p();
9184 };
9185 c$=Clazz_p0p();
9186 Clazz_pu$h(self.c$);
9187 c$=Clazz_decorateAsClass(function(){
9188 this.element=null;
9189 Clazz_instantialize(this,arguments);
9190 },java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);
9191 Clazz_makeConstructor(c$,
9192 function(a){
9193 Clazz_superConstructor(this,java.util.Collections.SingletonList,[]);
9194 this.element=a;
9195 },"~O");
9196 Clazz_overrideMethod(c$,"contains",
9197 function(a){
9198 return this.element==null?a==null:this.element.equals(a);
9199 },"~O");
9200 Clazz_overrideMethod(c$,"get",
9201 function(a){
9202 if(a==0){
9203 return this.element;
9204 }throw new IndexOutOfBoundsException();
9205 },"~N");
9206 Clazz_overrideMethod(c$,"size",
9207 function(){
9208 return 1;
9209 });
9210 c$=Clazz_p0p();
9211 Clazz_pu$h(self.c$);
9212 c$=Clazz_decorateAsClass(function(){
9213 this.k=null;
9214 this.v=null;
9215 Clazz_instantialize(this,arguments);
9216 },java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);
9217 Clazz_makeConstructor(c$,
9218 function(a,b){
9219 Clazz_superConstructor(this,java.util.Collections.SingletonMap,[]);
9220 this.k=a;
9221 this.v=b;
9222 },"~O,~O");
9223 Clazz_overrideMethod(c$,"containsKey",
9224 function(a){
9225 return this.k==null?a==null:this.k.equals(a);
9226 },"~O");
9227 Clazz_overrideMethod(c$,"containsValue",
9228 function(a){
9229 return this.v==null?a==null:this.v.equals(a);
9230 },"~O");
9231 Clazz_overrideMethod(c$,"get",
9232 function(a){
9233 if(this.containsKey(a)){
9234 return this.v;
9235 }return null;
9236 },"~O");
9237 Clazz_overrideMethod(c$,"size",
9238 function(){
9239 return 1;
9240 });
9241 Clazz_overrideMethod(c$,"entrySet",
9242 function(){
9243 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));
9244 });
9245 c$.$Collections$SingletonMap$1$=function(){
9246 Clazz_pu$h(self.c$);
9247 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);
9248 Clazz_overrideMethod(c$,"contains",
9249 function(a){
9250 if(Clazz_instanceOf(a,java.util.Map.Entry)){
9251 var b=a;
9252 return this.b$["java.util.Collections.SingletonMap"].containsKey(b.getKey())&&this.b$["java.util.Collections.SingletonMap"].containsValue(b.getValue());
9253 }return false;
9254 },"~O");
9255 Clazz_overrideMethod(c$,"size",
9256 function(){
9257 return 1;
9258 });
9259 Clazz_overrideMethod(c$,"iterator",
9260 function(){
9261 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));
9262 });
9263 c$=Clazz_p0p();
9264 };
9265 c$.$Collections$SingletonMap$1$1$=function(){
9266 Clazz_pu$h(self.c$);
9267 c$=Clazz_decorateAsClass(function(){
9268 Clazz_prepareCallback(this,arguments);
9269 this.$hasNext=true;
9270 Clazz_instantialize(this,arguments);
9271 },java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);
9272 Clazz_overrideMethod(c$,"hasNext",
9273 function(){
9274 return this.$hasNext;
9275 });
9276 Clazz_overrideMethod(c$,"next",
9277 function(){
9278 if(this.$hasNext){
9279 this.$hasNext=false;
9280 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));
9281 }throw new java.util.NoSuchElementException();
9282 });
9283 Clazz_overrideMethod(c$,"remove",
9284 function(){
9285 throw new UnsupportedOperationException();
9286 });
9287 c$=Clazz_p0p();
9288 };
9289 c$.$Collections$SingletonMap$1$1$1$=function(){
9290 Clazz_pu$h(self.c$);
9291 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);
9292 Clazz_overrideMethod(c$,"equals",
9293 function(a){
9294 return this.b$["java.util.Collections$SingletonMap$1"].contains(a);
9295 },"~O");
9296 Clazz_overrideMethod(c$,"getKey",
9297 function(){
9298 return this.b$["java.util.Collections.SingletonMap"].k;
9299 });
9300 Clazz_overrideMethod(c$,"getValue",
9301 function(){
9302 return this.b$["java.util.Collections.SingletonMap"].v;
9303 });
9304 Clazz_overrideMethod(c$,"hashCode",
9305 function(){
9306 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());
9307 });
9308 Clazz_overrideMethod(c$,"setValue",
9309 function(a){
9310 throw new UnsupportedOperationException();
9311 },"~O");
9312 c$=Clazz_p0p();
9313 };
9314 c$=Clazz_p0p();
9315 Clazz_pu$h(self.c$);
9316 c$=Clazz_decorateAsClass(function(){
9317 this.c=null;
9318 this.mutex=null;
9319 Clazz_instantialize(this,arguments);
9320 },java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);
9321 Clazz_makeConstructor(c$,
9322 function(a){
9323 this.c=a;
9324 this.mutex=this;
9325 },"java.util.Collection");
9326 Clazz_makeConstructor(c$,
9327 function(a,b){
9328 this.c=a;
9329 this.mutex=b;
9330 },"java.util.Collection,~O");
9331 Clazz_defineMethod(c$,"add",
9332 function(a){
9333 {
9334 return this.c.add(a);
9335 }},"~O");
9336 Clazz_defineMethod(c$,"addAll",
9337 function(a){
9338 {
9339 return this.c.addAll(a);
9340 }},"java.util.Collection");
9341 Clazz_defineMethod(c$,"clear",
9342 function(){
9343 {
9344 this.c.clear();
9345 }});
9346 Clazz_defineMethod(c$,"contains",
9347 function(a){
9348 {
9349 return this.c.contains(a);
9350 }},"~O");
9351 Clazz_defineMethod(c$,"containsAll",
9352 function(a){
9353 {
9354 return this.c.containsAll(a);
9355 }},"java.util.Collection");
9356 Clazz_defineMethod(c$,"isEmpty",
9357 function(){
9358 {
9359 return this.c.isEmpty();
9360 }});
9361 Clazz_defineMethod(c$,"iterator",
9362 function(){
9363 {
9364 return this.c.iterator();
9365 }});
9366 Clazz_defineMethod(c$,"remove",
9367 function(a){
9368 {
9369 return this.c.remove(a);
9370 }},"~O");
9371 Clazz_defineMethod(c$,"removeAll",
9372 function(a){
9373 {
9374 return this.c.removeAll(a);
9375 }},"java.util.Collection");
9376 Clazz_defineMethod(c$,"retainAll",
9377 function(a){
9378 {
9379 return this.c.retainAll(a);
9380 }},"java.util.Collection");
9381 Clazz_defineMethod(c$,"size",
9382 function(){
9383 {
9384 return this.c.size();
9385 }});
9386 Clazz_defineMethod(c$,"toArray",
9387 function(){
9388 {
9389 return this.c.toArray();
9390 }});
9391 Clazz_defineMethod(c$,"toString",
9392 function(){
9393 {
9394 return this.c.toString();
9395 }});
9396 Clazz_defineMethod(c$,"toArray",
9397 function(a){
9398 {
9399 return this.c.toArray(a);
9400 }},"~A");
9401 c$=Clazz_p0p();
9402
9403
9404 Clazz_pu$h(self.c$);
9405 c$=Clazz_decorateAsClass(function(){
9406 this.list=null;
9407 Clazz_instantialize(this,arguments);
9408 },java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);
9409 Clazz_makeConstructor(c$,
9410 function(a){
9411 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a]);
9412 this.list=a;
9413 },"java.util.List");
9414 Clazz_makeConstructor(c$,
9415 function(a,b){
9416 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a,b]);
9417 this.list=a;
9418 },"java.util.List,~O");
9419 Clazz_defineMethod(c$,"add",
9420 function(a,b){
9421 {
9422 this.list.add(a,b);
9423 }},"~N,~O");
9424 Clazz_defineMethod(c$,"addAll",
9425 function(a,b){
9426 {
9427 return this.list.addAll(a,b);
9428 }},"~N,java.util.Collection");
9429 Clazz_overrideMethod(c$,"equals",
9430 function(a){
9431 {
9432 return this.list.equals(a);
9433 }},"~O");
9434 Clazz_defineMethod(c$,"get",
9435 function(a){
9436 {
9437 return this.list.get(a);
9438 }},"~N");
9439 Clazz_overrideMethod(c$,"hashCode",
9440 function(){
9441 {
9442 return this.list.hashCode();
9443 }});
9444 Clazz_defineMethod(c$,"indexOf",
9445 function(a){
9446 {
9447 return this.list.indexOf(a);
9448 }},"~O");
9449 Clazz_defineMethod(c$,"lastIndexOf",
9450 function(a){
9451 {
9452 return this.list.lastIndexOf(a);
9453 }},"~O");
9454 //Clazz_defineMethod(c$,"listIterator",
9455 //function(){
9456 //{
9457 //return this.list.listIterator();
9458 //}});
9459 Clazz_defineMethod(c$,"listIterator",
9460 function(a){
9461 {
9462 a || (a = 0);
9463 return this.list.listIterator(a);
9464 }},"~N");
9465 Clazz_defineMethod(c$,"remove",
9466 function(a){
9467 {
9468 return this.list.remove(a);
9469 }},"~N");
9470 Clazz_defineMethod(c$,"set",
9471 function(a,b){
9472 {
9473 return this.list.set(a,b);
9474 }},"~N,~O");
9475 Clazz_defineMethod(c$,"subList",
9476 function(a,b){
9477 {
9478 return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex);
9479 }},"~N,~N");
9480 c$=Clazz_p0p();
9481
9482
9483
9484 Clazz_pu$h(self.c$);
9485 c$=Clazz_declareType(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);
9486 Clazz_overrideMethod(c$,"subList",
9487 function(a,b){
9488 {
9489 return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex);
9490 }},"~N,~N");
9491 c$=Clazz_p0p();
9492
9493
9494
9495
9496 Clazz_pu$h(self.c$);
9497 c$=Clazz_decorateAsClass(function(){
9498 this.m=null;
9499 this.mutex=null;
9500 Clazz_instantialize(this,arguments);
9501 },java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);
9502 Clazz_makeConstructor(c$,
9503 function(a){
9504 this.m=a;
9505 this.mutex=this;
9506 },"java.util.Map");
9507 Clazz_makeConstructor(c$,
9508 function(a,b){
9509 this.m=a;
9510 this.mutex=b;
9511 },"java.util.Map,~O");
9512 Clazz_defineMethod(c$,"clear",
9513 function(){
9514 {
9515 this.m.clear();
9516 }});
9517 Clazz_defineMethod(c$,"containsKey",
9518 function(a){
9519 {
9520 return this.m.containsKey(a);
9521 }},"~O");
9522 Clazz_defineMethod(c$,"containsValue",
9523 function(a){
9524 {
9525 return this.m.containsValue(a);
9526 }},"~O");
9527 Clazz_defineMethod(c$,"entrySet",
9528 function(){
9529 {
9530 return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex);
9531 }});
9532 Clazz_overrideMethod(c$,"equals",
9533 function(a){
9534 {
9535 return this.m.equals(a);
9536 }},"~O");
9537 Clazz_defineMethod(c$,"get",
9538 function(a){
9539 {
9540 return this.m.get(a);
9541 }},"~O");
9542 Clazz_overrideMethod(c$,"hashCode",
9543 function(){
9544 {
9545 return this.m.hashCode();
9546 }});
9547 Clazz_defineMethod(c$,"isEmpty",
9548 function(){
9549 {
9550 return this.m.isEmpty();
9551 }});
9552 Clazz_defineMethod(c$,"keySet",
9553 function(){
9554 {
9555 return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex);
9556 }});
9557 Clazz_defineMethod(c$,"put",
9558 function(a,b){
9559 {
9560 return this.m.put(a,b);
9561 }},"~O,~O");
9562 Clazz_defineMethod(c$,"putAll",
9563 function(a){
9564 {
9565 this.m.putAll(a);
9566 }},"java.util.Map");
9567 Clazz_defineMethod(c$,"remove",
9568 function(a){
9569 {
9570 return this.m.remove(a);
9571 }},"~O");
9572 Clazz_defineMethod(c$,"size",
9573 function(){
9574 {
9575 return this.m.size();
9576 }});
9577 Clazz_defineMethod(c$,"values",
9578 function(){
9579 {
9580 return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex);
9581 }});
9582 Clazz_defineMethod(c$,"toString",
9583 function(){
9584 {
9585 return this.m.toString();
9586 }});
9587 c$=Clazz_p0p();
9588 Clazz_pu$h(self.c$);
9589 c$=Clazz_declareType(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);
9590 Clazz_overrideMethod(c$,"equals",
9591 function(a){
9592 {
9593 return this.c.equals(a);
9594 }},"~O");
9595 Clazz_overrideMethod(c$,"hashCode",
9596 function(){
9597 {
9598 return this.c.hashCode();
9599 }});
9600 c$=Clazz_p0p();
9601 Clazz_pu$h(self.c$);
9602 c$=Clazz_decorateAsClass(function(){
9603 this.sm=null;
9604 Clazz_instantialize(this,arguments);
9605 },java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);
9606 Clazz_makeConstructor(c$,
9607 function(a){
9608 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a]);
9609 this.sm=a;
9610 },"java.util.SortedMap");
9611 Clazz_makeConstructor(c$,
9612 function(a,b){
9613 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a,b]);
9614 this.sm=a;
9615 },"java.util.SortedMap,~O");
9616 Clazz_defineMethod(c$,"comparator",
9617 function(){
9618 {
9619 return this.sm.comparator();
9620 }});
9621 Clazz_defineMethod(c$,"firstKey",
9622 function(){
9623 {
9624 return this.sm.firstKey();
9625 }});
9626 Clazz_defineMethod(c$,"headMap",
9627 function(a){
9628 {
9629 return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex);
9630 }},"~O");
9631 Clazz_defineMethod(c$,"lastKey",
9632 function(){
9633 {
9634 return this.sm.lastKey();
9635 }});
9636 Clazz_defineMethod(c$,"subMap",
9637 function(a,b){
9638 {
9639 return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,b),this.mutex);
9640 }},"~O,~O");
9641 Clazz_defineMethod(c$,"tailMap",
9642 function(a){
9643 {
9644 return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex);
9645 }},"~O");
9646 c$=Clazz_p0p();
9647 Clazz_pu$h(self.c$);
9648 c$=Clazz_decorateAsClass(function(){
9649 this.ss=null;
9650 Clazz_instantialize(this,arguments);
9651 },java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);
9652 Clazz_makeConstructor(c$,
9653 function(a){
9654 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a]);
9655 this.ss=a;
9656 },"java.util.SortedSet");
9657 Clazz_makeConstructor(c$,
9658 function(a,b){
9659 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a,b]);
9660 this.ss=a;
9661 },"java.util.SortedSet,~O");
9662 Clazz_defineMethod(c$,"comparator",
9663 function(){
9664 {
9665 return this.ss.comparator();
9666 }});
9667 Clazz_defineMethod(c$,"first",
9668 function(){
9669 {
9670 return this.ss.first();
9671 }});
9672 Clazz_defineMethod(c$,"headSet",
9673 function(a){
9674 {
9675 return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex);
9676 }},"~O");
9677 Clazz_defineMethod(c$,"last",
9678 function(){
9679 {
9680 return this.ss.last();
9681 }});
9682 Clazz_defineMethod(c$,"subSet",
9683 function(a,b){
9684 {
9685 return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex);
9686 }},"~O,~O");
9687 Clazz_defineMethod(c$,"tailSet",
9688 function(a){
9689 {
9690 return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex);
9691 }},"~O");
9692 c$=Clazz_p0p();
9693 Clazz_pu$h(self.c$);
9694 c$=Clazz_decorateAsClass(function(){
9695 this.c=null;
9696 Clazz_instantialize(this,arguments);
9697 },java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);
9698 Clazz_makeConstructor(c$,
9699 function(a){
9700 this.c=a;
9701 },"java.util.Collection");
9702 Clazz_overrideMethod(c$,"add",
9703 function(a){
9704 throw new UnsupportedOperationException();
9705 },"~O");
9706 Clazz_overrideMethod(c$,"addAll",
9707 function(a){
9708 throw new UnsupportedOperationException();
9709 },"java.util.Collection");
9710 Clazz_overrideMethod(c$,"clear",
9711 function(){
9712 throw new UnsupportedOperationException();
9713 });
9714 Clazz_defineMethod(c$,"contains",
9715 function(a){
9716 return this.c.contains(a);
9717 },"~O");
9718 Clazz_defineMethod(c$,"containsAll",
9719 function(a){
9720 return this.c.containsAll(a);
9721 },"java.util.Collection");
9722 Clazz_defineMethod(c$,"isEmpty",
9723 function(){
9724 return this.c.isEmpty();
9725 });
9726 Clazz_defineMethod(c$,"iterator",
9727 function(){
9728 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));
9729 });
9730 Clazz_overrideMethod(c$,"remove",
9731 function(a){
9732 throw new UnsupportedOperationException();
9733 },"~O");
9734 Clazz_overrideMethod(c$,"removeAll",
9735 function(a){
9736 throw new UnsupportedOperationException();
9737 },"java.util.Collection");
9738 Clazz_overrideMethod(c$,"retainAll",
9739 function(a){
9740 throw new UnsupportedOperationException();
9741 },"java.util.Collection");
9742 Clazz_defineMethod(c$,"size",
9743 function(){
9744 return this.c.size();
9745 });
9746 Clazz_defineMethod(c$,"toArray",
9747 function(){
9748 return this.c.toArray();
9749 });
9750 Clazz_defineMethod(c$,"toArray",
9751 function(a){
9752 return this.c.toArray(a);
9753 },"~A");
9754 Clazz_defineMethod(c$,"toString",
9755 function(){
9756 return this.c.toString();
9757 });
9758 c$.$Collections$UnmodifiableCollection$1$=function(){
9759 Clazz_pu$h(self.c$);
9760 c$=Clazz_decorateAsClass(function(){
9761 Clazz_prepareCallback(this,arguments);
9762 this.iterator=null;
9763 Clazz_instantialize(this,arguments);
9764 },java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);
9765 Clazz_prepareFields(c$,function(){
9766 this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator();
9767 });
9768 Clazz_defineMethod(c$,"hasNext",
9769 function(){
9770 return this.iterator.hasNext();
9771 });
9772 Clazz_defineMethod(c$,"next",
9773 function(){
9774 return this.iterator.next();
9775 });
9776 Clazz_overrideMethod(c$,"remove",
9777 function(){
9778 throw new UnsupportedOperationException();
9779 });
9780 c$=Clazz_p0p();
9781 };
9782 c$=Clazz_p0p();
9783
9784 //BH note: a declared static superclass must come before a static class referencing it
9785
9786 Clazz_pu$h(self.c$);
9787 c$=Clazz_decorateAsClass(function(){
9788 this.list=null;
9789 Clazz_instantialize(this,arguments);
9790 },java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);
9791 Clazz_makeConstructor(c$,
9792 function(a){
9793 Clazz_superConstructor(this,java.util.Collections.UnmodifiableList,[a]);
9794 this.list=a;
9795 },"java.util.List");
9796 Clazz_defineMethod(c$,"add",
9797 function(a,b){
9798 throw new UnsupportedOperationException();
9799 },"~N,~O");
9800 Clazz_defineMethod(c$,"addAll",
9801 function(a,b){
9802 throw new UnsupportedOperationException();
9803 },"~N,java.util.Collection");
9804 Clazz_overrideMethod(c$,"equals",
9805 function(a){
9806 return this.list.equals(a);
9807 },"~O");
9808 Clazz_defineMethod(c$,"get",
9809 function(a){
9810 return this.list.get(a);
9811 },"~N");
9812 Clazz_overrideMethod(c$,"hashcode",
9813 function(){
9814 return this.list.hashCode();
9815 });
9816 Clazz_defineMethod(c$,"indexOf",
9817 function(a){
9818 return this.list.indexOf(a);
9819 },"~O");
9820 Clazz_defineMethod(c$,"lastIndexOf",
9821 function(a){
9822 return this.list.lastIndexOf(a);
9823 },"~O");
9824 //Clazz_defineMethod(c$,"listIterator",
9825 //function(){
9826 //return this.listIterator(0);
9827 //});
9828 Clazz_defineMethod(c$,"listIterator",
9829 function(a){
9830 a || (a = 0);
9831 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));
9832 },"~N");
9833 Clazz_defineMethod(c$,"remove",
9834 function(a){
9835 throw new UnsupportedOperationException();
9836 },"~N");
9837 Clazz_overrideMethod(c$,"set",
9838 function(a,b){
9839 throw new UnsupportedOperationException();
9840 },"~N,~O");
9841 Clazz_defineMethod(c$,"subList",
9842 function(a,b){
9843 return new java.util.Collections.UnmodifiableList(this.list.subList(a,b));
9844 },"~N,~N");
9845 c$.$Collections$UnmodifiableList$1$=function(){
9846 Clazz_pu$h(self.c$);
9847 c$=Clazz_decorateAsClass(function(){
9848 Clazz_prepareCallback(this,arguments);
9849 this.iterator=null;
9850 Clazz_instantialize(this,arguments);
9851 },java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);
9852 Clazz_prepareFields(c$,function(){
9853 this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location);
9854 });
9855 Clazz_overrideMethod(c$,"add",
9856 function(b){
9857 throw new UnsupportedOperationException();
9858 },"~O");
9859 Clazz_defineMethod(c$,"hasNext",
9860 function(){
9861 return this.iterator.hasNext();
9862 });
9863 Clazz_defineMethod(c$,"hasPrevious",
9864 function(){
9865 return this.iterator.hasPrevious();
9866 });
9867 Clazz_defineMethod(c$,"next",
9868 function(){
9869 return this.iterator.next();
9870 });
9871 Clazz_defineMethod(c$,"nextIndex",
9872 function(){
9873 return this.iterator.nextIndex();
9874 });
9875 Clazz_defineMethod(c$,"previous",
9876 function(){
9877 return this.iterator.previous();
9878 });
9879 Clazz_defineMethod(c$,"previousIndex",
9880 function(){
9881 return this.iterator.previousIndex();
9882 });
9883 Clazz_overrideMethod(c$,"remove",
9884 function(){
9885 throw new UnsupportedOperationException();
9886 });
9887 Clazz_overrideMethod(c$,"set",
9888 function(b){
9889 throw new UnsupportedOperationException();
9890 },"~O");
9891 c$=Clazz_p0p();
9892 };
9893 c$=Clazz_p0p();
9894
9895
9896
9897
9898 Clazz_pu$h(self.c$);
9899 c$=Clazz_declareType(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);
9900 Clazz_overrideMethod(c$,"subList",
9901 function(a,b){
9902 return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,b));
9903 },"~N,~N");
9904 c$=Clazz_p0p();
9905
9906
9907 Clazz_pu$h(self.c$);
9908 c$=Clazz_declareType(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);
9909 Clazz_overrideMethod(c$,"equals",
9910 function(a){
9911 return this.c.equals(a);
9912 },"~O");
9913 Clazz_overrideMethod(c$,"hashCode",
9914 function(){
9915 return this.c.hashCode();
9916 });
9917 c$=Clazz_p0p();
9918
9919
9920 Clazz_pu$h(self.c$);
9921 c$=Clazz_decorateAsClass(function(){
9922 this.m=null;
9923 Clazz_instantialize(this,arguments);
9924 },java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);
9925 Clazz_makeConstructor(c$,
9926 function(a){
9927 this.m=a;
9928 },"java.util.Map");
9929 Clazz_overrideMethod(c$,"clear",
9930 function(){
9931 throw new UnsupportedOperationException();
9932 });
9933 Clazz_defineMethod(c$,"containsKey",
9934 function(a){
9935 return this.m.containsKey(a);
9936 },"~O");
9937 Clazz_defineMethod(c$,"containsValue",
9938 function(a){
9939 return this.m.containsValue(a);
9940 },"~O");
9941 Clazz_defineMethod(c$,"entrySet",
9942 function(){
9943 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet());
9944 });
9945 Clazz_overrideMethod(c$,"equals",
9946 function(a){
9947 return this.m.equals(a);
9948 },"~O");
9949 Clazz_defineMethod(c$,"get",
9950 function(a){
9951 return this.m.get(a);
9952 },"~O");
9953 Clazz_overrideMethod(c$,"hashcode",
9954 function(){
9955 return this.m.hashCode();
9956 });
9957 Clazz_defineMethod(c$,"isEmpty",
9958 function(){
9959 return this.m.isEmpty();
9960 });
9961 Clazz_defineMethod(c$,"keySet",
9962 function(){
9963 return new java.util.Collections.UnmodifiableSet(this.m.keySet());
9964 });
9965 Clazz_overrideMethod(c$,"put",
9966 function(a,b){
9967 throw new UnsupportedOperationException();
9968 },"~O,~O");
9969 Clazz_overrideMethod(c$,"putAll",
9970 function(a){
9971 throw new UnsupportedOperationException();
9972 },"java.util.Map");
9973 Clazz_overrideMethod(c$,"remove",
9974 function(a){
9975 throw new UnsupportedOperationException();
9976 },"~O");
9977 Clazz_defineMethod(c$,"size",
9978 function(){
9979 return this.m.size();
9980 });
9981 Clazz_defineMethod(c$,"values",
9982 function(){
9983 return new java.util.Collections.UnmodifiableCollection(this.m.values());
9984 });
9985 Clazz_defineMethod(c$,"toString",
9986 function(){
9987 return this.m.toString();
9988 });
9989
9990
9991
9992
9993
9994
9995
9996 Clazz_pu$h(self.c$);
9997 c$=Clazz_declareType(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);
9998 Clazz_overrideMethod(c$,"iterator",
9999 function(){
10000 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));
10001 });
10002 Clazz_defineMethod(c$,"toArray",
10003 function(){
10004 var a=this.c.size();
10005 var b=new Array(a);
10006 var c=this.iterator();
10007 for(var d=a;--d>=0;){
10008 b[d]=c.next();
10009 }
10010 return b;
10011 });
10012 Clazz_defineMethod(c$,"toArray",
10013 function(a){
10014 var b=this.c.size();
10015 var c=0;
10016 var d=this.iterator();
10017 if(b>a.length){
10018 var e=a.getClass().getComponentType();
10019 a=java.lang.reflect.Array.newInstance(e,b);
10020 }while(c<b){
10021 a[c++]=d.next();
10022 }
10023 if(c<a.length){
10024 a[c]=null;
10025 }return a;
10026 },"~A");
10027 c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){
10028 Clazz_pu$h(self.c$);
10029 c$=Clazz_decorateAsClass(function(){
10030 Clazz_prepareCallback(this,arguments);
10031 this.iterator=null;
10032 Clazz_instantialize(this,arguments);
10033 },java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);
10034 Clazz_prepareFields(c$,function(){
10035 this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator();
10036 });
10037 Clazz_defineMethod(c$,"hasNext",
10038 function(){
10039 return this.iterator.hasNext();
10040 });
10041 Clazz_defineMethod(c$,"next",
10042 function(){
10043 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next());
10044 });
10045 Clazz_overrideMethod(c$,"remove",
10046 function(){
10047 throw new UnsupportedOperationException();
10048 });
10049 c$=Clazz_p0p();
10050 };
10051 Clazz_pu$h(self.c$);
10052 c$=Clazz_decorateAsClass(function(){
10053 this.mapEntry=null;
10054 Clazz_instantialize(this,arguments);
10055 },java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);
10056 Clazz_makeConstructor(c$,
10057 function(a){
10058 this.mapEntry=a;
10059 },"java.util.Map.Entry");
10060 Clazz_overrideMethod(c$,"equals",
10061 function(a){
10062 return this.mapEntry.equals(a);
10063 },"~O");
10064 Clazz_defineMethod(c$,"getKey",
10065 function(){
10066 return this.mapEntry.getKey();
10067 });
10068 Clazz_defineMethod(c$,"getValue",
10069 function(){
10070 return this.mapEntry.getValue();
10071 });
10072 Clazz_overrideMethod(c$,"hashcode",
10073 function(){
10074 return this.mapEntry.hashCode();
10075 });
10076 Clazz_overrideMethod(c$,"setValue",
10077 function(a){
10078 throw new UnsupportedOperationException();
10079 },"~O");
10080 Clazz_defineMethod(c$,"toString",
10081 function(){
10082 return this.mapEntry.toString();
10083 });
10084 c$=Clazz_p0p();
10085 c$=Clazz_p0p();
10086 c$=Clazz_p0p();
10087
10088
10089
10090 Clazz_pu$h(self.c$);
10091 c$=Clazz_decorateAsClass(function(){
10092 this.sm=null;
10093 Clazz_instantialize(this,arguments);
10094 },java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);
10095 Clazz_makeConstructor(c$,
10096 function(a){
10097 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedMap,[a]);
10098 this.sm=a;
10099 },"java.util.SortedMap");
10100 Clazz_defineMethod(c$,"comparator",
10101 function(){
10102 return this.sm.comparator();
10103 });
10104 Clazz_defineMethod(c$,"firstKey",
10105 function(){
10106 return this.sm.firstKey();
10107 });
10108 Clazz_defineMethod(c$,"headMap",
10109 function(a){
10110 return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a));
10111 },"~O");
10112 Clazz_defineMethod(c$,"lastKey",
10113 function(){
10114 return this.sm.lastKey();
10115 });
10116 Clazz_defineMethod(c$,"subMap",
10117 function(a,b){
10118 return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b));
10119 },"~O,~O");
10120 Clazz_defineMethod(c$,"tailMap",
10121 function(a){
10122 return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a));
10123 },"~O");
10124 c$=Clazz_p0p();
10125 Clazz_pu$h(self.c$);
10126 c$=Clazz_decorateAsClass(function(){
10127 this.ss=null;
10128 Clazz_instantialize(this,arguments);
10129 },java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);
10130 Clazz_makeConstructor(c$,
10131 function(a){
10132 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedSet,[a]);
10133 this.ss=a;
10134 },"java.util.SortedSet");
10135 Clazz_defineMethod(c$,"comparator",
10136 function(){
10137 return this.ss.comparator();
10138 });
10139 Clazz_defineMethod(c$,"first",
10140 function(){
10141 return this.ss.first();
10142 });
10143 Clazz_defineMethod(c$,"headSet",
10144 function(a){
10145 return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a));
10146 },"~O");
10147 Clazz_defineMethod(c$,"last",
10148 function(){
10149 return this.ss.last();
10150 });
10151 Clazz_defineMethod(c$,"subSet",
10152 function(a,b){
10153 return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b));
10154 },"~O,~O");
10155 Clazz_defineMethod(c$,"tailSet",
10156 function(a){
10157 return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a));
10158 },"~O");
10159 c$=Clazz_p0p();
10160 Clazz_pu$h(self.c$);
10161 c$=Clazz_decorateAsClass(function(){
10162 this.c=null;
10163 this.type=null;
10164 Clazz_instantialize(this,arguments);
10165 },java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);
10166 Clazz_makeConstructor(c$,
10167 function(a,b){
10168 if(a==null||b==null){
10169 throw new NullPointerException();
10170 }this.c=a;
10171 this.type=b;
10172 },"java.util.Collection,Class");
10173 Clazz_defineMethod(c$,"size",
10174 function(){
10175 return this.c.size();
10176 });
10177 Clazz_defineMethod(c$,"isEmpty",
10178 function(){
10179 return this.c.isEmpty();
10180 });
10181 Clazz_defineMethod(c$,"contains",
10182 function(a){
10183 return this.c.contains(a);
10184 },"~O");
10185 Clazz_defineMethod(c$,"iterator",
10186 function(){
10187 var a=this.c.iterator();
10188 if(Clazz_instanceOf(a,java.util.ListIterator)){
10189 a=new java.util.Collections.CheckedListIterator(a,this.type);
10190 }return a;
10191 });
10192 Clazz_defineMethod(c$,"toArray",
10193 function(){
10194 return this.c.toArray();
10195 });
10196 Clazz_defineMethod(c$,"toArray",
10197 function(a){
10198 return this.c.toArray(a);
10199 },"~A");
10200 Clazz_defineMethod(c$,"add",
10201 function(a){
10202 return this.c.add(java.util.Collections.checkType(a,this.type));
10203 },"~O");
10204 Clazz_defineMethod(c$,"remove",
10205 function(a){
10206 return this.c.remove(a);
10207 },"~O");
10208 Clazz_defineMethod(c$,"containsAll",
10209 function(a){
10210 return this.c.containsAll(a);
10211 },"java.util.Collection");
10212 Clazz_overrideMethod(c$,"addAll",
10213 function(a){
10214 var b=a.size();
10215 if(b==0){
10216 return false;
10217 }var c=new Array(b);
10218 var d=a.iterator();
10219 for(var e=0;e<b;e++){
10220 c[e]=java.util.Collections.checkType(d.next(),this.type);
10221 }
10222 var f=false;
10223 for(var g=0;g<b;g++){
10224 f=new Boolean(f|this.c.add(c[g])).valueOf();
10225 }
10226 return f;
10227 },"java.util.Collection");
10228 Clazz_defineMethod(c$,"removeAll",
10229 function(a){
10230 return this.c.removeAll(a);
10231 },"java.util.Collection");
10232 Clazz_defineMethod(c$,"retainAll",
10233 function(a){
10234 return this.c.retainAll(a);
10235 },"java.util.Collection");
10236 Clazz_defineMethod(c$,"clear",
10237 function(){
10238 this.c.clear();
10239 });
10240 Clazz_defineMethod(c$,"toString",
10241 function(){
10242 return this.c.toString();
10243 });
10244 c$=Clazz_p0p();
10245 Clazz_pu$h(self.c$);
10246 c$=Clazz_decorateAsClass(function(){
10247 this.i=null;
10248 this.type=null;
10249 Clazz_instantialize(this,arguments);
10250 },java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);
10251 Clazz_makeConstructor(c$,
10252 function(a,b){
10253 this.i=a;
10254 this.type=b;
10255 },"java.util.ListIterator,Class");
10256 Clazz_defineMethod(c$,"hasNext",
10257 function(){
10258 return this.i.hasNext();
10259 });
10260 Clazz_defineMethod(c$,"next",
10261 function(){
10262 return this.i.next();
10263 });
10264 Clazz_defineMethod(c$,"remove",
10265 function(){
10266 this.i.remove();
10267 });
10268 Clazz_defineMethod(c$,"hasPrevious",
10269 function(){
10270 return this.i.hasPrevious();
10271 });
10272 Clazz_defineMethod(c$,"previous",
10273 function(){
10274 return this.i.previous();
10275 });
10276 Clazz_defineMethod(c$,"nextIndex",
10277 function(){
10278 return this.i.nextIndex();
10279 });
10280 Clazz_defineMethod(c$,"previousIndex",
10281 function(){
10282 return this.i.previousIndex();
10283 });
10284 Clazz_defineMethod(c$,"set",
10285 function(a){
10286 this.i.set(java.util.Collections.checkType(a,this.type));
10287 },"~O");
10288 Clazz_defineMethod(c$,"add",
10289 function(a){
10290 this.i.add(java.util.Collections.checkType(a,this.type));
10291 },"~O");
10292 c$=Clazz_p0p();
10293 Clazz_pu$h(self.c$);
10294 c$=Clazz_decorateAsClass(function(){
10295 this.l=null;
10296 Clazz_instantialize(this,arguments);
10297 },java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);
10298 Clazz_makeConstructor(c$,
10299 function(a,b){
10300 Clazz_superConstructor(this,java.util.Collections.CheckedList,[a,b]);
10301 this.l=a;
10302 },"java.util.List,Class");
10303 Clazz_defineMethod(c$,"addAll",
10304 function(a,b){
10305 var c=b.size();
10306 if(c==0){
10307 return false;
10308 }var d=new Array(c);
10309 var e=b.iterator();
10310 for(var f=0;f<c;f++){
10311 d[f]=java.util.Collections.checkType(e.next(),this.type);
10312 }
10313 return this.l.addAll(a,java.util.Arrays.asList(d));
10314 },"~N,java.util.Collection");
10315 Clazz_defineMethod(c$,"get",
10316 function(a){
10317 return this.l.get(a);
10318 },"~N");
10319 Clazz_defineMethod(c$,"set",
10320 function(a,b){
10321 return this.l.set(a,java.util.Collections.checkType(b,this.type));
10322 },"~N,~O");
10323 Clazz_defineMethod(c$,"add",
10324 function(a,b){
10325 this.l.add(a,java.util.Collections.checkType(b,this.type));
10326 },"~N,~O");
10327 Clazz_defineMethod(c$,"remove",
10328 function(a){
10329 return this.l.remove(a);
10330 },"~N");
10331 Clazz_defineMethod(c$,"indexOf",
10332 function(a){
10333 return this.l.indexOf(a);
10334 },"~O");
10335 Clazz_defineMethod(c$,"lastIndexOf",
10336 function(a){
10337 return this.l.lastIndexOf(a);
10338 },"~O");
10339 //Clazz_defineMethod(c$,"listIterator",
10340 //function(){
10341 //return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type);
10342 //});
10343 Clazz_defineMethod(c$,"listIterator",
10344 function(a){
10345 a || (a = 0);
10346 return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type);
10347 },"~N");
10348 Clazz_defineMethod(c$,"subList",
10349 function(a,b){
10350 return java.util.Collections.checkedList(this.l.subList(a,b),this.type);
10351 },"~N,~N");
10352 Clazz_overrideMethod(c$,"equals",
10353 function(a){
10354 return this.l.equals(a);
10355 },"~O");
10356 Clazz_overrideMethod(c$,"hashcode",
10357 function(){
10358 return this.l.hashCode();
10359 });
10360 c$=Clazz_p0p();
10361 Clazz_pu$h(self.c$);
10362 c$=Clazz_declareType(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);
10363 c$=Clazz_p0p();
10364 Clazz_pu$h(self.c$);
10365 c$=Clazz_declareType(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);
10366 Clazz_overrideMethod(c$,"equals",
10367 function(a){
10368 return this.c.equals(a);
10369 },"~O");
10370 Clazz_overrideMethod(c$,"hashCode",
10371 function(){
10372 return this.c.hashCode();
10373 });
10374 c$=Clazz_p0p();
10375 Clazz_pu$h(self.c$);
10376 c$=Clazz_decorateAsClass(function(){
10377 this.m=null;
10378 this.keyType=null;
10379 this.valueType=null;
10380 Clazz_instantialize(this,arguments);
10381 },java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);
10382 Clazz_makeConstructor(c$,
10383 ($fz=function(a,b,c){
10384 if(a==null||b==null||c==null){
10385 throw new NullPointerException();
10386 }this.m=a;
10387 this.keyType=b;
10388 this.valueType=c;
10389 },$fz.isPrivate=true,$fz),"java.util.Map,Class,Class");
10390 Clazz_defineMethod(c$,"size",
10391 function(){
10392 return this.m.size();
10393 });
10394 Clazz_defineMethod(c$,"isEmpty",
10395 function(){
10396 return this.m.isEmpty();
10397 });
10398 Clazz_defineMethod(c$,"containsKey",
10399 function(a){
10400 return this.m.containsKey(a);
10401 },"~O");
10402 Clazz_defineMethod(c$,"containsValue",
10403 function(a){
10404 return this.m.containsValue(a);
10405 },"~O");
10406 Clazz_defineMethod(c$,"get",
10407 function(a){
10408 return this.m.get(a);
10409 },"~O");
10410 Clazz_defineMethod(c$,"put",
10411 function(a,b){
10412 return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,this.valueType));
10413 },"~O,~O");
10414 Clazz_defineMethod(c$,"remove",
10415 function(a){
10416 return this.m.remove(a);
10417 },"~O");
10418 Clazz_overrideMethod(c$,"putAll",
10419 function(a){
10420 var b=a.size();
10421 if(b==0){
10422 return;
10423 }var c=new Array(b);
10424 var d=a.entrySet().iterator();
10425 for(var e=0;e<b;e++){
10426 var f=d.next();
10427 java.util.Collections.checkType(f.getKey(),this.keyType);
10428 java.util.Collections.checkType(f.getValue(),this.valueType);
10429 c[e]=f;
10430 }
10431 for(var f=0;f<b;f++){
10432 this.m.put(c[f].getKey(),c[f].getValue());
10433 }
10434 },"java.util.Map");
10435 Clazz_defineMethod(c$,"clear",
10436 function(){
10437 this.m.clear();
10438 });
10439 Clazz_defineMethod(c$,"keySet",
10440 function(){
10441 return this.m.keySet();
10442 });
10443 Clazz_defineMethod(c$,"values",
10444 function(){
10445 return this.m.values();
10446 });
10447 Clazz_defineMethod(c$,"entrySet",
10448 function(){
10449 return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType);
10450 });
10451 Clazz_overrideMethod(c$,"equals",
10452 function(a){
10453 return this.m.equals(a);
10454 },"~O");
10455 Clazz_overrideMethod(c$,"hashcode",
10456 function(){
10457 return this.m.hashCode();
10458 });
10459 Clazz_defineMethod(c$,"toString",
10460 function(){
10461 return this.m.toString();
10462 });
10463 Clazz_pu$h(self.c$);
10464 c$=Clazz_decorateAsClass(function(){
10465 this.e=null;
10466 this.valueType=null;
10467 Clazz_instantialize(this,arguments);
10468 },java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);
10469 Clazz_makeConstructor(c$,
10470 function(a,b){
10471 if(a==null){
10472 throw new NullPointerException();
10473 }this.e=a;
10474 this.valueType=b;
10475 },"java.util.Map.Entry,Class");
10476 Clazz_defineMethod(c$,"getKey",
10477 function(){
10478 return this.e.getKey();
10479 });
10480 Clazz_defineMethod(c$,"getValue",
10481 function(){
10482 return this.e.getValue();
10483 });
10484 Clazz_defineMethod(c$,"setValue",
10485 function(a){
10486 return this.e.setValue(java.util.Collections.checkType(a,this.valueType));
10487 },"~O");
10488 Clazz_overrideMethod(c$,"equals",
10489 function(a){
10490 return this.e.equals(a);
10491 },"~O");
10492 Clazz_overrideMethod(c$,"hashcode",
10493 function(){
10494 return this.e.hashCode();
10495 });
10496 c$=Clazz_p0p();
10497 Clazz_pu$h(self.c$);
10498 c$=Clazz_decorateAsClass(function(){
10499 this.s=null;
10500 this.valueType=null;
10501 Clazz_instantialize(this,arguments);
10502 },java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);
10503 Clazz_makeConstructor(c$,
10504 function(a,b){
10505 this.s=a;
10506 this.valueType=b;
10507 },"java.util.Set,Class");
10508 Clazz_defineMethod(c$,"iterator",
10509 function(){
10510 return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType);
10511 });
10512 Clazz_defineMethod(c$,"toArray",
10513 function(){
10514 var a=this.size();
10515 var b=new Array(a);
10516 var c=this.iterator();
10517 for(var d=0;d<a;d++){
10518 b[d]=c.next();
10519 }
10520 return b;
10521 });
10522 Clazz_defineMethod(c$,"toArray",
10523 function(a){
10524 var b=this.size();
10525 if(a.length<b){
10526 var c=a.getClass().getComponentType();
10527 a=java.lang.reflect.Array.newInstance(c,b);
10528 }var c=this.iterator();
10529 for(var d=0;d<b;d++){
10530 a[d]=c.next();
10531 }
10532 if(b<a.length){
10533 a[b]=null;
10534 }return a;
10535 },"~A");
10536 Clazz_defineMethod(c$,"retainAll",
10537 function(a){
10538 return this.s.retainAll(a);
10539 },"java.util.Collection");
10540 Clazz_defineMethod(c$,"removeAll",
10541 function(a){
10542 return this.s.removeAll(a);
10543 },"java.util.Collection");
10544 Clazz_defineMethod(c$,"containsAll",
10545 function(a){
10546 return this.s.containsAll(a);
10547 },"java.util.Collection");
10548 Clazz_overrideMethod(c$,"addAll",
10549 function(a){
10550 throw new UnsupportedOperationException();
10551 },"java.util.Collection");
10552 Clazz_defineMethod(c$,"remove",
10553 function(a){
10554 return this.s.remove(a);
10555 },"~O");
10556 Clazz_defineMethod(c$,"contains",
10557 function(a){
10558 return this.s.contains(a);
10559 },"~O");
10560 Clazz_overrideMethod(c$,"add",
10561 function(a){
10562 throw new UnsupportedOperationException();
10563 },"java.util.Map.Entry");
10564 Clazz_defineMethod(c$,"isEmpty",
10565 function(){
10566 return this.s.isEmpty();
10567 });
10568 Clazz_defineMethod(c$,"clear",
10569 function(){
10570 this.s.clear();
10571 });
10572 Clazz_defineMethod(c$,"size",
10573 function(){
10574 return this.s.size();
10575 });
10576 Clazz_overrideMethod(c$,"hashcode",
10577 function(){
10578 return this.s.hashCode();
10579 });
10580 Clazz_overrideMethod(c$,"equals",
10581 function(a){
10582 return this.s.equals(a);
10583 },"~O");
10584 Clazz_pu$h(self.c$);
10585 c$=Clazz_decorateAsClass(function(){
10586 this.i=null;
10587 this.valueType=null;
10588 Clazz_instantialize(this,arguments);
10589 },java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);
10590 Clazz_makeConstructor(c$,
10591 function(a,b){
10592 this.i=a;
10593 this.valueType=b;
10594 },"java.util.Iterator,Class");
10595 Clazz_defineMethod(c$,"hasNext",
10596 function(){
10597 return this.i.hasNext();
10598 });
10599 Clazz_defineMethod(c$,"remove",
10600 function(){
10601 this.i.remove();
10602 });
10603 Clazz_defineMethod(c$,"next",
10604 function(){
10605 return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType);
10606 });
10607 c$=Clazz_p0p();
10608 c$=Clazz_p0p();
10609 c$=Clazz_p0p();
10610 Clazz_pu$h(self.c$);
10611 c$=Clazz_decorateAsClass(function(){
10612 this.ss=null;
10613 Clazz_instantialize(this,arguments);
10614 },java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);
10615 Clazz_makeConstructor(c$,
10616 function(a,b){
10617 Clazz_superConstructor(this,java.util.Collections.CheckedSortedSet,[a,b]);
10618 this.ss=a;
10619 },"java.util.SortedSet,Class");
10620 Clazz_defineMethod(c$,"comparator",
10621 function(){
10622 return this.ss.comparator();
10623 });
10624 Clazz_defineMethod(c$,"subSet",
10625 function(a,b){
10626 return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),this.type);
10627 },"~O,~O");
10628 Clazz_defineMethod(c$,"headSet",
10629 function(a){
10630 return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type);
10631 },"~O");
10632 Clazz_defineMethod(c$,"tailSet",
10633 function(a){
10634 return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type);
10635 },"~O");
10636 Clazz_defineMethod(c$,"first",
10637 function(){
10638 return this.ss.first();
10639 });
10640 Clazz_defineMethod(c$,"last",
10641 function(){
10642 return this.ss.last();
10643 });
10644 c$=Clazz_p0p();
10645 Clazz_pu$h(self.c$);
10646 c$=Clazz_decorateAsClass(function(){
10647 this.sm=null;
10648 Clazz_instantialize(this,arguments);
10649 },java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);
10650 Clazz_makeConstructor(c$,
10651 function(a,b,c){
10652 Clazz_superConstructor(this,java.util.Collections.CheckedSortedMap,[a,b,c]);
10653 this.sm=a;
10654 },"java.util.SortedMap,Class,Class");
10655 Clazz_defineMethod(c$,"comparator",
10656 function(){
10657 return this.sm.comparator();
10658 });
10659 Clazz_defineMethod(c$,"subMap",
10660 function(a,b){
10661 return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),this.keyType,this.valueType);
10662 },"~O,~O");
10663 Clazz_defineMethod(c$,"headMap",
10664 function(a){
10665 return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType);
10666 },"~O");
10667 Clazz_defineMethod(c$,"tailMap",
10668 function(a){
10669 return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType);
10670 },"~O");
10671 Clazz_defineMethod(c$,"firstKey",
10672 function(){
10673 return this.sm.firstKey();
10674 });
10675 Clazz_defineMethod(c$,"lastKey",
10676 function(){
10677 return this.sm.lastKey();
10678 });
10679 c$=Clazz_p0p();
10680 c$.EMPTY_LIST=c$.prototype.EMPTY_LIST=new java.util.Collections.EmptyList();
10681 c$.EMPTY_SET=c$.prototype.EMPTY_SET=new java.util.Collections.EmptySet();
10682 c$.EMPTY_MAP=c$.prototype.EMPTY_MAP=new java.util.Collections.EmptyMap();
10683 });
10684 Clazz_load(["java.util.Map"],"java.util.SortedMap",null,function(){
10685 Clazz_declareInterface(java.util,"SortedMap",java.util.Map);
10686 });
10687 Clazz_load(["java.util.Set"],"java.util.SortedSet",null,function(){
10688 Clazz_declareInterface(java.util,"SortedSet",java.util.Set);
10689 });
10690 Clazz_load(null,"java.util.Random",["java.lang.IllegalArgumentException"],function(){
10691 c$=Clazz_decorateAsClass(function(){
10692 this.haveNextNextGaussian=false;
10693 this.seed=0;
10694 this.nextNextGaussian=0;
10695 Clazz_instantialize(this,arguments);
10696 },java.util,"Random",null,java.io.Serializable);
10697 Clazz_makeConstructor(c$,
10698 function(){
10699 this.setSeed(System.currentTimeMillis());
10700 });
10701 Clazz_makeConstructor(c$,
10702 function(seed){
10703 this.setSeed(seed);
10704 },"~N");
10705 Clazz_defineMethod(c$,"next",
10706 function(bits){
10707 this.seed=(this.seed*25214903917+0xb)&(281474976710655);
10708 return(this.seed>>>(48-bits));
10709 },"~N");
10710 Clazz_defineMethod(c$,"nextBoolean",
10711 function(){
10712 return Math.random()>0.5;
10713 });
10714 Clazz_defineMethod(c$,"nextBytes",
10715 function(buf){
10716 for(var i=0;i<bytes.length;i++){
10717 bytes[i]=Math.round(0x100*Math.random());
10718 }
10719 },"~A");
10720 Clazz_defineMethod(c$,"nextDouble",
10721 function(){
10722 return Math.random();
10723 });
10724 Clazz_defineMethod(c$,"nextFloat",
10725 function(){
10726 return Math.random();
10727 });
10728 Clazz_defineMethod(c$,"nextGaussian",
10729 function(){
10730 if(this.haveNextNextGaussian){
10731 this.haveNextNextGaussian=false;
10732 return this.nextNextGaussian;
10733 }var v1;
10734 var v2;
10735 var s;
10736 do{
10737 v1=2*this.nextDouble()-1;
10738 v2=2*this.nextDouble()-1;
10739 s=v1*v1+v2*v2;
10740 }while(s>=1);
10741 var norm=Math.sqrt(-2*Math.log(s)/s);
10742 this.nextNextGaussian=v2*norm;
10743 this.haveNextNextGaussian=true;
10744 return v1*norm;
10745 });
10746 Clazz_defineMethod(c$,"nextInt",
10747 function(){
10748 return Math.ceil(0xffff*Math.random())-0x8000;
10749 });
10750 Clazz_defineMethod(c$,"nextInt",
10751 function(n){
10752 if(n>0){
10753 n = Math.min(n, 31);
10754 return Math.floor((2 << (n - 1)) * Math.random())
10755
10756 /*
10757 if((n&-n)==n){
10758 return((n*this.next(31))>>31);
10759 }var bits;
10760 var val;
10761 do{
10762 bits=this.next(31);
10763 val=bits%n;
10764 }while(bits-val+(n-1)<0);
10765
10766
10767 return val;
10768
10769 */
10770 }
10771 throw new IllegalArgumentException();
10772 },"~N");
10773 Clazz_defineMethod(c$,"nextLong",
10774 function(){
10775 return Math.ceil(0xffffffff*Math.random())-0x80000000;
10776 });
10777 Clazz_defineMethod(c$,"setSeed",
10778 function(seed){
10779 Math.seedrandom(seed);
10780 //this.seed=(seed^25214903917)&(281474976710655);
10781 //this.haveNextNextGaussian=false;
10782 },"~N");
10783 Clazz_defineStatics(c$,
10784 "multiplier",0x5deece66d);
10785 });
10786
10787 // seedrandom.js
10788 // Author: David Bau 3/11/2010
10789 //
10790 // Defines a method Math.seedrandom() that, when called, substitutes
10791 // an explicitly seeded RC4-based algorithm for Math.random().  Also
10792 // supports automatic seeding from local or network sources of entropy.
10793 //
10794 // Usage:
10795 //
10796 //   <script src=http://davidbau.com/encode/seedrandom-min.js></script>
10797 //
10798 //   Math.seedrandom('yipee'); Sets Math.random to a function that is
10799 //                             initialized using the given explicit seed.
10800 //
10801 //   Math.seedrandom();        Sets Math.random to a function that is
10802 //                             seeded using the current time, dom state,
10803 //                             and other accumulated local entropy.
10804 //                             The generated seed string is returned.
10805 //
10806 //   Math.seedrandom('yowza', true);
10807 //                             Seeds using the given explicit seed mixed
10808 //                             together with accumulated entropy.
10809 //
10810 //   <script src="http://bit.ly/srandom-512"></script>
10811 //                             Seeds using physical random bits downloaded
10812 //                             from random.org.
10813 //
10814 // Examples:
10815 //
10816 //   Math.seedrandom("hello");            // Use "hello" as the seed.
10817 //   document.write(Math.random());       // Always 0.5463663768140734
10818 //   document.write(Math.random());       // Always 0.43973793770592234
10819 //   var rng1 = Math.random;              // Remember the current prng.
10820 //
10821 //   var autoseed = Math.seedrandom();    // New prng with an automatic seed.
10822 //   document.write(Math.random());       // Pretty much unpredictable.
10823 //
10824 //   Math.random = rng1;                  // Continue "hello" prng sequence.
10825 //   document.write(Math.random());       // Always 0.554769432473455
10826 //
10827 //   Math.seedrandom(autoseed);           // Restart at the previous seed.
10828 //   document.write(Math.random());       // Repeat the 'unpredictable' value.
10829 //
10830 // Notes:
10831 //
10832 // Each time seedrandom('arg') is called, entropy from the passed seed
10833 // is accumulated in a pool to help generate future seeds for the
10834 // zero-argument form of Math.seedrandom, so entropy can be injected over
10835 // time by calling seedrandom with explicit data repeatedly.
10836 //
10837 // On speed - This javascript implementation of Math.random() is about
10838 // 3-10x slower than the built-in Math.random() because it is not native
10839 // code, but this is typically fast enough anyway.  Seeding is more expensive,
10840 // especially if you use auto-seeding.  Some details (timings on Chrome 4):
10841 //
10842 // Our Math.random()            - avg less than 0.002 milliseconds per call
10843 // seedrandom('explicit')       - avg less than 0.5 milliseconds per call
10844 // seedrandom('explicit', true) - avg less than 2 milliseconds per call
10845 // seedrandom()                 - avg about 38 milliseconds per call
10846 //
10847 // LICENSE (BSD):
10848 //
10849 // Copyright 2010 David Bau, all rights reserved.
10850 //
10851 // Redistribution and use in source and binary forms, with or without
10852 // modification, are permitted provided that the following conditions are met:
10853 //
10854 //   1. Redistributions of source code must retain the above copyright
10855 //      notice, this list of conditions and the following disclaimer.
10856 //
10857 //   2. Redistributions in binary form must reproduce the above copyright
10858 //      notice, this list of conditions and the following disclaimer in the
10859 //      documentation and/or other materials provided with the distribution.
10860 //
10861 //   3. Neither the name of this module nor the names of its contributors may
10862 //      be used to endorse or promote products derived from this software
10863 //      without specific prior written permission.
10864 //
10865 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10866 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10867 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10868 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10869 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10870 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10871 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10872 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10873 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10874 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10875 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10876 //
10877 /**
10878  * All code is in an anonymous closure to keep the global namespace clean.
10879  *
10880  * @param {number=} overflow
10881  * @param {number=} startdenom
10882  */
10883 (function (pool, math, width, chunks, significance, overflow, startdenom) {
10884
10885 var copyright = "Copyright 2010 David Bau, all rights reserved. (BSD)"
10886 //
10887 // seedrandom()
10888 // This is the seedrandom function described above.
10889 //
10890 math['seedrandom'] = function seedrandom(seed, use_entropy) {
10891   var key = [];
10892   var arc4;
10893
10894   // Flatten the seed string or build one from local entropy if needed.
10895   seed = mixkey(flatten(
10896     use_entropy ? [seed, pool] :
10897     arguments.length ? seed :
10898     [new Date().getTime(), pool, window], 3), key);
10899
10900   // Use the seed to initialize an ARC4 generator.
10901   arc4 = new ARC4(key);
10902
10903   // Mix the randomness into accumulated entropy.
10904   mixkey(arc4.S, pool);
10905
10906   // Override Math.random
10907
10908   // This function returns a random double in [0, 1) that contains
10909   // randomness in every bit of the mantissa of the IEEE 754 value.
10910
10911   math['random'] = function random() {  // Closure to return a random double:
10912     var n = arc4.g(chunks);             // Start with a numerator n < 2 ^ 48
10913     var d = startdenom;                 //   and denominator d = 2 ^ 48.
10914     var x = 0;                          //   and no 'extra last byte'.
10915     while (n < significance) {          // Fill up all significant digits by
10916       n = (n + x) * width;              //   shifting numerator and
10917       d *= width;                       //   denominator and generating a
10918       x = arc4.g(1);                    //   new least-significant-byte.
10919     }
10920     while (n >= overflow) {             // To avoid rounding up, before adding
10921       n /= 2;                           //   last byte, shift everything
10922       d /= 2;                           //   right using integer math until
10923       x >>>= 1;                         //   we have exactly the desired bits.
10924     }
10925     return (n + x) / d;                 // Form the number within [0, 1).
10926   };
10927
10928   // Return the seed that was used
10929   return seed;
10930 };
10931
10932 //
10933 // ARC4
10934 //
10935 // An ARC4 implementation.  The constructor takes a key in the form of
10936 // an array of at most (width) integers that should be 0 <= x < (width).
10937 //
10938 // The g(count) method returns a pseudorandom integer that concatenates
10939 // the next (count) outputs from ARC4.  Its return value is a number x
10940 // that is in the range 0 <= x < (width ^ count).
10941 //
10942 /** @constructor */
10943 function ARC4(key) {
10944   var t, u, me = this, keylen = key.length;
10945   var i = 0, j = me.i = me.j = me.m = 0;
10946   me.S = [];
10947   me.c = [];
10948
10949   // The empty key [] is treated as [0].
10950   if (!keylen) { key = [keylen++]; }
10951
10952   // Set up S using the standard key scheduling algorithm.
10953   while (i < width) { me.S[i] = i++; }
10954   for (i = 0; i < width; i++) {
10955     t = me.S[i];
10956     j = lowbits(j + t + key[i % keylen]);
10957     u = me.S[j];
10958     me.S[i] = u;
10959     me.S[j] = t;
10960   }
10961
10962   // The "g" method returns the next (count) outputs as one number.
10963   me.g = function getnext(count) {
10964     var s = me.S;
10965     var i = lowbits(me.i + 1); var t = s[i];
10966     var j = lowbits(me.j + t); var u = s[j];
10967     s[i] = u;
10968     s[j] = t;
10969     var r = s[lowbits(t + u)];
10970     while (--count) {
10971       i = lowbits(i + 1); t = s[i];
10972       j = lowbits(j + t); u = s[j];
10973       s[i] = u;
10974       s[j] = t;
10975       r = r * width + s[lowbits(t + u)];
10976     }
10977     me.i = i;
10978     me.j = j;
10979     return r;
10980   };
10981   // For robust unpredictability discard an initial batch of values.
10982   // See http://www.rsa.com/rsalabs/node.asp?id=2009
10983   me.g(width);
10984 }
10985
10986 //
10987 // flatten()
10988 // Converts an object tree to nested arrays of strings.
10989 //
10990 /** @param {Object=} result
10991   * @param {string=} prop */
10992 function flatten(obj, depth, result, prop) {
10993   result = [];
10994   if (depth && typeof(obj) == 'object') {
10995     for (prop in obj) {
10996       if (prop.indexOf('S') < 5) {    // Avoid FF3 bug (local/sessionStorage)
10997         try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
10998       }
10999     }
11000   }
11001   return result.length ? result : '' + obj;
11002 }
11003
11004 //
11005 // mixkey()
11006 // Mixes a string seed into a key that is an array of integers, and
11007 // returns a shortened string seed that is equivalent to the result key.
11008 //
11009 /** @param {number=} smear
11010   * @param {number=} j */
11011 function mixkey(seed, key, smear, j) {
11012   seed += '';                         // Ensure the seed is a string
11013   smear = 0;
11014   for (j = 0; j < seed.length; j++) {
11015     key[lowbits(j)] =
11016       lowbits((smear ^= key[lowbits(j)] * 19) + seed.charCodeAt(j));
11017   }
11018   seed = '';
11019   for (j in key) { seed += String.fromCharCode(key[j]); }
11020   return seed;
11021 }
11022
11023 //
11024 // lowbits()
11025 // A quick "n mod width" for width a power of 2.
11026 //
11027 function lowbits(n) { return n & (width - 1); }
11028
11029 //
11030 // The following constants are related to IEEE 754 limits.
11031 //
11032 startdenom = math.pow(width, chunks);
11033 significance = math.pow(2, significance);
11034 overflow = significance * 2;
11035
11036 //
11037 // When seedrandom.js is loaded, we immediately mix a few bits
11038 // from the built-in RNG into the entropy pool.  Because we do
11039 // not want to intefere with determinstic PRNG state later,
11040 // seedrandom will not call math.random on its own again after
11041 // initialization.
11042 //
11043 mixkey(math.random(), pool);
11044
11045 // End anonymous scope, and pass initial values.
11046 })(
11047   [],   // pool: entropy pool starts empty
11048   Math, // math: package containing random, pow, and seedrandom
11049   256,  // width: each RC4 output is 0 <= x < 256
11050   6,    // chunks: at least six RC4 outputs for each double
11051   52    // significance: there are 52 significant digits in a double
11052 );
11053
11054 Clazz_declarePackage ("java.awt.event");
11055 Clazz_load (["java.util.EventListenerProxy", "java.awt.event.AWTEventListener"], "java.awt.event.AWTEventListenerProxy", null, function () {
11056 c$ = Clazz_decorateAsClass (function () {
11057 this.eventMask = 0;
11058 Clazz_instantialize (this, arguments);
11059 }, java.awt.event, "AWTEventListenerProxy", java.util.EventListenerProxy, java.awt.event.AWTEventListener);
11060 Clazz_makeConstructor (c$, 
11061 function (eventMask, listener) {
11062 Clazz_superConstructor (this, java.awt.event.AWTEventListenerProxy, [listener]);
11063 this.eventMask = eventMask;
11064 }, "~N,java.awt.event.AWTEventListener");
11065 Clazz_defineMethod (c$, "eventDispatched", 
11066 function (evt) {
11067 (this.getListener ()).eventDispatched (evt);
11068 }, "java.awt.AWTEvent");
11069 Clazz_defineMethod (c$, "getEventMask", 
11070 function () {
11071 return this.eventMask;
11072 });
11073 });
11074 Clazz_declarePackage ("java.beans");
11075 Clazz_load (["java.beans.ChangeListenerMap"], "java.beans.PropertyChangeSupport", ["java.lang.Boolean", "$.NullPointerException", "java.beans.IndexedPropertyChangeEvent", "$.PropertyChangeEvent", "$.PropertyChangeListenerProxy"], function () {
11076 c$ = Clazz_decorateAsClass (function () {
11077 this.map = null;
11078 this.source = null;
11079 Clazz_instantialize (this, arguments);
11080 }, java.beans, "PropertyChangeSupport");
11081 Clazz_prepareFields (c$, function () {
11082 this.map =  new java.beans.PropertyChangeSupport.PropertyChangeListenerMap ();
11083 });
11084 Clazz_makeConstructor (c$, 
11085 function (sourceBean) {
11086 if (sourceBean == null) {
11087 throw  new NullPointerException ();
11088 }this.source = sourceBean;
11089 }, "~O");
11090 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11091 function (listener) {
11092 this.addPropertyChangeListener1 (listener);
11093 }, "java.beans.PropertyChangeListener");
11094 Clazz_defineMethod (c$, "addPropertyChangeListener1", 
11095 function (listener) {
11096 if (listener == null) {
11097 return;
11098 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11099 var proxy = listener;
11100 this.addPropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11101 } else {
11102 this.map.add (null, listener);
11103 }}, "java.beans.PropertyChangeListener");
11104 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11105 function (listener) {
11106 if (listener == null) {
11107 return;
11108 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11109 var proxy = listener;
11110 this.removePropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11111 } else {
11112 this.map.remove (null, listener);
11113 }}, "java.beans.PropertyChangeListener");
11114 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11115 function () {
11116 return this.map.getListeners ();
11117 });
11118 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11119 function (propertyName, listener) {
11120 {
11121 if (arguments.length == 1) {
11122 this.addPropertyChangeListener1(propertyName);
11123 return;
11124 }
11125 }this.addPropertyChangeListener2 (propertyName, listener);
11126 }, "~S,java.beans.PropertyChangeListener");
11127 Clazz_defineMethod (c$, "addPropertyChangeListener2", 
11128 function (propertyName, listener) {
11129 if (listener == null || propertyName == null) {
11130 return;
11131 }listener = this.map.extract (listener);
11132 if (listener != null) {
11133 this.map.add (propertyName, listener);
11134 }}, "~S,java.beans.PropertyChangeListener");
11135 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11136 function (propertyName, listener) {
11137 if (listener == null || propertyName == null) {
11138 return;
11139 }listener = this.map.extract (listener);
11140 if (listener != null) {
11141 this.map.remove (propertyName, listener);
11142 }}, "~S,java.beans.PropertyChangeListener");
11143 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11144 function (propertyName) {
11145 return this.map.getListeners (propertyName);
11146 }, "~S");
11147 Clazz_defineMethod (c$, "firePropertyChange", 
11148 function (propertyName, oldValue, newValue) {
11149 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11150 return;
11151 }this.firePropertyChangeEvt ( new java.beans.PropertyChangeEvent (this.source, propertyName, oldValue, newValue));
11152 }, "~S,~O,~O");
11153 Clazz_defineMethod (c$, "firePropertyChange", 
11154 function (propertyName, oldValue, newValue) {
11155 if (oldValue == newValue) {
11156 return;
11157 }this.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11158 }, "~S,~N,~N");
11159 Clazz_defineMethod (c$, "firePropertyChange", 
11160 function (propertyName, oldValue, newValue) {
11161 if (oldValue == newValue) {
11162 return;
11163 }this.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11164 }, "~S,~B,~B");
11165 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
11166 function (evt) {
11167 var oldValue = evt.getOldValue ();
11168 var newValue = evt.getNewValue ();
11169 var propertyName = evt.getPropertyName ();
11170 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11171 return;
11172 }var common = this.map.get (null);
11173 var named = (propertyName != null) ? this.map.get (propertyName) : null;
11174 this.fire (common, evt);
11175 this.fire (named, evt);
11176 }, "java.beans.PropertyChangeEvent");
11177 Clazz_defineMethod (c$, "fire", 
11178  function (listeners, event) {
11179 if (listeners != null) {
11180 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11181 listener.propertyChange (event);
11182 }
11183 }}, "~A,java.beans.PropertyChangeEvent");
11184 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11185 function (propertyName, index, oldValue, newValue) {
11186 this.firePropertyChangeEvt ( new java.beans.IndexedPropertyChangeEvent (this.source, propertyName, oldValue, newValue, index));
11187 }, "~S,~N,~O,~O");
11188 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11189 function (propertyName, index, oldValue, newValue) {
11190 if (oldValue == newValue) {
11191 return;
11192 }this.fireIndexedPropertyChange (propertyName, index, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11193 }, "~S,~N,~N,~N");
11194 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11195 function (propertyName, index, oldValue, newValue) {
11196 if (oldValue == newValue) {
11197 return;
11198 }this.fireIndexedPropertyChange (propertyName, index, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11199 }, "~S,~N,~B,~B");
11200 Clazz_defineMethod (c$, "hasListeners", 
11201 function (propertyName) {
11202 return this.map.hasListeners (propertyName);
11203 }, "~S");
11204 Clazz_pu$h(self.c$);
11205 c$ = Clazz_declareType (java.beans.PropertyChangeSupport, "PropertyChangeListenerMap", java.beans.ChangeListenerMap);
11206 Clazz_overrideMethod (c$, "newArray", 
11207 function (a) {
11208 return (0 < a) ?  new Array (a) : java.beans.PropertyChangeSupport.PropertyChangeListenerMap.EMPTY;
11209 }, "~N");
11210 Clazz_overrideMethod (c$, "newProxy", 
11211 function (a, b) {
11212 return  new java.beans.PropertyChangeListenerProxy (a, b);
11213 }, "~S,java.beans.PropertyChangeListener");
11214 Clazz_defineStatics (c$,
11215 "EMPTY",  Clazz_newArray (-1, []));
11216 c$ = Clazz_p0p ();
11217 });
11218 Clazz_declarePackage ("java.beans");
11219 Clazz_load (null, "java.beans.ChangeListenerMap", ["java.util.ArrayList", "$.Collections", "$.EventListenerProxy", "$.HashMap"], function () {
11220 c$ = Clazz_decorateAsClass (function () {
11221 this.map = null;
11222 Clazz_instantialize (this, arguments);
11223 }, java.beans, "ChangeListenerMap");
11224 Clazz_defineMethod (c$, "add", 
11225 function (name, listener) {
11226 if (this.map == null) {
11227 this.map =  new java.util.HashMap ();
11228 }var array = this.map.get (name);
11229 var size = (array != null) ? array.length : 0;
11230 var clone = this.newArray (size + 1);
11231 clone[size] = listener;
11232 if (array != null) {
11233 System.arraycopy (array, 0, clone, 0, size);
11234 }this.map.put (name, clone);
11235 }, "~S,~O");
11236 Clazz_defineMethod (c$, "remove", 
11237 function (name, listener) {
11238 if (this.map != null) {
11239 var array = this.map.get (name);
11240 if (array != null) {
11241 for (var i = 0; i < array.length; i++) {
11242 if (listener.equals (array[i])) {
11243 var size = array.length - 1;
11244 if (size > 0) {
11245 var clone = this.newArray (size);
11246 System.arraycopy (array, 0, clone, 0, i);
11247 System.arraycopy (array, i + 1, clone, i, size - i);
11248 this.map.put (name, clone);
11249 } else {
11250 this.map.remove (name);
11251 if (this.map.isEmpty ()) {
11252 this.map = null;
11253 }}break;
11254 }}
11255 }}}, "~S,~O");
11256 Clazz_defineMethod (c$, "get", 
11257 function (name) {
11258 return (this.map != null) ? this.map.get (name) : null;
11259 }, "~S");
11260 Clazz_defineMethod (c$, "set", 
11261 function (name, listeners) {
11262 if (listeners != null) {
11263 if (this.map == null) {
11264 this.map =  new java.util.HashMap ();
11265 }this.map.put (name, listeners);
11266 } else if (this.map != null) {
11267 this.map.remove (name);
11268 if (this.map.isEmpty ()) {
11269 this.map = null;
11270 }}}, "~S,~A");
11271 Clazz_defineMethod (c$, "getListeners", 
11272 function () {
11273 if (this.map == null) {
11274 return this.newArray (0);
11275 }var list =  new java.util.ArrayList ();
11276 var listeners = this.map.get (null);
11277 if (listeners != null) {
11278 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11279 list.add (listener);
11280 }
11281 }for (var entry, $entry = this.map.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) {
11282 var name = entry.getKey ();
11283 if (name != null) {
11284 for (var listener, $listener = 0, $$listener = entry.getValue (); $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11285 list.add (this.newProxy (name, listener));
11286 }
11287 }}
11288 return list.toArray (this.newArray (list.size ()));
11289 });
11290 Clazz_defineMethod (c$, "getListeners", 
11291 function (name) {
11292 if (name != null) {
11293 var listeners = this.get (name);
11294 if (listeners != null) {
11295 return listeners.clone ();
11296 }}return this.newArray (0);
11297 }, "~S");
11298 Clazz_defineMethod (c$, "hasListeners", 
11299 function (name) {
11300 if (this.map == null) {
11301 return false;
11302 }var array = this.map.get (null);
11303 return (array != null) || ((name != null) && (null != this.map.get (name)));
11304 }, "~S");
11305 Clazz_defineMethod (c$, "getEntries", 
11306 function () {
11307 return (this.map != null) ? this.map.entrySet () : java.util.Collections.emptySet ();
11308 });
11309 Clazz_defineMethod (c$, "extract", 
11310 function (listener) {
11311 while (Clazz_instanceOf (listener, java.util.EventListenerProxy)) {
11312 var proxy = listener;
11313 listener = proxy.getListener ();
11314 }
11315 return listener;
11316 }, "~O");
11317 });
11318 Clazz_declarePackage ("java.beans");
11319 Clazz_load (["java.beans.PropertyChangeEvent"], "java.beans.IndexedPropertyChangeEvent", null, function () {
11320 c$ = Clazz_decorateAsClass (function () {
11321 this.index = 0;
11322 Clazz_instantialize (this, arguments);
11323 }, java.beans, "IndexedPropertyChangeEvent", java.beans.PropertyChangeEvent);
11324 Clazz_makeConstructor (c$, 
11325 function (source, propertyName, oldValue, newValue, index) {
11326 Clazz_superConstructor (this, java.beans.IndexedPropertyChangeEvent, [source, propertyName, oldValue, newValue]);
11327 this.index = index;
11328 }, "~O,~S,~O,~O,~N");
11329 Clazz_defineMethod (c$, "getIndex", 
11330 function () {
11331 return this.index;
11332 });
11333 });
11334 Clazz_declarePackage ("java.beans");
11335 Clazz_load (["java.util.EventObject"], "java.beans.PropertyChangeEvent", null, function () {
11336 c$ = Clazz_decorateAsClass (function () {
11337 this.propertyName = null;
11338 this.newValue = null;
11339 this.oldValue = null;
11340 this.propagationId = null;
11341 Clazz_instantialize (this, arguments);
11342 }, java.beans, "PropertyChangeEvent", java.util.EventObject);
11343 Clazz_makeConstructor (c$, 
11344 function (source, propertyName, oldValue, newValue) {
11345 Clazz_superConstructor (this, java.beans.PropertyChangeEvent, [source]);
11346 this.propertyName = propertyName;
11347 this.newValue = newValue;
11348 this.oldValue = oldValue;
11349 }, "~O,~S,~O,~O");
11350 Clazz_defineMethod (c$, "getPropertyName", 
11351 function () {
11352 return this.propertyName;
11353 });
11354 Clazz_defineMethod (c$, "getNewValue", 
11355 function () {
11356 return this.newValue;
11357 });
11358 Clazz_defineMethod (c$, "getOldValue", 
11359 function () {
11360 return this.oldValue;
11361 });
11362 Clazz_defineMethod (c$, "setPropagationId", 
11363 function (propagationId) {
11364 this.propagationId = propagationId;
11365 }, "~O");
11366 Clazz_defineMethod (c$, "getPropagationId", 
11367 function () {
11368 return this.propagationId;
11369 });
11370 });
11371 Clazz_declarePackage ("java.beans");
11372 Clazz_load (["java.util.EventListenerProxy", "java.beans.PropertyChangeListener"], "java.beans.PropertyChangeListenerProxy", null, function () {
11373 c$ = Clazz_decorateAsClass (function () {
11374 this.propertyName = null;
11375 Clazz_instantialize (this, arguments);
11376 }, java.beans, "PropertyChangeListenerProxy", java.util.EventListenerProxy, java.beans.PropertyChangeListener);
11377 Clazz_makeConstructor (c$, 
11378 function (propertyName, listener) {
11379 Clazz_superConstructor (this, java.beans.PropertyChangeListenerProxy, [listener]);
11380 this.propertyName = propertyName;
11381 }, "~S,java.beans.PropertyChangeListener");
11382 Clazz_defineMethod (c$, "propertyChange", 
11383 function (evt) {
11384 (this.getListener ()).propertyChange (evt);
11385 }, "java.beans.PropertyChangeEvent");
11386 Clazz_defineMethod (c$, "getPropertyName", 
11387 function () {
11388 return this.propertyName;
11389 });
11390 });
11391 Clazz_declarePackage ("java.beans");
11392 Clazz_load (["java.util.EventListener"], "java.beans.PropertyChangeListener", null, function () {
11393 Clazz_declareInterface (java.beans, "PropertyChangeListener", java.util.EventListener);
11394 });
11395 Clazz_declarePackage ("java.security");
11396 Clazz_declareInterface (java.security, "PrivilegedAction");
11397 Clazz_declarePackage ("java.awt");
11398 Clazz_load (["java.awt.geom.Point2D"], "java.awt.Point", null, function () {
11399 c$ = Clazz_decorateAsClass (function () {
11400 this.x = 0;
11401 this.y = 0;
11402 Clazz_instantialize (this, arguments);
11403 }, java.awt, "Point", java.awt.geom.Point2D);
11404 Clazz_makeConstructor (c$, 
11405 function () {
11406 this.construct (0, 0);
11407 });
11408 Clazz_makeConstructor (c$, 
11409 function (p) {
11410 this.construct (p.x, p.y);
11411 }, "java.awt.Point");
11412 Clazz_makeConstructor (c$, 
11413 function (x, y) {
11414 Clazz_superConstructor (this, java.awt.Point, []);
11415 this.x = x;
11416 this.y = y;
11417 }, "~N,~N");
11418 Clazz_overrideMethod (c$, "getX", 
11419 function () {
11420 return this.x;
11421 });
11422 Clazz_overrideMethod (c$, "getY", 
11423 function () {
11424 return this.y;
11425 });
11426 Clazz_defineMethod (c$, "getLocation", 
11427 function () {
11428 return  new java.awt.Point (this.x, this.y);
11429 });
11430 Clazz_defineMethod (c$, "setLocation", 
11431 function (p) {
11432 this.setLocation (p.x, p.y);
11433 }, "java.awt.Point");
11434 Clazz_defineMethod (c$, "setLocation", 
11435 function (x, y) {
11436 this.x = Clazz_doubleToInt (Math.floor (x + 0.5));
11437 this.y = Clazz_doubleToInt (Math.floor (y + 0.5));
11438 }, "~N,~N");
11439 Clazz_defineMethod (c$, "move", 
11440 function (x, y) {
11441 this.x = x;
11442 this.y = y;
11443 }, "~N,~N");
11444 Clazz_defineMethod (c$, "translate", 
11445 function (dx, dy) {
11446 this.x += dx;
11447 this.y += dy;
11448 }, "~N,~N");
11449 Clazz_defineMethod (c$, "equals", 
11450 function (obj) {
11451 if (Clazz_instanceOf (obj, java.awt.Point)) {
11452 var pt = obj;
11453 return (this.x == pt.x) && (this.y == pt.y);
11454 }return Clazz_superCall (this, java.awt.Point, "equals", [obj]);
11455 }, "~O");
11456 Clazz_overrideMethod (c$, "toString", 
11457 function () {
11458 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + "]";
11459 });
11460 });
11461 Clazz_declarePackage ("jssun.awt");
11462 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 () {
11463 c$ = Clazz_decorateAsClass (function () {
11464 this.table = null;
11465 this.threadGroup = null;
11466 this.changeSupport = null;
11467 this.$isDisposed = false;
11468 this.mostRecentKeyValue = null;
11469 this.shadowMostRecentKeyValue = null;
11470 Clazz_instantialize (this, arguments);
11471 }, jssun.awt, "AppContext");
11472 Clazz_prepareFields (c$, function () {
11473 this.table =  new java.util.HashMap ();
11474 });
11475 c$.getAppContexts = Clazz_defineMethod (c$, "getAppContexts", 
11476 function () {
11477 return  new java.util.HashSet (jssun.awt.AppContext.threadGroup2appContext.values ());
11478 });
11479 Clazz_defineMethod (c$, "isDisposed", 
11480 function () {
11481 return this.$isDisposed;
11482 });
11483 Clazz_makeConstructor (c$, 
11484 function (threadGroup) {
11485 jssun.awt.AppContext.numAppContexts++;
11486 this.threadGroup = threadGroup;
11487 jssun.awt.AppContext.threadGroup2appContext.put (threadGroup, this);
11488 }, "ThreadGroup");
11489 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
11490 function () {
11491 var currentThread = Thread.currentThread ();
11492 var appContext = null;
11493 var recent = jssun.awt.AppContext.mostRecentThreadAppContext;
11494 if ((recent != null) && (recent.thread === currentThread)) {
11495 appContext = recent.appContext;
11496 } else {
11497 var currentThreadGroup = currentThread.getThreadGroup ();
11498 var threadGroup = currentThreadGroup;
11499 appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11500 while (appContext == null) {
11501 threadGroup = threadGroup.getParent ();
11502 if (threadGroup == null) {
11503 return null;
11504 }appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11505 }
11506 for (var tg = currentThreadGroup; tg !== threadGroup; tg = tg.getParent ()) {
11507 jssun.awt.AppContext.threadGroup2appContext.put (tg, appContext);
11508 }
11509 jssun.awt.AppContext.mostRecentThreadAppContext =  new jssun.awt.MostRecentThreadAppContext (currentThread, appContext);
11510 }return appContext;
11511 });
11512 c$.isMainContext = Clazz_defineMethod (c$, "isMainContext", 
11513 function (ctx) {
11514 return false;
11515 }, "jssun.awt.AppContext");
11516 Clazz_defineMethod (c$, "dispose", 
11517 function () {
11518 });
11519 Clazz_defineMethod (c$, "get", 
11520 function (key) {
11521 {
11522 var recent = this.mostRecentKeyValue;
11523 if ((recent != null) && (recent.key === key)) {
11524 return recent.value;
11525 }var value = this.table.get (key);
11526 if (this.mostRecentKeyValue == null) {
11527 this.mostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11528 this.shadowMostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11529 } else {
11530 var auxKeyValue = this.mostRecentKeyValue;
11531 this.shadowMostRecentKeyValue.setPair (key, value);
11532 this.mostRecentKeyValue = this.shadowMostRecentKeyValue;
11533 this.shadowMostRecentKeyValue = auxKeyValue;
11534 }return value;
11535 }}, "~O");
11536 Clazz_defineMethod (c$, "put", 
11537 function (key, value) {
11538 {
11539 var recent = this.mostRecentKeyValue;
11540 if ((recent != null) && (recent.key === key)) recent.value = value;
11541 return this.table.put (key, value);
11542 }}, "~O,~O");
11543 Clazz_defineMethod (c$, "remove", 
11544 function (key) {
11545 {
11546 var recent = this.mostRecentKeyValue;
11547 if ((recent != null) && (recent.key === key)) recent.value = null;
11548 return this.table.remove (key);
11549 }}, "~O");
11550 Clazz_defineMethod (c$, "getThreadGroup", 
11551 function () {
11552 return this.threadGroup;
11553 });
11554 Clazz_overrideMethod (c$, "toString", 
11555 function () {
11556 return this.getClass ().getName () + "[threadGroup=" + this.threadGroup.getName () + "]";
11557 });
11558 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11559 function () {
11560 if (this.changeSupport == null) {
11561 return  new Array (0);
11562 }return this.changeSupport.getPropertyChangeListeners ();
11563 });
11564 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11565 function (propertyName, listener) {
11566 if (listener == null) {
11567 return;
11568 }if (this.changeSupport == null) {
11569 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
11570 }this.changeSupport.addPropertyChangeListener (propertyName, listener);
11571 }, "~S,java.beans.PropertyChangeListener");
11572 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11573 function (propertyName, listener) {
11574 if (listener == null || this.changeSupport == null) {
11575 return;
11576 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
11577 }, "~S,java.beans.PropertyChangeListener");
11578 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11579 function (propertyName) {
11580 if (this.changeSupport == null) {
11581 return  new Array (0);
11582 }return this.changeSupport.getPropertyChangeListeners (propertyName);
11583 }, "~S");
11584 c$.EVENT_QUEUE_KEY = c$.prototype.EVENT_QUEUE_KEY =  new StringBuffer ("EventQueue");
11585 c$.threadGroup2appContext = c$.prototype.threadGroup2appContext = java.util.Collections.synchronizedMap ( new java.util.IdentityHashMap ());
11586 Clazz_defineStatics (c$,
11587 "DISPOSED_PROPERTY_NAME", "disposed",
11588 "GUI_DISPOSED", "guidisposed",
11589 "numAppContexts", 0,
11590 "mostRecentThreadAppContext", null);
11591 c$ = Clazz_decorateAsClass (function () {
11592 this.thread = null;
11593 this.appContext = null;
11594 Clazz_instantialize (this, arguments);
11595 }, jssun.awt, "MostRecentThreadAppContext");
11596 Clazz_makeConstructor (c$, 
11597 function (key, value) {
11598 this.thread = key;
11599 this.appContext = value;
11600 }, "Thread,jssun.awt.AppContext");
11601 c$ = Clazz_decorateAsClass (function () {
11602 this.key = null;
11603 this.value = null;
11604 Clazz_instantialize (this, arguments);
11605 }, jssun.awt, "MostRecentKeyValue");
11606 Clazz_makeConstructor (c$, 
11607 function (k, v) {
11608 this.key = k;
11609 this.value = v;
11610 }, "~O,~O");
11611 Clazz_defineMethod (c$, "setPair", 
11612 function (k, v) {
11613 this.key = k;
11614 this.value = v;
11615 }, "~O,~O");
11616 });
11617 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){
11618 c$=Clazz_declareType(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);
11619 Clazz_makeConstructor(c$,
11620 function(cs){
11621 if(cs==null){
11622 throw new NullPointerException();
11623 }
11624 Clazz_superConstructor(this,StringBuffer,[cs.toString()]);
11625 },"CharSequence");
11626 Clazz_defineMethod(c$,"append",
11627 function(b){
11628 return this.append(b?"true":"false");
11629 },"~B");
11630 Clazz_defineMethod(c$,"append",
11631 function(ch){
11632 this.append0(ch);
11633 return this;
11634 },"~N");
11635 Clazz_defineMethod(c$,"append",
11636 function(d){
11637 return this.append(Double.toString(d));
11638 },"~N");
11639 Clazz_defineMethod(c$,"append",
11640 function(obj){
11641 if(obj==null){
11642 this.appendNull();
11643 }else{
11644 this.append0(obj.toString());
11645 }return this;
11646 },"~O");
11647 Clazz_defineMethod(c$,"append",
11648 function(string){
11649 this.append0(string);
11650 return this;
11651 },"~S");
11652 Clazz_defineMethod(c$,"append",
11653 function(sb){
11654 if(sb==null){
11655 this.appendNull();
11656 }else{
11657 {
11658 this.append0(sb.getValue(),0,sb.length());
11659 }}return this;
11660 },"StringBuffer");
11661 Clazz_defineMethod(c$,"append",
11662 function(chars){
11663 this.append0(chars);
11664 return this;
11665 },"~A");
11666 Clazz_defineMethod(c$,"append",
11667 function(chars,start,length){
11668 this.append0(chars,start,length);
11669 return this;
11670 },"~A,~N,~N");
11671 Clazz_defineMethod(c$,"append",
11672 function(s){
11673 if(s==null){
11674 this.appendNull();
11675 }else{
11676 this.append0(s.toString());
11677 }return this;
11678 },"CharSequence");
11679 Clazz_defineMethod(c$,"append",
11680 function(s,start,end){
11681 this.append0(s,start,end);
11682 return this;
11683 },"CharSequence,~N,~N");
11684 Clazz_defineMethod(c$,"appendCodePoint",
11685 function(codePoint){
11686 return this.append(Character.toChars(codePoint));
11687 },"~N");
11688 Clazz_defineMethod(c$,"$delete",
11689 function(start,end){
11690 this.delete0(start,end);
11691 return this;
11692 },"~N,~N");
11693 Clazz_defineMethod(c$,"deleteCharAt",
11694 function(location){
11695 this.deleteCharAt0(location);
11696 return this;
11697 },"~N");
11698 Clazz_defineMethod(c$,"insert",
11699 function(index,ch){
11700 this.insert0(index,ch);
11701 return this;
11702 },"~N,~N");
11703 Clazz_defineMethod(c$,"insert",
11704 function(index,b){
11705 return this.insert(index,b?"true":"false");
11706 },"~N,~B");
11707 Clazz_defineMethod(c$,"insert",
11708 function(index,i){
11709 return this.insert(index,Integer.toString(i));
11710 },"~N,~N");
11711 Clazz_defineMethod(c$,"insert",
11712 function(index,l){
11713 return this.insert(index,Long.toString(l));
11714 },"~N,~N");
11715 Clazz_defineMethod(c$,"insert",
11716 function(index,d){
11717 return this.insert(index,Double.toString(d));
11718 },"~N,~N");
11719 Clazz_defineMethod(c$,"insert",
11720 function(index,f){
11721 return this.insert(index,Float.toString(f));
11722 },"~N,~N");
11723 Clazz_defineMethod(c$,"insert",
11724 function(index,obj){
11725 return this.insert(index,obj==null?"null":obj.toString());
11726 },"~N,~O");
11727 Clazz_defineMethod(c$,"insert",
11728 function(index,string){
11729 this.insert0(index,string);
11730 return this;
11731 },"~N,~S");
11732 Clazz_defineMethod(c$,"insert",
11733 function(index,chars){
11734 this.insert0(index,chars);
11735 return this;
11736 },"~N,~A");
11737 Clazz_defineMethod(c$,"insert",
11738 function(index,chars,start,length){
11739 this.insert0(index,chars,start,length);
11740 return this;
11741 },"~N,~A,~N,~N");
11742 Clazz_defineMethod(c$,"insert",
11743 function(index,s){
11744 this.insert0(index,s==null?"null":s.toString());
11745 return this;
11746 },"~N,CharSequence");
11747 Clazz_defineMethod(c$,"insert",
11748 function(index,s,start,end){
11749 this.insert0(index,s,start,end);
11750 return this;
11751 },"~N,CharSequence,~N,~N");
11752 Clazz_defineMethod(c$,"replace",
11753 function(start,end,string){
11754 this.replace0(start,end,string);
11755 return this;
11756 },"~N,~N,~S");
11757 Clazz_defineMethod(c$,"reverse",
11758 function(){
11759 this.reverse0();
11760 return this;
11761 });
11762 Clazz_overrideMethod(c$,"subSequence",
11763 function(start,end){
11764 return Clazz_superCall(this,StringBuffer,"substring",[start,end]);
11765 },"~N,~N");
11766 });
11767 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(){
11768 c$=Clazz_decorateAsClass(function(){
11769 this.elementData=null;
11770 this.$size=0;
11771 this.threshold=0;
11772 this.modCount=0;
11773 Clazz_instantialize(this,arguments);
11774 },java.util,"IdentityHashMap",java.util.AbstractMap,[java.util.Map,java.io.Serializable,Cloneable]);
11775 Clazz_makeConstructor(c$,
11776 function(){
11777 this.construct(21);
11778 });
11779 Clazz_makeConstructor(c$,
11780 function(maxSize){
11781 Clazz_superConstructor(this,java.util.IdentityHashMap,[]);
11782 if(maxSize>=0){
11783 this.$size=0;
11784 this.threshold=this.getThreshold(maxSize);
11785 this.elementData=this.newElementArray(this.computeElementArraySize());
11786 }else{
11787 throw new IllegalArgumentException();
11788 }},"~N");
11789 Clazz_defineMethod(c$,"getThreshold",
11790 ($fz=function(maxSize){
11791 return maxSize>3?maxSize:3;
11792 },$fz.isPrivate=true,$fz),"~N");
11793 Clazz_defineMethod(c$,"computeElementArraySize",
11794 ($fz=function(){
11795 return(Math.floor((this.threshold*10000)/7500))*2;
11796 },$fz.isPrivate=true,$fz));
11797 Clazz_defineMethod(c$,"newElementArray",
11798 ($fz=function(s){
11799 return new Array(s);
11800 },$fz.isPrivate=true,$fz),"~N");
11801 Clazz_makeConstructor(c$,
11802 function(map){
11803 this.construct(map.size()<6?11:map.size()*2);
11804 this.putAllImpl(map);
11805 },"java.util.Map");
11806 Clazz_defineMethod(c$,"massageValue",
11807 ($fz=function(value){
11808 return((value===java.util.IdentityHashMap.NULL_OBJECT)?null:value);
11809 },$fz.isPrivate=true,$fz),"~O");
11810 Clazz_overrideMethod(c$,"clear",
11811 function(){
11812 this.$size=0;
11813 for(var i=0;i<this.elementData.length;i++){
11814 this.elementData[i]=null;
11815 }
11816 this.modCount++;
11817 });
11818 Clazz_overrideMethod(c$,"containsKey",
11819 function(key){
11820 if(key==null){
11821 key=java.util.IdentityHashMap.NULL_OBJECT;
11822 }var index=this.findIndex(key,this.elementData);
11823 return this.elementData[index]===key;
11824 },"~O");
11825 Clazz_overrideMethod(c$,"containsValue",
11826 function(value){
11827 if(value==null){
11828 value=java.util.IdentityHashMap.NULL_OBJECT;
11829 }for(var i=1;i<this.elementData.length;i=i+2){
11830 if(this.elementData[i]===value){
11831 return true;
11832 }}
11833 return false;
11834 },"~O");
11835 Clazz_overrideMethod(c$,"get",
11836 function(key){
11837 if(key==null){
11838 key=java.util.IdentityHashMap.NULL_OBJECT;
11839 }var index=this.findIndex(key,this.elementData);
11840 if(this.elementData[index]===key){
11841 var result=this.elementData[index+1];
11842 return this.massageValue(result);
11843 }return null;
11844 },"~O");
11845 Clazz_defineMethod(c$,"getEntry",
11846 ($fz=function(key){
11847 if(key==null){
11848 key=java.util.IdentityHashMap.NULL_OBJECT;
11849 }var index=this.findIndex(key,this.elementData);
11850 if(this.elementData[index]===key){
11851 return this.getEntry(index);
11852 }return null;
11853 },$fz.isPrivate=true,$fz),"~O");
11854 Clazz_defineMethod(c$,"getEntry",
11855 ($fz=function(index){
11856 var key=this.elementData[index];
11857 var value=this.elementData[index+1];
11858 if(key===java.util.IdentityHashMap.NULL_OBJECT){
11859 key=null;
11860 }if(value===java.util.IdentityHashMap.NULL_OBJECT){
11861 value=null;
11862 }return new java.util.IdentityHashMap.IdentityHashMapEntry(key,value);
11863 },$fz.isPrivate=true,$fz),"~N");
11864 Clazz_defineMethod(c$,"findIndex",
11865 ($fz=function(key,array){
11866 var length=array.length;
11867 var index=this.getModuloHash(key,length);
11868 var last=(index+length-2)%length;
11869 while(index!=last){
11870 if(array[index]===key||(array[index]==null)){
11871 break;
11872 }index=(index+2)%length;
11873 }
11874 return index;
11875 },$fz.isPrivate=true,$fz),"~O,~A");
11876 Clazz_defineMethod(c$,"getModuloHash",
11877 ($fz=function(key,length){
11878 return((System.identityHashCode(key)&0x7FFFFFFF)%(Math.floor(length/2)))*2;
11879 },$fz.isPrivate=true,$fz),"~O,~N");
11880 Clazz_overrideMethod(c$,"put",
11881 function(key,value){
11882 var _key=key;
11883 var _value=value;
11884 if(_key==null){
11885 _key=java.util.IdentityHashMap.NULL_OBJECT;
11886 }if(_value==null){
11887 _value=java.util.IdentityHashMap.NULL_OBJECT;
11888 }var index=this.findIndex(_key,this.elementData);
11889 if(this.elementData[index]!==_key){
11890 this.modCount++;
11891 if(++this.$size>this.threshold){
11892 this.rehash();
11893 index=this.findIndex(_key,this.elementData);
11894 }this.elementData[index]=_key;
11895 this.elementData[index+1]=null;
11896 }var result=this.elementData[index+1];
11897 this.elementData[index+1]=_value;
11898 return this.massageValue(result);
11899 },"~O,~O");
11900 Clazz_overrideMethod(c$,"putAll",
11901 function(map){
11902 this.putAllImpl(map);
11903 },"java.util.Map");
11904 Clazz_defineMethod(c$,"rehash",
11905 ($fz=function(){
11906 var newlength=this.elementData.length<<1;
11907 if(newlength==0){
11908 newlength=1;
11909 }var newData=this.newElementArray(newlength);
11910 for(var i=0;i<this.elementData.length;i=i+2){
11911 var key=this.elementData[i];
11912 if(key!=null){
11913 var index=this.findIndex(key,newData);
11914 newData[index]=key;
11915 newData[index+1]=this.elementData[i+1];
11916 }}
11917 this.elementData=newData;
11918 this.computeMaxSize();
11919 },$fz.isPrivate=true,$fz));
11920 Clazz_defineMethod(c$,"computeMaxSize",
11921 ($fz=function(){
11922 this.threshold=(Math.floor((Math.floor(this.elementData.length/ 2)) * 7500 /10000));
11923 },$fz.isPrivate=true,$fz));
11924 Clazz_overrideMethod(c$,"remove",
11925 function(key){
11926 if(key==null){
11927 key=java.util.IdentityHashMap.NULL_OBJECT;
11928 }var hashedOk;
11929 var index;
11930 var next;
11931 var hash;
11932 var result;
11933 var object;
11934 index=next=this.findIndex(key,this.elementData);
11935 if(this.elementData[index]!==key){
11936 return null;
11937 }result=this.elementData[index+1];
11938 var length=this.elementData.length;
11939 while(true){
11940 next=(next+2)%length;
11941 object=this.elementData[next];
11942 if(object==null){
11943 break;
11944 }hash=this.getModuloHash(object,length);
11945 hashedOk=hash>index;
11946 if(next<index){
11947 hashedOk=hashedOk||(hash<=next);
11948 }else{
11949 hashedOk=hashedOk&&(hash<=next);
11950 }if(!hashedOk){
11951 this.elementData[index]=object;
11952 this.elementData[index+1]=this.elementData[next+1];
11953 index=next;
11954 }}
11955 this.$size--;
11956 this.modCount++;
11957 this.elementData[index]=null;
11958 this.elementData[index+1]=null;
11959 return this.massageValue(result);
11960 },"~O");
11961 Clazz_overrideMethod(c$,"entrySet",
11962 function(){
11963 return new java.util.IdentityHashMap.IdentityHashMapEntrySet(this);
11964 });
11965 Clazz_overrideMethod(c$,"keySet",
11966 function(){
11967 if(this.$keySet==null){
11968 this.$keySet=((Clazz_isClassDefined("java.util.IdentityHashMap$1")?0:java.util.IdentityHashMap.$IdentityHashMap$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$1,this,null));
11969 }return this.$keySet;
11970 });
11971 Clazz_overrideMethod(c$,"values",
11972 function(){
11973 if(this.valuesCollection==null){
11974 this.valuesCollection=((Clazz_isClassDefined("java.util.IdentityHashMap$2")?0:java.util.IdentityHashMap.$IdentityHashMap$2$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$2,this,null));
11975 }return this.valuesCollection;
11976 });
11977 Clazz_overrideMethod(c$,"equals",
11978 function(object){
11979 if(this===object){
11980 return true;
11981 }if(Clazz_instanceOf(object,java.util.Map)){
11982 var map=object;
11983 if(this.size()!=map.size()){
11984 return false;
11985 }var set=this.entrySet();
11986 return set.equals(map.entrySet());
11987 }return false;
11988 },"~O");
11989 Clazz_defineMethod(c$,"clone",
11990 function(){
11991 try{
11992 return Clazz_superCall(this,java.util.IdentityHashMap,"clone",[]);
11993 }catch(e){
11994 if(Clazz_instanceOf(e,CloneNotSupportedException)){
11995 return null;
11996 }else{
11997 throw e;
11998 }
11999 }
12000 });
12001 Clazz_overrideMethod(c$,"isEmpty",
12002 function(){
12003 return this.$size==0;
12004 });
12005 Clazz_overrideMethod(c$,"size",
12006 function(){
12007 return this.$size;
12008 });
12009 Clazz_defineMethod(c$,"putAllImpl",
12010 ($fz=function(map){
12011 if(map.entrySet()!=null){
12012 Clazz_superCall(this,java.util.IdentityHashMap,"putAll",[map]);
12013 }},$fz.isPrivate=true,$fz),"java.util.Map");
12014 c$.$IdentityHashMap$1$=function(){
12015 Clazz_pu$h(self.c$);
12016 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1",java.util.AbstractSet);
12017 Clazz_overrideMethod(c$,"contains",
12018 function(object){
12019 return this.b$["java.util.IdentityHashMap"].containsKey(object);
12020 },"~O");
12021 Clazz_overrideMethod(c$,"size",
12022 function(){
12023 return this.b$["java.util.IdentityHashMap"].size();
12024 });
12025 Clazz_overrideMethod(c$,"clear",
12026 function(){
12027 this.b$["java.util.IdentityHashMap"].clear();
12028 });
12029 Clazz_overrideMethod(c$,"remove",
12030 function(key){
12031 if(this.b$["java.util.IdentityHashMap"].containsKey(key)){
12032 this.b$["java.util.IdentityHashMap"].remove(key);
12033 return true;
12034 }return false;
12035 },"~O");
12036 Clazz_overrideMethod(c$,"iterator",
12037 function(){
12038 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"]);
12039 });
12040 c$=Clazz_p0p();
12041 };
12042 c$.$IdentityHashMap$1$1$=function(){
12043 Clazz_pu$h(self.c$);
12044 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1$1",null,java.util.MapEntry.Type);
12045 Clazz_overrideMethod(c$,"get",
12046 function(entry){
12047 return entry.key;
12048 },"java.util.MapEntry");
12049 c$=Clazz_p0p();
12050 };
12051 c$.$IdentityHashMap$2$=function(){
12052 Clazz_pu$h(self.c$);
12053 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2",java.util.AbstractCollection);
12054 Clazz_overrideMethod(c$,"contains",
12055 function(object){
12056 return this.b$["java.util.IdentityHashMap"].containsValue(object);
12057 },"~O");
12058 Clazz_overrideMethod(c$,"size",
12059 function(){
12060 return this.b$["java.util.IdentityHashMap"].size();
12061 });
12062 Clazz_overrideMethod(c$,"clear",
12063 function(){
12064 this.b$["java.util.IdentityHashMap"].clear();
12065 });
12066 Clazz_overrideMethod(c$,"iterator",
12067 function(){
12068 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"]);
12069 });
12070 Clazz_overrideMethod(c$,"remove",
12071 function(object){
12072 var it=this.iterator();
12073 while(it.hasNext()){
12074 if(object===it.next()){
12075 it.remove();
12076 return true;
12077 }}
12078 return false;
12079 },"~O");
12080 c$=Clazz_p0p();
12081 };
12082 c$.$IdentityHashMap$2$1$=function(){
12083 Clazz_pu$h(self.c$);
12084 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2$1",null,java.util.MapEntry.Type);
12085 Clazz_overrideMethod(c$,"get",
12086 function(entry){
12087 return entry.value;
12088 },"java.util.MapEntry");
12089 c$=Clazz_p0p();
12090 };
12091 Clazz_pu$h(self.c$);
12092 c$=Clazz_declareType(java.util.IdentityHashMap,"IdentityHashMapEntry",java.util.MapEntry);
12093 Clazz_overrideMethod(c$,"equals",
12094 function(a){
12095 if(this===a){
12096 return true;
12097 }if(Clazz_instanceOf(a,java.util.Map.Entry)){
12098 var b=a;
12099 return(this.key===b.getKey())&&(this.value===b.getValue());
12100 }return false;
12101 },"~O");
12102 Clazz_overrideMethod(c$,"hashCode",
12103 function(){
12104 return System.identityHashCode(this.key)^System.identityHashCode(this.value);
12105 });
12106 Clazz_overrideMethod(c$,"toString",
12107 function(){
12108 return this.key+"="+this.value;
12109 });
12110 c$=Clazz_p0p();
12111 Clazz_pu$h(self.c$);
12112 c$=Clazz_decorateAsClass(function(){
12113 this.position=0;
12114 this.lastPosition=0;
12115 this.associatedMap=null;
12116 this.expectedModCount=0;
12117 this.type=null;
12118 this.canRemove=false;
12119 Clazz_instantialize(this,arguments);
12120 },java.util.IdentityHashMap,"IdentityHashMapIterator",null,java.util.Iterator);
12121 Clazz_makeConstructor(c$,
12122 function(a,b){
12123 this.associatedMap=b;
12124 this.type=a;
12125 this.expectedModCount=b.modCount;
12126 },"java.util.MapEntry.Type,java.util.IdentityHashMap");
12127 Clazz_overrideMethod(c$,"hasNext",
12128 function(){
12129 while(this.position<this.associatedMap.elementData.length){
12130 if(this.associatedMap.elementData[this.position]==null){
12131 this.position+=2;
12132 }else{
12133 return true;
12134 }}
12135 return false;
12136 });
12137 Clazz_defineMethod(c$,"checkConcurrentMod",
12138 function(){
12139 if(this.expectedModCount!=this.associatedMap.modCount){
12140 throw new java.util.ConcurrentModificationException();
12141 }});
12142 Clazz_overrideMethod(c$,"next",
12143 function(){
12144 this.checkConcurrentMod();
12145 if(!this.hasNext()){
12146 throw new java.util.NoSuchElementException();
12147 }var a=this.associatedMap.getEntry(this.position);
12148 this.lastPosition=this.position;
12149 this.position+=2;
12150 this.canRemove=true;
12151 return this.type.get(a);
12152 });
12153 Clazz_overrideMethod(c$,"remove",
12154 function(){
12155 this.checkConcurrentMod();
12156 if(!this.canRemove){
12157 throw new IllegalStateException();
12158 }this.canRemove=false;
12159 this.associatedMap.remove(this.associatedMap.elementData[this.lastPosition]);
12160 this.position=this.lastPosition;
12161 this.expectedModCount++;
12162 });
12163 c$=Clazz_p0p();
12164 Clazz_pu$h(self.c$);
12165 c$=Clazz_decorateAsClass(function(){
12166 this.associatedMap=null;
12167 Clazz_instantialize(this,arguments);
12168 },java.util.IdentityHashMap,"IdentityHashMapEntrySet",java.util.AbstractSet);
12169 Clazz_makeConstructor(c$,
12170 function(a){
12171 Clazz_superConstructor(this,java.util.IdentityHashMap.IdentityHashMapEntrySet,[]);
12172 this.associatedMap=a;
12173 },"java.util.IdentityHashMap");
12174 Clazz_defineMethod(c$,"hashMap",
12175 function(){
12176 return this.associatedMap;
12177 });
12178 Clazz_overrideMethod(c$,"size",
12179 function(){
12180 return this.associatedMap.$size;
12181 });
12182 Clazz_overrideMethod(c$,"clear",
12183 function(){
12184 this.associatedMap.clear();
12185 });
12186 Clazz_overrideMethod(c$,"remove",
12187 function(a){
12188 if(this.contains(a)){
12189 this.associatedMap.remove((a).getKey());
12190 return true;
12191 }return false;
12192 },"~O");
12193 Clazz_overrideMethod(c$,"contains",
12194 function(a){
12195 if(Clazz_instanceOf(a,java.util.Map.Entry)){
12196 var b=this.associatedMap.getEntry((a).getKey());
12197 return b!=null&&b.equals(a);
12198 }return false;
12199 },"~O");
12200 Clazz_overrideMethod(c$,"iterator",
12201 function(){
12202 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);
12203 });
12204 c$.$IdentityHashMap$IdentityHashMapEntrySet$1$=function(){
12205 Clazz_pu$h(self.c$);
12206 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$IdentityHashMapEntrySet$1",null,java.util.MapEntry.Type);
12207 Clazz_overrideMethod(c$,"get",
12208 function(a){
12209 return a;
12210 },"java.util.MapEntry");
12211 c$=Clazz_p0p();
12212 };
12213 c$=Clazz_p0p();
12214 Clazz_defineStatics(c$,
12215 "DEFAULT_MAX_SIZE",21,
12216 "loadFactor",7500);
12217 c$.NULL_OBJECT=c$.prototype.NULL_OBJECT=new Clazz._O();
12218 });
12219 Clazz_load(["java.util.AbstractSet","$.Set"],"java.util.HashSet",["java.util.HashMap"],function(){
12220 c$=Clazz_decorateAsClass(function(){
12221 this.backingMap=null;
12222 Clazz_instantialize(this,arguments);
12223 },java.util,"HashSet",java.util.AbstractSet,[java.util.Set,Cloneable,java.io.Serializable]);
12224
12225
12226 Clazz_makeConstructor(c$,
12227 function(){
12228 this.construct(new java.util.HashMap());
12229 });
12230 Clazz_makeConstructor(c$,
12231 function(capacity){
12232 this.construct(new java.util.HashMap(capacity));
12233 },"~N");
12234 Clazz_makeConstructor(c$,
12235 function(capacity,loadFactor){
12236 this.construct(new java.util.HashMap(capacity,loadFactor));
12237 },"~N,~N");
12238 Clazz_makeConstructor(c$,
12239 function(collection){
12240 this.construct(new java.util.HashMap(collection.size()<6?11:collection.size()*2));
12241 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
12242 this.add(e);
12243 }
12244 },"java.util.Collection");
12245 Clazz_makeConstructor(c$,
12246 function(backingMap){
12247 Clazz_superConstructor(this,java.util.HashSet,[]);
12248 this.backingMap=backingMap;
12249 },"java.util.HashMap");
12250
12251 Clazz_overrideMethod(c$,"add",
12252 function(object){
12253 return this.backingMap.put(object,this)==null;
12254 },"~O");
12255 Clazz_overrideMethod(c$,"clear",
12256 function(){
12257 this.backingMap.clear();
12258 });
12259 Clazz_defineMethod(c$,"clone",
12260 function(){
12261 try{
12262 var clone=this.cloneHM();
12263 clone.backingMap=this.backingMap.clone();
12264 return clone;
12265 }catch(e){
12266 if(Clazz_instanceOf(e,CloneNotSupportedException)){
12267 return null;
12268 }else{
12269 throw e;
12270 }
12271 }
12272 });
12273 Clazz_overrideMethod(c$,"contains",
12274 function(object){
12275 return this.backingMap.containsKey(object);
12276 },"~O");
12277 Clazz_overrideMethod(c$,"isEmpty",
12278 function(){
12279 return this.backingMap.isEmpty();
12280 });
12281 Clazz_defineMethod(c$,"iterator",
12282 function(){
12283 return this.backingMap.keySet().iterator();
12284 });
12285 Clazz_overrideMethod(c$,"remove",
12286 function(object){
12287 return this.backingMap.remove(object)!=null;
12288 },"~O");
12289 Clazz_overrideMethod(c$,"size",
12290 function(){
12291 return this.backingMap.size();
12292 });
12293 Clazz_defineMethod(c$,"createBackingMap",
12294 function(capacity,loadFactor){
12295 return new java.util.HashMap(capacity,loadFactor);
12296 },"~N,~N");
12297 });
12298 Clazz_declarePackage ("jssun.awt");
12299 Clazz_declareInterface (jssun.awt, "ComponentFactory");
12300 Clazz_declarePackage ("jssun.awt");
12301 Clazz_declareInterface (jssun.awt, "WindowClosingListener");
12302 Clazz_declarePackage ("jssun.awt");
12303 Clazz_declareInterface (jssun.awt, "WindowClosingSupport");
12304 Clazz_declarePackage ("java.awt");
12305 Clazz_load (["java.awt.Container", "java.util.Vector", "java.awt.Color"], ["java.awt.Window", "$.FocusManager"], ["java.lang.IllegalArgumentException", "java.util.ArrayList", "$.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 () {
12306 c$ = Clazz_decorateAsClass (function () {
12307 this.warningString = null;
12308 this.icons = null;
12309 this.temporaryLostComponent = null;
12310 this.syncLWRequests = false;
12311 this.beforeFirstShow = true;
12312 this.state = 0;
12313 this.alwaysOnTop = false;
12314 this.ownedWindowList = null;
12315 this.showWithParent = false;
12316 this.modalBlocker = null;
12317 this.modalExclusionType = null;
12318 this.windowListener = null;
12319 this.windowStateListener = null;
12320 this.windowFocusListener = null;
12321 this.focusableWindowState = true;
12322 this.isInShow = false;
12323 this.opacity = 1.0;
12324 this.shape = null;
12325 this.isTrayIconWindow = false;
12326 this.opaque = true;
12327 Clazz_instantialize (this, arguments);
12328 }, java.awt, "Window", java.awt.Container);
12329 Clazz_prepareFields (c$, function () {
12330 this.ownedWindowList =  new java.util.Vector ();
12331 });
12332 Clazz_makeConstructor (c$, 
12333 function (gc) {
12334 Clazz_superConstructor (this, java.awt.Window, []);
12335 this.init (gc);
12336 }, "java.awt.GraphicsConfiguration");
12337 Clazz_defineMethod (c$, "init", 
12338  function (gc) {
12339 this.syncLWRequests = java.awt.Window.systemSyncLWRequests;
12340 this.addToWindowList ();
12341 this.cursor = java.awt.Cursor.getPredefinedCursor (0);
12342 this.visible = false;
12343 this.setLayout ( new java.awt.BorderLayout ());
12344 this.modalExclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12345 }, "java.awt.GraphicsConfiguration");
12346 Clazz_makeConstructor (c$, 
12347 function () {
12348 Clazz_superConstructor (this, java.awt.Window, []);
12349 this.init (null);
12350 });
12351 Clazz_makeConstructor (c$, 
12352 function (owner) {
12353 Clazz_superConstructor (this, java.awt.Window, []);
12354 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12355 this.ownedInit (owner);
12356 }, "java.awt.Frame");
12357 Clazz_makeConstructor (c$, 
12358 function (owner) {
12359 Clazz_superConstructor (this, java.awt.Window, []);
12360 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12361 this.ownedInit (owner);
12362 }, "java.awt.Window");
12363 Clazz_makeConstructor (c$, 
12364 function (owner, gc) {
12365 this.construct (gc);
12366 this.ownedInit (owner);
12367 }, "java.awt.Window,java.awt.GraphicsConfiguration");
12368 Clazz_defineMethod (c$, "ownedInit", 
12369  function (owner) {
12370 this.parent = owner;
12371 if (owner != null) {
12372 owner.addOwnedWindow (this);
12373 }}, "java.awt.Window");
12374 Clazz_overrideMethod (c$, "constructComponentName", 
12375 function () {
12376 {
12377 return "win" + java.awt.Window.nameCounter++;
12378 }});
12379 Clazz_defineMethod (c$, "getIconImages", 
12380 function () {
12381 var icons = this.icons;
12382 if (icons == null || icons.size () == 0) {
12383 return  new java.util.ArrayList ();
12384 }return  new java.util.ArrayList (icons);
12385 });
12386 Clazz_defineMethod (c$, "setIconImages", 
12387 function (icons) {
12388 this.icons = (icons == null) ?  new java.util.ArrayList () :  new java.util.ArrayList (icons);
12389 this.firePropertyChangeObject ("iconImage", null, null);
12390 }, "java.util.List");
12391 Clazz_defineMethod (c$, "setIconImage", 
12392 function (image) {
12393 var imageList =  new java.util.ArrayList ();
12394 if (image != null) {
12395 imageList.add (image);
12396 }this.setIconImages (imageList);
12397 }, "java.awt.Image");
12398 Clazz_defineMethod (c$, "addNotify", 
12399 function () {
12400 });
12401 Clazz_defineMethod (c$, "pack", 
12402 function () {
12403 var parent = this.parent;
12404 if (parent != null && parent.getPeer () == null) {
12405 parent.addNotify ();
12406 }if (this.peer == null) {
12407 this.addNotify ();
12408 }var newSize = this.getPreferredSize ();
12409 if (this.peer != null) {
12410 this.setClientSize (newSize.width, newSize.height);
12411 }if (this.beforeFirstShow) {
12412 this.isPacked = true;
12413 }this.validate ();
12414 });
12415 Clazz_defineMethod (c$, "setMinimumSize", 
12416 function (minimumSize) {
12417 {
12418 Clazz_superCall (this, java.awt.Window, "setMinimumSize", [minimumSize]);
12419 var size = this.getSize ();
12420 if (this.isMinimumSizeSet ()) {
12421 if (size.width < minimumSize.width || size.height < minimumSize.height) {
12422 var nw = Math.max (this.width, minimumSize.width);
12423 var nh = Math.max (this.height, minimumSize.height);
12424 this.setSize (nw, nh);
12425 }}}}, "java.awt.Dimension");
12426 Clazz_defineMethod (c$, "reshape", 
12427 function (x, y, width, height) {
12428 if (this.isMinimumSizeSet ()) {
12429 var minSize = this.getMinimumSize ();
12430 if (width < minSize.width) {
12431 width = minSize.width;
12432 }if (height < minSize.height) {
12433 height = minSize.height;
12434 }}Clazz_superCall (this, java.awt.Window, "reshape", [x, y, width, height]);
12435 }, "~N,~N,~N,~N");
12436 Clazz_defineMethod (c$, "setClientSize", 
12437 function (w, h) {
12438 {
12439 this.setBounds (this.x, this.y, w, h);
12440 }}, "~N,~N");
12441 c$.closeSplashScreen = Clazz_defineMethod (c$, "closeSplashScreen", 
12442 function () {
12443 });
12444 Clazz_defineMethod (c$, "show", 
12445 function () {
12446 this.validate ();
12447 this.isInShow = true;
12448 if (this.visible) {
12449 this.toFront ();
12450 } else {
12451 this.beforeFirstShow = false;
12452 java.awt.Window.closeSplashScreen ();
12453 Clazz_superCall (this, java.awt.Window, "show", []);
12454 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12455 var child = this.ownedWindowList.elementAt (i);
12456 if ((child != null) && child.showWithParent) {
12457 child.show ();
12458 child.showWithParent = false;
12459 }}
12460 if (!this.isModalBlocked ()) {
12461 this.updateChildrenBlocking ();
12462 } else {
12463 this.modalBlocker.toFront_NoClientCode ();
12464 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
12465 java.awt.Window.updateChildFocusableWindowState (this);
12466 }}this.isInShow = false;
12467 if ((this.state & 1) == 0) {
12468 this.postWindowEvent (200);
12469 this.state |= 1;
12470 }});
12471 c$.updateChildFocusableWindowState = Clazz_defineMethod (c$, "updateChildFocusableWindowState", 
12472 function (w) {
12473 for (var i = 0; i < w.ownedWindowList.size (); i++) {
12474 var child = w.ownedWindowList.elementAt (i);
12475 if (child != null) {
12476 java.awt.Window.updateChildFocusableWindowState (child);
12477 }}
12478 }, "java.awt.Window");
12479 Clazz_defineMethod (c$, "postWindowEvent", 
12480 function (id) {
12481 if (this.windowListener != null || (this.eventMask & 64) != 0 || java.awt.Toolkit.enabledOnToolkit (64)) {
12482 var e =  new java.awt.event.WindowEvent (this, id);
12483 java.awt.Toolkit.getEventQueue ().postEvent (e);
12484 }}, "~N");
12485 Clazz_defineMethod (c$, "hide", 
12486 function () {
12487 {
12488 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12489 var child = this.ownedWindowList.elementAt (i);
12490 if ((child != null) && child.visible) {
12491 child.hide ();
12492 child.showWithParent = true;
12493 }}
12494 }Clazz_superCall (this, java.awt.Window, "hide", []);
12495 });
12496 Clazz_overrideMethod (c$, "clearMostRecentFocusOwnerOnHide", 
12497 function () {
12498 });
12499 Clazz_defineMethod (c$, "dispose", 
12500 function () {
12501 this.doDispose ();
12502 });
12503 Clazz_defineMethod (c$, "disposeImpl", 
12504 function () {
12505 this.dispose ();
12506 });
12507 Clazz_defineMethod (c$, "doDispose", 
12508 function () {
12509 if (!Clazz_isClassDefined ("java.awt.Window$1DisposeAction")) {
12510 java.awt.Window.$Window$1DisposeAction$ ();
12511 }
12512 var action = Clazz_innerTypeInstance (java.awt.Window$1DisposeAction, this, null);
12513 action.run ();
12514 this.postWindowEvent (202);
12515 });
12516 Clazz_overrideMethod (c$, "adjustListeningChildrenOnParent", 
12517 function (mask, num) {
12518 }, "~N,~N");
12519 Clazz_overrideMethod (c$, "adjustDecendantsOnParent", 
12520 function (num) {
12521 }, "~N");
12522 Clazz_defineMethod (c$, "toFront", 
12523 function () {
12524 this.toFront_NoClientCode ();
12525 });
12526 Clazz_defineMethod (c$, "toFront_NoClientCode", 
12527 function () {
12528 if (this.visible) {
12529 }});
12530 Clazz_defineMethod (c$, "toBack", 
12531 function () {
12532 this.toBack_NoClientCode ();
12533 });
12534 Clazz_defineMethod (c$, "toBack_NoClientCode", 
12535 function () {
12536 if (this.isAlwaysOnTop ()) {
12537 try {
12538 this.setAlwaysOnTop (false);
12539 } catch (e) {
12540 if (Clazz_exceptionOf (e, SecurityException)) {
12541 } else {
12542 throw e;
12543 }
12544 }
12545 }if (this.visible) {
12546 }});
12547 Clazz_overrideMethod (c$, "getToolkit", 
12548 function () {
12549 return java.awt.Toolkit.getDefaultToolkit ();
12550 });
12551 Clazz_defineMethod (c$, "getWarningString", 
12552 function () {
12553 return this.warningString;
12554 });
12555 Clazz_overrideMethod (c$, "getLocale", 
12556 function () {
12557 if (this.locale == null) {
12558 return java.util.Locale.getDefault ();
12559 }return this.locale;
12560 });
12561 Clazz_defineMethod (c$, "setCursor", 
12562 function (cursor) {
12563 if (cursor == null) {
12564 cursor = java.awt.Cursor.getPredefinedCursor (0);
12565 }Clazz_superCall (this, java.awt.Window, "setCursor", [cursor]);
12566 }, "java.awt.Cursor");
12567 Clazz_defineMethod (c$, "getOwner", 
12568 function () {
12569 return this.getOwner_NoClientCode ();
12570 });
12571 Clazz_defineMethod (c$, "getOwner_NoClientCode", 
12572 function () {
12573 return this.parent;
12574 });
12575 Clazz_defineMethod (c$, "getOwnedWindows", 
12576 function () {
12577 return this.getOwnedWindows_NoClientCode ();
12578 });
12579 Clazz_defineMethod (c$, "getOwnedWindows_NoClientCode", 
12580 function () {
12581 var realCopy;
12582 {
12583 var fullSize = this.ownedWindowList.size ();
12584 var realSize = 0;
12585 var fullCopy =  new Array (fullSize);
12586 for (var i = 0; i < fullSize; i++) {
12587 fullCopy[realSize] = this.ownedWindowList.elementAt (i);
12588 if (fullCopy[realSize] != null) {
12589 realSize++;
12590 }}
12591 if (fullSize != realSize) {
12592 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12593 } else {
12594 realCopy = fullCopy;
12595 }}return realCopy;
12596 });
12597 Clazz_defineMethod (c$, "isModalBlocked", 
12598 function () {
12599 return this.modalBlocker != null;
12600 });
12601 Clazz_defineMethod (c$, "setModalBlocked", 
12602 function (blocker, blocked, peerCall) {
12603 }, "java.awt.Dialog,~B,~B");
12604 Clazz_defineMethod (c$, "getModalBlocker", 
12605 function () {
12606 return this.modalBlocker;
12607 });
12608 c$.getAllWindows = Clazz_defineMethod (c$, "getAllWindows", 
12609 function () {
12610 {
12611 var v =  new java.util.ArrayList ();
12612 v.addAll (java.awt.Window.allWindows);
12613 return v;
12614 }});
12615 c$.getAllUnblockedWindows = Clazz_defineMethod (c$, "getAllUnblockedWindows", 
12616 function () {
12617 {
12618 var unblocked =  new java.util.ArrayList ();
12619 for (var i = 0; i < java.awt.Window.allWindows.size (); i++) {
12620 var w = java.awt.Window.allWindows.get (i);
12621 if (!w.isModalBlocked ()) {
12622 unblocked.add (w);
12623 }}
12624 return unblocked;
12625 }});
12626 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12627  function (appContext) {
12628 {
12629 var realCopy;
12630 var windowList = appContext.get (java.awt.Window);
12631 if (windowList != null) {
12632 var fullSize = windowList.size ();
12633 var realSize = 0;
12634 var fullCopy =  new Array (fullSize);
12635 for (var i = 0; i < fullSize; i++) {
12636 var w = windowList.get (i);
12637 if (w != null) {
12638 fullCopy[realSize++] = w;
12639 }}
12640 if (fullSize != realSize) {
12641 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12642 } else {
12643 realCopy = fullCopy;
12644 }} else {
12645 realCopy =  new Array (0);
12646 }return realCopy;
12647 }}, "jssun.awt.AppContext");
12648 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12649 function () {
12650 return java.awt.Window.getWindows (jssun.awt.AppContext.getAppContext ());
12651 });
12652 c$.getOwnerlessWindows = Clazz_defineMethod (c$, "getOwnerlessWindows", 
12653 function () {
12654 var allWindows = java.awt.Window.getWindows ();
12655 var ownerlessCount = 0;
12656 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12657 if (w.getOwner () == null) {
12658 ownerlessCount++;
12659 }}
12660 var ownerless =  new Array (ownerlessCount);
12661 var c = 0;
12662 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12663 if (w.getOwner () == null) {
12664 ownerless[c++] = w;
12665 }}
12666 return ownerless;
12667 });
12668 Clazz_defineMethod (c$, "getDocumentRoot", 
12669 function () {
12670 {
12671 var w = this;
12672 while (w.getOwner () != null) {
12673 w = w.getOwner ();
12674 }
12675 return w;
12676 }});
12677 Clazz_defineMethod (c$, "setModalExclusionType", 
12678 function (exclusionType) {
12679 if (exclusionType == null) {
12680 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12681 }if (!java.awt.Toolkit.getDefaultToolkit ().isModalExclusionTypeSupported (exclusionType)) {
12682 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12683 }if (this.modalExclusionType === exclusionType) {
12684 return;
12685 }this.modalExclusionType = exclusionType;
12686 }, "java.awt.Dialog.ModalExclusionType");
12687 Clazz_defineMethod (c$, "getModalExclusionType", 
12688 function () {
12689 return this.modalExclusionType;
12690 });
12691 Clazz_defineMethod (c$, "isModalExcluded", 
12692 function (exclusionType) {
12693 if ((this.modalExclusionType != null) && this.modalExclusionType.compareTo (exclusionType) >= 0) {
12694 return true;
12695 }var owner = this.getOwner_NoClientCode ();
12696 return (owner != null) && owner.isModalExcluded (exclusionType);
12697 }, "java.awt.Dialog.ModalExclusionType");
12698 Clazz_defineMethod (c$, "updateChildrenBlocking", 
12699 function () {
12700 });
12701 Clazz_defineMethod (c$, "addWindowListener", 
12702 function (l) {
12703 if (l == null) {
12704 return;
12705 }this.newEventsOnly = true;
12706 this.windowListener = java.awt.AWTEventMulticaster.add (this.windowListener, l);
12707 }, "java.awt.event.WindowListener");
12708 Clazz_defineMethod (c$, "addWindowStateListener", 
12709 function (l) {
12710 if (l == null) {
12711 return;
12712 }this.windowStateListener = java.awt.AWTEventMulticaster.add (this.windowStateListener, l);
12713 this.newEventsOnly = true;
12714 }, "java.awt.event.WindowStateListener");
12715 Clazz_defineMethod (c$, "addWindowFocusListener", 
12716 function (l) {
12717 if (l == null) {
12718 return;
12719 }this.windowFocusListener = java.awt.AWTEventMulticaster.add (this.windowFocusListener, l);
12720 this.newEventsOnly = true;
12721 }, "java.awt.event.WindowFocusListener");
12722 Clazz_defineMethod (c$, "removeWindowListener", 
12723 function (l) {
12724 if (l == null) {
12725 return;
12726 }this.windowListener = java.awt.AWTEventMulticaster.remove (this.windowListener, l);
12727 }, "java.awt.event.WindowListener");
12728 Clazz_defineMethod (c$, "removeWindowStateListener", 
12729 function (l) {
12730 if (l == null) {
12731 return;
12732 }this.windowStateListener = java.awt.AWTEventMulticaster.remove (this.windowStateListener, l);
12733 }, "java.awt.event.WindowStateListener");
12734 Clazz_defineMethod (c$, "removeWindowFocusListener", 
12735 function (l) {
12736 if (l == null) {
12737 return;
12738 }this.windowFocusListener = java.awt.AWTEventMulticaster.remove (this.windowFocusListener, l);
12739 }, "java.awt.event.WindowFocusListener");
12740 Clazz_defineMethod (c$, "getWindowListeners", 
12741 function () {
12742 return (this.getListeners (java.awt.event.WindowListener));
12743 });
12744 Clazz_defineMethod (c$, "getWindowFocusListeners", 
12745 function () {
12746 return (this.getListeners (java.awt.event.WindowFocusListener));
12747 });
12748 Clazz_defineMethod (c$, "getWindowStateListeners", 
12749 function () {
12750 return (this.getListeners (java.awt.event.WindowStateListener));
12751 });
12752 Clazz_defineMethod (c$, "getListeners", 
12753 function (listenerType) {
12754 var l = null;
12755 if (listenerType === java.awt.event.WindowFocusListener) {
12756 l = this.windowFocusListener;
12757 } else if (listenerType === java.awt.event.WindowStateListener) {
12758 l = this.windowStateListener;
12759 } else if (listenerType === java.awt.event.WindowListener) {
12760 l = this.windowListener;
12761 } else {
12762 return Clazz_superCall (this, java.awt.Window, "getListeners", [listenerType]);
12763 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
12764 }, "Class");
12765 Clazz_defineMethod (c$, "eventEnabled", 
12766 function (e) {
12767 switch (e.id) {
12768 case 200:
12769 case 201:
12770 case 202:
12771 case 203:
12772 case 204:
12773 case 205:
12774 case 206:
12775 if ((this.eventMask & 64) != 0 || this.windowListener != null) {
12776 return true;
12777 }return false;
12778 case 207:
12779 case 208:
12780 if ((this.eventMask & 524288) != 0 || this.windowFocusListener != null) {
12781 return true;
12782 }return false;
12783 case 209:
12784 if ((this.eventMask & 262144) != 0 || this.windowStateListener != null) {
12785 return true;
12786 }return false;
12787 default:
12788 break;
12789 }
12790 return Clazz_superCall (this, java.awt.Window, "eventEnabled", [e]);
12791 }, "java.awt.AWTEvent");
12792 Clazz_overrideMethod (c$, "processEvent", 
12793 function (e) {
12794 if (Clazz_instanceOf (e, java.awt.event.WindowEvent)) {
12795 switch (e.getID ()) {
12796 case 200:
12797 case 201:
12798 case 202:
12799 case 203:
12800 case 204:
12801 case 205:
12802 case 206:
12803 this.processWindowEvent (e);
12804 break;
12805 case 207:
12806 case 208:
12807 this.processWindowFocusEvent (e);
12808 break;
12809 case 209:
12810 this.processWindowStateEvent (e);
12811 default:
12812 break;
12813 }
12814 return;
12815 }this.processEventCont (e);
12816 }, "java.awt.AWTEvent");
12817 Clazz_defineMethod (c$, "processWindowEvent", 
12818 function (e) {
12819 var listener = this.windowListener;
12820 if (listener != null) {
12821 switch (e.getID ()) {
12822 case 200:
12823 listener.windowOpened (e);
12824 break;
12825 case 201:
12826 listener.windowClosing (e);
12827 break;
12828 case 202:
12829 listener.windowClosed (e);
12830 break;
12831 case 203:
12832 listener.windowIconified (e);
12833 break;
12834 case 204:
12835 listener.windowDeiconified (e);
12836 break;
12837 case 205:
12838 listener.windowActivated (e);
12839 break;
12840 case 206:
12841 listener.windowDeactivated (e);
12842 break;
12843 default:
12844 break;
12845 }
12846 }}, "java.awt.event.WindowEvent");
12847 Clazz_defineMethod (c$, "processWindowFocusEvent", 
12848 function (e) {
12849 var listener = this.windowFocusListener;
12850 if (listener != null) {
12851 switch (e.getID ()) {
12852 case 207:
12853 listener.windowGainedFocus (e);
12854 break;
12855 case 208:
12856 listener.windowLostFocus (e);
12857 break;
12858 default:
12859 break;
12860 }
12861 }}, "java.awt.event.WindowEvent");
12862 Clazz_defineMethod (c$, "processWindowStateEvent", 
12863 function (e) {
12864 var listener = this.windowStateListener;
12865 if (listener != null) {
12866 switch (e.getID ()) {
12867 case 209:
12868 listener.windowStateChanged (e);
12869 break;
12870 default:
12871 break;
12872 }
12873 }}, "java.awt.event.WindowEvent");
12874 Clazz_overrideMethod (c$, "preProcessKeyEvent", 
12875 function (e) {
12876 }, "java.awt.event.KeyEvent");
12877 Clazz_overrideMethod (c$, "postProcessKeyEvent", 
12878 function (e) {
12879 }, "java.awt.event.KeyEvent");
12880 Clazz_defineMethod (c$, "setAlwaysOnTop", 
12881 function (alwaysOnTop) {
12882 var oldAlwaysOnTop;
12883 {
12884 oldAlwaysOnTop = this.alwaysOnTop;
12885 this.alwaysOnTop = alwaysOnTop;
12886 }if (oldAlwaysOnTop != alwaysOnTop) {
12887 if (this.isAlwaysOnTopSupported ()) {
12888 }this.firePropertyChangeBool ("alwaysOnTop", oldAlwaysOnTop, alwaysOnTop);
12889 }}, "~B");
12890 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
12891 function () {
12892 return java.awt.Toolkit.getDefaultToolkit ().isAlwaysOnTopSupported ();
12893 });
12894 Clazz_defineMethod (c$, "isAlwaysOnTop", 
12895 function () {
12896 return this.alwaysOnTop;
12897 });
12898 Clazz_defineMethod (c$, "isActive", 
12899 function () {
12900 return false;
12901 });
12902 Clazz_defineMethod (c$, "isFocused", 
12903 function () {
12904 return swingjs.JSToolkit.isFocused (this);
12905 });
12906 Clazz_overrideMethod (c$, "getFocusTraversalKeys", 
12907 function (id) {
12908 return null;
12909 }, "~N");
12910 Clazz_defineMethod (c$, "setFocusCycleRoot", 
12911 function (focusCycleRoot) {
12912 }, "~B");
12913 Clazz_defineMethod (c$, "isFocusCycleRoot", 
12914 function () {
12915 return true;
12916 });
12917 Clazz_overrideMethod (c$, "getFocusCycleRootAncestor", 
12918 function () {
12919 return null;
12920 });
12921 Clazz_defineMethod (c$, "isFocusableWindow", 
12922 function () {
12923 if (!this.getFocusableWindowState ()) {
12924 return false;
12925 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
12926 return true;
12927 }for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
12928 if (Clazz_instanceOf (owner, java.awt.Frame) || Clazz_instanceOf (owner, java.awt.Dialog)) {
12929 return owner.isShowing ();
12930 }}
12931 return false;
12932 });
12933 Clazz_defineMethod (c$, "getFocusableWindowState", 
12934 function () {
12935 return this.focusableWindowState;
12936 });
12937 Clazz_defineMethod (c$, "setFocusableWindowState", 
12938 function (focusableWindowState) {
12939 var oldFocusableWindowState;
12940 {
12941 oldFocusableWindowState = this.focusableWindowState;
12942 this.focusableWindowState = focusableWindowState;
12943 }this.firePropertyChangeBool ("focusableWindowState", oldFocusableWindowState, focusableWindowState);
12944 if (oldFocusableWindowState && !focusableWindowState && this.isFocused ()) {
12945 for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
12946 }
12947 }}, "~B");
12948 Clazz_defineMethod (c$, "dispatchEventImpl", 
12949 function (e) {
12950 if (e.getID () == 101) {
12951 this.invalidate ();
12952 this.validate ();
12953 }Clazz_superCall (this, java.awt.Window, "dispatchEventImpl", [e]);
12954 }, "java.awt.AWTEvent");
12955 Clazz_overrideMethod (c$, "postEvent", 
12956 function (e) {
12957 if (this.handleEvent (e)) {
12958 e.consume ();
12959 return true;
12960 }return false;
12961 }, "java.awt.Event");
12962 Clazz_defineMethod (c$, "isShowing", 
12963 function () {
12964 return this.visible;
12965 });
12966 Clazz_defineMethod (c$, "applyResourceBundle", 
12967 function (rb) {
12968 this.applyComponentOrientation (java.awt.ComponentOrientation.getOrientation (rb));
12969 }, "java.util.ResourceBundle");
12970 Clazz_defineMethod (c$, "applyResourceBundle", 
12971 function (rbName) {
12972 this.applyResourceBundle (java.util.ResourceBundle.getBundle (rbName));
12973 }, "~S");
12974 Clazz_defineMethod (c$, "addOwnedWindow", 
12975 function (weakWindow) {
12976 if (weakWindow != null) {
12977 {
12978 if (!this.ownedWindowList.contains (weakWindow)) {
12979 this.ownedWindowList.addElement (weakWindow);
12980 }}}}, "java.awt.Window");
12981 Clazz_defineMethod (c$, "removeOwnedWindow", 
12982 function (weakWindow) {
12983 if (weakWindow != null) {
12984 this.ownedWindowList.removeElement (weakWindow);
12985 }}, "java.awt.Window");
12986 Clazz_defineMethod (c$, "connectOwnedWindow", 
12987 function (child) {
12988 child.parent = this;
12989 this.addOwnedWindow (child);
12990 }, "java.awt.Window");
12991 Clazz_defineMethod (c$, "addToWindowList", 
12992  function () {
12993 var windowList = this.appContext.get (java.awt.Window);
12994 if (windowList == null) {
12995 windowList =  new java.util.Vector ();
12996 this.appContext.put (java.awt.Window, windowList);
12997 }windowList.add (this);
12998 });
12999 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
13000 function () {
13001 if (this.graphicsConfig == null) this.graphicsConfig = swingjs.JSToolkit.getGraphicsConfiguration ();
13002 return this.graphicsConfig;
13003 });
13004 Clazz_overrideMethod (c$, "resetGC", 
13005 function () {
13006 });
13007 Clazz_defineMethod (c$, "setLocationRelativeTo", 
13008 function (c) {
13009 var root = null;
13010 if (c != null) {
13011 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) {
13012 root = c;
13013 } else {
13014 var parent;
13015 for (parent = c.getParent (); parent != null; parent = parent.getParent ()) {
13016 if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
13017 root = parent;
13018 break;
13019 }}
13020 }}if ((c != null && !c.isShowing ()) || root == null || !root.isShowing ()) {
13021 var paneSize = this.getSize ();
13022 var centerPoint = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getCenterPoint ();
13023 this.setLocation (centerPoint.x - Clazz_doubleToInt (paneSize.width / 2), centerPoint.y - Clazz_doubleToInt (paneSize.height / 2));
13024 } else {
13025 var invokerSize = c.getSize ();
13026 var invokerScreenLocation = c.getLocationOnScreen ();
13027 var windowBounds = this.getBounds ();
13028 var dx = invokerScreenLocation.x + ((invokerSize.width - windowBounds.width) >> 1);
13029 var dy = invokerScreenLocation.y + ((invokerSize.height - windowBounds.height) >> 1);
13030 var ss = root.getGraphicsConfiguration ().getBounds ();
13031 if (dy + windowBounds.height > ss.y + ss.height) {
13032 dy = ss.y + ss.height - windowBounds.height;
13033 if (invokerScreenLocation.x - ss.x + Clazz_doubleToInt (invokerSize.width / 2) < Clazz_doubleToInt (ss.width / 2)) {
13034 dx = invokerScreenLocation.x + invokerSize.width;
13035 } else {
13036 dx = invokerScreenLocation.x - windowBounds.width;
13037 }}if (dx + windowBounds.width > ss.x + ss.width) {
13038 dx = ss.x + ss.width - windowBounds.width;
13039 }if (dx < ss.x) dx = ss.x;
13040 if (dy < ss.y) dy = ss.y;
13041 this.setLocation (dx, dy);
13042 }}, "java.awt.Component");
13043 Clazz_defineMethod (c$, "deliverMouseWheelToAncestor", 
13044 function (e) {
13045 }, "java.awt.event.MouseWheelEvent");
13046 Clazz_overrideMethod (c$, "dispatchMouseWheelToAncestor", 
13047 function (e) {
13048 return false;
13049 }, "java.awt.event.MouseWheelEvent");
13050 Clazz_defineMethod (c$, "getTemporaryLostComponent", 
13051 function () {
13052 return this.temporaryLostComponent;
13053 });
13054 Clazz_defineMethod (c$, "setTemporaryLostComponent", 
13055 function (component) {
13056 var previousComp = this.temporaryLostComponent;
13057 if (component == null || component.canBeFocusOwner ()) {
13058 this.temporaryLostComponent = component;
13059 } else {
13060 this.temporaryLostComponent = null;
13061 }return previousComp;
13062 }, "java.awt.Component");
13063 Clazz_defineMethod (c$, "canContainFocusOwner", 
13064 function (focusOwnerCandidate) {
13065 return Clazz_superCall (this, java.awt.Window, "canContainFocusOwner", [focusOwnerCandidate]) && this.isFocusableWindow ();
13066 }, "java.awt.Component");
13067 Clazz_defineMethod (c$, "setBounds", 
13068 function (r) {
13069 this.setBounds (r.x, r.y, r.width, r.height);
13070 }, "java.awt.Rectangle");
13071 Clazz_overrideMethod (c$, "isRecursivelyVisible", 
13072 function () {
13073 return this.visible;
13074 });
13075 Clazz_defineMethod (c$, "getOpacity", 
13076 function () {
13077 {
13078 return this.opacity;
13079 }});
13080 Clazz_defineMethod (c$, "setOpacity", 
13081 function (opacity) {
13082 {
13083 if (opacity < 0.0 || opacity > 1.0) {
13084 throw  new IllegalArgumentException ("The value of opacity should be in the range [0.0f .. 1.0f].");
13085 }this.opacity = opacity;
13086 }}, "~N");
13087 Clazz_defineMethod (c$, "getShape", 
13088 function () {
13089 {
13090 return this.shape;
13091 }});
13092 Clazz_defineMethod (c$, "setShape", 
13093 function (shape) {
13094 {
13095 this.shape = shape;
13096 }}, "java.awt.Shape");
13097 Clazz_defineMethod (c$, "setOpaque", 
13098 function (opaque) {
13099 {
13100 java.awt.Window.setLayersOpaque (this, opaque);
13101 this.opaque = opaque;
13102 var peer = this.getPeer ();
13103 if (peer != null) {
13104 peer.setOpaque (opaque);
13105 }}}, "~B");
13106 c$.setLayersOpaque = Clazz_defineMethod (c$, "setLayersOpaque", 
13107  function (component, isOpaque) {
13108 if (Clazz_instanceOf (component, javax.swing.RootPaneContainer)) {
13109 var rpc = component;
13110 var root = rpc.getRootPane ();
13111 var lp = root.getLayeredPane ();
13112 var c = root.getContentPane ();
13113 var content = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
13114 lp.setOpaque (isOpaque);
13115 root.setOpaque (isOpaque);
13116 root.setDoubleBuffered (isOpaque);
13117 if (content != null) {
13118 content.setOpaque (isOpaque);
13119 content.setDoubleBuffered (isOpaque);
13120 var numChildren = content.getComponentCount ();
13121 if (numChildren > 0) {
13122 var child = content.getComponent (0);
13123 if (Clazz_instanceOf (child, javax.swing.RootPaneContainer)) {
13124 java.awt.Window.setLayersOpaque (child, isOpaque);
13125 }}}}var bg = component.getBackground ();
13126 var hasTransparentBg = java.awt.Window.TRANSPARENT_BACKGROUND_COLOR.equals (bg);
13127 var container = null;
13128 if (Clazz_instanceOf (component, java.awt.Container)) {
13129 container = component;
13130 }if (isOpaque) {
13131 if (hasTransparentBg) {
13132 var newColor = null;
13133 if (container != null && container.preserveBackgroundColor != null) {
13134 newColor = container.preserveBackgroundColor;
13135 } else {
13136 newColor =  new java.awt.Color (255, 255, 255);
13137 }component.setBackground (newColor);
13138 }} else {
13139 if (!hasTransparentBg && container != null) {
13140 container.preserveBackgroundColor = bg;
13141 }component.setBackground (java.awt.Window.TRANSPARENT_BACKGROUND_COLOR);
13142 }}, "java.awt.Component,~B");
13143 Clazz_overrideMethod (c$, "getContainer", 
13144 function () {
13145 return null;
13146 });
13147 Clazz_overrideMethod (c$, "mixOnReshaping", 
13148 function () {
13149 });
13150 Clazz_overrideMethod (c$, "getLocationOnWindow", 
13151 function () {
13152 return  new java.awt.Point (0, 0);
13153 });
13154 c$.$Window$1DisposeAction$ = function () {
13155 Clazz_pu$h(self.c$);
13156 c$ = Clazz_decorateAsClass (function () {
13157 Clazz_prepareCallback (this, arguments);
13158 Clazz_instantialize (this, arguments);
13159 }, java.awt, "Window$1DisposeAction", null, Runnable);
13160 Clazz_overrideMethod (c$, "run", 
13161 function () {
13162 var a;
13163 {
13164 a =  new Array (this.b$["java.awt.Window"].ownedWindowList.size ());
13165 this.b$["java.awt.Window"].ownedWindowList.copyInto (a);
13166 }for (var b = 0; b < a.length; b++) {
13167 var c = (((a[b])));
13168 if (c != null) {
13169 c.disposeImpl ();
13170 }}
13171 this.b$["java.awt.Window"].hide ();
13172 this.b$["java.awt.Window"].beforeFirstShow = true;
13173 this.b$["java.awt.Window"].removeNotify ();
13174 this.b$["java.awt.Window"].clearCurrentFocusCycleRootOnHide ();
13175 });
13176 c$ = Clazz_p0p ();
13177 };
13178 Clazz_defineStatics (c$,
13179 "systemSyncLWRequests", false,
13180 "OPENED", 0x01,
13181 "base", "win",
13182 "nameCounter", 0,
13183 "allWindows", null);
13184 c$.TRANSPARENT_BACKGROUND_COLOR = c$.prototype.TRANSPARENT_BACKGROUND_COLOR =  new java.awt.Color (0, 0, 0, 0);
13185 c$ = Clazz_decorateAsClass (function () {
13186 this.focusRoot = null;
13187 this.focusOwner = null;
13188 Clazz_instantialize (this, arguments);
13189 }, java.awt, "FocusManager");
13190 });
13191 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(){
13192 c$=Clazz_decorateAsClass(function(){
13193 this.elementCount=0;
13194 this.elementData=null;
13195 this.capacityIncrement=0;
13196 Clazz_instantialize(this,arguments);
13197 },java.util,"Vector",java.util.AbstractList,[java.util.List,java.util.RandomAccess,Cloneable,java.io.Serializable]);
13198 Clazz_makeConstructor(c$,
13199 function(){
13200 this.construct(10,0);
13201 });
13202 Clazz_makeConstructor(c$,
13203 function(capacity){
13204 this.construct(capacity,0);
13205 },"~N");
13206 Clazz_makeConstructor(c$,
13207 function(capacity,capacityIncrement){
13208 Clazz_superConstructor(this,java.util.Vector,[]);
13209 this.elementCount=0;
13210 try{
13211 this.elementData=this.newElementArray(capacity);
13212 }catch(e){
13213 if(Clazz_instanceOf(e,NegativeArraySizeException)){
13214 throw new IllegalArgumentException();
13215 }else{
13216 throw e;
13217 }
13218 }
13219 this.capacityIncrement=capacityIncrement;
13220 },"~N,~N");
13221 Clazz_makeConstructor(c$,
13222 function(collection){
13223 this.construct(collection.size(),0);
13224 var it=collection.iterator();
13225 while(it.hasNext()){
13226 this.elementData[this.elementCount++]=it.next();
13227 }
13228 },"java.util.Collection");
13229 Clazz_defineMethod(c$,"newElementArray",
13230 ($fz=function(size){
13231 return new Array(size);
13232 },$fz.isPrivate=true,$fz),"~N");
13233 Clazz_defineMethod(c$,"add",
13234 function(location,object){
13235 this.insertElementAt(object,location);
13236 },"~N,~O");
13237 Clazz_defineMethod(c$,"add",
13238 function(object){
13239 this.addElement(object);
13240 return true;
13241 },"~O");
13242 Clazz_defineMethod(c$,"addAll",
13243 function(location,collection){
13244 if(0<=location&&location<=this.elementCount){
13245 var size=collection.size();
13246 if(size==0){
13247 return false;
13248 }var required=size-(this.elementData.length-this.elementCount);
13249 if(required>0){
13250 this.growBy(required);
13251 }var count=this.elementCount-location;
13252 if(count>0){
13253 System.arraycopy(this.elementData,location,this.elementData,location+size,count);
13254 }var it=collection.iterator();
13255 while(it.hasNext()){
13256 this.elementData[location++]=it.next();
13257 }
13258 this.elementCount+=size;
13259 this.modCount++;
13260 return true;
13261 }throw new ArrayIndexOutOfBoundsException(location);
13262 },"~N,java.util.Collection");
13263 Clazz_defineMethod(c$,"addAll",
13264 function(collection){
13265 return this.addAll(this.elementCount,collection);
13266 },"java.util.Collection");
13267 Clazz_defineMethod(c$,"addElement",
13268 function(object){
13269 if(this.elementCount==this.elementData.length){
13270 this.growByOne();
13271 }this.elementData[this.elementCount++]=object;
13272 this.modCount++;
13273 },"~O");
13274 Clazz_defineMethod(c$,"capacity",
13275 function(){
13276 return this.elementData.length;
13277 });
13278 Clazz_overrideMethod(c$,"clear",
13279 function(){
13280 this.removeAllElements();
13281 });
13282 Clazz_defineMethod(c$,"clone",
13283 function(){
13284 try{
13285 var vector=Clazz_superCall(this,java.util.Vector,"clone",[]);
13286 vector.elementData=this.elementData.clone();
13287 return vector;
13288 }catch(e){
13289 if(Clazz_instanceOf(e,CloneNotSupportedException)){
13290 return null;
13291 }else{
13292 throw e;
13293 }
13294 }
13295 });
13296 Clazz_overrideMethod(c$,"contains",
13297 function(object){
13298 return this.indexOf(object,0)!=-1;
13299 },"~O");
13300 Clazz_defineMethod(c$,"copyInto",
13301 function(elements){
13302 System.arraycopy(this.elementData,0,elements,0,this.elementCount);
13303 },"~A");
13304 Clazz_defineMethod(c$,"elementAt",
13305 function(location){
13306 if(location<this.elementCount){
13307 return this.elementData[location];
13308 }throw new ArrayIndexOutOfBoundsException(location);
13309 },"~N");
13310 Clazz_defineMethod(c$,"elements",
13311 function(){
13312 return((Clazz_isClassDefined("java.util.Vector$1")?0:java.util.Vector.$Vector$1$()),Clazz_innerTypeInstance(java.util.Vector$1,this,null));
13313 });
13314 Clazz_defineMethod(c$,"ensureCapacity",
13315 function(minimumCapacity){
13316 if(this.elementData.length<minimumCapacity){
13317 var next=(this.capacityIncrement<=0?this.elementData.length:this.capacityIncrement)+this.elementData.length;
13318 this.grow(minimumCapacity>next?minimumCapacity:next);
13319 }},"~N");
13320 Clazz_overrideMethod(c$,"equals",
13321 function(object){
13322 if(this===object){
13323 return true;
13324 }if(Clazz_instanceOf(object,java.util.List)){
13325 var list=object;
13326 if(list.size()!=this.size()){
13327 return false;
13328 }var index=0;
13329 var it=list.iterator();
13330 while(it.hasNext()){
13331 var e1=this.elementData[index++];
13332 var e2=it.next();
13333 if(!(e1==null?e2==null:e1.equals(e2))){
13334 return false;
13335 }}
13336 return true;
13337 }return false;
13338 },"~O");
13339 Clazz_defineMethod(c$,"firstElement",
13340 function(){
13341 if(this.elementCount>0){
13342 return this.elementData[0];
13343 }throw new java.util.NoSuchElementException();
13344 });
13345 Clazz_overrideMethod(c$,"get",
13346 function(location){
13347 return this.elementAt(location);
13348 },"~N");
13349 Clazz_defineMethod(c$,"grow",
13350 ($fz=function(newCapacity){
13351 var newData=this.newElementArray(newCapacity);
13352 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13353 this.elementData=newData;
13354 },$fz.isPrivate=true,$fz),"~N");
13355 Clazz_defineMethod(c$,"growByOne",
13356 ($fz=function(){
13357 var adding=0;
13358 if(this.capacityIncrement<=0){
13359 if((adding=this.elementData.length)==0){
13360 adding=1;
13361 }}else{
13362 adding=this.capacityIncrement;
13363 }var newData=this.newElementArray(this.elementData.length+adding);
13364 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13365 this.elementData=newData;
13366 },$fz.isPrivate=true,$fz));
13367 Clazz_defineMethod(c$,"growBy",
13368 ($fz=function(required){
13369 var adding=0;
13370 if(this.capacityIncrement<=0){
13371 if((adding=this.elementData.length)==0){
13372 adding=required;
13373 }while(adding<required){
13374 adding+=adding;
13375 }
13376 }else{
13377 adding=(Math.floor(required/this.capacityIncrement))*this.capacityIncrement;
13378 if(adding<required){
13379 adding+=this.capacityIncrement;
13380 }}var newData=this.newElementArray(this.elementData.length+adding);
13381 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13382 this.elementData=newData;
13383 },$fz.isPrivate=true,$fz),"~N");
13384 Clazz_overrideMethod(c$,"hashCode",
13385 function(){
13386 var result=1;
13387 for(var i=0;i<this.elementCount;i++){
13388 result=(31*result)+(this.elementData[i]==null?0:this.elementData[i].hashCode());
13389 }
13390 return result;
13391 });
13392 Clazz_defineMethod(c$,"indexOf",
13393 function(object){
13394 return this.indexOf(object,0);
13395 },"~O");
13396 Clazz_defineMethod(c$,"indexOf",
13397 function(object,location){
13398 if(object!=null){
13399 for(var i=location;i<this.elementCount;i++){
13400 if(object.equals(this.elementData[i])){
13401 return i;
13402 }}
13403 }else{
13404 for(var i=location;i<this.elementCount;i++){
13405 if(this.elementData[i]==null){
13406 return i;
13407 }}
13408 }return-1;
13409 },"~O,~N");
13410 Clazz_defineMethod(c$,"insertElementAt",
13411 function(object,location){
13412 if(0<=location&&location<=this.elementCount){
13413 if(this.elementCount==this.elementData.length){
13414 this.growByOne();
13415 }var count=this.elementCount-location;
13416 if(count>0){
13417 System.arraycopy(this.elementData,location,this.elementData,location+1,count);
13418 }this.elementData[location]=object;
13419 this.elementCount++;
13420 this.modCount++;
13421 }else{
13422 throw new ArrayIndexOutOfBoundsException(location);
13423 }},"~O,~N");
13424 Clazz_overrideMethod(c$,"isEmpty",
13425 function(){
13426 return this.elementCount==0;
13427 });
13428 Clazz_defineMethod(c$,"lastElement",
13429 function(){
13430 try{
13431 return this.elementData[this.elementCount-1];
13432 }catch(e){
13433 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
13434 throw new java.util.NoSuchElementException();
13435 }else{
13436 throw e;
13437 }
13438 }
13439 });
13440 Clazz_defineMethod(c$,"lastIndexOf",
13441 function(object){
13442 return this.lastIndexOf(object,this.elementCount-1);
13443 },"~O");
13444 Clazz_defineMethod(c$,"lastIndexOf",
13445 function(object,location){
13446 if(location<this.elementCount){
13447 if(object!=null){
13448 for(var i=location;i>=0;i--){
13449 if(object.equals(this.elementData[i])){
13450 return i;
13451 }}
13452 }else{
13453 for(var i=location;i>=0;i--){
13454 if(this.elementData[i]==null){
13455 return i;
13456 }}
13457 }return-1;
13458 }throw new ArrayIndexOutOfBoundsException(location);
13459 },"~O,~N");
13460 Clazz_defineMethod(c$,"remove",
13461 function(location){
13462 if(location<this.elementCount){
13463 var result=this.elementData[location];
13464 this.elementCount--;
13465 var size=this.elementCount-location;
13466 if(size>0){
13467 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13468 }this.elementData[this.elementCount]=null;
13469 this.modCount++;
13470 return result;
13471 }throw new ArrayIndexOutOfBoundsException(location);
13472 },"~N");
13473 Clazz_defineMethod(c$,"remove",
13474 function(object){
13475 return this.removeElement(object);
13476 },"~O");
13477 Clazz_defineMethod(c$,"removeAllElements",
13478 function(){
13479 java.util.Arrays.fill(this.elementData,0,this.elementCount,null);
13480 this.modCount++;
13481 this.elementCount=0;
13482 });
13483 Clazz_defineMethod(c$,"removeElement",
13484 function(object){
13485 var index;
13486 if((index=this.indexOf(object,0))==-1){
13487 return false;
13488 }this.removeElementAt(index);
13489 return true;
13490 },"~O");
13491 Clazz_defineMethod(c$,"removeElementAt",
13492 function(location){
13493 if(0<=location&&location<this.elementCount){
13494 this.elementCount--;
13495 var size=this.elementCount-location;
13496 if(size>0){
13497 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13498 }this.elementData[this.elementCount]=null;
13499 this.modCount++;
13500 }else{
13501 throw new ArrayIndexOutOfBoundsException(location);
13502 }},"~N");
13503 Clazz_overrideMethod(c$,"removeRange",
13504 function(start,end){
13505 if(start>=0&&start<=end&&end<=this.size()){
13506 if(start==end){
13507 return;
13508 }if(end!=this.elementCount){
13509 System.arraycopy(this.elementData,end,this.elementData,start,this.elementCount-end);
13510 var newCount=this.elementCount-(end-start);
13511 java.util.Arrays.fill(this.elementData,newCount,this.elementCount,null);
13512 this.elementCount=newCount;
13513 }else{
13514 java.util.Arrays.fill(this.elementData,start,this.elementCount,null);
13515 this.elementCount=start;
13516 }this.modCount++;
13517 }else{
13518 throw new IndexOutOfBoundsException();
13519 }},"~N,~N");
13520 Clazz_overrideMethod(c$,"set",
13521 function(location,object){
13522 if(location<this.elementCount){
13523 var result=this.elementData[location];
13524 this.elementData[location]=object;
13525 return result;
13526 }throw new ArrayIndexOutOfBoundsException(location);
13527 },"~N,~O");
13528 Clazz_defineMethod(c$,"setElementAt",
13529 function(object,location){
13530 if(location<this.elementCount){
13531 this.elementData[location]=object;
13532 }else{
13533 throw new ArrayIndexOutOfBoundsException(location);
13534 }},"~O,~N");
13535 Clazz_defineMethod(c$,"setSize",
13536 function(length){
13537 if(length==this.elementCount){
13538 return;
13539 }this.ensureCapacity(length);
13540 if(this.elementCount>length){
13541 java.util.Arrays.fill(this.elementData,length,this.elementCount,null);
13542 }this.elementCount=length;
13543 this.modCount++;
13544 },"~N");
13545 Clazz_overrideMethod(c$,"size",
13546 function(){
13547 return this.elementCount;
13548 });
13549 Clazz_overrideMethod(c$,"subList",
13550 function(start,end){
13551 return new java.util.Collections.SynchronizedRandomAccessList(Clazz_superCall(this,java.util.Vector,"subList",[start,end]),this);
13552 },"~N,~N");
13553 Clazz_defineMethod(c$,"toArray",
13554 function(){
13555 var result=new Array(this.elementCount);
13556 System.arraycopy(this.elementData,0,result,0,this.elementCount);
13557 return result;
13558 });
13559 Clazz_defineMethod(c$,"toArray",
13560 function(contents){
13561 if(this.elementCount>contents.length){
13562 var ct=contents.getClass().getComponentType();
13563 contents=java.lang.reflect.Array.newInstance(ct,this.elementCount);
13564 }System.arraycopy(this.elementData,0,contents,0,this.elementCount);
13565 if(this.elementCount<contents.length){
13566 contents[this.elementCount]=null;
13567 }return contents;
13568 },"~A");
13569 Clazz_overrideMethod(c$,"toString",
13570 function(){
13571 if(this.elementCount==0){
13572 return"[]";
13573 }var length=this.elementCount-1;
13574 var buffer=new StringBuffer(this.size()*16);
13575 buffer.append('[');
13576 for(var i=0;i<length;i++){
13577 if(this.elementData[i]===this){
13578 buffer.append("(this Collection)");
13579 }else{
13580 buffer.append(this.elementData[i]);
13581 }buffer.append(", ");
13582 }
13583 if(this.elementData[length]===this){
13584 buffer.append("(this Collection)");
13585 }else{
13586 buffer.append(this.elementData[length]);
13587 }buffer.append(']');
13588 return buffer.toString();
13589 });
13590 Clazz_defineMethod(c$,"trimToSize",
13591 function(){
13592 if(this.elementData.length!=this.elementCount){
13593 this.grow(this.elementCount);
13594 }});
13595 c$.$Vector$1$=function(){
13596 Clazz_pu$h(self.c$);
13597 c$=Clazz_decorateAsClass(function(){
13598 Clazz_prepareCallback(this,arguments);
13599 this.pos=0;
13600 Clazz_instantialize(this,arguments);
13601 },java.util,"Vector$1",null,java.util.Enumeration);
13602 Clazz_overrideMethod(c$,"hasMoreElements",
13603 function(){
13604 return this.pos<this.b$["java.util.Vector"].elementCount;
13605 });
13606 Clazz_overrideMethod(c$,"nextElement",
13607 function(){
13608 {
13609 if(this.pos<this.b$["java.util.Vector"].elementCount){
13610 return this.b$["java.util.Vector"].elementData[this.pos++];
13611 }}throw new java.util.NoSuchElementException();
13612 });
13613 c$=Clazz_p0p();
13614 };
13615 Clazz_defineStatics(c$,
13616 "DEFAULT_SIZE",10);
13617 });
13618 Clazz_declarePackage ("java.awt");
13619 Clazz_load (["java.awt.Paint"], "java.awt.Color", ["java.lang.IllegalArgumentException", "java.awt.ColorPaintContext"], function () {
13620 c$ = Clazz_decorateAsClass (function () {
13621 this.value = 0;
13622 this.frgbvalue = null;
13623 this.falpha = 0.0;
13624 this.context = null;
13625 Clazz_instantialize (this, arguments);
13626 }, java.awt, "Color", null, java.awt.Paint);
13627 c$.testColorValueRange = Clazz_defineMethod (c$, "testColorValueRange", 
13628  function (r, g, b, a) {
13629 var rangeError = false;
13630 var badComponentString = "";
13631 if (a < 0 || a > 255) {
13632 rangeError = true;
13633 badComponentString = badComponentString + " Alpha";
13634 }if (r < 0 || r > 255) {
13635 rangeError = true;
13636 badComponentString = badComponentString + " Red";
13637 }if (g < 0 || g > 255) {
13638 rangeError = true;
13639 badComponentString = badComponentString + " Green";
13640 }if (b < 0 || b > 255) {
13641 rangeError = true;
13642 badComponentString = badComponentString + " Blue";
13643 }if (rangeError == true) {
13644 throw  new IllegalArgumentException ("Color parameter outside of expected range:" + badComponentString);
13645 }}, "~N,~N,~N,~N");
13646 Clazz_makeConstructor (c$, 
13647 function () {
13648 {
13649 var a = arguments;
13650 switch(a.length) {
13651 case 0:
13652 break;
13653 case 1:
13654 this.value = (a[0].value ? a[0].value : 0xff000000 | a[0]);
13655 break;
13656 case 2:
13657 this.value = (a[1] ? a[0] : 0xff000000 | a[0]);
13658 break;
13659 case 3:
13660 this.setColor4(a[0], a[1], a[2], 255);
13661 break;
13662 case 4:
13663 this.setColor4(a[0], a[1], a[2], a[3]);
13664 break;
13665 }
13666 return this;
13667 }});
13668 Clazz_defineMethod (c$, "setColor4", 
13669  function (r, g, b, a) {
13670 this.value = ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0);
13671 java.awt.Color.testColorValueRange (r, g, b, a);
13672 }, "~N,~N,~N,~N");
13673 Clazz_defineMethod (c$, "setFloat", 
13674  function (r, g, b, f) {
13675 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));
13676 this.frgbvalue =  Clazz_newFloatArray (3, 0);
13677 this.frgbvalue[0] = r;
13678 this.frgbvalue[1] = g;
13679 this.frgbvalue[2] = b;
13680 this.falpha = f;
13681 }, "~N,~N,~N,~N");
13682 c$.getColorF4 = Clazz_defineMethod (c$, "getColorF4", 
13683 function (r, g, b, a) {
13684 var c =  new java.awt.Color ();
13685 c.setFloat (r, g, b, a);
13686 return c;
13687 }, "~N,~N,~N,~N");
13688 Clazz_defineMethod (c$, "getRed", 
13689 function () {
13690 return (this.getRGB () >> 16) & 0xFF;
13691 });
13692 Clazz_defineMethod (c$, "getGreen", 
13693 function () {
13694 return (this.getRGB () >> 8) & 0xFF;
13695 });
13696 Clazz_defineMethod (c$, "getBlue", 
13697 function () {
13698 return (this.getRGB () >> 0) & 0xFF;
13699 });
13700 Clazz_defineMethod (c$, "getAlpha", 
13701 function () {
13702 return (this.getRGB () >> 24) & 0xff;
13703 });
13704 Clazz_defineMethod (c$, "getRGB", 
13705 function () {
13706 return this.value;
13707 });
13708 Clazz_defineMethod (c$, "brighter", 
13709 function () {
13710 var r = this.getRed ();
13711 var g = this.getGreen ();
13712 var b = this.getBlue ();
13713 var i = Clazz_doubleToInt (3.333333333333333);
13714 if (r == 0 && g == 0 && b == 0) {
13715 return  new java.awt.Color (i, i, i);
13716 }if (r > 0 && r < i) r = i;
13717 if (g > 0 && g < i) g = i;
13718 if (b > 0 && b < i) b = i;
13719 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));
13720 });
13721 Clazz_defineMethod (c$, "darker", 
13722 function () {
13723 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));
13724 });
13725 Clazz_overrideMethod (c$, "hashCode", 
13726 function () {
13727 return this.value;
13728 });
13729 Clazz_overrideMethod (c$, "equals", 
13730 function (obj) {
13731 return Clazz_instanceOf (obj, java.awt.Color) && (obj).getRGB () == this.getRGB ();
13732 }, "~O");
13733 Clazz_overrideMethod (c$, "toString", 
13734 function () {
13735 return this.getClass ().getName () + "[r=" + this.getRed () + ",g=" + this.getGreen () + ",b=" + this.getBlue () + "]";
13736 });
13737 c$.decode = Clazz_defineMethod (c$, "decode", 
13738 function (nm) {
13739 var intval = Integer.decode (nm);
13740 var i = intval.intValue ();
13741 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13742 }, "~S");
13743 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13744 function (nm) {
13745 return java.awt.Color.getColor (nm, null);
13746 }, "~S");
13747 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13748 function (nm, v) {
13749 var intval = Integer.getInteger (nm);
13750 if (intval == null) {
13751 return v;
13752 }var i = intval.intValue ();
13753 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13754 }, "~S,java.awt.Color");
13755 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13756 function (nm, v) {
13757 var intval = Integer.getInteger (nm);
13758 var i = (intval != null) ? intval.intValue () : v;
13759 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, (i >> 0) & 0xFF);
13760 }, "~S,~N");
13761 c$.HSBtoRGB = Clazz_defineMethod (c$, "HSBtoRGB", 
13762 function (hue, saturation, brightness) {
13763 var r = 0;
13764 var g = 0;
13765 var b = 0;
13766 if (saturation == 0) {
13767 r = g = b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13768 } else {
13769 var h = (hue - Math.floor (hue)) * 6.0;
13770 var f = h - java.lang.Math.floor (h);
13771 var p = brightness * (1.0 - saturation);
13772 var q = brightness * (1.0 - saturation * f);
13773 var t = brightness * (1.0 - (saturation * (1.0 - f)));
13774 switch (Clazz_floatToInt (h)) {
13775 case 0:
13776 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13777 g = Clazz_floatToInt (t * 255.0 + 0.5);
13778 b = Clazz_floatToInt (p * 255.0 + 0.5);
13779 break;
13780 case 1:
13781 r = Clazz_floatToInt (q * 255.0 + 0.5);
13782 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13783 b = Clazz_floatToInt (p * 255.0 + 0.5);
13784 break;
13785 case 2:
13786 r = Clazz_floatToInt (p * 255.0 + 0.5);
13787 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13788 b = Clazz_floatToInt (t * 255.0 + 0.5);
13789 break;
13790 case 3:
13791 r = Clazz_floatToInt (p * 255.0 + 0.5);
13792 g = Clazz_floatToInt (q * 255.0 + 0.5);
13793 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13794 break;
13795 case 4:
13796 r = Clazz_floatToInt (t * 255.0 + 0.5);
13797 g = Clazz_floatToInt (p * 255.0 + 0.5);
13798 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13799 break;
13800 case 5:
13801 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13802 g = Clazz_floatToInt (p * 255.0 + 0.5);
13803 b = Clazz_floatToInt (q * 255.0 + 0.5);
13804 break;
13805 }
13806 }return 0xff000000 | (r << 16) | (g << 8) | (b << 0);
13807 }, "~N,~N,~N");
13808 c$.RGBtoHSB = Clazz_defineMethod (c$, "RGBtoHSB", 
13809 function (r, g, b, hsbvals) {
13810 var hue;
13811 var saturation;
13812 var brightness;
13813 if (hsbvals == null) {
13814 hsbvals =  Clazz_newFloatArray (3, 0);
13815 }var cmax = (r > g) ? r : g;
13816 if (b > cmax) cmax = b;
13817 var cmin = (r < g) ? r : g;
13818 if (b < cmin) cmin = b;
13819 brightness = (cmax) / 255.0;
13820 if (cmax != 0) saturation = ((cmax - cmin)) / (cmax);
13821  else saturation = 0;
13822 if (saturation == 0) hue = 0;
13823  else {
13824 var redc = ((cmax - r)) / ((cmax - cmin));
13825 var greenc = ((cmax - g)) / ((cmax - cmin));
13826 var bluec = ((cmax - b)) / ((cmax - cmin));
13827 if (r == cmax) hue = bluec - greenc;
13828  else if (g == cmax) hue = 2.0 + redc - bluec;
13829  else hue = 4.0 + greenc - redc;
13830 hue = hue / 6.0;
13831 if (hue < 0) hue = hue + 1.0;
13832 }hsbvals[0] = hue;
13833 hsbvals[1] = saturation;
13834 hsbvals[2] = brightness;
13835 return hsbvals;
13836 }, "~N,~N,~N,~A");
13837 c$.getHSBColor = Clazz_defineMethod (c$, "getHSBColor", 
13838 function (h, s, b) {
13839 return  new java.awt.Color (java.awt.Color.HSBtoRGB (h, s, b));
13840 }, "~N,~N,~N");
13841 Clazz_defineMethod (c$, "getRGBComponents", 
13842 function (compArray) {
13843 var f;
13844 if (compArray == null) {
13845 f =  Clazz_newFloatArray (4, 0);
13846 } else {
13847 f = compArray;
13848 }if (this.frgbvalue == null) {
13849 f[0] = (this.getRed ()) / 255;
13850 f[1] = (this.getGreen ()) / 255;
13851 f[2] = (this.getBlue ()) / 255;
13852 f[3] = (this.getAlpha ()) / 255;
13853 } else {
13854 f[0] = this.frgbvalue[0];
13855 f[1] = this.frgbvalue[1];
13856 f[2] = this.frgbvalue[2];
13857 f[3] = this.falpha;
13858 }return f;
13859 }, "~A");
13860 Clazz_defineMethod (c$, "getRGBColorComponents", 
13861 function (compArray) {
13862 var f;
13863 if (compArray == null) {
13864 f =  Clazz_newFloatArray (3, 0);
13865 } else {
13866 f = compArray;
13867 }if (this.frgbvalue == null) {
13868 f[0] = (this.getRed ()) / 255;
13869 f[1] = (this.getGreen ()) / 255;
13870 f[2] = (this.getBlue ()) / 255;
13871 } else {
13872 f[0] = this.frgbvalue[0];
13873 f[1] = this.frgbvalue[1];
13874 f[2] = this.frgbvalue[2];
13875 }return f;
13876 }, "~A");
13877 Clazz_overrideMethod (c$, "createContext", 
13878 function (cm, r, r2d, xform, hints) {
13879 if (this.context == null || this.context.getRGB () != this.getRGB ()) {
13880 this.context =  new java.awt.ColorPaintContext (this.getRGB (), cm);
13881 }return this.context;
13882 }, "java.awt.image.ColorModel,java.awt.Rectangle,java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform,java.awt.RenderingHints");
13883 Clazz_overrideMethod (c$, "getTransparency", 
13884 function () {
13885 var alpha = this.getAlpha ();
13886 if (alpha == 0xff) {
13887 return 1;
13888 } else if (alpha == 0) {
13889 return 2;
13890 } else {
13891 return 3;
13892 }});
13893 c$.white = c$.prototype.white =  new java.awt.Color (255, 255, 255);
13894 c$.WHITE = c$.prototype.WHITE = java.awt.Color.white;
13895 c$.lightGray = c$.prototype.lightGray =  new java.awt.Color (192, 192, 192);
13896 c$.LIGHT_GRAY = c$.prototype.LIGHT_GRAY = java.awt.Color.lightGray;
13897 c$.gray = c$.prototype.gray =  new java.awt.Color (128, 128, 128);
13898 c$.GRAY = c$.prototype.GRAY = java.awt.Color.gray;
13899 c$.darkGray = c$.prototype.darkGray =  new java.awt.Color (64, 64, 64);
13900 c$.DARK_GRAY = c$.prototype.DARK_GRAY = java.awt.Color.darkGray;
13901 c$.black = c$.prototype.black =  new java.awt.Color (0, 0, 0);
13902 c$.BLACK = c$.prototype.BLACK = java.awt.Color.black;
13903 c$.red = c$.prototype.red =  new java.awt.Color (255, 0, 0);
13904 c$.RED = c$.prototype.RED = java.awt.Color.red;
13905 c$.pink = c$.prototype.pink =  new java.awt.Color (255, 175, 175);
13906 c$.PINK = c$.prototype.PINK = java.awt.Color.pink;
13907 c$.orange = c$.prototype.orange =  new java.awt.Color (255, 200, 0);
13908 c$.ORANGE = c$.prototype.ORANGE = java.awt.Color.orange;
13909 c$.yellow = c$.prototype.yellow =  new java.awt.Color (255, 255, 0);
13910 c$.YELLOW = c$.prototype.YELLOW = java.awt.Color.yellow;
13911 c$.green = c$.prototype.green =  new java.awt.Color (0, 255, 0);
13912 c$.GREEN = c$.prototype.GREEN = java.awt.Color.green;
13913 c$.magenta = c$.prototype.magenta =  new java.awt.Color (255, 0, 255);
13914 c$.MAGENTA = c$.prototype.MAGENTA = java.awt.Color.magenta;
13915 c$.cyan = c$.prototype.cyan =  new java.awt.Color (0, 255, 255);
13916 c$.CYAN = c$.prototype.CYAN = java.awt.Color.cyan;
13917 c$.blue = c$.prototype.blue =  new java.awt.Color (0, 0, 255);
13918 c$.BLUE = c$.prototype.BLUE = java.awt.Color.blue;
13919 Clazz_defineStatics (c$,
13920 "FACTOR", 0.7);
13921 });
13922 Clazz_declarePackage ("java.awt");
13923 Clazz_load (["java.awt.Transparency"], "java.awt.Paint", null, function () {
13924 Clazz_declareInterface (java.awt, "Paint", java.awt.Transparency);
13925 });
13926 Clazz_declarePackage ("java.awt");
13927 c$ = Clazz_declareInterface (java.awt, "Transparency");
13928 Clazz_defineStatics (c$,
13929 "OPAQUE", 1,
13930 "BITMASK", 2,
13931 "TRANSLUCENT", 3);
13932 Clazz_declarePackage ("java.awt");
13933 Clazz_load (["java.awt.PaintContext"], "java.awt.ColorPaintContext", ["java.awt.image.ColorModel"], function () {
13934 c$ = Clazz_decorateAsClass (function () {
13935 this.color = 0;
13936 Clazz_instantialize (this, arguments);
13937 }, java.awt, "ColorPaintContext", null, java.awt.PaintContext);
13938 Clazz_makeConstructor (c$, 
13939 function (color, cm) {
13940 this.color = color;
13941 }, "~N,java.awt.image.ColorModel");
13942 Clazz_overrideMethod (c$, "dispose", 
13943 function () {
13944 });
13945 Clazz_defineMethod (c$, "getRGB", 
13946 function () {
13947 return this.color;
13948 });
13949 Clazz_overrideMethod (c$, "getColorModel", 
13950 function () {
13951 return java.awt.image.ColorModel.getRGBdefault ();
13952 });
13953 });
13954 Clazz_declarePackage ("java.awt");
13955 Clazz_declareInterface (java.awt, "PaintContext");
13956 Clazz_declarePackage ("java.awt.image");
13957 Clazz_load (["java.awt.Transparency", "java.awt.color.ColorSpace"], "java.awt.image.ColorModel", ["java.lang.IllegalArgumentException", "$.NullPointerException", "$.UnsupportedOperationException", "JU.AU"], function () {
13958 c$ = Clazz_decorateAsClass (function () {
13959 this.pixel_bits = 0;
13960 this.nBits = null;
13961 this.transparency = 3;
13962 this.supportsAlpha = true;
13963 this.$isAlphaPremultiplied = false;
13964 this.numComponents = -1;
13965 this.numColorComponents = -1;
13966 this.colorSpace = null;
13967 this.colorSpaceType = 5;
13968 this.maxBits = 0;
13969 this.is_sRGB = true;
13970 this.transferType = 0;
13971 Clazz_instantialize (this, arguments);
13972 }, java.awt.image, "ColorModel", null, java.awt.Transparency);
13973 Clazz_prepareFields (c$, function () {
13974 this.colorSpace = java.awt.color.ColorSpace.getInstance (1000);
13975 });
13976 c$.getRGBdefault = Clazz_defineMethod (c$, "getRGBdefault", 
13977 function () {
13978 if (java.awt.image.ColorModel.RGBdefault == null) {
13979 java.awt.image.ColorModel.RGBdefault =  new java.awt.image.DirectColorModel (32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
13980 }return java.awt.image.ColorModel.RGBdefault;
13981 });
13982 Clazz_makeConstructor (c$, 
13983 function (bits) {
13984 this.pixel_bits = bits;
13985 if (bits < 1) {
13986 throw  new IllegalArgumentException ("Number of bits must be > 0");
13987 }this.numComponents = 4;
13988 this.numColorComponents = 3;
13989 this.maxBits = bits;
13990 this.transferType = java.awt.image.ColorModel.getDefaultTransferType (bits);
13991 }, "~N");
13992 Clazz_makeConstructor (c$, 
13993 function (pixel_bits, bits, cspace, hasAlpha, isAlphaPremultiplied, transparency, transferType) {
13994 this.colorSpace = cspace;
13995 this.colorSpaceType = cspace.getType ();
13996 this.numColorComponents = cspace.getNumComponents ();
13997 this.numComponents = this.numColorComponents + (hasAlpha ? 1 : 0);
13998 this.supportsAlpha = hasAlpha;
13999 if (bits.length < this.numComponents) {
14000 throw  new IllegalArgumentException ("Number of color/alpha components should be " + this.numComponents + " but length of bits array is " + bits.length);
14001 }if (transparency < 1 || transparency > 3) {
14002 throw  new IllegalArgumentException ("Unknown transparency: " + transparency);
14003 }if (this.supportsAlpha == false) {
14004 this.$isAlphaPremultiplied = false;
14005 this.transparency = 1;
14006 } else {
14007 this.$isAlphaPremultiplied = isAlphaPremultiplied;
14008 this.transparency = transparency;
14009 }this.nBits = bits.clone ();
14010 this.pixel_bits = pixel_bits;
14011 if (pixel_bits <= 0) {
14012 throw  new IllegalArgumentException ("Number of pixel bits must be > 0");
14013 }this.maxBits = 0;
14014 for (var i = 0; i < bits.length; i++) {
14015 if (bits[i] < 0) {
14016 throw  new IllegalArgumentException ("Number of bits must be >= 0");
14017 }if (this.maxBits < bits[i]) {
14018 this.maxBits = bits[i];
14019 }}
14020 if (this.maxBits == 0) {
14021 throw  new IllegalArgumentException ("There must be at least one component with > 0 pixel bits.");
14022 }if (cspace !== java.awt.color.ColorSpace.getInstance (1000)) {
14023 this.is_sRGB = false;
14024 }this.transferType = transferType;
14025 }, "~N,~A,java.awt.color.ColorSpace,~B,~B,~N,~N");
14026 Clazz_defineMethod (c$, "hasAlpha", 
14027 function () {
14028 return this.supportsAlpha;
14029 });
14030 Clazz_defineMethod (c$, "isAlphaPremultiplied", 
14031 function () {
14032 return this.$isAlphaPremultiplied;
14033 });
14034 Clazz_defineMethod (c$, "getTransferType", 
14035 function () {
14036 return this.transferType;
14037 });
14038 Clazz_defineMethod (c$, "getPixelSize", 
14039 function () {
14040 return this.pixel_bits;
14041 });
14042 Clazz_defineMethod (c$, "getComponentSize", 
14043 function (componentIdx) {
14044 if (this.nBits == null) {
14045 throw  new NullPointerException ("Number of bits array is null.");
14046 }return this.nBits[componentIdx];
14047 }, "~N");
14048 Clazz_defineMethod (c$, "getComponentSize", 
14049 function () {
14050 if (this.nBits != null) {
14051 return this.nBits.clone ();
14052 }return null;
14053 });
14054 Clazz_overrideMethod (c$, "getTransparency", 
14055 function () {
14056 return this.transparency;
14057 });
14058 Clazz_defineMethod (c$, "getNumComponents", 
14059 function () {
14060 return this.numComponents;
14061 });
14062 Clazz_defineMethod (c$, "getNumColorComponents", 
14063 function () {
14064 return this.numColorComponents;
14065 });
14066 Clazz_defineMethod (c$, "getRGB", 
14067 function (pixel) {
14068 return (this.getAlpha (pixel) << 24) | (this.getRed (pixel) << 16) | (this.getGreen (pixel) << 8) | (this.getBlue (pixel) << 0);
14069 }, "~N");
14070 Clazz_defineMethod (c$, "getRed", 
14071 function (inData) {
14072 var pixel = 0;
14073 var length = 0;
14074 var idata = inData;
14075 pixel = idata[0];
14076 length = idata.length;
14077 if (length == 1) {
14078 return this.getRed (pixel);
14079 } else {
14080 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14081 }}, "~O");
14082 Clazz_defineMethod (c$, "getGreen", 
14083 function (inData) {
14084 var pixel = 0;
14085 var length = 0;
14086 var idata = inData;
14087 pixel = idata[0];
14088 length = idata.length;
14089 if (length == 1) {
14090 return this.getGreen (pixel);
14091 } else {
14092 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14093 }}, "~O");
14094 Clazz_defineMethod (c$, "getBlue", 
14095 function (inData) {
14096 var pixel = 0;
14097 var length = 0;
14098 var idata = inData;
14099 pixel = idata[0];
14100 length = idata.length;
14101 if (length == 1) {
14102 return this.getBlue (pixel);
14103 } else {
14104 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14105 }}, "~O");
14106 Clazz_defineMethod (c$, "getAlpha", 
14107 function (inData) {
14108 var pixel = 0;
14109 var length = 0;
14110 var idata = inData;
14111 pixel = idata[0];
14112 length = idata.length;
14113 if (length == 1) {
14114 return this.getAlpha (pixel);
14115 } else {
14116 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14117 }}, "~O");
14118 Clazz_defineMethod (c$, "getRGB", 
14119 function (inData) {
14120 return (this.getAlpha (inData) << 24) | (this.getRed (inData) << 16) | (this.getGreen (inData) << 8) | (this.getBlue (inData) << 0);
14121 }, "~O");
14122 Clazz_defineMethod (c$, "getDataElements", 
14123 function (rgb, pixel) {
14124 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14125 }, "~N,~O");
14126 Clazz_defineMethod (c$, "getComponents", 
14127 function (pixel, components, offset) {
14128 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14129 }, "~N,~A,~N");
14130 Clazz_defineMethod (c$, "getComponents", 
14131 function (pixel, components, offset) {
14132 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14133 }, "~O,~A,~N");
14134 Clazz_defineMethod (c$, "getUnnormalizedComponents", 
14135 function (normComponents, normOffset, components, offset) {
14136 if (this.colorSpace == null) {
14137 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14138 }if (this.nBits == null) {
14139 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14140 }if ((normComponents.length - normOffset) < this.numComponents) {
14141 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14142 }if (components == null) {
14143 components =  Clazz_newIntArray (offset + this.numComponents, 0);
14144 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14145 var normAlpha = normComponents[normOffset + this.numColorComponents];
14146 for (var i = 0; i < this.numColorComponents; i++) {
14147 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) * normAlpha + 0.5);
14148 }
14149 components[offset + this.numColorComponents] = Clazz_floatToInt (normAlpha * ((1 << this.nBits[this.numColorComponents]) - 1) + 0.5);
14150 } else {
14151 for (var i = 0; i < this.numComponents; i++) {
14152 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) + 0.5);
14153 }
14154 }return components;
14155 }, "~A,~N,~A,~N");
14156 Clazz_defineMethod (c$, "getNormalizedComponents", 
14157 function (components, offset, normComponents, normOffset) {
14158 if (this.colorSpace == null) {
14159 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14160 }if (this.nBits == null) {
14161 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14162 }if ((components.length - offset) < this.numComponents) {
14163 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14164 }if (normComponents == null) {
14165 normComponents =  Clazz_newFloatArray (this.numComponents + normOffset, 0);
14166 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14167 var normAlpha = components[offset + this.numColorComponents];
14168 normAlpha /= ((1 << this.nBits[this.numColorComponents]) - 1);
14169 if (normAlpha != 0.0) {
14170 for (var i = 0; i < this.numColorComponents; i++) {
14171 normComponents[normOffset + i] = (components[offset + i]) / (normAlpha * (((1 << this.nBits[i]) - 1)));
14172 }
14173 } else {
14174 for (var i = 0; i < this.numColorComponents; i++) {
14175 normComponents[normOffset + i] = 0.0;
14176 }
14177 }normComponents[normOffset + this.numColorComponents] = normAlpha;
14178 } else {
14179 for (var i = 0; i < this.numComponents; i++) {
14180 normComponents[normOffset + i] = (components[offset + i]) / (((1 << this.nBits[i]) - 1));
14181 }
14182 }return normComponents;
14183 }, "~A,~N,~A,~N");
14184 Clazz_defineMethod (c$, "getDataElement", 
14185 function (components, offset) {
14186 return this.getDataElementInt (components, offset);
14187 }, "~A,~N");
14188 Clazz_defineMethod (c$, "getDataElementInt", 
14189 function (components, offset) {
14190 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14191 }, "~A,~N");
14192 Clazz_defineMethod (c$, "getDataElement", 
14193 function (normComponents, normOffset) {
14194 if (JU.AU.isAI (normComponents)) {
14195 var ints = normComponents;
14196 return this.getDataElementInt (ints, normOffset);
14197 }var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14198 return this.getDataElement (components, 0);
14199 }, "~A,~N");
14200 Clazz_defineMethod (c$, "getDataElements", 
14201 function (normComponents, normOffset, obj) {
14202 var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14203 return this.getDataElements (components, 0, obj);
14204 }, "~A,~N,~O");
14205 Clazz_defineMethod (c$, "getNormalizedComponents", 
14206 function (pixel, normComponents, normOffset) {
14207 var components = this.getComponents (pixel, null, 0);
14208 return this.getNormalizedComponents (components, 0, normComponents, normOffset);
14209 }, "~O,~A,~N");
14210 Clazz_overrideMethod (c$, "equals", 
14211 function (obj) {
14212 if (!(Clazz_instanceOf (obj, java.awt.image.ColorModel))) {
14213 return false;
14214 }var cm = obj;
14215 if (this === cm) {
14216 return true;
14217 }if (this.supportsAlpha != cm.hasAlpha () || this.$isAlphaPremultiplied != cm.isAlphaPremultiplied () || this.pixel_bits != cm.getPixelSize () || this.transparency != cm.getTransparency () || this.numComponents != cm.getNumComponents ()) {
14218 return false;
14219 }var nb = cm.getComponentSize ();
14220 if ((this.nBits != null) && (nb != null)) {
14221 for (var i = 0; i < this.numComponents; i++) {
14222 if (this.nBits[i] != nb[i]) {
14223 return false;
14224 }}
14225 } else {
14226 return ((this.nBits == null) && (nb == null));
14227 }return true;
14228 }, "~O");
14229 Clazz_overrideMethod (c$, "hashCode", 
14230 function () {
14231 var result = 0;
14232 result = (this.supportsAlpha ? 2 : 3) + (this.$isAlphaPremultiplied ? 4 : 5) + this.pixel_bits * 6 + this.transparency * 7 + this.numComponents * 8;
14233 if (this.nBits != null) {
14234 for (var i = 0; i < this.numComponents; i++) {
14235 result = result + this.nBits[i] * (i + 9);
14236 }
14237 }return result;
14238 });
14239 Clazz_defineMethod (c$, "getColorSpace", 
14240 function () {
14241 return this.colorSpace;
14242 });
14243 Clazz_defineMethod (c$, "isCompatibleRaster", 
14244 function (raster) {
14245 throw  new UnsupportedOperationException ("This method has not been implemented for this ColorModel.");
14246 }, "java.awt.image.Raster");
14247 Clazz_defineMethod (c$, "createCompatibleWritableRaster", 
14248 function (w, h) {
14249 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14250 }, "~N,~N");
14251 Clazz_defineMethod (c$, "createCompatibleSampleModel", 
14252 function (w, h) {
14253 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14254 }, "~N,~N");
14255 Clazz_defineMethod (c$, "isCompatibleSampleModel", 
14256 function (sm) {
14257 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14258 }, "java.awt.image.SampleModel");
14259 Clazz_overrideMethod (c$, "finalize", 
14260 function () {
14261 });
14262 Clazz_defineMethod (c$, "getAlphaRaster", 
14263 function (raster) {
14264 return null;
14265 }, "java.awt.image.WritableRaster");
14266 Clazz_overrideMethod (c$, "toString", 
14267 function () {
14268 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);
14269 });
14270 c$.getDefaultTransferType = Clazz_defineMethod (c$, "getDefaultTransferType", 
14271 function (pixel_bits) {
14272 if (pixel_bits <= 8) {
14273 return 0;
14274 }return 3;
14275 }, "~N");
14276 c$.isLinearRGBspace = Clazz_defineMethod (c$, "isLinearRGBspace", 
14277 function (cs) {
14278 return false;
14279 }, "java.awt.color.ColorSpace");
14280 c$.isLinearGRAYspace = Clazz_defineMethod (c$, "isLinearGRAYspace", 
14281 function (cs) {
14282 return false;
14283 }, "java.awt.color.ColorSpace");
14284 Clazz_defineStatics (c$,
14285 "RGBdefault", null,
14286 "l8Tos8", null,
14287 "s8Tol8", null,
14288 "l16Tos8", null,
14289 "s8Tol16", null,
14290 "g8Tos8Map", null,
14291 "lg16Toog8Map", null,
14292 "g16Tos8Map", null,
14293 "lg16Toog16Map", null);
14294 });
14295 Clazz_declarePackage ("java.awt.color");
14296 Clazz_load (null, "java.awt.color.ColorSpace", ["java.lang.IllegalArgumentException"], function () {
14297 c$ = Clazz_decorateAsClass (function () {
14298 this.type = 0;
14299 this.numComponents = 0;
14300 this.compName = null;
14301 Clazz_instantialize (this, arguments);
14302 }, java.awt.color, "ColorSpace");
14303 Clazz_makeConstructor (c$, 
14304 function (type, numcomponents) {
14305 this.type = type;
14306 this.numComponents = numcomponents;
14307 }, "~N,~N");
14308 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
14309 function (colorspace) {
14310 var theColorSpace;
14311 switch (colorspace) {
14312 default:
14313 case 1000:
14314 if (java.awt.color.ColorSpace.sRGBspace == null) {
14315 java.awt.color.ColorSpace.sRGBspace =  new java.awt.color.ColorSpace (5, 3);
14316 }theColorSpace = java.awt.color.ColorSpace.sRGBspace;
14317 break;
14318 }
14319 return theColorSpace;
14320 }, "~N");
14321 Clazz_defineMethod (c$, "isCS_sRGB", 
14322 function () {
14323 return (this === java.awt.color.ColorSpace.sRGBspace);
14324 });
14325 Clazz_defineMethod (c$, "toRGB", 
14326 function (colorvalue) {
14327 return colorvalue;
14328 }, "~A");
14329 Clazz_defineMethod (c$, "fromRGB", 
14330 function (rgbvalue) {
14331 return rgbvalue;
14332 }, "~A");
14333 Clazz_defineMethod (c$, "getType", 
14334 function () {
14335 return this.type;
14336 });
14337 Clazz_defineMethod (c$, "getNumComponents", 
14338 function () {
14339 return this.numComponents;
14340 });
14341 Clazz_defineMethod (c$, "getName", 
14342 function (idx) {
14343 if ((idx < 0) || (idx > this.numComponents - 1)) {
14344 throw  new IllegalArgumentException ("Component index out of range: " + idx);
14345 }if (this.compName == null) {
14346 switch (this.type) {
14347 case 0:
14348 this.compName =  Clazz_newArray (-1, ["X", "Y", "Z"]);
14349 break;
14350 case 1:
14351 this.compName =  Clazz_newArray (-1, ["L", "a", "b"]);
14352 break;
14353 case 2:
14354 this.compName =  Clazz_newArray (-1, ["L", "u", "v"]);
14355 break;
14356 case 3:
14357 this.compName =  Clazz_newArray (-1, ["Y", "Cb", "Cr"]);
14358 break;
14359 case 4:
14360 this.compName =  Clazz_newArray (-1, ["Y", "x", "y"]);
14361 break;
14362 case 5:
14363 this.compName =  Clazz_newArray (-1, ["Red", "Green", "Blue"]);
14364 break;
14365 case 6:
14366 this.compName =  Clazz_newArray (-1, ["Gray"]);
14367 break;
14368 case 7:
14369 this.compName =  Clazz_newArray (-1, ["Hue", "Saturation", "Value"]);
14370 break;
14371 case 8:
14372 this.compName =  Clazz_newArray (-1, ["Hue", "Lightness", "Saturation"]);
14373 break;
14374 case 9:
14375 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow", "Black"]);
14376 break;
14377 case 11:
14378 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow"]);
14379 break;
14380 default:
14381 var tmp =  new Array (this.numComponents);
14382 for (var i = 0; i < tmp.length; i++) {
14383 tmp[i] = "Unnamed color component(" + i + ")";
14384 }
14385 this.compName = tmp;
14386 }
14387 }return this.compName[idx];
14388 }, "~N");
14389 Clazz_defineMethod (c$, "getMinValue", 
14390 function (component) {
14391 if ((component < 0) || (component > this.numComponents - 1)) {
14392 throw  new IllegalArgumentException ("Component index out of range: " + component);
14393 }return 0.0;
14394 }, "~N");
14395 Clazz_defineMethod (c$, "getMaxValue", 
14396 function (component) {
14397 if ((component < 0) || (component > this.numComponents - 1)) {
14398 throw  new IllegalArgumentException ("Component index out of range: " + component);
14399 }return 1.0;
14400 }, "~N");
14401 Clazz_defineStatics (c$,
14402 "sRGBspace", null,
14403 "TYPE_XYZ", 0,
14404 "TYPE_Lab", 1,
14405 "TYPE_Luv", 2,
14406 "TYPE_YCbCr", 3,
14407 "TYPE_Yxy", 4,
14408 "TYPE_RGB", 5,
14409 "TYPE_GRAY", 6,
14410 "TYPE_HSV", 7,
14411 "TYPE_HLS", 8,
14412 "TYPE_CMYK", 9,
14413 "TYPE_CMY", 11,
14414 "TYPE_2CLR", 12,
14415 "TYPE_3CLR", 13,
14416 "TYPE_4CLR", 14,
14417 "TYPE_5CLR", 15,
14418 "TYPE_6CLR", 16,
14419 "TYPE_7CLR", 17,
14420 "TYPE_8CLR", 18,
14421 "TYPE_9CLR", 19,
14422 "TYPE_ACLR", 20,
14423 "TYPE_BCLR", 21,
14424 "TYPE_CCLR", 22,
14425 "TYPE_DCLR", 23,
14426 "TYPE_ECLR", 24,
14427 "TYPE_FCLR", 25,
14428 "CS_sRGB", 1000,
14429 "CS_LINEAR_RGB", 1004,
14430 "CS_CIEXYZ", 1001,
14431 "CS_PYCC", 1002,
14432 "CS_GRAY", 1003);
14433 });
14434 Clazz_declarePackage ("java.util");
14435 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 () {
14436 c$ = Clazz_decorateAsClass (function () {
14437 this.parent = null;
14438 this.locale = null;
14439 this.expired = false;
14440 this.$keySet = null;
14441 Clazz_instantialize (this, arguments);
14442 }, java.util, "ResourceBundle");
14443 Clazz_makeConstructor (c$, 
14444 function () {
14445 });
14446 Clazz_defineMethod (c$, "getString", 
14447 function (key) {
14448 return this.getObject (key);
14449 }, "~S");
14450 Clazz_defineMethod (c$, "getStringArray", 
14451 function (key) {
14452 return this.getObject (key);
14453 }, "~S");
14454 Clazz_defineMethod (c$, "getObject", 
14455 function (key) {
14456 var obj = this.handleGetObject (key);
14457 if (obj == null) {
14458 if (this.parent != null) {
14459 obj = this.parent.getObject (key);
14460 }if (obj == null) throw  new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key);
14461 }return obj;
14462 }, "~S");
14463 Clazz_defineMethod (c$, "getLocale", 
14464 function () {
14465 return this.locale;
14466 });
14467 Clazz_defineMethod (c$, "setParent", 
14468 function (parent) {
14469 this.parent = parent;
14470 }, "java.util.ResourceBundle");
14471 c$.getBundle = Clazz_defineMethod (c$, "getBundle", 
14472 function (baseName, targetLocale, loader, control) {
14473 var n = 4;
14474 {
14475 n = arguments.length;
14476 }switch (n) {
14477 case 2:
14478 if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) {
14479 control = targetLocale;
14480 targetLocale = null;
14481 }break;
14482 case 3:
14483 if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) {
14484 control = loader;
14485 loader = null;
14486 }break;
14487 }
14488 if (targetLocale == null) targetLocale = java.util.Locale.getDefault ();
14489 if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
14490 return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control);
14491 }, "~S,~O,~O,java.util.ResourceBundle.Control");
14492 c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", 
14493  function (baseName, locale, loader, control) {
14494 if (control == null) {
14495 throw  new NullPointerException ("ResourceBundle locale or control is null");
14496 }var cacheKey =  new java.util.ResourceBundle.CacheKey (baseName, locale, loader);
14497 var bundle = null;
14498 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14499 if (bundleRef != null) {
14500 bundle = bundleRef;
14501 bundleRef = null;
14502 }if (java.util.ResourceBundle.isValidBundle (bundle)) {
14503 return bundle;
14504 }var formats = control.getFormats (baseName);
14505 var baseBundle = null;
14506 for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) {
14507 var candidateLocales = control.getCandidateLocales (baseName, targetLocale);
14508 bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle);
14509 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14510 var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale);
14511 if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) {
14512 break;
14513 }if (isBaseBundle && baseBundle == null) {
14514 baseBundle = bundle;
14515 }}}
14516 if (bundle == null) {
14517 if (baseBundle == null) {
14518 java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ());
14519 }bundle = baseBundle;
14520 }return bundle;
14521 }, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control");
14522 c$.findBundle = Clazz_defineMethod (c$, "findBundle", 
14523  function (cacheKey, candidateLocales, formats, index, control, baseBundle) {
14524 var targetLocale = candidateLocales.get (index);
14525 var parent = null;
14526 if (index != candidateLocales.size () - 1) {
14527 parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle);
14528 } else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) {
14529 return baseBundle;
14530 }var expiredBundle = false;
14531 cacheKey.setLocale (targetLocale);
14532 var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control);
14533 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14534 expiredBundle = bundle.expired;
14535 if (!expiredBundle) {
14536 if (bundle.parent === parent) {
14537 return bundle;
14538 }var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14539 if (bundleRef != null && bundleRef === bundle) {
14540 java.util.ResourceBundle.cacheList.remove (cacheKey);
14541 }}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) {
14542 var constKey = cacheKey.clone ();
14543 try {
14544 try {
14545 bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle);
14546 if (bundle != null) {
14547 if (bundle.parent == null) {
14548 bundle.setParent (parent);
14549 }bundle.locale = targetLocale;
14550 bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control);
14551 return bundle;
14552 }java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control);
14553 } finally {
14554 }
14555 } finally {
14556 if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) {
14557 Thread.currentThread ().interrupt ();
14558 }}
14559 }return parent;
14560 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");
14561 c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", 
14562  function (cacheKey, formats, control, reload) {
14563 var targetLocale = cacheKey.getLocale ();
14564 var bundle = null;
14565 var size = formats.size ();
14566 for (var i = 0; i < size; i++) {
14567 var format = formats.get (i);
14568 try {
14569 bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload);
14570 } catch (e$$) {
14571 if (Clazz_exceptionOf (e$$, LinkageError)) {
14572 var error = e$$;
14573 {
14574 cacheKey.setCause (error);
14575 }
14576 } else if (Clazz_exceptionOf (e$$, Exception)) {
14577 var cause = e$$;
14578 {
14579 cacheKey.setCause (cause);
14580 }
14581 } else {
14582 throw e$$;
14583 }
14584 }
14585 if (bundle != null) {
14586 cacheKey.setFormat (format);
14587 bundle.locale = targetLocale;
14588 bundle.expired = false;
14589 break;
14590 }}
14591 return bundle;
14592 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B");
14593 c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", 
14594  function (bundle) {
14595 return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE;
14596 }, "java.util.ResourceBundle");
14597 c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", 
14598  function (baseName, locale, cause) {
14599 if (Clazz_instanceOf (cause, java.util.MissingResourceException)) {
14600 cause = null;
14601 }throw  new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause);
14602 }, "~S,java.util.Locale,Throwable");
14603 c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", 
14604  function (cacheKey, control) {
14605 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14606 if (bundleRef == null) {
14607 return null;
14608 }var bundle = bundleRef;
14609 return bundle;
14610 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control");
14611 c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", 
14612  function (cacheKey, bundle, control) {
14613 var key = cacheKey.clone ();
14614 java.util.ResourceBundle.cacheList.put (key, bundle);
14615 return bundle;
14616 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control");
14617 c$.clearCache = Clazz_defineMethod (c$, "clearCache", 
14618 function () {
14619 java.util.ResourceBundle.cacheList.clear ();
14620 });
14621 Clazz_defineMethod (c$, "containsKey", 
14622 function (key) {
14623 if (key == null) {
14624 throw  new NullPointerException ();
14625 }for (var rb = this; rb != null; rb = rb.parent) {
14626 if (rb.handleKeySet ().contains (key)) {
14627 return true;
14628 }}
14629 return false;
14630 }, "~S");
14631 Clazz_defineMethod (c$, "keySet", 
14632 function () {
14633 var keys =  new java.util.HashSet ();
14634 for (var rb = this; rb != null; rb = rb.parent) {
14635 keys.addAll (rb.handleKeySet ());
14636 }
14637 return keys;
14638 });
14639 Clazz_defineMethod (c$, "handleKeySet", 
14640 function () {
14641 if (this.$keySet == null) {
14642 {
14643 if (this.$keySet == null) {
14644 var keys =  new java.util.HashSet ();
14645 var enumKeys = this.getKeys ();
14646 while (enumKeys.hasMoreElements ()) {
14647 var key = enumKeys.nextElement ();
14648 if (this.handleGetObject (key) != null) {
14649 keys.add (key);
14650 }}
14651 this.$keySet = keys;
14652 }}}return this.$keySet;
14653 });
14654 c$.$ResourceBundle$1$ = function () {
14655 Clazz_pu$h(self.c$);
14656 c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle);
14657 Clazz_defineMethod (c$, "getKeys", 
14658 function () {
14659 return null;
14660 });
14661 Clazz_defineMethod (c$, "handleGetObject", 
14662 function (key) {
14663 return null;
14664 }, "~S");
14665 Clazz_overrideMethod (c$, "toString", 
14666 function () {
14667 return "NONEXISTENT_BUNDLE";
14668 });
14669 c$ = Clazz_p0p ();
14670 };
14671 Clazz_pu$h(self.c$);
14672 c$ = Clazz_decorateAsClass (function () {
14673 this.name = null;
14674 this.locale = null;
14675 this.format = null;
14676 this.cause = null;
14677 this.hashCodeCache = 0;
14678 Clazz_instantialize (this, arguments);
14679 }, java.util.ResourceBundle, "CacheKey", null, Cloneable);
14680 Clazz_makeConstructor (c$, 
14681 function (a, b, c) {
14682 this.name = a;
14683 this.locale = b;
14684 if (this.name != null) this.calculateHashCode ();
14685 }, "~S,java.util.Locale,~O");
14686 Clazz_defineMethod (c$, "getName", 
14687 function () {
14688 return this.name;
14689 });
14690 Clazz_defineMethod (c$, "getLocale", 
14691 function () {
14692 return this.locale;
14693 });
14694 Clazz_defineMethod (c$, "setLocale", 
14695 function (a) {
14696 if (!this.locale.equals (a)) {
14697 this.locale = a;
14698 this.calculateHashCode ();
14699 }return this;
14700 }, "java.util.Locale");
14701 Clazz_overrideMethod (c$, "equals", 
14702 function (a) {
14703 if (this === a) {
14704 return true;
14705 }try {
14706 var b = a;
14707 if (this.hashCodeCache != b.hashCodeCache) {
14708 return false;
14709 }if (!this.name.equals (b.name)) {
14710 return false;
14711 }if (!this.locale.equals (b.locale)) {
14712 return false;
14713 }return true;
14714 } catch (e$$) {
14715 if (Clazz_exceptionOf (e$$, NullPointerException)) {
14716 var e = e$$;
14717 {
14718 }
14719 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
14720 var e = e$$;
14721 {
14722 }
14723 } else {
14724 throw e$$;
14725 }
14726 }
14727 return false;
14728 }, "~O");
14729 Clazz_overrideMethod (c$, "hashCode", 
14730 function () {
14731 return this.hashCodeCache;
14732 });
14733 Clazz_defineMethod (c$, "calculateHashCode", 
14734  function () {
14735 this.hashCodeCache = this.name.hashCode () << 3;
14736 this.hashCodeCache ^= this.locale.hashCode ();
14737 });
14738 Clazz_defineMethod (c$, "clone", 
14739 function () {
14740 try {
14741 var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []);
14742 a.cause = null;
14743 return a;
14744 } catch (e) {
14745 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
14746 throw  new InternalError ();
14747 } else {
14748 throw e;
14749 }
14750 }
14751 });
14752 Clazz_defineMethod (c$, "setFormat", 
14753 function (a) {
14754 this.format = a;
14755 }, "~S");
14756 Clazz_defineMethod (c$, "setCause", 
14757  function (a) {
14758 if (this.cause == null) {
14759 this.cause = a;
14760 } else {
14761 if (Clazz_instanceOf (this.cause, ClassNotFoundException)) {
14762 this.cause = a;
14763 }}}, "Throwable");
14764 Clazz_defineMethod (c$, "getCause", 
14765  function () {
14766 return this.cause;
14767 });
14768 Clazz_overrideMethod (c$, "toString", 
14769 function () {
14770 var a = this.locale.toString ();
14771 if (a.length == 0) {
14772 if (this.locale.getVariant ().length != 0) {
14773 a = "__" + this.locale.getVariant ();
14774 } else {
14775 a = "\"\"";
14776 }}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]";
14777 });
14778 c$ = Clazz_p0p ();
14779 Clazz_pu$h(self.c$);
14780 c$ = Clazz_declareType (java.util.ResourceBundle, "Control");
14781 Clazz_makeConstructor (c$, 
14782 function () {
14783 });
14784 c$.getControl = Clazz_defineMethod (c$, "getControl", 
14785 function (a) {
14786 if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14787 return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY;
14788 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14789 return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY;
14790 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14791 return java.util.ResourceBundle.Control.INSTANCE;
14792 }throw  new IllegalArgumentException ();
14793 }, "java.util.List");
14794 c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", 
14795 function (a) {
14796 if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14797 return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK;
14798 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14799 return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK;
14800 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14801 return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK;
14802 }throw  new IllegalArgumentException ();
14803 }, "java.util.List");
14804 Clazz_defineMethod (c$, "getFormats", 
14805 function (a) {
14806 if (a == null) {
14807 throw  new NullPointerException ();
14808 }return java.util.ResourceBundle.Control.FORMAT_DEFAULT;
14809 }, "~S");
14810 Clazz_defineMethod (c$, "getCandidateLocales", 
14811 function (a, b) {
14812 if (a == null) {
14813 throw  new NullPointerException ();
14814 }var c = b.getLanguage ();
14815 var d = b.getCountry ();
14816 var e = b.getVariant ();
14817 var f =  new java.util.ArrayList (4);
14818 if (e.length > 0) {
14819 f.add (b);
14820 }if (d.length > 0) {
14821 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, ""));
14822 }if (c.length > 0) {
14823 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", ""));
14824 }f.add (java.util.Locale.ROOT);
14825 return f;
14826 }, "~S,java.util.Locale");
14827 Clazz_defineMethod (c$, "getFallbackLocale", 
14828 function (a, b) {
14829 if (a == null) {
14830 throw  new NullPointerException ();
14831 }var c = java.util.Locale.getDefault ();
14832 return b.equals (c) ? null : c;
14833 }, "~S,java.util.Locale");
14834 Clazz_defineMethod (c$, "newBundle", 
14835 function (a, b, c, d, e) {
14836 var f = this.toBundleName (a, b);
14837 var g = null;
14838 if (c.equals ("java.class")) {
14839 g = swingjs.api.Interface.getInstance (f, false);
14840 } else if (c.equals ("java.properties")) {
14841 var h = this.toResourceName0 (f, "properties");
14842 if (h == null) {
14843 return null;
14844 }var i = swingjs.JSToolkit.getJavaResource (h);
14845 var j = null;
14846 j = (i == null ? null :  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ())));
14847 if (j != null) {
14848 try {
14849 g = this.newPropertyBundle (j);
14850 } finally {
14851 j.close ();
14852 }
14853 }} else {
14854 throw  new IllegalArgumentException ("unknown format: " + c);
14855 }return g;
14856 }, "~S,java.util.Locale,~S,~O,~B");
14857 Clazz_defineMethod (c$, "newPropertyBundle", 
14858  function (a) {
14859 return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a);
14860 }, "java.io.InputStream");
14861 Clazz_defineMethod (c$, "getTimeToLive", 
14862 function (a, b) {
14863 if (a == null || b == null) {
14864 throw  new NullPointerException ();
14865 }return -2;
14866 }, "~S,java.util.Locale");
14867 Clazz_defineMethod (c$, "toBundleName", 
14868 function (a, b) {
14869 if (b === java.util.Locale.ROOT) {
14870 return a;
14871 }var c = b.getLanguage ();
14872 var d = b.getCountry ();
14873 var e = b.getVariant ();
14874 if (c === "" && d === "" && e === "") {
14875 return a;
14876 }var f =  new StringBuilder (a);
14877 f.append ('_');
14878 if (e !== "") {
14879 f.append (c).append ('_').append (d).append ('_').append (e);
14880 } else if (d !== "") {
14881 f.append (c).append ('_').append (d);
14882 } else {
14883 f.append (c);
14884 }return f.toString ();
14885 }, "~S,java.util.Locale");
14886 Clazz_defineMethod (c$, "toResourceName", 
14887 function (a, b) {
14888 var c =  new StringBuilder (a.length + 1 + b.length);
14889 c.append (a.$replace ('.', '/')).append ('.').append (b);
14890 return c.toString ();
14891 }, "~S,~S");
14892 Clazz_defineMethod (c$, "toResourceName0", 
14893  function (a, b) {
14894 if (a.contains ("://")) {
14895 return null;
14896 } else {
14897 return this.toResourceName (a, b);
14898 }}, "~S,~S");
14899 c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"]));
14900 c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"]));
14901 c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"]));
14902 Clazz_defineStatics (c$,
14903 "TTL_DONT_CACHE", -1,
14904 "TTL_NO_EXPIRATION_CONTROL", -2);
14905 c$.INSTANCE = c$.prototype.INSTANCE =  new java.util.ResourceBundle.Control ();
14906 c$ = Clazz_p0p ();
14907 Clazz_pu$h(self.c$);
14908 c$ = Clazz_decorateAsClass (function () {
14909 this.formats = null;
14910 Clazz_instantialize (this, arguments);
14911 }, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control);
14912 Clazz_makeConstructor (c$, 
14913 function (a) {
14914 Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []);
14915 this.formats = a;
14916 }, "java.util.List");
14917 Clazz_overrideMethod (c$, "getFormats", 
14918 function (a) {
14919 if (a == null) {
14920 throw  new NullPointerException ();
14921 }return this.formats;
14922 }, "~S");
14923 c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
14924 c$.CLASS_ONLY = c$.prototype.CLASS_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
14925 c$ = Clazz_p0p ();
14926 Clazz_pu$h(self.c$);
14927 c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl);
14928 Clazz_overrideMethod (c$, "getFallbackLocale", 
14929 function (a, b) {
14930 if (a == null || b == null) {
14931 throw  new NullPointerException ();
14932 }return null;
14933 }, "~S,java.util.Locale");
14934 c$.NO_FALLBACK = c$.prototype.NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT);
14935 c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
14936 c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
14937 c$ = Clazz_p0p ();
14938 Clazz_defineStatics (c$,
14939 "INITIAL_CACHE_SIZE", 32);
14940 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));
14941 c$.cacheList = c$.prototype.cacheList =  new java.util.HashMap (32);
14942 });
14943 Clazz_declarePackage ("java.applet");
14944 Clazz_load (["java.awt.Panel"], "java.applet.Applet", ["java.net.URL", "java.util.Locale"], function () {
14945 c$ = Clazz_decorateAsClass (function () {
14946 this.stub = null;
14947 Clazz_instantialize (this, arguments);
14948 }, java.applet, "Applet", java.awt.Panel);
14949 Clazz_makeConstructor (c$, 
14950 function () {
14951 Clazz_superConstructor (this, java.applet.Applet, []);
14952 this.setPanel ();
14953 });
14954 Clazz_defineMethod (c$, "setStub", 
14955 function (stub) {
14956 this.stub = stub;
14957 }, "java.applet.AppletStub");
14958 Clazz_defineMethod (c$, "isActive", 
14959 function () {
14960 if (this.stub != null) {
14961 return this.stub.isActive ();
14962 } else {
14963 return false;
14964 }});
14965 Clazz_defineMethod (c$, "getDocumentBase", 
14966 function () {
14967 return this.stub.getDocumentBase ();
14968 });
14969 Clazz_defineMethod (c$, "getCodeBase", 
14970 function () {
14971 return this.stub.getCodeBase ();
14972 });
14973 Clazz_defineMethod (c$, "getParameter", 
14974 function (name) {
14975 return this.stub.getParameter (name);
14976 }, "~S");
14977 Clazz_defineMethod (c$, "getAppletContext", 
14978 function () {
14979 return this.stub.getAppletContext ();
14980 });
14981 Clazz_defineMethod (c$, "resize", 
14982 function (width, height) {
14983 var d = this.size ();
14984 if ((d.width != width) || (d.height != height)) {
14985 Clazz_superCall (this, java.applet.Applet, "resize", [width, height]);
14986 if (this.stub != null) {
14987 this.stub.appletResize (width, height);
14988 }}}, "~N,~N");
14989 Clazz_defineMethod (c$, "resize", 
14990 function (d) {
14991 this.resize (d.width, d.height);
14992 }, "java.awt.Dimension");
14993 Clazz_defineMethod (c$, "showStatus", 
14994 function (msg) {
14995 this.getAppletContext ().showStatus (msg);
14996 }, "~S");
14997 Clazz_defineMethod (c$, "getImage", 
14998 function (url) {
14999 return this.getAppletContext ().getImage (url);
15000 }, "java.net.URL");
15001 Clazz_defineMethod (c$, "getImage", 
15002 function (url, name) {
15003 try {
15004 return this.getImage ( new java.net.URL (url, name));
15005 } catch (e) {
15006 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
15007 return null;
15008 } else {
15009 throw e;
15010 }
15011 }
15012 }, "java.net.URL,~S");
15013 Clazz_defineMethod (c$, "getAppletInfo", 
15014 function () {
15015 return null;
15016 });
15017 Clazz_defineMethod (c$, "getLocale", 
15018 function () {
15019 var locale = Clazz_superCall (this, java.applet.Applet, "getLocale", []);
15020 if (locale == null) {
15021 return java.util.Locale.getDefault ();
15022 }return locale;
15023 });
15024 Clazz_defineMethod (c$, "getParameterInfo", 
15025 function () {
15026 return null;
15027 });
15028 Clazz_defineMethod (c$, "init", 
15029 function () {
15030 });
15031 Clazz_defineMethod (c$, "start", 
15032 function () {
15033 });
15034 Clazz_defineMethod (c$, "stop", 
15035 function () {
15036 });
15037 Clazz_defineMethod (c$, "destroy", 
15038 function () {
15039 });
15040 });
15041 Clazz_declarePackage ("java.net");
15042 Clazz_load (["java.util.Hashtable"], "java.net.URL", ["java.io.IOException", "java.lang.Character", "$.Error", "java.net.MalformedURLException"], function () {
15043 c$ = Clazz_decorateAsClass (function () {
15044 this.protocol = null;
15045 this.host = null;
15046 this.port = -1;
15047 this.file = null;
15048 this.query = null;
15049 this.authority = null;
15050 this.path = null;
15051 this.userInfo = null;
15052 this.ref = null;
15053 this.handler = null;
15054 this.$hashCode = -1;
15055 Clazz_instantialize (this, arguments);
15056 }, java.net, "URL", null, java.io.Serializable);
15057 Clazz_makeConstructor (c$, 
15058 function (context, spec, handler) {
15059 {
15060 switch (arguments.length) {
15061 case 1:
15062 spec = context;context = handler = null;
15063 break;
15064 case 2:
15065 handler = null;
15066 break;
15067 case 3:
15068 if (context == null || Clazz_instanceOf(context, java.net.URL))
15069 break;
15070 default:
15071 alert("java.net.URL constructor format not supported");
15072 break;
15073 }
15074 context && context.valueOf && context.valueOf() == null && (context = null);
15075 }var original = spec;
15076 var i;
15077 var limit;
15078 var c;
15079 var start = 0;
15080 var newProtocol = null;
15081 var aRef = false;
15082 var isRelative = false;
15083 try {
15084 limit = spec.length;
15085 while ((limit > 0) && (spec.charAt (limit - 1) <= ' ')) {
15086 limit--;
15087 }
15088 while ((start < limit) && (spec.charAt (start) <= ' ')) {
15089 start++;
15090 }
15091 if (spec.regionMatches (true, start, "url:", 0, 4)) {
15092 start += 4;
15093 }if (start < spec.length && spec.charAt (start) == '#') {
15094 aRef = true;
15095 }for (i = start; !aRef && (i < limit) && ((c = spec.charCodeAt (i)) != 47); i++) {
15096 if (c == 58) {
15097 var s = spec.substring (start, i).toLowerCase ();
15098 if (this.isValidProtocol (s)) {
15099 newProtocol = s;
15100 start = i + 1;
15101 }break;
15102 }}
15103 this.protocol = newProtocol;
15104 if ((context != null) && ((newProtocol == null) || newProtocol.equalsIgnoreCase (context.protocol))) {
15105 if (handler == null) {
15106 handler = context.handler;
15107 }if (context.path != null && context.path.startsWith ("/")) newProtocol = null;
15108 if (newProtocol == null) {
15109 this.protocol = context.protocol;
15110 this.authority = context.authority;
15111 this.userInfo = context.userInfo;
15112 this.host = context.host;
15113 this.port = context.port;
15114 this.file = context.file;
15115 this.path = context.path;
15116 isRelative = true;
15117 }}if (this.protocol == null) {
15118 throw  new java.net.MalformedURLException ("no protocol: " + original);
15119 }if (handler == null && (handler = java.net.URL.getURLStreamHandler (this.protocol)) == null) {
15120 throw  new java.net.MalformedURLException ("unknown protocol: " + this.protocol);
15121 }this.handler = handler;
15122 i = spec.indexOf ('#', start);
15123 if (i >= 0) {
15124 this.ref = spec.substring (i + 1, limit);
15125 limit = i;
15126 }if (isRelative && start == limit) {
15127 this.query = context.query;
15128 if (this.ref == null) {
15129 this.ref = context.ref;
15130 }}handler.parseURL (this, spec, start, limit);
15131 } catch (e$$) {
15132 if (Clazz_exceptionOf (e$$, java.net.MalformedURLException)) {
15133 var e = e$$;
15134 {
15135 throw e;
15136 }
15137 } else if (Clazz_exceptionOf (e$$, Exception)) {
15138 var e = e$$;
15139 {
15140 var exception =  new java.net.MalformedURLException (e.getMessage ());
15141 exception.initCause (e);
15142 throw exception;
15143 }
15144 } else {
15145 throw e$$;
15146 }
15147 }
15148 }, "java.net.URL,~S,java.net.URLStreamHandler");
15149 Clazz_defineMethod (c$, "isValidProtocol", 
15150  function (protocol) {
15151 var len = protocol.length;
15152 if (len < 1) return false;
15153 var c = protocol.charAt (0);
15154 if (!Character.isLetter (c)) return false;
15155 for (var i = 1; i < len; i++) {
15156 c = protocol.charAt (i);
15157 if (!Character.isLetterOrDigit (c) && c != '.' && c != '+' && c != '-') {
15158 return false;
15159 }}
15160 return true;
15161 }, "~S");
15162 Clazz_defineMethod (c$, "set5", 
15163 function (protocol, host, port, file, ref) {
15164 {
15165 this.protocol = protocol;
15166 this.host = host;
15167 this.authority = port == -1 ? host : host + ":" + port;
15168 this.port = port;
15169 this.file = file;
15170 this.ref = ref;
15171 this.$hashCode = -1;
15172 var q = file.lastIndexOf ('?');
15173 if (q != -1) {
15174 this.query = file.substring (q + 1);
15175 this.path = file.substring (0, q);
15176 } else this.path = file;
15177 }}, "~S,~S,~N,~S,~S");
15178 Clazz_defineMethod (c$, "set", 
15179 function (protocol, host, port, authority, userInfo, path, query, ref) {
15180 {
15181 this.protocol = protocol;
15182 this.host = host;
15183 this.port = port;
15184 this.file = query == null ? path : path + "?" + query;
15185 this.userInfo = userInfo;
15186 this.path = path;
15187 this.ref = ref;
15188 this.$hashCode = -1;
15189 this.query = query;
15190 this.authority = authority;
15191 }}, "~S,~S,~N,~S,~S,~S,~S,~S");
15192 Clazz_defineMethod (c$, "getQuery", 
15193 function () {
15194 return this.query;
15195 });
15196 Clazz_defineMethod (c$, "getPath", 
15197 function () {
15198 return this.path;
15199 });
15200 Clazz_defineMethod (c$, "getUserInfo", 
15201 function () {
15202 return this.userInfo;
15203 });
15204 Clazz_defineMethod (c$, "getAuthority", 
15205 function () {
15206 return this.authority;
15207 });
15208 Clazz_defineMethod (c$, "getPort", 
15209 function () {
15210 return this.port;
15211 });
15212 Clazz_defineMethod (c$, "getDefaultPort", 
15213 function () {
15214 return this.handler.getDefaultPort ();
15215 });
15216 Clazz_defineMethod (c$, "getProtocol", 
15217 function () {
15218 return this.protocol;
15219 });
15220 Clazz_defineMethod (c$, "getHost", 
15221 function () {
15222 return this.host;
15223 });
15224 Clazz_defineMethod (c$, "getFile", 
15225 function () {
15226 return this.file;
15227 });
15228 Clazz_defineMethod (c$, "getRef", 
15229 function () {
15230 return this.ref;
15231 });
15232 Clazz_overrideMethod (c$, "equals", 
15233 function (obj) {
15234 if (!(Clazz_instanceOf (obj, java.net.URL))) return false;
15235 var u2 = obj;
15236 return this.handler.equals2 (this, u2);
15237 }, "~O");
15238 Clazz_overrideMethod (c$, "hashCode", 
15239 function () {
15240 if (this.$hashCode != -1) return this.$hashCode;
15241 this.$hashCode = this.handler.hashCode (this);
15242 return this.$hashCode;
15243 });
15244 Clazz_defineMethod (c$, "sameFile", 
15245 function (other) {
15246 return this.handler.sameFile (this, other);
15247 }, "java.net.URL");
15248 Clazz_overrideMethod (c$, "toString", 
15249 function () {
15250 return this.toExternalForm ();
15251 });
15252 Clazz_defineMethod (c$, "toExternalForm", 
15253 function () {
15254 return this.handler.toExternalForm (this);
15255 });
15256 Clazz_defineMethod (c$, "openConnection", 
15257 function () {
15258 return this.handler.openConnection (this);
15259 });
15260 Clazz_defineMethod (c$, "openStream", 
15261 function () {
15262 return this.openConnection ().getInputStream ();
15263 });
15264 Clazz_defineMethod (c$, "getContent", 
15265 function () {
15266 return this.openConnection ().getInputStream ();
15267 });
15268 c$.setURLStreamHandlerFactory = Clazz_defineMethod (c$, "setURLStreamHandlerFactory", 
15269 function (fac) {
15270 {
15271 if (java.net.URL.factory != null) {
15272 throw  new Error ("factory already defined");
15273 }var security = System.getSecurityManager ();
15274 if (security != null) {
15275 security.checkSetFactory ();
15276 }java.net.URL.handlers.clear ();
15277 java.net.URL.factory = fac;
15278 }}, "java.net.URLStreamHandlerFactory");
15279 c$.getURLStreamHandler = Clazz_defineMethod (c$, "getURLStreamHandler", 
15280 function (protocol) {
15281 var handler = java.net.URL.handlers.get (protocol);
15282 if (handler == null) {
15283 if (java.net.URL.factory != null) {
15284 handler = java.net.URL.factory.createURLStreamHandler (protocol);
15285 }}return handler;
15286 }, "~S");
15287 Clazz_defineStatics (c$,
15288 "factory", null);
15289 c$.handlers = c$.prototype.handlers =  new java.util.Hashtable ();
15290 c$.streamHandlerLock = c$.prototype.streamHandlerLock =  new Clazz._O ();
15291 });
15292
15293 // modified by Bob Hanson 3/21/2014 6:44:21 AM  to reduce this.b$[....] phrases to simply this.h$
15294 // BH added ability to use a non-Java key for HTML elements, for example.
15295 // BH 8/24/2014 8:48:58 PM all synchronization and inner classes removed
15296
15297
15298 Clazz_load([],"java.util.HashtableIterator",[],function(){
15299 c$=Clazz_decorateAsClass(function(){
15300 this.position=0;
15301 this.expectedModCount=0;
15302 this.type=null;
15303 this.lastEntry=null;
15304 this.lastPosition=0;
15305 this.canRemove=false;
15306 Clazz_instantialize(this,arguments);
15307 },java.util,"HashtableIterator",null,java.util.Iterator);
15308 Clazz_makeConstructor(c$,
15309 function(a){
15310 this.type=a;
15311 this.h$ = a.h$;
15312 this.position=this.h$.lastSlot;
15313 this.expectedModCount=this.h$.modCount;
15314 },"java.util.AbstractSet");
15315 Clazz_overrideMethod(c$,"hasNext",
15316 function(){
15317 if(this.lastEntry&&this.lastEntry.next){
15318 return true;
15319 }while(this.position>=this.h$.firstSlot){
15320 if(this.h$.elementData[this.position]==null){
15321 this.position--;
15322 }else{
15323 return true;
15324 }}
15325 return false;
15326 });
15327 Clazz_overrideMethod(c$,"next",
15328 function(){
15329 if(this.expectedModCount==this.h$.modCount){
15330 if(this.lastEntry){
15331 this.lastEntry=this.lastEntry.next;
15332 }if(this.lastEntry==null){
15333 while(this.position>=this.h$.firstSlot&&(this.lastEntry=this.h$.elementData[this.position])==null){
15334 this.position--;
15335 }
15336 if(this.lastEntry){
15337 this.lastPosition=this.position;
15338 this.position--;
15339 }}if(this.lastEntry){
15340 this.canRemove=true;
15341 return this.type.get(this.lastEntry);
15342 }throw new java.util.NoSuchElementException();
15343 }throw new java.util.ConcurrentModificationException();
15344 });
15345 Clazz_overrideMethod(c$,"remove",
15346 function(){
15347 if(this.expectedModCount==this.h$.modCount){
15348 if(this.canRemove){
15349 this.canRemove=false;
15350 {
15351 var a=false;
15352 var b=this.h$.elementData[this.lastPosition];
15353 if(b===this.lastEntry){
15354 this.h$.elementData[this.lastPosition]=b.next;
15355 a=true;
15356 }else{
15357 while(b&&b.next!==this.lastEntry){
15358 b=b.next;
15359 }
15360 if(b){
15361 b.next=this.lastEntry.next;
15362 a=true;
15363 }}if(a){
15364 this.h$.modCount++;
15365 this.h$.elementCount--;
15366 this.expectedModCount++;
15367 return;
15368 }}}else{
15369 throw new IllegalStateException();
15370 }}throw new java.util.ConcurrentModificationException();
15371 });
15372 });
15373
15374
15375
15376 ////////////////////////////
15377
15378
15379 Clazz_load([],"java.util.HashtableEnumerator",[],function(){
15380 c$=Clazz_decorateAsClass(function(){
15381 this.key=false;
15382 this.start=0;
15383 this.entry=null;
15384 Clazz_instantialize(this,arguments);
15385 },java.util,"HashtableEnumerator",null,java.util.Enumeration);
15386
15387 Clazz_makeConstructor(c$,
15388 function(a, b){
15389 this.key = a;
15390 this.h$ = b;
15391 if (this.h$)this.start=this.h$.lastSlot+1;
15392 },"~B,java.util.Hashtable");
15393 Clazz_overrideMethod(c$,"hasMoreElements",
15394 function(){
15395 if (!this.h$)return false;
15396 if(this.entry)return true;
15397
15398 while(--this.start>=this.h$.firstSlot){
15399 if(this.h$.elementData[this.start]){
15400 this.entry=this.h$.elementData[this.start];
15401 return true;
15402 }}
15403 return false;
15404 });
15405 Clazz_overrideMethod(c$,"nextElement",
15406 function(){
15407 if(this.hasMoreElements()){
15408 var a=this.key?this.entry.key:this.entry.value;
15409 this.entry=this.entry.next;
15410 return a;
15411 }
15412 throw new java.util.NoSuchElementException();
15413 });
15414 });
15415
15416 ////////////////////////////
15417
15418 Clazz_load([],"java.util.HashtableEntrySet",[],function(){
15419 c$=Clazz_decorateAsClass(function(){
15420 Clazz_instantialize(this,arguments);
15421 },java.util,"HashtableEntrySet",null,java.util.AbstractSet);
15422
15423 Clazz_makeConstructor(c$,
15424 function(a){
15425 this.h$ = a;
15426 },"java.util.Hashtable");
15427 Clazz_overrideMethod(c$,"size",
15428 function(){
15429 return this.h$.elementCount;
15430 });
15431 Clazz_overrideMethod(c$,"clear",
15432 function(){
15433 this.h$.clear();
15434 });
15435 Clazz_overrideMethod(c$,"remove",
15436 function(object){
15437 if(this.contains(object)){
15438 this.h$.remove((object).getKey());
15439 return true;
15440 }return false;
15441 },"~O");
15442 Clazz_defineMethod(c$,"contains",
15443 function(object){
15444 var entry=this.h$.getEntry((object).getKey());
15445 return object.equals(entry);
15446 },"~O");
15447
15448 Clazz_overrideMethod(c$,"get",
15449 function(entry){
15450 return entry;
15451 },"java.util.MapEntry");
15452
15453 Clazz_defineMethod(c$,"iterator",
15454 function(){
15455 return new java.util.HashtableIterator(this);
15456 });
15457 });
15458
15459
15460 ////////////////////////////
15461
15462 Clazz_load([],"java.util.HashtableKeySet",[],function(){
15463 c$=Clazz_decorateAsClass(function(){
15464 Clazz_instantialize(this,arguments);
15465 },java.util,"HashtableKeySet",null,java.util.AbstractSet);
15466
15467 Clazz_makeConstructor(c$,
15468 function(a){
15469 this.h$ = a;
15470 },"java.util.Hashtable");
15471
15472 Clazz_overrideMethod(c$,"contains",
15473 function(object){
15474 return this.h$.containsKey(object);
15475 },"~O");
15476 Clazz_overrideMethod(c$,"size",
15477 function(){
15478 return this.h$.elementCount;
15479 });
15480 Clazz_overrideMethod(c$,"clear",
15481 function(){
15482 this.h$.clear();
15483 });
15484 Clazz_overrideMethod(c$,"remove",
15485 function(key){
15486 if(this.h$.containsKey(key)){
15487 this.h$.remove(key);
15488 return true;
15489 }return false;
15490 },"~O");
15491
15492 Clazz_overrideMethod(c$,"get",
15493 function(entry){
15494 return entry.key;
15495 },"java.util.MapEntry");
15496
15497 Clazz_overrideMethod(c$,"iterator",
15498 function(){
15499 return new java.util.HashtableIterator(this);
15500 });
15501 });
15502
15503 ////////////////////////////
15504
15505 Clazz_load([],"java.util.HashtableValueCollection",[],function(){
15506 c$=Clazz_decorateAsClass(function(){
15507 Clazz_instantialize(this,arguments);
15508 },java.util,"HashtableValueCollection",null,java.util.AbstractCollection);
15509
15510 Clazz_makeConstructor(c$,
15511 function(a){
15512 this.h$ = a;
15513 },"java.util.Hashtable");
15514 Clazz_overrideMethod(c$,"contains",
15515 function(object){
15516 return this.h$.contains(object);
15517 },"~O");
15518 Clazz_overrideMethod(c$,"size",
15519 function(){
15520 return this.h$.elementCount;
15521 });
15522 Clazz_overrideMethod(c$,"clear",
15523 function(){
15524 this.h$.clear();
15525 });
15526
15527 Clazz_overrideMethod(c$,"get",
15528 function(entry){
15529 return entry.value;
15530 },"java.util.MapEntry");
15531
15532 Clazz_overrideMethod(c$,"iterator",
15533 function(){
15534 return new java.util.HashtableIterator(this);
15535 });
15536 });
15537 ////////////////////////////
15538
15539
15540 Clazz_load(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){
15541 c$=Clazz_decorateAsClass(function(){
15542 this.next=null;
15543 this.hashcode=0;
15544 Clazz_instantialize(this,arguments);
15545 },java.util,"HashtableEntry",java.util.MapEntry);
15546 Clazz_overrideConstructor(c$,
15547 function(a,b){
15548 this.key = a;
15549 this.value = b;
15550 this.hashcode=a.hashCode();
15551 });
15552 Clazz_defineMethod(c$,"clone",
15553 function(){
15554 var a=Clazz_superCall(this,java.util.HashtableEntry,"clone",[]);
15555 if(this.next!=null){
15556 a.next=this.next.clone();
15557 }
15558 return a;
15559 });
15560 Clazz_overrideMethod(c$,"setValue",
15561 function(a){
15562 if(a==null){
15563 throw new NullPointerException();
15564 }var b=this.value;
15565 this.value=a;
15566 return b;
15567 },"~O");
15568 Clazz_defineMethod(c$,"getKeyHash",
15569 function(){
15570 return this.key.hashCode();
15571 });
15572 Clazz_defineMethod(c$,"equalsKey",
15573 function(a,b){
15574 return this.hashcode==(!a.hashCode || a.hashCode())&&this.key.equals(a);
15575 },"~O,~N");
15576 Clazz_overrideMethod(c$,"toString",
15577 function(){
15578 return this.key+"="+this.value;
15579 });
15580 });
15581
15582
15583
15584 ////////////////////////////
15585
15586
15587 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(){
15588 c$=Clazz_decorateAsClass(function(){
15589 this.elementCount=0;
15590 this.elementData=null;
15591 this.loadFactor=0;
15592 this.threshold=0;
15593 this.firstSlot=0;
15594 this.lastSlot=-1;
15595 this.modCount=0;
15596 Clazz_instantialize(this,arguments);
15597 },java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);   
15598 c$.newEntry=Clazz_defineMethod(c$,"newEntry",
15599 ($fz=function(key,value,hash){
15600 return new java.util.HashtableEntry(key,value);
15601 },$fz.isPrivate=true,$fz),"~O,~O,~N");
15602 Clazz_overrideConstructor(c$,
15603 function(){
15604 this.elementCount=0;
15605 this.elementData=this.newElementArray(11);
15606 this.firstSlot=this.elementData.length;
15607 this.loadFactor=0.75;
15608 this.computeMaxSize();
15609 });
15610 Clazz_defineMethod(c$,"newElementArray",
15611 ($fz=function(size){
15612 return new Array(size);
15613 },$fz.isPrivate=true,$fz),"~N");
15614 Clazz_overrideMethod(c$,"clear",
15615 function(){
15616 this.elementCount=0;
15617 for (var i = this.elementData.length; --i >= 0;)
15618           this.elementData[i] = null;
15619 this.modCount++;
15620 });
15621 Clazz_defineMethod(c$,"clone",
15622 function(){
15623 try{
15624 var hashtable=Clazz_superCall(this,java.util.Hashtable,"clone",[]);
15625 hashtable.elementData=this.elementData.clone();
15626 var entry;
15627 for(var i=this.elementData.length;--i>=0;){
15628 if((entry=this.elementData[i])){
15629 hashtable.elementData[i]=entry.clone();
15630 }}
15631 return hashtable;
15632 }catch(e){
15633 if(Clazz_instanceOf(e,CloneNotSupportedException)){
15634 return null;
15635 }else{
15636 throw e;
15637 }
15638 }
15639 });
15640 Clazz_defineMethod(c$,"computeMaxSize",
15641 ($fz=function(){
15642 this.threshold=Math.round((this.elementData.length*this.loadFactor));
15643 },$fz.isPrivate=true,$fz));
15644 Clazz_defineMethod(c$,"contains",
15645 function(value){
15646 if(value==null){
15647 throw new NullPointerException();
15648 }for(var i=this.elementData.length;--i>=0;){
15649 var entry=this.elementData[i];
15650 while(entry){
15651 if(value.equals(entry.value)){
15652 return true;
15653 }entry=entry.next;
15654 }
15655 }
15656 return false;
15657 },"~O");
15658 Clazz_overrideMethod(c$,"containsKey",
15659 function(key){
15660         if(!key.hashCode)  {
15661           key.hashCode = function(){return 1};
15662           if (!key.equals)
15663                 key.equals = function(a) {return this == a};
15664         }
15665 return this.getEntry(key)!=null ;
15666 },"~O");
15667 Clazz_overrideMethod(c$,"containsValue",
15668 function(value){
15669 return this.contains(value);
15670 },"~O");
15671 Clazz_overrideMethod(c$,"elements",
15672 function(){
15673 if(this.elementCount==0){
15674 return java.util.Hashtable.EMPTY_ENUMERATION;
15675 }
15676 return new java.util.HashtableEnumerator(false, this);
15677 });
15678 Clazz_overrideMethod(c$,"entrySet",
15679 function(){
15680 return new java.util.HashtableEntrySet(this);
15681 });
15682 Clazz_overrideMethod(c$,"equals",
15683 function(object){
15684 if(this===object){
15685 return true;
15686 }if(Clazz_instanceOf(object,java.util.Map)){
15687 var map=object;
15688 if(this.size()!=map.size()){
15689 return false;
15690 }var entries=this.entrySet();
15691 for(var e,$e=map.entrySet().iterator();$e.hasNext()&&((e=$e.next())||true);){
15692 if(!entries.contains(e)){
15693 return false;
15694 }}
15695 return true;
15696 }return false;
15697 },"~O");
15698 Clazz_overrideMethod(c$,"get",
15699 function(key){
15700         if(!key.hashCode) { 
15701           key.hashCode = function(){return 1};
15702         if (!key.equals)
15703                 key.equals = function(a) {return this == a};
15704         }
15705 var hash=key.hashCode();
15706 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15707 var entry=this.elementData[index];
15708 while(entry){
15709 if(entry.equalsKey(key,hash)){
15710 return entry.value;
15711 }entry=entry.next;
15712 }
15713 return null;
15714 },"~O");
15715 Clazz_defineMethod(c$,"getEntry",
15716 function(key){
15717 var hash=key.hashCode();
15718 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15719 var entry=this.elementData[index];
15720 while(entry){
15721 if(entry.equalsKey(key,hash)){
15722 return entry;
15723 }entry=entry.next;
15724 }
15725 return null;
15726 },"~O");
15727 Clazz_overrideMethod(c$,"hashCode",
15728 function(){
15729 var result=0;
15730 var it=this.entrySet().iterator();
15731 while(it.hasNext()){
15732 var entry=it.next();
15733 var key=entry.getKey();
15734 var value=entry.getValue();
15735 var hash=(key!==this?key.hashCode():0)^(value!==this?(value!=null?value.hashCode():0):0);
15736 result+=hash;
15737 }
15738 return result;
15739 });
15740 Clazz_overrideMethod(c$,"isEmpty",
15741 function(){
15742 return this.elementCount==0;
15743 });
15744 Clazz_overrideMethod(c$,"keys",
15745 function(){
15746 if(this.elementCount==0){
15747 return java.util.Hashtable.EMPTY_ENUMERATION;
15748 }
15749 return new java.util.HashtableEnumerator(true, this); 
15750 });
15751 Clazz_overrideMethod(c$,"keySet",
15752 function(){
15753 return new java.util.HashtableKeySet(this);
15754 });
15755 Clazz_overrideMethod(c$,"put",
15756 function(key,value){
15757 if(key!=null&&value!=null){
15758         if(!key.hashCode)  {
15759           key.hashCode = function(){return 1};
15760           if (!key.equals)
15761                 key.equals = function(a) {return this == a};
15762         }
15763         var hash=key.hashCode();
15764         var index=(hash&0x7FFFFFFF)%this.elementData.length;
15765         var entry=this.elementData[index];
15766         while(entry!=null&&!entry.equalsKey(key,hash)){
15767         entry=entry.next;
15768 }
15769 if(entry==null){
15770 this.modCount++;
15771 if(++this.elementCount>this.threshold){
15772 this.rehash();
15773 index=(hash&0x7FFFFFFF)%this.elementData.length;
15774 }if(index<this.firstSlot){
15775 this.firstSlot=index;
15776 }if(index>this.lastSlot){
15777 this.lastSlot=index;
15778 }
15779
15780 entry=java.util.Hashtable.newEntry(key,value,hash);
15781 entry.next=this.elementData[index];
15782 this.elementData[index]=entry;
15783 return null;
15784 }var result=entry.value;
15785 entry.value=value;
15786 return result;
15787 }throw new NullPointerException();
15788 },"~O,~O");
15789 Clazz_overrideMethod(c$,"putAll",
15790 function(map){
15791 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
15792 this.put(entry.getKey(),entry.getValue());
15793 }
15794 },"java.util.Map");
15795
15796 Clazz_defineMethod(c$,"rehash",
15797 function(){
15798 var length=(this.elementData.length<<1)+1;
15799 if(length==0){
15800 length=1;
15801 }var newFirst=length;
15802 var newLast=-1;
15803 var newData=this.newElementArray(length);
15804 for(var i=this.lastSlot+1;--i>=this.firstSlot;){
15805 var entry=this.elementData[i];
15806 while(entry!=null){
15807 var index=(entry.getKeyHash()&0x7FFFFFFF)%length;
15808 if(index<newFirst){
15809 newFirst=index;
15810 }if(index>newLast){
15811 newLast=index;
15812 }var next=entry.next;
15813 entry.next=newData[index];
15814 newData[index]=entry;
15815 entry=next;
15816 }
15817 }
15818 this.firstSlot=newFirst;
15819 this.lastSlot=newLast;
15820 this.elementData=newData;
15821 this.computeMaxSize();
15822 });
15823 Clazz_overrideMethod(c$,"remove",
15824 function(key){
15825 var hash=key.hashCode();
15826 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15827 var last=null;
15828 var entry=this.elementData[index];
15829 while(entry!=null&&!entry.equalsKey(key,hash)){
15830 last=entry;
15831 entry=entry.next;
15832 }
15833 if(entry!=null){
15834 this.modCount++;
15835 if(last==null){
15836 this.elementData[index]=entry.next;
15837 }else{
15838 last.next=entry.next;
15839 }this.elementCount--;
15840 var result=entry.value;
15841 entry.value=null;
15842 return result;
15843 }return null;
15844 },"~O");
15845 Clazz_overrideMethod(c$,"size",
15846 function(){
15847 return this.elementCount;
15848 });
15849 Clazz_overrideMethod(c$,"toString",
15850 function(){
15851 if(this.isEmpty()){
15852 return"{}";
15853 }var buffer=new StringBuilder(this.size()*28);
15854 buffer.append('{');
15855 for(var i=this.lastSlot;i>=this.firstSlot;i--){
15856 var entry=this.elementData[i];
15857 while(entry!=null){
15858 if(entry.key!==this){
15859 buffer.append(entry.key);
15860 }else{
15861 buffer.append("(this Map)");
15862 }buffer.append('=');
15863 if(entry.value!==this){
15864 buffer.append(entry.value);
15865 }else{
15866 buffer.append("(this Map)");
15867 }buffer.append(", ");
15868 entry=entry.next;
15869 }
15870 }
15871 if(this.elementCount>0){
15872 buffer.setLength(buffer.length()-2);
15873 }buffer.append('}');
15874 return buffer.toString();
15875 });
15876 Clazz_overrideMethod(c$,"values",
15877 function(){
15878 return new java.util.HashtableValueCollection(this);
15879 });
15880 java.util.Hashtable.EMPTY_ENUMERATION = new java.util.HashtableEnumerator();
15881 });
15882 c$=Clazz_declareType(java.util,"Dictionary");
15883 Clazz_makeConstructor(c$,
15884 function(){
15885 });
15886 Clazz_declarePackage ("java.net");
15887 Clazz_load (["java.io.IOException"], "java.net.MalformedURLException", null, function () {
15888 c$ = Clazz_declareType (java.net, "MalformedURLException", java.io.IOException);
15889 Clazz_makeConstructor (c$, 
15890 function () {
15891 Clazz_superConstructor (this, java.net.MalformedURLException, []);
15892 });
15893 });
15894 Clazz_declarePackage ("java.awt");
15895 Clazz_load (null, "java.awt.GraphicsEnvironment", ["swingjs.JSToolkit"], function () {
15896 c$ = Clazz_declareType (java.awt, "GraphicsEnvironment");
15897 Clazz_makeConstructor (c$, 
15898 function () {
15899 });
15900 c$.getLocalGraphicsEnvironment = Clazz_defineMethod (c$, "getLocalGraphicsEnvironment", 
15901 function () {
15902 if (java.awt.GraphicsEnvironment.localEnv == null) {
15903 java.awt.GraphicsEnvironment.localEnv = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsEnvironment");
15904 }return java.awt.GraphicsEnvironment.localEnv;
15905 });
15906 c$.isHeadless = Clazz_defineMethod (c$, "isHeadless", 
15907 function () {
15908 return false;
15909 });
15910 c$.getHeadlessProperty = Clazz_defineMethod (c$, "getHeadlessProperty", 
15911  function () {
15912 return false;
15913 });
15914 c$.checkHeadless = Clazz_defineMethod (c$, "checkHeadless", 
15915 function () {
15916 });
15917 Clazz_defineMethod (c$, "isHeadlessInstance", 
15918 function () {
15919 return java.awt.GraphicsEnvironment.getHeadlessProperty ();
15920 });
15921 Clazz_defineMethod (c$, "registerFont", 
15922 function (font) {
15923 return true;
15924 }, "java.awt.Font");
15925 Clazz_defineMethod (c$, "preferLocaleFonts", 
15926 function () {
15927 });
15928 Clazz_defineMethod (c$, "preferProportionalFonts", 
15929 function () {
15930 });
15931 Clazz_defineMethod (c$, "getCenterPoint", 
15932 function () {
15933 return null;
15934 });
15935 Clazz_defineStatics (c$,
15936 "localEnv", null);
15937 });
15938 Clazz_declarePackage ("java.awt.event");
15939 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.WindowEvent", ["java.awt.Window", "jssun.awt.AppContext", "$.SunToolkit"], function () {
15940 c$ = Clazz_decorateAsClass (function () {
15941 this.opposite = null;
15942 this.oldState = 0;
15943 this.newState = 0;
15944 Clazz_instantialize (this, arguments);
15945 }, java.awt.event, "WindowEvent", java.awt.event.ComponentEvent);
15946 Clazz_makeConstructor (c$, 
15947 function (source, id, opposite, oldState, newState) {
15948 Clazz_superConstructor (this, java.awt.event.WindowEvent, [source, id]);
15949 this.opposite = opposite;
15950 this.oldState = oldState;
15951 this.newState = newState;
15952 }, "java.awt.Window,~N,java.awt.Window,~N,~N");
15953 Clazz_makeConstructor (c$, 
15954 function (source, id, opposite) {
15955 this.construct (source, id, opposite, 0, 0);
15956 }, "java.awt.Window,~N,java.awt.Window");
15957 Clazz_makeConstructor (c$, 
15958 function (source, id, oldState, newState) {
15959 this.construct (source, id, null, oldState, newState);
15960 }, "java.awt.Window,~N,~N,~N");
15961 Clazz_makeConstructor (c$, 
15962 function (source, id) {
15963 this.construct (source, id, null, 0, 0);
15964 }, "java.awt.Window,~N");
15965 Clazz_defineMethod (c$, "getWindow", 
15966 function () {
15967 return (Clazz_instanceOf (this.source, java.awt.Window)) ? this.source : null;
15968 });
15969 Clazz_defineMethod (c$, "getOppositeWindow", 
15970 function () {
15971 if (this.opposite == null) {
15972 return null;
15973 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
15974 });
15975 Clazz_defineMethod (c$, "getOldState", 
15976 function () {
15977 return this.oldState;
15978 });
15979 Clazz_defineMethod (c$, "getNewState", 
15980 function () {
15981 return this.newState;
15982 });
15983 Clazz_overrideMethod (c$, "paramString", 
15984 function () {
15985 var typeStr;
15986 switch (this.id) {
15987 case 200:
15988 typeStr = "WINDOW_OPENED";
15989 break;
15990 case 201:
15991 typeStr = "WINDOW_CLOSING";
15992 break;
15993 case 202:
15994 typeStr = "WINDOW_CLOSED";
15995 break;
15996 case 203:
15997 typeStr = "WINDOW_ICONIFIED";
15998 break;
15999 case 204:
16000 typeStr = "WINDOW_DEICONIFIED";
16001 break;
16002 case 205:
16003 typeStr = "WINDOW_ACTIVATED";
16004 break;
16005 case 206:
16006 typeStr = "WINDOW_DEACTIVATED";
16007 break;
16008 case 207:
16009 typeStr = "WINDOW_GAINED_FOCUS";
16010 break;
16011 case 208:
16012 typeStr = "WINDOW_LOST_FOCUS";
16013 break;
16014 case 209:
16015 typeStr = "WINDOW_STATE_CHANGED";
16016 break;
16017 default:
16018 typeStr = "unknown type";
16019 }
16020 typeStr += ",opposite=" + this.getOppositeWindow () + ",oldState=" + this.oldState + ",newState=" + this.newState;
16021 return typeStr;
16022 });
16023 Clazz_defineStatics (c$,
16024 "WINDOW_FIRST", 200,
16025 "WINDOW_OPENED", 200,
16026 "WINDOW_CLOSING", 201,
16027 "WINDOW_CLOSED", 202,
16028 "WINDOW_ICONIFIED", 203,
16029 "WINDOW_DEICONIFIED", 204,
16030 "WINDOW_ACTIVATED", 205,
16031 "WINDOW_DEACTIVATED", 206,
16032 "WINDOW_GAINED_FOCUS", 207,
16033 "WINDOW_LOST_FOCUS", 208,
16034 "WINDOW_STATE_CHANGED", 209,
16035 "WINDOW_LAST", 209);
16036 });
16037 Clazz_declarePackage ("javax.swing");
16038 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 () {
16039 c$ = Clazz_decorateAsClass (function () {
16040 this.isAlignmentXSet = false;
16041 this.alignmentX = 0;
16042 this.isAlignmentYSet = false;
16043 this.alignmentY = 0;
16044 this.ui = null;
16045 this.listenerList = null;
16046 this.clientProperties = null;
16047 this.autoscrolls = false;
16048 this.border = null;
16049 this.flags = 0;
16050 this.verifyInputWhenFocusTarget = true;
16051 this.paintingChild = null;
16052 this.popupMenu = null;
16053 this.focusInputMap = null;
16054 this.ancestorInputMap = null;
16055 this.windowInputMap = null;
16056 this.actionMap = null;
16057 if (!Clazz_isClassDefined ("javax.swing.JComponent.ActionStandin")) {
16058 javax.swing.JComponent.$JComponent$ActionStandin$ ();
16059 }
16060 Clazz_instantialize (this, arguments);
16061 }, javax.swing, "JComponent", java.awt.Container);
16062 Clazz_prepareFields (c$, function () {
16063 this.listenerList =  new javax.swing.event.EventListenerList ();
16064 });
16065 c$.safelyGetGraphics = Clazz_defineMethod (c$, "safelyGetGraphics", 
16066 function (c, root) {
16067 {
16068 javax.swing.JComponent.componentObtainingGraphicsFrom = root;
16069 var g = c.getGraphics ();
16070 javax.swing.JComponent.componentObtainingGraphicsFrom = null;
16071 return g;
16072 }}, "java.awt.Component,java.awt.Component");
16073 c$.getGraphicsInvoked = Clazz_defineMethod (c$, "getGraphicsInvoked", 
16074 function (root) {
16075 if (!javax.swing.JComponent.isComponentObtainingGraphicsFrom (root)) {
16076 var rootPane = (root).getRootPane ();
16077 if (rootPane != null) {
16078 rootPane.disableTrueDoubleBuffering ();
16079 }}}, "java.awt.Component");
16080 c$.isComponentObtainingGraphicsFrom = Clazz_defineMethod (c$, "isComponentObtainingGraphicsFrom", 
16081  function (c) {
16082 {
16083 return (javax.swing.JComponent.componentObtainingGraphicsFrom === c);
16084 }}, "java.awt.Component");
16085 c$.getManagingFocusForwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusForwardTraversalKeys", 
16086 function () {
16087 {
16088 if (javax.swing.JComponent.managingFocusForwardTraversalKeys == null) {
16089 javax.swing.JComponent.managingFocusForwardTraversalKeys =  new java.util.HashSet (1);
16090 javax.swing.JComponent.managingFocusForwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 2));
16091 }}return javax.swing.JComponent.managingFocusForwardTraversalKeys;
16092 });
16093 c$.getManagingFocusBackwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusBackwardTraversalKeys", 
16094 function () {
16095 {
16096 if (javax.swing.JComponent.managingFocusBackwardTraversalKeys == null) {
16097 javax.swing.JComponent.managingFocusBackwardTraversalKeys =  new java.util.HashSet (1);
16098 javax.swing.JComponent.managingFocusBackwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 3));
16099 }}return javax.swing.JComponent.managingFocusBackwardTraversalKeys;
16100 });
16101 c$.fetchRectangle = Clazz_defineMethod (c$, "fetchRectangle", 
16102  function () {
16103 {
16104 var rect;
16105 var size = javax.swing.JComponent.tempRectangles.size ();
16106 if (size > 0) {
16107 rect = javax.swing.JComponent.tempRectangles.remove (size - 1);
16108 } else {
16109 rect =  new java.awt.Rectangle (0, 0, 0, 0);
16110 }return rect;
16111 }});
16112 c$.recycleRectangle = Clazz_defineMethod (c$, "recycleRectangle", 
16113  function (rect) {
16114 {
16115 javax.swing.JComponent.tempRectangles.add (rect);
16116 }}, "java.awt.Rectangle");
16117 Clazz_defineMethod (c$, "setInheritsPopupMenu", 
16118 function (value) {
16119 var oldValue = this.getFlag (23);
16120 this.setFlag (23, value);
16121 this.firePropertyChangeBool ("inheritsPopupMenu", oldValue, value);
16122 }, "~B");
16123 Clazz_defineMethod (c$, "getInheritsPopupMenu", 
16124 function () {
16125 return this.getFlag (23);
16126 });
16127 Clazz_defineMethod (c$, "setComponentPopupMenu", 
16128 function (popup) {
16129 if (popup != null) {
16130 this.enableEvents (16);
16131 }var oldPopup = this.popupMenu;
16132 this.popupMenu = popup;
16133 this.firePropertyChangeObject ("componentPopupMenu", oldPopup, popup);
16134 }, "javax.swing.JPopupMenu");
16135 Clazz_defineMethod (c$, "getComponentPopupMenu", 
16136 function () {
16137 if (!this.getInheritsPopupMenu ()) {
16138 return this.popupMenu;
16139 }if (this.popupMenu == null) {
16140 var parent = this.getParent ();
16141 while (parent != null) {
16142 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16143 return (parent).getComponentPopupMenu ();
16144 }if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
16145 break;
16146 }parent = parent.getParent ();
16147 }
16148 return null;
16149 }return this.popupMenu;
16150 });
16151 Clazz_makeConstructor (c$, 
16152 function () {
16153 Clazz_superConstructor (this, javax.swing.JComponent);
16154 this.enableEvents (8);
16155 Clazz_superCall (this, javax.swing.JComponent, "setLocale", [javax.swing.JComponent.getDefaultLocale ()]);
16156 });
16157 Clazz_defineMethod (c$, "updateUI", 
16158 function () {
16159 });
16160 Clazz_defineMethod (c$, "setUI", 
16161 function (newUI) {
16162 this.uninstallUIAndProperties ();
16163 this.ui = newUI;
16164 if (this.ui != null) {
16165 this.ui.installUI (this);
16166 }this.revalidate ();
16167 this.repaint ();
16168 }, "javax.swing.plaf.ComponentUI");
16169 Clazz_defineMethod (c$, "getUI", 
16170 function () {
16171 return this.ui;
16172 });
16173 Clazz_defineMethod (c$, "uninstallUIAndProperties", 
16174  function () {
16175 if (this.ui != null) {
16176 this.ui.uninstallUI (this);
16177 }});
16178 Clazz_defineMethod (c$, "getUIClassID", 
16179 function () {
16180 return "ComponentUI";
16181 });
16182 Clazz_defineMethod (c$, "getComponentGraphics", 
16183 function (g) {
16184 var componentGraphics = g;
16185 componentGraphics.setColor (this.getForeground ());
16186 componentGraphics.setFont (this.getFont ());
16187 return componentGraphics;
16188 }, "java.awt.Graphics");
16189 Clazz_defineMethod (c$, "paintComponent", 
16190 function (g) {
16191 if (this.ui != null) {
16192 var scratchGraphics = (g == null) ? null : g.createSwingJS ();
16193 try {
16194 this.ui.update (scratchGraphics, this);
16195 } finally {
16196 scratchGraphics.dispose ();
16197 }
16198 }}, "java.awt.Graphics");
16199 Clazz_defineMethod (c$, "paintChildren", 
16200 function (g) {
16201 var isJComponent;
16202 var sg = g;
16203 {
16204 var i = this.getComponentCount () - 1;
16205 if (i < 0) {
16206 return;
16207 }if (this.paintingChild != null && (Clazz_instanceOf (this.paintingChild, javax.swing.JComponent))) {
16208 for (; i >= 0; i--) {
16209 if (this.getComponent (i) === this.paintingChild) {
16210 break;
16211 }}
16212 }var tmpRect = javax.swing.JComponent.fetchRectangle ();
16213 for (; i >= 0; i--) {
16214 var comp = this.getComponent (i);
16215 isJComponent = (Clazz_instanceOf (comp, javax.swing.JComponent));
16216 if (comp != null && (isJComponent || javax.swing.JComponent.isLightweightComponent (comp)) && (comp.isVisible () == true)) {
16217 var cr = comp.getBounds (tmpRect);
16218 var cg = sg.create4 (cr.x, cr.y, cr.width, cr.height);
16219 cg.setColor (comp.getForeground ());
16220 cg.setFont (comp.getFont ());
16221 var shouldSetFlagBack = false;
16222 try {
16223 if (isJComponent) {
16224 (comp).paint (cg);
16225 } else {
16226 comp.paint (cg);
16227 }} finally {
16228 cg.dispose ();
16229 if (shouldSetFlagBack) {
16230 (comp).setFlag (1, false);
16231 (comp).setFlag (2, false);
16232 }}
16233 }}
16234 javax.swing.JComponent.recycleRectangle (tmpRect);
16235 }}, "java.awt.Graphics");
16236 Clazz_defineMethod (c$, "paintBorder", 
16237 function (g) {
16238 var border = this.getBorder ();
16239 if (border != null) {
16240 border.paintBorder (this, g, 0, 0, this.getWidth (), this.getHeight ());
16241 }}, "java.awt.Graphics");
16242 Clazz_overrideMethod (c$, "update", 
16243 function (g) {
16244 this.paint (g);
16245 }, "java.awt.Graphics");
16246 Clazz_overrideMethod (c$, "paint", 
16247 function (g) {
16248 var shouldClearPaintFlags = false;
16249 if ((this.getWidth () <= 0) || (this.getHeight () <= 0)) {
16250 return;
16251 }var componentGraphics = this.getComponentGraphics (g);
16252 var co = componentGraphics.createSwingJS ();
16253 try {
16254 if (this.getParent () != null && !(Clazz_instanceOf (this.getParent (), javax.swing.JComponent))) {
16255 this.adjustPaintFlags ();
16256 shouldClearPaintFlags = true;
16257 }this.paintComponent (co);
16258 this.paintBorder (co);
16259 this.paintChildren (co);
16260 } finally {
16261 co.dispose ();
16262 if (shouldClearPaintFlags) {
16263 this.setFlag (1, false);
16264 this.setFlag (2, false);
16265 this.setFlag (11, false);
16266 this.setFlag (12, false);
16267 }}
16268 }, "java.awt.Graphics");
16269 Clazz_defineMethod (c$, "paintForceDoubleBuffered", 
16270 function (g) {
16271 var rm = javax.swing.RepaintManager.currentManager (this);
16272 var clip = g.getClipBounds ();
16273 rm.beginPaint ();
16274 this.setFlag (13, true);
16275 try {
16276 rm.paint (this, this, g, clip.x, clip.y, clip.width, clip.height);
16277 } finally {
16278 rm.endPaint ();
16279 this.setFlag (13, false);
16280 }
16281 }, "java.awt.Graphics");
16282 Clazz_defineMethod (c$, "isPainting", 
16283 function () {
16284 var component = this;
16285 while (component != null) {
16286 if (Clazz_instanceOf (component, javax.swing.JComponent) && (component).getFlag (1)) {
16287 return true;
16288 }component = component.getParent ();
16289 }
16290 return false;
16291 });
16292 Clazz_defineMethod (c$, "adjustPaintFlags", 
16293  function () {
16294 var jparent = null;
16295 var parent;
16296 for (parent = this.getParent (); parent != null; parent = parent.getParent ()) {
16297 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16298 jparent = parent;
16299 if (jparent.getFlag (1)) this.setFlag (1, true);
16300 if (jparent.getFlag (2)) this.setFlag (2, true);
16301 if (jparent.getFlag (11)) this.setFlag (11, true);
16302 if (jparent.getFlag (12)) this.setFlag (12, true);
16303 break;
16304 }}
16305 });
16306 Clazz_overrideMethod (c$, "printAll", 
16307 function (g) {
16308 this.setFlag (12, true);
16309 try {
16310 this.print (g);
16311 } finally {
16312 this.setFlag (12, false);
16313 }
16314 }, "java.awt.Graphics");
16315 Clazz_overrideMethod (c$, "print", 
16316 function (g) {
16317 this.setFlag (11, true);
16318 this.firePropertyChangeBool ("paintingForPrint", false, true);
16319 try {
16320 this.paint (g);
16321 } finally {
16322 this.setFlag (11, false);
16323 this.firePropertyChangeBool ("paintingForPrint", true, false);
16324 }
16325 }, "java.awt.Graphics");
16326 Clazz_defineMethod (c$, "printComponent", 
16327 function (g) {
16328 this.paintComponent (g);
16329 }, "java.awt.Graphics");
16330 Clazz_defineMethod (c$, "printChildren", 
16331 function (g) {
16332 this.paintChildren (g);
16333 }, "java.awt.Graphics");
16334 Clazz_defineMethod (c$, "printBorder", 
16335 function (g) {
16336 this.paintBorder (g);
16337 }, "java.awt.Graphics");
16338 Clazz_defineMethod (c$, "isPaintingTile", 
16339 function () {
16340 return this.getFlag (2);
16341 });
16342 Clazz_defineMethod (c$, "isPaintingForPrint", 
16343 function () {
16344 return this.getFlag (11);
16345 });
16346 Clazz_defineMethod (c$, "isManagingFocus", 
16347 function () {
16348 return false;
16349 });
16350 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16351  function () {
16352 this.registerNextFocusableComponent (this.getNextFocusableComponent ());
16353 });
16354 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16355  function (nextFocusableComponent) {
16356 if (nextFocusableComponent == null) {
16357 return;
16358 }}, "java.awt.Component");
16359 Clazz_defineMethod (c$, "deregisterNextFocusableComponent", 
16360  function () {
16361 var nextFocusableComponent = this.getNextFocusableComponent ();
16362 if (nextFocusableComponent == null) {
16363 return;
16364 }var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16365 if (nearestRoot == null) {
16366 return;
16367 }});
16368 Clazz_defineMethod (c$, "setNextFocusableComponent", 
16369 function (aComponent) {
16370 var displayable = this.isDisplayable ();
16371 if (displayable) {
16372 this.deregisterNextFocusableComponent ();
16373 }this.putClientProperty ("nextFocus", aComponent);
16374 if (displayable) {
16375 this.registerNextFocusableComponent (aComponent);
16376 }}, "java.awt.Component");
16377 Clazz_defineMethod (c$, "getNextFocusableComponent", 
16378 function () {
16379 return this.getClientProperty ("nextFocus");
16380 });
16381 Clazz_defineMethod (c$, "setRequestFocusEnabled", 
16382 function (requestFocusEnabled) {
16383 this.setFlag (22, !requestFocusEnabled);
16384 }, "~B");
16385 Clazz_defineMethod (c$, "isRequestFocusEnabled", 
16386 function () {
16387 return !this.getFlag (22);
16388 });
16389 Clazz_defineMethod (c$, "requestFocus", 
16390 function (temporary) {
16391 Clazz_superCall (this, javax.swing.JComponent, "requestFocus", []);
16392 return true;
16393 }, "~B");
16394 Clazz_defineMethod (c$, "requestFocusInWindow", 
16395 function (temporary) {
16396 return Clazz_superCall (this, javax.swing.JComponent, "requestFocusInWindow", []);
16397 }, "~B");
16398 Clazz_defineMethod (c$, "grabFocus", 
16399 function () {
16400 this.requestFocus ();
16401 });
16402 Clazz_defineMethod (c$, "setVerifyInputWhenFocusTarget", 
16403 function (verifyInputWhenFocusTarget) {
16404 var oldVerifyInputWhenFocusTarget = this.verifyInputWhenFocusTarget;
16405 this.verifyInputWhenFocusTarget = verifyInputWhenFocusTarget;
16406 this.firePropertyChangeBool ("verifyInputWhenFocusTarget", oldVerifyInputWhenFocusTarget, verifyInputWhenFocusTarget);
16407 }, "~B");
16408 Clazz_defineMethod (c$, "getVerifyInputWhenFocusTarget", 
16409 function () {
16410 return this.verifyInputWhenFocusTarget;
16411 });
16412 Clazz_overrideMethod (c$, "getFontMetrics", 
16413 function (font) {
16414 return jssun.font.FontDesignMetrics.getMetrics (font);
16415 }, "java.awt.Font");
16416 Clazz_overrideMethod (c$, "getPreferredSize", 
16417 function () {
16418 return this.getPrefSizeJComp ();
16419 });
16420 Clazz_defineMethod (c$, "getPrefSizeJComp", 
16421 function () {
16422 var size = (this.isPreferredSizeSet () || this.ui == null ? null : this.ui.getPreferredSize (this));
16423 return (size == null ? this.preferredSize () : size);
16424 });
16425 Clazz_defineMethod (c$, "getMaximumSize", 
16426 function () {
16427 if (this.isMaximumSizeSet ()) {
16428 return Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16429 }var size = null;
16430 if (this.ui != null) {
16431 size = this.ui.getMaximumSize (this);
16432 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16433 });
16434 Clazz_defineMethod (c$, "getMinimumSize", 
16435 function () {
16436 if (this.isMinimumSizeSet ()) {
16437 return Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16438 }var size = null;
16439 if (this.ui != null) {
16440 size = this.ui.getMinimumSize (this);
16441 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16442 });
16443 Clazz_overrideMethod (c$, "contains", 
16444 function (x, y) {
16445 return (this.ui != null) ? this.ui.contains (this, x, y) : this.inside (x, y);
16446 }, "~N,~N");
16447 Clazz_defineMethod (c$, "setBorder", 
16448 function (border) {
16449 var oldBorder = this.border;
16450 this.border = border;
16451 this.firePropertyChangeObject ("border", oldBorder, border);
16452 if (border !== oldBorder) {
16453 if (border == null || oldBorder == null || !(border.getBorderInsets (this).equals (oldBorder.getBorderInsets (this)))) {
16454 this.revalidate ();
16455 }this.repaint ();
16456 }}, "javax.swing.border.Border");
16457 Clazz_defineMethod (c$, "getBorder", 
16458 function () {
16459 return this.border;
16460 });
16461 Clazz_defineMethod (c$, "getInsets", 
16462 function () {
16463 if (this.border != null) {
16464 return this.border.getBorderInsets (this);
16465 }return Clazz_superCall (this, javax.swing.JComponent, "getInsets", []);
16466 });
16467 Clazz_defineMethod (c$, "getInsets", 
16468 function (insets) {
16469 if (insets == null) {
16470 insets =  new java.awt.Insets (0, 0, 0, 0);
16471 }if (this.border != null) {
16472 if (Clazz_instanceOf (this.border, javax.swing.border.AbstractBorder)) {
16473 return (this.border).getBorderInsets (this, insets);
16474 } else {
16475 return this.border.getBorderInsets (this);
16476 }} else {
16477 insets.left = insets.top = insets.right = insets.bottom = 0;
16478 return insets;
16479 }}, "java.awt.Insets");
16480 Clazz_defineMethod (c$, "getAlignmentY", 
16481 function () {
16482 if (this.isAlignmentYSet) {
16483 return this.alignmentY;
16484 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentY", []);
16485 });
16486 Clazz_defineMethod (c$, "setAlignmentY", 
16487 function (alignmentY) {
16488 this.alignmentY = alignmentY > 1.0 ? 1.0 : alignmentY < 0.0 ? 0.0 : alignmentY;
16489 this.isAlignmentYSet = true;
16490 }, "~N");
16491 Clazz_defineMethod (c$, "getAlignmentX", 
16492 function () {
16493 if (this.isAlignmentXSet) {
16494 return this.alignmentX;
16495 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentX", []);
16496 });
16497 Clazz_defineMethod (c$, "setAlignmentX", 
16498 function (alignmentX) {
16499 this.alignmentX = alignmentX > 1.0 ? 1.0 : alignmentX < 0.0 ? 0.0 : alignmentX;
16500 this.isAlignmentXSet = true;
16501 }, "~N");
16502 Clazz_defineMethod (c$, "setInputVerifier", 
16503 function (inputVerifier) {
16504 var oldInputVerifier = this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16505 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER, inputVerifier);
16506 this.firePropertyChangeObject ("inputVerifier", oldInputVerifier, inputVerifier);
16507 }, "javax.swing.InputVerifier");
16508 Clazz_defineMethod (c$, "getInputVerifier", 
16509 function () {
16510 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16511 });
16512 Clazz_defineMethod (c$, "registerKeyboardAction", 
16513 function (anAction, aCommand, aKeyStroke, aCondition) {
16514 var inputMap = this.getInputMap (aCondition, true);
16515 if (inputMap != null) {
16516 var actionMap = this.getActionMap (true);
16517 var action = Clazz_innerTypeInstance (javax.swing.JComponent.ActionStandin, this, null, anAction, aCommand);
16518 inputMap.put (aKeyStroke, action);
16519 if (actionMap != null) {
16520 actionMap.put (action, action);
16521 }}}, "java.awt.event.ActionListener,~S,javax.swing.KeyStroke,~N");
16522 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16523  function (onlyIfNew) {
16524 var inputMap = this.getInputMap (2, false);
16525 var strokes;
16526 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16527 if (inputMap != null) {
16528 strokes = inputMap.allKeys ();
16529 if (strokes != null) {
16530 for (var counter = strokes.length - 1; counter >= 0; counter--) {
16531 if (!onlyIfNew || registered == null || registered.get (strokes[counter]) == null) {
16532 this.registerWithKeyboardManager (strokes[counter]);
16533 }if (registered != null) {
16534 registered.remove (strokes[counter]);
16535 }}
16536 }} else {
16537 strokes = null;
16538 }if (registered != null && registered.size () > 0) {
16539 var keys = registered.keys ();
16540 while (keys.hasMoreElements ()) {
16541 var ks = keys.nextElement ();
16542 this.unregisterWithKeyboardManager (ks);
16543 }
16544 registered.clear ();
16545 }if (strokes != null && strokes.length > 0) {
16546 if (registered == null) {
16547 registered =  new java.util.Hashtable (strokes.length);
16548 this.putClientProperty ("_WhenInFocusedWindow", registered);
16549 }for (var counter = strokes.length - 1; counter >= 0; counter--) {
16550 registered.put (strokes[counter], strokes[counter]);
16551 }
16552 } else {
16553 this.putClientProperty ("_WhenInFocusedWindow", null);
16554 }}, "~B");
16555 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16556  function () {
16557 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16558 if (registered != null && registered.size () > 0) {
16559 var keys = registered.keys ();
16560 while (keys.hasMoreElements ()) {
16561 var ks = keys.nextElement ();
16562 this.unregisterWithKeyboardManager (ks);
16563 }
16564 }this.putClientProperty ("_WhenInFocusedWindow", null);
16565 });
16566 Clazz_defineMethod (c$, "componentInputMapChanged", 
16567 function (inputMap) {
16568 var km = this.getInputMap (2, false);
16569 while (km !== inputMap && km != null) {
16570 km = km.getParent ();
16571 }
16572 if (km != null) {
16573 this.registerWithKeyboardManager (false);
16574 }}, "javax.swing.ComponentInputMap");
16575 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16576  function (aKeyStroke) {
16577 javax.swing.KeyboardManager.getCurrentManager ().registerKeyStroke (aKeyStroke, this);
16578 }, "javax.swing.KeyStroke");
16579 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16580  function (aKeyStroke) {
16581 javax.swing.KeyboardManager.getCurrentManager ().unregisterKeyStroke (aKeyStroke, this);
16582 }, "javax.swing.KeyStroke");
16583 Clazz_defineMethod (c$, "registerKeyboardAction", 
16584 function (anAction, aKeyStroke, aCondition) {
16585 this.registerKeyboardAction (anAction, null, aKeyStroke, aCondition);
16586 }, "java.awt.event.ActionListener,javax.swing.KeyStroke,~N");
16587 Clazz_defineMethod (c$, "unregisterKeyboardAction", 
16588 function (aKeyStroke) {
16589 var am = this.getActionMap (false);
16590 for (var counter = 0; counter < 3; counter++) {
16591 var km = this.getInputMap (counter, false);
16592 if (km != null) {
16593 var actionID = km.get (aKeyStroke);
16594 if (am != null && actionID != null) {
16595 am.remove (actionID);
16596 }km.remove (aKeyStroke);
16597 }}
16598 }, "javax.swing.KeyStroke");
16599 Clazz_defineMethod (c$, "getRegisteredKeyStrokes", 
16600 function () {
16601 var counts =  Clazz_newIntArray (3, 0);
16602 var strokes =  new Array (3);
16603 for (var counter = 0; counter < 3; counter++) {
16604 var km = this.getInputMap (counter, false);
16605 strokes[counter] = (km != null) ? km.allKeys () : null;
16606 counts[counter] = (strokes[counter] != null) ? strokes[counter].length : 0;
16607 }
16608 var retValue =  new Array (counts[0] + counts[1] + counts[2]);
16609 for (var counter = 0, last = 0; counter < 3; counter++) {
16610 if (counts[counter] > 0) {
16611 System.arraycopy (strokes[counter], 0, retValue, last, counts[counter]);
16612 last += counts[counter];
16613 }}
16614 return retValue;
16615 });
16616 Clazz_defineMethod (c$, "getConditionForKeyStroke", 
16617 function (aKeyStroke) {
16618 for (var counter = 0; counter < 3; counter++) {
16619 var inputMap = this.getInputMap (counter, false);
16620 if (inputMap != null && inputMap.get (aKeyStroke) != null) {
16621 return counter;
16622 }}
16623 return -1;
16624 }, "javax.swing.KeyStroke");
16625 Clazz_defineMethod (c$, "getActionForKeyStroke", 
16626 function (aKeyStroke) {
16627 var am = this.getActionMap (false);
16628 if (am == null) {
16629 return null;
16630 }for (var counter = 0; counter < 3; counter++) {
16631 var inputMap = this.getInputMap (counter, false);
16632 if (inputMap != null) {
16633 var actionBinding = inputMap.get (aKeyStroke);
16634 if (actionBinding != null) {
16635 var action = am.get (actionBinding);
16636 if (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin)) {
16637 return (action).actionListener;
16638 }return action;
16639 }}}
16640 return null;
16641 }, "javax.swing.KeyStroke");
16642 Clazz_defineMethod (c$, "resetKeyboardActions", 
16643 function () {
16644 for (var counter = 0; counter < 3; counter++) {
16645 var inputMap = this.getInputMap (counter, false);
16646 if (inputMap != null) {
16647 inputMap.clear ();
16648 }}
16649 var am = this.getActionMap (false);
16650 if (am != null) {
16651 am.clear ();
16652 }});
16653 Clazz_defineMethod (c$, "setInputMap", 
16654 function (condition, map) {
16655 switch (condition) {
16656 case 2:
16657 if (map != null && !(Clazz_instanceOf (map, javax.swing.ComponentInputMap))) {
16658 throw  new IllegalArgumentException ("WHEN_IN_FOCUSED_WINDOW InputMaps must be of type ComponentInputMap");
16659 }this.windowInputMap = map;
16660 this.setFlag (7, true);
16661 this.registerWithKeyboardManager (false);
16662 break;
16663 case 1:
16664 this.ancestorInputMap = map;
16665 this.setFlag (6, true);
16666 break;
16667 case 0:
16668 this.focusInputMap = map;
16669 this.setFlag (5, true);
16670 break;
16671 default:
16672 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16673 }
16674 }, "~N,javax.swing.InputMap");
16675 Clazz_defineMethod (c$, "getInputMap", 
16676 function (condition) {
16677 return this.getInputMap (condition, true);
16678 }, "~N");
16679 Clazz_defineMethod (c$, "getInputMap", 
16680 function () {
16681 return this.getInputMap (0, true);
16682 });
16683 Clazz_defineMethod (c$, "setActionMap", 
16684 function (am) {
16685 this.actionMap = am;
16686 this.setFlag (8, true);
16687 }, "javax.swing.ActionMap");
16688 Clazz_defineMethod (c$, "getActionMap", 
16689 function () {
16690 return this.getActionMap (true);
16691 });
16692 Clazz_defineMethod (c$, "getInputMap", 
16693 function (condition, create) {
16694 switch (condition) {
16695 case 0:
16696 if (this.getFlag (5)) {
16697 return this.focusInputMap;
16698 }if (create) {
16699 var km =  new javax.swing.InputMap ();
16700 this.setInputMap (condition, km);
16701 return km;
16702 }break;
16703 case 1:
16704 if (this.getFlag (6)) {
16705 return this.ancestorInputMap;
16706 }if (create) {
16707 var km =  new javax.swing.InputMap ();
16708 this.setInputMap (condition, km);
16709 return km;
16710 }break;
16711 case 2:
16712 if (this.getFlag (7)) {
16713 return this.windowInputMap;
16714 }if (create) {
16715 var km =  new javax.swing.ComponentInputMap (this);
16716 this.setInputMap (condition, km);
16717 return km;
16718 }break;
16719 default:
16720 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16721 }
16722 return null;
16723 }, "~N,~B");
16724 Clazz_defineMethod (c$, "getActionMap", 
16725 function (create) {
16726 {
16727 (arguments.length == 0) && (create = true);
16728 }if (this.getFlag (8)) {
16729 return this.actionMap;
16730 }if (create) {
16731 var am =  new javax.swing.ActionMap ();
16732 this.setActionMap (am);
16733 return am;
16734 }return null;
16735 }, "~B");
16736 Clazz_defineMethod (c$, "getBaseline", 
16737 function (width, height) {
16738 Clazz_superCall (this, javax.swing.JComponent, "getBaseline", [width, height]);
16739 if (this.ui != null) {
16740 return this.ui.getBaseline (this, width, height);
16741 }return -1;
16742 }, "~N,~N");
16743 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
16744 function () {
16745 if (this.ui != null) {
16746 return this.ui.getBaselineResizeBehavior (this);
16747 }return java.awt.Component.BaselineResizeBehavior.OTHER;
16748 });
16749 Clazz_defineMethod (c$, "requestDefaultFocus", 
16750 function () {
16751 var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16752 if (nearestRoot == null) {
16753 return false;
16754 }return false;
16755 });
16756 Clazz_defineMethod (c$, "setVisible", 
16757 function (aFlag) {
16758 if (aFlag != this.isVisible ()) {
16759 Clazz_superCall (this, javax.swing.JComponent, "setVisible", [aFlag]);
16760 var parent = this.getParent ();
16761 if (parent != null) {
16762 var r = this.getBounds ();
16763 parent.repaint (r.x, r.y, r.width, r.height);
16764 }this.revalidate ();
16765 }}, "~B");
16766 Clazz_defineMethod (c$, "setEnabled", 
16767 function (enabled) {
16768 var oldEnabled = this.isEnabled ();
16769 Clazz_superCall (this, javax.swing.JComponent, "setEnabled", [enabled]);
16770 this.firePropertyChangeBool ("enabled", oldEnabled, enabled);
16771 if (enabled != oldEnabled) {
16772 this.repaint ();
16773 }}, "~B");
16774 Clazz_defineMethod (c$, "setForeground", 
16775 function (fg) {
16776 var oldFg = this.getForeground ();
16777 Clazz_superCall (this, javax.swing.JComponent, "setForeground", [fg]);
16778 if ((oldFg != null) ? !oldFg.equals (fg) : ((fg != null) && !fg.equals (oldFg))) {
16779 this.repaint ();
16780 }}, "java.awt.Color");
16781 Clazz_defineMethod (c$, "setBackground", 
16782 function (bg) {
16783 var oldBg = this.getBackground ();
16784 Clazz_superCall (this, javax.swing.JComponent, "setBackground", [bg]);
16785 if ((oldBg != null) ? !oldBg.equals (bg) : ((bg != null) && !bg.equals (oldBg))) {
16786 this.repaint ();
16787 }}, "java.awt.Color");
16788 Clazz_defineMethod (c$, "setFont", 
16789 function (font) {
16790 var oldFont = this.getFont ();
16791 Clazz_superCall (this, javax.swing.JComponent, "setFont", [font]);
16792 if (font !== oldFont) {
16793 this.revalidate ();
16794 this.repaint ();
16795 }}, "java.awt.Font");
16796 c$.getDefaultLocale = Clazz_defineMethod (c$, "getDefaultLocale", 
16797 function () {
16798 var l = javax.swing.SwingUtilities.appContextGet ("JComponent.defaultLocale");
16799 if (l == null) {
16800 l = java.util.Locale.getDefault ();
16801 javax.swing.JComponent.setDefaultLocale (l);
16802 }return l;
16803 });
16804 c$.setDefaultLocale = Clazz_defineMethod (c$, "setDefaultLocale", 
16805 function (l) {
16806 javax.swing.SwingUtilities.appContextPut ("JComponent.defaultLocale", l);
16807 }, "java.util.Locale");
16808 Clazz_defineMethod (c$, "processComponentKeyEvent", 
16809 function (e) {
16810 }, "java.awt.event.KeyEvent");
16811 Clazz_defineMethod (c$, "processKeyEvent", 
16812 function (e) {
16813 var shouldProcessKey;
16814 Clazz_superCall (this, javax.swing.JComponent, "processKeyEvent", [e]);
16815 if (!e.isConsumed ()) {
16816 this.processComponentKeyEvent (e);
16817 }shouldProcessKey = javax.swing.JComponent.KeyboardState.shouldProcess (e);
16818 if (e.isConsumed ()) {
16819 return;
16820 }if (shouldProcessKey && this.processKeyBindings (e, e.getID () == 401)) {
16821 e.consume ();
16822 }}, "java.awt.event.KeyEvent");
16823 Clazz_defineMethod (c$, "processKeyBinding", 
16824 function (ks, e, condition, pressed) {
16825 var map = this.getInputMap (condition, false);
16826 var am = this.getActionMap (false);
16827 if (map != null && am != null && this.isEnabled ()) {
16828 var binding = map.get (ks);
16829 var action = (binding == null) ? null : am.get (binding);
16830 if (action != null) {
16831 return javax.swing.SwingUtilities.notifyAction (action, ks, e, this, e.getModifiers ());
16832 }}return false;
16833 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
16834 Clazz_defineMethod (c$, "processKeyBindings", 
16835 function (e, pressed) {
16836 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (e)) {
16837 return false;
16838 }var ks;
16839 if (e.getID () == 400) {
16840 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
16841 } else {
16842 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), (pressed ? false : true));
16843 }if (this.processKeyBinding (ks, e, 0, pressed)) return true;
16844 var parent = this;
16845 while (parent != null && !(Clazz_instanceOf (parent, java.awt.Window)) && !(Clazz_instanceOf (parent, java.applet.Applet))) {
16846 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16847 if ((parent).processKeyBinding (ks, e, 1, pressed)) return true;
16848 }parent = parent.getParent ();
16849 }
16850 if (parent != null) {
16851 return javax.swing.JComponent.processKeyBindingsForAllComponents (e, parent, pressed);
16852 }return false;
16853 }, "java.awt.event.KeyEvent,~B");
16854 c$.processKeyBindingsForAllComponents = Clazz_defineMethod (c$, "processKeyBindingsForAllComponents", 
16855 function (e, container, pressed) {
16856 while (true) {
16857 if (javax.swing.KeyboardManager.getCurrentManager ().fireKeyboardAction (e, pressed, container)) {
16858 return true;
16859 }if (Clazz_instanceOf (container, javax.swing.Popup.HeavyWeightWindow)) {
16860 container = (container).getOwner ();
16861 } else {
16862 return false;
16863 }}
16864 }, "java.awt.event.KeyEvent,java.awt.Container,~B");
16865 Clazz_defineMethod (c$, "setToolTipText", 
16866 function (text) {
16867 this.putClientProperty ("ToolTipText", text);
16868 }, "~S");
16869 Clazz_defineMethod (c$, "getToolTipText", 
16870 function () {
16871 return this.getClientProperty ("ToolTipText");
16872 });
16873 Clazz_defineMethod (c$, "getToolTipText", 
16874 function (event) {
16875 return this.getToolTipText ();
16876 }, "java.awt.event.MouseEvent");
16877 Clazz_defineMethod (c$, "getToolTipLocation", 
16878 function (event) {
16879 return null;
16880 }, "java.awt.event.MouseEvent");
16881 Clazz_defineMethod (c$, "getPopupLocation", 
16882 function (event) {
16883 return null;
16884 }, "java.awt.event.MouseEvent");
16885 Clazz_defineMethod (c$, "createToolTip", 
16886 function () {
16887 var tip =  new javax.swing.JToolTip ();
16888 tip.setComponent (this);
16889 return tip;
16890 });
16891 Clazz_defineMethod (c$, "scrollRectToVisible", 
16892 function (aRect) {
16893 var parent;
16894 var dx = this.getX ();
16895 var dy = this.getY ();
16896 for (parent = this.getParent (); !(parent == null) && !(Clazz_instanceOf (parent, javax.swing.JComponent)) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane)); parent = parent.getParent ()) {
16897 var bounds = parent.getBounds ();
16898 dx += bounds.x;
16899 dy += bounds.y;
16900 }
16901 if (!(parent == null) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane))) {
16902 aRect.x += dx;
16903 aRect.y += dy;
16904 (parent).scrollRectToVisible (aRect);
16905 aRect.x -= dx;
16906 aRect.y -= dy;
16907 }}, "java.awt.Rectangle");
16908 Clazz_defineMethod (c$, "setAutoscrolls", 
16909 function (autoscrolls) {
16910 }, "~B");
16911 Clazz_defineMethod (c$, "getAutoscrolls", 
16912 function () {
16913 return this.autoscrolls;
16914 });
16915 Clazz_defineMethod (c$, "superProcessMouseMotionEvent", 
16916 function (e) {
16917 Clazz_superCall (this, javax.swing.JComponent, "processMouseMotionEvent", [e]);
16918 }, "java.awt.event.MouseEvent");
16919 Clazz_defineMethod (c$, "setCreatedDoubleBuffer", 
16920 function (newValue) {
16921 this.setFlag (9, newValue);
16922 }, "~B");
16923 Clazz_defineMethod (c$, "getCreatedDoubleBuffer", 
16924 function () {
16925 return this.getFlag (9);
16926 });
16927 Clazz_defineMethod (c$, "getClientProperties", 
16928  function () {
16929 if (this.clientProperties == null) {
16930 this.clientProperties =  new javax.swing.ArrayTable ();
16931 }return this.clientProperties;
16932 });
16933 Clazz_defineMethod (c$, "getClientProperty", 
16934 function (key) {
16935 if (this.clientProperties == null) {
16936 return null;
16937 } else {
16938 {
16939 return this.clientProperties.get (key);
16940 }}}, "~O");
16941 Clazz_defineMethod (c$, "putClientProperty", 
16942 function (key, value) {
16943 if (value == null && this.clientProperties == null) {
16944 return;
16945 }var clientProperties = this.getClientProperties ();
16946 var oldValue;
16947 {
16948 oldValue = clientProperties.get (key);
16949 if (value != null) {
16950 clientProperties.put (key, value);
16951 } else if (oldValue != null) {
16952 clientProperties.remove (key);
16953 } else {
16954 return;
16955 }}this.clientPropertyChanged (key, oldValue, value);
16956 this.firePropertyChangeObject (key.toString (), oldValue, value);
16957 }, "~O,~O");
16958 Clazz_defineMethod (c$, "clientPropertyChanged", 
16959 function (key, oldValue, newValue) {
16960 }, "~O,~O,~O");
16961 Clazz_defineMethod (c$, "setUIProperty", 
16962 function (propertyName, value) {
16963 if (propertyName === "opaque") {
16964 if (!this.getFlag (24)) {
16965 this.setOpaque ((value).booleanValue ());
16966 this.setFlag (24, false);
16967 }} else if (propertyName === "autoscrolls") {
16968 if (!this.getFlag (25)) {
16969 this.setAutoscrolls ((value).booleanValue ());
16970 this.setFlag (25, false);
16971 }} else if (propertyName === "focusTraversalKeysForward") {
16972 } else if (propertyName === "focusTraversalKeysBackward") {
16973 } else {
16974 System.out.println (swingjs.JSToolkit.getClassName (this) + " property \"" + propertyName + "\" cannot be set using this method" + swingjs.JSToolkit.getStackTrace (5));
16975 }}, "~S,~O");
16976 c$.isLightweightComponent = Clazz_defineMethod (c$, "isLightweightComponent", 
16977 function (c) {
16978 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));
16979 }, "java.awt.Component");
16980 Clazz_overrideMethod (c$, "isOpaque", 
16981 function () {
16982 return this.getFlag (3);
16983 });
16984 Clazz_defineMethod (c$, "setOpaque", 
16985 function (isOpaque) {
16986 var oldValue = this.getFlag (3);
16987 this.setFlag (3, isOpaque);
16988 this.setFlag (24, true);
16989 this.firePropertyChangeBool ("opaque", oldValue, isOpaque);
16990 }, "~B");
16991 Clazz_defineMethod (c$, "rectangleIsObscured", 
16992 function (x, y, width, height) {
16993 var numChildren = this.getComponentCount ();
16994 for (var i = 0; i < numChildren; i++) {
16995 var child = this.getComponent (i);
16996 var cx;
16997 var cy;
16998 var cw;
16999 var ch;
17000 cx = child.getX ();
17001 cy = child.getY ();
17002 cw = child.getWidth ();
17003 ch = child.getHeight ();
17004 if (x >= cx && (x + width) <= (cx + cw) && y >= cy && (y + height) <= (cy + ch) && child.isVisible ()) {
17005 if (Clazz_instanceOf (child, javax.swing.JComponent)) {
17006 return (child).isOpaque ();
17007 } else {
17008 return false;
17009 }}}
17010 return false;
17011 }, "~N,~N,~N,~N");
17012 c$.computeVisibleRect = Clazz_defineMethod (c$, "computeVisibleRect", 
17013 function (c, visibleRect) {
17014 var p = c.getParent ();
17015 var bounds = c.getBounds ();
17016 if (p == null || Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17017 visibleRect.reshape (0, 0, bounds.width, bounds.height);
17018 } else {
17019 javax.swing.JComponent.computeVisibleRect (p, visibleRect);
17020 visibleRect.x -= bounds.x;
17021 visibleRect.y -= bounds.y;
17022 javax.swing.SwingUtilities.computeIntersection (0, 0, bounds.width, bounds.height, visibleRect);
17023 }}, "java.awt.Component,java.awt.Rectangle");
17024 Clazz_defineMethod (c$, "computeVisibleRect", 
17025 function (visibleRect) {
17026 javax.swing.JComponent.computeVisibleRect (this, visibleRect);
17027 }, "java.awt.Rectangle");
17028 Clazz_defineMethod (c$, "getVisibleRect", 
17029 function () {
17030 var visibleRect =  new java.awt.Rectangle ();
17031 this.computeVisibleRect (visibleRect);
17032 return visibleRect;
17033 });
17034 Clazz_defineMethod (c$, "getTopLevelAncestor", 
17035 function () {
17036 for (var p = this; p != null; p = p.getParent ()) {
17037 if (Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17038 return p;
17039 }}
17040 return null;
17041 });
17042 Clazz_defineMethod (c$, "getAncestorNotifier", 
17043  function () {
17044 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER);
17045 });
17046 Clazz_defineMethod (c$, "addAncestorListener", 
17047 function (listener) {
17048 var ancestorNotifier = this.getAncestorNotifier ();
17049 if (ancestorNotifier == null) {
17050 ancestorNotifier =  new javax.swing.AncestorNotifier (this);
17051 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, ancestorNotifier);
17052 }ancestorNotifier.addAncestorListener (listener);
17053 }, "javax.swing.event.AncestorListener");
17054 Clazz_defineMethod (c$, "removeAncestorListener", 
17055 function (listener) {
17056 var ancestorNotifier = this.getAncestorNotifier ();
17057 if (ancestorNotifier == null) {
17058 return;
17059 }ancestorNotifier.removeAncestorListener (listener);
17060 if (ancestorNotifier.listenerList.getListenerList ().length == 0) {
17061 ancestorNotifier.removeAllListeners ();
17062 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, null);
17063 }}, "javax.swing.event.AncestorListener");
17064 Clazz_defineMethod (c$, "getAncestorListeners", 
17065 function () {
17066 var ancestorNotifier = this.getAncestorNotifier ();
17067 if (ancestorNotifier == null) {
17068 return  new Array (0);
17069 }return ancestorNotifier.getAncestorListeners ();
17070 });
17071 Clazz_defineMethod (c$, "getListeners", 
17072 function (listenerType) {
17073 var result;
17074 if (listenerType === javax.swing.event.AncestorListener) {
17075 result = this.getAncestorListeners ();
17076 } else if (listenerType === java.beans.PropertyChangeListener) {
17077 result = this.getPropertyChangeListeners ();
17078 } else {
17079 result = this.listenerList.getListeners (listenerType);
17080 }if (result.length == 0) {
17081 return Clazz_superCall (this, javax.swing.JComponent, "getListeners", [listenerType]);
17082 }return result;
17083 }, "Class");
17084 Clazz_defineMethod (c$, "addNotify", 
17085 function () {
17086 Clazz_superCall (this, javax.swing.JComponent, "addNotify", []);
17087 this.firePropertyChangeObject ("ancestor", null, this.getParent ());
17088 this.registerWithKeyboardManager (false);
17089 this.registerNextFocusableComponent ();
17090 });
17091 Clazz_defineMethod (c$, "removeNotify", 
17092 function () {
17093 Clazz_superCall (this, javax.swing.JComponent, "removeNotify", []);
17094 this.firePropertyChangeObject ("ancestor", this.getParent (), null);
17095 this.unregisterWithKeyboardManager ();
17096 this.deregisterNextFocusableComponent ();
17097 if (this.getCreatedDoubleBuffer ()) {
17098 javax.swing.RepaintManager.currentManager (this).resetDoubleBuffer ();
17099 this.setCreatedDoubleBuffer (false);
17100 }});
17101 Clazz_defineMethod (c$, "repaint", 
17102 function (tm, x, y, width, height) {
17103 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
17104 }, "~N,~N,~N,~N,~N");
17105 Clazz_defineMethod (c$, "repaint", 
17106 function (r) {
17107 this.repaint (0, r.x, r.y, r.width, r.height);
17108 }, "java.awt.Rectangle");
17109 Clazz_defineMethod (c$, "revalidate", 
17110 function () {
17111 if (this.getParent () == null) {
17112 return;
17113 }if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
17114 this.invalidate ();
17115 javax.swing.RepaintManager.currentManager (this).addInvalidComponent (this);
17116 } else {
17117 {
17118 if (this.getFlag (28)) {
17119 return;
17120 }this.setFlag (28, true);
17121 }var callRevalidate = ((Clazz_isClassDefined ("javax.swing.JComponent$2") ? 0 : javax.swing.JComponent.$JComponent$2$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$2, this, null));
17122 javax.swing.SwingUtilities.invokeLater (callRevalidate);
17123 }});
17124 Clazz_defineMethod (c$, "isValidateRoot", 
17125 function () {
17126 return false;
17127 });
17128 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
17129 function () {
17130 return true;
17131 });
17132 Clazz_defineMethod (c$, "isPaintingOrigin", 
17133 function () {
17134 return false;
17135 });
17136 Clazz_defineMethod (c$, "paintImmediately", 
17137 function (x, y, w, h) {
17138 {
17139 if (arguments.length == 1) {
17140 var r = x;
17141 x = r.x;
17142 y = r.y;
17143 w = r.width;
17144 h = r.height;
17145 }
17146 }var c = this;
17147 var parent;
17148 if (!this.isShowing ()) {
17149 return;
17150 }while (!(c).isOpaque ()) {
17151 parent = c.getParent ();
17152 if (parent != null) {
17153 x += c.getX ();
17154 y += c.getY ();
17155 c = parent;
17156 } else {
17157 break;
17158 }if (!(Clazz_instanceOf (c, javax.swing.JComponent))) {
17159 break;
17160 }}
17161 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17162 (c)._paintImmediately (x, y, w, h);
17163 } else {
17164 c.repaint (x, y, w, h);
17165 }}, "~N,~N,~N,~N");
17166 Clazz_defineMethod (c$, "paintImmediately", 
17167 function (r) {
17168 this.paintImmediately (r.x, r.y, r.width, r.height);
17169 }, "java.awt.Rectangle");
17170 Clazz_defineMethod (c$, "alwaysOnTop", 
17171 function () {
17172 return false;
17173 });
17174 Clazz_defineMethod (c$, "setPaintingChild", 
17175 function (paintingChild) {
17176 this.paintingChild = paintingChild;
17177 }, "java.awt.Component");
17178 Clazz_defineMethod (c$, "_paintImmediately", 
17179 function (x, y, w, h) {
17180 var g;
17181 var c;
17182 var tmpX;
17183 var tmpY;
17184 var tmpWidth;
17185 var tmpHeight;
17186 var offsetX = 0;
17187 var offsetY = 0;
17188 var hasBuffer = false;
17189 var bufferedComponent = null;
17190 var paintingComponent = this;
17191 var path =  new java.util.ArrayList (7);
17192 var pIndex = -1;
17193 var pCount = 0;
17194 tmpX = tmpY = tmpWidth = tmpHeight = 0;
17195 var paintImmediatelyClip = javax.swing.JComponent.fetchRectangle ();
17196 paintImmediatelyClip.x = x;
17197 paintImmediatelyClip.y = y;
17198 paintImmediatelyClip.width = w;
17199 paintImmediatelyClip.height = h;
17200 var ontop = this.alwaysOnTop () && this.isOpaque ();
17201 if (ontop) {
17202 javax.swing.SwingUtilities.computeIntersection (0, 0, this.getWidth (), this.getHeight (), paintImmediatelyClip);
17203 if (paintImmediatelyClip.width == 0) {
17204 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17205 return;
17206 }}var child;
17207 for (c = this, child = null; c != null && !(Clazz_instanceOf (c, java.awt.Window)) && !(Clazz_instanceOf (c, java.applet.Applet)); child = c, c = c.getParent ()) {
17208 var jc = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
17209 path.add (c);
17210 if (!ontop && jc != null && !jc.isOptimizedDrawingEnabled ()) {
17211 var resetPC;
17212 if (c !== this) {
17213 if (jc.isPaintingOrigin ()) {
17214 resetPC = true;
17215 } else {
17216 var children = c.getComponents ();
17217 var i = 0;
17218 for (; i < children.length; i++) {
17219 if (children[i] === child) break;
17220 }
17221 switch (jc.getObscuredState (i, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height)) {
17222 case 0:
17223 resetPC = false;
17224 break;
17225 case 2:
17226 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17227 return;
17228 default:
17229 resetPC = true;
17230 break;
17231 }
17232 }} else {
17233 resetPC = false;
17234 }if (resetPC) {
17235 paintingComponent = jc;
17236 pIndex = pCount;
17237 offsetX = offsetY = 0;
17238 hasBuffer = false;
17239 }}pCount++;
17240 if (!ontop) {
17241 var bx = c.getX ();
17242 var by = c.getY ();
17243 tmpWidth = c.getWidth ();
17244 tmpHeight = c.getHeight ();
17245 javax.swing.SwingUtilities.computeIntersection (tmpX, tmpY, tmpWidth, tmpHeight, paintImmediatelyClip);
17246 paintImmediatelyClip.x += bx;
17247 paintImmediatelyClip.y += by;
17248 offsetX += bx;
17249 offsetY += by;
17250 }}
17251 if (c == null || paintImmediatelyClip.width <= 0 || paintImmediatelyClip.height <= 0) {
17252 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17253 return;
17254 }paintingComponent.setFlag (13, true);
17255 paintImmediatelyClip.x -= offsetX;
17256 paintImmediatelyClip.y -= offsetY;
17257 if (paintingComponent !== this) {
17258 var comp;
17259 var i = pIndex;
17260 for (; i > 0; i--) {
17261 comp = path.get (i);
17262 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17263 (comp).setPaintingChild (path.get (i - 1));
17264 }}
17265 }try {
17266 g = javax.swing.JComponent.safelyGetGraphics (paintingComponent, c).createSwingJS ();
17267 try {
17268 if (hasBuffer) {
17269 var rm = javax.swing.RepaintManager.currentManager (bufferedComponent);
17270 rm.beginPaint ();
17271 try {
17272 rm.paint (paintingComponent, bufferedComponent, g, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height);
17273 } finally {
17274 rm.endPaint ();
17275 }
17276 } else {
17277 paintingComponent.paint (g);
17278 }} finally {
17279 g.dispose ();
17280 }
17281 } finally {
17282 if (paintingComponent !== this) {
17283 var comp;
17284 var i = pIndex;
17285 for (; i > 0; i--) {
17286 comp = path.get (i);
17287 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17288 (comp).setPaintingChild (null);
17289 }}
17290 }paintingComponent.setFlag (13, false);
17291 }
17292 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17293 }, "~N,~N,~N,~N");
17294 Clazz_defineMethod (c$, "paintToOffscreen", 
17295 function (g, x, y, w, h, maxX, maxY) {
17296 try {
17297 this.setFlag (1, true);
17298 if ((y + h) < maxY || (x + w) < maxX) {
17299 this.setFlag (2, true);
17300 }if (this.getFlag (13)) {
17301 this.paint (g);
17302 } else {
17303 if (!this.rectangleIsObscured (x, y, w, h)) {
17304 this.paintComponent (g);
17305 this.paintBorder (g);
17306 }this.paintChildren (g);
17307 }} finally {
17308 this.setFlag (1, false);
17309 this.setFlag (2, false);
17310 }
17311 }, "java.awt.Graphics,~N,~N,~N,~N,~N,~N");
17312 Clazz_defineMethod (c$, "getObscuredState", 
17313  function (compIndex, x, y, width, height) {
17314 var retValue = 0;
17315 var tmpRect = javax.swing.JComponent.fetchRectangle ();
17316 for (var i = compIndex - 1; i >= 0; i--) {
17317 var sibling = this.getComponent (i);
17318 if (!sibling.isVisible ()) {
17319 continue;
17320 }var siblingRect;
17321 var opaque;
17322 if (Clazz_instanceOf (sibling, javax.swing.JComponent)) {
17323 opaque = (sibling).isOpaque ();
17324 if (!opaque) {
17325 if (retValue == 1) {
17326 continue;
17327 }}} else {
17328 opaque = true;
17329 }siblingRect = sibling.getBounds (tmpRect);
17330 if (opaque && x >= siblingRect.x && (x + width) <= (siblingRect.x + siblingRect.width) && y >= siblingRect.y && (y + height) <= (siblingRect.y + siblingRect.height)) {
17331 javax.swing.JComponent.recycleRectangle (tmpRect);
17332 return 2;
17333 } else if (retValue == 0 && !((x + width <= siblingRect.x) || (y + height <= siblingRect.y) || (x >= siblingRect.x + siblingRect.width) || (y >= siblingRect.y + siblingRect.height))) {
17334 retValue = 1;
17335 }}
17336 javax.swing.JComponent.recycleRectangle (tmpRect);
17337 return retValue;
17338 }, "~N,~N,~N,~N,~N");
17339 Clazz_defineMethod (c$, "checkIfChildObscuredBySibling", 
17340 function () {
17341 return true;
17342 });
17343 Clazz_defineMethod (c$, "setFlag", 
17344  function (aFlag, aValue) {
17345 if (aValue) {
17346 this.flags |= (1 << aFlag);
17347 } else {
17348 this.flags &= ~(1 << aFlag);
17349 }}, "~N,~B");
17350 Clazz_defineMethod (c$, "getFlag", 
17351  function (aFlag) {
17352 var mask = (1 << aFlag);
17353 return ((this.flags & mask) == mask);
17354 }, "~N");
17355 Clazz_defineMethod (c$, "setDoubleBuffered", 
17356 function (aFlag) {
17357 }, "~B");
17358 Clazz_overrideMethod (c$, "isDoubleBuffered", 
17359 function () {
17360 return this.getFlag (0);
17361 });
17362 Clazz_defineMethod (c$, "getRootPane", 
17363 function () {
17364 return javax.swing.SwingUtilities.getRootPane (this);
17365 });
17366 Clazz_defineMethod (c$, "paramString", 
17367 function () {
17368 var preferredSizeString = (this.isPreferredSizeSet () ? this.getPreferredSize ().toString () : "");
17369 var minimumSizeString = (this.isMinimumSizeSet () ? this.getMinimumSize ().toString () : "");
17370 var maximumSizeString = (this.isMaximumSizeSet () ? this.getMaximumSize ().toString () : "");
17371 var borderString = (this.border == null ? "" : (this.border === this ? "this" : this.border.toString ()));
17372 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;
17373 });
17374 c$.$JComponent$ActionStandin$ = function () {
17375 Clazz_pu$h(self.c$);
17376 c$ = Clazz_decorateAsClass (function () {
17377 Clazz_prepareCallback (this, arguments);
17378 this.actionListener = null;
17379 this.command = null;
17380 this.action = null;
17381 Clazz_instantialize (this, arguments);
17382 }, javax.swing.JComponent, "ActionStandin", null, javax.swing.Action);
17383 Clazz_makeConstructor (c$, 
17384 function (a, b) {
17385 this.actionListener = a;
17386 if (Clazz_instanceOf (a, javax.swing.Action)) {
17387 this.action = a;
17388 } else {
17389 this.action = null;
17390 }this.command = b;
17391 }, "java.awt.event.ActionListener,~S");
17392 Clazz_defineMethod (c$, "getValue", 
17393 function (a) {
17394 if (a != null) {
17395 if (a.equals ("ActionCommandKey")) {
17396 return this.command;
17397 }if (this.action != null) {
17398 return this.action.getValue (a);
17399 }if (a.equals ("Name")) {
17400 return "ActionStandin";
17401 }}return null;
17402 }, "~S");
17403 Clazz_defineMethod (c$, "isEnabled", 
17404 function () {
17405 if (this.actionListener == null) {
17406 return false;
17407 }if (this.action == null) {
17408 return true;
17409 }return this.action.isEnabled ();
17410 });
17411 Clazz_defineMethod (c$, "actionPerformed", 
17412 function (a) {
17413 if (this.actionListener != null) {
17414 this.actionListener.actionPerformed (a);
17415 }}, "java.awt.event.ActionEvent");
17416 Clazz_overrideMethod (c$, "putValue", 
17417 function (a, b) {
17418 }, "~S,~O");
17419 Clazz_overrideMethod (c$, "setEnabled", 
17420 function (a) {
17421 }, "~B");
17422 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
17423 function (a) {
17424 }, "java.beans.PropertyChangeListener");
17425 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
17426 function (a) {
17427 }, "java.beans.PropertyChangeListener");
17428 c$ = Clazz_p0p ();
17429 };
17430 c$.$JComponent$2$ = function () {
17431 Clazz_pu$h(self.c$);
17432 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$2", null, Runnable);
17433 Clazz_overrideMethod (c$, "run", 
17434 function () {
17435 {
17436 this.b$["javax.swing.JComponent"].setFlag (28, false);
17437 }this.b$["javax.swing.JComponent"].revalidate ();
17438 });
17439 c$ = Clazz_p0p ();
17440 };
17441 c$.$JComponent$1$ = function () {
17442 Clazz_pu$h(self.c$);
17443 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$1", null, jssun.awt.RequestFocusController);
17444 Clazz_overrideMethod (c$, "acceptRequestFocus", 
17445 function (from, to, temporary, focusedWindowChangeAllowed, cause) {
17446 if ((to == null) || !(Clazz_instanceOf (to, javax.swing.JComponent))) {
17447 return true;
17448 }if ((from == null) || !(Clazz_instanceOf (from, javax.swing.JComponent))) {
17449 return true;
17450 }var target = to;
17451 if (!target.getVerifyInputWhenFocusTarget ()) {
17452 return true;
17453 }var jFocusOwner = from;
17454 var iv = jFocusOwner.getInputVerifier ();
17455 if (iv == null) {
17456 return true;
17457 } else {
17458 var currentSource = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17459 if (currentSource === jFocusOwner) {
17460 return true;
17461 }javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, jFocusOwner);
17462 try {
17463 return iv.shouldYieldFocus (jFocusOwner);
17464 } finally {
17465 if (currentSource != null) {
17466 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, currentSource);
17467 } else {
17468 javax.swing.SwingUtilities.appContextRemove (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17469 }}
17470 }}, "java.awt.Component,java.awt.Component,~B,~B,jssun.awt.CausedFocusEvent.Cause");
17471 c$ = Clazz_p0p ();
17472 };
17473 Clazz_pu$h(self.c$);
17474 c$ = Clazz_decorateAsClass (function () {
17475 this.array = null;
17476 this.count = 0;
17477 this.capacity = 0;
17478 Clazz_instantialize (this, arguments);
17479 }, javax.swing.JComponent, "IntVector");
17480 Clazz_defineMethod (c$, "size", 
17481 function () {
17482 return this.count;
17483 });
17484 Clazz_defineMethod (c$, "elementAt", 
17485 function (a) {
17486 return this.array[a];
17487 }, "~N");
17488 Clazz_defineMethod (c$, "addElement", 
17489 function (a) {
17490 if (this.count == this.capacity) {
17491 this.capacity = (this.capacity + 2) * 2;
17492 var b =  Clazz_newIntArray (this.capacity, 0);
17493 if (this.count > 0) {
17494 System.arraycopy (this.array, 0, b, 0, this.count);
17495 }this.array = b;
17496 }this.array[this.count++] = a;
17497 }, "~N");
17498 Clazz_defineMethod (c$, "setElementAt", 
17499 function (a, b) {
17500 this.array[b] = a;
17501 }, "~N,~N");
17502 c$ = Clazz_p0p ();
17503 Clazz_pu$h(self.c$);
17504 c$ = Clazz_declareType (javax.swing.JComponent, "KeyboardState");
17505 c$.getKeyCodeArray = Clazz_defineMethod (c$, "getKeyCodeArray", 
17506 function () {
17507 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.KeyboardState.keyCodesKey);
17508 if (a == null) {
17509 a =  new javax.swing.JComponent.IntVector ();
17510 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.KeyboardState.keyCodesKey, a);
17511 }return a;
17512 });
17513 c$.registerKeyPressed = Clazz_defineMethod (c$, "registerKeyPressed", 
17514 function (a) {
17515 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17516 var c = b.size ();
17517 var d;
17518 for (d = 0; d < c; d++) {
17519 if (b.elementAt (d) == -1) {
17520 b.setElementAt (a, d);
17521 return;
17522 }}
17523 b.addElement (a);
17524 }, "~N");
17525 c$.registerKeyReleased = Clazz_defineMethod (c$, "registerKeyReleased", 
17526 function (a) {
17527 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17528 var c = b.size ();
17529 var d;
17530 for (d = 0; d < c; d++) {
17531 if (b.elementAt (d) == a) {
17532 b.setElementAt (-1, d);
17533 return;
17534 }}
17535 }, "~N");
17536 c$.keyIsPressed = Clazz_defineMethod (c$, "keyIsPressed", 
17537 function (a) {
17538 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17539 var c = b.size ();
17540 var d;
17541 for (d = 0; d < c; d++) {
17542 if (b.elementAt (d) == a) {
17543 return true;
17544 }}
17545 return false;
17546 }, "~N");
17547 c$.shouldProcess = Clazz_defineMethod (c$, "shouldProcess", 
17548 function (a) {
17549 switch (a.getID ()) {
17550 case 401:
17551 if (!javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ())) {
17552 javax.swing.JComponent.KeyboardState.registerKeyPressed (a.getKeyCode ());
17553 }return true;
17554 case 402:
17555 if (javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ()) || a.getKeyCode () == 154) {
17556 javax.swing.JComponent.KeyboardState.registerKeyReleased (a.getKeyCode ());
17557 return true;
17558 }return false;
17559 case 400:
17560 return true;
17561 default:
17562 return false;
17563 }
17564 }, "java.awt.event.KeyEvent");
17565 c$.keyCodesKey = c$.prototype.keyCodesKey = javax.swing.JComponent.KeyboardState;
17566 c$ = Clazz_p0p ();
17567 Clazz_defineStatics (c$,
17568 "uiClassID", "ComponentUI",
17569 "managingFocusForwardTraversalKeys", null,
17570 "managingFocusBackwardTraversalKeys", null,
17571 "NOT_OBSCURED", 0,
17572 "PARTIALLY_OBSCURED", 1,
17573 "COMPLETELY_OBSCURED", 2,
17574 "DEBUG_GRAPHICS_LOADED", false);
17575 c$.INPUT_VERIFIER_SOURCE_KEY = c$.prototype.INPUT_VERIFIER_SOURCE_KEY =  new Clazz._O ();
17576 Clazz_defineStatics (c$,
17577 "WHEN_FOCUSED", 0,
17578 "WHEN_ANCESTOR_OF_FOCUSED_COMPONENT", 1,
17579 "WHEN_IN_FOCUSED_WINDOW", 2,
17580 "UNDEFINED_CONDITION", -1,
17581 "WHEN_IN_FOCUSED_WINDOW_BINDINGS", "_WhenInFocusedWindow",
17582 "TOOL_TIP_TEXT_KEY", "ToolTipText",
17583 "NEXT_FOCUS", "nextFocus",
17584 "IS_DOUBLE_BUFFERED", 0,
17585 "ANCESTOR_USING_BUFFER", 1,
17586 "IS_PAINTING_TILE", 2,
17587 "IS_OPAQUE", 3,
17588 "FOCUS_INPUTMAP_CREATED", 5,
17589 "ANCESTOR_INPUTMAP_CREATED", 6,
17590 "WIF_INPUTMAP_CREATED", 7,
17591 "ACTIONMAP_CREATED", 8,
17592 "CREATED_DOUBLE_BUFFER", 9,
17593 "IS_PRINTING", 11,
17594 "IS_PRINTING_ALL", 12,
17595 "IS_REPAINTING", 13,
17596 "REQUEST_FOCUS_DISABLED", 22,
17597 "INHERITS_POPUP_MENU", 23,
17598 "OPAQUE_SET", 24,
17599 "AUTOSCROLLS_SET", 25,
17600 "REVALIDATE_RUNNABLE_SCHEDULED", 28);
17601 c$.tempRectangles = c$.prototype.tempRectangles =  new java.util.ArrayList (11);
17602 Clazz_defineStatics (c$,
17603 "defaultLocale", "JComponent.defaultLocale",
17604 "componentObtainingGraphicsFrom", null);
17605 c$.componentObtainingGraphicsFromLock = c$.prototype.componentObtainingGraphicsFromLock =  new Clazz._O ();
17606 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));
17607 });
17608 Clazz_declarePackage ("javax.swing");
17609 Clazz_load (["java.awt.event.ActionListener"], "javax.swing.Action", null, function () {
17610 c$ = Clazz_declareInterface (javax.swing, "Action", java.awt.event.ActionListener);
17611 Clazz_defineStatics (c$,
17612 "DEFAULT", "Default",
17613 "NAME", "Name",
17614 "SHORT_DESCRIPTION", "ShortDescription",
17615 "LONG_DESCRIPTION", "LongDescription",
17616 "SMALL_ICON", "SmallIcon",
17617 "ACTION_COMMAND_KEY", "ActionCommandKey",
17618 "ACCELERATOR_KEY", "AcceleratorKey",
17619 "MNEMONIC_KEY", "MnemonicKey",
17620 "SELECTED_KEY", "SwingSelectedKey",
17621 "DISPLAYED_MNEMONIC_INDEX_KEY", "SwingDisplayedMnemonicIndexKey",
17622 "LARGE_ICON_KEY", "SwingLargeIconKey");
17623 });
17624 Clazz_declarePackage ("javax.swing");
17625 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 () {
17626 c$ = Clazz_declareType (javax.swing, "SwingUtilities", null, javax.swing.SwingConstants);
17627 c$.installSwingDropTargetAsNecessary = Clazz_defineMethod (c$, "installSwingDropTargetAsNecessary", 
17628 function (c, t) {
17629 }, "java.awt.Component,javax.swing.TransferHandler");
17630 c$.isRectangleContainingRectangle = Clazz_defineMethod (c$, "isRectangleContainingRectangle", 
17631 function (a, b) {
17632 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)) {
17633 return true;
17634 }return false;
17635 }, "java.awt.Rectangle,java.awt.Rectangle");
17636 c$.getLocalBounds = Clazz_defineMethod (c$, "getLocalBounds", 
17637 function (aComponent) {
17638 var b =  new java.awt.Rectangle (aComponent.getBounds ());
17639 b.x = b.y = 0;
17640 return b;
17641 }, "java.awt.Component");
17642 c$.getWindowAncestor = Clazz_defineMethod (c$, "getWindowAncestor", 
17643 function (c) {
17644 for (var p = c.getParent (); p != null; p = p.getParent ()) {
17645 if (Clazz_instanceOf (p, java.awt.Window)) {
17646 return p;
17647 }}
17648 return null;
17649 }, "java.awt.Component");
17650 c$.convertScreenLocationToParent = Clazz_defineMethod (c$, "convertScreenLocationToParent", 
17651 function (parent, x, y) {
17652 for (var p = parent; p != null; p = p.getParent ()) {
17653 if (Clazz_instanceOf (p, java.awt.Window)) {
17654 var point =  new java.awt.Point (x, y);
17655 javax.swing.SwingUtilities.convertPointFromScreen (point, parent);
17656 return point;
17657 }}
17658 throw  new Error ("convertScreenLocationToParent: no window ancestor");
17659 }, "java.awt.Container,~N,~N");
17660 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17661 function (source, aPoint, destination) {
17662 var p;
17663 if (source == null && destination == null) return aPoint;
17664 if (source == null) {
17665 source = javax.swing.SwingUtilities.getWindowAncestor (destination);
17666 if (source == null) throw  new Error ("Source component not connected to component tree hierarchy");
17667 }p =  new java.awt.Point (aPoint);
17668 javax.swing.SwingUtilities.convertPointToScreen (p, source);
17669 if (destination == null) {
17670 destination = javax.swing.SwingUtilities.getWindowAncestor (source);
17671 if (destination == null) throw  new Error ("Destination component not connected to component tree hierarchy");
17672 }javax.swing.SwingUtilities.convertPointFromScreen (p, destination);
17673 return p;
17674 }, "java.awt.Component,java.awt.Point,java.awt.Component");
17675 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17676 function (source, x, y, destination) {
17677 var point =  new java.awt.Point (x, y);
17678 return javax.swing.SwingUtilities.convertPoint (source, point, destination);
17679 }, "java.awt.Component,~N,~N,java.awt.Component");
17680 c$.convertRectangle = Clazz_defineMethod (c$, "convertRectangle", 
17681 function (source, aRectangle, destination) {
17682 var point =  new java.awt.Point (aRectangle.x, aRectangle.y);
17683 point = javax.swing.SwingUtilities.convertPoint (source, point, destination);
17684 return  new java.awt.Rectangle (point.x, point.y, aRectangle.width, aRectangle.height);
17685 }, "java.awt.Component,java.awt.Rectangle,java.awt.Component");
17686 c$.getAncestorOfClass = Clazz_defineMethod (c$, "getAncestorOfClass", 
17687 function (c, comp) {
17688 if (comp == null || c == null) return null;
17689 var parent = comp.getParent ();
17690 while (parent != null && !(c.isInstance (parent))) parent = parent.getParent ();
17691
17692 return parent;
17693 }, "Class,java.awt.Component");
17694 c$.getAncestorNamed = Clazz_defineMethod (c$, "getAncestorNamed", 
17695 function (name, comp) {
17696 if (comp == null || name == null) return null;
17697 var parent = comp.getParent ();
17698 while (parent != null && !(name.equals (parent.getName ()))) parent = parent.getParent ();
17699
17700 return parent;
17701 }, "~S,java.awt.Component");
17702 c$.getDeepestComponentAt = Clazz_defineMethod (c$, "getDeepestComponentAt", 
17703 function (parent, x, y) {
17704 if (!parent.contains (x, y)) {
17705 return null;
17706 }if (Clazz_instanceOf (parent, java.awt.Container)) {
17707 var components = (parent).getComponents ();
17708 for (var i = 0; i < components.length; i++) {
17709 var comp = components[i];
17710 if (comp != null && comp.isVisible ()) {
17711 var loc = comp.getLocation ();
17712 if (Clazz_instanceOf (comp, java.awt.Container)) {
17713 comp = javax.swing.SwingUtilities.getDeepestComponentAt (comp, x - loc.x, y - loc.y);
17714 } else {
17715 comp = comp.getComponentAt (x - loc.x, y - loc.y);
17716 }if (comp != null && comp.isVisible ()) {
17717 return comp;
17718 }}}
17719 }return parent;
17720 }, "java.awt.Component,~N,~N");
17721 c$.convertMouseEvent = Clazz_defineMethod (c$, "convertMouseEvent", 
17722 function (source, sourceEvent, destination) {
17723 var p = javax.swing.SwingUtilities.convertPoint (source,  new java.awt.Point (sourceEvent.getX (), sourceEvent.getY ()), destination);
17724 var newSource;
17725 if (destination != null) newSource = destination;
17726  else newSource = source;
17727 var newEvent;
17728 if (Clazz_instanceOf (sourceEvent, java.awt.event.MouseWheelEvent)) {
17729 var sourceWheelEvent = sourceEvent;
17730 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 ());
17731 } else if (Clazz_instanceOf (sourceEvent, javax.swing.event.MenuDragMouseEvent)) {
17732 var sourceMenuDragEvent = sourceEvent;
17733 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 ());
17734 } else {
17735 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);
17736 }return newEvent;
17737 }, "java.awt.Component,java.awt.event.MouseEvent,java.awt.Component");
17738 c$.convertPointToScreen = Clazz_defineMethod (c$, "convertPointToScreen", 
17739 function (p, c) {
17740 var x;
17741 var y;
17742 do {
17743 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17744 x = (c).getX ();
17745 y = (c).getY ();
17746 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17747 try {
17748 var pp = c.getLocationOnScreen ();
17749 x = pp.x;
17750 y = pp.y;
17751 } catch (icse) {
17752 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17753 x = c.getX ();
17754 y = c.getY ();
17755 } else {
17756 throw icse;
17757 }
17758 }
17759 } else {
17760 x = c.getX ();
17761 y = c.getY ();
17762 }p.x += x;
17763 p.y += y;
17764 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17765 c = c.getParent ();
17766 } while (c != null);
17767 }, "java.awt.Point,java.awt.Component");
17768 c$.convertPointFromScreen = Clazz_defineMethod (c$, "convertPointFromScreen", 
17769 function (p, c) {
17770 var x;
17771 var y;
17772 do {
17773 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17774 x = (c).getX ();
17775 y = (c).getY ();
17776 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17777 try {
17778 var pp = c.getLocationOnScreen ();
17779 x = pp.x;
17780 y = pp.y;
17781 } catch (icse) {
17782 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17783 x = c.getX ();
17784 y = c.getY ();
17785 } else {
17786 throw icse;
17787 }
17788 }
17789 } else {
17790 x = c.getX ();
17791 y = c.getY ();
17792 }p.x -= x;
17793 p.y -= y;
17794 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17795 c = c.getParent ();
17796 } while (c != null);
17797 }, "java.awt.Point,java.awt.Component");
17798 c$.windowForComponent = Clazz_defineMethod (c$, "windowForComponent", 
17799 function (c) {
17800 return javax.swing.SwingUtilities.getWindowAncestor (c);
17801 }, "java.awt.Component");
17802 c$.isDescendingFrom = Clazz_defineMethod (c$, "isDescendingFrom", 
17803 function (a, b) {
17804 if (a === b) return true;
17805 for (var p = a.getParent (); p != null; p = p.getParent ()) if (p === b) return true;
17806
17807 return false;
17808 }, "java.awt.Component,java.awt.Component");
17809 c$.computeIntersection = Clazz_defineMethod (c$, "computeIntersection", 
17810 function (x, y, width, height, dest) {
17811 var x1 = (x > dest.x) ? x : dest.x;
17812 var x2 = ((x + width) < (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17813 var y1 = (y > dest.y) ? y : dest.y;
17814 var y2 = ((y + height) < (dest.y + dest.height) ? (y + height) : (dest.y + dest.height));
17815 dest.x = x1;
17816 dest.y = y1;
17817 dest.width = x2 - x1;
17818 dest.height = y2 - y1;
17819 if (dest.width < 0 || dest.height < 0) {
17820 dest.x = dest.y = dest.width = dest.height = 0;
17821 }return dest;
17822 }, "~N,~N,~N,~N,java.awt.Rectangle");
17823 c$.computeUnion = Clazz_defineMethod (c$, "computeUnion", 
17824 function (x, y, width, height, dest) {
17825 var x1 = (x < dest.x) ? x : dest.x;
17826 var x2 = ((x + width) > (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17827 var y1 = (y < dest.y) ? y : dest.y;
17828 var y2 = ((y + height) > (dest.y + dest.height)) ? (y + height) : (dest.y + dest.height);
17829 dest.x = x1;
17830 dest.y = y1;
17831 dest.width = (x2 - x1);
17832 dest.height = (y2 - y1);
17833 return dest;
17834 }, "~N,~N,~N,~N,java.awt.Rectangle");
17835 c$.computeDifference = Clazz_defineMethod (c$, "computeDifference", 
17836 function (rectA, rectB) {
17837 if (rectB == null || !rectA.intersects (rectB) || javax.swing.SwingUtilities.isRectangleContainingRectangle (rectB, rectA)) {
17838 return  new Array (0);
17839 }var t =  new java.awt.Rectangle ();
17840 var a = null;
17841 var b = null;
17842 var c = null;
17843 var d = null;
17844 var result;
17845 var rectCount = 0;
17846 if (javax.swing.SwingUtilities.isRectangleContainingRectangle (rectA, rectB)) {
17847 t.x = rectA.x;
17848 t.y = rectA.y;
17849 t.width = rectB.x - rectA.x;
17850 t.height = rectA.height;
17851 if (t.width > 0 && t.height > 0) {
17852 a =  new java.awt.Rectangle (t);
17853 rectCount++;
17854 }t.x = rectB.x;
17855 t.y = rectA.y;
17856 t.width = rectB.width;
17857 t.height = rectB.y - rectA.y;
17858 if (t.width > 0 && t.height > 0) {
17859 b =  new java.awt.Rectangle (t);
17860 rectCount++;
17861 }t.x = rectB.x;
17862 t.y = rectB.y + rectB.height;
17863 t.width = rectB.width;
17864 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17865 if (t.width > 0 && t.height > 0) {
17866 c =  new java.awt.Rectangle (t);
17867 rectCount++;
17868 }t.x = rectB.x + rectB.width;
17869 t.y = rectA.y;
17870 t.width = rectA.x + rectA.width - (rectB.x + rectB.width);
17871 t.height = rectA.height;
17872 if (t.width > 0 && t.height > 0) {
17873 d =  new java.awt.Rectangle (t);
17874 rectCount++;
17875 }} else {
17876 if (rectB.x <= rectA.x && rectB.y <= rectA.y) {
17877 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17878 t.x = rectA.x;
17879 t.y = rectB.y + rectB.height;
17880 t.width = rectA.width;
17881 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17882 if (t.width > 0 && t.height > 0) {
17883 a = t;
17884 rectCount++;
17885 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
17886 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
17887 if (t.width > 0 && t.height > 0) {
17888 a = t;
17889 rectCount++;
17890 }} else {
17891 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectB.y + rectB.height) - rectA.y);
17892 if (t.width > 0 && t.height > 0) {
17893 a =  new java.awt.Rectangle (t);
17894 rectCount++;
17895 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17896 if (t.width > 0 && t.height > 0) {
17897 b =  new java.awt.Rectangle (t);
17898 rectCount++;
17899 }}} else if (rectB.x <= rectA.x && (rectB.y + rectB.height) >= (rectA.y + rectA.height)) {
17900 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17901 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17902 if (t.width > 0 && t.height > 0) {
17903 a = t;
17904 rectCount++;
17905 }} else {
17906 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17907 if (t.width > 0 && t.height > 0) {
17908 a =  new java.awt.Rectangle (t);
17909 rectCount++;
17910 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectA.y + rectA.height) - rectB.y);
17911 if (t.width > 0 && t.height > 0) {
17912 b =  new java.awt.Rectangle (t);
17913 rectCount++;
17914 }}} else if (rectB.x <= rectA.x) {
17915 if ((rectB.x + rectB.width) >= (rectA.x + rectA.width)) {
17916 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17917 if (t.width > 0 && t.height > 0) {
17918 a =  new java.awt.Rectangle (t);
17919 rectCount++;
17920 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17921 if (t.width > 0 && t.height > 0) {
17922 b =  new java.awt.Rectangle (t);
17923 rectCount++;
17924 }} else {
17925 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17926 if (t.width > 0 && t.height > 0) {
17927 a =  new java.awt.Rectangle (t);
17928 rectCount++;
17929 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectB.height);
17930 if (t.width > 0 && t.height > 0) {
17931 b =  new java.awt.Rectangle (t);
17932 rectCount++;
17933 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17934 if (t.width > 0 && t.height > 0) {
17935 c =  new java.awt.Rectangle (t);
17936 rectCount++;
17937 }}} else if (rectB.x <= (rectA.x + rectA.width) && (rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17938 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
17939 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
17940 if (t.width > 0 && t.height > 0) {
17941 a = t;
17942 rectCount++;
17943 }} else if (rectB.y <= rectA.y) {
17944 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, (rectB.y + rectB.height) - rectA.y);
17945 if (t.width > 0 && t.height > 0) {
17946 a =  new java.awt.Rectangle (t);
17947 rectCount++;
17948 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17949 if (t.width > 0 && t.height > 0) {
17950 b =  new java.awt.Rectangle (t);
17951 rectCount++;
17952 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
17953 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17954 if (t.width > 0 && t.height > 0) {
17955 a =  new java.awt.Rectangle (t);
17956 rectCount++;
17957 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, (rectA.y + rectA.height) - rectB.y);
17958 if (t.width > 0 && t.height > 0) {
17959 b =  new java.awt.Rectangle (t);
17960 rectCount++;
17961 }} else {
17962 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17963 if (t.width > 0 && t.height > 0) {
17964 a =  new java.awt.Rectangle (t);
17965 rectCount++;
17966 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, rectB.height);
17967 if (t.width > 0 && t.height > 0) {
17968 b =  new java.awt.Rectangle (t);
17969 rectCount++;
17970 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17971 if (t.width > 0 && t.height > 0) {
17972 c =  new java.awt.Rectangle (t);
17973 rectCount++;
17974 }}} else if (rectB.x >= rectA.x && (rectB.x + rectB.width) <= (rectA.x + rectA.width)) {
17975 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
17976 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
17977 if (t.width > 0 && t.height > 0) {
17978 a =  new java.awt.Rectangle (t);
17979 rectCount++;
17980 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
17981 if (t.width > 0 && t.height > 0) {
17982 b =  new java.awt.Rectangle (t);
17983 rectCount++;
17984 }} else if (rectB.y <= rectA.y) {
17985 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
17986 if (t.width > 0 && t.height > 0) {
17987 a =  new java.awt.Rectangle (t);
17988 rectCount++;
17989 }t.reshape (rectB.x, (rectB.y + rectB.height), rectB.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17990 if (t.width > 0 && t.height > 0) {
17991 b =  new java.awt.Rectangle (t);
17992 rectCount++;
17993 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
17994 if (t.width > 0 && t.height > 0) {
17995 c =  new java.awt.Rectangle (t);
17996 rectCount++;
17997 }} else {
17998 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
17999 if (t.width > 0 && t.height > 0) {
18000 a =  new java.awt.Rectangle (t);
18001 rectCount++;
18002 }t.reshape (rectB.x, rectA.y, rectB.width, rectB.y - rectA.y);
18003 if (t.width > 0 && t.height > 0) {
18004 b =  new java.awt.Rectangle (t);
18005 rectCount++;
18006 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18007 if (t.width > 0 && t.height > 0) {
18008 c =  new java.awt.Rectangle (t);
18009 rectCount++;
18010 }}}}result =  new Array (rectCount);
18011 rectCount = 0;
18012 if (a != null) result[rectCount++] = a;
18013 if (b != null) result[rectCount++] = b;
18014 if (c != null) result[rectCount++] = c;
18015 if (d != null) result[rectCount++] = d;
18016 return result;
18017 }, "java.awt.Rectangle,java.awt.Rectangle");
18018 c$.isLeftMouseButton = Clazz_defineMethod (c$, "isLeftMouseButton", 
18019 function (anEvent) {
18020 return ((anEvent.getModifiers () & 16) != 0);
18021 }, "java.awt.event.MouseEvent");
18022 c$.isMiddleMouseButton = Clazz_defineMethod (c$, "isMiddleMouseButton", 
18023 function (anEvent) {
18024 return ((anEvent.getModifiers () & 8) == 8);
18025 }, "java.awt.event.MouseEvent");
18026 c$.isRightMouseButton = Clazz_defineMethod (c$, "isRightMouseButton", 
18027 function (anEvent) {
18028 return ((anEvent.getModifiers () & 4) == 4);
18029 }, "java.awt.event.MouseEvent");
18030 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18031 function (g, c, p, x, y, w, h) {
18032 javax.swing.SwingUtilities.getCellRendererPane (c, p).paintComponent (g, c, p, x, y, w, h, false);
18033 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
18034 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18035 function (g, c, p, r) {
18036 javax.swing.SwingUtilities.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
18037 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
18038 c$.getCellRendererPane = Clazz_defineMethod (c$, "getCellRendererPane", 
18039  function (c, p) {
18040 var shell = c.getParent ();
18041 if (Clazz_instanceOf (shell, javax.swing.CellRendererPane)) {
18042 if (shell.getParent () !== p) {
18043 p.add (shell);
18044 }} else {
18045 shell = swingjs.api.Interface.getInstance ("javax.swing.CellRendererPane", false);
18046 shell.add (c);
18047 p.add (shell);
18048 }return shell;
18049 }, "java.awt.Component,java.awt.Container");
18050 c$.updateComponentTreeUI = Clazz_defineMethod (c$, "updateComponentTreeUI", 
18051 function (c) {
18052 javax.swing.SwingUtilities.updateComponentTreeUI0 (c);
18053 c.invalidate ();
18054 c.validate ();
18055 c.repaint ();
18056 }, "java.awt.Component");
18057 c$.updateComponentTreeUI0 = Clazz_defineMethod (c$, "updateComponentTreeUI0", 
18058  function (c) {
18059 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
18060 var jc = c;
18061 jc.updateUI ();
18062 var jpm = jc.getComponentPopupMenu ();
18063 if (jpm != null) {
18064 javax.swing.SwingUtilities.updateComponentTreeUI (jpm);
18065 }}var children = null;
18066 if (Clazz_instanceOf (c, javax.swing.JMenu)) {
18067 children = (c).getMenuComponents ();
18068 } else if (Clazz_instanceOf (c, java.awt.Container)) {
18069 children = (c).getComponents ();
18070 }if (children != null) {
18071 for (var i = 0; i < children.length; i++) {
18072 javax.swing.SwingUtilities.updateComponentTreeUI0 (children[i]);
18073 }
18074 }}, "java.awt.Component");
18075 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
18076 function (doRun) {
18077 java.awt.EventQueue.invokeLater (doRun);
18078 }, "Runnable");
18079 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
18080 function (doRun) {
18081 java.awt.EventQueue.invokeAndWait (doRun);
18082 }, "Runnable");
18083 c$.isEventDispatchThread = Clazz_defineMethod (c$, "isEventDispatchThread", 
18084 function () {
18085 return java.awt.EventQueue.isDispatchThread ();
18086 });
18087 c$.getRootPane = Clazz_defineMethod (c$, "getRootPane", 
18088 function (c) {
18089 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
18090 return (c).getRootPane ();
18091 }for (; c != null; c = c.getParent ()) {
18092 if (Clazz_instanceOf (c, javax.swing.JRootPane)) {
18093 return c;
18094 }}
18095 return null;
18096 }, "java.awt.Component");
18097 c$.getRoot = Clazz_defineMethod (c$, "getRoot", 
18098 function (c) {
18099 var applet = null;
18100 for (var p = c; p != null; p = p.getParent ()) {
18101 if (Clazz_instanceOf (p, java.awt.Window)) {
18102 return p;
18103 }if (Clazz_instanceOf (p, java.applet.Applet)) {
18104 applet = p;
18105 }}
18106 return applet;
18107 }, "java.awt.Component");
18108 c$.processKeyBindings = Clazz_defineMethod (c$, "processKeyBindings", 
18109 function (event) {
18110 if (event != null) {
18111 if (event.isConsumed ()) {
18112 return false;
18113 }var component = event.getComponent ();
18114 var pressed = (event.getID () == 401);
18115 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (event)) {
18116 return false;
18117 }while (component != null) {
18118 if (Clazz_instanceOf (component, javax.swing.JComponent)) {
18119 return (component).processKeyBindings (event, pressed);
18120 }if ((Clazz_instanceOf (component, java.applet.Applet)) || (Clazz_instanceOf (component, java.awt.Window))) {
18121 return javax.swing.JComponent.processKeyBindingsForAllComponents (event, component, pressed);
18122 }component = component.getParent ();
18123 }
18124 }return false;
18125 }, "java.awt.event.KeyEvent");
18126 c$.isValidKeyEventForKeyBindings = Clazz_defineMethod (c$, "isValidKeyEventForKeyBindings", 
18127 function (e) {
18128 if (e.getID () == 400) {
18129 var mod = e.getModifiers ();
18130 if (((mod & 8) != 0) && ((mod & 2) == 0)) {
18131 return false;
18132 }}return true;
18133 }, "java.awt.event.KeyEvent");
18134 c$.notifyAction = Clazz_defineMethod (c$, "notifyAction", 
18135 function (action, ks, event, sender, modifiers) {
18136 if (action == null) {
18137 return false;
18138 }if (Clazz_instanceOf (action, jssun.swing.UIAction)) {
18139 if (!(action).isEnabled (sender)) {
18140 return false;
18141 }} else if (!action.isEnabled ()) {
18142 return false;
18143 }var commandO;
18144 var stayNull;
18145 commandO = action.getValue ("ActionCommandKey");
18146 if (commandO == null && (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin))) {
18147 stayNull = true;
18148 } else {
18149 stayNull = false;
18150 }var command;
18151 if (commandO != null) {
18152 command = commandO.toString ();
18153 } else if (!stayNull && event.getKeyChar () != '\uffff') {
18154 command = String.valueOf (event.getKeyChar ());
18155 } else {
18156 command = null;
18157 }action.actionPerformed ( new java.awt.event.ActionEvent (sender, 1001, command, event.getWhen (), modifiers));
18158 return true;
18159 }, "javax.swing.Action,javax.swing.KeyStroke,java.awt.event.KeyEvent,~O,~N");
18160 c$.replaceUIInputMap = Clazz_defineMethod (c$, "replaceUIInputMap", 
18161 function (component, type, uiInputMap) {
18162 var map = component.getInputMap (type, (uiInputMap != null));
18163 while (map != null) {
18164 var parent = map.getParent ();
18165 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18166 map.setParent (uiInputMap);
18167 return;
18168 }map = parent;
18169 }
18170 }, "javax.swing.JComponent,~N,javax.swing.InputMap");
18171 c$.replaceUIActionMap = Clazz_defineMethod (c$, "replaceUIActionMap", 
18172 function (component, uiActionMap) {
18173 var map = component.getActionMap ((uiActionMap != null));
18174 ;while (map != null) {
18175 var parent = map.getParent ();
18176 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18177 map.setParent (uiActionMap);
18178 return;
18179 }map = parent;
18180 }
18181 }, "javax.swing.JComponent,javax.swing.ActionMap");
18182 c$.getUIInputMap = Clazz_defineMethod (c$, "getUIInputMap", 
18183 function (component, condition) {
18184 var map = component.getInputMap (condition, false);
18185 while (map != null) {
18186 var parent = map.getParent ();
18187 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18188 return parent;
18189 }map = parent;
18190 }
18191 return null;
18192 }, "javax.swing.JComponent,~N");
18193 c$.getUIActionMap = Clazz_defineMethod (c$, "getUIActionMap", 
18194 function (component) {
18195 var map = component.getActionMap (false);
18196 while (map != null) {
18197 var parent = map.getParent ();
18198 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18199 return parent;
18200 }map = parent;
18201 }
18202 return null;
18203 }, "javax.swing.JComponent");
18204 c$.getSharedOwnerFrame = Clazz_defineMethod (c$, "getSharedOwnerFrame", 
18205 function () {
18206 var sharedOwnerFrame = javax.swing.SwingUtilities.appContextGet (javax.swing.SwingUtilities.sharedOwnerFrameKey);
18207 if (sharedOwnerFrame == null) {
18208 sharedOwnerFrame =  new javax.swing.SwingUtilities.SharedOwnerFrame ();
18209 javax.swing.SwingUtilities.appContextPut (javax.swing.SwingUtilities.sharedOwnerFrameKey, sharedOwnerFrame);
18210 }return sharedOwnerFrame;
18211 });
18212 c$.getSharedOwnerFrameShutdownListener = Clazz_defineMethod (c$, "getSharedOwnerFrameShutdownListener", 
18213 function () {
18214 var sharedOwnerFrame = javax.swing.SwingUtilities.getSharedOwnerFrame ();
18215 return sharedOwnerFrame;
18216 });
18217 c$.appContextGet = Clazz_defineMethod (c$, "appContextGet", 
18218 function (key) {
18219 return jssun.awt.AppContext.getAppContext ().get (key);
18220 }, "~O");
18221 c$.appContextPut = Clazz_defineMethod (c$, "appContextPut", 
18222 function (key, value) {
18223 jssun.awt.AppContext.getAppContext ().put (key, value);
18224 }, "~O,~O");
18225 c$.appContextRemove = Clazz_defineMethod (c$, "appContextRemove", 
18226 function (key) {
18227 jssun.awt.AppContext.getAppContext ().remove (key);
18228 }, "~O");
18229 c$.loadSystemClass = Clazz_defineMethod (c$, "loadSystemClass", 
18230 function (className) {
18231 return Clazz._4Name (className, true, Thread.currentThread ().getContextClassLoader ());
18232 }, "~S");
18233 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
18234 function (c) {
18235 return c.getComponentOrientation ().isLeftToRight ();
18236 }, "java.awt.Component");
18237 c$.doesIconReferenceImage = Clazz_defineMethod (c$, "doesIconReferenceImage", 
18238 function (icon, image) {
18239 var iconImage = (icon != null && (Clazz_instanceOf (icon, javax.swing.ImageIcon))) ? (icon).getImage () : null;
18240 return (iconImage === image);
18241 }, "javax.swing.Icon,java.awt.Image");
18242 c$.findDisplayedMnemonicIndex = Clazz_defineMethod (c$, "findDisplayedMnemonicIndex", 
18243 function (text, mnemonic) {
18244 if (text == null || mnemonic == 0) {
18245 return -1;
18246 }var uc = Character.toUpperCase (String.fromCharCode (mnemonic));
18247 var lc = Character.toLowerCase (String.fromCharCode (mnemonic));
18248 var uci = text.indexOf (uc);
18249 var lci = text.indexOf (lc);
18250 if (uci == -1) {
18251 return lci;
18252 } else if (lci == -1) {
18253 return uci;
18254 } else {
18255 return (lci < uci) ? lci : uci;
18256 }}, "~S,~N");
18257 c$.calculateInnerArea = Clazz_defineMethod (c$, "calculateInnerArea", 
18258 function (c, r) {
18259 if (c == null) {
18260 return null;
18261 }var rect = r;
18262 var insets = c.getInsets ();
18263 if (rect == null) {
18264 rect =  new java.awt.Rectangle ();
18265 }rect.x = insets.left;
18266 rect.y = insets.top;
18267 rect.width = c.getWidth () - insets.left - insets.right;
18268 rect.height = c.getHeight () - insets.top - insets.bottom;
18269 return rect;
18270 }, "javax.swing.JComponent,java.awt.Rectangle");
18271 c$.updateRendererOrEditorUI = Clazz_defineMethod (c$, "updateRendererOrEditorUI", 
18272 function (rendererOrEditor) {
18273 if (rendererOrEditor == null) {
18274 return;
18275 }var component = null;
18276 if (Clazz_instanceOf (rendererOrEditor, java.awt.Component)) {
18277 component = rendererOrEditor;
18278 }if (Clazz_instanceOf (rendererOrEditor, javax.swing.DefaultCellEditor)) {
18279 component = (rendererOrEditor).getComponent ();
18280 }if (component != null) {
18281 javax.swing.SwingUtilities.updateComponentTreeUI (component);
18282 }}, "~O");
18283 Clazz_pu$h(self.c$);
18284 c$ = Clazz_declareType (javax.swing.SwingUtilities, "SharedOwnerFrame", java.awt.Frame, java.awt.event.WindowListener);
18285 Clazz_defineMethod (c$, "addNotify", 
18286 function () {
18287 Clazz_superCall (this, javax.swing.SwingUtilities.SharedOwnerFrame, "addNotify", []);
18288 this.installListeners ();
18289 });
18290 Clazz_defineMethod (c$, "installListeners", 
18291 function () {
18292 var a = this.getOwnedWindows ();
18293 for (var b = 0; b < a.length; b++) {
18294 var c = a[b];
18295 if (c != null) {
18296 c.removeWindowListener (this);
18297 c.addWindowListener (this);
18298 }}
18299 });
18300 Clazz_overrideMethod (c$, "windowClosed", 
18301 function (a) {
18302 var b = this.getOwnedWindows ();
18303 for (var c = 0; c < b.length; c++) {
18304 var d = b[c];
18305 if (d != null) {
18306 if (d.isDisplayable ()) {
18307 return;
18308 }d.removeWindowListener (this);
18309 }this.dispose ();
18310 }
18311 }, "java.awt.event.WindowEvent");
18312 Clazz_overrideMethod (c$, "windowOpened", 
18313 function (a) {
18314 }, "java.awt.event.WindowEvent");
18315 Clazz_overrideMethod (c$, "windowClosing", 
18316 function (a) {
18317 }, "java.awt.event.WindowEvent");
18318 Clazz_overrideMethod (c$, "windowIconified", 
18319 function (a) {
18320 }, "java.awt.event.WindowEvent");
18321 Clazz_overrideMethod (c$, "windowDeiconified", 
18322 function (a) {
18323 }, "java.awt.event.WindowEvent");
18324 Clazz_overrideMethod (c$, "windowActivated", 
18325 function (a) {
18326 }, "java.awt.event.WindowEvent");
18327 Clazz_overrideMethod (c$, "windowDeactivated", 
18328 function (a) {
18329 }, "java.awt.event.WindowEvent");
18330 Clazz_defineMethod (c$, "show", 
18331 function () {
18332 });
18333 Clazz_overrideMethod (c$, "dispose", 
18334 function () {
18335 });
18336 c$ = Clazz_p0p ();
18337 c$.sharedOwnerFrameKey = c$.prototype.sharedOwnerFrameKey =  new Clazz._O ();
18338 });
18339 Clazz_declarePackage ("java.awt");
18340 Clazz_load (["java.awt.Window"], "java.awt.Frame", ["java.lang.IllegalArgumentException", "java.awt.Cursor", "$.IllegalComponentStateException"], function () {
18341 c$ = Clazz_decorateAsClass (function () {
18342 this.maximizedBounds = null;
18343 this.title = "Untitled";
18344 this.resizable = true;
18345 this.undecorated = false;
18346 this.mbManagement = false;
18347 this.$state = 0;
18348 this.ownedWindows = null;
18349 Clazz_instantialize (this, arguments);
18350 }, java.awt, "Frame", java.awt.Window);
18351 Clazz_makeConstructor (c$, 
18352 function () {
18353 this.construct ("");
18354 });
18355 Clazz_makeConstructor (c$, 
18356 function (gc) {
18357 this.construct ("", gc);
18358 }, "java.awt.GraphicsConfiguration");
18359 Clazz_makeConstructor (c$, 
18360 function (title) {
18361 Clazz_superConstructor (this, java.awt.Frame, []);
18362 this.init (title, null);
18363 }, "~S");
18364 Clazz_makeConstructor (c$, 
18365 function (title, gc) {
18366 Clazz_superConstructor (this, java.awt.Frame, [gc]);
18367 this.init (title, gc);
18368 }, "~S,java.awt.GraphicsConfiguration");
18369 Clazz_defineMethod (c$, "init", 
18370  function (title, gc) {
18371 var $private = Clazz_checkPrivateMethod (arguments);
18372 if ($private != null) {
18373 return $private.apply (this, arguments);
18374 }
18375 this.title = title;
18376 }, "~S,java.awt.GraphicsConfiguration");
18377 Clazz_overrideMethod (c$, "constructComponentName", 
18378 function () {
18379 {
18380 return "frame" + java.awt.Frame.$nameCounter++;
18381 }});
18382 Clazz_overrideMethod (c$, "addNotify", 
18383 function () {
18384 });
18385 Clazz_defineMethod (c$, "getTitle", 
18386 function () {
18387 return this.title;
18388 });
18389 Clazz_defineMethod (c$, "setTitle", 
18390 function (title) {
18391 var oldTitle = this.title;
18392 if (title == null) {
18393 title = "";
18394 }{
18395 this.title = title;
18396 }this.firePropertyChangeObject ("title", oldTitle, title);
18397 }, "~S");
18398 Clazz_defineMethod (c$, "getIconImage", 
18399 function () {
18400 var icons = this.icons;
18401 if (icons != null) {
18402 if (icons.size () > 0) {
18403 return icons.get (0);
18404 }}return null;
18405 });
18406 Clazz_defineMethod (c$, "isResizable", 
18407 function () {
18408 return this.resizable;
18409 });
18410 Clazz_defineMethod (c$, "setResizable", 
18411 function (resizable) {
18412 var oldResizable = this.resizable;
18413 {
18414 this.resizable = resizable;
18415 }this.firePropertyChangeBool ("resizable", oldResizable, resizable);
18416 }, "~B");
18417 Clazz_defineMethod (c$, "setState", 
18418 function (state) {
18419 var current = this.getExtendedState ();
18420 if (state == 1 && (current & 1) == 0) {
18421 this.setExtendedState (current | 1);
18422 } else if (state == 0 && (current & 1) != 0) {
18423 this.setExtendedState (current & -2);
18424 }}, "~N");
18425 Clazz_defineMethod (c$, "setExtendedState", 
18426 function (state) {
18427 if (!this.isFrameStateSupported (state)) {
18428 return;
18429 }this.$state = state;
18430 }, "~N");
18431 Clazz_defineMethod (c$, "isFrameStateSupported", 
18432  function (state) {
18433 if (!this.getToolkit ().isFrameStateSupported (state)) {
18434 if (((state & 1) != 0) && !this.getToolkit ().isFrameStateSupported (1)) {
18435 return false;
18436 } else {
18437 state &= -2;
18438 }return this.getToolkit ().isFrameStateSupported (state);
18439 }return true;
18440 }, "~N");
18441 Clazz_defineMethod (c$, "getState", 
18442 function () {
18443 return (this.getExtendedState () & 1) != 0 ? 1 : 0;
18444 });
18445 Clazz_defineMethod (c$, "getExtendedState", 
18446 function () {
18447 return this.$state;
18448 });
18449 Clazz_defineMethod (c$, "setMaximizedBounds", 
18450 function (bounds) {
18451 this.maximizedBounds = bounds;
18452 }, "java.awt.Rectangle");
18453 Clazz_defineMethod (c$, "getMaximizedBounds", 
18454 function () {
18455 return this.maximizedBounds;
18456 });
18457 Clazz_defineMethod (c$, "setUndecorated", 
18458 function (undecorated) {
18459 {
18460 if (this.isDisplayable ()) {
18461 throw  new java.awt.IllegalComponentStateException ("The frame is displayable.");
18462 }this.undecorated = undecorated;
18463 }}, "~B");
18464 Clazz_defineMethod (c$, "isUndecorated", 
18465 function () {
18466 return this.undecorated;
18467 });
18468 Clazz_overrideMethod (c$, "removeNotify", 
18469 function () {
18470 });
18471 Clazz_defineMethod (c$, "paramString", 
18472 function () {
18473 var str = Clazz_superCall (this, java.awt.Frame, "paramString", []);
18474 if (this.title != null) {
18475 str += ",title=" + this.title;
18476 }if (this.resizable) {
18477 str += ",resizable";
18478 }this.getExtendedState ();
18479 if (this.$state == 0) {
18480 str += ",normal";
18481 } else {
18482 if ((this.$state & 1) != 0) {
18483 str += ",iconified";
18484 }if ((this.$state & 6) == 6) {
18485 str += ",maximized";
18486 } else if ((this.$state & 2) != 0) {
18487 str += ",maximized_horiz";
18488 } else if ((this.$state & 4) != 0) {
18489 str += ",maximized_vert";
18490 }}return str;
18491 });
18492 Clazz_defineMethod (c$, "setCursor", 
18493 function (cursorType) {
18494 if (cursorType < 0 || cursorType > 13) {
18495 throw  new IllegalArgumentException ("illegal cursor type");
18496 }this.setCursor (java.awt.Cursor.getPredefinedCursor (cursorType));
18497 }, "~N");
18498 Clazz_defineMethod (c$, "getCursorType", 
18499 function () {
18500 return (this.getCursor ().getType ());
18501 });
18502 c$.getFrames = Clazz_defineMethod (c$, "getFrames", 
18503 function () {
18504 var allWindows = java.awt.Window.getWindows ();
18505 var frameCount = 0;
18506 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18507 if (Clazz_instanceOf (w, java.awt.Frame)) {
18508 frameCount++;
18509 }}
18510 var frames =  new Array (frameCount);
18511 var c = 0;
18512 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18513 if (Clazz_instanceOf (w, java.awt.Frame)) {
18514 frames[c++] = w;
18515 }}
18516 return frames;
18517 });
18518 Clazz_defineStatics (c$,
18519 "DEFAULT_CURSOR", 0,
18520 "CROSSHAIR_CURSOR", 1,
18521 "TEXT_CURSOR", 2,
18522 "WAIT_CURSOR", 3,
18523 "SW_RESIZE_CURSOR", 4,
18524 "SE_RESIZE_CURSOR", 5,
18525 "NW_RESIZE_CURSOR", 6,
18526 "NE_RESIZE_CURSOR", 7,
18527 "N_RESIZE_CURSOR", 8,
18528 "S_RESIZE_CURSOR", 9,
18529 "W_RESIZE_CURSOR", 10,
18530 "E_RESIZE_CURSOR", 11,
18531 "HAND_CURSOR", 12,
18532 "MOVE_CURSOR", 13,
18533 "NORMAL", 0,
18534 "ICONIFIED", 1,
18535 "MAXIMIZED_HORIZ", 2,
18536 "MAXIMIZED_VERT", 4,
18537 "MAXIMIZED_BOTH", 6,
18538 "$base", "frame",
18539 "$nameCounter", 0);
18540 });
18541 Clazz_declarePackage ("java.awt");
18542 Clazz_load (["java.lang.IllegalStateException"], "java.awt.IllegalComponentStateException", null, function () {
18543 c$ = Clazz_declareType (java.awt, "IllegalComponentStateException", IllegalStateException);
18544 });
18545 Clazz_declarePackage ("javax.swing");
18546 c$ = Clazz_declareInterface (javax.swing, "SwingConstants");
18547 Clazz_defineStatics (c$,
18548 "CENTER", 0,
18549 "TOP", 1,
18550 "LEFT", 2,
18551 "BOTTOM", 3,
18552 "RIGHT", 4,
18553 "NORTH", 1,
18554 "NORTH_EAST", 2,
18555 "EAST", 3,
18556 "SOUTH_EAST", 4,
18557 "SOUTH", 5,
18558 "SOUTH_WEST", 6,
18559 "WEST", 7,
18560 "NORTH_WEST", 8,
18561 "HORIZONTAL", 0,
18562 "VERTICAL", 1,
18563 "LEADING", 10,
18564 "TRAILING", 11,
18565 "NEXT", 12,
18566 "PREVIOUS", 13);
18567 Clazz_declarePackage ("java.awt");
18568 Clazz_load (["java.awt.Shape", "java.awt.geom.Rectangle2D"], "java.awt.Rectangle", ["java.awt.Dimension", "$.Point"], function () {
18569 c$ = Clazz_decorateAsClass (function () {
18570 this.x = 0;
18571 this.y = 0;
18572 this.width = 0;
18573 this.height = 0;
18574 Clazz_instantialize (this, arguments);
18575 }, java.awt, "Rectangle", java.awt.geom.Rectangle2D, java.awt.Shape);
18576 Clazz_makeConstructor (c$, 
18577 function () {
18578 this.construct (0, 0, 0, 0);
18579 });
18580 Clazz_makeConstructor (c$, 
18581 function (r) {
18582 this.construct (r.x, r.y, r.width, r.height);
18583 }, "java.awt.Rectangle");
18584 Clazz_makeConstructor (c$, 
18585 function (x, y, width, height) {
18586 Clazz_superConstructor (this, java.awt.Rectangle, []);
18587 this.x = x;
18588 this.y = y;
18589 this.width = width;
18590 this.height = height;
18591 }, "~N,~N,~N,~N");
18592 Clazz_makeConstructor (c$, 
18593 function (width, height) {
18594 this.construct (0, 0, width, height);
18595 }, "~N,~N");
18596 Clazz_makeConstructor (c$, 
18597 function (p, d) {
18598 this.construct (p.x, p.y, d.width, d.height);
18599 }, "java.awt.Point,java.awt.Dimension");
18600 Clazz_makeConstructor (c$, 
18601 function (p) {
18602 this.construct (p.x, p.y, 0, 0);
18603 }, "java.awt.Point");
18604 Clazz_makeConstructor (c$, 
18605 function (d) {
18606 this.construct (0, 0, d.width, d.height);
18607 }, "java.awt.Dimension");
18608 Clazz_overrideMethod (c$, "getX", 
18609 function () {
18610 return this.x;
18611 });
18612 Clazz_overrideMethod (c$, "getY", 
18613 function () {
18614 return this.y;
18615 });
18616 Clazz_overrideMethod (c$, "getWidth", 
18617 function () {
18618 return this.width;
18619 });
18620 Clazz_overrideMethod (c$, "getHeight", 
18621 function () {
18622 return this.height;
18623 });
18624 Clazz_overrideMethod (c$, "getBounds", 
18625 function () {
18626 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18627 });
18628 Clazz_overrideMethod (c$, "getBounds2D", 
18629 function () {
18630 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18631 });
18632 Clazz_defineMethod (c$, "setBounds", 
18633 function (r) {
18634 this.reshape (r.x, r.y, r.width, r.height);
18635 }, "java.awt.Rectangle");
18636 Clazz_defineMethod (c$, "setBounds", 
18637 function (x, y, width, height) {
18638 this.reshape (x, y, width, height);
18639 }, "~N,~N,~N,~N");
18640 Clazz_defineMethod (c$, "setRect", 
18641 function (x, y, width, height) {
18642 var newx;
18643 var newy;
18644 var neww;
18645 var newh;
18646 if (x > 4.294967294E9) {
18647 newx = 2147483647;
18648 neww = -1;
18649 } else {
18650 newx = java.awt.Rectangle.clip (x, false);
18651 if (width >= 0) width += x - newx;
18652 neww = java.awt.Rectangle.clip (width, width >= 0);
18653 }if (y > 4.294967294E9) {
18654 newy = 2147483647;
18655 newh = -1;
18656 } else {
18657 newy = java.awt.Rectangle.clip (y, false);
18658 if (height >= 0) height += y - newy;
18659 newh = java.awt.Rectangle.clip (height, height >= 0);
18660 }this.reshape (newx, newy, neww, newh);
18661 }, "~N,~N,~N,~N");
18662 c$.clip = Clazz_defineMethod (c$, "clip", 
18663  function (v, doceil) {
18664 if (v <= -2147483648) {
18665 return -2147483648;
18666 }if (v >= 2147483647) {
18667 return 2147483647;
18668 }return Clazz_doubleToInt (doceil ? Math.ceil (v) : Math.floor (v));
18669 }, "~N,~B");
18670 Clazz_defineMethod (c$, "reshape", 
18671 function (x, y, width, height) {
18672 this.x = x;
18673 this.y = y;
18674 this.width = width;
18675 this.height = height;
18676 }, "~N,~N,~N,~N");
18677 Clazz_defineMethod (c$, "getLocation", 
18678 function () {
18679 return  new java.awt.Point (this.x, this.y);
18680 });
18681 Clazz_defineMethod (c$, "setLocation", 
18682 function (p) {
18683 this.setLocation (p.x, p.y);
18684 }, "java.awt.Point");
18685 Clazz_defineMethod (c$, "setLocation", 
18686 function (x, y) {
18687 this.move (x, y);
18688 }, "~N,~N");
18689 Clazz_defineMethod (c$, "move", 
18690 function (x, y) {
18691 this.x = x;
18692 this.y = y;
18693 }, "~N,~N");
18694 Clazz_defineMethod (c$, "translate", 
18695 function (dx, dy) {
18696 var oldv = this.x;
18697 var newv = oldv + dx;
18698 if (dx < 0) {
18699 if (newv > oldv) {
18700 if (this.width >= 0) {
18701 this.width += newv - -2147483648;
18702 }newv = -2147483648;
18703 }} else {
18704 if (newv < oldv) {
18705 if (this.width >= 0) {
18706 this.width += newv - 2147483647;
18707 if (this.width < 0) this.width = 2147483647;
18708 }newv = 2147483647;
18709 }}this.x = newv;
18710 oldv = this.y;
18711 newv = oldv + dy;
18712 if (dy < 0) {
18713 if (newv > oldv) {
18714 if (this.height >= 0) {
18715 this.height += newv - -2147483648;
18716 }newv = -2147483648;
18717 }} else {
18718 if (newv < oldv) {
18719 if (this.height >= 0) {
18720 this.height += newv - 2147483647;
18721 if (this.height < 0) this.height = 2147483647;
18722 }newv = 2147483647;
18723 }}this.y = newv;
18724 }, "~N,~N");
18725 Clazz_defineMethod (c$, "getSize", 
18726 function () {
18727 return  new java.awt.Dimension (this.width, this.height);
18728 });
18729 Clazz_defineMethod (c$, "setSize", 
18730 function (d) {
18731 this.setSize (d.width, d.height);
18732 }, "java.awt.Dimension");
18733 Clazz_defineMethod (c$, "setSize", 
18734 function (width, height) {
18735 this.resize (width, height);
18736 }, "~N,~N");
18737 Clazz_defineMethod (c$, "resize", 
18738 function (width, height) {
18739 this.width = width;
18740 this.height = height;
18741 }, "~N,~N");
18742 Clazz_defineMethod (c$, "contains", 
18743 function (p) {
18744 return this.contains (p.x, p.y);
18745 }, "java.awt.Point");
18746 Clazz_defineMethod (c$, "contains", 
18747 function (x, y) {
18748 return this.inside (x, y);
18749 }, "~N,~N");
18750 Clazz_defineMethod (c$, "contains", 
18751 function (r) {
18752 return this.contains (r.x, r.y, r.width, r.height);
18753 }, "java.awt.Rectangle");
18754 Clazz_defineMethod (c$, "contains", 
18755 function (X, Y, W, H) {
18756 var w = this.width;
18757 var h = this.height;
18758 if ((w | h | W | H) < 0) {
18759 return false;
18760 }var x = this.x;
18761 var y = this.y;
18762 if (X < x || Y < y) {
18763 return false;
18764 }w += x;
18765 W += X;
18766 if (W <= X) {
18767 if (w >= x || W > w) return false;
18768 } else {
18769 if (w >= x && W > w) return false;
18770 }h += y;
18771 H += Y;
18772 if (H <= Y) {
18773 if (h >= y || H > h) return false;
18774 } else {
18775 if (h >= y && H > h) return false;
18776 }return true;
18777 }, "~N,~N,~N,~N");
18778 Clazz_defineMethod (c$, "inside", 
18779 function (X, Y) {
18780 var w = this.width;
18781 var h = this.height;
18782 if ((w | h) < 0) {
18783 return false;
18784 }var x = this.x;
18785 var y = this.y;
18786 if (X < x || Y < y) {
18787 return false;
18788 }w += x;
18789 h += y;
18790 return ((w < x || w > X) && (h < y || h > Y));
18791 }, "~N,~N");
18792 Clazz_defineMethod (c$, "intersects", 
18793 function (r) {
18794 var tw = this.width;
18795 var th = this.height;
18796 var rw = r.width;
18797 var rh = r.height;
18798 if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) {
18799 return false;
18800 }var tx = this.x;
18801 var ty = this.y;
18802 var rx = r.x;
18803 var ry = r.y;
18804 rw += rx;
18805 rh += ry;
18806 tw += tx;
18807 th += ty;
18808 return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry));
18809 }, "java.awt.Rectangle");
18810 Clazz_defineMethod (c$, "intersection", 
18811 function (r) {
18812 var tx1 = this.x;
18813 var ty1 = this.y;
18814 var rx1 = r.x;
18815 var ry1 = r.y;
18816 var tx2 = tx1;
18817 tx2 += this.width;
18818 var ty2 = ty1;
18819 ty2 += this.height;
18820 var rx2 = rx1;
18821 rx2 += r.width;
18822 var ry2 = ry1;
18823 ry2 += r.height;
18824 if (tx1 < rx1) tx1 = rx1;
18825 if (ty1 < ry1) ty1 = ry1;
18826 if (tx2 > rx2) tx2 = rx2;
18827 if (ty2 > ry2) ty2 = ry2;
18828 tx2 -= tx1;
18829 ty2 -= ty1;
18830 if (tx2 < -2147483648) tx2 = -2147483648;
18831 if (ty2 < -2147483648) ty2 = -2147483648;
18832 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18833 }, "java.awt.Rectangle");
18834 Clazz_defineMethod (c$, "union", 
18835 function (r) {
18836 var tx2 = this.width;
18837 var ty2 = this.height;
18838 if ((tx2 | ty2) < 0) {
18839 return  new java.awt.Rectangle (r);
18840 }var rx2 = r.width;
18841 var ry2 = r.height;
18842 if ((rx2 | ry2) < 0) {
18843 return  new java.awt.Rectangle (this);
18844 }var tx1 = this.x;
18845 var ty1 = this.y;
18846 tx2 += tx1;
18847 ty2 += ty1;
18848 var rx1 = r.x;
18849 var ry1 = r.y;
18850 rx2 += rx1;
18851 ry2 += ry1;
18852 if (tx1 > rx1) tx1 = rx1;
18853 if (ty1 > ry1) ty1 = ry1;
18854 if (tx2 < rx2) tx2 = rx2;
18855 if (ty2 < ry2) ty2 = ry2;
18856 tx2 -= tx1;
18857 ty2 -= ty1;
18858 if (tx2 > 2147483647) tx2 = 2147483647;
18859 if (ty2 > 2147483647) ty2 = 2147483647;
18860 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18861 }, "java.awt.Rectangle");
18862 Clazz_defineMethod (c$, "add", 
18863 function (newx, newy) {
18864 if ((this.width | this.height) < 0) {
18865 this.x = newx;
18866 this.y = newy;
18867 this.width = this.height = 0;
18868 return;
18869 }var x1 = this.x;
18870 var y1 = this.y;
18871 var x2 = this.width;
18872 var y2 = this.height;
18873 x2 += x1;
18874 y2 += y1;
18875 if (x1 > newx) x1 = newx;
18876 if (y1 > newy) y1 = newy;
18877 if (x2 < newx) x2 = newx;
18878 if (y2 < newy) y2 = newy;
18879 x2 -= x1;
18880 y2 -= y1;
18881 if (x2 > 2147483647) x2 = 2147483647;
18882 if (y2 > 2147483647) y2 = 2147483647;
18883 this.reshape (x1, y1, x2, y2);
18884 }, "~N,~N");
18885 Clazz_defineMethod (c$, "add", 
18886 function (pt) {
18887 this.add (pt.x, pt.y);
18888 }, "java.awt.Point");
18889 Clazz_defineMethod (c$, "add", 
18890 function (r) {
18891 var tx2 = this.width;
18892 var ty2 = this.height;
18893 if ((tx2 | ty2) < 0) {
18894 this.reshape (r.x, r.y, r.width, r.height);
18895 }var rx2 = r.width;
18896 var ry2 = r.height;
18897 if ((rx2 | ry2) < 0) {
18898 return;
18899 }var tx1 = this.x;
18900 var ty1 = this.y;
18901 tx2 += tx1;
18902 ty2 += ty1;
18903 var rx1 = r.x;
18904 var ry1 = r.y;
18905 rx2 += rx1;
18906 ry2 += ry1;
18907 if (tx1 > rx1) tx1 = rx1;
18908 if (ty1 > ry1) ty1 = ry1;
18909 if (tx2 < rx2) tx2 = rx2;
18910 if (ty2 < ry2) ty2 = ry2;
18911 tx2 -= tx1;
18912 ty2 -= ty1;
18913 if (tx2 > 2147483647) tx2 = 2147483647;
18914 if (ty2 > 2147483647) ty2 = 2147483647;
18915 this.reshape (tx1, ty1, tx2, ty2);
18916 }, "java.awt.Rectangle");
18917 Clazz_defineMethod (c$, "grow", 
18918 function (h, v) {
18919 var x0 = this.x;
18920 var y0 = this.y;
18921 var x1 = this.width;
18922 var y1 = this.height;
18923 x1 += x0;
18924 y1 += y0;
18925 x0 -= h;
18926 y0 -= v;
18927 x1 += h;
18928 y1 += v;
18929 if (x1 < x0) {
18930 x1 -= x0;
18931 if (x1 < -2147483648) x1 = -2147483648;
18932 if (x0 < -2147483648) x0 = -2147483648;
18933  else if (x0 > 2147483647) x0 = 2147483647;
18934 } else {
18935 if (x0 < -2147483648) x0 = -2147483648;
18936  else if (x0 > 2147483647) x0 = 2147483647;
18937 x1 -= x0;
18938 if (x1 < -2147483648) x1 = -2147483648;
18939  else if (x1 > 2147483647) x1 = 2147483647;
18940 }if (y1 < y0) {
18941 y1 -= y0;
18942 if (y1 < -2147483648) y1 = -2147483648;
18943 if (y0 < -2147483648) y0 = -2147483648;
18944  else if (y0 > 2147483647) y0 = 2147483647;
18945 } else {
18946 if (y0 < -2147483648) y0 = -2147483648;
18947  else if (y0 > 2147483647) y0 = 2147483647;
18948 y1 -= y0;
18949 if (y1 < -2147483648) y1 = -2147483648;
18950  else if (y1 > 2147483647) y1 = 2147483647;
18951 }this.reshape (x0, y0, x1, y1);
18952 }, "~N,~N");
18953 Clazz_overrideMethod (c$, "isEmpty", 
18954 function () {
18955 return (this.width <= 0) || (this.height <= 0);
18956 });
18957 Clazz_defineMethod (c$, "outcode", 
18958 function (x, y) {
18959 var out = 0;
18960 if (this.width <= 0) {
18961 out |= 5;
18962 } else if (x < this.x) {
18963 out |= 1;
18964 } else if (x > this.x + this.width) {
18965 out |= 4;
18966 }if (this.height <= 0) {
18967 out |= 10;
18968 } else if (y < this.y) {
18969 out |= 2;
18970 } else if (y > this.y + this.height) {
18971 out |= 8;
18972 }return out;
18973 }, "~N,~N");
18974 Clazz_overrideMethod (c$, "createIntersection", 
18975 function (r) {
18976 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
18977 return this.intersection (r);
18978 }var dest =  new java.awt.geom.Rectangle2D.Double ();
18979 java.awt.geom.Rectangle2D.intersect (this, r, dest);
18980 return dest;
18981 }, "java.awt.geom.Rectangle2D");
18982 Clazz_overrideMethod (c$, "createUnion", 
18983 function (r) {
18984 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
18985 return this.union (r);
18986 }var dest =  new java.awt.geom.Rectangle2D.Double ();
18987 java.awt.geom.Rectangle2D.union (this, r, dest);
18988 return dest;
18989 }, "java.awt.geom.Rectangle2D");
18990 Clazz_defineMethod (c$, "equals", 
18991 function (obj) {
18992 if (Clazz_instanceOf (obj, java.awt.Rectangle)) {
18993 var r = obj;
18994 return ((this.x == r.x) && (this.y == r.y) && (this.width == r.width) && (this.height == r.height));
18995 }return Clazz_superCall (this, java.awt.Rectangle, "equals", [obj]);
18996 }, "~O");
18997 Clazz_overrideMethod (c$, "toString", 
18998 function () {
18999 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",width=" + this.width + ",height=" + this.height + "]";
19000 });
19001 });
19002 Clazz_declarePackage ("java.awt");
19003 Clazz_declareInterface (java.awt, "Shape");
19004 Clazz_declarePackage ("java.awt.geom");
19005 Clazz_load (["java.awt.geom.RectangularShape"], "java.awt.geom.Rectangle2D", ["java.lang.Double", "java.awt.geom.RectIterator"], function () {
19006 c$ = Clazz_declareType (java.awt.geom, "Rectangle2D", java.awt.geom.RectangularShape);
19007 Clazz_makeConstructor (c$, 
19008 function () {
19009 Clazz_superConstructor (this, java.awt.geom.Rectangle2D, []);
19010 });
19011 Clazz_defineMethod (c$, "setRect", 
19012 function (r) {
19013 this.setRect (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19014 }, "java.awt.geom.Rectangle2D");
19015 Clazz_defineMethod (c$, "intersectsLine", 
19016 function (x1, y1, x2, y2) {
19017 var out1;
19018 var out2;
19019 if ((out2 = this.outcode (x2, y2)) == 0) {
19020 return true;
19021 }while ((out1 = this.outcode (x1, y1)) != 0) {
19022 if ((out1 & out2) != 0) {
19023 return false;
19024 }if ((out1 & (5)) != 0) {
19025 var x = this.getX ();
19026 if ((out1 & 4) != 0) {
19027 x += this.getWidth ();
19028 }y1 = y1 + (x - x1) * (y2 - y1) / (x2 - x1);
19029 x1 = x;
19030 } else {
19031 var y = this.getY ();
19032 if ((out1 & 8) != 0) {
19033 y += this.getHeight ();
19034 }x1 = x1 + (y - y1) * (x2 - x1) / (y2 - y1);
19035 y1 = y;
19036 }}
19037 return true;
19038 }, "~N,~N,~N,~N");
19039 Clazz_defineMethod (c$, "intersectsLine", 
19040 function (l) {
19041 return this.intersectsLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
19042 }, "java.awt.geom.Line2D");
19043 Clazz_defineMethod (c$, "outcode", 
19044 function (p) {
19045 return this.outcode (p.getX (), p.getY ());
19046 }, "java.awt.geom.Point2D");
19047 Clazz_defineMethod (c$, "setFrame", 
19048 function (x, y, w, h) {
19049 this.setRect (x, y, w, h);
19050 }, "~N,~N,~N,~N");
19051 Clazz_overrideMethod (c$, "getBounds2D", 
19052 function () {
19053 return this.clone ();
19054 });
19055 Clazz_defineMethod (c$, "contains", 
19056 function (x, y) {
19057 var x0 = this.getX ();
19058 var y0 = this.getY ();
19059 return (x >= x0 && y >= y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19060 }, "~N,~N");
19061 Clazz_defineMethod (c$, "intersects", 
19062 function (x, y, w, h) {
19063 if (this.isEmpty () || w <= 0 || h <= 0) {
19064 return false;
19065 }var x0 = this.getX ();
19066 var y0 = this.getY ();
19067 return (x + w > x0 && y + h > y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19068 }, "~N,~N,~N,~N");
19069 Clazz_defineMethod (c$, "contains", 
19070 function (x, y, w, h) {
19071 if (this.isEmpty () || w <= 0 || h <= 0) {
19072 return false;
19073 }var x0 = this.getX ();
19074 var y0 = this.getY ();
19075 return (x >= x0 && y >= y0 && (x + w) <= x0 + this.getWidth () && (y + h) <= y0 + this.getHeight ());
19076 }, "~N,~N,~N,~N");
19077 c$.intersect = Clazz_defineMethod (c$, "intersect", 
19078 function (src1, src2, dest) {
19079 var x1 = Math.max (src1.getMinX (), src2.getMinX ());
19080 var y1 = Math.max (src1.getMinY (), src2.getMinY ());
19081 var x2 = Math.min (src1.getMaxX (), src2.getMaxX ());
19082 var y2 = Math.min (src1.getMaxY (), src2.getMaxY ());
19083 dest.setFrame (x1, y1, x2 - x1, y2 - y1);
19084 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19085 c$.union = Clazz_defineMethod (c$, "union", 
19086 function (src1, src2, dest) {
19087 var x1 = Math.min (src1.getMinX (), src2.getMinX ());
19088 var y1 = Math.min (src1.getMinY (), src2.getMinY ());
19089 var x2 = Math.max (src1.getMaxX (), src2.getMaxX ());
19090 var y2 = Math.max (src1.getMaxY (), src2.getMaxY ());
19091 dest.setFrameFromDiagonal (x1, y1, x2, y2);
19092 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19093 Clazz_defineMethod (c$, "add", 
19094 function (newx, newy) {
19095 var x1 = Math.min (this.getMinX (), newx);
19096 var x2 = Math.max (this.getMaxX (), newx);
19097 var y1 = Math.min (this.getMinY (), newy);
19098 var y2 = Math.max (this.getMaxY (), newy);
19099 this.setRect (x1, y1, x2 - x1, y2 - y1);
19100 }, "~N,~N");
19101 Clazz_defineMethod (c$, "add", 
19102 function (pt) {
19103 this.add (pt.getX (), pt.getY ());
19104 }, "java.awt.geom.Point2D");
19105 Clazz_defineMethod (c$, "add", 
19106 function (r) {
19107 var x1 = Math.min (this.getMinX (), r.getMinX ());
19108 var x2 = Math.max (this.getMaxX (), r.getMaxX ());
19109 var y1 = Math.min (this.getMinY (), r.getMinY ());
19110 var y2 = Math.max (this.getMaxY (), r.getMaxY ());
19111 this.setRect (x1, y1, x2 - x1, y2 - y1);
19112 }, "java.awt.geom.Rectangle2D");
19113 Clazz_defineMethod (c$, "getPathIterator", 
19114 function (at) {
19115 return  new java.awt.geom.RectIterator (this, at);
19116 }, "java.awt.geom.AffineTransform");
19117 Clazz_defineMethod (c$, "getPathIterator", 
19118 function (at, flatness) {
19119 return  new java.awt.geom.RectIterator (this, at);
19120 }, "java.awt.geom.AffineTransform,~N");
19121 Clazz_overrideMethod (c$, "hashCode", 
19122 function () {
19123 var bits = java.lang.Double.doubleToLongBits (this.getX ());
19124 bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37;
19125 bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43;
19126 bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47;
19127 return ((bits) ^ ((bits >> 32)));
19128 });
19129 Clazz_overrideMethod (c$, "equals", 
19130 function (obj) {
19131 if (obj === this) {
19132 return true;
19133 }if (Clazz_instanceOf (obj, java.awt.geom.Rectangle2D)) {
19134 var r2d = obj;
19135 return ((this.getX () == r2d.getX ()) && (this.getY () == r2d.getY ()) && (this.getWidth () == r2d.getWidth ()) && (this.getHeight () == r2d.getHeight ()));
19136 }return false;
19137 }, "~O");
19138 Clazz_pu$h(self.c$);
19139 c$ = Clazz_decorateAsClass (function () {
19140 this.x = 0;
19141 this.y = 0;
19142 this.width = 0;
19143 this.height = 0;
19144 Clazz_instantialize (this, arguments);
19145 }, java.awt.geom.Rectangle2D, "Float", java.awt.geom.Rectangle2D);
19146 Clazz_makeConstructor (c$, 
19147 function (a, b, c, d) {
19148 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Float, []);
19149 {
19150 if (arguments.length == 0)
19151 return;
19152 }this.setRect (a, b, c, d);
19153 }, "~N,~N,~N,~N");
19154 Clazz_defineMethod (c$, "getX", 
19155 function () {
19156 return this.x;
19157 });
19158 Clazz_defineMethod (c$, "getY", 
19159 function () {
19160 return this.y;
19161 });
19162 Clazz_defineMethod (c$, "getWidth", 
19163 function () {
19164 return this.width;
19165 });
19166 Clazz_defineMethod (c$, "getHeight", 
19167 function () {
19168 return this.height;
19169 });
19170 Clazz_overrideMethod (c$, "isEmpty", 
19171 function () {
19172 return (this.width <= 0.0) || (this.height <= 0.0);
19173 });
19174 Clazz_defineMethod (c$, "setRect", 
19175 function (a, b, c, d) {
19176 this.x = a;
19177 this.y = b;
19178 this.width = c;
19179 this.height = d;
19180 }, "~N,~N,~N,~N");
19181 Clazz_defineMethod (c$, "setRect", 
19182 function (a, b, c, d) {
19183 this.x = a;
19184 this.y = b;
19185 this.width = c;
19186 this.height = d;
19187 }, "~N,~N,~N,~N");
19188 Clazz_defineMethod (c$, "setRect", 
19189 function (a) {
19190 this.x = a.getX ();
19191 this.y = a.getY ();
19192 this.width = a.getWidth ();
19193 this.height = a.getHeight ();
19194 }, "java.awt.geom.Rectangle2D");
19195 Clazz_defineMethod (c$, "outcode", 
19196 function (a, b) {
19197 var c = 0;
19198 if (this.width <= 0) {
19199 c |= 5;
19200 } else if (a < this.x) {
19201 c |= 1;
19202 } else if (a > this.x + this.width) {
19203 c |= 4;
19204 }if (this.height <= 0) {
19205 c |= 10;
19206 } else if (b < this.y) {
19207 c |= 2;
19208 } else if (b > this.y + this.height) {
19209 c |= 8;
19210 }return c;
19211 }, "~N,~N");
19212 Clazz_overrideMethod (c$, "getBounds2D", 
19213 function () {
19214 return  new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height);
19215 });
19216 Clazz_overrideMethod (c$, "createIntersection", 
19217 function (a) {
19218 var b;
19219 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19220 b =  new java.awt.geom.Rectangle2D.Float ();
19221 } else {
19222 b =  new java.awt.geom.Rectangle2D.Double ();
19223 }java.awt.geom.Rectangle2D.intersect (this, a, b);
19224 return b;
19225 }, "java.awt.geom.Rectangle2D");
19226 Clazz_overrideMethod (c$, "createUnion", 
19227 function (a) {
19228 var b;
19229 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19230 b =  new java.awt.geom.Rectangle2D.Float ();
19231 } else {
19232 b =  new java.awt.geom.Rectangle2D.Double ();
19233 }java.awt.geom.Rectangle2D.union (this, a, b);
19234 return b;
19235 }, "java.awt.geom.Rectangle2D");
19236 Clazz_overrideMethod (c$, "toString", 
19237 function () {
19238 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19239 });
19240 c$ = Clazz_p0p ();
19241 Clazz_pu$h(self.c$);
19242 c$ = Clazz_decorateAsClass (function () {
19243 this.x = 0;
19244 this.y = 0;
19245 this.width = 0;
19246 this.height = 0;
19247 Clazz_instantialize (this, arguments);
19248 }, java.awt.geom.Rectangle2D, "Double", java.awt.geom.Rectangle2D);
19249 Clazz_makeConstructor (c$, 
19250 function () {
19251 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19252 });
19253 Clazz_makeConstructor (c$, 
19254 function (a, b, c, d) {
19255 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19256 this.setRect (a, b, c, d);
19257 }, "~N,~N,~N,~N");
19258 Clazz_defineMethod (c$, "getX", 
19259 function () {
19260 return this.x;
19261 });
19262 Clazz_defineMethod (c$, "getY", 
19263 function () {
19264 return this.y;
19265 });
19266 Clazz_defineMethod (c$, "getWidth", 
19267 function () {
19268 return this.width;
19269 });
19270 Clazz_defineMethod (c$, "getHeight", 
19271 function () {
19272 return this.height;
19273 });
19274 Clazz_overrideMethod (c$, "isEmpty", 
19275 function () {
19276 return (this.width <= 0.0) || (this.height <= 0.0);
19277 });
19278 Clazz_defineMethod (c$, "setRect", 
19279 function (a, b, c, d) {
19280 this.x = a;
19281 this.y = b;
19282 this.width = c;
19283 this.height = d;
19284 }, "~N,~N,~N,~N");
19285 Clazz_defineMethod (c$, "setRect", 
19286 function (a) {
19287 this.x = a.getX ();
19288 this.y = a.getY ();
19289 this.width = a.getWidth ();
19290 this.height = a.getHeight ();
19291 }, "java.awt.geom.Rectangle2D");
19292 Clazz_defineMethod (c$, "outcode", 
19293 function (a, b) {
19294 var c = 0;
19295 if (this.width <= 0) {
19296 c |= 5;
19297 } else if (a < this.x) {
19298 c |= 1;
19299 } else if (a > this.x + this.width) {
19300 c |= 4;
19301 }if (this.height <= 0) {
19302 c |= 10;
19303 } else if (b < this.y) {
19304 c |= 2;
19305 } else if (b > this.y + this.height) {
19306 c |= 8;
19307 }return c;
19308 }, "~N,~N");
19309 Clazz_overrideMethod (c$, "getBounds2D", 
19310 function () {
19311 return  new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height);
19312 });
19313 Clazz_overrideMethod (c$, "createIntersection", 
19314 function (a) {
19315 var b =  new java.awt.geom.Rectangle2D.Double ();
19316 java.awt.geom.Rectangle2D.intersect (this, a, b);
19317 return b;
19318 }, "java.awt.geom.Rectangle2D");
19319 Clazz_overrideMethod (c$, "createUnion", 
19320 function (a) {
19321 var b =  new java.awt.geom.Rectangle2D.Double ();
19322 java.awt.geom.Rectangle2D.union (this, a, b);
19323 return b;
19324 }, "java.awt.geom.Rectangle2D");
19325 Clazz_overrideMethod (c$, "toString", 
19326 function () {
19327 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19328 });
19329 c$ = Clazz_p0p ();
19330 Clazz_defineStatics (c$,
19331 "OUT_LEFT", 1,
19332 "OUT_TOP", 2,
19333 "OUT_RIGHT", 4,
19334 "OUT_BOTTOM", 8);
19335 });
19336 Clazz_declarePackage ("java.awt.geom");
19337 Clazz_load (["java.awt.Shape"], "java.awt.geom.RectangularShape", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator"], function () {
19338 c$ = Clazz_declareType (java.awt.geom, "RectangularShape", null, [java.awt.Shape, Cloneable]);
19339 Clazz_makeConstructor (c$, 
19340 function () {
19341 });
19342 Clazz_defineMethod (c$, "getMinX", 
19343 function () {
19344 return this.getX ();
19345 });
19346 Clazz_defineMethod (c$, "getMinY", 
19347 function () {
19348 return this.getY ();
19349 });
19350 Clazz_defineMethod (c$, "getMaxX", 
19351 function () {
19352 return this.getX () + this.getWidth ();
19353 });
19354 Clazz_defineMethod (c$, "getMaxY", 
19355 function () {
19356 return this.getY () + this.getHeight ();
19357 });
19358 Clazz_defineMethod (c$, "getCenterX", 
19359 function () {
19360 return this.getX () + this.getWidth () / 2.0;
19361 });
19362 Clazz_defineMethod (c$, "getCenterY", 
19363 function () {
19364 return this.getY () + this.getHeight () / 2.0;
19365 });
19366 Clazz_defineMethod (c$, "getFrame", 
19367 function () {
19368 return  new java.awt.geom.Rectangle2D.Double (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
19369 });
19370 Clazz_defineMethod (c$, "setFrame", 
19371 function (loc, size) {
19372 this.setFrame (loc.getX (), loc.getY (), size.getWidth (), size.getHeight ());
19373 }, "java.awt.geom.Point2D,java.awt.geom.Dimension2D");
19374 Clazz_defineMethod (c$, "setFrame", 
19375 function (r) {
19376 this.setFrame (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19377 }, "java.awt.geom.Rectangle2D");
19378 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19379 function (x1, y1, x2, y2) {
19380 if (x2 < x1) {
19381 var t = x1;
19382 x1 = x2;
19383 x2 = t;
19384 }if (y2 < y1) {
19385 var t = y1;
19386 y1 = y2;
19387 y2 = t;
19388 }this.setFrame (x1, y1, x2 - x1, y2 - y1);
19389 }, "~N,~N,~N,~N");
19390 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19391 function (p1, p2) {
19392 this.setFrameFromDiagonal (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
19393 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19394 Clazz_defineMethod (c$, "setFrameFromCenter", 
19395 function (centerX, centerY, cornerX, cornerY) {
19396 var halfW = Math.abs (cornerX - centerX);
19397 var halfH = Math.abs (cornerY - centerY);
19398 this.setFrame (centerX - halfW, centerY - halfH, halfW * 2.0, halfH * 2.0);
19399 }, "~N,~N,~N,~N");
19400 Clazz_defineMethod (c$, "setFrameFromCenter", 
19401 function (center, corner) {
19402 this.setFrameFromCenter (center.getX (), center.getY (), corner.getX (), corner.getY ());
19403 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19404 Clazz_defineMethod (c$, "contains", 
19405 function (p) {
19406 return this.contains (p.getX (), p.getY ());
19407 }, "java.awt.geom.Point2D");
19408 Clazz_overrideMethod (c$, "intersects", 
19409 function (r) {
19410 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19411 }, "java.awt.geom.Rectangle2D");
19412 Clazz_defineMethod (c$, "contains", 
19413 function (r) {
19414 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19415 }, "java.awt.geom.Rectangle2D");
19416 Clazz_overrideMethod (c$, "getBounds", 
19417 function () {
19418 var width = this.getWidth ();
19419 var height = this.getHeight ();
19420 if (width < 0 || height < 0) {
19421 return  new java.awt.Rectangle ();
19422 }var x = this.getX ();
19423 var y = this.getY ();
19424 var x1 = Math.floor (x);
19425 var y1 = Math.floor (y);
19426 var x2 = Math.ceil (x + width);
19427 var y2 = Math.ceil (y + height);
19428 return  new java.awt.Rectangle (Clazz_doubleToInt (x1), Clazz_doubleToInt (y1), Clazz_doubleToInt (x2 - x1), Clazz_doubleToInt (y2 - y1));
19429 });
19430 Clazz_overrideMethod (c$, "getPathIterator", 
19431 function (at, flatness) {
19432 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
19433 }, "java.awt.geom.AffineTransform,~N");
19434 Clazz_defineMethod (c$, "clone", 
19435 function () {
19436 try {
19437 return Clazz_superCall (this, java.awt.geom.RectangularShape, "clone", []);
19438 } catch (e) {
19439 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
19440 throw  new InternalError ();
19441 } else {
19442 throw e;
19443 }
19444 }
19445 });
19446 });
19447 Clazz_declarePackage ("java.awt.geom");
19448 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.FlatteningPathIterator", ["java.lang.IllegalArgumentException", "java.util.NoSuchElementException", "java.awt.geom.CubicCurve2D", "$.QuadCurve2D"], function () {
19449 c$ = Clazz_decorateAsClass (function () {
19450 this.src = null;
19451 this.squareflat = 0;
19452 this.limit = 0;
19453 this.hold = null;
19454 this.curx = 0;
19455 this.cury = 0;
19456 this.movx = 0;
19457 this.movy = 0;
19458 this.holdType = 0;
19459 this.holdEnd = 0;
19460 this.holdIndex = 0;
19461 this.levels = null;
19462 this.levelIndex = 0;
19463 this.done = false;
19464 Clazz_instantialize (this, arguments);
19465 }, java.awt.geom, "FlatteningPathIterator", null, java.awt.geom.PathIterator);
19466 Clazz_prepareFields (c$, function () {
19467 this.hold =  Clazz_newDoubleArray (14, 0);
19468 });
19469 Clazz_makeConstructor (c$, 
19470 function (src, flatness) {
19471 this.construct (src, flatness, 10);
19472 }, "java.awt.geom.PathIterator,~N");
19473 Clazz_makeConstructor (c$, 
19474 function (src, flatness, limit) {
19475 if (flatness < 0.0) {
19476 throw  new IllegalArgumentException ("flatness must be >= 0");
19477 }if (limit < 0) {
19478 throw  new IllegalArgumentException ("limit must be >= 0");
19479 }this.src = src;
19480 this.squareflat = flatness * flatness;
19481 this.limit = limit;
19482 this.levels =  Clazz_newIntArray (limit + 1, 0);
19483 this.next (false);
19484 }, "java.awt.geom.PathIterator,~N,~N");
19485 Clazz_defineMethod (c$, "getFlatness", 
19486 function () {
19487 return Math.sqrt (this.squareflat);
19488 });
19489 Clazz_defineMethod (c$, "getRecursionLimit", 
19490 function () {
19491 return this.limit;
19492 });
19493 Clazz_defineMethod (c$, "getWindingRule", 
19494 function () {
19495 return this.src.getWindingRule ();
19496 });
19497 Clazz_defineMethod (c$, "isDone", 
19498 function () {
19499 return this.done;
19500 });
19501 Clazz_defineMethod (c$, "ensureHoldCapacity", 
19502 function (want) {
19503 if (this.holdIndex - want < 0) {
19504 var have = this.hold.length - this.holdIndex;
19505 var newsize = this.hold.length + 24;
19506 var newhold =  Clazz_newDoubleArray (newsize, 0);
19507 System.arraycopy (this.hold, this.holdIndex, newhold, this.holdIndex + 24, have);
19508 this.hold = newhold;
19509 this.holdIndex += 24;
19510 this.holdEnd += 24;
19511 }}, "~N");
19512 Clazz_defineMethod (c$, "next", 
19513 function () {
19514 this.next (true);
19515 });
19516 Clazz_defineMethod (c$, "next", 
19517  function (doNext) {
19518 var level;
19519 if (this.holdIndex >= this.holdEnd) {
19520 if (doNext) {
19521 this.src.next ();
19522 }if (this.src.isDone ()) {
19523 this.done = true;
19524 return;
19525 }this.holdType = this.src.currentSegment (this.hold);
19526 this.levelIndex = 0;
19527 this.levels[0] = 0;
19528 }switch (this.holdType) {
19529 case 0:
19530 case 1:
19531 this.curx = this.hold[0];
19532 this.cury = this.hold[1];
19533 if (this.holdType == 0) {
19534 this.movx = this.curx;
19535 this.movy = this.cury;
19536 }this.holdIndex = 0;
19537 this.holdEnd = 0;
19538 break;
19539 case 4:
19540 this.curx = this.movx;
19541 this.cury = this.movy;
19542 this.holdIndex = 0;
19543 this.holdEnd = 0;
19544 break;
19545 case 2:
19546 if (this.holdIndex >= this.holdEnd) {
19547 this.holdIndex = this.hold.length - 6;
19548 this.holdEnd = this.hold.length - 2;
19549 this.hold[this.holdIndex + 0] = this.curx;
19550 this.hold[this.holdIndex + 1] = this.cury;
19551 this.hold[this.holdIndex + 2] = this.hold[0];
19552 this.hold[this.holdIndex + 3] = this.hold[1];
19553 this.hold[this.holdIndex + 4] = this.curx = this.hold[2];
19554 this.hold[this.holdIndex + 5] = this.cury = this.hold[3];
19555 }level = this.levels[this.levelIndex];
19556 while (level < this.limit) {
19557 if (java.awt.geom.QuadCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19558 break;
19559 }this.ensureHoldCapacity (4);
19560 java.awt.geom.QuadCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 4, this.hold, this.holdIndex);
19561 this.holdIndex -= 4;
19562 level++;
19563 this.levels[this.levelIndex] = level;
19564 this.levelIndex++;
19565 this.levels[this.levelIndex] = level;
19566 }
19567 this.holdIndex += 4;
19568 this.levelIndex--;
19569 break;
19570 case 3:
19571 if (this.holdIndex >= this.holdEnd) {
19572 this.holdIndex = this.hold.length - 8;
19573 this.holdEnd = this.hold.length - 2;
19574 this.hold[this.holdIndex + 0] = this.curx;
19575 this.hold[this.holdIndex + 1] = this.cury;
19576 this.hold[this.holdIndex + 2] = this.hold[0];
19577 this.hold[this.holdIndex + 3] = this.hold[1];
19578 this.hold[this.holdIndex + 4] = this.hold[2];
19579 this.hold[this.holdIndex + 5] = this.hold[3];
19580 this.hold[this.holdIndex + 6] = this.curx = this.hold[4];
19581 this.hold[this.holdIndex + 7] = this.cury = this.hold[5];
19582 }level = this.levels[this.levelIndex];
19583 while (level < this.limit) {
19584 if (java.awt.geom.CubicCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19585 break;
19586 }this.ensureHoldCapacity (6);
19587 java.awt.geom.CubicCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 6, this.hold, this.holdIndex);
19588 this.holdIndex -= 6;
19589 level++;
19590 this.levels[this.levelIndex] = level;
19591 this.levelIndex++;
19592 this.levels[this.levelIndex] = level;
19593 }
19594 this.holdIndex += 6;
19595 this.levelIndex--;
19596 break;
19597 }
19598 }, "~B");
19599 Clazz_defineMethod (c$, "currentSegment", 
19600 function (coords) {
19601 if (this.isDone ()) {
19602 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19603 }var type = this.holdType;
19604 if (type != 4) {
19605 coords[0] = this.hold[this.holdIndex + 0];
19606 coords[1] = this.hold[this.holdIndex + 1];
19607 if (type != 0) {
19608 type = 1;
19609 }}return type;
19610 }, "~A");
19611 Clazz_defineMethod (c$, "currentSegment", 
19612 function (coords) {
19613 if (this.isDone ()) {
19614 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19615 }var type = this.holdType;
19616 if (type != 4) {
19617 coords[0] = this.hold[this.holdIndex + 0];
19618 coords[1] = this.hold[this.holdIndex + 1];
19619 if (type != 0) {
19620 type = 1;
19621 }}return type;
19622 }, "~A");
19623 Clazz_defineStatics (c$,
19624 "GROW_SIZE", 24);
19625 });
19626 Clazz_declarePackage ("java.awt.geom");
19627 c$ = Clazz_declareInterface (java.awt.geom, "PathIterator");
19628 Clazz_defineStatics (c$,
19629 "WIND_EVEN_ODD", 0,
19630 "WIND_NON_ZERO", 1,
19631 "SEG_MOVETO", 0,
19632 "SEG_LINETO", 1,
19633 "SEG_QUADTO", 2,
19634 "SEG_CUBICTO", 3,
19635 "SEG_CLOSE", 4);
19636 Clazz_declarePackage ("java.awt.geom");
19637 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 () {
19638 c$ = Clazz_declareType (java.awt.geom, "CubicCurve2D", null, [java.awt.Shape, Cloneable]);
19639 Clazz_makeConstructor (c$, 
19640 function () {
19641 });
19642 Clazz_defineMethod (c$, "setCurve", 
19643 function (coords, offset) {
19644 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]);
19645 }, "~A,~N");
19646 Clazz_defineMethod (c$, "setCurve", 
19647 function (p1, cp1, cp2, p2) {
19648 this.setCurve (p1.getX (), p1.getY (), cp1.getX (), cp1.getY (), cp2.getX (), cp2.getY (), p2.getX (), p2.getY ());
19649 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
19650 Clazz_defineMethod (c$, "setCurve", 
19651 function (pts, offset) {
19652 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 ());
19653 }, "~A,~N");
19654 Clazz_defineMethod (c$, "setCurve", 
19655 function (c) {
19656 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX1 (), c.getCtrlY1 (), c.getCtrlX2 (), c.getCtrlY2 (), c.getX2 (), c.getY2 ());
19657 }, "java.awt.geom.CubicCurve2D");
19658 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19659 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19660 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));
19661 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19662 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19663 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19664 return Math.sqrt (java.awt.geom.CubicCurve2D.getFlatnessSq (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2));
19665 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19666 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19667 function (coords, offset) {
19668 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]);
19669 }, "~A,~N");
19670 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19671 function (coords, offset) {
19672 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]);
19673 }, "~A,~N");
19674 Clazz_defineMethod (c$, "getFlatnessSq", 
19675 function () {
19676 return java.awt.geom.CubicCurve2D.getFlatnessSq (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19677 });
19678 Clazz_defineMethod (c$, "getFlatness", 
19679 function () {
19680 return java.awt.geom.CubicCurve2D.getFlatness (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19681 });
19682 Clazz_defineMethod (c$, "subdivide", 
19683 function (left, right) {
19684 java.awt.geom.CubicCurve2D.subdivide (this, left, right);
19685 }, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19686 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19687 function (src, left, right) {
19688 var x1 = src.getX1 ();
19689 var y1 = src.getY1 ();
19690 var ctrlx1 = src.getCtrlX1 ();
19691 var ctrly1 = src.getCtrlY1 ();
19692 var ctrlx2 = src.getCtrlX2 ();
19693 var ctrly2 = src.getCtrlY2 ();
19694 var x2 = src.getX2 ();
19695 var y2 = src.getY2 ();
19696 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19697 var centery = (ctrly1 + ctrly2) / 2.0;
19698 ctrlx1 = (x1 + ctrlx1) / 2.0;
19699 ctrly1 = (y1 + ctrly1) / 2.0;
19700 ctrlx2 = (x2 + ctrlx2) / 2.0;
19701 ctrly2 = (y2 + ctrly2) / 2.0;
19702 var ctrlx12 = (ctrlx1 + centerx) / 2.0;
19703 var ctrly12 = (ctrly1 + centery) / 2.0;
19704 var ctrlx21 = (ctrlx2 + centerx) / 2.0;
19705 var ctrly21 = (ctrly2 + centery) / 2.0;
19706 centerx = (ctrlx12 + ctrlx21) / 2.0;
19707 centery = (ctrly12 + ctrly21) / 2.0;
19708 if (left != null) {
19709 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx12, ctrly12, centerx, centery);
19710 }if (right != null) {
19711 right.setCurve (centerx, centery, ctrlx21, ctrly21, ctrlx2, ctrly2, x2, y2);
19712 }}, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19713 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19714 function (src, srcoff, left, leftoff, right, rightoff) {
19715 var x1 = src[srcoff + 0];
19716 var y1 = src[srcoff + 1];
19717 var ctrlx1 = src[srcoff + 2];
19718 var ctrly1 = src[srcoff + 3];
19719 var ctrlx2 = src[srcoff + 4];
19720 var ctrly2 = src[srcoff + 5];
19721 var x2 = src[srcoff + 6];
19722 var y2 = src[srcoff + 7];
19723 if (left != null) {
19724 left[leftoff + 0] = x1;
19725 left[leftoff + 1] = y1;
19726 }if (right != null) {
19727 right[rightoff + 6] = x2;
19728 right[rightoff + 7] = y2;
19729 }x1 = (x1 + ctrlx1) / 2.0;
19730 y1 = (y1 + ctrly1) / 2.0;
19731 x2 = (x2 + ctrlx2) / 2.0;
19732 y2 = (y2 + ctrly2) / 2.0;
19733 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19734 var centery = (ctrly1 + ctrly2) / 2.0;
19735 ctrlx1 = (x1 + centerx) / 2.0;
19736 ctrly1 = (y1 + centery) / 2.0;
19737 ctrlx2 = (x2 + centerx) / 2.0;
19738 ctrly2 = (y2 + centery) / 2.0;
19739 centerx = (ctrlx1 + ctrlx2) / 2.0;
19740 centery = (ctrly1 + ctrly2) / 2.0;
19741 if (left != null) {
19742 left[leftoff + 2] = x1;
19743 left[leftoff + 3] = y1;
19744 left[leftoff + 4] = ctrlx1;
19745 left[leftoff + 5] = ctrly1;
19746 left[leftoff + 6] = centerx;
19747 left[leftoff + 7] = centery;
19748 }if (right != null) {
19749 right[rightoff + 0] = centerx;
19750 right[rightoff + 1] = centery;
19751 right[rightoff + 2] = ctrlx2;
19752 right[rightoff + 3] = ctrly2;
19753 right[rightoff + 4] = x2;
19754 right[rightoff + 5] = y2;
19755 }}, "~A,~N,~A,~N,~A,~N");
19756 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19757 function (eqn) {
19758 return java.awt.geom.CubicCurve2D.solveCubic (eqn, eqn);
19759 }, "~A");
19760 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19761 function (eqn, res) {
19762 var d = eqn[3];
19763 if (d == 0.0) {
19764 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
19765 }var a = eqn[2] / d;
19766 var b = eqn[1] / d;
19767 var c = eqn[0] / d;
19768 var roots = 0;
19769 var Q = (a * a - 3.0 * b) / 9.0;
19770 var R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0;
19771 var R2 = R * R;
19772 var Q3 = Q * Q * Q;
19773 a = a / 3.0;
19774 if (R2 < Q3) {
19775 var theta = Math.acos (R / Math.sqrt (Q3));
19776 Q = -2.0 * Math.sqrt (Q);
19777 if (res === eqn) {
19778 eqn =  Clazz_newDoubleArray (4, 0);
19779 System.arraycopy (res, 0, eqn, 0, 4);
19780 }res[roots++] = Q * Math.cos (theta / 3.0) - a;
19781 res[roots++] = Q * Math.cos ((theta + 6.283185307179586) / 3.0) - a;
19782 res[roots++] = Q * Math.cos ((theta - 6.283185307179586) / 3.0) - a;
19783 java.awt.geom.CubicCurve2D.fixRoots (res, eqn);
19784 } else {
19785 var neg = (R < 0.0);
19786 var S = Math.sqrt (R2 - Q3);
19787 if (neg) {
19788 R = -R;
19789 }var A = Math.pow (R + S, 0.3333333333333333);
19790 if (!neg) {
19791 A = -A;
19792 }var B = (A == 0.0) ? 0.0 : (Q / A);
19793 res[roots++] = (A + B) - a;
19794 }return roots;
19795 }, "~A,~A");
19796 c$.fixRoots = Clazz_defineMethod (c$, "fixRoots", 
19797  function (res, eqn) {
19798 var EPSILON = 1E-5;
19799 for (var i = 0; i < 3; i++) {
19800 var t = res[i];
19801 if (Math.abs (t) < 1.0E-5) {
19802 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 0, eqn);
19803 } else if (Math.abs (t - 1) < 1.0E-5) {
19804 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 1, eqn);
19805 }}
19806 }, "~A,~A");
19807 c$.solveEqn = Clazz_defineMethod (c$, "solveEqn", 
19808  function (eqn, order, t) {
19809 var v = eqn[order];
19810 while (--order >= 0) {
19811 v = v * t + eqn[order];
19812 }
19813 return v;
19814 }, "~A,~N,~N");
19815 c$.findZero = Clazz_defineMethod (c$, "findZero", 
19816  function (t, target, eqn) {
19817 var slopeqn =  Clazz_newDoubleArray (-1, [eqn[1], 2 * eqn[2], 3 * eqn[3]]);
19818 var slope;
19819 var origdelta = 0;
19820 var origt = t;
19821 while (true) {
19822 slope = java.awt.geom.CubicCurve2D.solveEqn (slopeqn, 2, t);
19823 if (slope == 0) {
19824 return t;
19825 }var y = java.awt.geom.CubicCurve2D.solveEqn (eqn, 3, t);
19826 if (y == 0) {
19827 return t;
19828 }var delta = -(y / slope);
19829 if (origdelta == 0) {
19830 origdelta = delta;
19831 }if (t < target) {
19832 if (delta < 0) return t;
19833 } else if (t > target) {
19834 if (delta > 0) return t;
19835 } else {
19836 return (delta > 0 ? (target + 4.9E-324) : (target - 4.9E-324));
19837 }var newt = t + delta;
19838 if (t == newt) {
19839 return t;
19840 }if (delta * origdelta < 0) {
19841 var tag = (origt < t ? java.awt.geom.CubicCurve2D.getTag (target, origt, t) : java.awt.geom.CubicCurve2D.getTag (target, t, origt));
19842 if (tag != 0) {
19843 return (origt + t) / 2;
19844 }t = target;
19845 } else {
19846 t = newt;
19847 }}
19848 }, "~N,~N,~A");
19849 Clazz_defineMethod (c$, "contains", 
19850 function (x, y) {
19851 if (!(x * 0.0 + y * 0.0 == 0.0)) {
19852 return false;
19853 }var x1 = this.getX1 ();
19854 var y1 = this.getY1 ();
19855 var x2 = this.getX2 ();
19856 var y2 = this.getY2 ();
19857 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));
19858 return ((crossings & 1) == 1);
19859 }, "~N,~N");
19860 Clazz_defineMethod (c$, "contains", 
19861 function (p) {
19862 return this.contains (p.getX (), p.getY ());
19863 }, "java.awt.geom.Point2D");
19864 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
19865  function (eqn, val, c1, cp1, cp2, c2) {
19866 eqn[0] = c1 - val;
19867 eqn[1] = (cp1 - c1) * 3.0;
19868 eqn[2] = (cp2 - cp1 - cp1 + c1) * 3.0;
19869 eqn[3] = c2 + (cp1 - cp2) * 3.0 - c1;
19870 return;
19871 }, "~A,~N,~N,~N,~N,~N");
19872 c$.evalCubic = Clazz_defineMethod (c$, "evalCubic", 
19873  function (vals, num, include0, include1, inflect, c1, cp1, cp2, c2) {
19874 var j = 0;
19875 for (var i = 0; i < num; i++) {
19876 var t = vals[i];
19877 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + (2 * inflect[2] + 3 * inflect[3] * t) * t != 0)) {
19878 var u = 1 - t;
19879 vals[j++] = c1 * u * u * u + 3 * cp1 * t * u * u + 3 * cp2 * t * t * u + c2 * t * t * t;
19880 }}
19881 return j;
19882 }, "~A,~N,~B,~B,~A,~N,~N,~N,~N");
19883 c$.getTag = Clazz_defineMethod (c$, "getTag", 
19884  function (coord, low, high) {
19885 if (coord <= low) {
19886 return (coord < low ? -2 : -1);
19887 }if (coord >= high) {
19888 return (coord > high ? 2 : 1);
19889 }return 0;
19890 }, "~N,~N,~N");
19891 c$.inwards = Clazz_defineMethod (c$, "inwards", 
19892  function (pttag, opt1tag, opt2tag) {
19893 switch (pttag) {
19894 case -2:
19895 case 2:
19896 default:
19897 return false;
19898 case -1:
19899 return (opt1tag >= 0 || opt2tag >= 0);
19900 case 0:
19901 return true;
19902 case 1:
19903 return (opt1tag <= 0 || opt2tag <= 0);
19904 }
19905 }, "~N,~N,~N");
19906 Clazz_defineMethod (c$, "intersects", 
19907 function (x, y, w, h) {
19908 if (w <= 0 || h <= 0) {
19909 return false;
19910 }var x1 = this.getX1 ();
19911 var y1 = this.getY1 ();
19912 var x1tag = java.awt.geom.CubicCurve2D.getTag (x1, x, x + w);
19913 var y1tag = java.awt.geom.CubicCurve2D.getTag (y1, y, y + h);
19914 if (x1tag == 0 && y1tag == 0) {
19915 return true;
19916 }var x2 = this.getX2 ();
19917 var y2 = this.getY2 ();
19918 var x2tag = java.awt.geom.CubicCurve2D.getTag (x2, x, x + w);
19919 var y2tag = java.awt.geom.CubicCurve2D.getTag (y2, y, y + h);
19920 if (x2tag == 0 && y2tag == 0) {
19921 return true;
19922 }var ctrlx1 = this.getCtrlX1 ();
19923 var ctrly1 = this.getCtrlY1 ();
19924 var ctrlx2 = this.getCtrlX2 ();
19925 var ctrly2 = this.getCtrlY2 ();
19926 var ctrlx1tag = java.awt.geom.CubicCurve2D.getTag (ctrlx1, x, x + w);
19927 var ctrly1tag = java.awt.geom.CubicCurve2D.getTag (ctrly1, y, y + h);
19928 var ctrlx2tag = java.awt.geom.CubicCurve2D.getTag (ctrlx2, x, x + w);
19929 var ctrly2tag = java.awt.geom.CubicCurve2D.getTag (ctrly2, y, y + h);
19930 if (x1tag < 0 && x2tag < 0 && ctrlx1tag < 0 && ctrlx2tag < 0) {
19931 return false;
19932 }if (y1tag < 0 && y2tag < 0 && ctrly1tag < 0 && ctrly2tag < 0) {
19933 return false;
19934 }if (x1tag > 0 && x2tag > 0 && ctrlx1tag > 0 && ctrlx2tag > 0) {
19935 return false;
19936 }if (y1tag > 0 && y2tag > 0 && ctrly1tag > 0 && ctrly2tag > 0) {
19937 return false;
19938 }if (java.awt.geom.CubicCurve2D.inwards (x1tag, x2tag, ctrlx1tag) && java.awt.geom.CubicCurve2D.inwards (y1tag, y2tag, ctrly1tag)) {
19939 return true;
19940 }if (java.awt.geom.CubicCurve2D.inwards (x2tag, x1tag, ctrlx2tag) && java.awt.geom.CubicCurve2D.inwards (y2tag, y1tag, ctrly2tag)) {
19941 return true;
19942 }var xoverlap = (x1tag * x2tag <= 0);
19943 var yoverlap = (y1tag * y2tag <= 0);
19944 if (x1tag == 0 && x2tag == 0 && yoverlap) {
19945 return true;
19946 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
19947 return true;
19948 }var eqn =  Clazz_newDoubleArray (4, 0);
19949 var res =  Clazz_newDoubleArray (4, 0);
19950 if (!yoverlap) {
19951 java.awt.geom.CubicCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly1, ctrly2, y2);
19952 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
19953 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, x1, ctrlx1, ctrlx2, x2);
19954 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], x, x + w) * java.awt.geom.CubicCurve2D.getTag (res[1], x, x + w) <= 0);
19955 }if (!xoverlap) {
19956 java.awt.geom.CubicCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
19957 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
19958 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
19959 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], y, y + h) * java.awt.geom.CubicCurve2D.getTag (res[1], y, y + h) <= 0);
19960 }var dx = x2 - x1;
19961 var dy = y2 - y1;
19962 var k = y2 * x1 - x2 * y1;
19963 var c1tag;
19964 var c2tag;
19965 if (y1tag == 0) {
19966 c1tag = x1tag;
19967 } else {
19968 c1tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
19969 }if (y2tag == 0) {
19970 c2tag = x2tag;
19971 } else {
19972 c2tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
19973 }if (c1tag * c2tag <= 0) {
19974 return true;
19975 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
19976 java.awt.geom.CubicCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
19977 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
19978 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
19979 var tags =  Clazz_newIntArray (num + 1, 0);
19980 for (var i = 0; i < num; i++) {
19981 tags[i] = java.awt.geom.CubicCurve2D.getTag (res[i], y, y + h);
19982 }
19983 tags[num] = c1tag;
19984 java.util.Arrays.sort (tags);
19985 return ((num >= 1 && tags[0] * tags[1] <= 0) || (num >= 3 && tags[2] * tags[3] <= 0));
19986 }, "~N,~N,~N,~N");
19987 Clazz_defineMethod (c$, "intersects", 
19988 function (r) {
19989 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19990 }, "java.awt.geom.Rectangle2D");
19991 Clazz_defineMethod (c$, "contains", 
19992 function (x, y, w, h) {
19993 if (w <= 0 || h <= 0) {
19994 return false;
19995 }if (!(this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h))) {
19996 return false;
19997 }var rect =  new java.awt.geom.Rectangle2D.Double (x, y, w, h);
19998 return !rect.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
19999 }, "~N,~N,~N,~N");
20000 Clazz_defineMethod (c$, "contains", 
20001 function (r) {
20002 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20003 }, "java.awt.geom.Rectangle2D");
20004 Clazz_overrideMethod (c$, "getBounds", 
20005 function () {
20006 return this.getBounds2D ().getBounds ();
20007 });
20008 Clazz_defineMethod (c$, "getPathIterator", 
20009 function (at) {
20010 return (swingjs.api.Interface.getInstance ("java.awt.geom.CubicInterator", false)).set (this, at);
20011 }, "java.awt.geom.AffineTransform");
20012 Clazz_defineMethod (c$, "getPathIterator", 
20013 function (at, flatness) {
20014 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
20015 }, "java.awt.geom.AffineTransform,~N");
20016 Clazz_defineMethod (c$, "clone", 
20017 function () {
20018 try {
20019 return Clazz_superCall (this, java.awt.geom.CubicCurve2D, "clone", []);
20020 } catch (e) {
20021 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20022 throw  new InternalError ();
20023 } else {
20024 throw e;
20025 }
20026 }
20027 });
20028 Clazz_pu$h(self.c$);
20029 c$ = Clazz_decorateAsClass (function () {
20030 this.x1 = 0;
20031 this.y1 = 0;
20032 this.ctrlx1 = 0;
20033 this.ctrly1 = 0;
20034 this.ctrlx2 = 0;
20035 this.ctrly2 = 0;
20036 this.x2 = 0;
20037 this.y2 = 0;
20038 Clazz_instantialize (this, arguments);
20039 }, java.awt.geom.CubicCurve2D, "Float", java.awt.geom.CubicCurve2D);
20040 Clazz_makeConstructor (c$, 
20041 function () {
20042 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20043 });
20044 Clazz_makeConstructor (c$, 
20045 function (a, b, c, d, e, f, g, h) {
20046 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20047 this.setCurve (a, b, c, d, e, f, g, h);
20048 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20049 Clazz_overrideMethod (c$, "getX1", 
20050 function () {
20051 return this.x1;
20052 });
20053 Clazz_overrideMethod (c$, "getY1", 
20054 function () {
20055 return this.y1;
20056 });
20057 Clazz_overrideMethod (c$, "getP1", 
20058 function () {
20059 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20060 });
20061 Clazz_overrideMethod (c$, "getCtrlX1", 
20062 function () {
20063 return this.ctrlx1;
20064 });
20065 Clazz_overrideMethod (c$, "getCtrlY1", 
20066 function () {
20067 return this.ctrly1;
20068 });
20069 Clazz_overrideMethod (c$, "getCtrlP1", 
20070 function () {
20071 return  new java.awt.geom.Point2D.Float (this.ctrlx1, this.ctrly1);
20072 });
20073 Clazz_overrideMethod (c$, "getCtrlX2", 
20074 function () {
20075 return this.ctrlx2;
20076 });
20077 Clazz_overrideMethod (c$, "getCtrlY2", 
20078 function () {
20079 return this.ctrly2;
20080 });
20081 Clazz_overrideMethod (c$, "getCtrlP2", 
20082 function () {
20083 return  new java.awt.geom.Point2D.Float (this.ctrlx2, this.ctrly2);
20084 });
20085 Clazz_overrideMethod (c$, "getX2", 
20086 function () {
20087 return this.x2;
20088 });
20089 Clazz_overrideMethod (c$, "getY2", 
20090 function () {
20091 return this.y2;
20092 });
20093 Clazz_overrideMethod (c$, "getP2", 
20094 function () {
20095 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20096 });
20097 Clazz_defineMethod (c$, "setCurve", 
20098 function (a, b, c, d, e, f, g, h) {
20099 this.x1 = a;
20100 this.y1 = b;
20101 this.ctrlx1 = c;
20102 this.ctrly1 = d;
20103 this.ctrlx2 = e;
20104 this.ctrly2 = f;
20105 this.x2 = g;
20106 this.y2 = h;
20107 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20108 Clazz_defineMethod (c$, "setCurve", 
20109 function (a, b, c, d, e, f, g, h) {
20110 this.x1 = a;
20111 this.y1 = b;
20112 this.ctrlx1 = c;
20113 this.ctrly1 = d;
20114 this.ctrlx2 = e;
20115 this.ctrly2 = f;
20116 this.x2 = g;
20117 this.y2 = h;
20118 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20119 Clazz_overrideMethod (c$, "getBounds2D", 
20120 function () {
20121 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20122 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20123 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20124 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20125 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
20126 });
20127 c$ = Clazz_p0p ();
20128 Clazz_pu$h(self.c$);
20129 c$ = Clazz_decorateAsClass (function () {
20130 this.x1 = 0;
20131 this.y1 = 0;
20132 this.ctrlx1 = 0;
20133 this.ctrly1 = 0;
20134 this.ctrlx2 = 0;
20135 this.ctrly2 = 0;
20136 this.x2 = 0;
20137 this.y2 = 0;
20138 Clazz_instantialize (this, arguments);
20139 }, java.awt.geom.CubicCurve2D, "Double", java.awt.geom.CubicCurve2D);
20140 Clazz_makeConstructor (c$, 
20141 function () {
20142 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20143 });
20144 Clazz_makeConstructor (c$, 
20145 function (a, b, c, d, e, f, g, h) {
20146 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20147 this.setCurve (a, b, c, d, e, f, g, h);
20148 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20149 Clazz_overrideMethod (c$, "getX1", 
20150 function () {
20151 return this.x1;
20152 });
20153 Clazz_overrideMethod (c$, "getY1", 
20154 function () {
20155 return this.y1;
20156 });
20157 Clazz_overrideMethod (c$, "getP1", 
20158 function () {
20159 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20160 });
20161 Clazz_overrideMethod (c$, "getCtrlX1", 
20162 function () {
20163 return this.ctrlx1;
20164 });
20165 Clazz_overrideMethod (c$, "getCtrlY1", 
20166 function () {
20167 return this.ctrly1;
20168 });
20169 Clazz_overrideMethod (c$, "getCtrlP1", 
20170 function () {
20171 return  new java.awt.geom.Point2D.Double (this.ctrlx1, this.ctrly1);
20172 });
20173 Clazz_overrideMethod (c$, "getCtrlX2", 
20174 function () {
20175 return this.ctrlx2;
20176 });
20177 Clazz_overrideMethod (c$, "getCtrlY2", 
20178 function () {
20179 return this.ctrly2;
20180 });
20181 Clazz_overrideMethod (c$, "getCtrlP2", 
20182 function () {
20183 return  new java.awt.geom.Point2D.Double (this.ctrlx2, this.ctrly2);
20184 });
20185 Clazz_overrideMethod (c$, "getX2", 
20186 function () {
20187 return this.x2;
20188 });
20189 Clazz_overrideMethod (c$, "getY2", 
20190 function () {
20191 return this.y2;
20192 });
20193 Clazz_overrideMethod (c$, "getP2", 
20194 function () {
20195 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20196 });
20197 Clazz_defineMethod (c$, "setCurve", 
20198 function (a, b, c, d, e, f, g, h) {
20199 this.x1 = a;
20200 this.y1 = b;
20201 this.ctrlx1 = c;
20202 this.ctrly1 = d;
20203 this.ctrlx2 = e;
20204 this.ctrly2 = f;
20205 this.x2 = g;
20206 this.y2 = h;
20207 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20208 Clazz_overrideMethod (c$, "getBounds2D", 
20209 function () {
20210 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20211 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20212 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20213 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20214 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
20215 });
20216 c$ = Clazz_p0p ();
20217 Clazz_defineStatics (c$,
20218 "BELOW", -2,
20219 "LOWEDGE", -1,
20220 "INSIDE", 0,
20221 "HIGHEDGE", 1,
20222 "ABOVE", 2);
20223 });
20224 Clazz_declarePackage ("java.awt.geom");
20225 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.CubicIterator", ["java.util.NoSuchElementException"], function () {
20226 c$ = Clazz_decorateAsClass (function () {
20227 this.cubic = null;
20228 this.affine = null;
20229 this.index = 0;
20230 Clazz_instantialize (this, arguments);
20231 }, java.awt.geom, "CubicIterator", null, java.awt.geom.PathIterator);
20232 Clazz_makeConstructor (c$, 
20233 function () {
20234 });
20235 Clazz_makeConstructor (c$, 
20236 function (q, at) {
20237 this.set (q, at);
20238 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20239 Clazz_defineMethod (c$, "set", 
20240 function (q, at) {
20241 this.cubic = q;
20242 this.affine = at;
20243 return this;
20244 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20245 Clazz_overrideMethod (c$, "getWindingRule", 
20246 function () {
20247 return 1;
20248 });
20249 Clazz_overrideMethod (c$, "isDone", 
20250 function () {
20251 return (this.index > 1);
20252 });
20253 Clazz_overrideMethod (c$, "next", 
20254 function () {
20255 this.index++;
20256 });
20257 Clazz_defineMethod (c$, "currentSegment", 
20258 function (coords) {
20259 if (this.isDone ()) {
20260 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20261 }var type;
20262 if (this.index == 0) {
20263 coords[0] = this.cubic.getX1 ();
20264 coords[1] = this.cubic.getY1 ();
20265 type = 0;
20266 } else {
20267 coords[0] = this.cubic.getCtrlX1 ();
20268 coords[1] = this.cubic.getCtrlY1 ();
20269 coords[2] = this.cubic.getCtrlX2 ();
20270 coords[3] = this.cubic.getCtrlY2 ();
20271 coords[4] = this.cubic.getX2 ();
20272 coords[5] = this.cubic.getY2 ();
20273 type = 3;
20274 }if (this.affine != null) {
20275 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20276 }return type;
20277 }, "~A");
20278 Clazz_defineMethod (c$, "currentSegment", 
20279 function (coords) {
20280 if (this.isDone ()) {
20281 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20282 }var type;
20283 if (this.index == 0) {
20284 coords[0] = this.cubic.getX1 ();
20285 coords[1] = this.cubic.getY1 ();
20286 type = 0;
20287 } else {
20288 coords[0] = this.cubic.getCtrlX1 ();
20289 coords[1] = this.cubic.getCtrlY1 ();
20290 coords[2] = this.cubic.getCtrlX2 ();
20291 coords[3] = this.cubic.getCtrlY2 ();
20292 coords[4] = this.cubic.getX2 ();
20293 coords[5] = this.cubic.getY2 ();
20294 type = 3;
20295 }if (this.affine != null) {
20296 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20297 }return type;
20298 }, "~A");
20299 });
20300 Clazz_declarePackage ("java.awt.geom");
20301 Clazz_load (["java.awt.Shape"], "java.awt.geom.Line2D", ["java.lang.InternalError", "java.awt.geom.LineIterator", "$.Point2D", "$.Rectangle2D"], function () {
20302 c$ = Clazz_declareType (java.awt.geom, "Line2D", null, [java.awt.Shape, Cloneable]);
20303 Clazz_makeConstructor (c$, 
20304 function () {
20305 });
20306 Clazz_defineMethod (c$, "setLine", 
20307 function (p1, p2) {
20308 this.setLine (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
20309 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20310 Clazz_defineMethod (c$, "setLine", 
20311 function (l) {
20312 this.setLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
20313 }, "java.awt.geom.Line2D");
20314 c$.relativeCCW = Clazz_defineMethod (c$, "relativeCCW", 
20315 function (x1, y1, x2, y2, px, py) {
20316 x2 -= x1;
20317 y2 -= y1;
20318 px -= x1;
20319 py -= y1;
20320 var ccw = px * y2 - py * x2;
20321 if (ccw == 0.0) {
20322 ccw = px * x2 + py * y2;
20323 if (ccw > 0.0) {
20324 px -= x2;
20325 py -= y2;
20326 ccw = px * x2 + py * y2;
20327 if (ccw < 0.0) {
20328 ccw = 0.0;
20329 }}}return (ccw < 0.0) ? -1 : ((ccw > 0.0) ? 1 : 0);
20330 }, "~N,~N,~N,~N,~N,~N");
20331 Clazz_defineMethod (c$, "relativeCCW", 
20332 function (px, py) {
20333 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20334 }, "~N,~N");
20335 Clazz_defineMethod (c$, "relativeCCW", 
20336 function (p) {
20337 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), p.getX (), p.getY ());
20338 }, "java.awt.geom.Point2D");
20339 c$.linesIntersect = Clazz_defineMethod (c$, "linesIntersect", 
20340 function (x1, y1, x2, y2, x3, y3, x4, y4) {
20341 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));
20342 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20343 Clazz_defineMethod (c$, "intersectsLine", 
20344 function (x1, y1, x2, y2) {
20345 return java.awt.geom.Line2D.linesIntersect (x1, y1, x2, y2, this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20346 }, "~N,~N,~N,~N");
20347 Clazz_defineMethod (c$, "intersectsLine", 
20348 function (l) {
20349 return java.awt.geom.Line2D.linesIntersect (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 (), this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20350 }, "java.awt.geom.Line2D");
20351 c$.ptSegDistSq = Clazz_defineMethod (c$, "ptSegDistSq", 
20352 function (x1, y1, x2, y2, px, py) {
20353 x2 -= x1;
20354 y2 -= y1;
20355 px -= x1;
20356 py -= y1;
20357 var dotprod = px * x2 + py * y2;
20358 var projlenSq;
20359 if (dotprod <= 0.0) {
20360 projlenSq = 0.0;
20361 } else {
20362 px = x2 - px;
20363 py = y2 - py;
20364 dotprod = px * x2 + py * y2;
20365 if (dotprod <= 0.0) {
20366 projlenSq = 0.0;
20367 } else {
20368 projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20369 }}var lenSq = px * px + py * py - projlenSq;
20370 if (lenSq < 0) {
20371 lenSq = 0;
20372 }return lenSq;
20373 }, "~N,~N,~N,~N,~N,~N");
20374 c$.ptSegDist = Clazz_defineMethod (c$, "ptSegDist", 
20375 function (x1, y1, x2, y2, px, py) {
20376 return Math.sqrt (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, px, py));
20377 }, "~N,~N,~N,~N,~N,~N");
20378 Clazz_defineMethod (c$, "ptSegDistSq", 
20379 function (px, py) {
20380 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20381 }, "~N,~N");
20382 Clazz_defineMethod (c$, "ptSegDistSq", 
20383 function (pt) {
20384 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20385 }, "java.awt.geom.Point2D");
20386 Clazz_defineMethod (c$, "ptSegDist", 
20387 function (px, py) {
20388 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20389 }, "~N,~N");
20390 Clazz_defineMethod (c$, "ptSegDist", 
20391 function (pt) {
20392 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20393 }, "java.awt.geom.Point2D");
20394 c$.ptLineDistSq = Clazz_defineMethod (c$, "ptLineDistSq", 
20395 function (x1, y1, x2, y2, px, py) {
20396 x2 -= x1;
20397 y2 -= y1;
20398 px -= x1;
20399 py -= y1;
20400 var dotprod = px * x2 + py * y2;
20401 var projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20402 var lenSq = px * px + py * py - projlenSq;
20403 if (lenSq < 0) {
20404 lenSq = 0;
20405 }return lenSq;
20406 }, "~N,~N,~N,~N,~N,~N");
20407 c$.ptLineDist = Clazz_defineMethod (c$, "ptLineDist", 
20408 function (x1, y1, x2, y2, px, py) {
20409 return Math.sqrt (java.awt.geom.Line2D.ptLineDistSq (x1, y1, x2, y2, px, py));
20410 }, "~N,~N,~N,~N,~N,~N");
20411 Clazz_defineMethod (c$, "ptLineDistSq", 
20412 function (px, py) {
20413 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20414 }, "~N,~N");
20415 Clazz_defineMethod (c$, "ptLineDistSq", 
20416 function (pt) {
20417 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20418 }, "java.awt.geom.Point2D");
20419 Clazz_defineMethod (c$, "ptLineDist", 
20420 function (px, py) {
20421 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20422 }, "~N,~N");
20423 Clazz_defineMethod (c$, "ptLineDist", 
20424 function (pt) {
20425 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20426 }, "java.awt.geom.Point2D");
20427 Clazz_defineMethod (c$, "contains", 
20428 function (x, y) {
20429 return false;
20430 }, "~N,~N");
20431 Clazz_defineMethod (c$, "contains", 
20432 function (p) {
20433 return false;
20434 }, "java.awt.geom.Point2D");
20435 Clazz_defineMethod (c$, "intersects", 
20436 function (x, y, w, h) {
20437 return this.intersects ( new java.awt.geom.Rectangle2D.Double (x, y, w, h));
20438 }, "~N,~N,~N,~N");
20439 Clazz_defineMethod (c$, "intersects", 
20440 function (r) {
20441 return r.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20442 }, "java.awt.geom.Rectangle2D");
20443 Clazz_defineMethod (c$, "contains", 
20444 function (x, y, w, h) {
20445 return false;
20446 }, "~N,~N,~N,~N");
20447 Clazz_defineMethod (c$, "contains", 
20448 function (r) {
20449 return false;
20450 }, "java.awt.geom.Rectangle2D");
20451 Clazz_overrideMethod (c$, "getBounds", 
20452 function () {
20453 return this.getBounds2D ().getBounds ();
20454 });
20455 Clazz_defineMethod (c$, "getPathIterator", 
20456 function (at) {
20457 return  new java.awt.geom.LineIterator (this, at);
20458 }, "java.awt.geom.AffineTransform");
20459 Clazz_defineMethod (c$, "getPathIterator", 
20460 function (at, flatness) {
20461 return  new java.awt.geom.LineIterator (this, at);
20462 }, "java.awt.geom.AffineTransform,~N");
20463 Clazz_defineMethod (c$, "clone", 
20464 function () {
20465 try {
20466 return Clazz_superCall (this, java.awt.geom.Line2D, "clone", []);
20467 } catch (e) {
20468 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20469 throw  new InternalError ();
20470 } else {
20471 throw e;
20472 }
20473 }
20474 });
20475 Clazz_pu$h(self.c$);
20476 c$ = Clazz_decorateAsClass (function () {
20477 this.x1 = 0;
20478 this.y1 = 0;
20479 this.x2 = 0;
20480 this.y2 = 0;
20481 Clazz_instantialize (this, arguments);
20482 }, java.awt.geom.Line2D, "Float", java.awt.geom.Line2D);
20483 Clazz_makeConstructor (c$, 
20484 function () {
20485 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20486 });
20487 Clazz_makeConstructor (c$, 
20488 function (a, b, c, d) {
20489 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20490 this.setLine (a, b, c, d);
20491 }, "~N,~N,~N,~N");
20492 Clazz_makeConstructor (c$, 
20493 function (a, b) {
20494 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20495 this.setLine (a, b);
20496 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20497 Clazz_overrideMethod (c$, "getX1", 
20498 function () {
20499 return this.x1;
20500 });
20501 Clazz_overrideMethod (c$, "getY1", 
20502 function () {
20503 return this.y1;
20504 });
20505 Clazz_overrideMethod (c$, "getP1", 
20506 function () {
20507 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20508 });
20509 Clazz_overrideMethod (c$, "getX2", 
20510 function () {
20511 return this.x2;
20512 });
20513 Clazz_overrideMethod (c$, "getY2", 
20514 function () {
20515 return this.y2;
20516 });
20517 Clazz_overrideMethod (c$, "getP2", 
20518 function () {
20519 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20520 });
20521 Clazz_defineMethod (c$, "setLine", 
20522 function (a, b, c, d) {
20523 this.x1 = a;
20524 this.y1 = b;
20525 this.x2 = c;
20526 this.y2 = d;
20527 }, "~N,~N,~N,~N");
20528 Clazz_defineMethod (c$, "setLine", 
20529 function (a, b, c, d) {
20530 this.x1 = a;
20531 this.y1 = b;
20532 this.x2 = c;
20533 this.y2 = d;
20534 }, "~N,~N,~N,~N");
20535 Clazz_overrideMethod (c$, "getBounds2D", 
20536 function () {
20537 var a;
20538 var b;
20539 var c;
20540 var d;
20541 if (this.x1 < this.x2) {
20542 a = this.x1;
20543 c = this.x2 - this.x1;
20544 } else {
20545 a = this.x2;
20546 c = this.x1 - this.x2;
20547 }if (this.y1 < this.y2) {
20548 b = this.y1;
20549 d = this.y2 - this.y1;
20550 } else {
20551 b = this.y2;
20552 d = this.y1 - this.y2;
20553 }return  new java.awt.geom.Rectangle2D.Float (a, b, c, d);
20554 });
20555 c$ = Clazz_p0p ();
20556 Clazz_pu$h(self.c$);
20557 c$ = Clazz_decorateAsClass (function () {
20558 this.x1 = 0;
20559 this.y1 = 0;
20560 this.x2 = 0;
20561 this.y2 = 0;
20562 Clazz_instantialize (this, arguments);
20563 }, java.awt.geom.Line2D, "Double", java.awt.geom.Line2D);
20564 Clazz_makeConstructor (c$, 
20565 function () {
20566 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20567 });
20568 Clazz_makeConstructor (c$, 
20569 function (a, b, c, d) {
20570 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20571 this.setLine (a, b, c, d);
20572 }, "~N,~N,~N,~N");
20573 Clazz_makeConstructor (c$, 
20574 function (a, b) {
20575 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20576 this.setLine (a, b);
20577 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20578 Clazz_overrideMethod (c$, "getX1", 
20579 function () {
20580 return this.x1;
20581 });
20582 Clazz_overrideMethod (c$, "getY1", 
20583 function () {
20584 return this.y1;
20585 });
20586 Clazz_overrideMethod (c$, "getP1", 
20587 function () {
20588 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20589 });
20590 Clazz_overrideMethod (c$, "getX2", 
20591 function () {
20592 return this.x2;
20593 });
20594 Clazz_overrideMethod (c$, "getY2", 
20595 function () {
20596 return this.y2;
20597 });
20598 Clazz_overrideMethod (c$, "getP2", 
20599 function () {
20600 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20601 });
20602 Clazz_defineMethod (c$, "setLine", 
20603 function (a, b, c, d) {
20604 this.x1 = a;
20605 this.y1 = b;
20606 this.x2 = c;
20607 this.y2 = d;
20608 }, "~N,~N,~N,~N");
20609 Clazz_overrideMethod (c$, "getBounds2D", 
20610 function () {
20611 var a;
20612 var b;
20613 var c;
20614 var d;
20615 if (this.x1 < this.x2) {
20616 a = this.x1;
20617 c = this.x2 - this.x1;
20618 } else {
20619 a = this.x2;
20620 c = this.x1 - this.x2;
20621 }if (this.y1 < this.y2) {
20622 b = this.y1;
20623 d = this.y2 - this.y1;
20624 } else {
20625 b = this.y2;
20626 d = this.y1 - this.y2;
20627 }return  new java.awt.geom.Rectangle2D.Double (a, b, c, d);
20628 });
20629 c$ = Clazz_p0p ();
20630 });
20631 Clazz_declarePackage ("java.awt.geom");
20632 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.LineIterator", ["java.util.NoSuchElementException"], function () {
20633 c$ = Clazz_decorateAsClass (function () {
20634 this.line = null;
20635 this.affine = null;
20636 this.index = 0;
20637 Clazz_instantialize (this, arguments);
20638 }, java.awt.geom, "LineIterator", null, java.awt.geom.PathIterator);
20639 Clazz_makeConstructor (c$, 
20640 function (l, at) {
20641 this.line = l;
20642 this.affine = at;
20643 }, "java.awt.geom.Line2D,java.awt.geom.AffineTransform");
20644 Clazz_overrideMethod (c$, "getWindingRule", 
20645 function () {
20646 return 1;
20647 });
20648 Clazz_overrideMethod (c$, "isDone", 
20649 function () {
20650 return (this.index > 1);
20651 });
20652 Clazz_overrideMethod (c$, "next", 
20653 function () {
20654 this.index++;
20655 });
20656 Clazz_defineMethod (c$, "currentSegment", 
20657 function (coords) {
20658 if (this.isDone ()) {
20659 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20660 }var type;
20661 if (this.index == 0) {
20662 coords[0] = this.line.getX1 ();
20663 coords[1] = this.line.getY1 ();
20664 type = 0;
20665 } else {
20666 coords[0] = this.line.getX2 ();
20667 coords[1] = this.line.getY2 ();
20668 type = 1;
20669 }if (this.affine != null) {
20670 this.affine.transform (coords, 0, coords, 0, 1);
20671 }return type;
20672 }, "~A");
20673 Clazz_defineMethod (c$, "currentSegment", 
20674 function (coords) {
20675 if (this.isDone ()) {
20676 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20677 }var type;
20678 if (this.index == 0) {
20679 coords[0] = this.line.getX1 ();
20680 coords[1] = this.line.getY1 ();
20681 type = 0;
20682 } else {
20683 coords[0] = this.line.getX2 ();
20684 coords[1] = this.line.getY2 ();
20685 type = 1;
20686 }if (this.affine != null) {
20687 this.affine.transform (coords, 0, coords, 0, 1);
20688 }return type;
20689 }, "~A");
20690 });
20691 Clazz_declarePackage ("java.awt.geom");
20692 Clazz_load (["java.awt.Shape"], "java.awt.geom.QuadCurve2D", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadIterator", "$.Rectangle2D"], function () {
20693 c$ = Clazz_declareType (java.awt.geom, "QuadCurve2D", null, [java.awt.Shape, Cloneable]);
20694 Clazz_makeConstructor (c$, 
20695 function () {
20696 });
20697 Clazz_defineMethod (c$, "setCurve", 
20698 function (coords, offset) {
20699 this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5]);
20700 }, "~A,~N");
20701 Clazz_defineMethod (c$, "setCurve", 
20702 function (p1, cp, p2) {
20703 this.setCurve (p1.getX (), p1.getY (), cp.getX (), cp.getY (), p2.getX (), p2.getY ());
20704 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
20705 Clazz_defineMethod (c$, "setCurve", 
20706 function (pts, offset) {
20707 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 ());
20708 }, "~A,~N");
20709 Clazz_defineMethod (c$, "setCurve", 
20710 function (c) {
20711 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX (), c.getCtrlY (), c.getX2 (), c.getY2 ());
20712 }, "java.awt.geom.QuadCurve2D");
20713 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20714 function (x1, y1, ctrlx, ctrly, x2, y2) {
20715 return java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx, ctrly);
20716 }, "~N,~N,~N,~N,~N,~N");
20717 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20718 function (x1, y1, ctrlx, ctrly, x2, y2) {
20719 return java.awt.geom.Line2D.ptSegDist (x1, y1, x2, y2, ctrlx, ctrly);
20720 }, "~N,~N,~N,~N,~N,~N");
20721 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20722 function (coords, offset) {
20723 return java.awt.geom.Line2D.ptSegDistSq (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20724 }, "~A,~N");
20725 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20726 function (coords, offset) {
20727 return java.awt.geom.Line2D.ptSegDist (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20728 }, "~A,~N");
20729 Clazz_defineMethod (c$, "getFlatnessSq", 
20730 function () {
20731 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20732 });
20733 Clazz_defineMethod (c$, "getFlatness", 
20734 function () {
20735 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20736 });
20737 Clazz_defineMethod (c$, "subdivide", 
20738 function (left, right) {
20739 java.awt.geom.QuadCurve2D.subdivide (this, left, right);
20740 }, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20741 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20742 function (src, left, right) {
20743 var x1 = src.getX1 ();
20744 var y1 = src.getY1 ();
20745 var ctrlx = src.getCtrlX ();
20746 var ctrly = src.getCtrlY ();
20747 var x2 = src.getX2 ();
20748 var y2 = src.getY2 ();
20749 var ctrlx1 = (x1 + ctrlx) / 2.0;
20750 var ctrly1 = (y1 + ctrly) / 2.0;
20751 var ctrlx2 = (x2 + ctrlx) / 2.0;
20752 var ctrly2 = (y2 + ctrly) / 2.0;
20753 ctrlx = (ctrlx1 + ctrlx2) / 2.0;
20754 ctrly = (ctrly1 + ctrly2) / 2.0;
20755 if (left != null) {
20756 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx, ctrly);
20757 }if (right != null) {
20758 right.setCurve (ctrlx, ctrly, ctrlx2, ctrly2, x2, y2);
20759 }}, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20760 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20761 function (src, srcoff, left, leftoff, right, rightoff) {
20762 var x1 = src[srcoff + 0];
20763 var y1 = src[srcoff + 1];
20764 var ctrlx = src[srcoff + 2];
20765 var ctrly = src[srcoff + 3];
20766 var x2 = src[srcoff + 4];
20767 var y2 = src[srcoff + 5];
20768 if (left != null) {
20769 left[leftoff + 0] = x1;
20770 left[leftoff + 1] = y1;
20771 }if (right != null) {
20772 right[rightoff + 4] = x2;
20773 right[rightoff + 5] = y2;
20774 }x1 = (x1 + ctrlx) / 2.0;
20775 y1 = (y1 + ctrly) / 2.0;
20776 x2 = (x2 + ctrlx) / 2.0;
20777 y2 = (y2 + ctrly) / 2.0;
20778 ctrlx = (x1 + x2) / 2.0;
20779 ctrly = (y1 + y2) / 2.0;
20780 if (left != null) {
20781 left[leftoff + 2] = x1;
20782 left[leftoff + 3] = y1;
20783 left[leftoff + 4] = ctrlx;
20784 left[leftoff + 5] = ctrly;
20785 }if (right != null) {
20786 right[rightoff + 0] = ctrlx;
20787 right[rightoff + 1] = ctrly;
20788 right[rightoff + 2] = x2;
20789 right[rightoff + 3] = y2;
20790 }}, "~A,~N,~A,~N,~A,~N");
20791 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20792 function (eqn) {
20793 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, eqn);
20794 }, "~A");
20795 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20796 function (eqn, res) {
20797 var a = eqn[2];
20798 var b = eqn[1];
20799 var c = eqn[0];
20800 var roots = 0;
20801 if (a == 0.0) {
20802 if (b == 0.0) {
20803 return -1;
20804 }res[roots++] = -c / b;
20805 } else {
20806 var d = b * b - 4.0 * a * c;
20807 if (d < 0.0) {
20808 return 0;
20809 }d = Math.sqrt (d);
20810 if (b < 0.0) {
20811 d = -d;
20812 }var q = (b + d) / -2.0;
20813 res[roots++] = q / a;
20814 if (q != 0.0) {
20815 res[roots++] = c / q;
20816 }}return roots;
20817 }, "~A,~A");
20818 Clazz_defineMethod (c$, "contains", 
20819 function (x, y) {
20820 var x1 = this.getX1 ();
20821 var y1 = this.getY1 ();
20822 var xc = this.getCtrlX ();
20823 var yc = this.getCtrlY ();
20824 var x2 = this.getX2 ();
20825 var y2 = this.getY2 ();
20826 var kx = x1 - 2 * xc + x2;
20827 var ky = y1 - 2 * yc + y2;
20828 var dx = x - x1;
20829 var dy = y - y1;
20830 var dxl = x2 - x1;
20831 var dyl = y2 - y1;
20832 var t0 = (dx * ky - dy * kx) / (dxl * ky - dyl * kx);
20833 if (t0 < 0 || t0 > 1 || t0 != t0) {
20834 return false;
20835 }var xb = kx * t0 * t0 + 2 * (xc - x1) * t0 + x1;
20836 var yb = ky * t0 * t0 + 2 * (yc - y1) * t0 + y1;
20837 var xl = dxl * t0 + x1;
20838 var yl = dyl * t0 + y1;
20839 return (x >= xb && x < xl) || (x >= xl && x < xb) || (y >= yb && y < yl) || (y >= yl && y < yb);
20840 }, "~N,~N");
20841 Clazz_defineMethod (c$, "contains", 
20842 function (p) {
20843 return this.contains (p.getX (), p.getY ());
20844 }, "java.awt.geom.Point2D");
20845 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
20846  function (eqn, val, c1, cp, c2) {
20847 eqn[0] = c1 - val;
20848 eqn[1] = cp + cp - c1 - c1;
20849 eqn[2] = c1 - cp - cp + c2;
20850 return;
20851 }, "~A,~N,~N,~N,~N");
20852 c$.evalQuadratic = Clazz_defineMethod (c$, "evalQuadratic", 
20853  function (vals, num, include0, include1, inflect, c1, ctrl, c2) {
20854 var j = 0;
20855 for (var i = 0; i < num; i++) {
20856 var t = vals[i];
20857 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + 2 * inflect[2] * t != 0)) {
20858 var u = 1 - t;
20859 vals[j++] = c1 * u * u + 2 * ctrl * t * u + c2 * t * t;
20860 }}
20861 return j;
20862 }, "~A,~N,~B,~B,~A,~N,~N,~N");
20863 c$.getTag = Clazz_defineMethod (c$, "getTag", 
20864  function (coord, low, high) {
20865 if (coord <= low) {
20866 return (coord < low ? -2 : -1);
20867 }if (coord >= high) {
20868 return (coord > high ? 2 : 1);
20869 }return 0;
20870 }, "~N,~N,~N");
20871 c$.inwards = Clazz_defineMethod (c$, "inwards", 
20872  function (pttag, opt1tag, opt2tag) {
20873 switch (pttag) {
20874 case -2:
20875 case 2:
20876 default:
20877 return false;
20878 case -1:
20879 return (opt1tag >= 0 || opt2tag >= 0);
20880 case 0:
20881 return true;
20882 case 1:
20883 return (opt1tag <= 0 || opt2tag <= 0);
20884 }
20885 }, "~N,~N,~N");
20886 Clazz_defineMethod (c$, "intersects", 
20887 function (x, y, w, h) {
20888 if (w <= 0 || h <= 0) {
20889 return false;
20890 }var x1 = this.getX1 ();
20891 var y1 = this.getY1 ();
20892 var x1tag = java.awt.geom.QuadCurve2D.getTag (x1, x, x + w);
20893 var y1tag = java.awt.geom.QuadCurve2D.getTag (y1, y, y + h);
20894 if (x1tag == 0 && y1tag == 0) {
20895 return true;
20896 }var x2 = this.getX2 ();
20897 var y2 = this.getY2 ();
20898 var x2tag = java.awt.geom.QuadCurve2D.getTag (x2, x, x + w);
20899 var y2tag = java.awt.geom.QuadCurve2D.getTag (y2, y, y + h);
20900 if (x2tag == 0 && y2tag == 0) {
20901 return true;
20902 }var ctrlx = this.getCtrlX ();
20903 var ctrly = this.getCtrlY ();
20904 var ctrlxtag = java.awt.geom.QuadCurve2D.getTag (ctrlx, x, x + w);
20905 var ctrlytag = java.awt.geom.QuadCurve2D.getTag (ctrly, y, y + h);
20906 if (x1tag < 0 && x2tag < 0 && ctrlxtag < 0) {
20907 return false;
20908 }if (y1tag < 0 && y2tag < 0 && ctrlytag < 0) {
20909 return false;
20910 }if (x1tag > 0 && x2tag > 0 && ctrlxtag > 0) {
20911 return false;
20912 }if (y1tag > 0 && y2tag > 0 && ctrlytag > 0) {
20913 return false;
20914 }if (java.awt.geom.QuadCurve2D.inwards (x1tag, x2tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y1tag, y2tag, ctrlytag)) {
20915 return true;
20916 }if (java.awt.geom.QuadCurve2D.inwards (x2tag, x1tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y2tag, y1tag, ctrlytag)) {
20917 return true;
20918 }var xoverlap = (x1tag * x2tag <= 0);
20919 var yoverlap = (y1tag * y2tag <= 0);
20920 if (x1tag == 0 && x2tag == 0 && yoverlap) {
20921 return true;
20922 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
20923 return true;
20924 }var eqn =  Clazz_newDoubleArray (3, 0);
20925 var res =  Clazz_newDoubleArray (3, 0);
20926 if (!yoverlap) {
20927 java.awt.geom.QuadCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly, y2);
20928 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);
20929 }if (!xoverlap) {
20930 java.awt.geom.QuadCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx, x2);
20931 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);
20932 }var dx = x2 - x1;
20933 var dy = y2 - y1;
20934 var k = y2 * x1 - x2 * y1;
20935 var c1tag;
20936 var c2tag;
20937 if (y1tag == 0) {
20938 c1tag = x1tag;
20939 } else {
20940 c1tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
20941 }if (y2tag == 0) {
20942 c2tag = x2tag;
20943 } else {
20944 c2tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
20945 }if (c1tag * c2tag <= 0) {
20946 return true;
20947 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
20948 java.awt.geom.QuadCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx, x2);
20949 var num = java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
20950 java.awt.geom.QuadCurve2D.evalQuadratic (res, num, true, true, null, y1, ctrly, y2);
20951 c2tag = java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h);
20952 return (c1tag * c2tag <= 0);
20953 }, "~N,~N,~N,~N");
20954 Clazz_defineMethod (c$, "intersects", 
20955 function (r) {
20956 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20957 }, "java.awt.geom.Rectangle2D");
20958 Clazz_defineMethod (c$, "contains", 
20959 function (x, y, w, h) {
20960 if (w <= 0 || h <= 0) {
20961 return false;
20962 }return (this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h));
20963 }, "~N,~N,~N,~N");
20964 Clazz_defineMethod (c$, "contains", 
20965 function (r) {
20966 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20967 }, "java.awt.geom.Rectangle2D");
20968 Clazz_overrideMethod (c$, "getBounds", 
20969 function () {
20970 return this.getBounds2D ().getBounds ();
20971 });
20972 Clazz_defineMethod (c$, "getPathIterator", 
20973 function (at) {
20974 return  new java.awt.geom.QuadIterator (this, at);
20975 }, "java.awt.geom.AffineTransform");
20976 Clazz_defineMethod (c$, "getPathIterator", 
20977 function (at, flatness) {
20978 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
20979 }, "java.awt.geom.AffineTransform,~N");
20980 Clazz_defineMethod (c$, "clone", 
20981 function () {
20982 try {
20983 return Clazz_superCall (this, java.awt.geom.QuadCurve2D, "clone", []);
20984 } catch (e) {
20985 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20986 throw  new InternalError ();
20987 } else {
20988 throw e;
20989 }
20990 }
20991 });
20992 Clazz_pu$h(self.c$);
20993 c$ = Clazz_decorateAsClass (function () {
20994 this.x1 = 0;
20995 this.y1 = 0;
20996 this.ctrlx = 0;
20997 this.ctrly = 0;
20998 this.x2 = 0;
20999 this.y2 = 0;
21000 Clazz_instantialize (this, arguments);
21001 }, java.awt.geom.QuadCurve2D, "Float", java.awt.geom.QuadCurve2D);
21002 Clazz_makeConstructor (c$, 
21003 function () {
21004 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21005 });
21006 Clazz_makeConstructor (c$, 
21007 function (a, b, c, d, e, f) {
21008 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21009 this.setCurve (a, b, c, d, e, f);
21010 }, "~N,~N,~N,~N,~N,~N");
21011 Clazz_overrideMethod (c$, "getX1", 
21012 function () {
21013 return this.x1;
21014 });
21015 Clazz_overrideMethod (c$, "getY1", 
21016 function () {
21017 return this.y1;
21018 });
21019 Clazz_overrideMethod (c$, "getP1", 
21020 function () {
21021 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
21022 });
21023 Clazz_overrideMethod (c$, "getCtrlX", 
21024 function () {
21025 return this.ctrlx;
21026 });
21027 Clazz_overrideMethod (c$, "getCtrlY", 
21028 function () {
21029 return this.ctrly;
21030 });
21031 Clazz_overrideMethod (c$, "getCtrlPt", 
21032 function () {
21033 return  new java.awt.geom.Point2D.Float (this.ctrlx, this.ctrly);
21034 });
21035 Clazz_overrideMethod (c$, "getX2", 
21036 function () {
21037 return this.x2;
21038 });
21039 Clazz_overrideMethod (c$, "getY2", 
21040 function () {
21041 return this.y2;
21042 });
21043 Clazz_overrideMethod (c$, "getP2", 
21044 function () {
21045 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
21046 });
21047 Clazz_defineMethod (c$, "setCurve", 
21048 function (a, b, c, d, e, f) {
21049 this.x1 = a;
21050 this.y1 = b;
21051 this.ctrlx = c;
21052 this.ctrly = d;
21053 this.x2 = e;
21054 this.y2 = f;
21055 }, "~N,~N,~N,~N,~N,~N");
21056 Clazz_defineMethod (c$, "setCurve", 
21057 function (a, b, c, d, e, f) {
21058 this.x1 = a;
21059 this.y1 = b;
21060 this.ctrlx = c;
21061 this.ctrly = d;
21062 this.x2 = e;
21063 this.y2 = f;
21064 }, "~N,~N,~N,~N,~N,~N");
21065 Clazz_overrideMethod (c$, "getBounds2D", 
21066 function () {
21067 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21068 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21069 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21070 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21071 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
21072 });
21073 c$ = Clazz_p0p ();
21074 Clazz_pu$h(self.c$);
21075 c$ = Clazz_decorateAsClass (function () {
21076 this.x1 = 0;
21077 this.y1 = 0;
21078 this.ctrlx = 0;
21079 this.ctrly = 0;
21080 this.x2 = 0;
21081 this.y2 = 0;
21082 Clazz_instantialize (this, arguments);
21083 }, java.awt.geom.QuadCurve2D, "Double", java.awt.geom.QuadCurve2D);
21084 Clazz_makeConstructor (c$, 
21085 function () {
21086 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21087 });
21088 Clazz_makeConstructor (c$, 
21089 function (a, b, c, d, e, f) {
21090 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21091 this.setCurve (a, b, c, d, e, f);
21092 }, "~N,~N,~N,~N,~N,~N");
21093 Clazz_overrideMethod (c$, "getX1", 
21094 function () {
21095 return this.x1;
21096 });
21097 Clazz_overrideMethod (c$, "getY1", 
21098 function () {
21099 return this.y1;
21100 });
21101 Clazz_overrideMethod (c$, "getP1", 
21102 function () {
21103 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
21104 });
21105 Clazz_overrideMethod (c$, "getCtrlX", 
21106 function () {
21107 return this.ctrlx;
21108 });
21109 Clazz_overrideMethod (c$, "getCtrlY", 
21110 function () {
21111 return this.ctrly;
21112 });
21113 Clazz_overrideMethod (c$, "getCtrlPt", 
21114 function () {
21115 return  new java.awt.geom.Point2D.Double (this.ctrlx, this.ctrly);
21116 });
21117 Clazz_overrideMethod (c$, "getX2", 
21118 function () {
21119 return this.x2;
21120 });
21121 Clazz_overrideMethod (c$, "getY2", 
21122 function () {
21123 return this.y2;
21124 });
21125 Clazz_overrideMethod (c$, "getP2", 
21126 function () {
21127 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
21128 });
21129 Clazz_defineMethod (c$, "setCurve", 
21130 function (a, b, c, d, e, f) {
21131 this.x1 = a;
21132 this.y1 = b;
21133 this.ctrlx = c;
21134 this.ctrly = d;
21135 this.x2 = e;
21136 this.y2 = f;
21137 }, "~N,~N,~N,~N,~N,~N");
21138 Clazz_overrideMethod (c$, "getBounds2D", 
21139 function () {
21140 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21141 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21142 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21143 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21144 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
21145 });
21146 c$ = Clazz_p0p ();
21147 Clazz_defineStatics (c$,
21148 "BELOW", -2,
21149 "LOWEDGE", -1,
21150 "INSIDE", 0,
21151 "HIGHEDGE", 1,
21152 "ABOVE", 2);
21153 });
21154 Clazz_declarePackage ("java.awt.geom");
21155 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.QuadIterator", ["java.util.NoSuchElementException"], function () {
21156 c$ = Clazz_decorateAsClass (function () {
21157 this.quad = null;
21158 this.affine = null;
21159 this.index = 0;
21160 Clazz_instantialize (this, arguments);
21161 }, java.awt.geom, "QuadIterator", null, java.awt.geom.PathIterator);
21162 Clazz_makeConstructor (c$, 
21163 function (q, at) {
21164 this.quad = q;
21165 this.affine = at;
21166 }, "java.awt.geom.QuadCurve2D,java.awt.geom.AffineTransform");
21167 Clazz_overrideMethod (c$, "getWindingRule", 
21168 function () {
21169 return 1;
21170 });
21171 Clazz_overrideMethod (c$, "isDone", 
21172 function () {
21173 return (this.index > 1);
21174 });
21175 Clazz_overrideMethod (c$, "next", 
21176 function () {
21177 this.index++;
21178 });
21179 Clazz_defineMethod (c$, "currentSegment", 
21180 function (coords) {
21181 if (this.isDone ()) {
21182 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21183 }var type;
21184 if (this.index == 0) {
21185 coords[0] = this.quad.getX1 ();
21186 coords[1] = this.quad.getY1 ();
21187 type = 0;
21188 } else {
21189 coords[0] = this.quad.getCtrlX ();
21190 coords[1] = this.quad.getCtrlY ();
21191 coords[2] = this.quad.getX2 ();
21192 coords[3] = this.quad.getY2 ();
21193 type = 2;
21194 }if (this.affine != null) {
21195 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21196 }return type;
21197 }, "~A");
21198 Clazz_defineMethod (c$, "currentSegment", 
21199 function (coords) {
21200 if (this.isDone ()) {
21201 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21202 }var type;
21203 if (this.index == 0) {
21204 coords[0] = this.quad.getX1 ();
21205 coords[1] = this.quad.getY1 ();
21206 type = 0;
21207 } else {
21208 coords[0] = this.quad.getCtrlX ();
21209 coords[1] = this.quad.getCtrlY ();
21210 coords[2] = this.quad.getX2 ();
21211 coords[3] = this.quad.getY2 ();
21212 type = 2;
21213 }if (this.affine != null) {
21214 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21215 }return type;
21216 }, "~A");
21217 });
21218 Clazz_declarePackage ("jssun.awt.geom");
21219 Clazz_load (null, "jssun.awt.geom.Curve", ["java.lang.Double", "$.InternalError", "java.awt.geom.IllegalPathStateException"], function () {
21220 c$ = Clazz_decorateAsClass (function () {
21221 this.direction = 0;
21222 Clazz_instantialize (this, arguments);
21223 }, jssun.awt.geom, "Curve");
21224 c$.insertMove = Clazz_defineMethod (c$, "insertMove", 
21225 function (curves, x, y) {
21226 curves.add ( new jssun.awt.geom.Order0 (x, y));
21227 }, "java.util.Vector,~N,~N");
21228 c$.insertLine = Clazz_defineMethod (c$, "insertLine", 
21229 function (curves, x0, y0, x1, y1) {
21230 if (y0 < y1) {
21231 curves.add ( new jssun.awt.geom.Order1 (x0, y0, x1, y1, 1));
21232 } else if (y0 > y1) {
21233 curves.add ( new jssun.awt.geom.Order1 (x1, y1, x0, y0, -1));
21234 } else {
21235 }}, "java.util.Vector,~N,~N,~N,~N");
21236 c$.insertQuad = Clazz_defineMethod (c$, "insertQuad", 
21237 function (curves, x0, y0, coords) {
21238 var y1 = coords[3];
21239 if (y0 > y1) {
21240 jssun.awt.geom.Order2.insert (curves, coords, coords[2], y1, coords[0], coords[1], x0, y0, -1);
21241 } else if (y0 == y1 && y0 == coords[1]) {
21242 return;
21243 } else {
21244 jssun.awt.geom.Order2.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], y1, 1);
21245 }}, "java.util.Vector,~N,~N,~A");
21246 c$.insertCubic = Clazz_defineMethod (c$, "insertCubic", 
21247 function (curves, x0, y0, coords) {
21248 var y1 = coords[5];
21249 if (y0 > y1) {
21250 jssun.awt.geom.Order3.insert (curves, coords, coords[4], y1, coords[2], coords[3], coords[0], coords[1], x0, y0, -1);
21251 } else if (y0 == y1 && y0 == coords[1] && y0 == coords[3]) {
21252 return;
21253 } else {
21254 jssun.awt.geom.Order3.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], coords[3], coords[4], y1, 1);
21255 }}, "java.util.Vector,~N,~N,~A");
21256 c$.pointCrossingsForPath = Clazz_defineMethod (c$, "pointCrossingsForPath", 
21257 function (pi, px, py) {
21258 if (pi.isDone ()) {
21259 return 0;
21260 }var coords =  Clazz_newDoubleArray (6, 0);
21261 if (pi.currentSegment (coords) != 0) {
21262 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21263 }pi.next ();
21264 var movx = coords[0];
21265 var movy = coords[1];
21266 var curx = movx;
21267 var cury = movy;
21268 var endx;
21269 var endy;
21270 var crossings = 0;
21271 while (!pi.isDone ()) {
21272 switch (pi.currentSegment (coords)) {
21273 case 0:
21274 if (cury != movy) {
21275 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21276 }movx = curx = coords[0];
21277 movy = cury = coords[1];
21278 break;
21279 case 1:
21280 endx = coords[0];
21281 endy = coords[1];
21282 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, endx, endy);
21283 curx = endx;
21284 cury = endy;
21285 break;
21286 case 2:
21287 endx = coords[2];
21288 endy = coords[3];
21289 crossings += jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, curx, cury, coords[0], coords[1], endx, endy, 0);
21290 curx = endx;
21291 cury = endy;
21292 break;
21293 case 3:
21294 endx = coords[4];
21295 endy = coords[5];
21296 crossings += jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21297 curx = endx;
21298 cury = endy;
21299 break;
21300 case 4:
21301 if (cury != movy) {
21302 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21303 }curx = movx;
21304 cury = movy;
21305 break;
21306 }
21307 pi.next ();
21308 }
21309 if (cury != movy) {
21310 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21311 }return crossings;
21312 }, "java.awt.geom.PathIterator,~N,~N");
21313 c$.pointCrossingsForLine = Clazz_defineMethod (c$, "pointCrossingsForLine", 
21314 function (px, py, x0, y0, x1, y1) {
21315 if (py < y0 && py < y1) return 0;
21316 if (py >= y0 && py >= y1) return 0;
21317 if (px >= x0 && px >= x1) return 0;
21318 if (px < x0 && px < x1) return (y0 < y1) ? 1 : -1;
21319 var xintercept = x0 + (py - y0) * (x1 - x0) / (y1 - y0);
21320 if (px >= xintercept) return 0;
21321 return (y0 < y1) ? 1 : -1;
21322 }, "~N,~N,~N,~N,~N,~N");
21323 c$.pointCrossingsForQuad = Clazz_defineMethod (c$, "pointCrossingsForQuad", 
21324 function (px, py, x0, y0, xc, yc, x1, y1, level) {
21325 if (py < y0 && py < yc && py < y1) return 0;
21326 if (py >= y0 && py >= yc && py >= y1) return 0;
21327 if (px >= x0 && px >= xc && px >= x1) return 0;
21328 if (px < x0 && px < xc && px < x1) {
21329 if (py >= y0) {
21330 if (py < y1) return 1;
21331 } else {
21332 if (py >= y1) return -1;
21333 }return 0;
21334 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21335 var x0c = (x0 + xc) / 2;
21336 var y0c = (y0 + yc) / 2;
21337 var xc1 = (xc + x1) / 2;
21338 var yc1 = (yc + y1) / 2;
21339 xc = (x0c + xc1) / 2;
21340 yc = (y0c + yc1) / 2;
21341 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21342 return 0;
21343 }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));
21344 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21345 c$.pointCrossingsForCubic = Clazz_defineMethod (c$, "pointCrossingsForCubic", 
21346 function (px, py, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21347 if (py < y0 && py < yc0 && py < yc1 && py < y1) return 0;
21348 if (py >= y0 && py >= yc0 && py >= yc1 && py >= y1) return 0;
21349 if (px >= x0 && px >= xc0 && px >= xc1 && px >= x1) return 0;
21350 if (px < x0 && px < xc0 && px < xc1 && px < x1) {
21351 if (py >= y0) {
21352 if (py < y1) return 1;
21353 } else {
21354 if (py >= y1) return -1;
21355 }return 0;
21356 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21357 var xmid = (xc0 + xc1) / 2;
21358 var ymid = (yc0 + yc1) / 2;
21359 xc0 = (x0 + xc0) / 2;
21360 yc0 = (y0 + yc0) / 2;
21361 xc1 = (xc1 + x1) / 2;
21362 yc1 = (yc1 + y1) / 2;
21363 var xc0m = (xc0 + xmid) / 2;
21364 var yc0m = (yc0 + ymid) / 2;
21365 var xmc1 = (xmid + xc1) / 2;
21366 var ymc1 = (ymid + yc1) / 2;
21367 xmid = (xc0m + xmc1) / 2;
21368 ymid = (yc0m + ymc1) / 2;
21369 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21370 return 0;
21371 }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));
21372 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21373 c$.rectCrossingsForPath = Clazz_defineMethod (c$, "rectCrossingsForPath", 
21374 function (pi, rxmin, rymin, rxmax, rymax) {
21375 if (rxmax <= rxmin || rymax <= rymin) {
21376 return 0;
21377 }if (pi.isDone ()) {
21378 return 0;
21379 }var coords =  Clazz_newDoubleArray (6, 0);
21380 if (pi.currentSegment (coords) != 0) {
21381 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21382 }pi.next ();
21383 var curx;
21384 var cury;
21385 var movx;
21386 var movy;
21387 var endx;
21388 var endy;
21389 curx = movx = coords[0];
21390 cury = movy = coords[1];
21391 var crossings = 0;
21392 while (crossings != -2147483648 && !pi.isDone ()) {
21393 switch (pi.currentSegment (coords)) {
21394 case 0:
21395 if (curx != movx || cury != movy) {
21396 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21397 }movx = curx = coords[0];
21398 movy = cury = coords[1];
21399 break;
21400 case 1:
21401 endx = coords[0];
21402 endy = coords[1];
21403 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, endx, endy);
21404 curx = endx;
21405 cury = endy;
21406 break;
21407 case 2:
21408 endx = coords[2];
21409 endy = coords[3];
21410 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], endx, endy, 0);
21411 curx = endx;
21412 cury = endy;
21413 break;
21414 case 3:
21415 endx = coords[4];
21416 endy = coords[5];
21417 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21418 curx = endx;
21419 cury = endy;
21420 break;
21421 case 4:
21422 if (curx != movx || cury != movy) {
21423 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21424 }curx = movx;
21425 cury = movy;
21426 break;
21427 }
21428 pi.next ();
21429 }
21430 if (crossings != -2147483648 && (curx != movx || cury != movy)) {
21431 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21432 }return crossings;
21433 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
21434 c$.rectCrossingsForLine = Clazz_defineMethod (c$, "rectCrossingsForLine", 
21435 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1) {
21436 if (y0 >= rymax && y1 >= rymax) return crossings;
21437 if (y0 <= rymin && y1 <= rymin) return crossings;
21438 if (x0 <= rxmin && x1 <= rxmin) return crossings;
21439 if (x0 >= rxmax && x1 >= rxmax) {
21440 if (y0 < y1) {
21441 if (y0 <= rymin) crossings++;
21442 if (y1 >= rymax) crossings++;
21443 } else if (y1 < y0) {
21444 if (y1 <= rymin) crossings--;
21445 if (y0 >= rymax) crossings--;
21446 }return crossings;
21447 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21448 return -2147483648;
21449 }var xi0 = x0;
21450 if (y0 < rymin) {
21451 xi0 += ((rymin - y0) * (x1 - x0) / (y1 - y0));
21452 } else if (y0 > rymax) {
21453 xi0 += ((rymax - y0) * (x1 - x0) / (y1 - y0));
21454 }var xi1 = x1;
21455 if (y1 < rymin) {
21456 xi1 += ((rymin - y1) * (x0 - x1) / (y0 - y1));
21457 } else if (y1 > rymax) {
21458 xi1 += ((rymax - y1) * (x0 - x1) / (y0 - y1));
21459 }if (xi0 <= rxmin && xi1 <= rxmin) return crossings;
21460 if (xi0 >= rxmax && xi1 >= rxmax) {
21461 if (y0 < y1) {
21462 if (y0 <= rymin) crossings++;
21463 if (y1 >= rymax) crossings++;
21464 } else if (y1 < y0) {
21465 if (y1 <= rymin) crossings--;
21466 if (y0 >= rymax) crossings--;
21467 }return crossings;
21468 }return -2147483648;
21469 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21470 c$.rectCrossingsForQuad = Clazz_defineMethod (c$, "rectCrossingsForQuad", 
21471 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc, yc, x1, y1, level) {
21472 if (y0 >= rymax && yc >= rymax && y1 >= rymax) return crossings;
21473 if (y0 <= rymin && yc <= rymin && y1 <= rymin) return crossings;
21474 if (x0 <= rxmin && xc <= rxmin && x1 <= rxmin) return crossings;
21475 if (x0 >= rxmax && xc >= rxmax && x1 >= rxmax) {
21476 if (y0 < y1) {
21477 if (y0 <= rymin && y1 > rymin) crossings++;
21478 if (y0 < rymax && y1 >= rymax) crossings++;
21479 } else if (y1 < y0) {
21480 if (y1 <= rymin && y0 > rymin) crossings--;
21481 if (y1 < rymax && y0 >= rymax) crossings--;
21482 }return crossings;
21483 }if ((x0 < rxmax && x0 > rxmin && y0 < rymax && y0 > rymin) || (x1 < rxmax && x1 > rxmin && y1 < rymax && y1 > rymin)) {
21484 return -2147483648;
21485 }if (level > 52) {
21486 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21487 }var x0c = (x0 + xc) / 2;
21488 var y0c = (y0 + yc) / 2;
21489 var xc1 = (xc + x1) / 2;
21490 var yc1 = (yc + y1) / 2;
21491 xc = (x0c + xc1) / 2;
21492 yc = (y0c + yc1) / 2;
21493 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21494 return 0;
21495 }crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x0c, y0c, xc, yc, level + 1);
21496 if (crossings != -2147483648) {
21497 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, xc, yc, xc1, yc1, x1, y1, level + 1);
21498 }return crossings;
21499 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21500 c$.rectCrossingsForCubic = Clazz_defineMethod (c$, "rectCrossingsForCubic", 
21501 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21502 if (y0 >= rymax && yc0 >= rymax && yc1 >= rymax && y1 >= rymax) {
21503 return crossings;
21504 }if (y0 <= rymin && yc0 <= rymin && yc1 <= rymin && y1 <= rymin) {
21505 return crossings;
21506 }if (x0 <= rxmin && xc0 <= rxmin && xc1 <= rxmin && x1 <= rxmin) {
21507 return crossings;
21508 }if (x0 >= rxmax && xc0 >= rxmax && xc1 >= rxmax && x1 >= rxmax) {
21509 if (y0 < y1) {
21510 if (y0 <= rymin && y1 > rymin) crossings++;
21511 if (y0 < rymax && y1 >= rymax) crossings++;
21512 } else if (y1 < y0) {
21513 if (y1 <= rymin && y0 > rymin) crossings--;
21514 if (y1 < rymax && y0 >= rymax) crossings--;
21515 }return crossings;
21516 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21517 return -2147483648;
21518 }if (level > 52) {
21519 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21520 }var xmid = (xc0 + xc1) / 2;
21521 var ymid = (yc0 + yc1) / 2;
21522 xc0 = (x0 + xc0) / 2;
21523 yc0 = (y0 + yc0) / 2;
21524 xc1 = (xc1 + x1) / 2;
21525 yc1 = (yc1 + y1) / 2;
21526 var xc0m = (xc0 + xmid) / 2;
21527 var yc0m = (yc0 + ymid) / 2;
21528 var xmc1 = (xmid + xc1) / 2;
21529 var ymc1 = (ymid + yc1) / 2;
21530 xmid = (xc0m + xmc1) / 2;
21531 ymid = (yc0m + ymc1) / 2;
21532 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21533 return 0;
21534 }crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1);
21535 if (crossings != -2147483648) {
21536 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1);
21537 }return crossings;
21538 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21539 Clazz_makeConstructor (c$, 
21540 function (direction) {
21541 this.direction = direction;
21542 }, "~N");
21543 Clazz_defineMethod (c$, "getDirection", 
21544 function () {
21545 return this.direction;
21546 });
21547 Clazz_defineMethod (c$, "getWithDirection", 
21548 function (direction) {
21549 return (this.direction == direction ? this : this.getReversedCurve ());
21550 }, "~N");
21551 c$.round = Clazz_defineMethod (c$, "round", 
21552 function (v) {
21553 return v;
21554 }, "~N");
21555 c$.orderof = Clazz_defineMethod (c$, "orderof", 
21556 function (x1, x2) {
21557 if (x1 < x2) {
21558 return -1;
21559 }if (x1 > x2) {
21560 return 1;
21561 }return 0;
21562 }, "~N,~N");
21563 c$.signeddiffbits = Clazz_defineMethod (c$, "signeddiffbits", 
21564 function (y1, y2) {
21565 return (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21566 }, "~N,~N");
21567 c$.diffbits = Clazz_defineMethod (c$, "diffbits", 
21568 function (y1, y2) {
21569 return Math.abs (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21570 }, "~N,~N");
21571 c$.prev = Clazz_defineMethod (c$, "prev", 
21572 function (v) {
21573 return Double.longBitsToDouble (Double.doubleToLongBits (v) - 1);
21574 }, "~N");
21575 c$.next = Clazz_defineMethod (c$, "next", 
21576 function (v) {
21577 return Double.longBitsToDouble (Double.doubleToLongBits (v) + 1);
21578 }, "~N");
21579 Clazz_overrideMethod (c$, "toString", 
21580 function () {
21581 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") + "]");
21582 });
21583 Clazz_defineMethod (c$, "controlPointString", 
21584 function () {
21585 return "";
21586 });
21587 Clazz_defineMethod (c$, "crossingsFor", 
21588 function (x, y) {
21589 if (y >= this.getYTop () && y < this.getYBot ()) {
21590 if (x < this.getXMax () && (x < this.getXMin () || x < this.XforY (y))) {
21591 return 1;
21592 }}return 0;
21593 }, "~N,~N");
21594 Clazz_defineMethod (c$, "accumulateCrossings", 
21595 function (c) {
21596 var xhi = c.getXHi ();
21597 if (this.getXMin () >= xhi) {
21598 return false;
21599 }var xlo = c.getXLo ();
21600 var ylo = c.getYLo ();
21601 var yhi = c.getYHi ();
21602 var y0 = this.getYTop ();
21603 var y1 = this.getYBot ();
21604 var tstart;
21605 var ystart;
21606 var tend;
21607 var yend;
21608 if (y0 < ylo) {
21609 if (y1 <= ylo) {
21610 return false;
21611 }ystart = ylo;
21612 tstart = this.TforY (ylo);
21613 } else {
21614 if (y0 >= yhi) {
21615 return false;
21616 }ystart = y0;
21617 tstart = 0;
21618 }if (y1 > yhi) {
21619 yend = yhi;
21620 tend = this.TforY (yhi);
21621 } else {
21622 yend = y1;
21623 tend = 1;
21624 }var hitLo = false;
21625 var hitHi = false;
21626 while (true) {
21627 var x = this.XforT (tstart);
21628 if (x < xhi) {
21629 if (hitHi || x > xlo) {
21630 return true;
21631 }hitLo = true;
21632 } else {
21633 if (hitLo) {
21634 return true;
21635 }hitHi = true;
21636 }if (tstart >= tend) {
21637 break;
21638 }tstart = this.nextVertical (tstart, tend);
21639 }
21640 if (hitLo) {
21641 c.record (ystart, yend, this.direction);
21642 }return false;
21643 }, "jssun.awt.geom.Crossings");
21644 Clazz_defineMethod (c$, "getSubCurve", 
21645 function (ystart, yend) {
21646 return this.getSubCurve (ystart, yend, this.direction);
21647 }, "~N,~N");
21648 Clazz_defineMethod (c$, "compareTo", 
21649 function (that, yrange) {
21650 var y0 = yrange[0];
21651 var y1 = yrange[1];
21652 y1 = Math.min (Math.min (y1, this.getYBot ()), that.getYBot ());
21653 if (y1 <= yrange[0]) {
21654 System.err.println ("this == " + this);
21655 System.err.println ("that == " + that);
21656 System.out.println ("target range = " + yrange[0] + "=>" + yrange[1]);
21657 throw  new InternalError ("backstepping from " + yrange[0] + " to " + y1);
21658 }yrange[1] = y1;
21659 if (this.getXMax () <= that.getXMin ()) {
21660 if (this.getXMin () == that.getXMax ()) {
21661 return 0;
21662 }return -1;
21663 }if (this.getXMin () >= that.getXMax ()) {
21664 return 1;
21665 }var s0 = this.TforY (y0);
21666 var ys0 = this.YforT (s0);
21667 if (ys0 < y0) {
21668 s0 = this.refineTforY (s0, ys0, y0);
21669 ys0 = this.YforT (s0);
21670 }var s1 = this.TforY (y1);
21671 if (this.YforT (s1) < y0) {
21672 s1 = this.refineTforY (s1, this.YforT (s1), y0);
21673 }var t0 = that.TforY (y0);
21674 var yt0 = that.YforT (t0);
21675 if (yt0 < y0) {
21676 t0 = that.refineTforY (t0, yt0, y0);
21677 yt0 = that.YforT (t0);
21678 }var t1 = that.TforY (y1);
21679 if (that.YforT (t1) < y0) {
21680 t1 = that.refineTforY (t1, that.YforT (t1), y0);
21681 }var xs0 = this.XforT (s0);
21682 var xt0 = that.XforT (t0);
21683 var scale = Math.max (Math.abs (y0), Math.abs (y1));
21684 var ymin = Math.max (scale * 1E-14, 1E-300);
21685 if (this.fairlyClose (xs0, xt0)) {
21686 var bump = ymin;
21687 var maxbump = Math.min (ymin * 1E13, (y1 - y0) * .1);
21688 var y = y0 + bump;
21689 while (y <= y1) {
21690 if (this.fairlyClose (this.XforY (y), that.XforY (y))) {
21691 if ((bump *= 2) > maxbump) {
21692 bump = maxbump;
21693 }} else {
21694 y -= bump;
21695 while (true) {
21696 bump /= 2;
21697 var newy = y + bump;
21698 if (newy <= y) {
21699 break;
21700 }if (this.fairlyClose (this.XforY (newy), that.XforY (newy))) {
21701 y = newy;
21702 }}
21703 break;
21704 }y += bump;
21705 }
21706 if (y > y0) {
21707 if (y < y1) {
21708 yrange[1] = y;
21709 }return 0;
21710 }}if (ymin <= 0) {
21711 System.out.println ("ymin = " + ymin);
21712 }while (s0 < s1 && t0 < t1) {
21713 var sh = this.nextVertical (s0, s1);
21714 var xsh = this.XforT (sh);
21715 var ysh = this.YforT (sh);
21716 var th = that.nextVertical (t0, t1);
21717 var xth = that.XforT (th);
21718 var yth = that.YforT (th);
21719 try {
21720 if (this.findIntersect (that, yrange, ymin, 0, 0, s0, xs0, ys0, sh, xsh, ysh, t0, xt0, yt0, th, xth, yth)) {
21721 break;
21722 }} catch (t) {
21723 System.err.println ("Error: " + t);
21724 System.err.println ("y range was " + yrange[0] + "=>" + yrange[1]);
21725 System.err.println ("s y range is " + ys0 + "=>" + ysh);
21726 System.err.println ("t y range is " + yt0 + "=>" + yth);
21727 System.err.println ("ymin is " + ymin);
21728 return 0;
21729 }
21730 if (ysh < yth) {
21731 if (ysh > yrange[0]) {
21732 if (ysh < yrange[1]) {
21733 yrange[1] = ysh;
21734 }break;
21735 }s0 = sh;
21736 xs0 = xsh;
21737 ys0 = ysh;
21738 } else {
21739 if (yth > yrange[0]) {
21740 if (yth < yrange[1]) {
21741 yrange[1] = yth;
21742 }break;
21743 }t0 = th;
21744 xt0 = xth;
21745 yt0 = yth;
21746 }}
21747 var ymid = (yrange[0] + yrange[1]) / 2;
21748 return jssun.awt.geom.Curve.orderof (this.XforY (ymid), that.XforY (ymid));
21749 }, "jssun.awt.geom.Curve,~A");
21750 Clazz_defineMethod (c$, "findIntersect", 
21751 function (that, yrange, ymin, slevel, tlevel, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1) {
21752 if (ys0 > yt1 || yt0 > ys1) {
21753 return false;
21754 }if (Math.min (xs0, xs1) > Math.max (xt0, xt1) || Math.max (xs0, xs1) < Math.min (xt0, xt1)) {
21755 return false;
21756 }if (s1 - s0 > 0.001) {
21757 var s = (s0 + s1) / 2;
21758 var xs = this.XforT (s);
21759 var ys = this.YforT (s);
21760 if (s == s0 || s == s1) {
21761 System.out.println ("s0 = " + s0);
21762 System.out.println ("s1 = " + s1);
21763 throw  new InternalError ("no s progress!");
21764 }if (t1 - t0 > 0.001) {
21765 var t = (t0 + t1) / 2;
21766 var xt = that.XforT (t);
21767 var yt = that.YforT (t);
21768 if (t == t0 || t == t1) {
21769 System.out.println ("t0 = " + t0);
21770 System.out.println ("t1 = " + t1);
21771 throw  new InternalError ("no t progress!");
21772 }if (ys >= yt0 && yt >= ys0) {
21773 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t, xt, yt)) {
21774 return true;
21775 }}if (ys >= yt) {
21776 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t, xt, yt, t1, xt1, yt1)) {
21777 return true;
21778 }}if (yt >= ys) {
21779 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21780 return true;
21781 }}if (ys1 >= yt && yt1 >= ys) {
21782 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21783 return true;
21784 }}} else {
21785 if (ys >= yt0) {
21786 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t1, xt1, yt1)) {
21787 return true;
21788 }}if (yt1 >= ys) {
21789 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1)) {
21790 return true;
21791 }}}} else if (t1 - t0 > 0.001) {
21792 var t = (t0 + t1) / 2;
21793 var xt = that.XforT (t);
21794 var yt = that.YforT (t);
21795 if (t == t0 || t == t1) {
21796 System.out.println ("t0 = " + t0);
21797 System.out.println ("t1 = " + t1);
21798 throw  new InternalError ("no t progress!");
21799 }if (yt >= ys0) {
21800 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21801 return true;
21802 }}if (ys1 >= yt) {
21803 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21804 return true;
21805 }}} else {
21806 var xlk = xs1 - xs0;
21807 var ylk = ys1 - ys0;
21808 var xnm = xt1 - xt0;
21809 var ynm = yt1 - yt0;
21810 var xmk = xt0 - xs0;
21811 var ymk = yt0 - ys0;
21812 var det = xnm * ylk - ynm * xlk;
21813 if (det != 0) {
21814 var detinv = 1 / det;
21815 var s = (xnm * ymk - ynm * xmk) * detinv;
21816 var t = (xlk * ymk - ylk * xmk) * detinv;
21817 if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {
21818 s = s0 + s * (s1 - s0);
21819 t = t0 + t * (t1 - t0);
21820 if (s < 0 || s > 1 || t < 0 || t > 1) {
21821 System.out.println ("Uh oh!");
21822 }var y = (this.YforT (s) + that.YforT (t)) / 2;
21823 if (y <= yrange[1] && y > yrange[0]) {
21824 yrange[1] = y;
21825 return true;
21826 }}}}return false;
21827 }, "jssun.awt.geom.Curve,~A,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21828 Clazz_defineMethod (c$, "refineTforY", 
21829 function (t0, yt0, y0) {
21830 var t1 = 1;
21831 while (true) {
21832 var th = (t0 + t1) / 2;
21833 if (th == t0 || th == t1) {
21834 return t1;
21835 }var y = this.YforT (th);
21836 if (y < y0) {
21837 t0 = th;
21838 yt0 = y;
21839 } else if (y > y0) {
21840 t1 = th;
21841 } else {
21842 return t1;
21843 }}
21844 }, "~N,~N,~N");
21845 Clazz_defineMethod (c$, "fairlyClose", 
21846 function (v1, v2) {
21847 return (Math.abs (v1 - v2) < Math.max (Math.abs (v1), Math.abs (v2)) * 1E-10);
21848 }, "~N,~N");
21849 Clazz_defineStatics (c$,
21850 "INCREASING", 1,
21851 "DECREASING", -1,
21852 "RECT_INTERSECTS", 0x80000000,
21853 "TMIN", 1E-3);
21854 });
21855 Clazz_declarePackage ("java.awt.geom");
21856 Clazz_load (["java.lang.RuntimeException"], "java.awt.geom.IllegalPathStateException", null, function () {
21857 c$ = Clazz_declareType (java.awt.geom, "IllegalPathStateException", RuntimeException);
21858 Clazz_makeConstructor (c$, 
21859 function () {
21860 Clazz_superConstructor (this, java.awt.geom.IllegalPathStateException, []);
21861 });
21862 });
21863 Clazz_declarePackage ("java.awt.geom");
21864 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.RectIterator", ["java.util.NoSuchElementException"], function () {
21865 c$ = Clazz_decorateAsClass (function () {
21866 this.x = 0;
21867 this.y = 0;
21868 this.w = 0;
21869 this.h = 0;
21870 this.affine = null;
21871 this.index = 0;
21872 Clazz_instantialize (this, arguments);
21873 }, java.awt.geom, "RectIterator", null, java.awt.geom.PathIterator);
21874 Clazz_makeConstructor (c$, 
21875 function (r, at) {
21876 this.x = r.getX ();
21877 this.y = r.getY ();
21878 this.w = r.getWidth ();
21879 this.h = r.getHeight ();
21880 this.affine = at;
21881 if (this.w < 0 || this.h < 0) {
21882 this.index = 6;
21883 }}, "java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform");
21884 Clazz_overrideMethod (c$, "getWindingRule", 
21885 function () {
21886 return 1;
21887 });
21888 Clazz_overrideMethod (c$, "isDone", 
21889 function () {
21890 return this.index > 5;
21891 });
21892 Clazz_overrideMethod (c$, "next", 
21893 function () {
21894 this.index++;
21895 });
21896 Clazz_defineMethod (c$, "currentSegment", 
21897 function (coords) {
21898 if (this.isDone ()) {
21899 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
21900 }if (this.index == 5) {
21901 return 4;
21902 }coords[0] = this.x;
21903 coords[1] = this.y;
21904 if (this.index == 1 || this.index == 2) {
21905 coords[0] += this.w;
21906 }if (this.index == 2 || this.index == 3) {
21907 coords[1] += this.h;
21908 }if (this.affine != null) {
21909 this.affine.transform (coords, 0, coords, 0, 1);
21910 }return (this.index == 0 ? 0 : 1);
21911 }, "~A");
21912 Clazz_defineMethod (c$, "currentSegment", 
21913 function (coords) {
21914 if (this.isDone ()) {
21915 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
21916 }if (this.index == 5) {
21917 return 4;
21918 }coords[0] = this.x;
21919 coords[1] = this.y;
21920 if (this.index == 1 || this.index == 2) {
21921 coords[0] += this.w;
21922 }if (this.index == 2 || this.index == 3) {
21923 coords[1] += this.h;
21924 }if (this.affine != null) {
21925 this.affine.transform (coords, 0, coords, 0, 1);
21926 }return (this.index == 0 ? 0 : 1);
21927 }, "~A");
21928 });
21929 Clazz_declarePackage ("java.awt.event");
21930 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ActionEvent", ["java.awt.event.KeyEvent"], function () {
21931 c$ = Clazz_decorateAsClass (function () {
21932 this.actionCommand = null;
21933 this.when = 0;
21934 this.modifiers = 0;
21935 Clazz_instantialize (this, arguments);
21936 }, java.awt.event, "ActionEvent", java.awt.AWTEvent);
21937 Clazz_makeConstructor (c$, 
21938 function (source, id, command) {
21939 this.construct (source, id, command, 0);
21940 }, "~O,~N,~S");
21941 Clazz_makeConstructor (c$, 
21942 function (source, id, command, modifiers) {
21943 this.construct (source, id, command, 0, modifiers);
21944 }, "~O,~N,~S,~N");
21945 Clazz_makeConstructor (c$, 
21946 function (source, id, command, when, modifiers) {
21947 Clazz_superConstructor (this, java.awt.event.ActionEvent, [source, id]);
21948 this.actionCommand = command;
21949 this.when = when;
21950 this.modifiers = modifiers;
21951 }, "~O,~N,~S,~N,~N");
21952 Clazz_defineMethod (c$, "getActionCommand", 
21953 function () {
21954 return this.actionCommand;
21955 });
21956 Clazz_defineMethod (c$, "getWhen", 
21957 function () {
21958 return this.when;
21959 });
21960 Clazz_defineMethod (c$, "getModifiers", 
21961 function () {
21962 return this.modifiers;
21963 });
21964 Clazz_overrideMethod (c$, "paramString", 
21965 function () {
21966 var typeStr;
21967 switch (this.id) {
21968 case 1001:
21969 typeStr = "ACTION_PERFORMED";
21970 break;
21971 default:
21972 typeStr = "unknown type";
21973 }
21974 return typeStr + ",cmd=" + this.actionCommand + ",when=" + this.when + ",modifiers=" + java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers);
21975 });
21976 Clazz_defineStatics (c$,
21977 "SHIFT_MASK", 1,
21978 "CTRL_MASK", 2,
21979 "META_MASK", 4,
21980 "ALT_MASK", 8,
21981 "ACTION_FIRST", 1001,
21982 "ACTION_LAST", 1001,
21983 "ACTION_PERFORMED", 1001);
21984 });
21985 Clazz_declarePackage ("java.awt.event");
21986 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.KeyEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Toolkit"], function () {
21987 c$ = Clazz_decorateAsClass (function () {
21988 this.isProxyActive = false;
21989 this.keyCode = 0;
21990 this.keyChar = '\0';
21991 this.keyLocation = 0;
21992 Clazz_instantialize (this, arguments);
21993 }, java.awt.event, "KeyEvent", java.awt.event.InputEvent);
21994 Clazz_makeConstructor (c$, 
21995 function (source, id, when, modifiers, keyCode, keyChar, keyLocation) {
21996 Clazz_superConstructor (this, java.awt.event.KeyEvent, [source, id, when, modifiers]);
21997 if (id == 400) {
21998 if (keyChar == '\uffff') {
21999 throw  new IllegalArgumentException ("invalid keyChar");
22000 }if (keyCode != 0) {
22001 throw  new IllegalArgumentException ("invalid keyCode");
22002 }if (keyLocation != 0) {
22003 throw  new IllegalArgumentException ("invalid keyLocation");
22004 }}this.keyCode = keyCode;
22005 this.keyChar = keyChar;
22006 if ((keyLocation < 0) || (keyLocation > 4)) {
22007 throw  new IllegalArgumentException ("invalid keyLocation");
22008 }this.keyLocation = keyLocation;
22009 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22010 this.setNewModifiers ();
22011 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22012 this.setOldModifiers ();
22013 }}, "java.awt.Component,~N,~N,~N,~N,~S,~N");
22014 Clazz_makeConstructor (c$, 
22015 function (source, id, when, modifiers, keyCode, keyChar) {
22016 this.construct (source, id, when, modifiers, keyCode, keyChar, 0);
22017 }, "java.awt.Component,~N,~N,~N,~N,~S");
22018 Clazz_makeConstructor (c$, 
22019 function (source, id, when, modifiers, keyCode) {
22020 this.construct (source, id, when, modifiers, keyCode, String.fromCharCode (keyCode));
22021 }, "java.awt.Component,~N,~N,~N,~N");
22022 Clazz_defineMethod (c$, "getKeyCode", 
22023 function () {
22024 return this.keyCode;
22025 });
22026 Clazz_defineMethod (c$, "setKeyCode", 
22027 function (keyCode) {
22028 this.keyCode = keyCode;
22029 }, "~N");
22030 Clazz_defineMethod (c$, "getKeyChar", 
22031 function () {
22032 return this.keyChar;
22033 });
22034 Clazz_defineMethod (c$, "setKeyChar", 
22035 function (keyChar) {
22036 this.keyChar = keyChar;
22037 }, "~S");
22038 Clazz_defineMethod (c$, "setModifiers", 
22039 function (modifiers) {
22040 this.modifiers = modifiers;
22041 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22042 this.setNewModifiers ();
22043 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22044 this.setOldModifiers ();
22045 }}, "~N");
22046 Clazz_defineMethod (c$, "getKeyLocation", 
22047 function () {
22048 return this.keyLocation;
22049 });
22050 c$.getKeyText = Clazz_defineMethod (c$, "getKeyText", 
22051 function (keyCode) {
22052 if (keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90) {
22053 return String.valueOf (String.fromCharCode (keyCode));
22054 }switch (keyCode) {
22055 case 10:
22056 return java.awt.Toolkit.getProperty ("AWT.enter", "Enter");
22057 case 8:
22058 return java.awt.Toolkit.getProperty ("AWT.backSpace", "Backspace");
22059 case 9:
22060 return java.awt.Toolkit.getProperty ("AWT.tab", "Tab");
22061 case 3:
22062 return java.awt.Toolkit.getProperty ("AWT.cancel", "Cancel");
22063 case 12:
22064 return java.awt.Toolkit.getProperty ("AWT.clear", "Clear");
22065 case 65312:
22066 return java.awt.Toolkit.getProperty ("AWT.compose", "Compose");
22067 case 19:
22068 return java.awt.Toolkit.getProperty ("AWT.pause", "Pause");
22069 case 20:
22070 return java.awt.Toolkit.getProperty ("AWT.capsLock", "Caps Lock");
22071 case 27:
22072 return java.awt.Toolkit.getProperty ("AWT.escape", "Escape");
22073 case 32:
22074 return java.awt.Toolkit.getProperty ("AWT.space", "Space");
22075 case 33:
22076 return java.awt.Toolkit.getProperty ("AWT.pgup", "Page Up");
22077 case 34:
22078 return java.awt.Toolkit.getProperty ("AWT.pgdn", "Page Down");
22079 case 35:
22080 return java.awt.Toolkit.getProperty ("AWT.end", "End");
22081 case 36:
22082 return java.awt.Toolkit.getProperty ("AWT.home", "Home");
22083 case 37:
22084 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22085 case 38:
22086 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22087 case 39:
22088 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22089 case 40:
22090 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22091 case 65368:
22092 return java.awt.Toolkit.getProperty ("AWT.begin", "Begin");
22093 case 16:
22094 return java.awt.Toolkit.getProperty ("AWT.shift", "Shift");
22095 case 17:
22096 return java.awt.Toolkit.getProperty ("AWT.control", "Control");
22097 case 18:
22098 return java.awt.Toolkit.getProperty ("AWT.alt", "Alt");
22099 case 157:
22100 return java.awt.Toolkit.getProperty ("AWT.meta", "Meta");
22101 case 65406:
22102 return java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph");
22103 case 44:
22104 return java.awt.Toolkit.getProperty ("AWT.comma", "Comma");
22105 case 46:
22106 return java.awt.Toolkit.getProperty ("AWT.period", "Period");
22107 case 47:
22108 return java.awt.Toolkit.getProperty ("AWT.slash", "Slash");
22109 case 59:
22110 return java.awt.Toolkit.getProperty ("AWT.semicolon", "Semicolon");
22111 case 61:
22112 return java.awt.Toolkit.getProperty ("AWT.equals", "Equals");
22113 case 91:
22114 return java.awt.Toolkit.getProperty ("AWT.openBracket", "Open Bracket");
22115 case 92:
22116 return java.awt.Toolkit.getProperty ("AWT.backSlash", "Back Slash");
22117 case 93:
22118 return java.awt.Toolkit.getProperty ("AWT.closeBracket", "Close Bracket");
22119 case 106:
22120 return java.awt.Toolkit.getProperty ("AWT.multiply", "NumPad *");
22121 case 107:
22122 return java.awt.Toolkit.getProperty ("AWT.add", "NumPad +");
22123 case 108:
22124 return java.awt.Toolkit.getProperty ("AWT.separator", "NumPad ,");
22125 case 109:
22126 return java.awt.Toolkit.getProperty ("AWT.subtract", "NumPad -");
22127 case 110:
22128 return java.awt.Toolkit.getProperty ("AWT.decimal", "NumPad .");
22129 case 111:
22130 return java.awt.Toolkit.getProperty ("AWT.divide", "NumPad /");
22131 case 127:
22132 return java.awt.Toolkit.getProperty ("AWT.delete", "Delete");
22133 case 144:
22134 return java.awt.Toolkit.getProperty ("AWT.numLock", "Num Lock");
22135 case 145:
22136 return java.awt.Toolkit.getProperty ("AWT.scrollLock", "Scroll Lock");
22137 case 524:
22138 return java.awt.Toolkit.getProperty ("AWT.windows", "Windows");
22139 case 525:
22140 return java.awt.Toolkit.getProperty ("AWT.context", "Context Menu");
22141 case 112:
22142 return java.awt.Toolkit.getProperty ("AWT.f1", "F1");
22143 case 113:
22144 return java.awt.Toolkit.getProperty ("AWT.f2", "F2");
22145 case 114:
22146 return java.awt.Toolkit.getProperty ("AWT.f3", "F3");
22147 case 115:
22148 return java.awt.Toolkit.getProperty ("AWT.f4", "F4");
22149 case 116:
22150 return java.awt.Toolkit.getProperty ("AWT.f5", "F5");
22151 case 117:
22152 return java.awt.Toolkit.getProperty ("AWT.f6", "F6");
22153 case 118:
22154 return java.awt.Toolkit.getProperty ("AWT.f7", "F7");
22155 case 119:
22156 return java.awt.Toolkit.getProperty ("AWT.f8", "F8");
22157 case 120:
22158 return java.awt.Toolkit.getProperty ("AWT.f9", "F9");
22159 case 121:
22160 return java.awt.Toolkit.getProperty ("AWT.f10", "F10");
22161 case 122:
22162 return java.awt.Toolkit.getProperty ("AWT.f11", "F11");
22163 case 123:
22164 return java.awt.Toolkit.getProperty ("AWT.f12", "F12");
22165 case 61440:
22166 return java.awt.Toolkit.getProperty ("AWT.f13", "F13");
22167 case 61441:
22168 return java.awt.Toolkit.getProperty ("AWT.f14", "F14");
22169 case 61442:
22170 return java.awt.Toolkit.getProperty ("AWT.f15", "F15");
22171 case 61443:
22172 return java.awt.Toolkit.getProperty ("AWT.f16", "F16");
22173 case 61444:
22174 return java.awt.Toolkit.getProperty ("AWT.f17", "F17");
22175 case 61445:
22176 return java.awt.Toolkit.getProperty ("AWT.f18", "F18");
22177 case 61446:
22178 return java.awt.Toolkit.getProperty ("AWT.f19", "F19");
22179 case 61447:
22180 return java.awt.Toolkit.getProperty ("AWT.f20", "F20");
22181 case 61448:
22182 return java.awt.Toolkit.getProperty ("AWT.f21", "F21");
22183 case 61449:
22184 return java.awt.Toolkit.getProperty ("AWT.f22", "F22");
22185 case 61450:
22186 return java.awt.Toolkit.getProperty ("AWT.f23", "F23");
22187 case 61451:
22188 return java.awt.Toolkit.getProperty ("AWT.f24", "F24");
22189 case 154:
22190 return java.awt.Toolkit.getProperty ("AWT.printScreen", "Print Screen");
22191 case 155:
22192 return java.awt.Toolkit.getProperty ("AWT.insert", "Insert");
22193 case 156:
22194 return java.awt.Toolkit.getProperty ("AWT.help", "Help");
22195 case 192:
22196 return java.awt.Toolkit.getProperty ("AWT.backQuote", "Back Quote");
22197 case 222:
22198 return java.awt.Toolkit.getProperty ("AWT.quote", "Quote");
22199 case 224:
22200 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22201 case 225:
22202 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22203 case 226:
22204 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22205 case 227:
22206 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22207 case 128:
22208 return java.awt.Toolkit.getProperty ("AWT.deadGrave", "Dead Grave");
22209 case 129:
22210 return java.awt.Toolkit.getProperty ("AWT.deadAcute", "Dead Acute");
22211 case 130:
22212 return java.awt.Toolkit.getProperty ("AWT.deadCircumflex", "Dead Circumflex");
22213 case 131:
22214 return java.awt.Toolkit.getProperty ("AWT.deadTilde", "Dead Tilde");
22215 case 132:
22216 return java.awt.Toolkit.getProperty ("AWT.deadMacron", "Dead Macron");
22217 case 133:
22218 return java.awt.Toolkit.getProperty ("AWT.deadBreve", "Dead Breve");
22219 case 134:
22220 return java.awt.Toolkit.getProperty ("AWT.deadAboveDot", "Dead Above Dot");
22221 case 135:
22222 return java.awt.Toolkit.getProperty ("AWT.deadDiaeresis", "Dead Diaeresis");
22223 case 136:
22224 return java.awt.Toolkit.getProperty ("AWT.deadAboveRing", "Dead Above Ring");
22225 case 137:
22226 return java.awt.Toolkit.getProperty ("AWT.deadDoubleAcute", "Dead Double Acute");
22227 case 138:
22228 return java.awt.Toolkit.getProperty ("AWT.deadCaron", "Dead Caron");
22229 case 139:
22230 return java.awt.Toolkit.getProperty ("AWT.deadCedilla", "Dead Cedilla");
22231 case 140:
22232 return java.awt.Toolkit.getProperty ("AWT.deadOgonek", "Dead Ogonek");
22233 case 141:
22234 return java.awt.Toolkit.getProperty ("AWT.deadIota", "Dead Iota");
22235 case 142:
22236 return java.awt.Toolkit.getProperty ("AWT.deadVoicedSound", "Dead Voiced Sound");
22237 case 143:
22238 return java.awt.Toolkit.getProperty ("AWT.deadSemivoicedSound", "Dead Semivoiced Sound");
22239 case 150:
22240 return java.awt.Toolkit.getProperty ("AWT.ampersand", "Ampersand");
22241 case 151:
22242 return java.awt.Toolkit.getProperty ("AWT.asterisk", "Asterisk");
22243 case 152:
22244 return java.awt.Toolkit.getProperty ("AWT.quoteDbl", "Double Quote");
22245 case 153:
22246 return java.awt.Toolkit.getProperty ("AWT.Less", "Less");
22247 case 160:
22248 return java.awt.Toolkit.getProperty ("AWT.greater", "Greater");
22249 case 161:
22250 return java.awt.Toolkit.getProperty ("AWT.braceLeft", "Left Brace");
22251 case 162:
22252 return java.awt.Toolkit.getProperty ("AWT.braceRight", "Right Brace");
22253 case 512:
22254 return java.awt.Toolkit.getProperty ("AWT.at", "At");
22255 case 513:
22256 return java.awt.Toolkit.getProperty ("AWT.colon", "Colon");
22257 case 514:
22258 return java.awt.Toolkit.getProperty ("AWT.circumflex", "Circumflex");
22259 case 515:
22260 return java.awt.Toolkit.getProperty ("AWT.dollar", "Dollar");
22261 case 516:
22262 return java.awt.Toolkit.getProperty ("AWT.euro", "Euro");
22263 case 517:
22264 return java.awt.Toolkit.getProperty ("AWT.exclamationMark", "Exclamation Mark");
22265 case 518:
22266 return java.awt.Toolkit.getProperty ("AWT.invertedExclamationMark", "Inverted Exclamation Mark");
22267 case 519:
22268 return java.awt.Toolkit.getProperty ("AWT.leftParenthesis", "Left Parenthesis");
22269 case 520:
22270 return java.awt.Toolkit.getProperty ("AWT.numberSign", "Number Sign");
22271 case 45:
22272 return java.awt.Toolkit.getProperty ("AWT.minus", "Minus");
22273 case 521:
22274 return java.awt.Toolkit.getProperty ("AWT.plus", "Plus");
22275 case 522:
22276 return java.awt.Toolkit.getProperty ("AWT.rightParenthesis", "Right Parenthesis");
22277 case 523:
22278 return java.awt.Toolkit.getProperty ("AWT.underscore", "Underscore");
22279 case 24:
22280 return java.awt.Toolkit.getProperty ("AWT.final", "Final");
22281 case 28:
22282 return java.awt.Toolkit.getProperty ("AWT.convert", "Convert");
22283 case 29:
22284 return java.awt.Toolkit.getProperty ("AWT.noconvert", "No Convert");
22285 case 30:
22286 return java.awt.Toolkit.getProperty ("AWT.accept", "Accept");
22287 case 31:
22288 return java.awt.Toolkit.getProperty ("AWT.modechange", "Mode Change");
22289 case 21:
22290 return java.awt.Toolkit.getProperty ("AWT.kana", "Kana");
22291 case 25:
22292 return java.awt.Toolkit.getProperty ("AWT.kanji", "Kanji");
22293 case 240:
22294 return java.awt.Toolkit.getProperty ("AWT.alphanumeric", "Alphanumeric");
22295 case 241:
22296 return java.awt.Toolkit.getProperty ("AWT.katakana", "Katakana");
22297 case 242:
22298 return java.awt.Toolkit.getProperty ("AWT.hiragana", "Hiragana");
22299 case 243:
22300 return java.awt.Toolkit.getProperty ("AWT.fullWidth", "Full-Width");
22301 case 244:
22302 return java.awt.Toolkit.getProperty ("AWT.halfWidth", "Half-Width");
22303 case 245:
22304 return java.awt.Toolkit.getProperty ("AWT.romanCharacters", "Roman Characters");
22305 case 256:
22306 return java.awt.Toolkit.getProperty ("AWT.allCandidates", "All Candidates");
22307 case 257:
22308 return java.awt.Toolkit.getProperty ("AWT.previousCandidate", "Previous Candidate");
22309 case 258:
22310 return java.awt.Toolkit.getProperty ("AWT.codeInput", "Code Input");
22311 case 259:
22312 return java.awt.Toolkit.getProperty ("AWT.japaneseKatakana", "Japanese Katakana");
22313 case 260:
22314 return java.awt.Toolkit.getProperty ("AWT.japaneseHiragana", "Japanese Hiragana");
22315 case 261:
22316 return java.awt.Toolkit.getProperty ("AWT.japaneseRoman", "Japanese Roman");
22317 case 262:
22318 return java.awt.Toolkit.getProperty ("AWT.kanaLock", "Kana Lock");
22319 case 263:
22320 return java.awt.Toolkit.getProperty ("AWT.inputMethodOnOff", "Input Method On/Off");
22321 case 65481:
22322 return java.awt.Toolkit.getProperty ("AWT.again", "Again");
22323 case 65483:
22324 return java.awt.Toolkit.getProperty ("AWT.undo", "Undo");
22325 case 65485:
22326 return java.awt.Toolkit.getProperty ("AWT.copy", "Copy");
22327 case 65487:
22328 return java.awt.Toolkit.getProperty ("AWT.paste", "Paste");
22329 case 65489:
22330 return java.awt.Toolkit.getProperty ("AWT.cut", "Cut");
22331 case 65488:
22332 return java.awt.Toolkit.getProperty ("AWT.find", "Find");
22333 case 65482:
22334 return java.awt.Toolkit.getProperty ("AWT.props", "Props");
22335 case 65480:
22336 return java.awt.Toolkit.getProperty ("AWT.stop", "Stop");
22337 }
22338 if (keyCode >= 96 && keyCode <= 105) {
22339 var numpad = java.awt.Toolkit.getProperty ("AWT.numpad", "NumPad");
22340 var c = String.fromCharCode (keyCode - 96 + 48);
22341 return numpad + "-" + c;
22342 }var unknown = java.awt.Toolkit.getProperty ("AWT.unknown", "Unknown");
22343 return unknown + " keyCode: 0x" + Integer.toString (keyCode, 16);
22344 }, "~N");
22345 c$.getKeyModifiersText = Clazz_defineMethod (c$, "getKeyModifiersText", 
22346 function (modifiers) {
22347 var buf =  new StringBuilder ();
22348 if ((modifiers & 4) != 0) {
22349 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
22350 buf.append ("+");
22351 }if ((modifiers & 2) != 0) {
22352 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
22353 buf.append ("+");
22354 }if ((modifiers & 8) != 0) {
22355 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
22356 buf.append ("+");
22357 }if ((modifiers & 1) != 0) {
22358 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
22359 buf.append ("+");
22360 }if ((modifiers & 32) != 0) {
22361 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
22362 buf.append ("+");
22363 }if ((modifiers & 16) != 0) {
22364 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
22365 buf.append ("+");
22366 }if (buf.length () > 0) {
22367 buf.setLength (buf.length () - 1);
22368 }return buf.toString ();
22369 }, "~N");
22370 Clazz_defineMethod (c$, "isActionKey", 
22371 function () {
22372 switch (this.keyCode) {
22373 case 36:
22374 case 35:
22375 case 33:
22376 case 34:
22377 case 38:
22378 case 40:
22379 case 37:
22380 case 39:
22381 case 65368:
22382 case 226:
22383 case 224:
22384 case 227:
22385 case 225:
22386 case 112:
22387 case 113:
22388 case 114:
22389 case 115:
22390 case 116:
22391 case 117:
22392 case 118:
22393 case 119:
22394 case 120:
22395 case 121:
22396 case 122:
22397 case 123:
22398 case 61440:
22399 case 61441:
22400 case 61442:
22401 case 61443:
22402 case 61444:
22403 case 61445:
22404 case 61446:
22405 case 61447:
22406 case 61448:
22407 case 61449:
22408 case 61450:
22409 case 61451:
22410 case 154:
22411 case 145:
22412 case 20:
22413 case 144:
22414 case 19:
22415 case 155:
22416 case 24:
22417 case 28:
22418 case 29:
22419 case 30:
22420 case 31:
22421 case 21:
22422 case 25:
22423 case 240:
22424 case 241:
22425 case 242:
22426 case 243:
22427 case 244:
22428 case 245:
22429 case 256:
22430 case 257:
22431 case 258:
22432 case 259:
22433 case 260:
22434 case 261:
22435 case 262:
22436 case 263:
22437 case 65481:
22438 case 65483:
22439 case 65485:
22440 case 65487:
22441 case 65489:
22442 case 65488:
22443 case 65482:
22444 case 65480:
22445 case 156:
22446 case 524:
22447 case 525:
22448 return true;
22449 }
22450 return false;
22451 });
22452 Clazz_overrideMethod (c$, "paramString", 
22453 function () {
22454 var str =  new StringBuilder (100);
22455 switch (this.id) {
22456 case 401:
22457 str.append ("KEY_PRESSED");
22458 break;
22459 case 402:
22460 str.append ("KEY_RELEASED");
22461 break;
22462 case 400:
22463 str.append ("KEY_TYPED");
22464 break;
22465 default:
22466 str.append ("unknown type");
22467 break;
22468 }
22469 str.append (",keyCode=").append ("" + this.keyCode);
22470 str.append (",keyText=").append (java.awt.event.KeyEvent.getKeyText (this.keyCode));
22471 str.append (",keyChar=");
22472 switch (this.keyChar) {
22473 case '\b':
22474 str.append (java.awt.event.KeyEvent.getKeyText (8));
22475 break;
22476 case '\t':
22477 str.append (java.awt.event.KeyEvent.getKeyText (9));
22478 break;
22479 case '\n':
22480 str.append (java.awt.event.KeyEvent.getKeyText (10));
22481 break;
22482 case '\u0018':
22483 str.append (java.awt.event.KeyEvent.getKeyText (3));
22484 break;
22485 case '\u001b':
22486 str.append (java.awt.event.KeyEvent.getKeyText (27));
22487 break;
22488 case '\u007f':
22489 str.append (java.awt.event.KeyEvent.getKeyText (127));
22490 break;
22491 case '\uffff':
22492 str.append (java.awt.Toolkit.getProperty ("AWT.undefined", "Undefined"));
22493 str.append (" keyChar");
22494 break;
22495 default:
22496 str.append ("'").append (this.keyChar).append ("'");
22497 break;
22498 }
22499 if (this.getModifiers () != 0) {
22500 str.append (",modifiers=").append (java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers));
22501 }if (this.getModifiersEx () != 0) {
22502 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
22503 }str.append (",keyLocation=");
22504 switch (this.keyLocation) {
22505 case 0:
22506 str.append ("KEY_LOCATION_UNKNOWN");
22507 break;
22508 case 1:
22509 str.append ("KEY_LOCATION_STANDARD");
22510 break;
22511 case 2:
22512 str.append ("KEY_LOCATION_LEFT");
22513 break;
22514 case 3:
22515 str.append ("KEY_LOCATION_RIGHT");
22516 break;
22517 case 4:
22518 str.append ("KEY_LOCATION_NUMPAD");
22519 break;
22520 default:
22521 str.append ("KEY_LOCATION_UNKNOWN");
22522 break;
22523 }
22524 return str.toString ();
22525 });
22526 Clazz_defineMethod (c$, "setNewModifiers", 
22527  function () {
22528 if ((this.modifiers & 1) != 0) {
22529 this.modifiers |= 64;
22530 }if ((this.modifiers & 8) != 0) {
22531 this.modifiers |= 512;
22532 }if ((this.modifiers & 2) != 0) {
22533 this.modifiers |= 128;
22534 }if ((this.modifiers & 4) != 0) {
22535 this.modifiers |= 256;
22536 }if ((this.modifiers & 32) != 0) {
22537 this.modifiers |= 8192;
22538 }if ((this.modifiers & 16) != 0) {
22539 this.modifiers |= 1024;
22540 }});
22541 Clazz_defineMethod (c$, "setOldModifiers", 
22542  function () {
22543 if ((this.modifiers & 64) != 0) {
22544 this.modifiers |= 1;
22545 }if ((this.modifiers & 512) != 0) {
22546 this.modifiers |= 8;
22547 }if ((this.modifiers & 128) != 0) {
22548 this.modifiers |= 2;
22549 }if ((this.modifiers & 256) != 0) {
22550 this.modifiers |= 4;
22551 }if ((this.modifiers & 8192) != 0) {
22552 this.modifiers |= 32;
22553 }if ((this.modifiers & 1024) != 0) {
22554 this.modifiers |= 16;
22555 }});
22556 Clazz_defineStatics (c$,
22557 "KEY_FIRST", 400,
22558 "KEY_LAST", 402,
22559 "KEY_TYPED", 400,
22560 "KEY_PRESSED", 401,
22561 "KEY_RELEASED", 402,
22562 "VK_ENTER", '\n',
22563 "VK_BACK_SPACE", '\b',
22564 "VK_TAB", '\t',
22565 "VK_CANCEL", 0x03,
22566 "VK_CLEAR", 0x0C,
22567 "VK_SHIFT", 0x10,
22568 "VK_CONTROL", 0x11,
22569 "VK_ALT", 0x12,
22570 "VK_PAUSE", 0x13,
22571 "VK_CAPS_LOCK", 0x14,
22572 "VK_ESCAPE", 0x1B,
22573 "VK_SPACE", 0x20,
22574 "VK_PAGE_UP", 0x21,
22575 "VK_PAGE_DOWN", 0x22,
22576 "VK_END", 0x23,
22577 "VK_HOME", 0x24,
22578 "VK_LEFT", 0x25,
22579 "VK_UP", 0x26,
22580 "VK_RIGHT", 0x27,
22581 "VK_DOWN", 0x28,
22582 "VK_COMMA", 0x2C,
22583 "VK_MINUS", 0x2D,
22584 "VK_PERIOD", 0x2E,
22585 "VK_SLASH", 0x2F,
22586 "VK_0", 0x30,
22587 "VK_1", 0x31,
22588 "VK_2", 0x32,
22589 "VK_3", 0x33,
22590 "VK_4", 0x34,
22591 "VK_5", 0x35,
22592 "VK_6", 0x36,
22593 "VK_7", 0x37,
22594 "VK_8", 0x38,
22595 "VK_9", 0x39,
22596 "VK_SEMICOLON", 0x3B,
22597 "VK_EQUALS", 0x3D,
22598 "VK_A", 0x41,
22599 "VK_B", 0x42,
22600 "VK_C", 0x43,
22601 "VK_D", 0x44,
22602 "VK_E", 0x45,
22603 "VK_F", 0x46,
22604 "VK_G", 0x47,
22605 "VK_H", 0x48,
22606 "VK_I", 0x49,
22607 "VK_J", 0x4A,
22608 "VK_K", 0x4B,
22609 "VK_L", 0x4C,
22610 "VK_M", 0x4D,
22611 "VK_N", 0x4E,
22612 "VK_O", 0x4F,
22613 "VK_P", 0x50,
22614 "VK_Q", 0x51,
22615 "VK_R", 0x52,
22616 "VK_S", 0x53,
22617 "VK_T", 0x54,
22618 "VK_U", 0x55,
22619 "VK_V", 0x56,
22620 "VK_W", 0x57,
22621 "VK_X", 0x58,
22622 "VK_Y", 0x59,
22623 "VK_Z", 0x5A,
22624 "VK_OPEN_BRACKET", 0x5B,
22625 "VK_BACK_SLASH", 0x5C,
22626 "VK_CLOSE_BRACKET", 0x5D,
22627 "VK_NUMPAD0", 0x60,
22628 "VK_NUMPAD1", 0x61,
22629 "VK_NUMPAD2", 0x62,
22630 "VK_NUMPAD3", 0x63,
22631 "VK_NUMPAD4", 0x64,
22632 "VK_NUMPAD5", 0x65,
22633 "VK_NUMPAD6", 0x66,
22634 "VK_NUMPAD7", 0x67,
22635 "VK_NUMPAD8", 0x68,
22636 "VK_NUMPAD9", 0x69,
22637 "VK_MULTIPLY", 0x6A,
22638 "VK_ADD", 0x6B,
22639 "VK_SEPARATER", 0x6C,
22640 "VK_SEPARATOR", 108,
22641 "VK_SUBTRACT", 0x6D,
22642 "VK_DECIMAL", 0x6E,
22643 "VK_DIVIDE", 0x6F,
22644 "VK_DELETE", 0x7F,
22645 "VK_NUM_LOCK", 0x90,
22646 "VK_SCROLL_LOCK", 0x91,
22647 "VK_F1", 0x70,
22648 "VK_F2", 0x71,
22649 "VK_F3", 0x72,
22650 "VK_F4", 0x73,
22651 "VK_F5", 0x74,
22652 "VK_F6", 0x75,
22653 "VK_F7", 0x76,
22654 "VK_F8", 0x77,
22655 "VK_F9", 0x78,
22656 "VK_F10", 0x79,
22657 "VK_F11", 0x7A,
22658 "VK_F12", 0x7B,
22659 "VK_F13", 0xF000,
22660 "VK_F14", 0xF001,
22661 "VK_F15", 0xF002,
22662 "VK_F16", 0xF003,
22663 "VK_F17", 0xF004,
22664 "VK_F18", 0xF005,
22665 "VK_F19", 0xF006,
22666 "VK_F20", 0xF007,
22667 "VK_F21", 0xF008,
22668 "VK_F22", 0xF009,
22669 "VK_F23", 0xF00A,
22670 "VK_F24", 0xF00B,
22671 "VK_PRINTSCREEN", 0x9A,
22672 "VK_INSERT", 0x9B,
22673 "VK_HELP", 0x9C,
22674 "VK_META", 0x9D,
22675 "VK_BACK_QUOTE", 0xC0,
22676 "VK_QUOTE", 0xDE,
22677 "VK_KP_UP", 0xE0,
22678 "VK_KP_DOWN", 0xE1,
22679 "VK_KP_LEFT", 0xE2,
22680 "VK_KP_RIGHT", 0xE3,
22681 "VK_DEAD_GRAVE", 0x80,
22682 "VK_DEAD_ACUTE", 0x81,
22683 "VK_DEAD_CIRCUMFLEX", 0x82,
22684 "VK_DEAD_TILDE", 0x83,
22685 "VK_DEAD_MACRON", 0x84,
22686 "VK_DEAD_BREVE", 0x85,
22687 "VK_DEAD_ABOVEDOT", 0x86,
22688 "VK_DEAD_DIAERESIS", 0x87,
22689 "VK_DEAD_ABOVERING", 0x88,
22690 "VK_DEAD_DOUBLEACUTE", 0x89,
22691 "VK_DEAD_CARON", 0x8a,
22692 "VK_DEAD_CEDILLA", 0x8b,
22693 "VK_DEAD_OGONEK", 0x8c,
22694 "VK_DEAD_IOTA", 0x8d,
22695 "VK_DEAD_VOICED_SOUND", 0x8e,
22696 "VK_DEAD_SEMIVOICED_SOUND", 0x8f,
22697 "VK_AMPERSAND", 0x96,
22698 "VK_ASTERISK", 0x97,
22699 "VK_QUOTEDBL", 0x98,
22700 "VK_LESS", 0x99,
22701 "VK_GREATER", 0xa0,
22702 "VK_BRACELEFT", 0xa1,
22703 "VK_BRACERIGHT", 0xa2,
22704 "VK_AT", 0x0200,
22705 "VK_COLON", 0x0201,
22706 "VK_CIRCUMFLEX", 0x0202,
22707 "VK_DOLLAR", 0x0203,
22708 "VK_EURO_SIGN", 0x0204,
22709 "VK_EXCLAMATION_MARK", 0x0205,
22710 "VK_INVERTED_EXCLAMATION_MARK", 0x0206,
22711 "VK_LEFT_PARENTHESIS", 0x0207,
22712 "VK_NUMBER_SIGN", 0x0208,
22713 "VK_PLUS", 0x0209,
22714 "VK_RIGHT_PARENTHESIS", 0x020A,
22715 "VK_UNDERSCORE", 0x020B,
22716 "VK_WINDOWS", 0x020C,
22717 "VK_CONTEXT_MENU", 0x020D,
22718 "VK_FINAL", 0x0018,
22719 "VK_CONVERT", 0x001C,
22720 "VK_NONCONVERT", 0x001D,
22721 "VK_ACCEPT", 0x001E,
22722 "VK_MODECHANGE", 0x001F,
22723 "VK_KANA", 0x0015,
22724 "VK_KANJI", 0x0019,
22725 "VK_ALPHANUMERIC", 0x00F0,
22726 "VK_KATAKANA", 0x00F1,
22727 "VK_HIRAGANA", 0x00F2,
22728 "VK_FULL_WIDTH", 0x00F3,
22729 "VK_HALF_WIDTH", 0x00F4,
22730 "VK_ROMAN_CHARACTERS", 0x00F5,
22731 "VK_ALL_CANDIDATES", 0x0100,
22732 "VK_PREVIOUS_CANDIDATE", 0x0101,
22733 "VK_CODE_INPUT", 0x0102,
22734 "VK_JAPANESE_KATAKANA", 0x0103,
22735 "VK_JAPANESE_HIRAGANA", 0x0104,
22736 "VK_JAPANESE_ROMAN", 0x0105,
22737 "VK_KANA_LOCK", 0x0106,
22738 "VK_INPUT_METHOD_ON_OFF", 0x0107,
22739 "VK_CUT", 0xFFD1,
22740 "VK_COPY", 0xFFCD,
22741 "VK_PASTE", 0xFFCF,
22742 "VK_UNDO", 0xFFCB,
22743 "VK_AGAIN", 0xFFC9,
22744 "VK_FIND", 0xFFD0,
22745 "VK_PROPS", 0xFFCA,
22746 "VK_STOP", 0xFFC8,
22747 "VK_COMPOSE", 0xFF20,
22748 "VK_ALT_GRAPH", 0xFF7E,
22749 "VK_BEGIN", 0xFF58,
22750 "VK_UNDEFINED", 0x0,
22751 "CHAR_UNDEFINED", String.fromCharCode (0xFFFF),
22752 "KEY_LOCATION_UNKNOWN", 0,
22753 "KEY_LOCATION_STANDARD", 1,
22754 "KEY_LOCATION_LEFT", 2,
22755 "KEY_LOCATION_RIGHT", 3,
22756 "KEY_LOCATION_NUMPAD", 4);
22757 });
22758 Clazz_declarePackage ("java.awt.event");
22759 Clazz_load (["java.awt.event.MouseEvent"], "java.awt.event.MouseWheelEvent", null, function () {
22760 c$ = Clazz_decorateAsClass (function () {
22761 this.scrollType = 0;
22762 this.scrollAmount = 0;
22763 this.wheelRotation = 0;
22764 Clazz_instantialize (this, arguments);
22765 }, java.awt.event, "MouseWheelEvent", java.awt.event.MouseEvent);
22766 Clazz_makeConstructor (c$, 
22767 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22768 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation);
22769 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22770 Clazz_makeConstructor (c$, 
22771 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22772 Clazz_superConstructor (this, java.awt.event.MouseWheelEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
22773 this.scrollType = scrollType;
22774 this.scrollAmount = scrollAmount;
22775 this.wheelRotation = wheelRotation;
22776 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22777 Clazz_defineMethod (c$, "getScrollType", 
22778 function () {
22779 return this.scrollType;
22780 });
22781 Clazz_defineMethod (c$, "getScrollAmount", 
22782 function () {
22783 return this.scrollAmount;
22784 });
22785 Clazz_defineMethod (c$, "getWheelRotation", 
22786 function () {
22787 return this.wheelRotation;
22788 });
22789 Clazz_defineMethod (c$, "getUnitsToScroll", 
22790 function () {
22791 return this.scrollAmount * this.wheelRotation;
22792 });
22793 Clazz_defineMethod (c$, "paramString", 
22794 function () {
22795 var scrollTypeStr = null;
22796 if (this.getScrollType () == 0) {
22797 scrollTypeStr = "WHEEL_UNIT_SCROLL";
22798 } else if (this.getScrollType () == 1) {
22799 scrollTypeStr = "WHEEL_BLOCK_SCROLL";
22800 } else {
22801 scrollTypeStr = "unknown scroll type";
22802 }return Clazz_superCall (this, java.awt.event.MouseWheelEvent, "paramString", []) + ",scrollType=" + scrollTypeStr + ",scrollAmount=" + this.getScrollAmount () + ",wheelRotation=" + this.getWheelRotation ();
22803 });
22804 Clazz_defineStatics (c$,
22805 "WHEEL_UNIT_SCROLL", 0,
22806 "WHEEL_BLOCK_SCROLL", 1);
22807 });
22808 Clazz_declarePackage ("javax.swing");
22809 Clazz_load (["javax.swing.Action", "$.ArrayTable"], "javax.swing.AbstractAction", ["java.lang.Boolean", "javax.swing.event.SwingPropertyChangeSupport"], function () {
22810 c$ = Clazz_decorateAsClass (function () {
22811 this.enabled = true;
22812 this.arrayTable = null;
22813 this.changeSupport = null;
22814 Clazz_instantialize (this, arguments);
22815 }, javax.swing, "AbstractAction", null, [javax.swing.Action, Cloneable]);
22816 c$.shouldReconfigure = Clazz_defineMethod (c$, "shouldReconfigure", 
22817 function (e) {
22818 if (e.getPropertyName () == null) {
22819 javax.swing.AbstractAction.RECONFIGURE_ON_NULL = new Boolean (false);
22820 }return false;
22821 }, "java.beans.PropertyChangeEvent");
22822 c$.setEnabledFromAction = Clazz_defineMethod (c$, "setEnabledFromAction", 
22823 function (c, a) {
22824 c.setEnabled ((a != null) ? a.isEnabled () : true);
22825 }, "javax.swing.JComponent,javax.swing.Action");
22826 c$.setToolTipTextFromAction = Clazz_defineMethod (c$, "setToolTipTextFromAction", 
22827 function (c, a) {
22828 c.setToolTipText (a != null ? a.getValue ("ShortDescription") : null);
22829 }, "javax.swing.JComponent,javax.swing.Action");
22830 c$.hasSelectedKey = Clazz_defineMethod (c$, "hasSelectedKey", 
22831 function (a) {
22832 return (a != null && a.getValue ("SwingSelectedKey") != null);
22833 }, "javax.swing.Action");
22834 c$.isSelected = Clazz_defineMethod (c$, "isSelected", 
22835 function (a) {
22836 return Boolean.TRUE.equals (a.getValue ("SwingSelectedKey"));
22837 }, "javax.swing.Action");
22838 Clazz_makeConstructor (c$, 
22839 function () {
22840 });
22841 Clazz_makeConstructor (c$, 
22842 function (name) {
22843 this.putValue ("Name", name);
22844 }, "~S");
22845 Clazz_makeConstructor (c$, 
22846 function (name, icon) {
22847 this.construct (name);
22848 this.putValue ("SmallIcon", icon);
22849 }, "~S,javax.swing.Icon");
22850 Clazz_defineMethod (c$, "getValue", 
22851 function (key) {
22852 if (key === "enabled") {
22853 return this.enabled;
22854 }if (this.arrayTable == null) {
22855 return null;
22856 }return this.arrayTable.get (key);
22857 }, "~S");
22858 Clazz_overrideMethod (c$, "putValue", 
22859 function (key, newValue) {
22860 var oldValue = null;
22861 if (key === "enabled") {
22862 if (newValue == null || !(Clazz_instanceOf (newValue, Boolean))) {
22863 newValue = new Boolean (false);
22864 }oldValue = new Boolean (this.enabled);
22865 this.enabled = (newValue).booleanValue ();
22866 } else {
22867 if (this.arrayTable == null) {
22868 this.arrayTable =  new javax.swing.ArrayTable ();
22869 }if (this.arrayTable.containsKey (key)) oldValue = this.arrayTable.get (key);
22870 if (newValue == null) {
22871 this.arrayTable.remove (key);
22872 } else {
22873 this.arrayTable.put (key, newValue);
22874 }}this.firePropertyChange (key, oldValue, newValue);
22875 }, "~S,~O");
22876 Clazz_defineMethod (c$, "isEnabled", 
22877 function () {
22878 return this.enabled;
22879 });
22880 Clazz_overrideMethod (c$, "setEnabled", 
22881 function (newValue) {
22882 var oldValue = this.enabled;
22883 if (oldValue != newValue) {
22884 this.enabled = newValue;
22885 this.firePropertyChange ("enabled", Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
22886 }}, "~B");
22887 Clazz_defineMethod (c$, "getKeys", 
22888 function () {
22889 if (this.arrayTable == null) {
22890 return null;
22891 }var keys =  new Array (this.arrayTable.size ());
22892 this.arrayTable.getKeys (keys);
22893 return keys;
22894 });
22895 Clazz_defineMethod (c$, "firePropertyChange", 
22896 function (propertyName, oldValue, newValue) {
22897 if (this.changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
22898 return;
22899 }this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
22900 }, "~S,~O,~O");
22901 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
22902 function (listener) {
22903 if (this.changeSupport == null) {
22904 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
22905 }this.changeSupport.addPropertyChangeListener (listener);
22906 }, "java.beans.PropertyChangeListener");
22907 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
22908 function (listener) {
22909 if (this.changeSupport == null) {
22910 return;
22911 }this.changeSupport.removePropertyChangeListener (listener);
22912 }, "java.beans.PropertyChangeListener");
22913 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
22914 function () {
22915 if (this.changeSupport == null) {
22916 return  new Array (0);
22917 }return this.changeSupport.getPropertyChangeListeners ();
22918 });
22919 Clazz_defineMethod (c$, "clone", 
22920 function () {
22921 var newAction = Clazz_superCall (this, javax.swing.AbstractAction, "clone", []);
22922 {
22923 if (this.arrayTable != null) {
22924 newAction.arrayTable = this.arrayTable.clone ();
22925 }}return newAction;
22926 });
22927 Clazz_defineStatics (c$,
22928 "RECONFIGURE_ON_NULL", null);
22929 });
22930 Clazz_declarePackage ("javax.swing");
22931 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 () {
22932 c$ = Clazz_decorateAsClass (function () {
22933 this.model = null;
22934 this.text = "";
22935 this.margin = null;
22936 this.defaultMargin = null;
22937 this.defaultIcon = null;
22938 this.pressedIcon = null;
22939 this.disabledIcon = null;
22940 this.selectedIcon = null;
22941 this.disabledSelectedIcon = null;
22942 this.rolloverIcon = null;
22943 this.rolloverSelectedIcon = null;
22944 this.$paintBorder = true;
22945 this.paintFocus = true;
22946 this.rolloverEnabled = false;
22947 this.contentAreaFilled = true;
22948 this.verticalAlignment = 0;
22949 this.horizontalAlignment = 0;
22950 this.verticalTextPosition = 0;
22951 this.horizontalTextPosition = 11;
22952 this.iconTextGap = 4;
22953 this.mnemonic = 0;
22954 this.mnemonicIndex = -1;
22955 this.multiClickThreshhold = 0;
22956 this.borderPaintedSet = false;
22957 this.rolloverEnabledSet = false;
22958 this.iconTextGapSet = false;
22959 this.contentAreaFilledSet = false;
22960 this.$setLayout = false;
22961 this.defaultCapable = true;
22962 this.handler = null;
22963 this.changeListener = null;
22964 this.actionListener = null;
22965 this.itemListener = null;
22966 this.changeEvent = null;
22967 this.hideActionText = false;
22968 this.$action = null;
22969 this.actionPropertyChangeListener = null;
22970 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.ButtonChangeListener")) {
22971 javax.swing.AbstractButton.$AbstractButton$ButtonChangeListener$ ();
22972 }
22973 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.Handler")) {
22974 javax.swing.AbstractButton.$AbstractButton$Handler$ ();
22975 }
22976 Clazz_instantialize (this, arguments);
22977 }, javax.swing, "AbstractButton", javax.swing.JComponent, [java.awt.ItemSelectable, javax.swing.SwingConstants]);
22978 Clazz_defineMethod (c$, "setHideActionText", 
22979 function (hideActionText) {
22980 if (hideActionText != this.hideActionText) {
22981 this.hideActionText = hideActionText;
22982 if (this.getAction () != null) {
22983 this.setTextFromAction (this.getAction (), false);
22984 }this.firePropertyChangeBool ("hideActionText", !hideActionText, hideActionText);
22985 }}, "~B");
22986 Clazz_defineMethod (c$, "getHideActionText", 
22987 function () {
22988 return this.hideActionText;
22989 });
22990 Clazz_defineMethod (c$, "getText", 
22991 function () {
22992 return this.text;
22993 });
22994 Clazz_defineMethod (c$, "setText", 
22995 function (text) {
22996 var oldValue = this.text;
22997 this.text = text;
22998 this.firePropertyChangeObject ("text", oldValue, text);
22999 this.updateDisplayedMnemonicIndex (text, this.getMnemonic ());
23000 if (text == null || oldValue == null || !text.equals (oldValue)) {
23001 this.revalidate ();
23002 this.repaint ();
23003 }}, "~S");
23004 Clazz_defineMethod (c$, "isSelected", 
23005 function () {
23006 return this.model.isSelected ();
23007 });
23008 Clazz_defineMethod (c$, "setSelected", 
23009 function (b) {
23010 this.model.setSelected (b);
23011 }, "~B");
23012 Clazz_defineMethod (c$, "doClick", 
23013 function () {
23014 this.doClick (68);
23015 });
23016 Clazz_defineMethod (c$, "doClick", 
23017 function (pressTime) {
23018 }, "~N");
23019 Clazz_defineMethod (c$, "setMargin", 
23020 function (m) {
23021 if (Clazz_instanceOf (m, javax.swing.plaf.UIResource)) {
23022 this.defaultMargin = m;
23023 } else if (Clazz_instanceOf (this.margin, javax.swing.plaf.UIResource)) {
23024 this.defaultMargin = this.margin;
23025 }if (m == null && this.defaultMargin != null) {
23026 m = this.defaultMargin;
23027 }var old = this.margin;
23028 this.margin = m;
23029 this.firePropertyChangeObject ("margin", old, m);
23030 if (old == null || !old.equals (m)) {
23031 this.revalidate ();
23032 this.repaint ();
23033 }}, "java.awt.Insets");
23034 Clazz_defineMethod (c$, "getMargin", 
23035 function () {
23036 return (this.margin == null) ? null : this.margin.clone ();
23037 });
23038 Clazz_defineMethod (c$, "getIcon", 
23039 function () {
23040 return this.defaultIcon;
23041 });
23042 Clazz_defineMethod (c$, "setIcon", 
23043 function (defaultIcon) {
23044 var oldValue = this.defaultIcon;
23045 this.defaultIcon = defaultIcon;
23046 if (defaultIcon !== oldValue && (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource))) {
23047 this.disabledIcon = null;
23048 }this.firePropertyChangeObject ("icon", oldValue, defaultIcon);
23049 if (defaultIcon !== oldValue) {
23050 if (defaultIcon == null || oldValue == null || defaultIcon.getIconWidth () != oldValue.getIconWidth () || defaultIcon.getIconHeight () != oldValue.getIconHeight ()) {
23051 this.revalidate ();
23052 }this.repaint ();
23053 }}, "javax.swing.Icon");
23054 Clazz_defineMethod (c$, "getPressedIcon", 
23055 function () {
23056 return this.pressedIcon;
23057 });
23058 Clazz_defineMethod (c$, "setPressedIcon", 
23059 function (pressedIcon) {
23060 var oldValue = this.pressedIcon;
23061 this.pressedIcon = pressedIcon;
23062 this.firePropertyChangeObject ("pressedIcon", oldValue, pressedIcon);
23063 if (pressedIcon !== oldValue) {
23064 if (this.getModel ().isPressed ()) {
23065 this.repaint ();
23066 }}}, "javax.swing.Icon");
23067 Clazz_defineMethod (c$, "getSelectedIcon", 
23068 function () {
23069 return this.selectedIcon;
23070 });
23071 Clazz_defineMethod (c$, "setSelectedIcon", 
23072 function (selectedIcon) {
23073 var oldValue = this.selectedIcon;
23074 this.selectedIcon = selectedIcon;
23075 if (selectedIcon !== oldValue && Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23076 this.disabledSelectedIcon = null;
23077 }this.firePropertyChangeObject ("selectedIcon", oldValue, selectedIcon);
23078 if (selectedIcon !== oldValue) {
23079 if (this.isSelected ()) {
23080 this.repaint ();
23081 }}}, "javax.swing.Icon");
23082 Clazz_defineMethod (c$, "getRolloverIcon", 
23083 function () {
23084 return this.rolloverIcon;
23085 });
23086 Clazz_defineMethod (c$, "setRolloverIcon", 
23087 function (rolloverIcon) {
23088 var oldValue = this.rolloverIcon;
23089 this.rolloverIcon = rolloverIcon;
23090 this.firePropertyChangeObject ("rolloverIcon", oldValue, rolloverIcon);
23091 this.setRolloverEnabled (true);
23092 if (rolloverIcon !== oldValue) {
23093 this.repaint ();
23094 }}, "javax.swing.Icon");
23095 Clazz_defineMethod (c$, "getRolloverSelectedIcon", 
23096 function () {
23097 return this.rolloverSelectedIcon;
23098 });
23099 Clazz_defineMethod (c$, "setRolloverSelectedIcon", 
23100 function (rolloverSelectedIcon) {
23101 var oldValue = this.rolloverSelectedIcon;
23102 this.rolloverSelectedIcon = rolloverSelectedIcon;
23103 this.firePropertyChangeObject ("rolloverSelectedIcon", oldValue, rolloverSelectedIcon);
23104 this.setRolloverEnabled (true);
23105 if (rolloverSelectedIcon !== oldValue) {
23106 if (this.isSelected ()) {
23107 this.repaint ();
23108 }}}, "javax.swing.Icon");
23109 Clazz_defineMethod (c$, "getDisabledIcon", 
23110 function () {
23111 if (this.disabledIcon == null) {
23112 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.getIcon ());
23113 if (this.disabledIcon != null) {
23114 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
23115 }}return this.disabledIcon;
23116 });
23117 Clazz_defineMethod (c$, "setDisabledIcon", 
23118 function (disabledIcon) {
23119 var oldValue = this.disabledIcon;
23120 this.disabledIcon = disabledIcon;
23121 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
23122 if (disabledIcon !== oldValue) {
23123 if (!this.isEnabled ()) {
23124 this.repaint ();
23125 }}}, "javax.swing.Icon");
23126 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
23127 function () {
23128 if (this.disabledSelectedIcon == null) {
23129 if (this.selectedIcon != null) {
23130 this.disabledSelectedIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledSelectedIcon (this, this.getSelectedIcon ());
23131 } else {
23132 return this.getDisabledIcon ();
23133 }}return this.disabledSelectedIcon;
23134 });
23135 Clazz_defineMethod (c$, "setDisabledSelectedIcon", 
23136 function (disabledSelectedIcon) {
23137 var oldValue = this.disabledSelectedIcon;
23138 this.disabledSelectedIcon = disabledSelectedIcon;
23139 this.firePropertyChangeObject ("disabledSelectedIcon", oldValue, disabledSelectedIcon);
23140 if (disabledSelectedIcon !== oldValue) {
23141 if (disabledSelectedIcon == null || oldValue == null || disabledSelectedIcon.getIconWidth () != oldValue.getIconWidth () || disabledSelectedIcon.getIconHeight () != oldValue.getIconHeight ()) {
23142 this.revalidate ();
23143 }if (!this.isEnabled () && this.isSelected ()) {
23144 this.repaint ();
23145 }}}, "javax.swing.Icon");
23146 Clazz_defineMethod (c$, "getVerticalAlignment", 
23147 function () {
23148 return this.verticalAlignment;
23149 });
23150 Clazz_defineMethod (c$, "setVerticalAlignment", 
23151 function (alignment) {
23152 if (alignment == this.verticalAlignment) return;
23153 var oldValue = this.verticalAlignment;
23154 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
23155 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
23156 this.repaint ();
23157 }, "~N");
23158 Clazz_defineMethod (c$, "getHorizontalAlignment", 
23159 function () {
23160 return this.horizontalAlignment;
23161 });
23162 Clazz_defineMethod (c$, "setHorizontalAlignment", 
23163 function (alignment) {
23164 if (alignment == this.horizontalAlignment) return;
23165 var oldValue = this.horizontalAlignment;
23166 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
23167 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
23168 this.repaint ();
23169 }, "~N");
23170 Clazz_defineMethod (c$, "getVerticalTextPosition", 
23171 function () {
23172 return this.verticalTextPosition;
23173 });
23174 Clazz_defineMethod (c$, "setVerticalTextPosition", 
23175 function (textPosition) {
23176 if (textPosition == this.verticalTextPosition) return;
23177 var oldValue = this.verticalTextPosition;
23178 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
23179 this.firePropertyChangeInt ("verticalTextPosition", oldValue, this.verticalTextPosition);
23180 this.revalidate ();
23181 this.repaint ();
23182 }, "~N");
23183 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
23184 function () {
23185 return this.horizontalTextPosition;
23186 });
23187 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
23188 function (textPosition) {
23189 if (textPosition == this.horizontalTextPosition) return;
23190 var oldValue = this.horizontalTextPosition;
23191 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
23192 this.firePropertyChangeInt ("horizontalTextPosition", oldValue, this.horizontalTextPosition);
23193 this.revalidate ();
23194 this.repaint ();
23195 }, "~N");
23196 Clazz_defineMethod (c$, "getIconTextGap", 
23197 function () {
23198 return this.iconTextGap;
23199 });
23200 Clazz_defineMethod (c$, "setIconTextGap", 
23201 function (iconTextGap) {
23202 var oldValue = this.iconTextGap;
23203 this.iconTextGap = iconTextGap;
23204 this.iconTextGapSet = true;
23205 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
23206 if (iconTextGap != oldValue) {
23207 this.revalidate ();
23208 this.repaint ();
23209 }}, "~N");
23210 Clazz_defineMethod (c$, "checkHorizontalKey", 
23211 function (key, exception) {
23212 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
23213 return key;
23214 } else {
23215 throw  new IllegalArgumentException (exception);
23216 }}, "~N,~S");
23217 Clazz_defineMethod (c$, "checkVerticalKey", 
23218 function (key, exception) {
23219 if ((key == 1) || (key == 0) || (key == 3)) {
23220 return key;
23221 } else {
23222 throw  new IllegalArgumentException (exception);
23223 }}, "~N,~S");
23224 Clazz_defineMethod (c$, "removeNotify", 
23225 function () {
23226 Clazz_superCall (this, javax.swing.AbstractButton, "removeNotify", []);
23227 if (this.isRolloverEnabled ()) {
23228 this.getModel ().setRollover (false);
23229 }});
23230 Clazz_defineMethod (c$, "setActionCommand", 
23231 function (actionCommand) {
23232 this.getModel ().setActionCommand (actionCommand);
23233 }, "~S");
23234 Clazz_defineMethod (c$, "getActionCommand", 
23235 function () {
23236 var ac = this.getModel ().getActionCommand ();
23237 if (ac == null) {
23238 ac = this.getText ();
23239 }return ac;
23240 });
23241 Clazz_defineMethod (c$, "setAction", 
23242 function (a) {
23243 var oldValue = this.getAction ();
23244 if (this.$action == null || !this.$action.equals (a)) {
23245 this.$action = a;
23246 if (oldValue != null) {
23247 this.removeActionListener (oldValue);
23248 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
23249 this.actionPropertyChangeListener = null;
23250 }this.configurePropertiesFromAction (this.$action);
23251 if (this.$action != null) {
23252 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
23253 this.addActionListener (this.$action);
23254 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
23255 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
23256 }this.firePropertyChangeObject ("action", oldValue, this.$action);
23257 }}, "javax.swing.Action");
23258 Clazz_defineMethod (c$, "isListener", 
23259  function (c, a) {
23260 var isListener = false;
23261 var listeners = this.listenerList.getListenerList ();
23262 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23263 if (listeners[i] === c && listeners[i + 1] === a) {
23264 isListener = true;
23265 }}
23266 return isListener;
23267 }, "Class,java.awt.event.ActionListener");
23268 Clazz_defineMethod (c$, "getAction", 
23269 function () {
23270 return this.$action;
23271 });
23272 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
23273 function (a) {
23274 this.setMnemonicFromAction (a);
23275 this.setTextFromAction (a, false);
23276 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
23277 this.setIconFromAction (a);
23278 this.setActionCommandFromAction (a);
23279 javax.swing.AbstractAction.setEnabledFromAction (this, a);
23280 if (javax.swing.AbstractAction.hasSelectedKey (a) && this.shouldUpdateSelectedStateFromAction ()) {
23281 this.setSelectedFromAction (a);
23282 }this.setDisplayedMnemonicIndexFromAction (a, false);
23283 }, "javax.swing.Action");
23284 Clazz_overrideMethod (c$, "clientPropertyChanged", 
23285 function (key, oldValue, newValue) {
23286 if (key === "hideActionText") {
23287 var current = (Clazz_instanceOf (newValue, Boolean)) ? newValue : false;
23288 if (this.getHideActionText () != current) {
23289 this.setHideActionText (current);
23290 }}}, "~O,~O,~O");
23291 Clazz_defineMethod (c$, "shouldUpdateSelectedStateFromAction", 
23292 function () {
23293 return false;
23294 });
23295 Clazz_defineMethod (c$, "actionPropertyChanged", 
23296 function (action, propertyName) {
23297 if (propertyName === "Name") {
23298 this.setTextFromAction (action, true);
23299 } else if (propertyName === "enabled") {
23300 javax.swing.AbstractAction.setEnabledFromAction (this, action);
23301 } else if (propertyName === "ShortDescription") {
23302 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
23303 } else if (propertyName === "SmallIcon") {
23304 this.smallIconChanged (action);
23305 } else if (propertyName === "MnemonicKey") {
23306 this.setMnemonicFromAction (action);
23307 } else if (propertyName === "ActionCommandKey") {
23308 this.setActionCommandFromAction (action);
23309 } else if (propertyName === "SwingSelectedKey" && javax.swing.AbstractAction.hasSelectedKey (action) && this.shouldUpdateSelectedStateFromAction ()) {
23310 this.setSelectedFromAction (action);
23311 } else if (propertyName === "SwingDisplayedMnemonicIndexKey") {
23312 this.setDisplayedMnemonicIndexFromAction (action, true);
23313 } else if (propertyName === "SwingLargeIconKey") {
23314 this.largeIconChanged (action);
23315 }}, "javax.swing.Action,~S");
23316 Clazz_defineMethod (c$, "setDisplayedMnemonicIndexFromAction", 
23317  function (a, fromPropertyChange) {
23318 var iValue = (a == null) ? null : a.getValue ("SwingDisplayedMnemonicIndexKey");
23319 if (fromPropertyChange || iValue != null) {
23320 var value;
23321 if (iValue == null) {
23322 value = -1;
23323 } else {
23324 value = (iValue).intValue ();
23325 var text = this.getText ();
23326 if (text == null || value >= text.length) {
23327 value = -1;
23328 }}this.setDisplayedMnemonicIndex (value);
23329 }}, "javax.swing.Action,~B");
23330 Clazz_defineMethod (c$, "setMnemonicFromAction", 
23331  function (a) {
23332 var n = (a == null) ? null : a.getValue ("MnemonicKey");
23333 this.setMnemonic ((n == null) ? '\0' : n);
23334 }, "javax.swing.Action");
23335 Clazz_defineMethod (c$, "setTextFromAction", 
23336  function (a, propertyChange) {
23337 var hideText = this.getHideActionText ();
23338 if (!propertyChange) {
23339 this.setText ((a != null && !hideText) ? a.getValue ("Name") : null);
23340 } else if (!hideText) {
23341 this.setText (a.getValue ("Name"));
23342 }}, "javax.swing.Action,~B");
23343 Clazz_defineMethod (c$, "setIconFromAction", 
23344 function (a) {
23345 var icon = null;
23346 if (a != null) {
23347 icon = a.getValue ("SwingLargeIconKey");
23348 if (icon == null) {
23349 icon = a.getValue ("SmallIcon");
23350 }}this.setIcon (icon);
23351 }, "javax.swing.Action");
23352 Clazz_defineMethod (c$, "smallIconChanged", 
23353 function (a) {
23354 if (a.getValue ("SwingLargeIconKey") == null) {
23355 this.setIconFromAction (a);
23356 }}, "javax.swing.Action");
23357 Clazz_defineMethod (c$, "largeIconChanged", 
23358 function (a) {
23359 this.setIconFromAction (a);
23360 }, "javax.swing.Action");
23361 Clazz_defineMethod (c$, "setActionCommandFromAction", 
23362  function (a) {
23363 this.setActionCommand ((a != null) ? a.getValue ("ActionCommandKey") : null);
23364 }, "javax.swing.Action");
23365 Clazz_defineMethod (c$, "setSelectedFromAction", 
23366  function (a) {
23367 var selected = false;
23368 if (a != null) {
23369 selected = javax.swing.AbstractAction.isSelected (a);
23370 }if (selected != this.isSelected ()) {
23371 this.setSelected (selected);
23372 if (!selected && this.isSelected ()) {
23373 if (Clazz_instanceOf (this.getModel (), javax.swing.DefaultButtonModel)) {
23374 var group = (this.getModel ()).getGroup ();
23375 if (group != null) {
23376 group.clearSelection ();
23377 }}}}}, "javax.swing.Action");
23378 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
23379 function (a) {
23380 return this.createActionPropertyChangeListener0 (a);
23381 }, "javax.swing.Action");
23382 Clazz_defineMethod (c$, "createActionPropertyChangeListener0", 
23383 function (a) {
23384 return  new javax.swing.AbstractButton.ButtonActionPropertyChangeListener (this, a);
23385 }, "javax.swing.Action");
23386 Clazz_defineMethod (c$, "isBorderPainted", 
23387 function () {
23388 return this.$paintBorder;
23389 });
23390 Clazz_defineMethod (c$, "setBorderPainted", 
23391 function (b) {
23392 var oldValue = this.$paintBorder;
23393 this.$paintBorder = b;
23394 this.borderPaintedSet = true;
23395 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
23396 if (b != oldValue) {
23397 this.revalidate ();
23398 this.repaint ();
23399 }}, "~B");
23400 Clazz_defineMethod (c$, "paintBorder", 
23401 function (g) {
23402 if (this.isBorderPainted ()) {
23403 Clazz_superCall (this, javax.swing.AbstractButton, "paintBorder", [g]);
23404 }}, "java.awt.Graphics");
23405 Clazz_defineMethod (c$, "isFocusPainted", 
23406 function () {
23407 return this.paintFocus;
23408 });
23409 Clazz_defineMethod (c$, "setFocusPainted", 
23410 function (b) {
23411 var oldValue = this.paintFocus;
23412 this.paintFocus = b;
23413 this.firePropertyChangeBool ("focusPainted", oldValue, this.paintFocus);
23414 if (b != oldValue && this.isFocusOwner ()) {
23415 this.revalidate ();
23416 this.repaint ();
23417 }}, "~B");
23418 Clazz_defineMethod (c$, "isContentAreaFilled", 
23419 function () {
23420 return this.contentAreaFilled;
23421 });
23422 Clazz_defineMethod (c$, "setContentAreaFilled", 
23423 function (b) {
23424 var oldValue = this.contentAreaFilled;
23425 this.contentAreaFilled = b;
23426 this.contentAreaFilledSet = true;
23427 this.firePropertyChangeBool ("contentAreaFilled", oldValue, this.contentAreaFilled);
23428 if (b != oldValue) {
23429 this.repaint ();
23430 }}, "~B");
23431 Clazz_defineMethod (c$, "isRolloverEnabled", 
23432 function () {
23433 return this.rolloverEnabled;
23434 });
23435 Clazz_defineMethod (c$, "setRolloverEnabled", 
23436 function (b) {
23437 var oldValue = this.rolloverEnabled;
23438 this.rolloverEnabled = b;
23439 this.rolloverEnabledSet = true;
23440 this.firePropertyChangeBool ("rolloverEnabled", oldValue, this.rolloverEnabled);
23441 if (b != oldValue) {
23442 this.repaint ();
23443 }}, "~B");
23444 Clazz_defineMethod (c$, "getMnemonic", 
23445 function () {
23446 return this.mnemonic;
23447 });
23448 Clazz_defineMethod (c$, "setMnemonic", 
23449 function (mnemonic) {
23450 this.model.setMnemonic (mnemonic);
23451 this.updateMnemonicProperties ();
23452 }, "~N");
23453 Clazz_defineMethod (c$, "setMnemonic", 
23454 function (mnemonic) {
23455 var vk = (mnemonic).charCodeAt (0);
23456 if (vk >= 97 && vk <= 122) vk -= (32);
23457 this.setMnemonic (vk);
23458 }, "~S");
23459 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
23460 function (index) {
23461 var oldValue = this.mnemonicIndex;
23462 if (index == -1) {
23463 this.mnemonicIndex = -1;
23464 } else {
23465 var text = this.getText ();
23466 var textLength = (text == null) ? 0 : text.length;
23467 if (index < -1 || index >= textLength) {
23468 throw  new IllegalArgumentException ("index == " + index);
23469 }}this.mnemonicIndex = index;
23470 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
23471 if (index != oldValue) {
23472 this.revalidate ();
23473 this.repaint ();
23474 }}, "~N");
23475 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
23476 function () {
23477 return this.mnemonicIndex;
23478 });
23479 Clazz_defineMethod (c$, "updateDisplayedMnemonicIndex", 
23480  function (text, mnemonic) {
23481 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, mnemonic));
23482 }, "~S,~N");
23483 Clazz_defineMethod (c$, "updateMnemonicProperties", 
23484  function () {
23485 var newMnemonic = this.model.getMnemonic ();
23486 if (this.mnemonic != newMnemonic) {
23487 var oldValue = this.mnemonic;
23488 this.mnemonic = newMnemonic;
23489 this.firePropertyChangeInt ("mnemonic", oldValue, this.mnemonic);
23490 this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23491 this.revalidate ();
23492 this.repaint ();
23493 }});
23494 Clazz_defineMethod (c$, "setMultiClickThreshhold", 
23495 function (threshhold) {
23496 if (threshhold < 0) {
23497 throw  new IllegalArgumentException ("threshhold must be >= 0");
23498 }this.multiClickThreshhold = threshhold;
23499 }, "~N");
23500 Clazz_defineMethod (c$, "getMultiClickThreshhold", 
23501 function () {
23502 return this.multiClickThreshhold;
23503 });
23504 Clazz_defineMethod (c$, "getModel", 
23505 function () {
23506 return this.model;
23507 });
23508 Clazz_defineMethod (c$, "setModel", 
23509 function (newModel) {
23510 var oldModel = this.getModel ();
23511 if (oldModel != null) {
23512 oldModel.removeChangeListener (this.changeListener);
23513 oldModel.removeActionListener (this.actionListener);
23514 oldModel.removeItemListener (this.itemListener);
23515 this.changeListener = null;
23516 this.actionListener = null;
23517 this.itemListener = null;
23518 }this.model = newModel;
23519 if (newModel != null) {
23520 this.changeListener = this.createChangeListener ();
23521 this.actionListener = this.createActionListener ();
23522 this.itemListener = this.createItemListener ();
23523 newModel.addChangeListener (this.changeListener);
23524 newModel.addActionListener (this.actionListener);
23525 newModel.addItemListener (this.itemListener);
23526 this.updateMnemonicProperties ();
23527 Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [newModel.isEnabled ()]);
23528 } else {
23529 this.mnemonic = 0;
23530 }this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23531 this.firePropertyChangeObject ("model", oldModel, newModel);
23532 if (newModel !== oldModel) {
23533 this.revalidate ();
23534 this.repaint ();
23535 }}, "javax.swing.ButtonModel");
23536 Clazz_overrideMethod (c$, "getUI", 
23537 function () {
23538 return this.ui;
23539 });
23540 Clazz_defineMethod (c$, "setUI", 
23541 function (ui) {
23542 Clazz_superCall (this, javax.swing.AbstractButton, "setUI", [ui]);
23543 if (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource)) {
23544 this.setDisabledIcon (null);
23545 }if (Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23546 this.setDisabledSelectedIcon (null);
23547 }}, "javax.swing.plaf.ButtonUI");
23548 Clazz_overrideMethod (c$, "updateUI", 
23549 function () {
23550 });
23551 Clazz_overrideMethod (c$, "addImpl", 
23552 function (comp, constraints, index) {
23553 if (!this.$setLayout) {
23554 this.setLayout ( new javax.swing.OverlayLayout (this));
23555 }return this.addImplSAEM (comp, constraints, index);
23556 }, "java.awt.Component,~O,~N");
23557 Clazz_defineMethod (c$, "setLayout", 
23558 function (mgr) {
23559 this.$setLayout = true;
23560 Clazz_superCall (this, javax.swing.AbstractButton, "setLayout", [mgr]);
23561 }, "java.awt.LayoutManager");
23562 Clazz_defineMethod (c$, "addChangeListener", 
23563 function (l) {
23564 this.listenerList.add (javax.swing.event.ChangeListener, l);
23565 }, "javax.swing.event.ChangeListener");
23566 Clazz_defineMethod (c$, "removeChangeListener", 
23567 function (l) {
23568 this.listenerList.remove (javax.swing.event.ChangeListener, l);
23569 }, "javax.swing.event.ChangeListener");
23570 Clazz_defineMethod (c$, "getChangeListeners", 
23571 function () {
23572 return (this.listenerList.getListeners (javax.swing.event.ChangeListener));
23573 });
23574 Clazz_defineMethod (c$, "fireStateChanged", 
23575 function () {
23576 var listeners = this.listenerList.getListenerList ();
23577 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23578 if (listeners[i] === javax.swing.event.ChangeListener) {
23579 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
23580 (listeners[i + 1]).stateChanged (this.changeEvent);
23581 }}
23582 });
23583 Clazz_defineMethod (c$, "addActionListener", 
23584 function (l) {
23585 this.listenerList.add (java.awt.event.ActionListener, l);
23586 }, "java.awt.event.ActionListener");
23587 Clazz_defineMethod (c$, "removeActionListener", 
23588 function (l) {
23589 if ((l != null) && (this.getAction () === l)) {
23590 this.setAction (null);
23591 } else {
23592 this.listenerList.remove (java.awt.event.ActionListener, l);
23593 }}, "java.awt.event.ActionListener");
23594 Clazz_defineMethod (c$, "getActionListeners", 
23595 function () {
23596 return (this.listenerList.getListeners (java.awt.event.ActionListener));
23597 });
23598 Clazz_defineMethod (c$, "createChangeListener", 
23599 function () {
23600 return this.getHandler ();
23601 });
23602 Clazz_defineMethod (c$, "fireActionPerformed", 
23603 function (event) {
23604 var listeners = this.listenerList.getListenerList ();
23605 var e = null;
23606 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23607 if (listeners[i] === java.awt.event.ActionListener) {
23608 if (e == null) {
23609 var actionCommand = event.getActionCommand ();
23610 if (actionCommand == null) {
23611 actionCommand = this.getActionCommand ();
23612 }e =  new java.awt.event.ActionEvent (this, 1001, actionCommand, event.getWhen (), event.getModifiers ());
23613 }(listeners[i + 1]).actionPerformed (e);
23614 }}
23615 }, "java.awt.event.ActionEvent");
23616 Clazz_defineMethod (c$, "fireItemStateChanged", 
23617 function (event) {
23618 var listeners = this.listenerList.getListenerList ();
23619 var e = null;
23620 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23621 if (listeners[i] === java.awt.event.ItemListener) {
23622 if (e == null) {
23623 e =  new java.awt.event.ItemEvent (this, 701, this, event.getStateChange ());
23624 }(listeners[i + 1]).itemStateChanged (e);
23625 }}
23626 }, "java.awt.event.ItemEvent");
23627 Clazz_defineMethod (c$, "createActionListener", 
23628 function () {
23629 return this.getHandler ();
23630 });
23631 Clazz_defineMethod (c$, "createItemListener", 
23632 function () {
23633 return this.getHandler ();
23634 });
23635 Clazz_defineMethod (c$, "setEnabled", 
23636 function (b) {
23637 if (!b && this.model.isRollover ()) {
23638 this.model.setRollover (false);
23639 }Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [b]);
23640 this.model.setEnabled (b);
23641 }, "~B");
23642 Clazz_defineMethod (c$, "getLabel", 
23643 function () {
23644 return this.getText ();
23645 });
23646 Clazz_defineMethod (c$, "setLabel", 
23647 function (label) {
23648 this.setText (label);
23649 }, "~S");
23650 Clazz_overrideMethod (c$, "addItemListener", 
23651 function (l) {
23652 this.listenerList.add (java.awt.event.ItemListener, l);
23653 }, "java.awt.event.ItemListener");
23654 Clazz_overrideMethod (c$, "removeItemListener", 
23655 function (l) {
23656 this.listenerList.remove (java.awt.event.ItemListener, l);
23657 }, "java.awt.event.ItemListener");
23658 Clazz_defineMethod (c$, "getItemListeners", 
23659 function () {
23660 return this.listenerList.getListeners (java.awt.event.ItemListener);
23661 });
23662 Clazz_overrideMethod (c$, "getSelectedObjects", 
23663 function () {
23664 if (this.isSelected () == false) {
23665 return null;
23666 }var selectedObjects =  new Array (1);
23667 selectedObjects[0] = this.getText ();
23668 return selectedObjects;
23669 });
23670 Clazz_defineMethod (c$, "init", 
23671 function (text, icon) {
23672 if (text != null) {
23673 this.setText (text);
23674 }if (icon != null) {
23675 this.setIcon (icon);
23676 }this.updateUI ();
23677 this.setAlignmentX (0.0);
23678 this.setAlignmentY (0.5);
23679 }, "~S,javax.swing.Icon");
23680 Clazz_defineMethod (c$, "imageUpdate", 
23681 function (img, infoflags, x, y, w, h) {
23682 var iconDisplayed = this.getIcon ();
23683 if (iconDisplayed == null) {
23684 return false;
23685 }if (!this.model.isEnabled ()) {
23686 if (this.model.isSelected ()) {
23687 iconDisplayed = this.getDisabledSelectedIcon ();
23688 } else {
23689 iconDisplayed = this.getDisabledIcon ();
23690 }} else if (this.model.isPressed () && this.model.isArmed ()) {
23691 iconDisplayed = this.getPressedIcon ();
23692 } else if (this.isRolloverEnabled () && this.model.isRollover ()) {
23693 if (this.model.isSelected ()) {
23694 iconDisplayed = this.getRolloverSelectedIcon ();
23695 } else {
23696 iconDisplayed = this.getRolloverIcon ();
23697 }} else if (this.model.isSelected ()) {
23698 iconDisplayed = this.getSelectedIcon ();
23699 }if (!javax.swing.SwingUtilities.doesIconReferenceImage (iconDisplayed, img)) {
23700 return false;
23701 }return Clazz_superCall (this, javax.swing.AbstractButton, "imageUpdate", [img, infoflags, x, y, w, h]);
23702 }, "java.awt.Image,~N,~N,~N,~N,~N");
23703 Clazz_defineMethod (c$, "setUIProperty", 
23704 function (propertyName, value) {
23705 if (propertyName === "borderPainted") {
23706 if (!this.borderPaintedSet) {
23707 this.setBorderPainted ((value).booleanValue ());
23708 this.borderPaintedSet = false;
23709 }} else if (propertyName === "rolloverEnabled") {
23710 if (!this.rolloverEnabledSet) {
23711 this.setRolloverEnabled ((value).booleanValue ());
23712 this.rolloverEnabledSet = false;
23713 }} else if (propertyName === "iconTextGap") {
23714 if (!this.iconTextGapSet) {
23715 this.setIconTextGap ((value).intValue ());
23716 this.iconTextGapSet = false;
23717 }} else if (propertyName === "contentAreaFilled") {
23718 if (!this.contentAreaFilledSet) {
23719 this.setContentAreaFilled ((value).booleanValue ());
23720 this.contentAreaFilledSet = false;
23721 }} else {
23722 Clazz_superCall (this, javax.swing.AbstractButton, "setUIProperty", [propertyName, value]);
23723 }}, "~S,~O");
23724 Clazz_defineMethod (c$, "paramString", 
23725 function () {
23726 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
23727 var pressedIconString = ((this.pressedIcon != null) && (this.pressedIcon !== this) ? this.pressedIcon.toString () : "");
23728 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
23729 var selectedIconString = ((this.selectedIcon != null) && (this.selectedIcon !== this) ? this.selectedIcon.toString () : "");
23730 var disabledSelectedIconString = ((this.disabledSelectedIcon != null) && (this.disabledSelectedIcon !== this) ? this.disabledSelectedIcon.toString () : "");
23731 var rolloverIconString = ((this.rolloverIcon != null) && (this.rolloverIcon !== this) ? this.rolloverIcon.toString () : "");
23732 var rolloverSelectedIconString = ((this.rolloverSelectedIcon != null) && (this.rolloverSelectedIcon !== this) ? this.rolloverSelectedIcon.toString () : "");
23733 var paintBorderString = (this.$paintBorder ? "true" : "false");
23734 var paintFocusString = (this.paintFocus ? "true" : "false");
23735 var rolloverEnabledString = (this.rolloverEnabled ? "true" : "false");
23736 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;
23737 });
23738 Clazz_defineMethod (c$, "getHandler", 
23739  function () {
23740 if (this.handler == null) {
23741 this.handler = Clazz_innerTypeInstance (javax.swing.AbstractButton.Handler, this, null);
23742 }return this.handler;
23743 });
23744 c$.$AbstractButton$ButtonChangeListener$ = function () {
23745 Clazz_pu$h(self.c$);
23746 c$ = Clazz_decorateAsClass (function () {
23747 Clazz_prepareCallback (this, arguments);
23748 Clazz_instantialize (this, arguments);
23749 }, javax.swing.AbstractButton, "ButtonChangeListener", null, javax.swing.event.ChangeListener);
23750 Clazz_makeConstructor (c$, 
23751 function () {
23752 });
23753 Clazz_overrideMethod (c$, "stateChanged", 
23754 function (a) {
23755 this.b$["javax.swing.AbstractButton"].getHandler ().stateChanged (a);
23756 }, "javax.swing.event.ChangeEvent");
23757 c$ = Clazz_p0p ();
23758 };
23759 c$.$AbstractButton$Handler$ = function () {
23760 Clazz_pu$h(self.c$);
23761 c$ = Clazz_decorateAsClass (function () {
23762 Clazz_prepareCallback (this, arguments);
23763 Clazz_instantialize (this, arguments);
23764 }, javax.swing.AbstractButton, "Handler", null, [java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.awt.event.ItemListener]);
23765 Clazz_overrideMethod (c$, "stateChanged", 
23766 function (a) {
23767 this.b$["javax.swing.AbstractButton"].updateMnemonicProperties ();
23768 if (this.b$["javax.swing.AbstractButton"].isEnabled () != this.b$["javax.swing.AbstractButton"].model.isEnabled ()) {
23769 this.b$["javax.swing.AbstractButton"].setEnabled (this.b$["javax.swing.AbstractButton"].model.isEnabled ());
23770 }this.b$["javax.swing.AbstractButton"].fireStateChanged ();
23771 this.b$["javax.swing.AbstractButton"].repaint ();
23772 }, "javax.swing.event.ChangeEvent");
23773 Clazz_overrideMethod (c$, "actionPerformed", 
23774 function (a) {
23775 this.b$["javax.swing.AbstractButton"].fireActionPerformed (a);
23776 }, "java.awt.event.ActionEvent");
23777 Clazz_overrideMethod (c$, "itemStateChanged", 
23778 function (a) {
23779 this.b$["javax.swing.AbstractButton"].fireItemStateChanged (a);
23780 if (this.b$["javax.swing.AbstractButton"].shouldUpdateSelectedStateFromAction ()) {
23781 var b = this.b$["javax.swing.AbstractButton"].getAction ();
23782 if (b != null && javax.swing.AbstractAction.hasSelectedKey (b)) {
23783 var c = this.b$["javax.swing.AbstractButton"].isSelected ();
23784 var d = javax.swing.AbstractAction.isSelected (b);
23785 if (d != c) {
23786 b.putValue ("SwingSelectedKey", new Boolean (c));
23787 }}}}, "java.awt.event.ItemEvent");
23788 c$ = Clazz_p0p ();
23789 };
23790 Clazz_pu$h(self.c$);
23791 c$ = Clazz_declareType (javax.swing.AbstractButton, "ButtonActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
23792 Clazz_overrideMethod (c$, "actionPropertyChanged", 
23793 function (a, b, c) {
23794 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
23795 a.configurePropertiesFromAction (b);
23796 } else {
23797 a.actionPropertyChanged (b, c.getPropertyName ());
23798 }}, "javax.swing.AbstractButton,javax.swing.Action,java.beans.PropertyChangeEvent");
23799 c$ = Clazz_p0p ();
23800 Clazz_defineStatics (c$,
23801 "MODEL_CHANGED_PROPERTY", "model",
23802 "TEXT_CHANGED_PROPERTY", "text",
23803 "MNEMONIC_CHANGED_PROPERTY", "mnemonic",
23804 "MARGIN_CHANGED_PROPERTY", "margin",
23805 "VERTICAL_ALIGNMENT_CHANGED_PROPERTY", "verticalAlignment",
23806 "HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY", "horizontalAlignment",
23807 "VERTICAL_TEXT_POSITION_CHANGED_PROPERTY", "verticalTextPosition",
23808 "HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY", "horizontalTextPosition",
23809 "BORDER_PAINTED_CHANGED_PROPERTY", "borderPainted",
23810 "FOCUS_PAINTED_CHANGED_PROPERTY", "focusPainted",
23811 "ROLLOVER_ENABLED_CHANGED_PROPERTY", "rolloverEnabled",
23812 "CONTENT_AREA_FILLED_CHANGED_PROPERTY", "contentAreaFilled",
23813 "ICON_CHANGED_PROPERTY", "icon",
23814 "PRESSED_ICON_CHANGED_PROPERTY", "pressedIcon",
23815 "SELECTED_ICON_CHANGED_PROPERTY", "selectedIcon",
23816 "ROLLOVER_ICON_CHANGED_PROPERTY", "rolloverIcon",
23817 "ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY", "rolloverSelectedIcon",
23818 "DISABLED_ICON_CHANGED_PROPERTY", "disabledIcon",
23819 "DISABLED_SELECTED_ICON_CHANGED_PROPERTY", "disabledSelectedIcon");
23820 });
23821 Clazz_declarePackage ("javax.swing");
23822 Clazz_load (null, "javax.swing.ArrayTable", ["java.util.Hashtable"], function () {
23823 c$ = Clazz_decorateAsClass (function () {
23824 this.table = null;
23825 Clazz_instantialize (this, arguments);
23826 }, javax.swing, "ArrayTable", null, Cloneable);
23827 Clazz_makeConstructor (c$, 
23828 function () {
23829 });
23830 Clazz_defineMethod (c$, "put", 
23831 function (key, value) {
23832 if (this.table == null) {
23833 this.table =  Clazz_newArray (-1, [key, value]);
23834 } else {
23835 var size = this.size ();
23836 if (size < 8) {
23837 if (this.containsKey (key)) {
23838 var tmp = this.table;
23839 for (var i = 0; i < tmp.length - 1; i += 2) {
23840 if (tmp[i].equals (key)) {
23841 tmp[i + 1] = value;
23842 break;
23843 }}
23844 } else {
23845 var array = this.table;
23846 var i = array.length;
23847 var tmp =  new Array (i + 2);
23848 System.arraycopy (array, 0, tmp, 0, i);
23849 tmp[i] = key;
23850 tmp[i + 1] = value;
23851 this.table = tmp;
23852 }} else {
23853 if ((size == 8) && this.isArray ()) {
23854 this.grow ();
23855 }(this.table).put (key, value);
23856 }}}, "~O,~O");
23857 Clazz_defineMethod (c$, "get", 
23858 function (key) {
23859 var value = null;
23860 if (this.table != null) {
23861 if (this.isArray ()) {
23862 var array = this.table;
23863 for (var i = 0; i < array.length - 1; i += 2) {
23864 if (array[i].equals (key)) {
23865 value = array[i + 1];
23866 break;
23867 }}
23868 } else {
23869 value = (this.table).get (key);
23870 }}return value;
23871 }, "~O");
23872 Clazz_defineMethod (c$, "size", 
23873 function () {
23874 var size;
23875 if (this.table == null) return 0;
23876 if (this.isArray ()) {
23877 size = Clazz_doubleToInt ((this.table).length / 2);
23878 } else {
23879 size = (this.table).size ();
23880 }return size;
23881 });
23882 Clazz_defineMethod (c$, "containsKey", 
23883 function (key) {
23884 var contains = false;
23885 if (this.table != null) {
23886 if (this.isArray ()) {
23887 var array = this.table;
23888 for (var i = 0; i < array.length - 1; i += 2) {
23889 if (array[i].equals (key)) {
23890 contains = true;
23891 break;
23892 }}
23893 } else {
23894 contains = (this.table).containsKey (key);
23895 }}return contains;
23896 }, "~O");
23897 Clazz_defineMethod (c$, "remove", 
23898 function (key) {
23899 var value = null;
23900 if (key == null) {
23901 return null;
23902 }if (this.table != null) {
23903 if (this.isArray ()) {
23904 var index = -1;
23905 var array = this.table;
23906 for (var i = array.length - 2; i >= 0; i -= 2) {
23907 if (array[i].equals (key)) {
23908 index = i;
23909 value = array[i + 1];
23910 break;
23911 }}
23912 if (index != -1) {
23913 var tmp =  new Array (array.length - 2);
23914 System.arraycopy (array, 0, tmp, 0, index);
23915 if (index < tmp.length) System.arraycopy (array, index + 2, tmp, index, tmp.length - index);
23916 this.table = (tmp.length == 0) ? null : tmp;
23917 }} else {
23918 value = (this.table).remove (key);
23919 }if (this.size () == 7 && !this.isArray ()) {
23920 this.shrink ();
23921 }}return value;
23922 }, "~O");
23923 Clazz_defineMethod (c$, "clear", 
23924 function () {
23925 this.table = null;
23926 });
23927 Clazz_overrideMethod (c$, "clone", 
23928 function () {
23929 var newArrayTable =  new javax.swing.ArrayTable ();
23930 if (this.isArray ()) {
23931 var array = this.table;
23932 for (var i = 0; i < array.length - 1; i += 2) {
23933 newArrayTable.put (array[i], array[i + 1]);
23934 }
23935 } else {
23936 var tmp = this.table;
23937 var keys = tmp.keys ();
23938 while (keys.hasMoreElements ()) {
23939 var o = keys.nextElement ();
23940 newArrayTable.put (o, tmp.get (o));
23941 }
23942 }return newArrayTable;
23943 });
23944 Clazz_defineMethod (c$, "getKeys", 
23945 function (keys) {
23946 if (this.table == null) {
23947 return null;
23948 }if (this.isArray ()) {
23949 var array = this.table;
23950 if (keys == null) {
23951 keys =  new Array (Clazz_doubleToInt (array.length / 2));
23952 }for (var i = 0, index = 0; i < array.length - 1; i += 2, index++) {
23953 keys[index] = array[i];
23954 }
23955 } else {
23956 var tmp = this.table;
23957 var enum_ = tmp.keys ();
23958 var counter = tmp.size ();
23959 if (keys == null) {
23960 keys =  new Array (counter);
23961 }while (counter > 0) {
23962 keys[--counter] = enum_.nextElement ();
23963 }
23964 }return keys;
23965 }, "~A");
23966 Clazz_defineMethod (c$, "isArray", 
23967  function () {
23968 return (Clazz_instanceOf (this.table, Array));
23969 });
23970 Clazz_defineMethod (c$, "grow", 
23971  function () {
23972 var array = this.table;
23973 var tmp =  new java.util.Hashtable (Clazz_doubleToInt (array.length / 2));
23974 for (var i = 0; i < array.length; i += 2) {
23975 tmp.put (array[i], array[i + 1]);
23976 }
23977 this.table = tmp;
23978 });
23979 Clazz_defineMethod (c$, "shrink", 
23980  function () {
23981 var tmp = this.table;
23982 var array =  new Array (tmp.size () * 2);
23983 var keys = tmp.keys ();
23984 var j = 0;
23985 while (keys.hasMoreElements ()) {
23986 var o = keys.nextElement ();
23987 array[j] = o;
23988 array[j + 1] = tmp.get (o);
23989 j += 2;
23990 }
23991 this.table = array;
23992 });
23993 Clazz_defineStatics (c$,
23994 "ARRAY_BOUNDARY", 8);
23995 });
23996 Clazz_declarePackage ("javax.swing.event");
23997 Clazz_load (["java.beans.PropertyChangeSupport"], "javax.swing.event.SwingPropertyChangeSupport", ["java.lang.NullPointerException", "javax.swing.SwingUtilities"], function () {
23998 c$ = Clazz_decorateAsClass (function () {
23999 this.notifyOnEDT = false;
24000 Clazz_instantialize (this, arguments);
24001 }, javax.swing.event, "SwingPropertyChangeSupport", java.beans.PropertyChangeSupport);
24002 Clazz_makeConstructor (c$, 
24003 function (sourceBean) {
24004 this.construct (sourceBean, false);
24005 }, "~O");
24006 Clazz_makeConstructor (c$, 
24007 function (sourceBean, notifyOnEDT) {
24008 Clazz_superConstructor (this, javax.swing.event.SwingPropertyChangeSupport, [sourceBean]);
24009 this.notifyOnEDT = notifyOnEDT;
24010 }, "~O,~B");
24011 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
24012 function (evt) {
24013 if (evt == null) {
24014 throw  new NullPointerException ();
24015 }if (!this.isNotifyOnEDT () || javax.swing.SwingUtilities.isEventDispatchThread ()) {
24016 Clazz_superCall (this, javax.swing.event.SwingPropertyChangeSupport, "firePropertyChangeEvt", [evt]);
24017 } else {
24018 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))));
24019 }}, "java.beans.PropertyChangeEvent");
24020 Clazz_defineMethod (c$, "isNotifyOnEDT", 
24021 function () {
24022 return this.notifyOnEDT;
24023 });
24024 c$.$SwingPropertyChangeSupport$1$ = function () {
24025 Clazz_pu$h(self.c$);
24026 c$ = Clazz_declareAnonymous (javax.swing.event, "SwingPropertyChangeSupport$1", null, Runnable);
24027 Clazz_overrideMethod (c$, "run", 
24028 function () {
24029 this.b$["javax.swing.event.SwingPropertyChangeSupport"].firePropertyChangeEvt (this.f$.evt);
24030 });
24031 c$ = Clazz_p0p ();
24032 };
24033 });
24034 Clazz_declarePackage ("javax.swing");
24035 Clazz_load (["javax.swing.JComponent"], "javax.swing.JLayeredPane", ["java.util.ArrayList", "$.Hashtable", "java.awt.Color"], function () {
24036 c$ = Clazz_decorateAsClass (function () {
24037 this.componentToLayer = null;
24038 this.optimizedDrawingPossible = true;
24039 Clazz_instantialize (this, arguments);
24040 }, javax.swing, "JLayeredPane", javax.swing.JComponent);
24041 Clazz_makeConstructor (c$, 
24042 function () {
24043 Clazz_superConstructor (this, javax.swing.JLayeredPane, []);
24044 this.setLayout (null);
24045 });
24046 Clazz_defineMethod (c$, "validateOptimizedDrawing", 
24047  function () {
24048 var layeredComponentFound = false;
24049 {
24050 var layer = null;
24051 for (var c, $c = 0, $$c = this.getComponents (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
24052 layer = null;
24053 if ((Clazz_instanceOf (c, javax.swing.JComponent) && (layer = (c).getClientProperty ("layeredContainerLayer")) != null)) {
24054 if (layer != null && layer.equals (javax.swing.JLayeredPane.FRAME_CONTENT_LAYER)) continue;
24055 layeredComponentFound = true;
24056 break;
24057 }}
24058 }if (layeredComponentFound) this.optimizedDrawingPossible = false;
24059  else this.optimizedDrawingPossible = true;
24060 });
24061 Clazz_overrideMethod (c$, "addImpl", 
24062 function (comp, constraints, index) {
24063 var layer = javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24064 var pos;
24065 if (Clazz_instanceOf (constraints, Integer)) {
24066 layer = (constraints).intValue ();
24067 this.setLayer (comp, layer);
24068 } else layer = this.getLayer (comp);
24069 pos = this.insertIndexForLayer (layer, index);
24070 this.addImplSAEM (comp, constraints, pos);
24071 comp.validate ();
24072 comp.repaint ();
24073 this.validateOptimizedDrawing ();
24074 return comp;
24075 }, "java.awt.Component,~O,~N");
24076 Clazz_defineMethod (c$, "remove", 
24077 function (index) {
24078 var c = this.getComponent (index);
24079 Clazz_superCall (this, javax.swing.JLayeredPane, "remove", [index]);
24080 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24081 this.getComponentToLayer ().remove (c);
24082 }this.validateOptimizedDrawing ();
24083 }, "~N");
24084 Clazz_defineMethod (c$, "removeAll", 
24085 function () {
24086 var children = this.getComponents ();
24087 var cToL = this.getComponentToLayer ();
24088 for (var counter = children.length - 1; counter >= 0; counter--) {
24089 var c = children[counter];
24090 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24091 cToL.remove (c);
24092 }}
24093 Clazz_superCall (this, javax.swing.JLayeredPane, "removeAll", []);
24094 });
24095 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
24096 function () {
24097 return this.optimizedDrawingPossible;
24098 });
24099 c$.putLayer = Clazz_defineMethod (c$, "putLayer", 
24100 function (c, layer) {
24101 var layerObj;
24102 layerObj =  new Integer (layer);
24103 c.putClientProperty ("layeredContainerLayer", layerObj);
24104 }, "javax.swing.JComponent,~N");
24105 c$.getLayer = Clazz_defineMethod (c$, "getLayer", 
24106 function (c) {
24107 var i;
24108 if ((i = c.getClientProperty ("layeredContainerLayer")) != null) return i.intValue ();
24109 return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24110 }, "javax.swing.JComponent");
24111 c$.getLayeredPaneAbove = Clazz_defineMethod (c$, "getLayeredPaneAbove", 
24112 function (c) {
24113 if (c == null) return null;
24114 var parent = c.getParent ();
24115 while (parent != null && !(Clazz_instanceOf (parent, javax.swing.JLayeredPane))) parent = parent.getParent ();
24116
24117 return parent;
24118 }, "java.awt.Component");
24119 Clazz_defineMethod (c$, "setLayer", 
24120 function (c, layer) {
24121 this.setLayer (c, layer, -1);
24122 }, "java.awt.Component,~N");
24123 Clazz_defineMethod (c$, "setLayer", 
24124 function (c, layer, position) {
24125 var layerObj;
24126 layerObj = this.getObjectForLayer (layer);
24127 if (layer == this.getLayer (c) && position == this.getPosition (c)) {
24128 this.repaint (c.getBounds ());
24129 return;
24130 }if (Clazz_instanceOf (c, javax.swing.JComponent)) (c).putClientProperty ("layeredContainerLayer", layerObj);
24131  else this.getComponentToLayer ().put (c, layerObj);
24132 if (c.getParent () == null || c.getParent () !== this) {
24133 this.repaint (c.getBounds ());
24134 return;
24135 }var index = this.insertIndexForLayer (c, layer, position);
24136 this.setComponentZOrder (c, index);
24137 this.repaint (c.getBounds ());
24138 }, "java.awt.Component,~N,~N");
24139 Clazz_defineMethod (c$, "getLayer", 
24140 function (c) {
24141 var i;
24142 if (Clazz_instanceOf (c, javax.swing.JComponent)) i = (c).getClientProperty ("layeredContainerLayer");
24143  else i = this.getComponentToLayer ().get (c);
24144 if (i == null) return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24145 return i.intValue ();
24146 }, "java.awt.Component");
24147 Clazz_defineMethod (c$, "getIndexOf", 
24148 function (c) {
24149 var i;
24150 var count;
24151 count = this.getComponentCount ();
24152 for (i = 0; i < count; i++) {
24153 if (c === this.getComponent (i)) return i;
24154 }
24155 return -1;
24156 }, "java.awt.Component");
24157 Clazz_defineMethod (c$, "moveToFront", 
24158 function (c) {
24159 this.setPosition (c, 0);
24160 }, "java.awt.Component");
24161 Clazz_defineMethod (c$, "moveToBack", 
24162 function (c) {
24163 this.setPosition (c, -1);
24164 }, "java.awt.Component");
24165 Clazz_defineMethod (c$, "setPosition", 
24166 function (c, position) {
24167 this.setLayer (c, this.getLayer (c), position);
24168 }, "java.awt.Component,~N");
24169 Clazz_defineMethod (c$, "getPosition", 
24170 function (c) {
24171 var i;
24172 var count;
24173 var startLayer;
24174 var curLayer;
24175 var startLocation;
24176 var pos = 0;
24177 count = this.getComponentCount ();
24178 startLocation = this.getIndexOf (c);
24179 if (startLocation == -1) return -1;
24180 startLayer = this.getLayer (c);
24181 for (i = startLocation - 1; i >= 0; i--) {
24182 curLayer = this.getLayer (this.getComponent (i));
24183 if (curLayer == startLayer) pos++;
24184  else return pos;
24185 }
24186 return pos;
24187 }, "java.awt.Component");
24188 Clazz_defineMethod (c$, "highestLayer", 
24189 function () {
24190 if (this.getComponentCount () > 0) return this.getLayer (this.getComponent (0));
24191 return 0;
24192 });
24193 Clazz_defineMethod (c$, "lowestLayer", 
24194 function () {
24195 var count = this.getComponentCount ();
24196 if (count > 0) return this.getLayer (this.getComponent (count - 1));
24197 return 0;
24198 });
24199 Clazz_defineMethod (c$, "getComponentCountInLayer", 
24200 function (layer) {
24201 var i;
24202 var count;
24203 var curLayer;
24204 var layerCount = 0;
24205 count = this.getComponentCount ();
24206 for (i = 0; i < count; i++) {
24207 curLayer = this.getLayer (this.getComponent (i));
24208 if (curLayer == layer) {
24209 layerCount++;
24210 } else if (layerCount > 0 || curLayer < layer) {
24211 break;
24212 }}
24213 return layerCount;
24214 }, "~N");
24215 Clazz_defineMethod (c$, "getComponentsInLayer", 
24216 function (layer) {
24217 var i;
24218 var count;
24219 var curLayer;
24220 var layerCount = 0;
24221 var results;
24222 results =  new Array (this.getComponentCountInLayer (layer));
24223 count = this.getComponentCount ();
24224 for (i = 0; i < count; i++) {
24225 curLayer = this.getLayer (this.getComponent (i));
24226 if (curLayer == layer) {
24227 results[layerCount++] = this.getComponent (i);
24228 } else if (layerCount > 0 || curLayer < layer) {
24229 break;
24230 }}
24231 return results;
24232 }, "~N");
24233 Clazz_defineMethod (c$, "paint", 
24234 function (g) {
24235 if (this.isOpaque ()) {
24236 var r = g.getClipBounds ();
24237 var c = this.getBackground ();
24238 if (c == null) c = java.awt.Color.lightGray;
24239 g.setColor (c);
24240 if (r != null) {
24241 g.fillRect (r.x, r.y, r.width, r.height);
24242 } else {
24243 g.fillRect (0, 0, this.getWidth (), this.getHeight ());
24244 }}Clazz_superCall (this, javax.swing.JLayeredPane, "paint", [g]);
24245 }, "java.awt.Graphics");
24246 Clazz_defineMethod (c$, "getComponentToLayer", 
24247 function () {
24248 if (this.componentToLayer == null) this.componentToLayer =  new java.util.Hashtable (4);
24249 return this.componentToLayer;
24250 });
24251 Clazz_defineMethod (c$, "getObjectForLayer", 
24252 function (layer) {
24253 var layerObj;
24254 switch (layer) {
24255 case 0:
24256 layerObj = javax.swing.JLayeredPane.DEFAULT_LAYER;
24257 break;
24258 case 100:
24259 layerObj = javax.swing.JLayeredPane.PALETTE_LAYER;
24260 break;
24261 case 200:
24262 layerObj = javax.swing.JLayeredPane.MODAL_LAYER;
24263 break;
24264 case 300:
24265 layerObj = javax.swing.JLayeredPane.POPUP_LAYER;
24266 break;
24267 case 400:
24268 layerObj = javax.swing.JLayeredPane.DRAG_LAYER;
24269 break;
24270 default:
24271 layerObj =  new Integer (layer);
24272 }
24273 return layerObj;
24274 }, "~N");
24275 Clazz_defineMethod (c$, "insertIndexForLayer", 
24276 function (layer, position) {
24277 return this.insertIndexForLayer (null, layer, position);
24278 }, "~N,~N");
24279 Clazz_defineMethod (c$, "insertIndexForLayer", 
24280  function (comp, layer, position) {
24281 var i;
24282 var count;
24283 var curLayer;
24284 var layerStart = -1;
24285 var layerEnd = -1;
24286 var componentCount = this.getComponentCount ();
24287 var compList =  new java.util.ArrayList (componentCount);
24288 for (var index = 0; index < componentCount; index++) {
24289 if (this.getComponent (index) !== comp) {
24290 compList.add (this.getComponent (index));
24291 }}
24292 count = compList.size ();
24293 for (i = 0; i < count; i++) {
24294 curLayer = this.getLayer (compList.get (i));
24295 if (layerStart == -1 && curLayer == layer) {
24296 layerStart = i;
24297 }if (curLayer < layer) {
24298 if (i == 0) {
24299 layerStart = 0;
24300 layerEnd = 0;
24301 } else {
24302 layerEnd = i;
24303 }break;
24304 }}
24305 if (layerStart == -1 && layerEnd == -1) return count;
24306 if (layerStart != -1 && layerEnd == -1) layerEnd = count;
24307 if (layerEnd != -1 && layerStart == -1) layerStart = layerEnd;
24308 if (position == -1) return layerEnd;
24309 if (position > -1 && layerStart + position <= layerEnd) return layerStart + position;
24310 return layerEnd;
24311 }, "java.awt.Component,~N,~N");
24312 Clazz_defineMethod (c$, "paramString", 
24313 function () {
24314 var optimizedDrawingPossibleString = (this.optimizedDrawingPossible ? "true" : "false");
24315 return Clazz_superCall (this, javax.swing.JLayeredPane, "paramString", []) + ",optimizedDrawingPossible=" + optimizedDrawingPossibleString;
24316 });
24317 c$.DEFAULT_LAYER = c$.prototype.DEFAULT_LAYER =  new Integer (0);
24318 c$.PALETTE_LAYER = c$.prototype.PALETTE_LAYER =  new Integer (100);
24319 c$.MODAL_LAYER = c$.prototype.MODAL_LAYER =  new Integer (200);
24320 c$.POPUP_LAYER = c$.prototype.POPUP_LAYER =  new Integer (300);
24321 c$.DRAG_LAYER = c$.prototype.DRAG_LAYER =  new Integer (400);
24322 c$.FRAME_CONTENT_LAYER = c$.prototype.FRAME_CONTENT_LAYER =  new Integer (-30000);
24323 Clazz_defineStatics (c$,
24324 "LAYER_PROPERTY", "layeredContainerLayer");
24325 });
24326 Clazz_declarePackage ("javax.swing");
24327 Clazz_load (["javax.swing.JComponent"], "javax.swing.JPanel", ["java.lang.Boolean", "java.awt.FlowLayout", "javax.swing.UIManager"], function () {
24328 c$ = Clazz_declareType (javax.swing, "JPanel", javax.swing.JComponent);
24329 Clazz_makeConstructor (c$, 
24330 function (layout, isDoubleBuffered) {
24331 Clazz_superConstructor (this, javax.swing.JPanel, []);
24332 this.setLayout (layout);
24333 this.setUIProperty ("opaque", Boolean.TRUE);
24334 this.updateUI ();
24335 }, "java.awt.LayoutManager,~B");
24336 Clazz_makeConstructor (c$, 
24337 function (layout) {
24338 this.construct (layout, true);
24339 }, "java.awt.LayoutManager");
24340 Clazz_makeConstructor (c$, 
24341 function (isDoubleBuffered) {
24342 this.construct ( new java.awt.FlowLayout (), isDoubleBuffered);
24343 }, "~B");
24344 Clazz_makeConstructor (c$, 
24345 function () {
24346 this.construct (true);
24347 });
24348 Clazz_overrideMethod (c$, "updateUI", 
24349 function () {
24350 this.setUI (javax.swing.UIManager.getUI (this));
24351 });
24352 Clazz_overrideMethod (c$, "getUI", 
24353 function () {
24354 return this.ui;
24355 });
24356 Clazz_overrideMethod (c$, "getUIClassID", 
24357 function () {
24358 return "PanelUI";
24359 });
24360 Clazz_defineStatics (c$,
24361 "$uiClassID", "PanelUI");
24362 });
24363 Clazz_declarePackage ("javax.swing");
24364 Clazz_load (["java.lang.Enum", "java.util.Enumeration", "javax.swing.UIDefaults"], "javax.swing.MultiUIDefaults", ["java.lang.StringBuffer", "java.util.HashSet"], function () {
24365 c$ = Clazz_decorateAsClass (function () {
24366 this.tables = null;
24367 Clazz_instantialize (this, arguments);
24368 }, javax.swing, "MultiUIDefaults", javax.swing.UIDefaults);
24369 Clazz_makeConstructor (c$, 
24370 function (defaults) {
24371 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24372 this.tables = defaults;
24373 }, "~A");
24374 Clazz_makeConstructor (c$, 
24375 function () {
24376 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24377 this.tables =  new Array (0);
24378 });
24379 Clazz_defineMethod (c$, "get", 
24380 function (key) {
24381 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key]);
24382 if (value != null) {
24383 return value;
24384 }for (var i = 0; i < this.tables.length; i++) {
24385 var table = this.tables[i];
24386 value = (table != null) ? table.get (key) : null;
24387 if (value != null) {
24388 return value;
24389 }}
24390 return null;
24391 }, "~O");
24392 Clazz_defineMethod (c$, "get", 
24393 function (key, l) {
24394 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key, l]);
24395 if (value != null) {
24396 return value;
24397 }for (var i = 0; i < this.tables.length; i++) {
24398 var table = this.tables[i];
24399 value = (table != null) ? table.get (key, l) : null;
24400 if (value != null) {
24401 return value;
24402 }}
24403 return null;
24404 }, "~O,java.util.Locale");
24405 Clazz_overrideMethod (c$, "size", 
24406 function () {
24407 return this.entrySet ().size ();
24408 });
24409 Clazz_overrideMethod (c$, "isEmpty", 
24410 function () {
24411 return this.size () == 0;
24412 });
24413 Clazz_overrideMethod (c$, "keys", 
24414 function () {
24415 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS, this.entrySet ());
24416 });
24417 Clazz_overrideMethod (c$, "elements", 
24418 function () {
24419 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS, this.entrySet ());
24420 });
24421 Clazz_defineMethod (c$, "entrySet", 
24422 function () {
24423 var set =  new java.util.HashSet ();
24424 for (var i = this.tables.length - 1; i >= 0; i--) {
24425 if (this.tables[i] != null) {
24426 set.addAll (this.tables[i].entrySet ());
24427 }}
24428 set.addAll (Clazz_superCall (this, javax.swing.MultiUIDefaults, "entrySet", []));
24429 return set;
24430 });
24431 Clazz_defineMethod (c$, "getUIError", 
24432 function (msg) {
24433 if (this.tables.length > 0) {
24434 this.tables[0].getUIError (msg);
24435 } else {
24436 Clazz_superCall (this, javax.swing.MultiUIDefaults, "getUIError", [msg]);
24437 }}, "~S");
24438 Clazz_defineMethod (c$, "remove", 
24439 function (key) {
24440 var value = null;
24441 for (var i = this.tables.length - 1; i >= 0; i--) {
24442 if (this.tables[i] != null) {
24443 var v = this.tables[i].remove (key);
24444 if (v != null) {
24445 value = v;
24446 }}}
24447 var v = Clazz_superCall (this, javax.swing.MultiUIDefaults, "remove", [key]);
24448 if (v != null) {
24449 value = v;
24450 }return value;
24451 }, "~O");
24452 Clazz_defineMethod (c$, "clear", 
24453 function () {
24454 Clazz_superCall (this, javax.swing.MultiUIDefaults, "clear", []);
24455 for (var i = 0; i < this.tables.length; i++) {
24456 var table = this.tables[i];
24457 if (table != null) {
24458 table.clear ();
24459 }}
24460 });
24461 Clazz_overrideMethod (c$, "toString", 
24462 function () {
24463 var buf =  new StringBuffer ();
24464 buf.append ("{");
24465 var keys = this.keys ();
24466 while (keys.hasMoreElements ()) {
24467 var key = keys.nextElement ();
24468 buf.append (key + "=" + this.get (key) + ", ");
24469 }
24470 var length = buf.length ();
24471 if (length > 1) {
24472 buf.$delete (length - 2, length);
24473 }buf.append ("}");
24474 return buf.toString ();
24475 });
24476 Clazz_pu$h(self.c$);
24477 c$ = Clazz_decorateAsClass (function () {
24478 this.iterator = null;
24479 this.type = null;
24480 Clazz_instantialize (this, arguments);
24481 }, javax.swing.MultiUIDefaults, "MultiUIDefaultsEnumerator", null, java.util.Enumeration);
24482 Clazz_makeConstructor (c$, 
24483 function (a, b) {
24484 this.type = a;
24485 this.iterator = b.iterator ();
24486 }, "javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type,java.util.Set");
24487 Clazz_overrideMethod (c$, "hasMoreElements", 
24488 function () {
24489 return this.iterator.hasNext ();
24490 });
24491 Clazz_overrideMethod (c$, "nextElement", 
24492 function () {
24493 switch (this.type) {
24494 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS:
24495 return this.iterator.next ().getKey ();
24496 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS:
24497 return this.iterator.next ().getValue ();
24498 default:
24499 return null;
24500 }
24501 });
24502 Clazz_pu$h(self.c$);
24503 c$ = Clazz_declareType (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator, "Type", Enum);
24504 Clazz_defineEnumConstant (c$, "KEYS", 0, []);
24505 Clazz_defineEnumConstant (c$, "ELEMENTS", 1, []);
24506 c$ = Clazz_p0p ();
24507 c$ = Clazz_p0p ();
24508 });
24509 Clazz_declarePackage ("java.awt");
24510 Clazz_load (null, "java.awt.Font", ["java.awt.font.TextAttribute", "java.awt.geom.AffineTransform", "swingjs.JSToolkit"], function () {
24511 c$ = Clazz_decorateAsClass (function () {
24512 this.family = null;
24513 this.name = null;
24514 this.style = 0;
24515 this.size = 0;
24516 this.pointSize = 0;
24517 this.$hasLayoutAttributes = false;
24518 this.nonIdentityTx = false;
24519 this.hash = 0;
24520 Clazz_instantialize (this, arguments);
24521 }, java.awt, "Font");
24522 Clazz_makeConstructor (c$, 
24523 function (name, style, size) {
24524 this.name = (name != null) ? name : "Default";
24525 this.style = (style & -4) == 0 ? style : 0;
24526 this.size = size;
24527 this.pointSize = size;
24528 }, "~S,~N,~N");
24529 Clazz_makeConstructor (c$, 
24530  function (name, style, sizePts) {
24531 this.name = (name != null) ? name : "Default";
24532 this.style = (style & -4) == 0 ? style : 0;
24533 this.size = Clazz_doubleToInt (sizePts + 0.5);
24534 this.pointSize = sizePts;
24535 }, "~S,~N,~N");
24536 Clazz_makeConstructor (c$, 
24537 function (font) {
24538 this.name = font.name;
24539 this.style = font.style;
24540 this.size = font.size;
24541 this.pointSize = font.pointSize;
24542 }, "java.awt.Font");
24543 Clazz_defineMethod (c$, "getTransform", 
24544 function () {
24545 return  new java.awt.geom.AffineTransform ();
24546 });
24547 Clazz_defineMethod (c$, "getFamily", 
24548 function () {
24549 return (this.family == null ? this.family = swingjs.JSToolkit.getFontFamily (this) : this.family);
24550 });
24551 Clazz_defineMethod (c$, "getName", 
24552 function () {
24553 return this.name;
24554 });
24555 Clazz_defineMethod (c$, "getFontName", 
24556 function () {
24557 return this.name;
24558 });
24559 Clazz_defineMethod (c$, "getStyle", 
24560 function () {
24561 return this.style;
24562 });
24563 Clazz_defineMethod (c$, "getSize", 
24564 function () {
24565 return this.size;
24566 });
24567 Clazz_defineMethod (c$, "getSize2D", 
24568 function () {
24569 return this.pointSize;
24570 });
24571 Clazz_defineMethod (c$, "isPlain", 
24572 function () {
24573 return this.style == 0;
24574 });
24575 Clazz_defineMethod (c$, "isBold", 
24576 function () {
24577 return (this.style & 1) != 0;
24578 });
24579 Clazz_defineMethod (c$, "isItalic", 
24580 function () {
24581 return (this.style & 2) != 0;
24582 });
24583 Clazz_defineMethod (c$, "isTransformed", 
24584 function () {
24585 return this.nonIdentityTx;
24586 });
24587 Clazz_defineMethod (c$, "hasLayoutAttributes", 
24588 function () {
24589 return this.$hasLayoutAttributes;
24590 });
24591 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24592 function (nm) {
24593 return java.awt.Font.getFont (nm, null);
24594 }, "~S");
24595 c$.decode = Clazz_defineMethod (c$, "decode", 
24596 function (str) {
24597 var fontName = str;
24598 var styleName = "";
24599 var fontSize = 12;
24600 var fontStyle = 0;
24601 if (str == null) {
24602 return  new java.awt.Font ("Dialog", fontStyle, fontSize);
24603 }var lastHyphen = str.lastIndexOf ('-');
24604 var lastSpace = str.lastIndexOf (' ');
24605 var sepChar = (lastHyphen > lastSpace) ? '-' : ' ';
24606 var sizeIndex = str.lastIndexOf (sepChar);
24607 var styleIndex = str.lastIndexOf (sepChar, sizeIndex - 1);
24608 var strlen = str.length;
24609 if (sizeIndex > 0 && sizeIndex + 1 < strlen) {
24610 try {
24611 fontSize = Integer.$valueOf (str.substring (sizeIndex + 1)).intValue ();
24612 if (fontSize <= 0) {
24613 fontSize = 12;
24614 }} catch (e) {
24615 if (Clazz_exceptionOf (e, NumberFormatException)) {
24616 styleIndex = sizeIndex;
24617 sizeIndex = strlen;
24618 if (str.charAt (sizeIndex - 1) == sepChar) {
24619 sizeIndex--;
24620 }} else {
24621 throw e;
24622 }
24623 }
24624 }if (styleIndex >= 0 && styleIndex + 1 < strlen) {
24625 styleName = str.substring (styleIndex + 1, sizeIndex);
24626 styleName = styleName.toLowerCase ();
24627 if (styleName.equals ("bolditalic")) {
24628 fontStyle = 3;
24629 } else if (styleName.equals ("italic")) {
24630 fontStyle = 2;
24631 } else if (styleName.equals ("bold")) {
24632 fontStyle = 1;
24633 } else if (styleName.equals ("plain")) {
24634 fontStyle = 0;
24635 } else {
24636 styleIndex = sizeIndex;
24637 if (str.charAt (styleIndex - 1) == sepChar) {
24638 styleIndex--;
24639 }}fontName = str.substring (0, styleIndex);
24640 } else {
24641 var fontEnd = strlen;
24642 if (styleIndex > 0) {
24643 fontEnd = styleIndex;
24644 } else if (sizeIndex > 0) {
24645 fontEnd = sizeIndex;
24646 }if (fontEnd > 0 && str.charAt (fontEnd - 1) == sepChar) {
24647 fontEnd--;
24648 }fontName = str.substring (0, fontEnd);
24649 }return  new java.awt.Font (fontName, fontStyle, fontSize);
24650 }, "~S");
24651 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24652 function (nm, font) {
24653 var str = null;
24654 try {
24655 str = System.getProperty (nm);
24656 } catch (e) {
24657 if (Clazz_exceptionOf (e, SecurityException)) {
24658 } else {
24659 throw e;
24660 }
24661 }
24662 if (str == null) {
24663 return font;
24664 }return java.awt.Font.decode (str);
24665 }, "~S,java.awt.Font");
24666 Clazz_overrideMethod (c$, "hashCode", 
24667 function () {
24668 if (this.hash == 0) {
24669 this.hash = this.name.hashCode () ^ this.style ^ this.size;
24670 }return this.hash;
24671 });
24672 Clazz_overrideMethod (c$, "equals", 
24673 function (obj) {
24674 if (obj === this) {
24675 return true;
24676 }if (obj != null) {
24677 try {
24678 var font = obj;
24679 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)) {
24680 return true;
24681 }} catch (e) {
24682 if (Clazz_exceptionOf (e, ClassCastException)) {
24683 } else {
24684 throw e;
24685 }
24686 }
24687 }return false;
24688 }, "~O");
24689 Clazz_overrideMethod (c$, "toString", 
24690 function () {
24691 var strStyle;
24692 if (this.isBold ()) {
24693 strStyle = this.isItalic () ? "bolditalic" : "bold";
24694 } else {
24695 strStyle = this.isItalic () ? "italic" : "plain";
24696 }return this.getClass ().getName () + "[family=" + this.getFamily () + ",name=" + this.name + ",style=" + strStyle + ",size=" + this.size + "]";
24697 });
24698 Clazz_defineMethod (c$, "getAvailableAttributes", 
24699 function () {
24700 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]);
24701 return attributes;
24702 });
24703 Clazz_defineMethod (c$, "deriveFont", 
24704 function (style, size) {
24705 return  new java.awt.Font (this.name, style, size);
24706 }, "~N,~N");
24707 Clazz_defineMethod (c$, "deriveFont", 
24708 function (size) {
24709 return  new java.awt.Font (this.name, this.style, size);
24710 }, "~N");
24711 Clazz_defineMethod (c$, "deriveFont", 
24712 function (style) {
24713 return  new java.awt.Font (this.name, style, this.size);
24714 }, "~N");
24715 Clazz_defineMethod (c$, "hasUniformLineMetrics", 
24716 function () {
24717 return false;
24718 });
24719 Clazz_overrideMethod (c$, "finalize", 
24720 function () {
24721 });
24722 Clazz_defineStatics (c$,
24723 "DIALOG", "Dialog",
24724 "DIALOG_INPUT", "DialogInput",
24725 "SANS_SERIF", "SansSerif",
24726 "SERIF", "Serif",
24727 "MONOSPACED", "Monospaced",
24728 "PLAIN", 0,
24729 "BOLD", 1,
24730 "ITALIC", 2,
24731 "ROMAN_BASELINE", 0,
24732 "CENTER_BASELINE", 1,
24733 "HANGING_BASELINE", 2,
24734 "TRUETYPE_FONT", 0,
24735 "TYPE1_FONT", 1,
24736 "LAYOUT_LEFT_TO_RIGHT", 0,
24737 "LAYOUT_RIGHT_TO_LEFT", 1,
24738 "LAYOUT_NO_START_CONTEXT", 2,
24739 "LAYOUT_NO_LIMIT_CONTEXT", 4);
24740 });
24741 Clazz_declarePackage ("java.awt.font");
24742 Clazz_load (["java.text.AttributedCharacterIterator", "java.lang.Boolean", "$.Float", "java.util.HashMap"], "java.awt.font.TextAttribute", ["java.io.InvalidObjectException"], function () {
24743 c$ = Clazz_declareType (java.awt.font, "TextAttribute", java.text.AttributedCharacterIterator.Attribute);
24744 Clazz_makeConstructor (c$, 
24745 function (name) {
24746 Clazz_superConstructor (this, java.awt.font.TextAttribute, [name]);
24747 if (this.getClass () === java.awt.font.TextAttribute) {
24748 java.awt.font.TextAttribute.$instanceMap.put (name, this);
24749 }}, "~S");
24750 Clazz_overrideMethod (c$, "readResolve", 
24751 function () {
24752 if (this.getClass () !== java.awt.font.TextAttribute) {
24753 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24754 }var instance = java.awt.font.TextAttribute.$instanceMap.get (this.getName ());
24755 if (instance != null) {
24756 return instance;
24757 } else {
24758 throw  new java.io.InvalidObjectException ("unknown attribute name");
24759 }});
24760 c$.$instanceMap = c$.prototype.$instanceMap =  new java.util.HashMap (29);
24761 c$.FAMILY = c$.prototype.FAMILY =  new java.awt.font.TextAttribute ("family");
24762 c$.WEIGHT = c$.prototype.WEIGHT =  new java.awt.font.TextAttribute ("weight");
24763 c$.WEIGHT_EXTRA_LIGHT = c$.prototype.WEIGHT_EXTRA_LIGHT = Float.$valueOf (0.5);
24764 c$.WEIGHT_LIGHT = c$.prototype.WEIGHT_LIGHT = Float.$valueOf (0.75);
24765 c$.WEIGHT_DEMILIGHT = c$.prototype.WEIGHT_DEMILIGHT = Float.$valueOf (0.875);
24766 c$.WEIGHT_REGULAR = c$.prototype.WEIGHT_REGULAR = Float.$valueOf (1.0);
24767 c$.WEIGHT_SEMIBOLD = c$.prototype.WEIGHT_SEMIBOLD = Float.$valueOf (1.25);
24768 c$.WEIGHT_MEDIUM = c$.prototype.WEIGHT_MEDIUM = Float.$valueOf (1.5);
24769 c$.WEIGHT_DEMIBOLD = c$.prototype.WEIGHT_DEMIBOLD = Float.$valueOf (1.75);
24770 c$.WEIGHT_BOLD = c$.prototype.WEIGHT_BOLD = Float.$valueOf (2.0);
24771 c$.WEIGHT_HEAVY = c$.prototype.WEIGHT_HEAVY = Float.$valueOf (2.25);
24772 c$.WEIGHT_EXTRABOLD = c$.prototype.WEIGHT_EXTRABOLD = Float.$valueOf (2.5);
24773 c$.WEIGHT_ULTRABOLD = c$.prototype.WEIGHT_ULTRABOLD = Float.$valueOf (2.75);
24774 c$.WIDTH = c$.prototype.WIDTH =  new java.awt.font.TextAttribute ("width");
24775 c$.WIDTH_CONDENSED = c$.prototype.WIDTH_CONDENSED = Float.$valueOf (0.75);
24776 c$.WIDTH_SEMI_CONDENSED = c$.prototype.WIDTH_SEMI_CONDENSED = Float.$valueOf (0.875);
24777 c$.WIDTH_REGULAR = c$.prototype.WIDTH_REGULAR = Float.$valueOf (1.0);
24778 c$.WIDTH_SEMI_EXTENDED = c$.prototype.WIDTH_SEMI_EXTENDED = Float.$valueOf (1.25);
24779 c$.WIDTH_EXTENDED = c$.prototype.WIDTH_EXTENDED = Float.$valueOf (1.5);
24780 c$.POSTURE = c$.prototype.POSTURE =  new java.awt.font.TextAttribute ("posture");
24781 c$.POSTURE_REGULAR = c$.prototype.POSTURE_REGULAR = Float.$valueOf (0.0);
24782 c$.POSTURE_OBLIQUE = c$.prototype.POSTURE_OBLIQUE = Float.$valueOf (0.20);
24783 c$.SIZE = c$.prototype.SIZE =  new java.awt.font.TextAttribute ("size");
24784 c$.TRANSFORM = c$.prototype.TRANSFORM =  new java.awt.font.TextAttribute ("transform");
24785 c$.SUPERSCRIPT = c$.prototype.SUPERSCRIPT =  new java.awt.font.TextAttribute ("superscript");
24786 c$.SUPERSCRIPT_SUPER = c$.prototype.SUPERSCRIPT_SUPER = Integer.$valueOf (1);
24787 c$.SUPERSCRIPT_SUB = c$.prototype.SUPERSCRIPT_SUB = Integer.$valueOf (-1);
24788 c$.FONT = c$.prototype.FONT =  new java.awt.font.TextAttribute ("font");
24789 c$.CHAR_REPLACEMENT = c$.prototype.CHAR_REPLACEMENT =  new java.awt.font.TextAttribute ("char_replacement");
24790 c$.FOREGROUND = c$.prototype.FOREGROUND =  new java.awt.font.TextAttribute ("foreground");
24791 c$.BACKGROUND = c$.prototype.BACKGROUND =  new java.awt.font.TextAttribute ("background");
24792 c$.UNDERLINE = c$.prototype.UNDERLINE =  new java.awt.font.TextAttribute ("underline");
24793 c$.UNDERLINE_ON = c$.prototype.UNDERLINE_ON = Integer.$valueOf (0);
24794 c$.STRIKETHROUGH = c$.prototype.STRIKETHROUGH =  new java.awt.font.TextAttribute ("strikethrough");
24795 c$.STRIKETHROUGH_ON = c$.prototype.STRIKETHROUGH_ON = Boolean.TRUE;
24796 c$.RUN_DIRECTION = c$.prototype.RUN_DIRECTION =  new java.awt.font.TextAttribute ("run_direction");
24797 c$.RUN_DIRECTION_LTR = c$.prototype.RUN_DIRECTION_LTR = Boolean.FALSE;
24798 c$.RUN_DIRECTION_RTL = c$.prototype.RUN_DIRECTION_RTL = Boolean.TRUE;
24799 c$.BIDI_EMBEDDING = c$.prototype.BIDI_EMBEDDING =  new java.awt.font.TextAttribute ("bidi_embedding");
24800 c$.JUSTIFICATION = c$.prototype.JUSTIFICATION =  new java.awt.font.TextAttribute ("justification");
24801 c$.JUSTIFICATION_FULL = c$.prototype.JUSTIFICATION_FULL = Float.$valueOf (1.0);
24802 c$.JUSTIFICATION_NONE = c$.prototype.JUSTIFICATION_NONE = Float.$valueOf (0.0);
24803 c$.INPUT_METHOD_HIGHLIGHT = c$.prototype.INPUT_METHOD_HIGHLIGHT =  new java.awt.font.TextAttribute ("input method highlight");
24804 c$.INPUT_METHOD_UNDERLINE = c$.prototype.INPUT_METHOD_UNDERLINE =  new java.awt.font.TextAttribute ("input method underline");
24805 c$.UNDERLINE_LOW_ONE_PIXEL = c$.prototype.UNDERLINE_LOW_ONE_PIXEL = Integer.$valueOf (1);
24806 c$.UNDERLINE_LOW_TWO_PIXEL = c$.prototype.UNDERLINE_LOW_TWO_PIXEL = Integer.$valueOf (2);
24807 c$.UNDERLINE_LOW_DOTTED = c$.prototype.UNDERLINE_LOW_DOTTED = Integer.$valueOf (3);
24808 c$.UNDERLINE_LOW_GRAY = c$.prototype.UNDERLINE_LOW_GRAY = Integer.$valueOf (4);
24809 c$.UNDERLINE_LOW_DASHED = c$.prototype.UNDERLINE_LOW_DASHED = Integer.$valueOf (5);
24810 c$.SWAP_COLORS = c$.prototype.SWAP_COLORS =  new java.awt.font.TextAttribute ("swap_colors");
24811 c$.SWAP_COLORS_ON = c$.prototype.SWAP_COLORS_ON = Boolean.TRUE;
24812 c$.NUMERIC_SHAPING = c$.prototype.NUMERIC_SHAPING =  new java.awt.font.TextAttribute ("numeric_shaping");
24813 c$.KERNING = c$.prototype.KERNING =  new java.awt.font.TextAttribute ("kerning");
24814 c$.KERNING_ON = c$.prototype.KERNING_ON = Integer.$valueOf (1);
24815 c$.LIGATURES = c$.prototype.LIGATURES =  new java.awt.font.TextAttribute ("ligatures");
24816 c$.LIGATURES_ON = c$.prototype.LIGATURES_ON = Integer.$valueOf (1);
24817 c$.TRACKING = c$.prototype.TRACKING =  new java.awt.font.TextAttribute ("tracking");
24818 c$.TRACKING_TIGHT = c$.prototype.TRACKING_TIGHT = Float.$valueOf (-0.04);
24819 c$.TRACKING_LOOSE = c$.prototype.TRACKING_LOOSE = Float.$valueOf (.04);
24820 });
24821 Clazz_declarePackage ("java.text");
24822 Clazz_load (["java.text.CharacterIterator", "java.io.InvalidObjectException", "java.util.HashMap"], "java.text.AttributedCharacterIterator", null, function () {
24823 Clazz_declareInterface (java.text, "AttributedCharacterIterator", java.text.CharacterIterator);
24824 Clazz_pu$h(self.c$);
24825 c$ = Clazz_decorateAsClass (function () {
24826 this.name = null;
24827 Clazz_instantialize (this, arguments);
24828 }, java.text.AttributedCharacterIterator, "Attribute", null, java.io.Serializable);
24829 Clazz_makeConstructor (c$, 
24830 function (a) {
24831 this.name = a;
24832 if (this.getClass () === java.text.AttributedCharacterIterator.Attribute) {
24833 java.text.AttributedCharacterIterator.Attribute.instanceMap.put (a, this);
24834 }}, "~S");
24835 Clazz_overrideMethod (c$, "toString", 
24836 function () {
24837 return this.getClass ().getName () + "(" + this.name + ")";
24838 });
24839 Clazz_defineMethod (c$, "getName", 
24840 function () {
24841 return this.name;
24842 });
24843 Clazz_defineMethod (c$, "readResolve", 
24844 function () {
24845 if (this.getClass () !== java.text.AttributedCharacterIterator.Attribute) {
24846 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24847 }var a = java.text.AttributedCharacterIterator.Attribute.instanceMap.get (this.getName ());
24848 if (a != null) {
24849 return a;
24850 } else {
24851 throw  new java.io.InvalidObjectException ("unknown attribute name");
24852 }});
24853 c$.instanceMap = c$.prototype.instanceMap =  new java.util.HashMap (7);
24854 c$.LANGUAGE = c$.prototype.LANGUAGE =  new java.text.AttributedCharacterIterator.Attribute ("language");
24855 c$.READING = c$.prototype.READING =  new java.text.AttributedCharacterIterator.Attribute ("reading");
24856 c$.INPUT_METHOD_SEGMENT = c$.prototype.INPUT_METHOD_SEGMENT =  new java.text.AttributedCharacterIterator.Attribute ("input_method_segment");
24857 c$ = Clazz_p0p ();
24858 });
24859 Clazz_declarePackage ("java.text");
24860 c$ = Clazz_declareInterface (java.text, "CharacterIterator", Cloneable);
24861 Clazz_defineStatics (c$,
24862 "DONE", '\uFFFF');
24863 Clazz_declarePackage ("java.awt.geom");
24864 Clazz_load (null, "java.awt.geom.Point2D", ["java.lang.Double", "$.InternalError"], function () {
24865 c$ = Clazz_declareType (java.awt.geom, "Point2D", null, Cloneable);
24866 Clazz_makeConstructor (c$, 
24867 function () {
24868 });
24869 Clazz_defineMethod (c$, "setLocation", 
24870 function (p) {
24871 this.setLocation (p.getX (), p.getY ());
24872 }, "java.awt.geom.Point2D");
24873 c$.distanceSq = Clazz_defineMethod (c$, "distanceSq", 
24874 function (x1, y1, x2, y2) {
24875 x1 -= x2;
24876 y1 -= y2;
24877 return (x1 * x1 + y1 * y1);
24878 }, "~N,~N,~N,~N");
24879 c$.distance = Clazz_defineMethod (c$, "distance", 
24880 function (x1, y1, x2, y2) {
24881 x1 -= x2;
24882 y1 -= y2;
24883 return Math.sqrt (x1 * x1 + y1 * y1);
24884 }, "~N,~N,~N,~N");
24885 Clazz_defineMethod (c$, "distanceSq", 
24886 function (px, py) {
24887 px -= this.getX ();
24888 py -= this.getY ();
24889 return (px * px + py * py);
24890 }, "~N,~N");
24891 Clazz_defineMethod (c$, "distanceSq", 
24892 function (pt) {
24893 var px = pt.getX () - this.getX ();
24894 var py = pt.getY () - this.getY ();
24895 return (px * px + py * py);
24896 }, "java.awt.geom.Point2D");
24897 Clazz_defineMethod (c$, "distance", 
24898 function (px, py) {
24899 px -= this.getX ();
24900 py -= this.getY ();
24901 return Math.sqrt (px * px + py * py);
24902 }, "~N,~N");
24903 Clazz_defineMethod (c$, "distance", 
24904 function (pt) {
24905 var px = pt.getX () - this.getX ();
24906 var py = pt.getY () - this.getY ();
24907 return Math.sqrt (px * px + py * py);
24908 }, "java.awt.geom.Point2D");
24909 Clazz_defineMethod (c$, "clone", 
24910 function () {
24911 try {
24912 return Clazz_superCall (this, java.awt.geom.Point2D, "clone", []);
24913 } catch (e) {
24914 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
24915 throw  new InternalError ();
24916 } else {
24917 throw e;
24918 }
24919 }
24920 });
24921 Clazz_overrideMethod (c$, "hashCode", 
24922 function () {
24923 var bits = java.lang.Double.doubleToLongBits (this.getX ());
24924 bits ^= java.lang.Double.doubleToLongBits (this.getY ()) * 31;
24925 return ((bits) ^ ((bits >> 32)));
24926 });
24927 Clazz_defineMethod (c$, "equals", 
24928 function (obj) {
24929 if (Clazz_instanceOf (obj, java.awt.geom.Point2D)) {
24930 var p2d = obj;
24931 return (this.getX () == p2d.getX ()) && (this.getY () == p2d.getY ());
24932 }return Clazz_superCall (this, java.awt.geom.Point2D, "equals", [obj]);
24933 }, "~O");
24934 Clazz_pu$h(self.c$);
24935 c$ = Clazz_decorateAsClass (function () {
24936 this.x = 0;
24937 this.y = 0;
24938 Clazz_instantialize (this, arguments);
24939 }, java.awt.geom.Point2D, "Float", java.awt.geom.Point2D);
24940 Clazz_makeConstructor (c$, 
24941 function () {
24942 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
24943 });
24944 Clazz_makeConstructor (c$, 
24945 function (a, b) {
24946 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
24947 this.x = a;
24948 this.y = b;
24949 }, "~N,~N");
24950 Clazz_overrideMethod (c$, "getX", 
24951 function () {
24952 return this.x;
24953 });
24954 Clazz_overrideMethod (c$, "getY", 
24955 function () {
24956 return this.y;
24957 });
24958 Clazz_defineMethod (c$, "setLocation", 
24959 function (a, b) {
24960 this.x = a;
24961 this.y = b;
24962 }, "~N,~N");
24963 Clazz_defineMethod (c$, "setLocation", 
24964 function (a, b) {
24965 this.x = a;
24966 this.y = b;
24967 }, "~N,~N");
24968 Clazz_overrideMethod (c$, "toString", 
24969 function () {
24970 return "Point2D.Float[" + this.x + ", " + this.y + "]";
24971 });
24972 c$ = Clazz_p0p ();
24973 Clazz_pu$h(self.c$);
24974 c$ = Clazz_decorateAsClass (function () {
24975 this.x = 0;
24976 this.y = 0;
24977 Clazz_instantialize (this, arguments);
24978 }, java.awt.geom.Point2D, "Double", java.awt.geom.Point2D);
24979 Clazz_makeConstructor (c$, 
24980 function () {
24981 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
24982 });
24983 Clazz_makeConstructor (c$, 
24984 function (a, b) {
24985 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
24986 this.x = a;
24987 this.y = b;
24988 }, "~N,~N");
24989 Clazz_overrideMethod (c$, "getX", 
24990 function () {
24991 return this.x;
24992 });
24993 Clazz_overrideMethod (c$, "getY", 
24994 function () {
24995 return this.y;
24996 });
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.Double[" + this.x + ", " + this.y + "]";
25005 });
25006 c$ = Clazz_p0p ();
25007 });
25008 Clazz_declarePackage ("java.awt.geom");
25009 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 () {
25010 c$ = Clazz_decorateAsClass (function () {
25011 this.m00 = 0;
25012 this.m10 = 0;
25013 this.m01 = 0;
25014 this.m11 = 0;
25015 this.m02 = 0;
25016 this.m12 = 0;
25017 this.state = 0;
25018 this.type = 0;
25019 Clazz_instantialize (this, arguments);
25020 }, java.awt.geom, "AffineTransform", null, [Cloneable, java.io.Serializable]);
25021 Clazz_makeConstructor (c$, 
25022  function (m00, m10, m01, m11, m02, m12, state) {
25023 {
25024 switch (arguments.length) { case 0: this.m00 = this.m11 = 1.0;
25025 return;
25026 case 1:
25027 if (Clazz_instanceOf(m00, java.awt.geom.AffineTransform)) {
25028 var Tx = m00; this.m00 =
25029 Tx.m00; this.m10 = Tx.m10; this.m01 = Tx.m01; this.m11 =
25030 Tx.m11; this.m02 = Tx.m02; this.m12 = Tx.m12; this.state =
25031 Tx.state; this.type = Tx.type;
25032 } else {
25033 var flatmatrix = m00;
25034 this.m00 = flatmatrix[0];
25035 this.m10 = flatmatrix[1];
25036 this.m01 = flatmatrix[2];
25037 this.m11 = flatmatrix[3];
25038 if (flatmatrix.length > 5) {
25039 this.m02 = flatmatrix[4];
25040 this.m12 = flatmatrix[5];
25041 }
25042 this.updateState();
25043 }
25044 return;
25045 case 6:
25046 this.m00 = m00;
25047 this.m10 = m10;
25048 this.m01 = m01;
25049 this.m11 = m11;
25050 this.m02 = m02;
25051 this.m12 = m12;
25052 this.updateState();
25053 return;
25054 }
25055 }this.m00 = m00;
25056 this.m10 = m10;
25057 this.m01 = m01;
25058 this.m11 = m11;
25059 this.m02 = m02;
25060 this.m12 = m12;
25061 this.state = state;
25062 this.type = -1;
25063 }, "~N,~N,~N,~N,~N,~N,~N");
25064 c$.getTranslateInstance = Clazz_defineMethod (c$, "getTranslateInstance", 
25065 function (tx, ty) {
25066 var Tx =  new java.awt.geom.AffineTransform ();
25067 Tx.setToTranslation (tx, ty);
25068 return Tx;
25069 }, "~N,~N");
25070 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25071 function (theta) {
25072 var Tx =  new java.awt.geom.AffineTransform ();
25073 Tx.setToRotation (theta);
25074 return Tx;
25075 }, "~N");
25076 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25077 function (theta, anchorx, anchory) {
25078 var Tx =  new java.awt.geom.AffineTransform ();
25079 Tx.setToRotation (theta, anchorx, anchory);
25080 return Tx;
25081 }, "~N,~N,~N");
25082 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25083 function (vecx, vecy) {
25084 var Tx =  new java.awt.geom.AffineTransform ();
25085 Tx.setToRotation (vecx, vecy);
25086 return Tx;
25087 }, "~N,~N");
25088 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25089 function (vecx, vecy, anchorx, anchory) {
25090 var Tx =  new java.awt.geom.AffineTransform ();
25091 Tx.setToRotation (vecx, vecy, anchorx, anchory);
25092 return Tx;
25093 }, "~N,~N,~N,~N");
25094 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25095 function (numquadrants) {
25096 var Tx =  new java.awt.geom.AffineTransform ();
25097 Tx.setToQuadrantRotation (numquadrants);
25098 return Tx;
25099 }, "~N");
25100 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25101 function (numquadrants, anchorx, anchory) {
25102 var Tx =  new java.awt.geom.AffineTransform ();
25103 Tx.setToQuadrantRotation (numquadrants, anchorx, anchory);
25104 return Tx;
25105 }, "~N,~N,~N");
25106 c$.getScaleInstance = Clazz_defineMethod (c$, "getScaleInstance", 
25107 function (sx, sy) {
25108 var Tx =  new java.awt.geom.AffineTransform ();
25109 Tx.setToScale (sx, sy);
25110 return Tx;
25111 }, "~N,~N");
25112 c$.getShearInstance = Clazz_defineMethod (c$, "getShearInstance", 
25113 function (shx, shy) {
25114 var Tx =  new java.awt.geom.AffineTransform ();
25115 Tx.setToShear (shx, shy);
25116 return Tx;
25117 }, "~N,~N");
25118 Clazz_defineMethod (c$, "getType", 
25119 function () {
25120 if (this.type == -1) {
25121 this.calculateType ();
25122 }return this.type;
25123 });
25124 Clazz_defineMethod (c$, "calculateType", 
25125  function () {
25126 var ret = 0;
25127 var sgn0;
25128 var sgn1;
25129 var M0;
25130 var M1;
25131 var M2;
25132 var M3;
25133 this.updateState ();
25134 switch (this.state) {
25135 default:
25136 this.stateError ();
25137 case (7):
25138 ret = 1;
25139 case (6):
25140 if ((M0 = this.m00) * (M2 = this.m01) + (M3 = this.m10) * (M1 = this.m11) != 0) {
25141 this.type = 32;
25142 return;
25143 }sgn0 = (M0 >= 0.0);
25144 sgn1 = (M1 >= 0.0);
25145 if (sgn0 == sgn1) {
25146 if (M0 != M1 || M2 != -M3) {
25147 ret |= (20);
25148 } else if (M0 * M1 - M2 * M3 != 1.0) {
25149 ret |= (18);
25150 } else {
25151 ret |= 16;
25152 }} else {
25153 if (M0 != -M1 || M2 != M3) {
25154 ret |= (84);
25155 } else if (M0 * M1 - M2 * M3 != 1.0) {
25156 ret |= (82);
25157 } else {
25158 ret |= (80);
25159 }}break;
25160 case (5):
25161 ret = 1;
25162 case (4):
25163 sgn0 = ((M0 = this.m01) >= 0.0);
25164 sgn1 = ((M1 = this.m10) >= 0.0);
25165 if (sgn0 != sgn1) {
25166 if (M0 != -M1) {
25167 ret |= (12);
25168 } else if (M0 != 1.0 && M0 != -1.0) {
25169 ret |= (10);
25170 } else {
25171 ret |= 8;
25172 }} else {
25173 if (M0 == M1) {
25174 ret |= (74);
25175 } else {
25176 ret |= (76);
25177 }}break;
25178 case (3):
25179 ret = 1;
25180 case (2):
25181 sgn0 = ((M0 = this.m00) >= 0.0);
25182 sgn1 = ((M1 = this.m11) >= 0.0);
25183 if (sgn0 == sgn1) {
25184 if (sgn0) {
25185 if (M0 == M1) {
25186 ret |= 2;
25187 } else {
25188 ret |= 4;
25189 }} else {
25190 if (M0 != M1) {
25191 ret |= (12);
25192 } else if (M0 != -1.0) {
25193 ret |= (10);
25194 } else {
25195 ret |= 8;
25196 }}} else {
25197 if (M0 == -M1) {
25198 if (M0 == 1.0 || M0 == -1.0) {
25199 ret |= 64;
25200 } else {
25201 ret |= (66);
25202 }} else {
25203 ret |= (68);
25204 }}break;
25205 case (1):
25206 ret = 1;
25207 break;
25208 case (0):
25209 break;
25210 }
25211 this.type = ret;
25212 });
25213 Clazz_defineMethod (c$, "getDeterminant", 
25214 function () {
25215 switch (this.state) {
25216 default:
25217 this.stateError ();
25218 case (7):
25219 case (6):
25220 return this.m00 * this.m11 - this.m01 * this.m10;
25221 case (5):
25222 case (4):
25223 return -(this.m01 * this.m10);
25224 case (3):
25225 case (2):
25226 return this.m00 * this.m11;
25227 case (1):
25228 case (0):
25229 return 1.0;
25230 }
25231 });
25232 Clazz_defineMethod (c$, "updateState", 
25233 function () {
25234 if (this.m01 == 0.0 && this.m10 == 0.0) {
25235 if (this.m00 == 1.0 && this.m11 == 1.0) {
25236 if (this.m02 == 0.0 && this.m12 == 0.0) {
25237 this.state = 0;
25238 this.type = 0;
25239 } else {
25240 this.state = 1;
25241 this.type = 1;
25242 }} else {
25243 if (this.m02 == 0.0 && this.m12 == 0.0) {
25244 this.state = 2;
25245 this.type = -1;
25246 } else {
25247 this.state = (3);
25248 this.type = -1;
25249 }}} else {
25250 if (this.m00 == 0.0 && this.m11 == 0.0) {
25251 if (this.m02 == 0.0 && this.m12 == 0.0) {
25252 this.state = 4;
25253 this.type = -1;
25254 } else {
25255 this.state = (5);
25256 this.type = -1;
25257 }} else {
25258 if (this.m02 == 0.0 && this.m12 == 0.0) {
25259 this.state = (6);
25260 this.type = -1;
25261 } else {
25262 this.state = (7);
25263 this.type = -1;
25264 }}}});
25265 Clazz_defineMethod (c$, "stateError", 
25266  function () {
25267 throw  new InternalError ("missing case in transform state switch");
25268 });
25269 Clazz_defineMethod (c$, "getMatrix", 
25270 function (flatmatrix) {
25271 flatmatrix[0] = this.m00;
25272 flatmatrix[1] = this.m10;
25273 flatmatrix[2] = this.m01;
25274 flatmatrix[3] = this.m11;
25275 if (flatmatrix.length > 5) {
25276 flatmatrix[4] = this.m02;
25277 flatmatrix[5] = this.m12;
25278 }}, "~A");
25279 Clazz_defineMethod (c$, "getScaleX", 
25280 function () {
25281 return this.m00;
25282 });
25283 Clazz_defineMethod (c$, "getScaleY", 
25284 function () {
25285 return this.m11;
25286 });
25287 Clazz_defineMethod (c$, "getShearX", 
25288 function () {
25289 return this.m01;
25290 });
25291 Clazz_defineMethod (c$, "getShearY", 
25292 function () {
25293 return this.m10;
25294 });
25295 Clazz_defineMethod (c$, "getTranslateX", 
25296 function () {
25297 return this.m02;
25298 });
25299 Clazz_defineMethod (c$, "getTranslateY", 
25300 function () {
25301 return this.m12;
25302 });
25303 Clazz_defineMethod (c$, "translate", 
25304 function (tx, ty) {
25305 switch (this.state) {
25306 default:
25307 this.stateError ();
25308 case (7):
25309 this.m02 = tx * this.m00 + ty * this.m01 + this.m02;
25310 this.m12 = tx * this.m10 + ty * this.m11 + this.m12;
25311 if (this.m02 == 0.0 && this.m12 == 0.0) {
25312 this.state = 6;
25313 if (this.type != -1) {
25314 this.type -= 1;
25315 }}return;
25316 case (6):
25317 this.m02 = tx * this.m00 + ty * this.m01;
25318 this.m12 = tx * this.m10 + ty * this.m11;
25319 if (this.m02 != 0.0 || this.m12 != 0.0) {
25320 this.state = 7;
25321 this.type |= 1;
25322 }return;
25323 case (5):
25324 this.m02 = ty * this.m01 + this.m02;
25325 this.m12 = tx * this.m10 + this.m12;
25326 if (this.m02 == 0.0 && this.m12 == 0.0) {
25327 this.state = 4;
25328 if (this.type != -1) {
25329 this.type -= 1;
25330 }}return;
25331 case (4):
25332 this.m02 = ty * this.m01;
25333 this.m12 = tx * this.m10;
25334 if (this.m02 != 0.0 || this.m12 != 0.0) {
25335 this.state = 5;
25336 this.type |= 1;
25337 }return;
25338 case (3):
25339 this.m02 = tx * this.m00 + this.m02;
25340 this.m12 = ty * this.m11 + this.m12;
25341 if (this.m02 == 0.0 && this.m12 == 0.0) {
25342 this.state = 2;
25343 if (this.type != -1) {
25344 this.type -= 1;
25345 }}return;
25346 case (2):
25347 this.m02 = tx * this.m00;
25348 this.m12 = ty * this.m11;
25349 if (this.m02 != 0.0 || this.m12 != 0.0) {
25350 this.state = 3;
25351 this.type |= 1;
25352 }return;
25353 case (1):
25354 this.m02 = tx + this.m02;
25355 this.m12 = ty + this.m12;
25356 if (this.m02 == 0.0 && this.m12 == 0.0) {
25357 this.state = 0;
25358 this.type = 0;
25359 }return;
25360 case (0):
25361 this.m02 = tx;
25362 this.m12 = ty;
25363 if (tx != 0.0 || ty != 0.0) {
25364 this.state = 1;
25365 this.type = 1;
25366 }return;
25367 }
25368 }, "~N,~N");
25369 Clazz_defineMethod (c$, "rotate90", 
25370  function () {
25371 var M0 = this.m00;
25372 this.m00 = this.m01;
25373 this.m01 = -M0;
25374 M0 = this.m10;
25375 this.m10 = this.m11;
25376 this.m11 = -M0;
25377 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25378 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25379 state -= 2;
25380 }this.state = state;
25381 this.type = -1;
25382 });
25383 Clazz_defineMethod (c$, "rotate180", 
25384  function () {
25385 this.m00 = -this.m00;
25386 this.m11 = -this.m11;
25387 var state = this.state;
25388 if ((state & (4)) != 0) {
25389 this.m01 = -this.m01;
25390 this.m10 = -this.m10;
25391 } else {
25392 if (this.m00 == 1.0 && this.m11 == 1.0) {
25393 this.state = state & -3;
25394 } else {
25395 this.state = state | 2;
25396 }}this.type = -1;
25397 });
25398 Clazz_defineMethod (c$, "rotate270", 
25399  function () {
25400 var M0 = this.m00;
25401 this.m00 = -this.m01;
25402 this.m01 = M0;
25403 M0 = this.m10;
25404 this.m10 = -this.m11;
25405 this.m11 = M0;
25406 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25407 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25408 state -= 2;
25409 }this.state = state;
25410 this.type = -1;
25411 });
25412 Clazz_defineMethod (c$, "rotate", 
25413 function (theta) {
25414 var sin = Math.sin (theta);
25415 if (sin == 1.0) {
25416 this.rotate90 ();
25417 } else if (sin == -1.0) {
25418 this.rotate270 ();
25419 } else {
25420 var cos = Math.cos (theta);
25421 if (cos == -1.0) {
25422 this.rotate180 ();
25423 } else if (cos != 1.0) {
25424 var M0;
25425 var M1;
25426 M0 = this.m00;
25427 M1 = this.m01;
25428 this.m00 = cos * M0 + sin * M1;
25429 this.m01 = -sin * M0 + cos * M1;
25430 M0 = this.m10;
25431 M1 = this.m11;
25432 this.m10 = cos * M0 + sin * M1;
25433 this.m11 = -sin * M0 + cos * M1;
25434 this.updateState ();
25435 }}}, "~N");
25436 Clazz_defineMethod (c$, "rotate", 
25437 function (theta, anchorx, anchory) {
25438 this.translate (anchorx, anchory);
25439 this.rotate (theta);
25440 this.translate (-anchorx, -anchory);
25441 }, "~N,~N,~N");
25442 Clazz_defineMethod (c$, "rotate", 
25443 function (vecx, vecy) {
25444 if (vecy == 0.0) {
25445 if (vecx < 0.0) {
25446 this.rotate180 ();
25447 }} else if (vecx == 0.0) {
25448 if (vecy > 0.0) {
25449 this.rotate90 ();
25450 } else {
25451 this.rotate270 ();
25452 }} else {
25453 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25454 var sin = vecy / len;
25455 var cos = vecx / len;
25456 var M0;
25457 var M1;
25458 M0 = this.m00;
25459 M1 = this.m01;
25460 this.m00 = cos * M0 + sin * M1;
25461 this.m01 = -sin * M0 + cos * M1;
25462 M0 = this.m10;
25463 M1 = this.m11;
25464 this.m10 = cos * M0 + sin * M1;
25465 this.m11 = -sin * M0 + cos * M1;
25466 this.updateState ();
25467 }}, "~N,~N");
25468 Clazz_defineMethod (c$, "rotate", 
25469 function (vecx, vecy, anchorx, anchory) {
25470 this.translate (anchorx, anchory);
25471 this.rotate (vecx, vecy);
25472 this.translate (-anchorx, -anchory);
25473 }, "~N,~N,~N,~N");
25474 Clazz_defineMethod (c$, "quadrantRotate", 
25475 function (numquadrants) {
25476 switch (numquadrants & 3) {
25477 case 0:
25478 break;
25479 case 1:
25480 this.rotate90 ();
25481 break;
25482 case 2:
25483 this.rotate180 ();
25484 break;
25485 case 3:
25486 this.rotate270 ();
25487 break;
25488 }
25489 }, "~N");
25490 Clazz_defineMethod (c$, "quadrantRotate", 
25491 function (numquadrants, anchorx, anchory) {
25492 switch (numquadrants & 3) {
25493 case 0:
25494 return;
25495 case 1:
25496 this.m02 += anchorx * (this.m00 - this.m01) + anchory * (this.m01 + this.m00);
25497 this.m12 += anchorx * (this.m10 - this.m11) + anchory * (this.m11 + this.m10);
25498 this.rotate90 ();
25499 break;
25500 case 2:
25501 this.m02 += anchorx * (this.m00 + this.m00) + anchory * (this.m01 + this.m01);
25502 this.m12 += anchorx * (this.m10 + this.m10) + anchory * (this.m11 + this.m11);
25503 this.rotate180 ();
25504 break;
25505 case 3:
25506 this.m02 += anchorx * (this.m00 + this.m01) + anchory * (this.m01 - this.m00);
25507 this.m12 += anchorx * (this.m10 + this.m11) + anchory * (this.m11 - this.m10);
25508 this.rotate270 ();
25509 break;
25510 }
25511 if (this.m02 == 0.0 && this.m12 == 0.0) {
25512 this.state &= -2;
25513 } else {
25514 this.state |= 1;
25515 }}, "~N,~N,~N");
25516 Clazz_defineMethod (c$, "scale", 
25517 function (sx, sy) {
25518 var state = this.state;
25519 switch (state) {
25520 default:
25521 this.stateError ();
25522 case (7):
25523 case (6):
25524 this.m00 *= sx;
25525 this.m11 *= sy;
25526 case (5):
25527 case (4):
25528 this.m01 *= sy;
25529 this.m10 *= sx;
25530 if (this.m01 == 0 && this.m10 == 0) {
25531 state &= 1;
25532 if (this.m00 == 1.0 && this.m11 == 1.0) {
25533 this.type = (state == 0 ? 0 : 1);
25534 } else {
25535 state |= 2;
25536 this.type = -1;
25537 }this.state = state;
25538 }return;
25539 case (3):
25540 case (2):
25541 this.m00 *= sx;
25542 this.m11 *= sy;
25543 if (this.m00 == 1.0 && this.m11 == 1.0) {
25544 this.state = (state &= 1);
25545 this.type = (state == 0 ? 0 : 1);
25546 } else {
25547 this.type = -1;
25548 }return;
25549 case (1):
25550 case (0):
25551 this.m00 = sx;
25552 this.m11 = sy;
25553 if (sx != 1.0 || sy != 1.0) {
25554 this.state = state | 2;
25555 this.type = -1;
25556 }return;
25557 }
25558 }, "~N,~N");
25559 Clazz_defineMethod (c$, "shear", 
25560 function (shx, shy) {
25561 var state = this.state;
25562 switch (state) {
25563 default:
25564 this.stateError ();
25565 case (7):
25566 case (6):
25567 var M0;
25568 var M1;
25569 M0 = this.m00;
25570 M1 = this.m01;
25571 this.m00 = M0 + M1 * shy;
25572 this.m01 = M0 * shx + M1;
25573 M0 = this.m10;
25574 M1 = this.m11;
25575 this.m10 = M0 + M1 * shy;
25576 this.m11 = M0 * shx + M1;
25577 this.updateState ();
25578 return;
25579 case (5):
25580 case (4):
25581 this.m00 = this.m01 * shy;
25582 this.m11 = this.m10 * shx;
25583 if (this.m00 != 0.0 || this.m11 != 0.0) {
25584 this.state = state | 2;
25585 }this.type = -1;
25586 return;
25587 case (3):
25588 case (2):
25589 this.m01 = this.m00 * shx;
25590 this.m10 = this.m11 * shy;
25591 if (this.m01 != 0.0 || this.m10 != 0.0) {
25592 this.state = state | 4;
25593 }this.type = -1;
25594 return;
25595 case (1):
25596 case (0):
25597 this.m01 = shx;
25598 this.m10 = shy;
25599 if (this.m01 != 0.0 || this.m10 != 0.0) {
25600 this.state = state | 2 | 4;
25601 this.type = -1;
25602 }return;
25603 }
25604 }, "~N,~N");
25605 Clazz_defineMethod (c$, "setToIdentity", 
25606 function () {
25607 this.m00 = this.m11 = 1.0;
25608 this.m10 = this.m01 = this.m02 = this.m12 = 0.0;
25609 this.state = 0;
25610 this.type = 0;
25611 });
25612 Clazz_defineMethod (c$, "setToTranslation", 
25613 function (tx, ty) {
25614 this.m00 = 1.0;
25615 this.m10 = 0.0;
25616 this.m01 = 0.0;
25617 this.m11 = 1.0;
25618 this.m02 = tx;
25619 this.m12 = ty;
25620 if (tx != 0.0 || ty != 0.0) {
25621 this.state = 1;
25622 this.type = 1;
25623 } else {
25624 this.state = 0;
25625 this.type = 0;
25626 }}, "~N,~N");
25627 Clazz_defineMethod (c$, "setToRotation", 
25628 function (theta) {
25629 var sin = Math.sin (theta);
25630 var cos;
25631 if (sin == 1.0 || sin == -1.0) {
25632 cos = 0.0;
25633 this.state = 4;
25634 this.type = 8;
25635 } else {
25636 cos = Math.cos (theta);
25637 if (cos == -1.0) {
25638 sin = 0.0;
25639 this.state = 2;
25640 this.type = 8;
25641 } else if (cos == 1.0) {
25642 sin = 0.0;
25643 this.state = 0;
25644 this.type = 0;
25645 } else {
25646 this.state = 6;
25647 this.type = 16;
25648 }}this.m00 = cos;
25649 this.m10 = sin;
25650 this.m01 = -sin;
25651 this.m11 = cos;
25652 this.m02 = 0.0;
25653 this.m12 = 0.0;
25654 }, "~N");
25655 Clazz_defineMethod (c$, "setToRotation", 
25656 function (theta, anchorx, anchory) {
25657 this.setToRotation (theta);
25658 var sin = this.m10;
25659 var oneMinusCos = 1.0 - this.m00;
25660 this.m02 = anchorx * oneMinusCos + anchory * sin;
25661 this.m12 = anchory * oneMinusCos - anchorx * sin;
25662 if (this.m02 != 0.0 || this.m12 != 0.0) {
25663 this.state |= 1;
25664 this.type |= 1;
25665 }}, "~N,~N,~N");
25666 Clazz_defineMethod (c$, "setToRotation", 
25667 function (vecx, vecy) {
25668 var sin;
25669 var cos;
25670 if (vecy == 0) {
25671 sin = 0.0;
25672 if (vecx < 0.0) {
25673 cos = -1.0;
25674 this.state = 2;
25675 this.type = 8;
25676 } else {
25677 cos = 1.0;
25678 this.state = 0;
25679 this.type = 0;
25680 }} else if (vecx == 0) {
25681 cos = 0.0;
25682 sin = (vecy > 0.0) ? 1.0 : -1.0;
25683 this.state = 4;
25684 this.type = 8;
25685 } else {
25686 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25687 cos = vecx / len;
25688 sin = vecy / len;
25689 this.state = 6;
25690 this.type = 16;
25691 }this.m00 = cos;
25692 this.m10 = sin;
25693 this.m01 = -sin;
25694 this.m11 = cos;
25695 this.m02 = 0.0;
25696 this.m12 = 0.0;
25697 }, "~N,~N");
25698 Clazz_defineMethod (c$, "setToRotation", 
25699 function (vecx, vecy, anchorx, anchory) {
25700 this.setToRotation (vecx, vecy);
25701 var sin = this.m10;
25702 var oneMinusCos = 1.0 - this.m00;
25703 this.m02 = anchorx * oneMinusCos + anchory * sin;
25704 this.m12 = anchory * oneMinusCos - anchorx * sin;
25705 if (this.m02 != 0.0 || this.m12 != 0.0) {
25706 this.state |= 1;
25707 this.type |= 1;
25708 }}, "~N,~N,~N,~N");
25709 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25710 function (numquadrants) {
25711 switch (numquadrants & 3) {
25712 case 0:
25713 this.m00 = 1.0;
25714 this.m10 = 0.0;
25715 this.m01 = 0.0;
25716 this.m11 = 1.0;
25717 this.m02 = 0.0;
25718 this.m12 = 0.0;
25719 this.state = 0;
25720 this.type = 0;
25721 break;
25722 case 1:
25723 this.m00 = 0.0;
25724 this.m10 = 1.0;
25725 this.m01 = -1.0;
25726 this.m11 = 0.0;
25727 this.m02 = 0.0;
25728 this.m12 = 0.0;
25729 this.state = 4;
25730 this.type = 8;
25731 break;
25732 case 2:
25733 this.m00 = -1.0;
25734 this.m10 = 0.0;
25735 this.m01 = 0.0;
25736 this.m11 = -1.0;
25737 this.m02 = 0.0;
25738 this.m12 = 0.0;
25739 this.state = 2;
25740 this.type = 8;
25741 break;
25742 case 3:
25743 this.m00 = 0.0;
25744 this.m10 = -1.0;
25745 this.m01 = 1.0;
25746 this.m11 = 0.0;
25747 this.m02 = 0.0;
25748 this.m12 = 0.0;
25749 this.state = 4;
25750 this.type = 8;
25751 break;
25752 }
25753 }, "~N");
25754 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25755 function (numquadrants, anchorx, anchory) {
25756 switch (numquadrants & 3) {
25757 case 0:
25758 this.m00 = 1.0;
25759 this.m10 = 0.0;
25760 this.m01 = 0.0;
25761 this.m11 = 1.0;
25762 this.m02 = 0.0;
25763 this.m12 = 0.0;
25764 this.state = 0;
25765 this.type = 0;
25766 break;
25767 case 1:
25768 this.m00 = 0.0;
25769 this.m10 = 1.0;
25770 this.m01 = -1.0;
25771 this.m11 = 0.0;
25772 this.m02 = anchorx + anchory;
25773 this.m12 = anchory - anchorx;
25774 if (this.m02 == 0.0 && this.m12 == 0.0) {
25775 this.state = 4;
25776 this.type = 8;
25777 } else {
25778 this.state = 5;
25779 this.type = 9;
25780 }break;
25781 case 2:
25782 this.m00 = -1.0;
25783 this.m10 = 0.0;
25784 this.m01 = 0.0;
25785 this.m11 = -1.0;
25786 this.m02 = anchorx + anchorx;
25787 this.m12 = anchory + anchory;
25788 if (this.m02 == 0.0 && this.m12 == 0.0) {
25789 this.state = 2;
25790 this.type = 8;
25791 } else {
25792 this.state = 3;
25793 this.type = 9;
25794 }break;
25795 case 3:
25796 this.m00 = 0.0;
25797 this.m10 = -1.0;
25798 this.m01 = 1.0;
25799 this.m11 = 0.0;
25800 this.m02 = anchorx - anchory;
25801 this.m12 = anchory + anchorx;
25802 if (this.m02 == 0.0 && this.m12 == 0.0) {
25803 this.state = 4;
25804 this.type = 8;
25805 } else {
25806 this.state = 5;
25807 this.type = 9;
25808 }break;
25809 }
25810 }, "~N,~N,~N");
25811 Clazz_defineMethod (c$, "setToScale", 
25812 function (sx, sy) {
25813 this.m00 = sx;
25814 this.m10 = 0.0;
25815 this.m01 = 0.0;
25816 this.m11 = sy;
25817 this.m02 = 0.0;
25818 this.m12 = 0.0;
25819 if (sx != 1.0 || sy != 1.0) {
25820 this.state = 2;
25821 this.type = -1;
25822 } else {
25823 this.state = 0;
25824 this.type = 0;
25825 }}, "~N,~N");
25826 Clazz_defineMethod (c$, "setToShear", 
25827 function (shx, shy) {
25828 this.m00 = 1.0;
25829 this.m01 = shx;
25830 this.m10 = shy;
25831 this.m11 = 1.0;
25832 this.m02 = 0.0;
25833 this.m12 = 0.0;
25834 if (shx != 0.0 || shy != 0.0) {
25835 this.state = (6);
25836 this.type = -1;
25837 } else {
25838 this.state = 0;
25839 this.type = 0;
25840 }}, "~N,~N");
25841 Clazz_defineMethod (c$, "setTransform", 
25842 function (Tx) {
25843 this.m00 = Tx.m00;
25844 this.m10 = Tx.m10;
25845 this.m01 = Tx.m01;
25846 this.m11 = Tx.m11;
25847 this.m02 = Tx.m02;
25848 this.m12 = Tx.m12;
25849 this.state = Tx.state;
25850 this.type = Tx.type;
25851 }, "java.awt.geom.AffineTransform");
25852 Clazz_defineMethod (c$, "setTransform", 
25853 function (m00, m10, m01, m11, m02, m12) {
25854 this.m00 = m00;
25855 this.m10 = m10;
25856 this.m01 = m01;
25857 this.m11 = m11;
25858 this.m02 = m02;
25859 this.m12 = m12;
25860 this.updateState ();
25861 }, "~N,~N,~N,~N,~N,~N");
25862 Clazz_defineMethod (c$, "concatenate", 
25863 function (Tx) {
25864 var M0;
25865 var M1;
25866 var T00;
25867 var T01;
25868 var T10;
25869 var T11;
25870 var T02;
25871 var T12;
25872 var mystate = this.state;
25873 var txstate = Tx.state;
25874 switch ((txstate << 3) | mystate) {
25875 case (0):
25876 case (1):
25877 case (2):
25878 case (3):
25879 case (4):
25880 case (5):
25881 case (6):
25882 case (7):
25883 return;
25884 case (56):
25885 this.m01 = Tx.m01;
25886 this.m10 = Tx.m10;
25887 case (24):
25888 this.m00 = Tx.m00;
25889 this.m11 = Tx.m11;
25890 case (8):
25891 this.m02 = Tx.m02;
25892 this.m12 = Tx.m12;
25893 this.state = txstate;
25894 this.type = Tx.type;
25895 return;
25896 case (48):
25897 this.m01 = Tx.m01;
25898 this.m10 = Tx.m10;
25899 case (16):
25900 this.m00 = Tx.m00;
25901 this.m11 = Tx.m11;
25902 this.state = txstate;
25903 this.type = Tx.type;
25904 return;
25905 case (40):
25906 this.m02 = Tx.m02;
25907 this.m12 = Tx.m12;
25908 case (32):
25909 this.m01 = Tx.m01;
25910 this.m10 = Tx.m10;
25911 this.m00 = this.m11 = 0.0;
25912 this.state = txstate;
25913 this.type = Tx.type;
25914 return;
25915 case (15):
25916 case (14):
25917 case (13):
25918 case (12):
25919 case (11):
25920 case (10):
25921 case (9):
25922 this.translate (Tx.m02, Tx.m12);
25923 return;
25924 case (23):
25925 case (22):
25926 case (21):
25927 case (20):
25928 case (19):
25929 case (18):
25930 case (17):
25931 this.scale (Tx.m00, Tx.m11);
25932 return;
25933 case (39):
25934 case (38):
25935 T01 = Tx.m01;
25936 T10 = Tx.m10;
25937 M0 = this.m00;
25938 this.m00 = this.m01 * T10;
25939 this.m01 = M0 * T01;
25940 M0 = this.m10;
25941 this.m10 = this.m11 * T10;
25942 this.m11 = M0 * T01;
25943 this.type = -1;
25944 return;
25945 case (37):
25946 case (36):
25947 this.m00 = this.m01 * Tx.m10;
25948 this.m01 = 0.0;
25949 this.m11 = this.m10 * Tx.m01;
25950 this.m10 = 0.0;
25951 this.state = mystate ^ (6);
25952 this.type = -1;
25953 return;
25954 case (35):
25955 case (34):
25956 this.m01 = this.m00 * Tx.m01;
25957 this.m00 = 0.0;
25958 this.m10 = this.m11 * Tx.m10;
25959 this.m11 = 0.0;
25960 this.state = mystate ^ (6);
25961 this.type = -1;
25962 return;
25963 case (33):
25964 this.m00 = 0.0;
25965 this.m01 = Tx.m01;
25966 this.m10 = Tx.m10;
25967 this.m11 = 0.0;
25968 this.state = 5;
25969 this.type = -1;
25970 return;
25971 }
25972 T00 = Tx.m00;
25973 T01 = Tx.m01;
25974 T02 = Tx.m02;
25975 T10 = Tx.m10;
25976 T11 = Tx.m11;
25977 T12 = Tx.m12;
25978 switch (mystate) {
25979 default:
25980 this.stateError ();
25981 case (6):
25982 this.state = mystate | txstate;
25983 case (7):
25984 M0 = this.m00;
25985 M1 = this.m01;
25986 this.m00 = T00 * M0 + T10 * M1;
25987 this.m01 = T01 * M0 + T11 * M1;
25988 this.m02 += T02 * M0 + T12 * M1;
25989 M0 = this.m10;
25990 M1 = this.m11;
25991 this.m10 = T00 * M0 + T10 * M1;
25992 this.m11 = T01 * M0 + T11 * M1;
25993 this.m12 += T02 * M0 + T12 * M1;
25994 this.type = -1;
25995 return;
25996 case (5):
25997 case (4):
25998 M0 = this.m01;
25999 this.m00 = T10 * M0;
26000 this.m01 = T11 * M0;
26001 this.m02 += T12 * M0;
26002 M0 = this.m10;
26003 this.m10 = T00 * M0;
26004 this.m11 = T01 * M0;
26005 this.m12 += T02 * M0;
26006 break;
26007 case (3):
26008 case (2):
26009 M0 = this.m00;
26010 this.m00 = T00 * M0;
26011 this.m01 = T01 * M0;
26012 this.m02 += T02 * M0;
26013 M0 = this.m11;
26014 this.m10 = T10 * M0;
26015 this.m11 = T11 * M0;
26016 this.m12 += T12 * M0;
26017 break;
26018 case (1):
26019 this.m00 = T00;
26020 this.m01 = T01;
26021 this.m02 += T02;
26022 this.m10 = T10;
26023 this.m11 = T11;
26024 this.m12 += T12;
26025 this.state = txstate | 1;
26026 this.type = -1;
26027 return;
26028 }
26029 this.updateState ();
26030 }, "java.awt.geom.AffineTransform");
26031 Clazz_defineMethod (c$, "preConcatenate", 
26032 function (Tx) {
26033 var M0;
26034 var M1;
26035 var T00;
26036 var T01;
26037 var T10;
26038 var T11;
26039 var T02;
26040 var T12;
26041 var mystate = this.state;
26042 var txstate = Tx.state;
26043 switch ((txstate << 3) | mystate) {
26044 case (0):
26045 case (1):
26046 case (2):
26047 case (3):
26048 case (4):
26049 case (5):
26050 case (6):
26051 case (7):
26052 return;
26053 case (8):
26054 case (10):
26055 case (12):
26056 case (14):
26057 this.m02 = Tx.m02;
26058 this.m12 = Tx.m12;
26059 this.state = mystate | 1;
26060 this.type |= 1;
26061 return;
26062 case (9):
26063 case (11):
26064 case (13):
26065 case (15):
26066 this.m02 = this.m02 + Tx.m02;
26067 this.m12 = this.m12 + Tx.m12;
26068 return;
26069 case (17):
26070 case (16):
26071 this.state = mystate | 2;
26072 case (23):
26073 case (22):
26074 case (21):
26075 case (20):
26076 case (19):
26077 case (18):
26078 T00 = Tx.m00;
26079 T11 = Tx.m11;
26080 if ((mystate & 4) != 0) {
26081 this.m01 = this.m01 * T00;
26082 this.m10 = this.m10 * T11;
26083 if ((mystate & 2) != 0) {
26084 this.m00 = this.m00 * T00;
26085 this.m11 = this.m11 * T11;
26086 }} else {
26087 this.m00 = this.m00 * T00;
26088 this.m11 = this.m11 * T11;
26089 }if ((mystate & 1) != 0) {
26090 this.m02 = this.m02 * T00;
26091 this.m12 = this.m12 * T11;
26092 }this.type = -1;
26093 return;
26094 case (37):
26095 case (36):
26096 mystate = mystate | 2;
26097 case (33):
26098 case (32):
26099 case (35):
26100 case (34):
26101 this.state = mystate ^ 4;
26102 case (39):
26103 case (38):
26104 T01 = Tx.m01;
26105 T10 = Tx.m10;
26106 M0 = this.m00;
26107 this.m00 = this.m10 * T01;
26108 this.m10 = M0 * T10;
26109 M0 = this.m01;
26110 this.m01 = this.m11 * T01;
26111 this.m11 = M0 * T10;
26112 M0 = this.m02;
26113 this.m02 = this.m12 * T01;
26114 this.m12 = M0 * T10;
26115 this.type = -1;
26116 return;
26117 }
26118 T00 = Tx.m00;
26119 T01 = Tx.m01;
26120 T02 = Tx.m02;
26121 T10 = Tx.m10;
26122 T11 = Tx.m11;
26123 T12 = Tx.m12;
26124 switch (mystate) {
26125 default:
26126 this.stateError ();
26127 case (7):
26128 M0 = this.m02;
26129 M1 = this.m12;
26130 T02 += M0 * T00 + M1 * T01;
26131 T12 += M0 * T10 + M1 * T11;
26132 case (6):
26133 this.m02 = T02;
26134 this.m12 = T12;
26135 M0 = this.m00;
26136 M1 = this.m10;
26137 this.m00 = M0 * T00 + M1 * T01;
26138 this.m10 = M0 * T10 + M1 * T11;
26139 M0 = this.m01;
26140 M1 = this.m11;
26141 this.m01 = M0 * T00 + M1 * T01;
26142 this.m11 = M0 * T10 + M1 * T11;
26143 break;
26144 case (5):
26145 M0 = this.m02;
26146 M1 = this.m12;
26147 T02 += M0 * T00 + M1 * T01;
26148 T12 += M0 * T10 + M1 * T11;
26149 case (4):
26150 this.m02 = T02;
26151 this.m12 = T12;
26152 M0 = this.m10;
26153 this.m00 = M0 * T01;
26154 this.m10 = M0 * T11;
26155 M0 = this.m01;
26156 this.m01 = M0 * T00;
26157 this.m11 = M0 * T10;
26158 break;
26159 case (3):
26160 M0 = this.m02;
26161 M1 = this.m12;
26162 T02 += M0 * T00 + M1 * T01;
26163 T12 += M0 * T10 + M1 * T11;
26164 case (2):
26165 this.m02 = T02;
26166 this.m12 = T12;
26167 M0 = this.m00;
26168 this.m00 = M0 * T00;
26169 this.m10 = M0 * T10;
26170 M0 = this.m11;
26171 this.m01 = M0 * T01;
26172 this.m11 = M0 * T11;
26173 break;
26174 case (1):
26175 M0 = this.m02;
26176 M1 = this.m12;
26177 T02 += M0 * T00 + M1 * T01;
26178 T12 += M0 * T10 + M1 * T11;
26179 case (0):
26180 this.m02 = T02;
26181 this.m12 = T12;
26182 this.m00 = T00;
26183 this.m10 = T10;
26184 this.m01 = T01;
26185 this.m11 = T11;
26186 this.state = mystate | txstate;
26187 this.type = -1;
26188 return;
26189 }
26190 this.updateState ();
26191 }, "java.awt.geom.AffineTransform");
26192 Clazz_defineMethod (c$, "createInverse", 
26193 function () {
26194 var det;
26195 switch (this.state) {
26196 default:
26197 this.stateError ();
26198 case (7):
26199 det = this.m00 * this.m11 - this.m01 * this.m10;
26200 if (Math.abs (det) <= 4.9E-324) {
26201 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26202 }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));
26203 case (6):
26204 det = this.m00 * this.m11 - this.m01 * this.m10;
26205 if (Math.abs (det) <= 4.9E-324) {
26206 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26207 }return  new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, 0.0, 0.0, (6));
26208 case (5):
26209 if (this.m01 == 0.0 || this.m10 == 0.0) {
26210 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26211 }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));
26212 case (4):
26213 if (this.m01 == 0.0 || this.m10 == 0.0) {
26214 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26215 }return  new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, 0.0, 0.0, (4));
26216 case (3):
26217 if (this.m00 == 0.0 || this.m11 == 0.0) {
26218 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26219 }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));
26220 case (2):
26221 if (this.m00 == 0.0 || this.m11 == 0.0) {
26222 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26223 }return  new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, 0.0, 0.0, (2));
26224 case (1):
26225 return  new java.awt.geom.AffineTransform (1.0, 0.0, 0.0, 1.0, -this.m02, -this.m12, (1));
26226 case (0):
26227 return  new java.awt.geom.AffineTransform ();
26228 }
26229 });
26230 Clazz_defineMethod (c$, "invert", 
26231 function () {
26232 var M00;
26233 var M01;
26234 var M02;
26235 var M10;
26236 var M11;
26237 var M12;
26238 var det;
26239 switch (this.state) {
26240 default:
26241 this.stateError ();
26242 case (7):
26243 M00 = this.m00;
26244 M01 = this.m01;
26245 M02 = this.m02;
26246 M10 = this.m10;
26247 M11 = this.m11;
26248 M12 = this.m12;
26249 det = M00 * M11 - M01 * M10;
26250 if (Math.abs (det) <= 4.9E-324) {
26251 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26252 }this.m00 = M11 / det;
26253 this.m10 = -M10 / det;
26254 this.m01 = -M01 / det;
26255 this.m11 = M00 / det;
26256 this.m02 = (M01 * M12 - M11 * M02) / det;
26257 this.m12 = (M10 * M02 - M00 * M12) / det;
26258 break;
26259 case (6):
26260 M00 = this.m00;
26261 M01 = this.m01;
26262 M10 = this.m10;
26263 M11 = this.m11;
26264 det = M00 * M11 - M01 * M10;
26265 if (Math.abs (det) <= 4.9E-324) {
26266 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26267 }this.m00 = M11 / det;
26268 this.m10 = -M10 / det;
26269 this.m01 = -M01 / det;
26270 this.m11 = M00 / det;
26271 break;
26272 case (5):
26273 M01 = this.m01;
26274 M02 = this.m02;
26275 M10 = this.m10;
26276 M12 = this.m12;
26277 if (M01 == 0.0 || M10 == 0.0) {
26278 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26279 }this.m10 = 1.0 / M01;
26280 this.m01 = 1.0 / M10;
26281 this.m02 = -M12 / M10;
26282 this.m12 = -M02 / M01;
26283 break;
26284 case (4):
26285 M01 = this.m01;
26286 M10 = this.m10;
26287 if (M01 == 0.0 || M10 == 0.0) {
26288 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26289 }this.m10 = 1.0 / M01;
26290 this.m01 = 1.0 / M10;
26291 break;
26292 case (3):
26293 M00 = this.m00;
26294 M02 = this.m02;
26295 M11 = this.m11;
26296 M12 = this.m12;
26297 if (M00 == 0.0 || M11 == 0.0) {
26298 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26299 }this.m00 = 1.0 / M00;
26300 this.m11 = 1.0 / M11;
26301 this.m02 = -M02 / M00;
26302 this.m12 = -M12 / M11;
26303 break;
26304 case (2):
26305 M00 = this.m00;
26306 M11 = this.m11;
26307 if (M00 == 0.0 || M11 == 0.0) {
26308 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26309 }this.m00 = 1.0 / M00;
26310 this.m11 = 1.0 / M11;
26311 break;
26312 case (1):
26313 this.m02 = -this.m02;
26314 this.m12 = -this.m12;
26315 break;
26316 case (0):
26317 break;
26318 }
26319 });
26320 Clazz_defineMethod (c$, "transform", 
26321 function (ptSrc, ptDst) {
26322 if (ptDst == null) {
26323 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26324 ptDst =  new java.awt.geom.Point2D.Double ();
26325 } else {
26326 ptDst =  new java.awt.geom.Point2D.Float ();
26327 }}var x = ptSrc.getX ();
26328 var y = ptSrc.getY ();
26329 switch (this.state) {
26330 default:
26331 this.stateError ();
26332 case (7):
26333 ptDst.setLocation (x * this.m00 + y * this.m01 + this.m02, x * this.m10 + y * this.m11 + this.m12);
26334 return ptDst;
26335 case (6):
26336 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26337 return ptDst;
26338 case (5):
26339 ptDst.setLocation (y * this.m01 + this.m02, x * this.m10 + this.m12);
26340 return ptDst;
26341 case (4):
26342 ptDst.setLocation (y * this.m01, x * this.m10);
26343 return ptDst;
26344 case (3):
26345 ptDst.setLocation (x * this.m00 + this.m02, y * this.m11 + this.m12);
26346 return ptDst;
26347 case (2):
26348 ptDst.setLocation (x * this.m00, y * this.m11);
26349 return ptDst;
26350 case (1):
26351 ptDst.setLocation (x + this.m02, y + this.m12);
26352 return ptDst;
26353 case (0):
26354 ptDst.setLocation (x, y);
26355 return ptDst;
26356 }
26357 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26358 Clazz_defineMethod (c$, "transform", 
26359 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26360 if (numPts == 0) return;
26361 if (!JU.AU.isAD (srcPts)) {
26362 var src = srcPts;
26363 var dst = dstPts;
26364 this.transform (src, srcOff, dst, dstOff, numPts);
26365 return;
26366 }var M00;
26367 var M01;
26368 var M02;
26369 var M10;
26370 var M11;
26371 var M12;
26372 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26373 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26374 srcOff = dstOff;
26375 }switch (this.state) {
26376 default:
26377 this.stateError ();
26378 case (7):
26379 M00 = this.m00;
26380 M01 = this.m01;
26381 M02 = this.m02;
26382 M10 = this.m10;
26383 M11 = this.m11;
26384 M12 = this.m12;
26385 while (--numPts >= 0) {
26386 var x = srcPts[srcOff++];
26387 var y = srcPts[srcOff++];
26388 dstPts[dstOff++] = M00 * x + M01 * y + M02;
26389 dstPts[dstOff++] = M10 * x + M11 * y + M12;
26390 }
26391 return;
26392 case (6):
26393 M00 = this.m00;
26394 M01 = this.m01;
26395 M10 = this.m10;
26396 M11 = this.m11;
26397 while (--numPts >= 0) {
26398 var x = srcPts[srcOff++];
26399 var y = srcPts[srcOff++];
26400 dstPts[dstOff++] = M00 * x + M01 * y;
26401 dstPts[dstOff++] = M10 * x + M11 * y;
26402 }
26403 return;
26404 case (5):
26405 M01 = this.m01;
26406 M02 = this.m02;
26407 M10 = this.m10;
26408 M12 = this.m12;
26409 while (--numPts >= 0) {
26410 var x = srcPts[srcOff++];
26411 dstPts[dstOff++] = M01 * srcPts[srcOff++] + M02;
26412 dstPts[dstOff++] = M10 * x + M12;
26413 }
26414 return;
26415 case (4):
26416 M01 = this.m01;
26417 M10 = this.m10;
26418 while (--numPts >= 0) {
26419 var x = srcPts[srcOff++];
26420 dstPts[dstOff++] = M01 * srcPts[srcOff++];
26421 dstPts[dstOff++] = M10 * x;
26422 }
26423 return;
26424 case (3):
26425 M00 = this.m00;
26426 M02 = this.m02;
26427 M11 = this.m11;
26428 M12 = this.m12;
26429 while (--numPts >= 0) {
26430 dstPts[dstOff++] = M00 * srcPts[srcOff++] + M02;
26431 dstPts[dstOff++] = M11 * srcPts[srcOff++] + M12;
26432 }
26433 return;
26434 case (2):
26435 M00 = this.m00;
26436 M11 = this.m11;
26437 while (--numPts >= 0) {
26438 dstPts[dstOff++] = M00 * srcPts[srcOff++];
26439 dstPts[dstOff++] = M11 * srcPts[srcOff++];
26440 }
26441 return;
26442 case (1):
26443 M02 = this.m02;
26444 M12 = this.m12;
26445 while (--numPts >= 0) {
26446 dstPts[dstOff++] = srcPts[srcOff++] + M02;
26447 dstPts[dstOff++] = srcPts[srcOff++] + M12;
26448 }
26449 return;
26450 case (0):
26451 if (srcPts !== dstPts || srcOff != dstOff) {
26452 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26453 }return;
26454 }
26455 }, "~A,~N,~A,~N,~N");
26456 Clazz_defineMethod (c$, "inverseTransform", 
26457 function (ptSrc, ptDst) {
26458 if (ptDst == null) {
26459 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26460 ptDst =  new java.awt.geom.Point2D.Double ();
26461 } else {
26462 ptDst =  new java.awt.geom.Point2D.Float ();
26463 }}var x = ptSrc.getX ();
26464 var y = ptSrc.getY ();
26465 switch (this.state) {
26466 default:
26467 this.stateError ();
26468 case (7):
26469 x -= this.m02;
26470 y -= this.m12;
26471 case (6):
26472 var det = this.m00 * this.m11 - this.m01 * this.m10;
26473 if (Math.abs (det) <= 4.9E-324) {
26474 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26475 }ptDst.setLocation ((x * this.m11 - y * this.m01) / det, (y * this.m00 - x * this.m10) / det);
26476 return ptDst;
26477 case (5):
26478 x -= this.m02;
26479 y -= this.m12;
26480 case (4):
26481 if (this.m01 == 0.0 || this.m10 == 0.0) {
26482 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26483 }ptDst.setLocation (y / this.m10, x / this.m01);
26484 return ptDst;
26485 case (3):
26486 x -= this.m02;
26487 y -= this.m12;
26488 case (2):
26489 if (this.m00 == 0.0 || this.m11 == 0.0) {
26490 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26491 }ptDst.setLocation (x / this.m00, y / this.m11);
26492 return ptDst;
26493 case (1):
26494 ptDst.setLocation (x - this.m02, y - this.m12);
26495 return ptDst;
26496 case (0):
26497 ptDst.setLocation (x, y);
26498 return ptDst;
26499 }
26500 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26501 Clazz_defineMethod (c$, "inverseTransform", 
26502 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26503 var M00;
26504 var M01;
26505 var M02;
26506 var M10;
26507 var M11;
26508 var M12;
26509 var det;
26510 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26511 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26512 srcOff = dstOff;
26513 }switch (this.state) {
26514 default:
26515 this.stateError ();
26516 case (7):
26517 M00 = this.m00;
26518 M01 = this.m01;
26519 M02 = this.m02;
26520 M10 = this.m10;
26521 M11 = this.m11;
26522 M12 = this.m12;
26523 det = M00 * M11 - M01 * M10;
26524 if (Math.abs (det) <= 4.9E-324) {
26525 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26526 }while (--numPts >= 0) {
26527 var x = srcPts[srcOff++] - M02;
26528 var y = srcPts[srcOff++] - M12;
26529 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26530 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26531 }
26532 return;
26533 case (6):
26534 M00 = this.m00;
26535 M01 = this.m01;
26536 M10 = this.m10;
26537 M11 = this.m11;
26538 det = M00 * M11 - M01 * M10;
26539 if (Math.abs (det) <= 4.9E-324) {
26540 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26541 }while (--numPts >= 0) {
26542 var x = srcPts[srcOff++];
26543 var y = srcPts[srcOff++];
26544 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26545 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26546 }
26547 return;
26548 case (5):
26549 M01 = this.m01;
26550 M02 = this.m02;
26551 M10 = this.m10;
26552 M12 = this.m12;
26553 if (M01 == 0.0 || M10 == 0.0) {
26554 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26555 }while (--numPts >= 0) {
26556 var x = srcPts[srcOff++] - M02;
26557 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M10;
26558 dstPts[dstOff++] = x / M01;
26559 }
26560 return;
26561 case (4):
26562 M01 = this.m01;
26563 M10 = this.m10;
26564 if (M01 == 0.0 || M10 == 0.0) {
26565 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26566 }while (--numPts >= 0) {
26567 var x = srcPts[srcOff++];
26568 dstPts[dstOff++] = srcPts[srcOff++] / M10;
26569 dstPts[dstOff++] = x / M01;
26570 }
26571 return;
26572 case (3):
26573 M00 = this.m00;
26574 M02 = this.m02;
26575 M11 = this.m11;
26576 M12 = this.m12;
26577 if (M00 == 0.0 || M11 == 0.0) {
26578 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26579 }while (--numPts >= 0) {
26580 dstPts[dstOff++] = (srcPts[srcOff++] - M02) / M00;
26581 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M11;
26582 }
26583 return;
26584 case (2):
26585 M00 = this.m00;
26586 M11 = this.m11;
26587 if (M00 == 0.0 || M11 == 0.0) {
26588 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26589 }while (--numPts >= 0) {
26590 dstPts[dstOff++] = srcPts[srcOff++] / M00;
26591 dstPts[dstOff++] = srcPts[srcOff++] / M11;
26592 }
26593 return;
26594 case (1):
26595 M02 = this.m02;
26596 M12 = this.m12;
26597 while (--numPts >= 0) {
26598 dstPts[dstOff++] = srcPts[srcOff++] - M02;
26599 dstPts[dstOff++] = srcPts[srcOff++] - M12;
26600 }
26601 return;
26602 case (0):
26603 if (srcPts !== dstPts || srcOff != dstOff) {
26604 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26605 }return;
26606 }
26607 }, "~A,~N,~A,~N,~N");
26608 Clazz_defineMethod (c$, "deltaTransform", 
26609 function (ptSrc, ptDst) {
26610 if (ptDst == null) {
26611 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26612 ptDst =  new java.awt.geom.Point2D.Double ();
26613 } else {
26614 ptDst =  new java.awt.geom.Point2D.Float ();
26615 }}var x = ptSrc.getX ();
26616 var y = ptSrc.getY ();
26617 switch (this.state) {
26618 default:
26619 this.stateError ();
26620 case (7):
26621 case (6):
26622 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26623 return ptDst;
26624 case (5):
26625 case (4):
26626 ptDst.setLocation (y * this.m01, x * this.m10);
26627 return ptDst;
26628 case (3):
26629 case (2):
26630 ptDst.setLocation (x * this.m00, y * this.m11);
26631 return ptDst;
26632 case (1):
26633 case (0):
26634 ptDst.setLocation (x, y);
26635 return ptDst;
26636 }
26637 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26638 Clazz_defineMethod (c$, "deltaTransform", 
26639 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26640 var M00;
26641 var M01;
26642 var M10;
26643 var M11;
26644 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26645 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26646 srcOff = dstOff;
26647 }switch (this.state) {
26648 default:
26649 this.stateError ();
26650 case (7):
26651 case (6):
26652 M00 = this.m00;
26653 M01 = this.m01;
26654 M10 = this.m10;
26655 M11 = this.m11;
26656 while (--numPts >= 0) {
26657 var x = srcPts[srcOff++];
26658 var y = srcPts[srcOff++];
26659 dstPts[dstOff++] = x * M00 + y * M01;
26660 dstPts[dstOff++] = x * M10 + y * M11;
26661 }
26662 return;
26663 case (5):
26664 case (4):
26665 M01 = this.m01;
26666 M10 = this.m10;
26667 while (--numPts >= 0) {
26668 var x = srcPts[srcOff++];
26669 dstPts[dstOff++] = srcPts[srcOff++] * M01;
26670 dstPts[dstOff++] = x * M10;
26671 }
26672 return;
26673 case (3):
26674 case (2):
26675 M00 = this.m00;
26676 M11 = this.m11;
26677 while (--numPts >= 0) {
26678 dstPts[dstOff++] = srcPts[srcOff++] * M00;
26679 dstPts[dstOff++] = srcPts[srcOff++] * M11;
26680 }
26681 return;
26682 case (1):
26683 case (0):
26684 if (srcPts !== dstPts || srcOff != dstOff) {
26685 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26686 }return;
26687 }
26688 }, "~A,~N,~A,~N,~N");
26689 Clazz_defineMethod (c$, "createTransformedShape", 
26690 function (pSrc) {
26691 if (pSrc == null) {
26692 return null;
26693 }return  new java.awt.geom.Path2D.Double (pSrc, this);
26694 }, "java.awt.Shape");
26695 c$._matround = Clazz_defineMethod (c$, "_matround", 
26696  function (matval) {
26697 return Math.rint (matval * 1E15) / 1E15;
26698 }, "~N");
26699 Clazz_overrideMethod (c$, "toString", 
26700 function () {
26701 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) + "]]");
26702 });
26703 Clazz_defineMethod (c$, "isIdentity", 
26704 function () {
26705 return (this.state == 0 || (this.getType () == 0));
26706 });
26707 Clazz_defineMethod (c$, "clone", 
26708 function () {
26709 try {
26710 return Clazz_superCall (this, java.awt.geom.AffineTransform, "clone", []);
26711 } catch (e) {
26712 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
26713 throw  new InternalError ();
26714 } else {
26715 throw e;
26716 }
26717 }
26718 });
26719 Clazz_overrideMethod (c$, "hashCode", 
26720 function () {
26721 var bits = Double.doubleToLongBits (this.m00);
26722 bits = bits * 31 + Double.doubleToLongBits (this.m01);
26723 bits = bits * 31 + Double.doubleToLongBits (this.m02);
26724 bits = bits * 31 + Double.doubleToLongBits (this.m10);
26725 bits = bits * 31 + Double.doubleToLongBits (this.m11);
26726 bits = bits * 31 + Double.doubleToLongBits (this.m12);
26727 return ((bits) ^ ((bits >> 32)));
26728 });
26729 Clazz_overrideMethod (c$, "equals", 
26730 function (obj) {
26731 if (!(Clazz_instanceOf (obj, java.awt.geom.AffineTransform))) {
26732 return false;
26733 }var a = obj;
26734 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));
26735 }, "~O");
26736 Clazz_defineStatics (c$,
26737 "TYPE_UNKNOWN", -1,
26738 "TYPE_IDENTITY", 0,
26739 "TYPE_TRANSLATION", 1,
26740 "TYPE_UNIFORM_SCALE", 2,
26741 "TYPE_GENERAL_SCALE", 4,
26742 "TYPE_MASK_SCALE", (6),
26743 "TYPE_FLIP", 64,
26744 "TYPE_QUADRANT_ROTATION", 8,
26745 "TYPE_GENERAL_ROTATION", 16,
26746 "TYPE_MASK_ROTATION", (24),
26747 "TYPE_GENERAL_TRANSFORM", 32,
26748 "APPLY_IDENTITY", 0,
26749 "APPLY_TRANSLATE", 1,
26750 "APPLY_SCALE", 2,
26751 "APPLY_SHEAR", 4,
26752 "HI_SHIFT", 3,
26753 "HI_IDENTITY", 0,
26754 "HI_TRANSLATE", 8,
26755 "HI_SCALE", 16,
26756 "HI_SHEAR", 32,
26757 "rot90conversion",  Clazz_newIntArray (-1, [4, 5, 4, 5, 2, 3, 6, 7]));
26758 });
26759 Clazz_declarePackage ("java.awt.geom");
26760 Clazz_load (["java.lang.Exception"], "java.awt.geom.NoninvertibleTransformException", null, function () {
26761 c$ = Clazz_declareType (java.awt.geom, "NoninvertibleTransformException", Exception);
26762 });
26763 Clazz_declarePackage ("java.awt.geom");
26764 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 () {
26765 c$ = Clazz_decorateAsClass (function () {
26766 this.pointTypes = null;
26767 this.numTypes = 0;
26768 this.numCoords = 0;
26769 this.windingRule = 0;
26770 Clazz_instantialize (this, arguments);
26771 }, java.awt.geom, "Path2D", null, [java.awt.Shape, Cloneable]);
26772 Clazz_makeConstructor (c$, 
26773 function () {
26774 });
26775 Clazz_makeConstructor (c$, 
26776 function (rule, initialTypes) {
26777 this.setWindingRule (rule);
26778 this.pointTypes =  Clazz_newByteArray (initialTypes, 0);
26779 }, "~N,~N");
26780 Clazz_defineMethod (c$, "closePath", 
26781 function () {
26782 if (this.numTypes == 0 || this.pointTypes[this.numTypes - 1] != 4) {
26783 this.needRoom (true, 0);
26784 this.pointTypes[this.numTypes++] = 4;
26785 }});
26786 Clazz_defineMethod (c$, "append", 
26787 function (s, connect) {
26788 this.append (s.getPathIterator (null), connect);
26789 }, "java.awt.Shape,~B");
26790 Clazz_defineMethod (c$, "getWindingRule", 
26791 function () {
26792 return this.windingRule;
26793 });
26794 Clazz_defineMethod (c$, "setWindingRule", 
26795 function (rule) {
26796 if (rule != 0 && rule != 1) {
26797 throw  new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO");
26798 }this.windingRule = rule;
26799 }, "~N");
26800 Clazz_defineMethod (c$, "getCurrentPoint", 
26801 function () {
26802 var index = this.numCoords;
26803 if (this.numTypes < 1 || index < 1) {
26804 return null;
26805 }if (this.pointTypes[this.numTypes - 1] == 4) {
26806 loop : for (var i = this.numTypes - 2; i > 0; i--) {
26807 switch (this.pointTypes[i]) {
26808 case 0:
26809 break loop;
26810 case 1:
26811 index -= 2;
26812 break;
26813 case 2:
26814 index -= 4;
26815 break;
26816 case 3:
26817 index -= 6;
26818 break;
26819 case 4:
26820 break;
26821 }
26822 }
26823 }return this.getPoint (index - 2);
26824 });
26825 Clazz_defineMethod (c$, "reset", 
26826 function () {
26827 this.numTypes = this.numCoords = 0;
26828 });
26829 Clazz_defineMethod (c$, "createTransformedShape", 
26830 function (at) {
26831 var p2d = this.clone ();
26832 if (at != null) {
26833 p2d.transform (at);
26834 }return p2d;
26835 }, "java.awt.geom.AffineTransform");
26836 Clazz_overrideMethod (c$, "getBounds", 
26837 function () {
26838 return this.getBounds2D ().getBounds ();
26839 });
26840 c$.contains = Clazz_defineMethod (c$, "contains", 
26841 function (pi, x, y) {
26842 if (x * 0.0 + y * 0.0 == 0.0) {
26843 var mask = (pi.getWindingRule () == 1 ? -1 : 1);
26844 var cross = jssun.awt.geom.Curve.pointCrossingsForPath (pi, x, y);
26845 return ((cross & mask) != 0);
26846 } else {
26847 return false;
26848 }}, "java.awt.geom.PathIterator,~N,~N");
26849 c$.contains = Clazz_defineMethod (c$, "contains", 
26850 function (pi, p) {
26851 return java.awt.geom.Path2D.contains (pi, p.getX (), p.getY ());
26852 }, "java.awt.geom.PathIterator,java.awt.geom.Point2D");
26853 Clazz_defineMethod (c$, "contains", 
26854 function (x, y) {
26855 if (x * 0.0 + y * 0.0 == 0.0) {
26856 if (this.numTypes < 2) {
26857 return false;
26858 }var mask = (this.windingRule == 1 ? -1 : 1);
26859 return ((this.pointCrossings (x, y) & mask) != 0);
26860 } else {
26861 return false;
26862 }}, "~N,~N");
26863 Clazz_defineMethod (c$, "contains", 
26864 function (p) {
26865 return this.contains (p.getX (), p.getY ());
26866 }, "java.awt.geom.Point2D");
26867 c$.contains = Clazz_defineMethod (c$, "contains", 
26868 function (pi, x, y, w, h) {
26869 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26870 return false;
26871 }if (w <= 0 || h <= 0) {
26872 return false;
26873 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
26874 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
26875 return (crossings != -2147483648 && (crossings & mask) != 0);
26876 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
26877 c$.contains = Clazz_defineMethod (c$, "contains", 
26878 function (pi, r) {
26879 return java.awt.geom.Path2D.contains (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26880 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
26881 Clazz_defineMethod (c$, "contains", 
26882 function (x, y, w, h) {
26883 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26884 return false;
26885 }if (w <= 0 || h <= 0) {
26886 return false;
26887 }var mask = (this.windingRule == 1 ? -1 : 2);
26888 var crossings = this.rectCrossings (x, y, x + w, y + h);
26889 return (crossings != -2147483648 && (crossings & mask) != 0);
26890 }, "~N,~N,~N,~N");
26891 Clazz_defineMethod (c$, "contains", 
26892 function (r) {
26893 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26894 }, "java.awt.geom.Rectangle2D");
26895 c$.intersects = Clazz_defineMethod (c$, "intersects", 
26896 function (pi, x, y, w, h) {
26897 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26898 return false;
26899 }if (w <= 0 || h <= 0) {
26900 return false;
26901 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
26902 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
26903 return (crossings == -2147483648 || (crossings & mask) != 0);
26904 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
26905 c$.intersects = Clazz_defineMethod (c$, "intersects", 
26906 function (pi, r) {
26907 return java.awt.geom.Path2D.intersects (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26908 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
26909 Clazz_defineMethod (c$, "intersects", 
26910 function (x, y, w, h) {
26911 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26912 return false;
26913 }if (w <= 0 || h <= 0) {
26914 return false;
26915 }var mask = (this.windingRule == 1 ? -1 : 2);
26916 var crossings = this.rectCrossings (x, y, x + w, y + h);
26917 return (crossings == -2147483648 || (crossings & mask) != 0);
26918 }, "~N,~N,~N,~N");
26919 Clazz_defineMethod (c$, "intersects", 
26920 function (r) {
26921 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26922 }, "java.awt.geom.Rectangle2D");
26923 Clazz_overrideMethod (c$, "getPathIterator", 
26924 function (at, flatness) {
26925 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
26926 }, "java.awt.geom.AffineTransform,~N");
26927 Clazz_pu$h(self.c$);
26928 c$ = Clazz_decorateAsClass (function () {
26929 this.typeIdx = 0;
26930 this.pointIdx = 0;
26931 this.path = null;
26932 Clazz_instantialize (this, arguments);
26933 }, java.awt.geom.Path2D, "Iterator", null, java.awt.geom.PathIterator);
26934 Clazz_makeConstructor (c$, 
26935 function (a) {
26936 this.path = a;
26937 }, "java.awt.geom.Path2D");
26938 Clazz_overrideMethod (c$, "getWindingRule", 
26939 function () {
26940 return this.path.getWindingRule ();
26941 });
26942 Clazz_overrideMethod (c$, "isDone", 
26943 function () {
26944 return (this.typeIdx >= this.path.numTypes);
26945 });
26946 Clazz_overrideMethod (c$, "next", 
26947 function () {
26948 var a = this.path.pointTypes[this.typeIdx++];
26949 this.pointIdx += java.awt.geom.Path2D.Iterator.curvecoords[a];
26950 });
26951 Clazz_defineStatics (c$,
26952 "curvecoords",  Clazz_newIntArray (-1, [2, 2, 4, 6, 0]));
26953 c$ = Clazz_p0p ();
26954 Clazz_pu$h(self.c$);
26955 c$ = Clazz_decorateAsClass (function () {
26956 this.floatCoords = null;
26957 Clazz_instantialize (this, arguments);
26958 }, java.awt.geom.Path2D, "Float", java.awt.geom.Path2D);
26959 Clazz_makeConstructor (c$, 
26960 function () {
26961 this.construct (1, 20);
26962 });
26963 Clazz_makeConstructor (c$, 
26964 function (a) {
26965 this.construct (a, 20);
26966 }, "~N");
26967 Clazz_makeConstructor (c$, 
26968 function (a, b) {
26969 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
26970 this.setWindingRule (a);
26971 this.pointTypes =  Clazz_newByteArray (b, 0);
26972 this.floatCoords =  Clazz_newFloatArray (b * 2, 0);
26973 }, "~N,~N");
26974 Clazz_makeConstructor (c$, 
26975 function (a) {
26976 this.construct (a, null);
26977 }, "java.awt.Shape");
26978 Clazz_makeConstructor (c$, 
26979 function (a, b) {
26980 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
26981 this.setPath (a, b);
26982 }, "java.awt.Shape,java.awt.geom.AffineTransform");
26983 Clazz_defineMethod (c$, "setPath", 
26984  function (a, b) {
26985 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
26986 var c = a;
26987 this.setWindingRule (c.windingRule);
26988 this.numTypes = c.numTypes;
26989 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
26990 this.numCoords = c.numCoords;
26991 this.floatCoords = c.cloneCoordsFloat (b);
26992 } else {
26993 var c = a.getPathIterator (b);
26994 this.setWindingRule (c.getWindingRule ());
26995 this.pointTypes =  Clazz_newByteArray (20, 0);
26996 this.floatCoords =  Clazz_newFloatArray (40, 0);
26997 this.append (c, false);
26998 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
26999 Clazz_defineMethod (c$, "cloneCoordsFloat", 
27000 function (a) {
27001 var b;
27002 if (a == null) {
27003 b = java.util.Arrays.copyOf (this.floatCoords, this.floatCoords.length);
27004 } else {
27005 b =  Clazz_newFloatArray (this.floatCoords.length, 0);
27006 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27007 }return b;
27008 }, "java.awt.geom.AffineTransform");
27009 Clazz_overrideMethod (c$, "cloneCoordsDouble", 
27010 function (a) {
27011 var b =  Clazz_newDoubleArray (this.floatCoords.length, 0);
27012 if (a == null) {
27013 for (var c = 0; c < this.numCoords; c++) {
27014 b[c] = this.floatCoords[c];
27015 }
27016 } else {
27017 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27018 }return b;
27019 }, "java.awt.geom.AffineTransform");
27020 Clazz_defineMethod (c$, "append", 
27021 function (a, b) {
27022 {
27023 if (typeof pi == "number") {
27024 this.floatCoords[this.numCoords++] = pi;
27025 this.floatCoords[this.numCoords++] = connect;
27026 return;
27027 }
27028 }var c =  Clazz_newFloatArray (6, 0);
27029 while (!a.isDone ()) {
27030 switch (a.currentSegment (c)) {
27031 case 0:
27032 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27033 this.moveTo (c[0], c[1]);
27034 break;
27035 }if (this.pointTypes[this.numTypes - 1] != 4 && this.floatCoords[this.numCoords - 2] == c[0] && this.floatCoords[this.numCoords - 1] == c[1]) {
27036 break;
27037 }case 1:
27038 this.lineTo (c[0], c[1]);
27039 break;
27040 case 2:
27041 this.quadTo (c[0], c[1], c[2], c[3]);
27042 break;
27043 case 3:
27044 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27045 break;
27046 case 4:
27047 this.closePath ();
27048 break;
27049 }
27050 a.next ();
27051 b = false;
27052 }
27053 }, "java.awt.geom.PathIterator,~B");
27054 Clazz_overrideMethod (c$, "getPoint", 
27055 function (a) {
27056 return  new java.awt.geom.Point2D.Float (this.floatCoords[a], this.floatCoords[a + 1]);
27057 }, "~N");
27058 Clazz_overrideMethod (c$, "needRoom", 
27059 function (a, b) {
27060 if (a && this.numTypes == 0) {
27061 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27062 }var c = this.pointTypes.length;
27063 if (this.numTypes >= c) {
27064 var d = c;
27065 if (d > 500) {
27066 d = 500;
27067 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27068 }c = this.floatCoords.length;
27069 if (this.numCoords + b > c) {
27070 var d = c;
27071 if (d > 1000) {
27072 d = 1000;
27073 }if (d < b) {
27074 d = b;
27075 }this.floatCoords = java.util.Arrays.copyOf (this.floatCoords, c + d);
27076 }}, "~B,~N");
27077 Clazz_defineMethod (c$, "moveTo", 
27078 function (a, b) {
27079 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27080 this.floatCoords[this.numCoords - 2] = a;
27081 this.floatCoords[this.numCoords - 1] = b;
27082 } else {
27083 this.needRoom (false, 2);
27084 this.pointTypes[this.numTypes++] = 0;
27085 this.floatCoords[this.numCoords++] = a;
27086 this.floatCoords[this.numCoords++] = b;
27087 }}, "~N,~N");
27088 Clazz_defineMethod (c$, "moveTo", 
27089 function (a, b) {
27090 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27091 this.floatCoords[this.numCoords - 2] = a;
27092 this.floatCoords[this.numCoords - 1] = b;
27093 } else {
27094 this.needRoom (false, 2);
27095 this.pointTypes[this.numTypes++] = 0;
27096 this.floatCoords[this.numCoords++] = a;
27097 this.floatCoords[this.numCoords++] = b;
27098 }}, "~N,~N");
27099 Clazz_defineMethod (c$, "lineTo", 
27100 function (a, b) {
27101 this.needRoom (true, 2);
27102 this.pointTypes[this.numTypes++] = 1;
27103 this.floatCoords[this.numCoords++] = a;
27104 this.floatCoords[this.numCoords++] = b;
27105 }, "~N,~N");
27106 Clazz_defineMethod (c$, "lineTo", 
27107 function (a, b) {
27108 this.needRoom (true, 2);
27109 this.pointTypes[this.numTypes++] = 1;
27110 this.floatCoords[this.numCoords++] = a;
27111 this.floatCoords[this.numCoords++] = b;
27112 }, "~N,~N");
27113 Clazz_defineMethod (c$, "quadTo", 
27114 function (a, b, c, d) {
27115 this.needRoom (true, 4);
27116 this.pointTypes[this.numTypes++] = 2;
27117 this.floatCoords[this.numCoords++] = a;
27118 this.floatCoords[this.numCoords++] = b;
27119 this.floatCoords[this.numCoords++] = c;
27120 this.floatCoords[this.numCoords++] = d;
27121 }, "~N,~N,~N,~N");
27122 Clazz_defineMethod (c$, "quadTo", 
27123 function (a, b, c, d) {
27124 this.needRoom (true, 4);
27125 this.pointTypes[this.numTypes++] = 2;
27126 this.floatCoords[this.numCoords++] = a;
27127 this.floatCoords[this.numCoords++] = b;
27128 this.floatCoords[this.numCoords++] = c;
27129 this.floatCoords[this.numCoords++] = d;
27130 }, "~N,~N,~N,~N");
27131 Clazz_defineMethod (c$, "curveTo", 
27132 function (a, b, c, d, e, f) {
27133 this.needRoom (true, 6);
27134 this.pointTypes[this.numTypes++] = 3;
27135 this.floatCoords[this.numCoords++] = a;
27136 this.floatCoords[this.numCoords++] = b;
27137 this.floatCoords[this.numCoords++] = c;
27138 this.floatCoords[this.numCoords++] = d;
27139 this.floatCoords[this.numCoords++] = e;
27140 this.floatCoords[this.numCoords++] = f;
27141 }, "~N,~N,~N,~N,~N,~N");
27142 Clazz_defineMethod (c$, "curveTo", 
27143 function (a, b, c, d, e, f) {
27144 this.needRoom (true, 6);
27145 this.pointTypes[this.numTypes++] = 3;
27146 this.floatCoords[this.numCoords++] = a;
27147 this.floatCoords[this.numCoords++] = b;
27148 this.floatCoords[this.numCoords++] = c;
27149 this.floatCoords[this.numCoords++] = d;
27150 this.floatCoords[this.numCoords++] = e;
27151 this.floatCoords[this.numCoords++] = f;
27152 }, "~N,~N,~N,~N,~N,~N");
27153 Clazz_overrideMethod (c$, "pointCrossings", 
27154 function (a, b) {
27155 var c;
27156 var d;
27157 var e;
27158 var f;
27159 var g;
27160 var h;
27161 var i = this.floatCoords;
27162 e = c = i[0];
27163 f = d = i[1];
27164 var j = 0;
27165 var k = 2;
27166 for (var l = 1; l < this.numTypes; l++) {
27167 switch (this.pointTypes[l]) {
27168 case 0:
27169 if (f != d) {
27170 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27171 }c = e = i[k++];
27172 d = f = i[k++];
27173 break;
27174 case 1:
27175 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27176 e = g;
27177 f = h;
27178 break;
27179 case 2:
27180 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27181 e = g;
27182 f = h;
27183 break;
27184 case 3:
27185 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);
27186 e = g;
27187 f = h;
27188 break;
27189 case 4:
27190 if (f != d) {
27191 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27192 }e = c;
27193 f = d;
27194 break;
27195 }
27196 }
27197 if (f != d) {
27198 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27199 }return j;
27200 }, "~N,~N");
27201 Clazz_overrideMethod (c$, "rectCrossings", 
27202 function (a, b, c, d) {
27203 var e = this.floatCoords;
27204 var f;
27205 var g;
27206 var h;
27207 var i;
27208 var j;
27209 var k;
27210 f = h = e[0];
27211 g = i = e[1];
27212 var l = 0;
27213 var m = 2;
27214 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27215 switch (this.pointTypes[n]) {
27216 case 0:
27217 if (f != h || g != i) {
27218 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27219 }h = f = e[m++];
27220 i = g = e[m++];
27221 break;
27222 case 1:
27223 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j = e[m++], k = e[m++]);
27224 f = j;
27225 g = k;
27226 break;
27227 case 2:
27228 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27229 f = j;
27230 g = k;
27231 break;
27232 case 3:
27233 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);
27234 f = j;
27235 g = k;
27236 break;
27237 case 4:
27238 if (f != h || g != i) {
27239 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27240 }f = h;
27241 g = i;
27242 break;
27243 }
27244 }
27245 if (l != -2147483648 && (f != h || g != i)) {
27246 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27247 }return l;
27248 }, "~N,~N,~N,~N");
27249 Clazz_overrideMethod (c$, "transform", 
27250 function (a) {
27251 a.transform (this.floatCoords, 0, this.floatCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27252 }, "java.awt.geom.AffineTransform");
27253 Clazz_overrideMethod (c$, "getBounds2D", 
27254 function () {
27255 var a;
27256 var b;
27257 var c;
27258 var d;
27259 var e = this.numCoords;
27260 if (e > 0) {
27261 b = d = this.floatCoords[--e];
27262 a = c = this.floatCoords[--e];
27263 while (e > 0) {
27264 var f = this.floatCoords[--e];
27265 var g = this.floatCoords[--e];
27266 if (g < a) a = g;
27267 if (f < b) b = f;
27268 if (g > c) c = g;
27269 if (f > d) d = f;
27270 }
27271 } else {
27272 a = b = c = d = 0.0;
27273 }return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
27274 });
27275 Clazz_defineMethod (c$, "getPathIterator", 
27276 function (a) {
27277 if (a == null) {
27278 return  new java.awt.geom.Path2D.Float.CopyIterator (this);
27279 } else {
27280 return  new java.awt.geom.Path2D.Float.TxIterator (this, a);
27281 }}, "java.awt.geom.AffineTransform");
27282 Clazz_overrideMethod (c$, "clone", 
27283 function () {
27284 return  new java.awt.geom.Path2D.Float (this);
27285 });
27286 Clazz_pu$h(self.c$);
27287 c$ = Clazz_decorateAsClass (function () {
27288 this.floatCoords = null;
27289 Clazz_instantialize (this, arguments);
27290 }, java.awt.geom.Path2D.Float, "CopyIterator", java.awt.geom.Path2D.Iterator);
27291 Clazz_makeConstructor (c$, 
27292 function (a) {
27293 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.CopyIterator, [a]);
27294 this.floatCoords = a.floatCoords;
27295 }, "java.awt.geom.Path2D.Float");
27296 Clazz_defineMethod (c$, "currentSegment", 
27297 function (a) {
27298 var b = this.path.pointTypes[this.typeIdx];
27299 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27300 if (c > 0) {
27301 for (var d = 0; d < c; d++) {
27302 a[d] = this.floatCoords[this.pointIdx + d];
27303 }
27304 }return b;
27305 }, "~A");
27306 c$ = Clazz_p0p ();
27307 Clazz_pu$h(self.c$);
27308 c$ = Clazz_decorateAsClass (function () {
27309 this.floatCoords = null;
27310 this.affine = null;
27311 Clazz_instantialize (this, arguments);
27312 }, java.awt.geom.Path2D.Float, "TxIterator", java.awt.geom.Path2D.Iterator);
27313 Clazz_makeConstructor (c$, 
27314 function (a, b) {
27315 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.TxIterator, [a]);
27316 this.floatCoords = a.floatCoords;
27317 this.affine = b;
27318 }, "java.awt.geom.Path2D.Float,java.awt.geom.AffineTransform");
27319 Clazz_defineMethod (c$, "currentSegment", 
27320 function (a) {
27321 var b = this.path.pointTypes[this.typeIdx];
27322 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27323 if (c > 0) {
27324 this.affine.transform (this.floatCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27325 }return b;
27326 }, "~A");
27327 c$ = Clazz_p0p ();
27328 c$ = Clazz_p0p ();
27329 Clazz_pu$h(self.c$);
27330 c$ = Clazz_decorateAsClass (function () {
27331 this.doubleCoords = null;
27332 Clazz_instantialize (this, arguments);
27333 }, java.awt.geom.Path2D, "Double", java.awt.geom.Path2D);
27334 Clazz_makeConstructor (c$, 
27335 function () {
27336 this.construct (1, 20);
27337 });
27338 Clazz_makeConstructor (c$, 
27339 function (a) {
27340 this.construct (a, 20);
27341 }, "~N");
27342 Clazz_makeConstructor (c$, 
27343 function (a, b) {
27344 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, [a, b]);
27345 this.doubleCoords =  Clazz_newDoubleArray (b * 2, 0);
27346 }, "~N,~N");
27347 Clazz_makeConstructor (c$, 
27348 function (a) {
27349 this.construct (a, null);
27350 }, "java.awt.Shape");
27351 Clazz_makeConstructor (c$, 
27352 function (a, b) {
27353 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, []);
27354 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
27355 var c = a;
27356 this.setWindingRule (c.windingRule);
27357 this.numTypes = c.numTypes;
27358 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
27359 this.numCoords = c.numCoords;
27360 this.doubleCoords = c.cloneCoordsDouble (b);
27361 } else {
27362 var c = a.getPathIterator (b);
27363 this.setWindingRule (c.getWindingRule ());
27364 this.pointTypes =  Clazz_newByteArray (20, 0);
27365 this.doubleCoords =  Clazz_newDoubleArray (40, 0);
27366 this.append (c, false);
27367 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
27368 Clazz_overrideMethod (c$, "cloneCoordsFloat", 
27369 function (a) {
27370 var b =  Clazz_newFloatArray (this.doubleCoords.length, 0);
27371 if (a == null) {
27372 for (var c = 0; c < this.numCoords; c++) {
27373 b[c] = this.doubleCoords[c];
27374 }
27375 } else {
27376 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27377 }return b;
27378 }, "java.awt.geom.AffineTransform");
27379 Clazz_defineMethod (c$, "cloneCoordsDouble", 
27380 function (a) {
27381 var b;
27382 if (a == null) {
27383 b = java.util.Arrays.copyOf (this.doubleCoords, this.doubleCoords.length);
27384 } else {
27385 b =  Clazz_newDoubleArray (this.doubleCoords.length, 0);
27386 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27387 }return b;
27388 }, "java.awt.geom.AffineTransform");
27389 Clazz_defineMethod (c$, "append", 
27390 function (a, b) {
27391 {
27392 if (typeof pi == "number") {
27393 this.floatCoords[this.numCoords++] = pi;
27394 this.floatCoords[this.numCoords++] = connect;
27395 return;
27396 }
27397 }var c =  Clazz_newDoubleArray (6, 0);
27398 while (!a.isDone ()) {
27399 switch (a.currentSegment (c)) {
27400 case 0:
27401 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27402 this.moveTo (c[0], c[1]);
27403 break;
27404 }if (this.pointTypes[this.numTypes - 1] != 4 && this.doubleCoords[this.numCoords - 2] == c[0] && this.doubleCoords[this.numCoords - 1] == c[1]) {
27405 break;
27406 }case 1:
27407 this.lineTo (c[0], c[1]);
27408 break;
27409 case 2:
27410 this.quadTo (c[0], c[1], c[2], c[3]);
27411 break;
27412 case 3:
27413 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27414 break;
27415 case 4:
27416 this.closePath ();
27417 break;
27418 }
27419 a.next ();
27420 b = false;
27421 }
27422 }, "java.awt.geom.PathIterator,~B");
27423 Clazz_overrideMethod (c$, "getPoint", 
27424 function (a) {
27425 return  new java.awt.geom.Point2D.Double (this.doubleCoords[a], this.doubleCoords[a + 1]);
27426 }, "~N");
27427 Clazz_overrideMethod (c$, "needRoom", 
27428 function (a, b) {
27429 if (a && this.numTypes == 0) {
27430 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27431 }var c = this.pointTypes.length;
27432 if (this.numTypes >= c) {
27433 var d = c;
27434 if (d > 500) {
27435 d = 500;
27436 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27437 }c = this.doubleCoords.length;
27438 if (this.numCoords + b > c) {
27439 var d = c;
27440 if (d > 1000) {
27441 d = 1000;
27442 }if (d < b) {
27443 d = b;
27444 }this.doubleCoords = java.util.Arrays.copyOf (this.doubleCoords, c + d);
27445 }}, "~B,~N");
27446 Clazz_overrideMethod (c$, "moveTo", 
27447 function (a, b) {
27448 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27449 this.doubleCoords[this.numCoords - 2] = a;
27450 this.doubleCoords[this.numCoords - 1] = b;
27451 } else {
27452 this.needRoom (false, 2);
27453 this.pointTypes[this.numTypes++] = 0;
27454 this.doubleCoords[this.numCoords++] = a;
27455 this.doubleCoords[this.numCoords++] = b;
27456 }}, "~N,~N");
27457 Clazz_overrideMethod (c$, "lineTo", 
27458 function (a, b) {
27459 this.needRoom (true, 2);
27460 this.pointTypes[this.numTypes++] = 1;
27461 this.doubleCoords[this.numCoords++] = a;
27462 this.doubleCoords[this.numCoords++] = b;
27463 }, "~N,~N");
27464 Clazz_overrideMethod (c$, "quadTo", 
27465 function (a, b, c, d) {
27466 this.needRoom (true, 4);
27467 this.pointTypes[this.numTypes++] = 2;
27468 this.doubleCoords[this.numCoords++] = a;
27469 this.doubleCoords[this.numCoords++] = b;
27470 this.doubleCoords[this.numCoords++] = c;
27471 this.doubleCoords[this.numCoords++] = d;
27472 }, "~N,~N,~N,~N");
27473 Clazz_overrideMethod (c$, "curveTo", 
27474 function (a, b, c, d, e, f) {
27475 this.needRoom (true, 6);
27476 this.pointTypes[this.numTypes++] = 3;
27477 this.doubleCoords[this.numCoords++] = a;
27478 this.doubleCoords[this.numCoords++] = b;
27479 this.doubleCoords[this.numCoords++] = c;
27480 this.doubleCoords[this.numCoords++] = d;
27481 this.doubleCoords[this.numCoords++] = e;
27482 this.doubleCoords[this.numCoords++] = f;
27483 }, "~N,~N,~N,~N,~N,~N");
27484 Clazz_overrideMethod (c$, "pointCrossings", 
27485 function (a, b) {
27486 var c;
27487 var d;
27488 var e;
27489 var f;
27490 var g;
27491 var h;
27492 var i = this.doubleCoords;
27493 e = c = i[0];
27494 f = d = i[1];
27495 var j = 0;
27496 var k = 2;
27497 for (var l = 1; l < this.numTypes; l++) {
27498 switch (this.pointTypes[l]) {
27499 case 0:
27500 if (f != d) {
27501 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27502 }c = e = i[k++];
27503 d = f = i[k++];
27504 break;
27505 case 1:
27506 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27507 e = g;
27508 f = h;
27509 break;
27510 case 2:
27511 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27512 e = g;
27513 f = h;
27514 break;
27515 case 3:
27516 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);
27517 e = g;
27518 f = h;
27519 break;
27520 case 4:
27521 if (f != d) {
27522 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27523 }e = c;
27524 f = d;
27525 break;
27526 }
27527 }
27528 if (f != d) {
27529 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27530 }return j;
27531 }, "~N,~N");
27532 Clazz_overrideMethod (c$, "rectCrossings", 
27533 function (a, b, c, d) {
27534 var e = this.doubleCoords;
27535 var f;
27536 var g;
27537 var h;
27538 var i;
27539 var j;
27540 var k;
27541 f = h = e[0];
27542 g = i = e[1];
27543 var l = 0;
27544 var m = 2;
27545 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27546 switch (this.pointTypes[n]) {
27547 case 0:
27548 if (f != h || g != i) {
27549 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27550 }h = f = e[m++];
27551 i = g = e[m++];
27552 break;
27553 case 1:
27554 j = e[m++];
27555 k = e[m++];
27556 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j, k);
27557 f = j;
27558 g = k;
27559 break;
27560 case 2:
27561 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27562 f = j;
27563 g = k;
27564 break;
27565 case 3:
27566 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);
27567 f = j;
27568 g = k;
27569 break;
27570 case 4:
27571 if (f != h || g != i) {
27572 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27573 }f = h;
27574 g = i;
27575 break;
27576 }
27577 }
27578 if (l != -2147483648 && (f != h || g != i)) {
27579 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27580 }return l;
27581 }, "~N,~N,~N,~N");
27582 Clazz_overrideMethod (c$, "transform", 
27583 function (a) {
27584 a.transform (this.doubleCoords, 0, this.doubleCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27585 }, "java.awt.geom.AffineTransform");
27586 Clazz_overrideMethod (c$, "getBounds2D", 
27587 function () {
27588 var a;
27589 var b;
27590 var c;
27591 var d;
27592 var e = this.numCoords;
27593 if (e > 0) {
27594 b = d = this.doubleCoords[--e];
27595 a = c = this.doubleCoords[--e];
27596 while (e > 0) {
27597 var f = this.doubleCoords[--e];
27598 var g = this.doubleCoords[--e];
27599 if (g < a) a = g;
27600 if (f < b) b = f;
27601 if (g > c) c = g;
27602 if (f > d) d = f;
27603 }
27604 } else {
27605 a = b = c = d = 0.0;
27606 }return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
27607 });
27608 Clazz_defineMethod (c$, "getPathIterator", 
27609 function (a) {
27610 if (a == null) {
27611 return  new java.awt.geom.Path2D.Double.CopyIterator (this);
27612 } else {
27613 return  new java.awt.geom.Path2D.Double.TxIterator (this, a);
27614 }}, "java.awt.geom.AffineTransform");
27615 Clazz_overrideMethod (c$, "clone", 
27616 function () {
27617 return  new java.awt.geom.Path2D.Double (this);
27618 });
27619 Clazz_pu$h(self.c$);
27620 c$ = Clazz_decorateAsClass (function () {
27621 this.doubleCoords = null;
27622 Clazz_instantialize (this, arguments);
27623 }, java.awt.geom.Path2D.Double, "CopyIterator", java.awt.geom.Path2D.Iterator);
27624 Clazz_makeConstructor (c$, 
27625 function (a) {
27626 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.CopyIterator, [a]);
27627 this.doubleCoords = a.doubleCoords;
27628 }, "java.awt.geom.Path2D.Double");
27629 Clazz_defineMethod (c$, "currentSegment", 
27630 function (a) {
27631 var b = this.path.pointTypes[this.typeIdx];
27632 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27633 if (c > 0) {
27634 for (var d = 0; d < c; d++) {
27635 a[d] = this.doubleCoords[this.pointIdx + d];
27636 }
27637 }return b;
27638 }, "~A");
27639 Clazz_defineMethod (c$, "currentSegment", 
27640 function (a) {
27641 var b = this.path.pointTypes[this.typeIdx];
27642 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27643 if (c > 0) {
27644 System.arraycopy (this.doubleCoords, this.pointIdx, a, 0, c);
27645 }return b;
27646 }, "~A");
27647 c$ = Clazz_p0p ();
27648 Clazz_pu$h(self.c$);
27649 c$ = Clazz_decorateAsClass (function () {
27650 this.doubleCoords = null;
27651 this.affine = null;
27652 Clazz_instantialize (this, arguments);
27653 }, java.awt.geom.Path2D.Double, "TxIterator", java.awt.geom.Path2D.Iterator);
27654 Clazz_makeConstructor (c$, 
27655 function (a, b) {
27656 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.TxIterator, [a]);
27657 this.doubleCoords = a.doubleCoords;
27658 this.affine = b;
27659 }, "java.awt.geom.Path2D.Double,java.awt.geom.AffineTransform");
27660 Clazz_defineMethod (c$, "currentSegment", 
27661 function (a) {
27662 var b = this.path.pointTypes[this.typeIdx];
27663 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27664 if (c > 0) {
27665 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27666 }return b;
27667 }, "~A");
27668 Clazz_defineMethod (c$, "currentSegment", 
27669 function (a) {
27670 var b = this.path.pointTypes[this.typeIdx];
27671 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27672 if (c > 0) {
27673 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27674 }return b;
27675 }, "~A");
27676 c$ = Clazz_p0p ();
27677 c$ = Clazz_p0p ();
27678 Clazz_defineStatics (c$,
27679 "WIND_EVEN_ODD", 0,
27680 "WIND_NON_ZERO", 1,
27681 "SEG_MOVETO", 0,
27682 "SEG_LINETO", 1,
27683 "SEG_QUADTO", 2,
27684 "SEG_CUBICTO", 3,
27685 "SEG_CLOSE", 4,
27686 "INIT_SIZE", 20,
27687 "EXPAND_MAX", 500);
27688 });
27689 Clazz_declarePackage ("javax.swing");
27690 Clazz_declareInterface (javax.swing, "Icon");
27691 Clazz_declarePackage ("javax.swing");
27692 Clazz_load (["javax.swing.JTextField"], "javax.swing.JPasswordField", ["javax.swing.text.Segment"], function () {
27693 c$ = Clazz_decorateAsClass (function () {
27694 this.echoChar = '\0';
27695 this.echoCharSet = false;
27696 Clazz_instantialize (this, arguments);
27697 }, javax.swing, "JPasswordField", javax.swing.JTextField);
27698 Clazz_makeConstructor (c$, 
27699 function () {
27700 this.construct (null, null, 0);
27701 });
27702 Clazz_makeConstructor (c$, 
27703 function (text) {
27704 this.construct (null, text, 0);
27705 }, "~S");
27706 Clazz_makeConstructor (c$, 
27707 function (columns) {
27708 this.construct (null, null, columns);
27709 }, "~N");
27710 Clazz_makeConstructor (c$, 
27711 function (text, columns) {
27712 this.construct (null, text, columns);
27713 }, "~S,~N");
27714 Clazz_overrideMethod (c$, "getUIClassID", 
27715 function () {
27716 return "PasswordFieldUI";
27717 });
27718 Clazz_defineMethod (c$, "updateUI", 
27719 function () {
27720 if (!this.echoCharSet) {
27721 this.echoChar = '*';
27722 }Clazz_superCall (this, javax.swing.JPasswordField, "updateUI", []);
27723 });
27724 Clazz_defineMethod (c$, "getEchoChar", 
27725 function () {
27726 return this.echoChar;
27727 });
27728 Clazz_defineMethod (c$, "setEchoChar", 
27729 function (c) {
27730 this.echoChar = c;
27731 this.echoCharSet = true;
27732 this.repaint ();
27733 this.revalidate ();
27734 }, "~S");
27735 Clazz_defineMethod (c$, "echoCharIsSet", 
27736 function () {
27737 return this.echoChar.charCodeAt (0) != 0;
27738 });
27739 Clazz_overrideMethod (c$, "cut", 
27740 function () {
27741 });
27742 Clazz_overrideMethod (c$, "copy", 
27743 function () {
27744 });
27745 Clazz_defineMethod (c$, "getPassword", 
27746 function () {
27747 var doc = this.getDocument ();
27748 var txt =  new javax.swing.text.Segment ();
27749 try {
27750 doc.getText (0, doc.getLength (), txt);
27751 } catch (e) {
27752 if (Clazz_exceptionOf (e, javax.swing.text.BadLocationException)) {
27753 return null;
27754 } else {
27755 throw e;
27756 }
27757 }
27758 var retValue =  Clazz_newCharArray (txt.count, '\0');
27759 System.arraycopy (txt.array, txt.offset, retValue, 0, txt.count);
27760 return retValue;
27761 });
27762 Clazz_defineMethod (c$, "paramString", 
27763 function () {
27764 return Clazz_superCall (this, javax.swing.JPasswordField, "paramString", []) + ",echoChar=" + this.echoChar;
27765 });
27766 Clazz_defineMethod (c$, "customSetUIProperty", 
27767 function (propertyName, value) {
27768 if (propertyName === "echoChar") {
27769 if (!this.echoCharSet) {
27770 this.setEchoChar ((value).charValue ());
27771 this.echoCharSet = false;
27772 }return true;
27773 }return false;
27774 }, "~S,~O");
27775 Clazz_defineStatics (c$,
27776 "$$uiClassID", "PasswordFieldUI");
27777 });
27778 Clazz_declarePackage ("javax.swing");
27779 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 () {
27780 c$ = Clazz_decorateAsClass (function () {
27781 this.$action = null;
27782 this.actionPropertyChangeListener = null;
27783 this.horizontalAlignment = 10;
27784 this.columns = 0;
27785 this.columnWidth = 0;
27786 this.command = null;
27787 if (!Clazz_isClassDefined ("javax.swing.JTextField.ScrollRepainter")) {
27788 javax.swing.JTextField.$JTextField$ScrollRepainter$ ();
27789 }
27790 Clazz_instantialize (this, arguments);
27791 }, javax.swing, "JTextField", javax.swing.text.JTextComponent, javax.swing.SwingConstants);
27792 Clazz_makeConstructor (c$, 
27793 function () {
27794 this.construct (null, null, 0);
27795 });
27796 Clazz_makeConstructor (c$, 
27797 function (text) {
27798 this.construct (null, text, 0);
27799 }, "~S");
27800 Clazz_makeConstructor (c$, 
27801 function (columns) {
27802 this.construct (null, null, columns);
27803 }, "~N");
27804 Clazz_makeConstructor (c$, 
27805 function (text, columns) {
27806 this.construct (null, text, columns);
27807 }, "~S,~N");
27808 Clazz_makeConstructor (c$, 
27809 function (doc, text, columns) {
27810 Clazz_superConstructor (this, javax.swing.JTextField);
27811 if (columns < 0) {
27812 throw  new IllegalArgumentException ("columns less than zero.");
27813 }this.columns = columns;
27814 if (doc == null) {
27815 doc = this.createDefaultModel ();
27816 }this.setDocument (doc);
27817 if (text != null) {
27818 this.setText (text);
27819 }}, "javax.swing.text.Document,~S,~N");
27820 Clazz_overrideMethod (c$, "getUIClassID", 
27821 function () {
27822 return "TextFieldUI";
27823 });
27824 Clazz_defineMethod (c$, "setDocument", 
27825 function (doc) {
27826 if (doc != null) {
27827 doc.putProperty ("filterNewlines", Boolean.TRUE);
27828 }Clazz_superCall (this, javax.swing.JTextField, "setDocument", [doc]);
27829 }, "javax.swing.text.Document");
27830 Clazz_overrideMethod (c$, "isValidateRoot", 
27831 function () {
27832 var parent = this.getParent ();
27833 if (Clazz_instanceOf (parent, javax.swing.JViewport)) {
27834 return false;
27835 }return true;
27836 });
27837 Clazz_defineMethod (c$, "getHorizontalAlignment", 
27838 function () {
27839 return this.horizontalAlignment;
27840 });
27841 Clazz_defineMethod (c$, "setHorizontalAlignment", 
27842 function (alignment) {
27843 if (alignment == this.horizontalAlignment) return;
27844 var oldValue = this.horizontalAlignment;
27845 if ((alignment == 2) || (alignment == 0) || (alignment == 4) || (alignment == 10) || (alignment == 11)) {
27846 this.horizontalAlignment = alignment;
27847 } else {
27848 throw  new IllegalArgumentException ("horizontalAlignment");
27849 }this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
27850 this.invalidate ();
27851 this.repaint ();
27852 }, "~N");
27853 Clazz_defineMethod (c$, "createDefaultModel", 
27854 function () {
27855 return swingjs.JSToolkit.getPlainDocument (this);
27856 });
27857 Clazz_defineMethod (c$, "getColumns", 
27858 function () {
27859 return this.columns;
27860 });
27861 Clazz_defineMethod (c$, "setColumns", 
27862 function (columns) {
27863 var oldVal = this.columns;
27864 if (columns < 0) {
27865 throw  new IllegalArgumentException ("columns less than zero.");
27866 }if (columns != oldVal) {
27867 this.columns = columns;
27868 this.invalidate ();
27869 }}, "~N");
27870 Clazz_defineMethod (c$, "getColumnWidth", 
27871 function () {
27872 if (this.columnWidth == 0) {
27873 var metrics = this.getFontMetrics (this.getFont ());
27874 this.columnWidth = metrics.charWidth ('m');
27875 }return this.columnWidth;
27876 });
27877 Clazz_overrideMethod (c$, "getPreferredSize", 
27878 function () {
27879 return this.getPrefSizeJTF ();
27880 });
27881 Clazz_defineMethod (c$, "getPrefSizeJTF", 
27882 function () {
27883 var size = this.getPrefSizeJComp ();
27884 if (this.columns != 0) {
27885 var insets = this.getInsets ();
27886 size.width = this.columns * this.getColumnWidth () + insets.left + insets.right;
27887 }return size;
27888 });
27889 Clazz_defineMethod (c$, "setFont", 
27890 function (f) {
27891 Clazz_superCall (this, javax.swing.JTextField, "setFont", [f]);
27892 this.columnWidth = 0;
27893 }, "java.awt.Font");
27894 Clazz_defineMethod (c$, "addActionListener", 
27895 function (l) {
27896 this.listenerList.add (java.awt.event.ActionListener, l);
27897 }, "java.awt.event.ActionListener");
27898 Clazz_defineMethod (c$, "removeActionListener", 
27899 function (l) {
27900 if ((l != null) && (this.getAction () === l)) {
27901 this.setAction (null);
27902 } else {
27903 this.listenerList.remove (java.awt.event.ActionListener, l);
27904 }}, "java.awt.event.ActionListener");
27905 Clazz_defineMethod (c$, "getActionListeners", 
27906 function () {
27907 return this.listenerList.getListeners (java.awt.event.ActionListener);
27908 });
27909 Clazz_defineMethod (c$, "fireActionPerformed", 
27910 function () {
27911 var listeners = this.listenerList.getListenerList ();
27912 var modifiers = 0;
27913 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
27914 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
27915 modifiers = (currentEvent).getModifiers ();
27916 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
27917 modifiers = (currentEvent).getModifiers ();
27918 }var e =  new java.awt.event.ActionEvent (this, 1001, (this.command != null) ? this.command : this.getText (), java.awt.EventQueue.getMostRecentEventTime (), modifiers);
27919 for (var i = listeners.length - 2; i >= 0; i -= 2) {
27920 if (listeners[i] === java.awt.event.ActionListener) {
27921 (listeners[i + 1]).actionPerformed (e);
27922 }}
27923 });
27924 Clazz_defineMethod (c$, "setActionCommand", 
27925 function (command) {
27926 this.command = command;
27927 }, "~S");
27928 Clazz_defineMethod (c$, "setAction", 
27929 function (a) {
27930 var oldValue = this.getAction ();
27931 if (this.$action == null || !this.$action.equals (a)) {
27932 this.$action = a;
27933 if (oldValue != null) {
27934 this.removeActionListener (oldValue);
27935 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
27936 this.actionPropertyChangeListener = null;
27937 }this.configurePropertiesFromAction (this.$action);
27938 if (this.$action != null) {
27939 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
27940 this.addActionListener (this.$action);
27941 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
27942 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
27943 }this.firePropertyChangeObject ("action", oldValue, this.$action);
27944 }}, "javax.swing.Action");
27945 Clazz_defineMethod (c$, "isListener", 
27946  function (c, a) {
27947 var isListener = false;
27948 var listeners = this.listenerList.getListenerList ();
27949 for (var i = listeners.length - 2; i >= 0; i -= 2) {
27950 if (listeners[i] === c && listeners[i + 1] === a) {
27951 isListener = true;
27952 }}
27953 return isListener;
27954 }, "Class,java.awt.event.ActionListener");
27955 Clazz_defineMethod (c$, "getAction", 
27956 function () {
27957 return this.$action;
27958 });
27959 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
27960 function (a) {
27961 javax.swing.AbstractAction.setEnabledFromAction (this, a);
27962 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
27963 this.setActionCommandFromAction (a);
27964 }, "javax.swing.Action");
27965 Clazz_defineMethod (c$, "actionPropertyChanged", 
27966 function (action, propertyName) {
27967 if (propertyName === "ActionCommandKey") {
27968 this.setActionCommandFromAction (action);
27969 } else if (propertyName === "enabled") {
27970 javax.swing.AbstractAction.setEnabledFromAction (this, action);
27971 } else if (propertyName === "ShortDescription") {
27972 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
27973 }}, "javax.swing.Action,~S");
27974 Clazz_defineMethod (c$, "setActionCommandFromAction", 
27975  function (action) {
27976 this.setActionCommand ((action == null) ? null : action.getValue ("ActionCommandKey"));
27977 }, "javax.swing.Action");
27978 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
27979 function (a) {
27980 return  new javax.swing.JTextField.TextFieldActionPropertyChangeListener (this, a);
27981 }, "javax.swing.Action");
27982 Clazz_defineMethod (c$, "getActions", 
27983 function () {
27984 return javax.swing.text.TextAction.augmentList (Clazz_superCall (this, javax.swing.JTextField, "getActions", []), javax.swing.JTextField.defaultActions);
27985 });
27986 Clazz_defineMethod (c$, "postActionEvent", 
27987 function () {
27988 this.fireActionPerformed ();
27989 });
27990 Clazz_defineMethod (c$, "hasActionListener", 
27991 function () {
27992 var listeners = this.listenerList.getListenerList ();
27993 for (var i = listeners.length - 2; i >= 0; i -= 2) {
27994 if (listeners[i] === java.awt.event.ActionListener) {
27995 return true;
27996 }}
27997 return false;
27998 });
27999 Clazz_defineMethod (c$, "paramString", 
28000 function () {
28001 var horizontalAlignmentString;
28002 if (this.horizontalAlignment == 2) {
28003 horizontalAlignmentString = "LEFT";
28004 } else if (this.horizontalAlignment == 0) {
28005 horizontalAlignmentString = "CENTER";
28006 } else if (this.horizontalAlignment == 4) {
28007 horizontalAlignmentString = "RIGHT";
28008 } else if (this.horizontalAlignment == 10) {
28009 horizontalAlignmentString = "LEADING";
28010 } else if (this.horizontalAlignment == 11) {
28011 horizontalAlignmentString = "TRAILING";
28012 } else horizontalAlignmentString = "";
28013 var commandString = (this.command != null ? this.command : "");
28014 return Clazz_superCall (this, javax.swing.JTextField, "paramString", []) + ",columns=" + this.columns + ",columnWidth=" + this.columnWidth + ",command=" + commandString + ",horizontalAlignment=" + horizontalAlignmentString;
28015 });
28016 c$.$JTextField$ScrollRepainter$ = function () {
28017 Clazz_pu$h(self.c$);
28018 c$ = Clazz_decorateAsClass (function () {
28019 Clazz_prepareCallback (this, arguments);
28020 Clazz_instantialize (this, arguments);
28021 }, javax.swing.JTextField, "ScrollRepainter", null, javax.swing.event.ChangeListener);
28022 Clazz_overrideMethod (c$, "stateChanged", 
28023 function (a) {
28024 this.b$["javax.swing.JTextField"].repaint ();
28025 }, "javax.swing.event.ChangeEvent");
28026 c$ = Clazz_p0p ();
28027 };
28028 Clazz_pu$h(self.c$);
28029 c$ = Clazz_declareType (javax.swing.JTextField, "TextFieldActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
28030 Clazz_overrideMethod (c$, "actionPropertyChanged", 
28031 function (a, b, c) {
28032 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
28033 a.configurePropertiesFromAction (b);
28034 } else {
28035 a.actionPropertyChanged (b, c.getPropertyName ());
28036 }}, "javax.swing.JTextField,javax.swing.Action,java.beans.PropertyChangeEvent");
28037 c$ = Clazz_p0p ();
28038 Clazz_pu$h(self.c$);
28039 c$ = Clazz_declareType (javax.swing.JTextField, "NotifyAction", javax.swing.text.TextAction);
28040 Clazz_makeConstructor (c$, 
28041 function () {
28042 Clazz_superConstructor (this, javax.swing.JTextField.NotifyAction, ["notify-field-accept"]);
28043 });
28044 Clazz_overrideMethod (c$, "actionPerformed", 
28045 function (a) {
28046 var b = this.getFocusedComponent ();
28047 if (Clazz_instanceOf (b, javax.swing.JTextField)) {
28048 var c = b;
28049 c.postActionEvent ();
28050 }}, "java.awt.event.ActionEvent");
28051 Clazz_overrideMethod (c$, "isEnabled", 
28052 function () {
28053 var a = this.getFocusedComponent ();
28054 if (Clazz_instanceOf (a, javax.swing.JTextField)) {
28055 return (a).hasActionListener ();
28056 }return false;
28057 });
28058 c$ = Clazz_p0p ();
28059 Clazz_defineStatics (c$,
28060 "notifyAction", "notify-field-accept");
28061 c$.defaultActions = c$.prototype.defaultActions =  Clazz_newArray (-1, [ new javax.swing.JTextField.NotifyAction ()]);
28062 Clazz_defineStatics (c$,
28063 "$uiClassID", "TextFieldUI");
28064 });
28065 Clazz_declarePackage ("javax.swing");
28066 Clazz_load (["java.beans.PropertyChangeListener"], "javax.swing.ActionPropertyChangeListener", null, function () {
28067 c$ = Clazz_decorateAsClass (function () {
28068 this.action = null;
28069 Clazz_instantialize (this, arguments);
28070 }, javax.swing, "ActionPropertyChangeListener", null, java.beans.PropertyChangeListener);
28071 Clazz_makeConstructor (c$, 
28072 function (c, a) {
28073 this.setTarget (c);
28074 this.action = a;
28075 }, "~O,javax.swing.Action");
28076 Clazz_overrideMethod (c$, "propertyChange", 
28077 function (e) {
28078 var target = this.getTarget ();
28079 if (target == null) {
28080 this.getAction ().removePropertyChangeListener (this);
28081 } else {
28082 this.actionPropertyChanged (target, this.getAction (), e);
28083 }}, "java.beans.PropertyChangeEvent");
28084 Clazz_defineMethod (c$, "setTarget", 
28085  function (c) {
28086 }, "~O");
28087 Clazz_defineMethod (c$, "getTarget", 
28088 function () {
28089 return null;
28090 });
28091 Clazz_defineMethod (c$, "getAction", 
28092 function () {
28093 return this.action;
28094 });
28095 });
28096 Clazz_declarePackage ("javax.swing.event");
28097 Clazz_load (["java.util.EventListener"], "javax.swing.event.ChangeListener", null, function () {
28098 Clazz_declareInterface (javax.swing.event, "ChangeListener", java.util.EventListener);
28099 });
28100 Clazz_declarePackage ("javax.swing");
28101 Clazz_load (null, "javax.swing.ActionMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28102 c$ = Clazz_decorateAsClass (function () {
28103 this.arrayTable = null;
28104 this.parent = null;
28105 Clazz_instantialize (this, arguments);
28106 }, javax.swing, "ActionMap");
28107 Clazz_makeConstructor (c$, 
28108 function () {
28109 });
28110 Clazz_defineMethod (c$, "setParent", 
28111 function (map) {
28112 this.parent = map;
28113 }, "javax.swing.ActionMap");
28114 Clazz_defineMethod (c$, "getParent", 
28115 function () {
28116 return this.parent;
28117 });
28118 Clazz_defineMethod (c$, "put", 
28119 function (key, action) {
28120 if (key == null) {
28121 return;
28122 }if (action == null) {
28123 this.remove (key);
28124 } else {
28125 if (this.arrayTable == null) {
28126 this.arrayTable =  new javax.swing.ArrayTable ();
28127 }this.arrayTable.put (key, action);
28128 }}, "~O,javax.swing.Action");
28129 Clazz_defineMethod (c$, "get", 
28130 function (key) {
28131 var value = (this.arrayTable == null) ? null : this.arrayTable.get (key);
28132 if (value == null) {
28133 var parent = this.getParent ();
28134 if (parent != null) {
28135 return parent.get (key);
28136 }}return value;
28137 }, "~O");
28138 Clazz_defineMethod (c$, "remove", 
28139 function (key) {
28140 if (this.arrayTable != null) {
28141 this.arrayTable.remove (key);
28142 }}, "~O");
28143 Clazz_defineMethod (c$, "clear", 
28144 function () {
28145 if (this.arrayTable != null) {
28146 this.arrayTable.clear ();
28147 }});
28148 Clazz_defineMethod (c$, "keys", 
28149 function () {
28150 if (this.arrayTable == null) {
28151 return null;
28152 }return this.arrayTable.getKeys (null);
28153 });
28154 Clazz_defineMethod (c$, "size", 
28155 function () {
28156 if (this.arrayTable == null) {
28157 return 0;
28158 }return this.arrayTable.size ();
28159 });
28160 Clazz_defineMethod (c$, "allKeys", 
28161 function () {
28162 var count = this.size ();
28163 var parent = this.getParent ();
28164 if (count == 0) {
28165 if (parent != null) {
28166 return parent.allKeys ();
28167 }return this.keys ();
28168 }if (parent == null) {
28169 return this.keys ();
28170 }var keys = this.keys ();
28171 var pKeys = parent.allKeys ();
28172 if (pKeys == null) {
28173 return keys;
28174 }if (keys == null) {
28175 return pKeys;
28176 }var keyMap =  new java.util.HashMap ();
28177 var counter;
28178 for (counter = keys.length - 1; counter >= 0; counter--) {
28179 keyMap.put (keys[counter], keys[counter]);
28180 }
28181 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28182 keyMap.put (pKeys[counter], pKeys[counter]);
28183 }
28184 return keyMap.keySet ().toArray ();
28185 });
28186 });
28187 Clazz_declarePackage ("javax.swing");
28188 Clazz_load (null, "javax.swing.InputMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28189 c$ = Clazz_decorateAsClass (function () {
28190 this.arrayTable = null;
28191 this.parent = null;
28192 Clazz_instantialize (this, arguments);
28193 }, javax.swing, "InputMap");
28194 Clazz_makeConstructor (c$, 
28195 function () {
28196 });
28197 Clazz_defineMethod (c$, "setParent", 
28198 function (map) {
28199 this.parent = map;
28200 }, "javax.swing.InputMap");
28201 Clazz_defineMethod (c$, "getParent", 
28202 function () {
28203 return this.parent;
28204 });
28205 Clazz_defineMethod (c$, "put", 
28206 function (keyStroke, actionMapKey) {
28207 if (keyStroke == null) {
28208 return;
28209 }if (actionMapKey == null) {
28210 this.remove (keyStroke);
28211 } else {
28212 if (this.arrayTable == null) {
28213 this.arrayTable =  new javax.swing.ArrayTable ();
28214 }this.arrayTable.put (keyStroke, actionMapKey);
28215 }}, "javax.swing.KeyStroke,~O");
28216 Clazz_defineMethod (c$, "get", 
28217 function (keyStroke) {
28218 if (this.arrayTable == null) {
28219 var parent = this.getParent ();
28220 if (parent != null) {
28221 return parent.get (keyStroke);
28222 }return null;
28223 }var value = this.arrayTable.get (keyStroke);
28224 if (value == null) {
28225 var parent = this.getParent ();
28226 if (parent != null) {
28227 return parent.get (keyStroke);
28228 }}return value;
28229 }, "javax.swing.KeyStroke");
28230 Clazz_defineMethod (c$, "remove", 
28231 function (key) {
28232 if (this.arrayTable != null) {
28233 this.arrayTable.remove (key);
28234 }}, "javax.swing.KeyStroke");
28235 Clazz_defineMethod (c$, "clear", 
28236 function () {
28237 if (this.arrayTable != null) {
28238 this.arrayTable.clear ();
28239 }});
28240 Clazz_defineMethod (c$, "keys", 
28241 function () {
28242 if (this.arrayTable == null) {
28243 return null;
28244 }var keys =  new Array (this.arrayTable.size ());
28245 this.arrayTable.getKeys (keys);
28246 return keys;
28247 });
28248 Clazz_defineMethod (c$, "size", 
28249 function () {
28250 if (this.arrayTable == null) {
28251 return 0;
28252 }return this.arrayTable.size ();
28253 });
28254 Clazz_defineMethod (c$, "allKeys", 
28255 function () {
28256 var count = this.size ();
28257 var parent = this.getParent ();
28258 if (count == 0) {
28259 if (parent != null) {
28260 return parent.allKeys ();
28261 }return this.keys ();
28262 }if (parent == null) {
28263 return this.keys ();
28264 }var keys = this.keys ();
28265 var pKeys = parent.allKeys ();
28266 if (pKeys == null) {
28267 return keys;
28268 }if (keys == null) {
28269 return pKeys;
28270 }var keyMap =  new java.util.HashMap ();
28271 var counter;
28272 for (counter = keys.length - 1; counter >= 0; counter--) {
28273 keyMap.put (keys[counter], keys[counter]);
28274 }
28275 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28276 keyMap.put (pKeys[counter], pKeys[counter]);
28277 }
28278 var allKeys =  new Array (keyMap.size ());
28279 return keyMap.keySet ().toArray (allKeys);
28280 });
28281 });
28282 Clazz_declarePackage ("javax.swing");
28283 Clazz_declareInterface (javax.swing, "Scrollable");
28284 Clazz_declarePackage ("javax.swing.event");
28285 Clazz_load (["java.util.EventObject"], "javax.swing.event.CaretEvent", null, function () {
28286 c$ = Clazz_declareType (javax.swing.event, "CaretEvent", java.util.EventObject);
28287 });
28288 Clazz_declarePackage ("javax.swing.event");
28289 Clazz_load (["java.util.EventListener"], "javax.swing.event.DocumentListener", null, function () {
28290 Clazz_declareInterface (javax.swing.event, "DocumentListener", java.util.EventListener);
28291 });
28292 Clazz_declarePackage ("javax.swing.event");
28293 Clazz_load (null, "javax.swing.event.EventListenerList", ["java.lang.reflect.Array"], function () {
28294 c$ = Clazz_decorateAsClass (function () {
28295 this.listenerList = null;
28296 Clazz_instantialize (this, arguments);
28297 }, javax.swing.event, "EventListenerList");
28298 Clazz_prepareFields (c$, function () {
28299 this.listenerList = javax.swing.event.EventListenerList.NULL_ARRAY;
28300 });
28301 Clazz_defineMethod (c$, "getListenerList", 
28302 function () {
28303 return this.listenerList;
28304 });
28305 Clazz_defineMethod (c$, "getListeners", 
28306 function (t) {
28307 var lList = this.listenerList;
28308 var n = this.getListenerCount (lList, t);
28309 var result = java.lang.reflect.Array.newInstance (t, n);
28310 var j = 0;
28311 for (var i = lList.length - 2; i >= 0; i -= 2) {
28312 if (lList[i] === t) {
28313 result[j++] = lList[i + 1];
28314 }}
28315 return result;
28316 }, "Class");
28317 Clazz_defineMethod (c$, "getListenerCount", 
28318 function () {
28319 return Clazz_doubleToInt (this.listenerList.length / 2);
28320 });
28321 Clazz_defineMethod (c$, "getListenerCount", 
28322 function (t) {
28323 var lList = this.listenerList;
28324 return this.getListenerCount (lList, t);
28325 }, "Class");
28326 Clazz_defineMethod (c$, "getListenerCount", 
28327  function (list, t) {
28328 var count = 0;
28329 for (var i = 0; i < list.length; i += 2) {
28330 if (t === list[i]) count++;
28331 }
28332 return count;
28333 }, "~A,Class");
28334 Clazz_defineMethod (c$, "add", 
28335 function (t, l) {
28336 if (l == null) {
28337 return;
28338 }if (this.listenerList === javax.swing.event.EventListenerList.NULL_ARRAY) {
28339 this.listenerList =  Clazz_newArray (-1, [t, l]);
28340 } else {
28341 var i = this.listenerList.length;
28342 var tmp =  new Array (i + 2);
28343 System.arraycopy (this.listenerList, 0, tmp, 0, i);
28344 tmp[i] = t;
28345 tmp[i + 1] = l;
28346 this.listenerList = tmp;
28347 }}, "Class,~O");
28348 Clazz_defineMethod (c$, "remove", 
28349 function (t, l) {
28350 if (l == null) {
28351 return;
28352 }var index = -1;
28353 for (var i = this.listenerList.length - 2; i >= 0; i -= 2) {
28354 if ((this.listenerList[i] === t) && (this.listenerList[i + 1].equals (l) == true)) {
28355 index = i;
28356 break;
28357 }}
28358 if (index != -1) {
28359 var tmp =  new Array (this.listenerList.length - 2);
28360 System.arraycopy (this.listenerList, 0, tmp, 0, index);
28361 if (index < tmp.length) System.arraycopy (this.listenerList, index + 2, tmp, index, tmp.length - index);
28362 this.listenerList = (tmp.length == 0) ? javax.swing.event.EventListenerList.NULL_ARRAY : tmp;
28363 }}, "Class,~O");
28364 Clazz_overrideMethod (c$, "toString", 
28365 function () {
28366 var lList = this.listenerList;
28367 var s = "EventListenerList: ";
28368 s += Clazz_doubleToInt (lList.length / 2) + " listeners: ";
28369 for (var i = 0; i <= lList.length - 2; i += 2) {
28370 s += " type " + (lList[i]).getName ();
28371 s += " listener " + lList[i + 1];
28372 }
28373 return s;
28374 });
28375 c$.NULL_ARRAY = c$.prototype.NULL_ARRAY =  new Array (0);
28376 });
28377 Clazz_declarePackage ("javax.swing.event");
28378 Clazz_load (["java.util.EventObject"], "javax.swing.event.ChangeEvent", null, function () {
28379 c$ = Clazz_declareType (javax.swing.event, "ChangeEvent", java.util.EventObject);
28380 });
28381 Clazz_declarePackage ("jssun.swing");
28382 Clazz_load (["jssun.swing.UIClientPropertyKey"], "jssun.swing.StringUIClientPropertyKey", null, function () {
28383 c$ = Clazz_decorateAsClass (function () {
28384 this.key = null;
28385 Clazz_instantialize (this, arguments);
28386 }, jssun.swing, "StringUIClientPropertyKey", null, jssun.swing.UIClientPropertyKey);
28387 Clazz_makeConstructor (c$, 
28388 function (key) {
28389 this.key = key;
28390 }, "~S");
28391 Clazz_overrideMethod (c$, "toString", 
28392 function () {
28393 return this.key;
28394 });
28395 });
28396 Clazz_declarePackage ("jssun.swing");
28397 Clazz_declareInterface (jssun.swing, "UIClientPropertyKey");
28398 Clazz_declarePackage ("java.awt");
28399 Clazz_load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () {
28400 c$ = Clazz_declareType (java.awt, "Graphics2D", java.awt.Graphics);
28401 Clazz_makeConstructor (c$, 
28402 function () {
28403 Clazz_superConstructor (this, java.awt.Graphics2D, []);
28404 });
28405 Clazz_overrideMethod (c$, "draw3DRect", 
28406 function (x, y, width, height, raised) {
28407 var p = this.getPaint ();
28408 var c = this.getColor ();
28409 var brighter = c.brighter ();
28410 var darker = c.darker ();
28411 this.setColor (raised ? brighter : darker);
28412 this.fillRect (x, y, 1, height + 1);
28413 this.fillRect (x + 1, y, width - 1, 1);
28414 this.setColor (raised ? darker : brighter);
28415 this.fillRect (x + 1, y + height, width, 1);
28416 this.fillRect (x + width, y, 1, height);
28417 this.setPaint (p);
28418 }, "~N,~N,~N,~N,~B");
28419 Clazz_overrideMethod (c$, "fill3DRect", 
28420 function (x, y, width, height, raised) {
28421 var p = this.getPaint ();
28422 var c = this.getColor ();
28423 var brighter = c.brighter ();
28424 var darker = c.darker ();
28425 if (!raised) {
28426 this.setColor (darker);
28427 } else if (p !== c) {
28428 this.setColor (c);
28429 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28430 this.setColor (raised ? brighter : darker);
28431 this.fillRect (x, y, 1, height);
28432 this.fillRect (x + 1, y, width - 2, 1);
28433 this.setColor (raised ? darker : brighter);
28434 this.fillRect (x + 1, y + height - 1, width - 1, 1);
28435 this.fillRect (x + width - 1, y, 1, height - 1);
28436 this.setPaint (p);
28437 }, "~N,~N,~N,~N,~B");
28438 });
28439 Clazz_declarePackage ("java.awt");
28440 c$ = Clazz_declareType (java.awt, "Graphics");
28441 Clazz_makeConstructor (c$, 
28442 function () {
28443 });
28444 Clazz_defineMethod (c$, "create", 
28445 function () {
28446 return this.createSwingJS ();
28447 });
28448 Clazz_defineMethod (c$, "create", 
28449 function (x, y, width, height) {
28450 return this.create4 (x, y, width, height);
28451 }, "~N,~N,~N,~N");
28452 Clazz_defineMethod (c$, "create4", 
28453 function (x, y, width, height) {
28454 var g = this.createSwingJS ();
28455 if (g == null) return null;
28456 g.translate (x, y);
28457 g.clipRect (0, 0, width, height);
28458 return g;
28459 }, "~N,~N,~N,~N");
28460 Clazz_defineMethod (c$, "getFontMetrics", 
28461 function () {
28462 return this.getFontMetrics (this.getFont ());
28463 });
28464 Clazz_defineMethod (c$, "drawRect", 
28465 function (x, y, width, height) {
28466 if ((width < 0) || (height < 0)) {
28467 return;
28468 }if (height == 0 || width == 0) {
28469 this.drawLine (x, y, x + width, y + height);
28470 } else {
28471 this.drawLine (x, y, x + width - 1, y);
28472 this.drawLine (x + width, y, x + width, y + height - 1);
28473 this.drawLine (x + width, y + height, x + 1, y + height);
28474 this.drawLine (x, y + height, x, y + 1);
28475 }}, "~N,~N,~N,~N");
28476 Clazz_defineMethod (c$, "draw3DRect", 
28477 function (x, y, width, height, raised) {
28478 var c = this.getColor ();
28479 var brighter = c.brighter ();
28480 var darker = c.darker ();
28481 this.setColor (raised ? brighter : darker);
28482 this.drawLine (x, y, x, y + height);
28483 this.drawLine (x + 1, y, x + width - 1, y);
28484 this.setColor (raised ? darker : brighter);
28485 this.drawLine (x + 1, y + height, x + width, y + height);
28486 this.drawLine (x + width, y, x + width, y + height - 1);
28487 this.setColor (c);
28488 }, "~N,~N,~N,~N,~B");
28489 Clazz_defineMethod (c$, "fill3DRect", 
28490 function (x, y, width, height, raised) {
28491 var c = this.getColor ();
28492 var brighter = c.brighter ();
28493 var darker = c.darker ();
28494 if (!raised) {
28495 this.setColor (darker);
28496 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28497 this.setColor (raised ? brighter : darker);
28498 this.drawLine (x, y, x, y + height - 1);
28499 this.drawLine (x + 1, y, x + width - 2, y);
28500 this.setColor (raised ? darker : brighter);
28501 this.drawLine (x + 1, y + height - 1, x + width - 1, y + height - 1);
28502 this.drawLine (x + width - 1, y, x + width - 1, y + height - 2);
28503 this.setColor (c);
28504 }, "~N,~N,~N,~N,~B");
28505 Clazz_defineMethod (c$, "drawPolygon", 
28506 function (p) {
28507 this.drawPolygon (p.xpoints, p.ypoints, p.npoints);
28508 }, "java.awt.Polygon");
28509 Clazz_defineMethod (c$, "fillPolygon", 
28510 function (p) {
28511 this.fillPolygon (p.xpoints, p.ypoints, p.npoints);
28512 }, "java.awt.Polygon");
28513 Clazz_defineMethod (c$, "drawChars", 
28514 function (data, offset, length, x, y) {
28515 this.drawString ( String.instantialize (data, offset, length), x, y);
28516 }, "~A,~N,~N,~N,~N");
28517 Clazz_defineMethod (c$, "drawBytes", 
28518 function (data, offset, length, x, y) {
28519 this.drawString ( String.instantialize (data, 0, offset, length), x, y);
28520 }, "~A,~N,~N,~N,~N");
28521 Clazz_overrideMethod (c$, "finalize", 
28522 function () {
28523 this.dispose ();
28524 });
28525 Clazz_overrideMethod (c$, "toString", 
28526 function () {
28527 return this.getClass ().getName () + "[font=" + this.getFont () + ",color=" + this.getColor () + "]";
28528 });
28529 Clazz_defineMethod (c$, "getClipRect", 
28530 function () {
28531 return this.getClipBounds ();
28532 });
28533 Clazz_defineMethod (c$, "hitClip", 
28534 function (x, y, width, height) {
28535 var clipRect = this.getClipBounds ();
28536 if (clipRect == null) {
28537 return true;
28538 }return clipRect.intersects (x, y, width, height);
28539 }, "~N,~N,~N,~N");
28540 Clazz_declarePackage ("jssun.font");
28541 Clazz_load (["java.awt.FontMetrics", "java.util.Hashtable"], "jssun.font.FontDesignMetrics", ["java.lang.IndexOutOfBoundsException", "java.awt.Toolkit", "swingjs.JSToolkit"], function () {
28542 c$ = Clazz_decorateAsClass (function () {
28543 this.ascent = 0;
28544 this.descent = 0;
28545 this.leading = 0;
28546 this.height = -1;
28547 Clazz_instantialize (this, arguments);
28548 }, jssun.font, "FontDesignMetrics", java.awt.FontMetrics);
28549 c$.getMetrics = Clazz_defineMethod (c$, "getMetrics", 
28550 function (font) {
28551 var m = null;
28552 var r;
28553 r = jssun.font.FontDesignMetrics.metricsCache.get (font);
28554 if (r != null) {
28555 m = r.get ();
28556 }if (m == null) {
28557 m =  new jssun.font.FontDesignMetrics (font);
28558 jssun.font.FontDesignMetrics.metricsCache.put (font,  new jssun.font.FontDesignMetrics.KeyReference (font, m));
28559 }for (var i = 0; i < jssun.font.FontDesignMetrics.recentMetrics.length; i++) {
28560 if (jssun.font.FontDesignMetrics.recentMetrics[i] === m) {
28561 return m;
28562 }}
28563 {
28564 jssun.font.FontDesignMetrics.recentMetrics[jssun.font.FontDesignMetrics.recentIndex++] = m;
28565 if (jssun.font.FontDesignMetrics.recentIndex == 5) {
28566 jssun.font.FontDesignMetrics.recentIndex = 0;
28567 }}return m;
28568 }, "java.awt.Font");
28569 Clazz_makeConstructor (c$, 
28570  function (font) {
28571 Clazz_superConstructor (this, jssun.font.FontDesignMetrics, [font]);
28572 this.font = font;
28573 this.initMatrixAndMetrics ();
28574 }, "java.awt.Font");
28575 Clazz_defineMethod (c$, "initMatrixAndMetrics", 
28576  function () {
28577 {
28578 //need to calculate ascent, descent, leading, and maxAdvance
28579 }});
28580 Clazz_defineMethod (c$, "charWidth", 
28581 function (ch) {
28582 var s = "";
28583 {
28584 s = "" + ch;
28585 }return this.stringWidth (s);
28586 }, "~S");
28587 Clazz_overrideMethod (c$, "stringWidth", 
28588 function (str) {
28589 return Clazz_doubleToInt (0.5 + this.getWidth (str));
28590 }, "~S");
28591 Clazz_defineMethod (c$, "getWidth", 
28592  function (str) {
28593 return swingjs.JSToolkit.getStringWidth (null, this.font, str);
28594 }, "~S");
28595 Clazz_overrideMethod (c$, "charsWidth", 
28596 function (data, off, len) {
28597 var width = 0;
28598 if (len < 0) {
28599 throw  new IndexOutOfBoundsException ("len=" + len);
28600 }var limit = off + len;
28601 for (var i = off; i < limit; i++) {
28602 var ch = data[i];
28603 width += this.stringWidth ("" + ch);
28604 }
28605 return Clazz_doubleToInt (0.5 + width);
28606 }, "~A,~N,~N");
28607 Clazz_overrideMethod (c$, "getWidths", 
28608 function () {
28609 var widths =  Clazz_newIntArray (256, 0);
28610 return widths;
28611 });
28612 Clazz_defineMethod (c$, "getAscent", 
28613 function () {
28614 if (this.ascent == 0) this.ascent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getAscent ();
28615 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.ascent);
28616 });
28617 Clazz_defineMethod (c$, "getDescent", 
28618 function () {
28619 if (this.descent == 0) this.descent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getDescent ();
28620 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28621 });
28622 Clazz_overrideMethod (c$, "getLeading", 
28623 function () {
28624 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading) - Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28625 });
28626 Clazz_overrideMethod (c$, "getHeight", 
28627 function () {
28628 if (this.height < 0) {
28629 this.height = this.getAscent () + Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading);
28630 }return this.height;
28631 });
28632 Clazz_pu$h(self.c$);
28633 c$ = Clazz_decorateAsClass (function () {
28634 this.key = null;
28635 this.val = null;
28636 Clazz_instantialize (this, arguments);
28637 }, jssun.font.FontDesignMetrics, "KeyReference");
28638 Clazz_makeConstructor (c$, 
28639 function (a, b) {
28640 this.key = a;
28641 this.val = b;
28642 }, "~O,~O");
28643 Clazz_defineMethod (c$, "get", 
28644 function () {
28645 return this.val;
28646 });
28647 Clazz_defineMethod (c$, "dispose", 
28648 function () {
28649 if (jssun.font.FontDesignMetrics.metricsCache.get (this.key) === this) {
28650 jssun.font.FontDesignMetrics.metricsCache.remove (this.key);
28651 }});
28652 c$ = Clazz_p0p ();
28653 Clazz_defineStatics (c$,
28654 "roundingUpValue", 0.95);
28655 c$.metricsCache = c$.prototype.metricsCache =  new java.util.Hashtable ();
28656 Clazz_defineStatics (c$,
28657 "MAXRECENT", 5);
28658 c$.recentMetrics = c$.prototype.recentMetrics =  new Array (5);
28659 Clazz_defineStatics (c$,
28660 "recentIndex", 0);
28661 });
28662 Clazz_declarePackage ("java.awt");
28663 Clazz_load (["java.awt.font.FontRenderContext"], "java.awt.FontMetrics", ["java.lang.Character"], function () {
28664 c$ = Clazz_decorateAsClass (function () {
28665 this.font = null;
28666 Clazz_instantialize (this, arguments);
28667 }, java.awt, "FontMetrics");
28668 Clazz_makeConstructor (c$, 
28669 function (font) {
28670 this.font = font;
28671 }, "java.awt.Font");
28672 Clazz_defineMethod (c$, "getFont", 
28673 function () {
28674 return this.font;
28675 });
28676 Clazz_defineMethod (c$, "getFontRenderContext", 
28677 function () {
28678 return java.awt.FontMetrics.DEFAULT_FRC;
28679 });
28680 Clazz_defineMethod (c$, "getLeading", 
28681 function () {
28682 return 0;
28683 });
28684 Clazz_defineMethod (c$, "getAscent", 
28685 function () {
28686 return this.font.getSize ();
28687 });
28688 Clazz_defineMethod (c$, "getDescent", 
28689 function () {
28690 return 0;
28691 });
28692 Clazz_defineMethod (c$, "getHeight", 
28693 function () {
28694 return this.getLeading () + this.getAscent () + this.getDescent ();
28695 });
28696 Clazz_defineMethod (c$, "getMaxAscent", 
28697 function () {
28698 return this.getAscent ();
28699 });
28700 Clazz_defineMethod (c$, "getMaxDescent", 
28701 function () {
28702 return this.getDescent ();
28703 });
28704 Clazz_defineMethod (c$, "getMaxDecent", 
28705 function () {
28706 return this.getMaxDescent ();
28707 });
28708 Clazz_defineMethod (c$, "getMaxAdvance", 
28709 function () {
28710 return -1;
28711 });
28712 Clazz_defineMethod (c$, "charWidth", 
28713 function (codePoint) {
28714 if (!Character.isValidCodePoint (codePoint)) {
28715 codePoint = 0xffff;
28716 }if (codePoint < 256) {
28717 return this.getWidths ()[codePoint];
28718 } else {
28719 var buffer =  Clazz_newCharArray (2, '\0');
28720 var len = Character.toChars (codePoint, buffer, 0);
28721 return this.charsWidth (buffer, 0, len);
28722 }}, "~N");
28723 Clazz_defineMethod (c$, "charWidth", 
28724 function (ch) {
28725 if (ch.charCodeAt (0) < 256) {
28726 return this.getWidths ()[ch.charCodeAt (0)];
28727 }var data =  Clazz_newCharArray (-1, [ch]);
28728 return this.charsWidth (data, 0, 1);
28729 }, "~S");
28730 Clazz_defineMethod (c$, "stringWidth", 
28731 function (str) {
28732 var len = str.length;
28733 var data =  Clazz_newCharArray (len, '\0');
28734 str.getChars (0, len, data, 0);
28735 return this.charsWidth (data, 0, len);
28736 }, "~S");
28737 Clazz_defineMethod (c$, "charsWidth", 
28738 function (data, off, len) {
28739 return this.stringWidth ( String.instantialize (data, off, len));
28740 }, "~A,~N,~N");
28741 Clazz_defineMethod (c$, "bytesWidth", 
28742 function (data, off, len) {
28743 return this.stringWidth ( String.instantialize (data, 0, off, len));
28744 }, "~A,~N,~N");
28745 Clazz_defineMethod (c$, "getWidths", 
28746 function () {
28747 var widths =  Clazz_newIntArray (256, 0);
28748 for (var ch = String.fromCharCode (0); ch.charCodeAt (0) < 256; ch = String.fromCharCode (ch.charCodeAt (0) + 1)) {
28749 widths[ch.charCodeAt (0)] = this.charWidth (ch);
28750 }
28751 return widths;
28752 });
28753 Clazz_overrideMethod (c$, "toString", 
28754 function () {
28755 return this.getClass ().getName () + "[font=" + this.getFont () + "ascent=" + this.getAscent () + ", descent=" + this.getDescent () + ", height=" + this.getHeight () + "]";
28756 });
28757 c$.DEFAULT_FRC = c$.prototype.DEFAULT_FRC =  new java.awt.font.FontRenderContext (null, false, false);
28758 });
28759 Clazz_declarePackage ("JU");
28760 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 () {
28761 c$ = Clazz_declareType (JU, "PT");
28762 c$.parseInt = Clazz_defineMethod (c$, "parseInt", 
28763 function (str) {
28764 return JU.PT.parseIntNext (str,  Clazz_newIntArray (-1, [0]));
28765 }, "~S");
28766 c$.parseIntNext = Clazz_defineMethod (c$, "parseIntNext", 
28767 function (str, next) {
28768 var cch = str.length;
28769 if (next[0] < 0 || next[0] >= cch) return -2147483648;
28770 return JU.PT.parseIntChecked (str, cch, next);
28771 }, "~S,~A");
28772 c$.parseIntChecked = Clazz_defineMethod (c$, "parseIntChecked", 
28773 function (str, ichMax, next) {
28774 var digitSeen = false;
28775 var value = 0;
28776 var ich = next[0];
28777 if (ich < 0) return -2147483648;
28778 var ch;
28779 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28780
28781 var negative = false;
28782 if (ich < ichMax && str.charCodeAt (ich) == 45) {
28783 negative = true;
28784 ++ich;
28785 }while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28786 value = value * 10 + (ch - 48);
28787 digitSeen = true;
28788 ++ich;
28789 }
28790 if (!digitSeen) value = -2147483648;
28791  else if (negative) value = -value;
28792 next[0] = ich;
28793 return value;
28794 }, "~S,~N,~A");
28795 c$.isWhiteSpace = Clazz_defineMethod (c$, "isWhiteSpace", 
28796 function (str, ich) {
28797 var ch;
28798 return (ich >= 0 && ((ch = str.charAt (ich)) == ' ' || ch == '\t' || ch == '\n'));
28799 }, "~S,~N");
28800 c$.parseFloatChecked = Clazz_defineMethod (c$, "parseFloatChecked", 
28801 function (str, ichMax, next, isStrict) {
28802 var digitSeen = false;
28803 var ich = next[0];
28804 if (isStrict && str.indexOf ('\n') != str.lastIndexOf ('\n')) return NaN;
28805 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28806
28807 var negative = false;
28808 if (ich < ichMax && str.charAt (ich) == '-') {
28809 ++ich;
28810 negative = true;
28811 }var ch = 0;
28812 var ival = 0;
28813 var ival2 = 0;
28814 while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28815 ival = (ival * 10) + (ch - 48) * 1;
28816 ++ich;
28817 digitSeen = true;
28818 }
28819 var isDecimal = false;
28820 var iscale = 0;
28821 var nzero = (ival == 0 ? -1 : 0);
28822 if (ch == 46) {
28823 isDecimal = true;
28824 while (++ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28825 digitSeen = true;
28826 if (nzero < 0) {
28827 if (ch == 48) {
28828 nzero--;
28829 continue;
28830 }nzero = -nzero;
28831 }if (iscale < JU.PT.decimalScale.length) {
28832 ival2 = (ival2 * 10) + (ch - 48) * 1;
28833 iscale++;
28834 }}
28835 }var value;
28836 if (!digitSeen) {
28837 value = NaN;
28838 } else if (ival2 > 0) {
28839 value = ival2 * JU.PT.decimalScale[iscale - 1];
28840 if (nzero > 1) {
28841 if (nzero - 2 < JU.PT.decimalScale.length) {
28842 value *= JU.PT.decimalScale[nzero - 2];
28843 } else {
28844 value *= Math.pow (10, 1 - nzero);
28845 }} else {
28846 value += ival;
28847 }} else {
28848 value = ival;
28849 }var isExponent = false;
28850 if (ich < ichMax && (ch == 69 || ch == 101 || ch == 68)) {
28851 isExponent = true;
28852 if (++ich >= ichMax) return NaN;
28853 ch = str.charCodeAt (ich);
28854 if ((ch == 43) && (++ich >= ichMax)) return NaN;
28855 next[0] = ich;
28856 var exponent = JU.PT.parseIntChecked (str, ichMax, next);
28857 if (exponent == -2147483648) return NaN;
28858 if (exponent > 0 && exponent <= JU.PT.tensScale.length) value *= JU.PT.tensScale[exponent - 1];
28859  else if (exponent < 0 && -exponent <= JU.PT.decimalScale.length) value *= JU.PT.decimalScale[-exponent - 1];
28860  else if (exponent != 0) value *= Math.pow (10, exponent);
28861 } else {
28862 next[0] = ich;
28863 }if (negative) value = -value;
28864 if (value == Infinity) value = 3.4028235E38;
28865 return (!isStrict || (!isExponent || isDecimal) && JU.PT.checkTrailingText (str, next[0], ichMax) ? value : NaN);
28866 }, "~S,~N,~A,~B");
28867 c$.checkTrailingText = Clazz_defineMethod (c$, "checkTrailingText", 
28868 function (str, ich, ichMax) {
28869 var ch;
28870 while (ich < ichMax && (JU.PT.isWhitespace (ch = str.charAt (ich)) || ch == ';')) ++ich;
28871
28872 return (ich == ichMax);
28873 }, "~S,~N,~N");
28874 c$.parseFloatArray = Clazz_defineMethod (c$, "parseFloatArray", 
28875 function (str) {
28876 return JU.PT.parseFloatArrayNext (str,  Clazz_newIntArray (1, 0), null, null, null);
28877 }, "~S");
28878 c$.parseFloatArrayInfested = Clazz_defineMethod (c$, "parseFloatArrayInfested", 
28879 function (tokens, data) {
28880 var len = data.length;
28881 var nTokens = tokens.length;
28882 var n = 0;
28883 var max = 0;
28884 for (var i = 0; i >= 0 && i < len && n < nTokens; i++) {
28885 var f;
28886 while (Float.isNaN (f = JU.PT.parseFloat (tokens[n++])) && n < nTokens) {
28887 }
28888 if (!Float.isNaN (f)) data[(max = i)] = f;
28889 if (n == nTokens) break;
28890 }
28891 return max + 1;
28892 }, "~A,~A");
28893 c$.parseFloatArrayNext = Clazz_defineMethod (c$, "parseFloatArrayNext", 
28894 function (str, next, f, strStart, strEnd) {
28895 var n = 0;
28896 var pt = next[0];
28897 if (pt >= 0) {
28898 if (strStart != null) {
28899 var p = str.indexOf (strStart, pt);
28900 if (p >= 0) next[0] = p + strStart.length;
28901 }str = str.substring (next[0]);
28902 pt = (strEnd == null ? -1 : str.indexOf (strEnd));
28903 if (pt < 0) pt = str.length;
28904  else str = str.substring (0, pt);
28905 next[0] += pt + 1;
28906 var tokens = JU.PT.getTokens (str);
28907 if (f == null) f =  Clazz_newFloatArray (tokens.length, 0);
28908 n = JU.PT.parseFloatArrayInfested (tokens, f);
28909 }if (f == null) return  Clazz_newFloatArray (0, 0);
28910 for (var i = n; i < f.length; i++) f[i] = NaN;
28911
28912 return f;
28913 }, "~S,~A,~A,~S,~S");
28914 c$.parseFloatRange = Clazz_defineMethod (c$, "parseFloatRange", 
28915 function (str, ichMax, next) {
28916 var cch = str.length;
28917 if (ichMax > cch) ichMax = cch;
28918 if (next[0] < 0 || next[0] >= ichMax) return NaN;
28919 return JU.PT.parseFloatChecked (str, ichMax, next, false);
28920 }, "~S,~N,~A");
28921 c$.parseFloatNext = Clazz_defineMethod (c$, "parseFloatNext", 
28922 function (str, next) {
28923 var cch = (str == null ? -1 : str.length);
28924 return (next[0] < 0 || next[0] >= cch ? NaN : JU.PT.parseFloatChecked (str, cch, next, false));
28925 }, "~S,~A");
28926 c$.parseFloatStrict = Clazz_defineMethod (c$, "parseFloatStrict", 
28927 function (str) {
28928 var cch = str.length;
28929 if (cch == 0) return NaN;
28930 return JU.PT.parseFloatChecked (str, cch,  Clazz_newIntArray (-1, [0]), true);
28931 }, "~S");
28932 c$.parseFloat = Clazz_defineMethod (c$, "parseFloat", 
28933 function (str) {
28934 return JU.PT.parseFloatNext (str,  Clazz_newIntArray (-1, [0]));
28935 }, "~S");
28936 c$.parseIntRadix = Clazz_defineMethod (c$, "parseIntRadix", 
28937 function (s, i) {
28938 {
28939 return Integer.parseIntRadix(s, i);
28940 }}, "~S,~N");
28941 c$.getTokens = Clazz_defineMethod (c$, "getTokens", 
28942 function (line) {
28943 return JU.PT.getTokensAt (line, 0);
28944 }, "~S");
28945 c$.parseToken = Clazz_defineMethod (c$, "parseToken", 
28946 function (str) {
28947 return JU.PT.parseTokenNext (str,  Clazz_newIntArray (-1, [0]));
28948 }, "~S");
28949 c$.parseTrimmed = Clazz_defineMethod (c$, "parseTrimmed", 
28950 function (str) {
28951 return JU.PT.parseTrimmedRange (str, 0, str.length);
28952 }, "~S");
28953 c$.parseTrimmedAt = Clazz_defineMethod (c$, "parseTrimmedAt", 
28954 function (str, ichStart) {
28955 return JU.PT.parseTrimmedRange (str, ichStart, str.length);
28956 }, "~S,~N");
28957 c$.parseTrimmedRange = Clazz_defineMethod (c$, "parseTrimmedRange", 
28958 function (str, ichStart, ichMax) {
28959 var cch = str.length;
28960 if (ichMax < cch) cch = ichMax;
28961 if (cch < ichStart) return "";
28962 return JU.PT.parseTrimmedChecked (str, ichStart, cch);
28963 }, "~S,~N,~N");
28964 c$.getTokensAt = Clazz_defineMethod (c$, "getTokensAt", 
28965 function (line, ich) {
28966 if (line == null) return null;
28967 var cchLine = line.length;
28968 if (ich < 0 || ich > cchLine) return null;
28969 var tokenCount = JU.PT.countTokens (line, ich);
28970 var tokens =  new Array (tokenCount);
28971 var next =  Clazz_newIntArray (1, 0);
28972 next[0] = ich;
28973 for (var i = 0; i < tokenCount; ++i) tokens[i] = JU.PT.parseTokenChecked (line, cchLine, next);
28974
28975 return tokens;
28976 }, "~S,~N");
28977 c$.countTokens = Clazz_defineMethod (c$, "countTokens", 
28978 function (line, ich) {
28979 var tokenCount = 0;
28980 if (line != null) {
28981 var ichMax = line.length;
28982 while (true) {
28983 while (ich < ichMax && JU.PT.isWhiteSpace (line, ich)) ++ich;
28984
28985 if (ich == ichMax) break;
28986 ++tokenCount;
28987 do {
28988 ++ich;
28989 } while (ich < ichMax && !JU.PT.isWhiteSpace (line, ich));
28990 }
28991 }return tokenCount;
28992 }, "~S,~N");
28993 c$.parseTokenNext = Clazz_defineMethod (c$, "parseTokenNext", 
28994 function (str, next) {
28995 var cch = str.length;
28996 return (next[0] < 0 || next[0] >= cch ? null : JU.PT.parseTokenChecked (str, cch, next));
28997 }, "~S,~A");
28998 c$.parseTokenRange = Clazz_defineMethod (c$, "parseTokenRange", 
28999 function (str, ichMax, next) {
29000 var cch = str.length;
29001 if (ichMax > cch) ichMax = cch;
29002 return (next[0] < 0 || next[0] >= ichMax ? null : JU.PT.parseTokenChecked (str, ichMax, next));
29003 }, "~S,~N,~A");
29004 c$.parseTokenChecked = Clazz_defineMethod (c$, "parseTokenChecked", 
29005 function (str, ichMax, next) {
29006 var ich = next[0];
29007 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29008
29009 var ichNonWhite = ich;
29010 while (ich < ichMax && !JU.PT.isWhiteSpace (str, ich)) ++ich;
29011
29012 next[0] = ich;
29013 return (ichNonWhite == ich ? null : str.substring (ichNonWhite, ich));
29014 }, "~S,~N,~A");
29015 c$.parseTrimmedChecked = Clazz_defineMethod (c$, "parseTrimmedChecked", 
29016 function (str, ich, ichMax) {
29017 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29018
29019 var ichLast = ichMax - 1;
29020 while (ichLast >= ich && JU.PT.isWhiteSpace (str, ichLast)) --ichLast;
29021
29022 return (ichLast < ich ? "" : str.substring (ich, ichLast + 1));
29023 }, "~S,~N,~N");
29024 c$.dVal = Clazz_defineMethod (c$, "dVal", 
29025 function (s) {
29026 {
29027 if(s==null)
29028 throw new NumberFormatException("null");
29029 var d=parseFloat(s);
29030 if(isNaN(d))
29031 throw new NumberFormatException("Not a Number : "+s);
29032 return d
29033 }}, "~S");
29034 c$.fVal = Clazz_defineMethod (c$, "fVal", 
29035 function (s) {
29036 {
29037 return this.dVal(s);
29038 }}, "~S");
29039 c$.parseIntRange = Clazz_defineMethod (c$, "parseIntRange", 
29040 function (str, ichMax, next) {
29041 var cch = str.length;
29042 if (ichMax > cch) ichMax = cch;
29043 return (next[0] < 0 || next[0] >= ichMax ? -2147483648 : JU.PT.parseIntChecked (str, ichMax, next));
29044 }, "~S,~N,~A");
29045 c$.parseFloatArrayData = Clazz_defineMethod (c$, "parseFloatArrayData", 
29046 function (tokens, data) {
29047 JU.PT.parseFloatArrayDataN (tokens, data, data.length);
29048 }, "~A,~A");
29049 c$.parseFloatArrayDataN = Clazz_defineMethod (c$, "parseFloatArrayDataN", 
29050 function (tokens, data, nData) {
29051 for (var i = nData; --i >= 0; ) data[i] = (i >= tokens.length ? NaN : JU.PT.parseFloat (tokens[i]));
29052
29053 }, "~A,~A,~N");
29054 c$.split = Clazz_defineMethod (c$, "split", 
29055 function (text, run) {
29056 if (text.length == 0) return  new Array (0);
29057 var n = 1;
29058 var i = text.indexOf (run);
29059 var lines;
29060 var runLen = run.length;
29061 if (i < 0 || runLen == 0) {
29062 lines =  new Array (1);
29063 lines[0] = text;
29064 return lines;
29065 }var len = text.length - runLen;
29066 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
29067
29068 lines =  new Array (n);
29069 i = 0;
29070 var ipt = 0;
29071 var pt = 0;
29072 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
29073 lines[pt++] = text.substring (i, ipt);
29074 i = ipt + runLen;
29075 }
29076 if (text.indexOf (run, len) != len) len += runLen;
29077 lines[pt] = text.substring (i, len);
29078 return lines;
29079 }, "~S,~S");
29080 c$.getQuotedStringAt = Clazz_defineMethod (c$, "getQuotedStringAt", 
29081 function (line, ipt0) {
29082 var next =  Clazz_newIntArray (-1, [ipt0]);
29083 return JU.PT.getQuotedStringNext (line, next);
29084 }, "~S,~N");
29085 c$.getQuotedStringNext = Clazz_defineMethod (c$, "getQuotedStringNext", 
29086 function (line, next) {
29087 var i = next[0];
29088 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return "";
29089 var pt = i + 1;
29090 var len = line.length;
29091 while (++i < len && line.charAt (i) != '"') if (line.charAt (i) == '\\') i++;
29092
29093 next[0] = i + 1;
29094 return line.substring (pt, i);
29095 }, "~S,~A");
29096 c$.getCSVString = Clazz_defineMethod (c$, "getCSVString", 
29097 function (line, next) {
29098 var i = next[1];
29099 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return null;
29100 var pt = next[0] = i;
29101 var len = line.length;
29102 var escaped = false;
29103 var haveEscape = false;
29104 while (++i < len && (line.charAt (i) != '"' || (escaped = (i + 1 < len && line.charAt (i + 1) == '"')))) if (escaped) {
29105 escaped = false;
29106 haveEscape = true;
29107 i++;
29108 }
29109 if (i >= len) {
29110 next[1] = -1;
29111 return null;
29112 }next[1] = i + 1;
29113 var s = line.substring (pt + 1, i);
29114 return (haveEscape ? JU.PT.rep (JU.PT.rep (s, "\"\"", "\0"), "\0", "\"") : s);
29115 }, "~S,~A");
29116 c$.isOneOf = Clazz_defineMethod (c$, "isOneOf", 
29117 function (key, semiList) {
29118 if (semiList.length == 0) return false;
29119 if (semiList.charAt (0) != ';') semiList = ";" + semiList + ";";
29120 return key.indexOf (";") < 0 && semiList.indexOf (';' + key + ';') >= 0;
29121 }, "~S,~S");
29122 c$.getQuotedAttribute = Clazz_defineMethod (c$, "getQuotedAttribute", 
29123 function (info, name) {
29124 var i = info.indexOf (name + "=");
29125 return (i < 0 ? null : JU.PT.getQuotedStringAt (info, i));
29126 }, "~S,~S");
29127 c$.approx = Clazz_defineMethod (c$, "approx", 
29128 function (f, n) {
29129 return Math.round (f * n) / n;
29130 }, "~N,~N");
29131 c$.rep = Clazz_defineMethod (c$, "rep", 
29132 function (str, strFrom, strTo) {
29133 if (str == null || strFrom.length == 0 || str.indexOf (strFrom) < 0) return str;
29134 var isOnce = (strTo.indexOf (strFrom) >= 0);
29135 do {
29136 str = str.$replace (strFrom, strTo);
29137 } while (!isOnce && str.indexOf (strFrom) >= 0);
29138 return str;
29139 }, "~S,~S,~S");
29140 c$.formatF = Clazz_defineMethod (c$, "formatF", 
29141 function (value, width, precision, alignLeft, zeroPad) {
29142 return JU.PT.formatS (JU.DF.formatDecimal (value, precision), width, 0, alignLeft, zeroPad);
29143 }, "~N,~N,~N,~B,~B");
29144 c$.formatD = Clazz_defineMethod (c$, "formatD", 
29145 function (value, width, precision, alignLeft, zeroPad, allowOverflow) {
29146 return JU.PT.formatS (JU.DF.formatDecimal (value, -1 - precision), width, 0, alignLeft, zeroPad);
29147 }, "~N,~N,~N,~B,~B,~B");
29148 c$.formatS = Clazz_defineMethod (c$, "formatS", 
29149 function (value, width, precision, alignLeft, zeroPad) {
29150 if (value == null) return "";
29151 var len = value.length;
29152 if (precision != 2147483647 && precision > 0 && precision < len) value = value.substring (0, precision);
29153  else if (precision < 0 && len + precision >= 0) value = value.substring (len + precision + 1);
29154 var padLength = width - value.length;
29155 if (padLength <= 0) return value;
29156 var isNeg = (zeroPad && !alignLeft && value.charAt (0) == '-');
29157 var padChar = (zeroPad ? '0' : ' ');
29158 var padChar0 = (isNeg ? '-' : padChar);
29159 var sb =  new JU.SB ();
29160 if (alignLeft) sb.append (value);
29161 sb.appendC (padChar0);
29162 for (var i = padLength; --i > 0; ) sb.appendC (padChar);
29163
29164 if (!alignLeft) sb.append (isNeg ? padChar + value.substring (1) : value);
29165 return sb.toString ();
29166 }, "~S,~N,~N,~B,~B");
29167 c$.replaceWithCharacter = Clazz_defineMethod (c$, "replaceWithCharacter", 
29168 function (str, strFrom, chTo) {
29169 if (str == null) return null;
29170 for (var i = strFrom.length; --i >= 0; ) str = str.$replace (strFrom.charAt (i), chTo);
29171
29172 return str;
29173 }, "~S,~S,~S");
29174 c$.replaceAllCharacters = Clazz_defineMethod (c$, "replaceAllCharacters", 
29175 function (str, strFrom, strTo) {
29176 for (var i = strFrom.length; --i >= 0; ) {
29177 var chFrom = strFrom.substring (i, i + 1);
29178 str = JU.PT.rep (str, chFrom, strTo);
29179 }
29180 return str;
29181 }, "~S,~S,~S");
29182 c$.trim = Clazz_defineMethod (c$, "trim", 
29183 function (str, chars) {
29184 if (chars.length == 0) return str.trim ();
29185 var len = str.length;
29186 var k = 0;
29187 while (k < len && chars.indexOf (str.charAt (k)) >= 0) k++;
29188
29189 var m = str.length - 1;
29190 while (m > k && chars.indexOf (str.charAt (m)) >= 0) m--;
29191
29192 return str.substring (k, m + 1);
29193 }, "~S,~S");
29194 c$.trimQuotes = Clazz_defineMethod (c$, "trimQuotes", 
29195 function (value) {
29196 return (value != null && value.length > 1 && value.startsWith ("\"") && value.endsWith ("\"") ? value.substring (1, value.length - 1) : value);
29197 }, "~S");
29198 c$.isNonStringPrimitive = Clazz_defineMethod (c$, "isNonStringPrimitive", 
29199 function (info) {
29200 return Clazz_instanceOf (info, Number) || Clazz_instanceOf (info, Boolean);
29201 }, "~O");
29202 c$.arrayGet = Clazz_defineMethod (c$, "arrayGet", 
29203  function (info, i) {
29204 {
29205 return info[i];
29206 }}, "~O,~N");
29207 c$.toJSON = Clazz_defineMethod (c$, "toJSON", 
29208 function (infoType, info) {
29209 if (info == null) return JU.PT.packageJSON (infoType, null);
29210 if (JU.PT.isNonStringPrimitive (info)) return JU.PT.packageJSON (infoType, info.toString ());
29211 var s = null;
29212 var sb = null;
29213 while (true) {
29214 if (Clazz_instanceOf (info, String)) {
29215 s = info;
29216 {
29217 if (typeof s == "undefined") s = "null"
29218 }if (s.indexOf ("{\"") != 0) {
29219 s = JU.PT.rep (s, "\"", "\\\"");
29220 s = JU.PT.rep (s, "\n", "\\n");
29221 s = "\"" + s + "\"";
29222 }break;
29223 }if (Clazz_instanceOf (info, javajs.api.JSONEncodable)) {
29224 if ((s = (info).toJSON ()) == null) s = "null";
29225 break;
29226 }sb =  new JU.SB ();
29227 if (Clazz_instanceOf (info, java.util.Map)) {
29228 sb.append ("{ ");
29229 var sep = "";
29230 for (var key, $key = (info).keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
29231 sb.append (sep).append (JU.PT.packageJSON (key, JU.PT.toJSON (null, (info).get (key))));
29232 sep = ",";
29233 }
29234 sb.append (" }");
29235 break;
29236 }if (Clazz_instanceOf (info, JU.Lst)) {
29237 sb.append ("[ ");
29238 var n = (info).size ();
29239 for (var i = 0; i < n; i++) {
29240 if (i > 0) sb.appendC (',');
29241 sb.append (JU.PT.toJSON (null, (info).get (i)));
29242 }
29243 sb.append (" ]");
29244 break;
29245 }if (Clazz_instanceOf (info, JU.M34)) {
29246 var len = (Clazz_instanceOf (info, JU.M4) ? 4 : 3);
29247 var x =  Clazz_newFloatArray (len, 0);
29248 var m = info;
29249 sb.appendC ('[');
29250 for (var i = 0; i < len; i++) {
29251 if (i > 0) sb.appendC (',');
29252 m.getRow (i, x);
29253 sb.append (JU.PT.toJSON (null, x));
29254 }
29255 sb.appendC (']');
29256 break;
29257 }s = JU.PT.nonArrayString (info);
29258 if (s == null) {
29259 sb.append ("[");
29260 var n = JU.AU.getLength (info);
29261 for (var i = 0; i < n; i++) {
29262 if (i > 0) sb.appendC (',');
29263 sb.append (JU.PT.toJSON (null, JU.PT.arrayGet (info, i)));
29264 }
29265 sb.append ("]");
29266 break;
29267 }info = info.toString ();
29268 }
29269 return JU.PT.packageJSON (infoType, (s == null ? sb.toString () : s));
29270 }, "~S,~O");
29271 c$.nonArrayString = Clazz_defineMethod (c$, "nonArrayString", 
29272 function (x) {
29273 {
29274 var s = x.toString(); return (s.startsWith("[object") &&
29275 s.endsWith("Array]") ? null : s);
29276 }}, "~O");
29277 c$.byteArrayToJSON = Clazz_defineMethod (c$, "byteArrayToJSON", 
29278 function (data) {
29279 var sb =  new JU.SB ();
29280 sb.append ("[");
29281 var n = data.length;
29282 for (var i = 0; i < n; i++) {
29283 if (i > 0) sb.appendC (',');
29284 sb.appendI (data[i] & 0xFF);
29285 }
29286 sb.append ("]");
29287 return sb.toString ();
29288 }, "~A");
29289 c$.packageJSON = Clazz_defineMethod (c$, "packageJSON", 
29290 function (infoType, info) {
29291 return (infoType == null ? info : "\"" + infoType + "\": " + info);
29292 }, "~S,~S");
29293 c$.isAS = Clazz_defineMethod (c$, "isAS", 
29294 function (x) {
29295 {
29296 return Clazz_isAS(x);
29297 }}, "~O");
29298 c$.isASS = Clazz_defineMethod (c$, "isASS", 
29299 function (x) {
29300 {
29301 return Clazz_isASS(x);
29302 }}, "~O");
29303 c$.isAP = Clazz_defineMethod (c$, "isAP", 
29304 function (x) {
29305 {
29306 return Clazz_isAP(x);
29307 }}, "~O");
29308 c$.isAF = Clazz_defineMethod (c$, "isAF", 
29309 function (x) {
29310 {
29311 return Clazz_isAF(x);
29312 }}, "~O");
29313 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
29314 function (x) {
29315 {
29316 return Clazz_isAFloat(x);
29317 }}, "~O");
29318 c$.isAD = Clazz_defineMethod (c$, "isAD", 
29319 function (x) {
29320 {
29321 return Clazz_isAF(x);
29322 }}, "~O");
29323 c$.isADD = Clazz_defineMethod (c$, "isADD", 
29324 function (x) {
29325 {
29326 return Clazz_isAFF(x);
29327 }}, "~O");
29328 c$.isAB = Clazz_defineMethod (c$, "isAB", 
29329 function (x) {
29330 {
29331 return Clazz_isAI(x);
29332 }}, "~O");
29333 c$.isAI = Clazz_defineMethod (c$, "isAI", 
29334 function (x) {
29335 {
29336 return Clazz_isAI(x);
29337 }}, "~O");
29338 c$.isAII = Clazz_defineMethod (c$, "isAII", 
29339 function (x) {
29340 {
29341 return Clazz_isAII(x);
29342 }}, "~O");
29343 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
29344 function (x) {
29345 {
29346 return Clazz_isAFF(x);
29347 }}, "~O");
29348 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
29349 function (x) {
29350 {
29351 return Clazz_isAFFF(x);
29352 }}, "~O");
29353 c$.escapeUrl = Clazz_defineMethod (c$, "escapeUrl", 
29354 function (url) {
29355 url = JU.PT.rep (url, "\n", "");
29356 url = JU.PT.rep (url, "%", "%25");
29357 url = JU.PT.rep (url, "#", "%23");
29358 url = JU.PT.rep (url, "[", "%5B");
29359 url = JU.PT.rep (url, "]", "%5D");
29360 url = JU.PT.rep (url, " ", "%20");
29361 return url;
29362 }, "~S");
29363 c$.esc = Clazz_defineMethod (c$, "esc", 
29364 function (str) {
29365 if (str == null || str.length == 0) return "\"\"";
29366 var haveEscape = false;
29367 var i = 0;
29368 for (; i < "\\\\\tt\rr\nn\"\"".length; i += 2) if (str.indexOf ("\\\\\tt\rr\nn\"\"".charAt (i)) >= 0) {
29369 haveEscape = true;
29370 break;
29371 }
29372 if (haveEscape) while (i < "\\\\\tt\rr\nn\"\"".length) {
29373 var pt = -1;
29374 var ch = "\\\\\tt\rr\nn\"\"".charAt (i++);
29375 var ch2 = "\\\\\tt\rr\nn\"\"".charAt (i++);
29376 var sb =  new JU.SB ();
29377 var pt0 = 0;
29378 while ((pt = str.indexOf (ch, pt + 1)) >= 0) {
29379 sb.append (str.substring (pt0, pt)).appendC ('\\').appendC (ch2);
29380 pt0 = pt + 1;
29381 }
29382 sb.append (str.substring (pt0, str.length));
29383 str = sb.toString ();
29384 }
29385 return "\"" + JU.PT.escUnicode (str) + "\"";
29386 }, "~S");
29387 c$.escUnicode = Clazz_defineMethod (c$, "escUnicode", 
29388 function (str) {
29389 for (var i = str.length; --i >= 0; ) if (str.charCodeAt (i) > 0x7F) {
29390 var s = "0000" + Integer.toHexString (str.charCodeAt (i));
29391 str = str.substring (0, i) + "\\u" + s.substring (s.length - 4) + str.substring (i + 1);
29392 }
29393 return str;
29394 }, "~S");
29395 c$.escF = Clazz_defineMethod (c$, "escF", 
29396 function (f) {
29397 var sf = "" + f;
29398 {
29399 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
29400 sf += ".0";
29401 }return sf;
29402 }, "~N");
29403 c$.join = Clazz_defineMethod (c$, "join", 
29404 function (s, c, i0) {
29405 if (s.length < i0) return null;
29406 var sb =  new JU.SB ();
29407 sb.append (s[i0++]);
29408 for (var i = i0; i < s.length; i++) sb.appendC (c).append (s[i]);
29409
29410 return sb.toString ();
29411 }, "~A,~S,~N");
29412 c$.isLike = Clazz_defineMethod (c$, "isLike", 
29413 function (a, b) {
29414 var areEqual = a.equals (b);
29415 if (areEqual) return true;
29416 var isStart = b.startsWith ("*");
29417 var isEnd = b.endsWith ("*");
29418 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));
29419 }, "~S,~S");
29420 c$.getMapValueNoCase = Clazz_defineMethod (c$, "getMapValueNoCase", 
29421 function (h, key) {
29422 if ("this".equals (key)) return h;
29423 var val = h.get (key);
29424 if (val == null) for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) if (e.getKey ().equalsIgnoreCase (key)) return e.getValue ();
29425
29426 return val;
29427 }, "java.util.Map,~S");
29428 c$.getMapSubset = Clazz_defineMethod (c$, "getMapSubset", 
29429 function (h, key, h2) {
29430 var val = h.get (key);
29431 if (val != null) {
29432 h2.put (key, val);
29433 return;
29434 }for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) {
29435 var k = e.getKey ();
29436 if (JU.PT.isLike (k, key)) h2.put (k, e.getValue ());
29437 }
29438 }, "java.util.Map,~S,java.util.Map");
29439 c$.clean = Clazz_defineMethod (c$, "clean", 
29440 function (s) {
29441 return JU.PT.rep (JU.PT.replaceAllCharacters (s, " \t\n\r", " "), "  ", " ").trim ();
29442 }, "~S");
29443 c$.fdup = Clazz_defineMethod (c$, "fdup", 
29444 function (f, pt, n) {
29445 var ch;
29446 var count = 0;
29447 for (var i = pt; --i >= 1; ) {
29448 if (JU.PT.isDigit (ch = f.charAt (i))) continue;
29449 switch (ch) {
29450 case '.':
29451 if (count++ != 0) return f;
29452 continue;
29453 case '-':
29454 if (i != 1 && f.charAt (i - 1) != '.') return f;
29455 continue;
29456 default:
29457 return f;
29458 }
29459 }
29460 var s = f.substring (0, pt + 1);
29461 var sb =  new JU.SB ();
29462 for (var i = 0; i < n; i++) sb.append (s);
29463
29464 sb.append (f.substring (pt + 1));
29465 return sb.toString ();
29466 }, "~S,~N,~N");
29467 c$.formatString = Clazz_defineMethod (c$, "formatString", 
29468 function (strFormat, key, strT, floatT, doubleT, doOne) {
29469 if (strFormat == null) return null;
29470 if ("".equals (strFormat)) return "";
29471 var len = key.length;
29472 if (strFormat.indexOf ("%") < 0 || len == 0 || strFormat.indexOf (key) < 0) return strFormat;
29473 var strLabel = "";
29474 var ich;
29475 var ichPercent;
29476 var ichKey;
29477 for (ich = 0; (ichPercent = strFormat.indexOf ('%', ich)) >= 0 && (ichKey = strFormat.indexOf (key, ichPercent + 1)) >= 0; ) {
29478 if (ich != ichPercent) strLabel += strFormat.substring (ich, ichPercent);
29479 ich = ichPercent + 1;
29480 if (ichKey > ichPercent + 6) {
29481 strLabel += '%';
29482 continue;
29483 }try {
29484 var alignLeft = false;
29485 if (strFormat.charAt (ich) == '-') {
29486 alignLeft = true;
29487 ++ich;
29488 }var zeroPad = false;
29489 if (strFormat.charAt (ich) == '0') {
29490 zeroPad = true;
29491 ++ich;
29492 }var ch;
29493 var width = 0;
29494 while ((ch = strFormat.charAt (ich)) >= '0' && (ch <= '9')) {
29495 width = (10 * width) + (ch.charCodeAt (0) - 48);
29496 ++ich;
29497 }
29498 var precision = 2147483647;
29499 var isExponential = false;
29500 if (strFormat.charAt (ich) == '.') {
29501 ++ich;
29502 if ((ch = strFormat.charAt (ich)) == '-') {
29503 isExponential = true;
29504 ++ich;
29505 }if ((ch = strFormat.charAt (ich)) >= '0' && ch <= '9') {
29506 precision = ch.charCodeAt (0) - 48;
29507 ++ich;
29508 }if (isExponential) precision = -precision - (strT == null ? 1 : 0);
29509 }var st = strFormat.substring (ich, ich + len);
29510 if (!st.equals (key)) {
29511 ich = ichPercent + 1;
29512 strLabel += '%';
29513 continue;
29514 }ich += len;
29515 if (!Float.isNaN (floatT)) strLabel += JU.PT.formatF (floatT, width, precision, alignLeft, zeroPad);
29516  else if (strT != null) strLabel += JU.PT.formatS (strT, width, precision, alignLeft, zeroPad);
29517  else if (!Double.isNaN (doubleT)) strLabel += JU.PT.formatD (doubleT, width, precision, alignLeft, zeroPad, true);
29518 if (doOne) break;
29519 } catch (ioobe) {
29520 if (Clazz_exceptionOf (ioobe, IndexOutOfBoundsException)) {
29521 ich = ichPercent;
29522 break;
29523 } else {
29524 throw ioobe;
29525 }
29526 }
29527 }
29528 strLabel += strFormat.substring (ich);
29529 return strLabel;
29530 }, "~S,~S,~S,~N,~N,~B");
29531 c$.formatStringS = Clazz_defineMethod (c$, "formatStringS", 
29532 function (strFormat, key, strT) {
29533 return JU.PT.formatString (strFormat, key, strT, NaN, NaN, false);
29534 }, "~S,~S,~S");
29535 c$.formatStringF = Clazz_defineMethod (c$, "formatStringF", 
29536 function (strFormat, key, floatT) {
29537 return JU.PT.formatString (strFormat, key, null, floatT, NaN, false);
29538 }, "~S,~S,~N");
29539 c$.formatStringI = Clazz_defineMethod (c$, "formatStringI", 
29540 function (strFormat, key, intT) {
29541 return JU.PT.formatString (strFormat, key, "" + intT, NaN, NaN, false);
29542 }, "~S,~S,~N");
29543 c$.sprintf = Clazz_defineMethod (c$, "sprintf", 
29544 function (strFormat, list, values) {
29545 if (values == null) return strFormat;
29546 var n = list.length;
29547 if (n == values.length) try {
29548 for (var o = 0; o < n; o++) {
29549 if (values[o] == null) continue;
29550 switch (list.charAt (o)) {
29551 case 's':
29552 strFormat = JU.PT.formatString (strFormat, "s", values[o], NaN, NaN, true);
29553 break;
29554 case 'f':
29555 strFormat = JU.PT.formatString (strFormat, "f", null, (values[o]).floatValue (), NaN, true);
29556 break;
29557 case 'i':
29558 strFormat = JU.PT.formatString (strFormat, "d", "" + values[o], NaN, NaN, true);
29559 strFormat = JU.PT.formatString (strFormat, "i", "" + values[o], NaN, NaN, true);
29560 break;
29561 case 'd':
29562 strFormat = JU.PT.formatString (strFormat, "e", null, NaN, (values[o]).doubleValue (), true);
29563 break;
29564 case 'p':
29565 var pVal = values[o];
29566 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.x, NaN, true);
29567 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.y, NaN, true);
29568 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.z, NaN, true);
29569 break;
29570 case 'q':
29571 var qVal = values[o];
29572 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.x, NaN, true);
29573 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.y, NaN, true);
29574 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.z, NaN, true);
29575 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.w, NaN, true);
29576 break;
29577 case 'S':
29578 var sVal = values[o];
29579 for (var i = 0; i < sVal.length; i++) strFormat = JU.PT.formatString (strFormat, "s", sVal[i], NaN, NaN, true);
29580
29581 break;
29582 case 'F':
29583 var fVal = values[o];
29584 for (var i = 0; i < fVal.length; i++) strFormat = JU.PT.formatString (strFormat, "f", null, fVal[i], NaN, true);
29585
29586 break;
29587 case 'I':
29588 var iVal = values[o];
29589 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "d", "" + iVal[i], NaN, NaN, true);
29590
29591 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "i", "" + iVal[i], NaN, NaN, true);
29592
29593 break;
29594 case 'D':
29595 var dVal = values[o];
29596 for (var i = 0; i < dVal.length; i++) strFormat = JU.PT.formatString (strFormat, "e", null, NaN, dVal[i], true);
29597
29598 }
29599 }
29600 return JU.PT.rep (strFormat, "%%", "%");
29601 } catch (e) {
29602 if (Clazz_exceptionOf (e, Exception)) {
29603 } else {
29604 throw e;
29605 }
29606 }
29607 System.out.println ("TextFormat.sprintf error " + list + " " + strFormat);
29608 return JU.PT.rep (strFormat, "%", "?");
29609 }, "~S,~S,~A");
29610 c$.formatCheck = Clazz_defineMethod (c$, "formatCheck", 
29611 function (strFormat) {
29612 if (strFormat == null || strFormat.indexOf ('p') < 0 && strFormat.indexOf ('q') < 0) return strFormat;
29613 strFormat = JU.PT.rep (strFormat, "%%", "\1");
29614 strFormat = JU.PT.rep (strFormat, "%p", "%6.2p");
29615 strFormat = JU.PT.rep (strFormat, "%q", "%6.2q");
29616 var format = JU.PT.split (strFormat, "%");
29617 var sb =  new JU.SB ();
29618 sb.append (format[0]);
29619 for (var i = 1; i < format.length; i++) {
29620 var f = "%" + format[i];
29621 var pt;
29622 if (f.length >= 3) {
29623 if ((pt = f.indexOf ('p')) >= 0) f = JU.PT.fdup (f, pt, 3);
29624 if ((pt = f.indexOf ('q')) >= 0) f = JU.PT.fdup (f, pt, 4);
29625 }sb.append (f);
29626 }
29627 return sb.toString ().$replace ('\1', '%');
29628 }, "~S");
29629 c$.leftJustify = Clazz_defineMethod (c$, "leftJustify", 
29630 function (s, s1, s2) {
29631 s.append (s2);
29632 var n = s1.length - s2.length;
29633 if (n > 0) s.append (s1.substring (0, n));
29634 }, "JU.SB,~S,~S");
29635 c$.rightJustify = Clazz_defineMethod (c$, "rightJustify", 
29636 function (s, s1, s2) {
29637 var n = s1.length - s2.length;
29638 if (n > 0) s.append (s1.substring (0, n));
29639 s.append (s2);
29640 }, "JU.SB,~S,~S");
29641 c$.safeTruncate = Clazz_defineMethod (c$, "safeTruncate", 
29642 function (f, n) {
29643 if (f > -0.001 && f < 0.001) f = 0;
29644 return (f + "         ").substring (0, n);
29645 }, "~N,~N");
29646 c$.isWild = Clazz_defineMethod (c$, "isWild", 
29647 function (s) {
29648 return s != null && (s.indexOf ("*") >= 0 || s.indexOf ("?") >= 0);
29649 }, "~S");
29650 c$.isMatch = Clazz_defineMethod (c$, "isMatch", 
29651 function (search, match, checkStar, allowInitialStar) {
29652 if (search.equals (match)) return true;
29653 var mLen = match.length;
29654 if (mLen == 0) return false;
29655 var isStar0 = (checkStar && allowInitialStar ? match.charAt (0) == '*' : false);
29656 if (mLen == 1 && isStar0) return true;
29657 var isStar1 = (checkStar && match.endsWith ("*"));
29658 var haveQ = (match.indexOf ('?') >= 0);
29659 if (!haveQ) {
29660 if (isStar0) return (isStar1 ? (mLen < 3 || search.indexOf (match.substring (1, mLen - 1)) >= 0) : search.endsWith (match.substring (1)));
29661  else if (isStar1) return search.startsWith (match.substring (0, mLen - 1));
29662 }var sLen = search.length;
29663 var qqqq = "????";
29664 var nq = 4;
29665 while (nq < sLen) {
29666 qqqq += qqqq;
29667 nq += 4;
29668 }
29669 if (checkStar) {
29670 if (isStar0) {
29671 match = qqqq + match.substring (1);
29672 mLen += nq - 1;
29673 }if (isStar1) {
29674 match = match.substring (0, mLen - 1) + qqqq;
29675 mLen += nq - 1;
29676 }}if (mLen < sLen) return false;
29677 var ich = 0;
29678 while (mLen > sLen) {
29679 if (allowInitialStar && match.charAt (ich) == '?') {
29680 ++ich;
29681 } else if (match.charAt (ich + mLen - 1) != '?') {
29682 return false;
29683 }--mLen;
29684 }
29685 for (var i = sLen; --i >= 0; ) {
29686 var chm = match.charAt (ich + i);
29687 if (chm == '?') continue;
29688 var chs = search.charAt (i);
29689 if (chm != chs && (chm != '\1' || chs != '?')) return false;
29690 }
29691 return true;
29692 }, "~S,~S,~B,~B");
29693 c$.replaceQuotedStrings = Clazz_defineMethod (c$, "replaceQuotedStrings", 
29694 function (s, list, newList) {
29695 var n = list.size ();
29696 for (var i = 0; i < n; i++) {
29697 var name = list.get (i);
29698 var newName = newList.get (i);
29699 if (!newName.equals (name)) s = JU.PT.rep (s, "\"" + name + "\"", "\"" + newName + "\"");
29700 }
29701 return s;
29702 }, "~S,JU.Lst,JU.Lst");
29703 c$.replaceStrings = Clazz_defineMethod (c$, "replaceStrings", 
29704 function (s, list, newList) {
29705 var n = list.size ();
29706 for (var i = 0; i < n; i++) {
29707 var name = list.get (i);
29708 var newName = newList.get (i);
29709 if (!newName.equals (name)) s = JU.PT.rep (s, name, newName);
29710 }
29711 return s;
29712 }, "~S,JU.Lst,JU.Lst");
29713 c$.isDigit = Clazz_defineMethod (c$, "isDigit", 
29714 function (ch) {
29715 var c = (ch).charCodeAt (0);
29716 return (48 <= c && c <= 57);
29717 }, "~S");
29718 c$.isUpperCase = Clazz_defineMethod (c$, "isUpperCase", 
29719 function (ch) {
29720 var c = (ch).charCodeAt (0);
29721 return (65 <= c && c <= 90);
29722 }, "~S");
29723 c$.isLowerCase = Clazz_defineMethod (c$, "isLowerCase", 
29724 function (ch) {
29725 var c = (ch).charCodeAt (0);
29726 return (97 <= c && c <= 122);
29727 }, "~S");
29728 c$.isLetter = Clazz_defineMethod (c$, "isLetter", 
29729 function (ch) {
29730 var c = (ch).charCodeAt (0);
29731 return (65 <= c && c <= 90 || 97 <= c && c <= 122);
29732 }, "~S");
29733 c$.isLetterOrDigit = Clazz_defineMethod (c$, "isLetterOrDigit", 
29734 function (ch) {
29735 var c = (ch).charCodeAt (0);
29736 return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57);
29737 }, "~S");
29738 c$.isWhitespace = Clazz_defineMethod (c$, "isWhitespace", 
29739 function (ch) {
29740 var c = (ch).charCodeAt (0);
29741 return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd);
29742 }, "~S");
29743 c$.fixPtFloats = Clazz_defineMethod (c$, "fixPtFloats", 
29744 function (pt, f) {
29745 pt.x = Math.round (pt.x * f) / f;
29746 pt.y = Math.round (pt.y * f) / f;
29747 pt.z = Math.round (pt.z * f) / f;
29748 }, "JU.T3,~N");
29749 c$.fixDouble = Clazz_defineMethod (c$, "fixDouble", 
29750 function (d, f) {
29751 return Math.round (d * f) / f;
29752 }, "~N,~N");
29753 c$.parseFloatFraction = Clazz_defineMethod (c$, "parseFloatFraction", 
29754 function (s) {
29755 var pt = s.indexOf ("/");
29756 return (pt < 0 ? JU.PT.parseFloat (s) : JU.PT.parseFloat (s.substring (0, pt)) / JU.PT.parseFloat (s.substring (pt + 1)));
29757 }, "~S");
29758 Clazz_defineStatics (c$,
29759 "tensScale",  Clazz_newFloatArray (-1, [10, 100, 1000, 10000, 100000, 1000000]),
29760 "decimalScale",  Clazz_newFloatArray (-1, [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001, 0.00000001, 0.000000001]),
29761 "FLOAT_MIN_SAFE", 2E-45,
29762 "escapable", "\\\\\tt\rr\nn\"\"",
29763 "FRACTIONAL_PRECISION", 100000,
29764 "CARTESIAN_PRECISION", 10000);
29765 });
29766 Clazz_declarePackage ("javajs.api");
29767 Clazz_declareInterface (javajs.api, "JSONEncodable");
29768 Clazz_declarePackage ("JU");
29769 Clazz_load (null, "JU.AU", ["java.util.Arrays", "JU.Lst"], function () {
29770 c$ = Clazz_declareType (JU, "AU");
29771 c$.ensureLength = Clazz_defineMethod (c$, "ensureLength", 
29772 function (array, minimumLength) {
29773 if (array != null && JU.AU.getLength (array) >= minimumLength) return array;
29774 return JU.AU.arrayCopyObject (array, minimumLength);
29775 }, "~O,~N");
29776 c$.ensureLengthS = Clazz_defineMethod (c$, "ensureLengthS", 
29777 function (array, minimumLength) {
29778 if (array != null && array.length >= minimumLength) return array;
29779 return JU.AU.arrayCopyS (array, minimumLength);
29780 }, "~A,~N");
29781 c$.ensureLengthA = Clazz_defineMethod (c$, "ensureLengthA", 
29782 function (array, minimumLength) {
29783 if (array != null && array.length >= minimumLength) return array;
29784 return JU.AU.arrayCopyF (array, minimumLength);
29785 }, "~A,~N");
29786 c$.ensureLengthI = Clazz_defineMethod (c$, "ensureLengthI", 
29787 function (array, minimumLength) {
29788 if (array != null && array.length >= minimumLength) return array;
29789 return JU.AU.arrayCopyI (array, minimumLength);
29790 }, "~A,~N");
29791 c$.ensureLengthShort = Clazz_defineMethod (c$, "ensureLengthShort", 
29792 function (array, minimumLength) {
29793 if (array != null && array.length >= minimumLength) return array;
29794 return JU.AU.arrayCopyShort (array, minimumLength);
29795 }, "~A,~N");
29796 c$.ensureLengthByte = Clazz_defineMethod (c$, "ensureLengthByte", 
29797 function (array, minimumLength) {
29798 if (array != null && array.length >= minimumLength) return array;
29799 return JU.AU.arrayCopyByte (array, minimumLength);
29800 }, "~A,~N");
29801 c$.doubleLength = Clazz_defineMethod (c$, "doubleLength", 
29802 function (array) {
29803 return JU.AU.arrayCopyObject (array, (array == null ? 16 : 2 * JU.AU.getLength (array)));
29804 }, "~O");
29805 c$.doubleLengthS = Clazz_defineMethod (c$, "doubleLengthS", 
29806 function (array) {
29807 return JU.AU.arrayCopyS (array, (array == null ? 16 : 2 * array.length));
29808 }, "~A");
29809 c$.doubleLengthF = Clazz_defineMethod (c$, "doubleLengthF", 
29810 function (array) {
29811 return JU.AU.arrayCopyF (array, (array == null ? 16 : 2 * array.length));
29812 }, "~A");
29813 c$.doubleLengthI = Clazz_defineMethod (c$, "doubleLengthI", 
29814 function (array) {
29815 return JU.AU.arrayCopyI (array, (array == null ? 16 : 2 * array.length));
29816 }, "~A");
29817 c$.doubleLengthShort = Clazz_defineMethod (c$, "doubleLengthShort", 
29818 function (array) {
29819 return JU.AU.arrayCopyShort (array, (array == null ? 16 : 2 * array.length));
29820 }, "~A");
29821 c$.doubleLengthByte = Clazz_defineMethod (c$, "doubleLengthByte", 
29822 function (array) {
29823 return JU.AU.arrayCopyByte (array, (array == null ? 16 : 2 * array.length));
29824 }, "~A");
29825 c$.doubleLengthBool = Clazz_defineMethod (c$, "doubleLengthBool", 
29826 function (array) {
29827 return JU.AU.arrayCopyBool (array, (array == null ? 16 : 2 * array.length));
29828 }, "~A");
29829 c$.deleteElements = Clazz_defineMethod (c$, "deleteElements", 
29830 function (array, firstElement, nElements) {
29831 if (nElements == 0 || array == null) return array;
29832 var oldLength = JU.AU.getLength (array);
29833 if (firstElement >= oldLength) return array;
29834 var n = oldLength - (firstElement + nElements);
29835 if (n < 0) n = 0;
29836 var t = JU.AU.newInstanceO (array, firstElement + n);
29837 if (firstElement > 0) System.arraycopy (array, 0, t, 0, firstElement);
29838 if (n > 0) System.arraycopy (array, firstElement + nElements, t, firstElement, n);
29839 return t;
29840 }, "~O,~N,~N");
29841 c$.arrayCopyObject = Clazz_defineMethod (c$, "arrayCopyObject", 
29842 function (array, newLength) {
29843 if (array == null) {
29844 return null;
29845 }var oldLength = JU.AU.getLength (array);
29846 if (newLength == oldLength) return array;
29847 var t = JU.AU.newInstanceO (array, newLength);
29848 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29849 return t;
29850 }, "~O,~N");
29851 c$.newInstanceO = Clazz_defineMethod (c$, "newInstanceO", 
29852  function (array, n) {
29853 {
29854 if (!array.getClass().getComponentType)
29855 return new Array(n);
29856 }}, "~O,~N");
29857 c$.getLength = Clazz_defineMethod (c$, "getLength", 
29858 function (array) {
29859 {
29860 return array.length
29861 }}, "~O");
29862 c$.arrayCopyS = Clazz_defineMethod (c$, "arrayCopyS", 
29863 function (array, newLength) {
29864 if (newLength < 0) newLength = array.length;
29865 var t =  new Array (newLength);
29866 if (array != null) {
29867 var oldLength = array.length;
29868 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29869 }return t;
29870 }, "~A,~N");
29871 c$.arrayCopyII = Clazz_defineMethod (c$, "arrayCopyII", 
29872 function (array, newLength) {
29873 var t = JU.AU.newInt2 (newLength);
29874 if (array != null) {
29875 var oldLength = array.length;
29876 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29877 }return t;
29878 }, "~A,~N");
29879 c$.arrayCopyPt = Clazz_defineMethod (c$, "arrayCopyPt", 
29880 function (array, newLength) {
29881 if (newLength < 0) newLength = array.length;
29882 var t =  new Array (newLength);
29883 if (array != null) {
29884 var oldLength = array.length;
29885 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29886 }return t;
29887 }, "~A,~N");
29888 c$.arrayCopyF = Clazz_defineMethod (c$, "arrayCopyF", 
29889 function (array, newLength) {
29890 if (newLength < 0) newLength = array.length;
29891 var t =  Clazz_newFloatArray (newLength, 0);
29892 if (array != null) {
29893 var oldLength = array.length;
29894 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29895 }return t;
29896 }, "~A,~N");
29897 c$.arrayCopyI = Clazz_defineMethod (c$, "arrayCopyI", 
29898 function (array, newLength) {
29899 if (newLength < 0) newLength = array.length;
29900 var t =  Clazz_newIntArray (newLength, 0);
29901 if (array != null) {
29902 var oldLength = array.length;
29903 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29904 }return t;
29905 }, "~A,~N");
29906 c$.arrayCopyRangeI = Clazz_defineMethod (c$, "arrayCopyRangeI", 
29907 function (array, i0, n) {
29908 if (array == null) return null;
29909 var oldLength = array.length;
29910 if (n == -1) n = oldLength;
29911 if (n == -2) n = Clazz_doubleToInt (oldLength / 2);
29912 n = n - i0;
29913 var t =  Clazz_newIntArray (n, 0);
29914 System.arraycopy (array, i0, t, 0, n);
29915 return t;
29916 }, "~A,~N,~N");
29917 c$.arrayCopyRangeRevI = Clazz_defineMethod (c$, "arrayCopyRangeRevI", 
29918 function (array, i0, n) {
29919 if (array == null) return null;
29920 var t = JU.AU.arrayCopyRangeI (array, i0, n);
29921 if (n < 0) n = array.length;
29922 for (var i = Clazz_doubleToInt (n / 2); --i >= 0; ) JU.AU.swapInt (t, i, n - 1 - i);
29923
29924 return t;
29925 }, "~A,~N,~N");
29926 c$.arrayCopyShort = Clazz_defineMethod (c$, "arrayCopyShort", 
29927 function (array, newLength) {
29928 if (newLength < 0) newLength = array.length;
29929 var t =  Clazz_newShortArray (newLength, 0);
29930 if (array != null) {
29931 var oldLength = array.length;
29932 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29933 }return t;
29934 }, "~A,~N");
29935 c$.arrayCopyByte = Clazz_defineMethod (c$, "arrayCopyByte", 
29936 function (array, newLength) {
29937 if (newLength < 0) newLength = array.length;
29938 var t =  Clazz_newByteArray (newLength, 0);
29939 if (array != null) {
29940 var oldLength = array.length;
29941 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29942 }return t;
29943 }, "~A,~N");
29944 c$.arrayCopyBool = Clazz_defineMethod (c$, "arrayCopyBool", 
29945 function (array, newLength) {
29946 if (newLength < 0) newLength = array.length;
29947 var t =  Clazz_newBooleanArray (newLength, false);
29948 if (array != null) {
29949 var oldLength = array.length;
29950 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29951 }return t;
29952 }, "~A,~N");
29953 c$.swapInt = Clazz_defineMethod (c$, "swapInt", 
29954 function (array, indexA, indexB) {
29955 var t = array[indexA];
29956 array[indexA] = array[indexB];
29957 array[indexB] = t;
29958 }, "~A,~N,~N");
29959 c$.dumpArray = Clazz_defineMethod (c$, "dumpArray", 
29960 function (msg, A, x1, x2, y1, y2) {
29961 var s = "dumpArray: " + msg + "\n";
29962 for (var x = x1; x <= x2; x++) s += "\t*" + x + "*";
29963
29964 for (var y = y2; y >= y1; y--) {
29965 s += "\n*" + y + "*";
29966 for (var x = x1; x <= x2; x++) s += "\t" + (x < A.length && y < A[x].length ? A[x][y] : NaN);
29967
29968 }
29969 return s;
29970 }, "~S,~A,~N,~N,~N,~N");
29971 c$.dumpIntArray = Clazz_defineMethod (c$, "dumpIntArray", 
29972 function (A, n) {
29973 var str = "";
29974 for (var i = 0; i < n; i++) str += " " + A[i];
29975
29976 return str;
29977 }, "~A,~N");
29978 c$.sortedItem = Clazz_defineMethod (c$, "sortedItem", 
29979 function (v, n) {
29980 if (v.size () == 0) return null;
29981 if (v.size () == 1) return v.get (0);
29982 var keys = v.toArray ( new Array (v.size ()));
29983 java.util.Arrays.sort (keys);
29984 return keys[n % keys.length];
29985 }, "JU.Lst,~N");
29986 c$.createArrayOfArrayList = Clazz_defineMethod (c$, "createArrayOfArrayList", 
29987 function (size) {
29988 return  new Array (size);
29989 }, "~N");
29990 c$.createArrayOfHashtable = Clazz_defineMethod (c$, "createArrayOfHashtable", 
29991 function (size) {
29992 return  new Array (size);
29993 }, "~N");
29994 c$.swap = Clazz_defineMethod (c$, "swap", 
29995 function (o, i, j) {
29996 var oi = o[i];
29997 o[i] = o[j];
29998 o[j] = oi;
29999 }, "~A,~N,~N");
30000 c$.newFloat2 = Clazz_defineMethod (c$, "newFloat2", 
30001 function (n) {
30002 {
30003 return Clazz_newArray(n, null);
30004 }}, "~N");
30005 c$.newInt2 = Clazz_defineMethod (c$, "newInt2", 
30006 function (n) {
30007 {
30008 return Clazz_newArray(n, null);
30009 }}, "~N");
30010 c$.newInt3 = Clazz_defineMethod (c$, "newInt3", 
30011 function (nx, ny) {
30012 {
30013 return Clazz_newArray(nx, null);
30014 }}, "~N,~N");
30015 c$.newFloat3 = Clazz_defineMethod (c$, "newFloat3", 
30016 function (nx, ny) {
30017 {
30018 return Clazz_newArray(nx, null);
30019 }}, "~N,~N");
30020 c$.newInt4 = Clazz_defineMethod (c$, "newInt4", 
30021 function (n) {
30022 {
30023 return Clazz_newArray(n, null);
30024 }}, "~N");
30025 c$.newShort2 = Clazz_defineMethod (c$, "newShort2", 
30026 function (n) {
30027 {
30028 return Clazz_newArray(n, null);
30029 }}, "~N");
30030 c$.newByte2 = Clazz_defineMethod (c$, "newByte2", 
30031 function (n) {
30032 {
30033 return Clazz_newArray(n, null);
30034 }}, "~N");
30035 c$.newDouble2 = Clazz_defineMethod (c$, "newDouble2", 
30036 function (n) {
30037 {
30038 return Clazz_newArray(n, null);
30039 }}, "~N");
30040 c$.removeMapKeys = Clazz_defineMethod (c$, "removeMapKeys", 
30041 function (map, root) {
30042 var list =  new JU.Lst ();
30043 for (var key, $key = map.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) if (key.startsWith (root)) list.addLast (key);
30044
30045 for (var i = list.size (); --i >= 0; ) map.remove (list.get (i));
30046
30047 return list.size ();
30048 }, "java.util.Map,~S");
30049 c$.isAS = Clazz_defineMethod (c$, "isAS", 
30050 function (x) {
30051 {
30052 return Clazz_isAS(x);
30053 }}, "~O");
30054 c$.isASS = Clazz_defineMethod (c$, "isASS", 
30055 function (x) {
30056 {
30057 return Clazz_isASS(x);
30058 }}, "~O");
30059 c$.isAP = Clazz_defineMethod (c$, "isAP", 
30060 function (x) {
30061 {
30062 return Clazz_isAP(x);
30063 }}, "~O");
30064 c$.isAF = Clazz_defineMethod (c$, "isAF", 
30065 function (x) {
30066 {
30067 return Clazz_isAF(x);
30068 }}, "~O");
30069 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
30070 function (x) {
30071 {
30072 return Clazz_isAFloat(x);
30073 }}, "~O");
30074 c$.isAD = Clazz_defineMethod (c$, "isAD", 
30075 function (x) {
30076 {
30077 return Clazz_isAF(x);
30078 }}, "~O");
30079 c$.isADD = Clazz_defineMethod (c$, "isADD", 
30080 function (x) {
30081 {
30082 return Clazz_isAFF(x);
30083 }}, "~O");
30084 c$.isAB = Clazz_defineMethod (c$, "isAB", 
30085 function (x) {
30086 {
30087 return Clazz_isAI(x);
30088 }}, "~O");
30089 c$.isAI = Clazz_defineMethod (c$, "isAI", 
30090 function (x) {
30091 {
30092 return Clazz_isAI(x);
30093 }}, "~O");
30094 c$.isAII = Clazz_defineMethod (c$, "isAII", 
30095 function (x) {
30096 {
30097 return Clazz_isAII(x);
30098 }}, "~O");
30099 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
30100 function (x) {
30101 {
30102 return Clazz_isAFF(x);
30103 }}, "~O");
30104 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
30105 function (x) {
30106 {
30107 return Clazz_isAFFF(x);
30108 }}, "~O");
30109 c$.ensureSignedBytes = Clazz_defineMethod (c$, "ensureSignedBytes", 
30110 function (b) {
30111 if (b != null) {
30112 {
30113 for (var i = b.length; --i >= 0;) { var j = b[i] & 0xFF; if
30114 (j >= 0x80) j -= 0x100; b[i] = j; }
30115 }}return b;
30116 }, "~A");
30117 });
30118 Clazz_declarePackage ("JU");
30119 Clazz_load (["java.util.ArrayList"], "JU.Lst", null, function () {
30120 c$ = Clazz_declareType (JU, "Lst", java.util.ArrayList);
30121 Clazz_defineMethod (c$, "addLast", 
30122 function (v) {
30123 {
30124 return this.add1(v);
30125 }}, "~O");
30126 Clazz_defineMethod (c$, "removeObj", 
30127 function (v) {
30128 {
30129 return this.removeObject(v);
30130 }}, "~O");
30131 });
30132 Clazz_declarePackage ("JU");
30133 Clazz_load (["java.lang.Boolean"], "JU.DF", ["java.lang.Double", "$.Float", "JU.PT", "$.SB"], function () {
30134 c$ = Clazz_declareType (JU, "DF");
30135 c$.setUseNumberLocalization = Clazz_defineMethod (c$, "setUseNumberLocalization", 
30136 function (TF) {
30137 JU.DF.useNumberLocalization[0] = (TF ? Boolean.TRUE : Boolean.FALSE);
30138 }, "~B");
30139 c$.formatDecimalDbl = Clazz_defineMethod (c$, "formatDecimalDbl", 
30140 function (value, decimalDigits) {
30141 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Double.isNaN (value)) return "" + value;
30142 return JU.DF.formatDecimal (value, decimalDigits);
30143 }, "~N,~N");
30144 c$.formatDecimal = Clazz_defineMethod (c$, "formatDecimal", 
30145 function (value, decimalDigits) {
30146 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Float.isNaN (value)) return "" + value;
30147 var n;
30148 if (decimalDigits < 0) {
30149 decimalDigits = -decimalDigits;
30150 if (decimalDigits > JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length;
30151 if (value == 0) return JU.DF.formattingStrings[decimalDigits] + "E+0";
30152 n = 0;
30153 var d;
30154 if (Math.abs (value) < 1) {
30155 n = 10;
30156 d = value * 1e-10;
30157 } else {
30158 n = -10;
30159 d = value * 1e10;
30160 }var s = ("" + d).toUpperCase ();
30161 var i = s.indexOf ("E");
30162 n = JU.PT.parseInt (s.substring (i + 1)) + n;
30163 return (i < 0 ? "" + value : JU.DF.formatDecimal (JU.PT.parseFloat (s.substring (0, i)), decimalDigits - 1) + "E" + (n >= 0 ? "+" : "") + n);
30164 }if (decimalDigits >= JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length - 1;
30165 var s1 = ("" + value).toUpperCase ();
30166 var pt = s1.indexOf (".");
30167 if (pt < 0) return s1 + JU.DF.formattingStrings[decimalDigits].substring (1);
30168 var isNeg = s1.startsWith ("-");
30169 if (isNeg) {
30170 s1 = s1.substring (1);
30171 pt--;
30172 }var pt1 = s1.indexOf ("E-");
30173 if (pt1 > 0) {
30174 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30175 s1 = "0." + "0000000000000000000000000000000000000000".substring (0, -n - 1) + s1.substring (0, 1) + s1.substring (2, pt1);
30176 pt = 1;
30177 }pt1 = s1.indexOf ("E");
30178 if (pt1 > 0) {
30179 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30180 s1 = s1.substring (0, 1) + s1.substring (2, pt1) + "0000000000000000000000000000000000000000";
30181 s1 = s1.substring (0, n + 1) + "." + s1.substring (n + 1);
30182 pt = s1.indexOf (".");
30183 }var len = s1.length;
30184 var pt2 = decimalDigits + pt + 1;
30185 if (pt2 < len && s1.charAt (pt2) >= '5') {
30186 return JU.DF.formatDecimal (value + (isNeg ? -1 : 1) * JU.DF.formatAdds[decimalDigits], decimalDigits);
30187 }var sb = JU.SB.newS (s1.substring (0, (decimalDigits == 0 ? pt : ++pt)));
30188 for (var i = 0; i < decimalDigits; i++, pt++) {
30189 if (pt < len) sb.appendC (s1.charAt (pt));
30190  else sb.appendC ('0');
30191 }
30192 s1 = (isNeg ? "-" : "") + sb;
30193 return (Boolean.TRUE.equals (JU.DF.useNumberLocalization[0]) ? s1 : s1.$replace (',', '.'));
30194 }, "~N,~N");
30195 c$.formatDecimalTrimmed = Clazz_defineMethod (c$, "formatDecimalTrimmed", 
30196 function (x, precision) {
30197 var str = JU.DF.formatDecimalDbl (x, precision);
30198 var m = str.length - 1;
30199 var zero = '0';
30200 while (m >= 0 && str.charAt (m) == zero) m--;
30201
30202 return str.substring (0, m + 1);
30203 }, "~N,~N");
30204 Clazz_defineStatics (c$,
30205 "formattingStrings",  Clazz_newArray (-1, ["0", "0.0", "0.00", "0.000", "0.0000", "0.00000", "0.000000", "0.0000000", "0.00000000", "0.000000000"]),
30206 "zeros", "0000000000000000000000000000000000000000",
30207 "formatAdds",  Clazz_newFloatArray (-1, [0.5, 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005]));
30208 c$.useNumberLocalization = c$.prototype.useNumberLocalization =  Clazz_newArray (-1, [Boolean.TRUE]);
30209 });
30210 Clazz_declarePackage ("JU");
30211 c$ = Clazz_decorateAsClass (function () {
30212 this.sb = null;
30213 this.s = null;
30214 Clazz_instantialize (this, arguments);
30215 }, JU, "SB");
30216 Clazz_makeConstructor (c$, 
30217 function () {
30218 {
30219 this.s = "";
30220 }});
30221 c$.newN = Clazz_defineMethod (c$, "newN", 
30222 function (n) {
30223 {
30224 return new JU.SB();
30225 }}, "~N");
30226 c$.newS = Clazz_defineMethod (c$, "newS", 
30227 function (s) {
30228 {
30229 var sb = new JU.SB();
30230 sb.s = s;
30231 return sb;
30232 }}, "~S");
30233 Clazz_defineMethod (c$, "append", 
30234 function (s) {
30235 {
30236 this.s += s
30237 }return this;
30238 }, "~S");
30239 Clazz_defineMethod (c$, "appendC", 
30240 function (c) {
30241 {
30242 this.s += c;
30243 }return this;
30244 }, "~S");
30245 Clazz_defineMethod (c$, "appendI", 
30246 function (i) {
30247 {
30248 this.s += i
30249 }return this;
30250 }, "~N");
30251 Clazz_defineMethod (c$, "appendB", 
30252 function (b) {
30253 {
30254 this.s += b
30255 }return this;
30256 }, "~B");
30257 Clazz_defineMethod (c$, "appendF", 
30258 function (f) {
30259 {
30260 var sf = "" + f;
30261 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30262 sf += ".0" ;
30263 this.s += sf;
30264 }return this;
30265 }, "~N");
30266 Clazz_defineMethod (c$, "appendD", 
30267 function (d) {
30268 {
30269 var sf = "" + d;
30270 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30271 sf += ".0" ;
30272 this.s += sf;
30273 }return this;
30274 }, "~N");
30275 Clazz_defineMethod (c$, "appendSB", 
30276 function (buf) {
30277 {
30278 this.s += buf.s;
30279 }return this;
30280 }, "JU.SB");
30281 Clazz_defineMethod (c$, "appendO", 
30282 function (data) {
30283 if (data != null) {
30284 {
30285 this.s += data.toString();
30286 }}return this;
30287 }, "~O");
30288 Clazz_defineMethod (c$, "appendCB", 
30289 function (cb, off, len) {
30290 {
30291 for (var i = len,j=off; --i >= 0;)
30292 this.s += cb[j++];
30293 }}, "~A,~N,~N");
30294 Clazz_overrideMethod (c$, "toString", 
30295 function () {
30296 {
30297 return this.s;
30298 }});
30299 Clazz_defineMethod (c$, "length", 
30300 function () {
30301 {
30302 return this.s.length;
30303 }});
30304 Clazz_defineMethod (c$, "indexOf", 
30305 function (s) {
30306 {
30307 return this.s.indexOf(s);
30308 }}, "~S");
30309 Clazz_defineMethod (c$, "charAt", 
30310 function (i) {
30311 {
30312 return this.s.charAt(i);
30313 }}, "~N");
30314 Clazz_defineMethod (c$, "charCodeAt", 
30315 function (i) {
30316 {
30317 return this.s.charCodeAt(i);
30318 }}, "~N");
30319 Clazz_defineMethod (c$, "setLength", 
30320 function (n) {
30321 {
30322 this.s = this.s.substring(0, n);
30323 }}, "~N");
30324 Clazz_defineMethod (c$, "lastIndexOf", 
30325 function (s) {
30326 {
30327 return this.s.lastIndexOf(s);
30328 }}, "~S");
30329 Clazz_defineMethod (c$, "indexOf2", 
30330 function (s, i) {
30331 {
30332 return this.s.indexOf(s, i);
30333 }}, "~S,~N");
30334 Clazz_defineMethod (c$, "substring", 
30335 function (i) {
30336 {
30337 return this.s.substring(i);
30338 }}, "~N");
30339 Clazz_defineMethod (c$, "substring2", 
30340 function (i, j) {
30341 {
30342 return this.s.substring(i, j);
30343 }}, "~N,~N");
30344 Clazz_defineMethod (c$, "toBytes", 
30345 function (off, len) {
30346 if (len < 0) len = this.length () - off;
30347 var b =  Clazz_newByteArray (len, 0);
30348 for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0);
30349
30350 return b;
30351 }, "~N,~N");
30352 Clazz_defineMethod (c$, "replace", 
30353 function (start, end, str) {
30354 {
30355 this.s = this.s.substring(0, start) + str + this.s.substring(end);
30356 }}, "~N,~N,~S");
30357 Clazz_defineMethod (c$, "insert", 
30358 function (offset, str) {
30359 this.replace (offset, offset, str);
30360 }, "~N,~S");
30361 Clazz_declarePackage ("JU");
30362 Clazz_load (null, "JU.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () {
30363 c$ = Clazz_decorateAsClass (function () {
30364 this.m00 = 0;
30365 this.m01 = 0;
30366 this.m02 = 0;
30367 this.m10 = 0;
30368 this.m11 = 0;
30369 this.m12 = 0;
30370 this.m20 = 0;
30371 this.m21 = 0;
30372 this.m22 = 0;
30373 Clazz_instantialize (this, arguments);
30374 }, JU, "M34");
30375 Clazz_defineMethod (c$, "setAA33", 
30376 function (a) {
30377 var x = a.x;
30378 var y = a.y;
30379 var z = a.z;
30380 var angle = a.angle;
30381 var n = Math.sqrt (x * x + y * y + z * z);
30382 n = 1 / n;
30383 x *= n;
30384 y *= n;
30385 z *= n;
30386 var c = Math.cos (angle);
30387 var s = Math.sin (angle);
30388 var omc = 1.0 - c;
30389 this.m00 = (c + x * x * omc);
30390 this.m11 = (c + y * y * omc);
30391 this.m22 = (c + z * z * omc);
30392 var tmp1 = x * y * omc;
30393 var tmp2 = z * s;
30394 this.m01 = (tmp1 - tmp2);
30395 this.m10 = (tmp1 + tmp2);
30396 tmp1 = x * z * omc;
30397 tmp2 = y * s;
30398 this.m02 = (tmp1 + tmp2);
30399 this.m20 = (tmp1 - tmp2);
30400 tmp1 = y * z * omc;
30401 tmp2 = x * s;
30402 this.m12 = (tmp1 - tmp2);
30403 this.m21 = (tmp1 + tmp2);
30404 }, "JU.A4");
30405 Clazz_defineMethod (c$, "rotate", 
30406 function (t) {
30407 this.rotate2 (t, t);
30408 }, "JU.T3");
30409 Clazz_defineMethod (c$, "rotate2", 
30410 function (t, result) {
30411 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);
30412 }, "JU.T3,JU.T3");
30413 Clazz_defineMethod (c$, "setM33", 
30414 function (m1) {
30415 this.m00 = m1.m00;
30416 this.m01 = m1.m01;
30417 this.m02 = m1.m02;
30418 this.m10 = m1.m10;
30419 this.m11 = m1.m11;
30420 this.m12 = m1.m12;
30421 this.m20 = m1.m20;
30422 this.m21 = m1.m21;
30423 this.m22 = m1.m22;
30424 }, "JU.M34");
30425 Clazz_defineMethod (c$, "clear33", 
30426 function () {
30427 this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0;
30428 });
30429 Clazz_defineMethod (c$, "set33", 
30430 function (row, col, v) {
30431 switch (row) {
30432 case 0:
30433 switch (col) {
30434 case 0:
30435 this.m00 = v;
30436 return;
30437 case 1:
30438 this.m01 = v;
30439 return;
30440 case 2:
30441 this.m02 = v;
30442 return;
30443 }
30444 break;
30445 case 1:
30446 switch (col) {
30447 case 0:
30448 this.m10 = v;
30449 return;
30450 case 1:
30451 this.m11 = v;
30452 return;
30453 case 2:
30454 this.m12 = v;
30455 return;
30456 }
30457 break;
30458 case 2:
30459 switch (col) {
30460 case 0:
30461 this.m20 = v;
30462 return;
30463 case 1:
30464 this.m21 = v;
30465 return;
30466 case 2:
30467 this.m22 = v;
30468 return;
30469 }
30470 break;
30471 }
30472 this.err ();
30473 }, "~N,~N,~N");
30474 Clazz_defineMethod (c$, "get33", 
30475 function (row, col) {
30476 switch (row) {
30477 case 0:
30478 switch (col) {
30479 case 0:
30480 return this.m00;
30481 case 1:
30482 return this.m01;
30483 case 2:
30484 return this.m02;
30485 }
30486 break;
30487 case 1:
30488 switch (col) {
30489 case 0:
30490 return this.m10;
30491 case 1:
30492 return this.m11;
30493 case 2:
30494 return this.m12;
30495 }
30496 break;
30497 case 2:
30498 switch (col) {
30499 case 0:
30500 return this.m20;
30501 case 1:
30502 return this.m21;
30503 case 2:
30504 return this.m22;
30505 }
30506 break;
30507 }
30508 this.err ();
30509 return 0;
30510 }, "~N,~N");
30511 Clazz_defineMethod (c$, "setRow33", 
30512 function (row, v) {
30513 switch (row) {
30514 case 0:
30515 this.m00 = v[0];
30516 this.m01 = v[1];
30517 this.m02 = v[2];
30518 return;
30519 case 1:
30520 this.m10 = v[0];
30521 this.m11 = v[1];
30522 this.m12 = v[2];
30523 return;
30524 case 2:
30525 this.m20 = v[0];
30526 this.m21 = v[1];
30527 this.m22 = v[2];
30528 return;
30529 default:
30530 this.err ();
30531 }
30532 }, "~N,~A");
30533 Clazz_defineMethod (c$, "getRow33", 
30534 function (row, v) {
30535 switch (row) {
30536 case 0:
30537 v[0] = this.m00;
30538 v[1] = this.m01;
30539 v[2] = this.m02;
30540 return;
30541 case 1:
30542 v[0] = this.m10;
30543 v[1] = this.m11;
30544 v[2] = this.m12;
30545 return;
30546 case 2:
30547 v[0] = this.m20;
30548 v[1] = this.m21;
30549 v[2] = this.m22;
30550 return;
30551 }
30552 this.err ();
30553 }, "~N,~A");
30554 Clazz_defineMethod (c$, "setColumn33", 
30555 function (column, v) {
30556 switch (column) {
30557 case 0:
30558 this.m00 = v[0];
30559 this.m10 = v[1];
30560 this.m20 = v[2];
30561 break;
30562 case 1:
30563 this.m01 = v[0];
30564 this.m11 = v[1];
30565 this.m21 = v[2];
30566 break;
30567 case 2:
30568 this.m02 = v[0];
30569 this.m12 = v[1];
30570 this.m22 = v[2];
30571 break;
30572 default:
30573 this.err ();
30574 }
30575 }, "~N,~A");
30576 Clazz_defineMethod (c$, "getColumn33", 
30577 function (column, v) {
30578 switch (column) {
30579 case 0:
30580 v[0] = this.m00;
30581 v[1] = this.m10;
30582 v[2] = this.m20;
30583 break;
30584 case 1:
30585 v[0] = this.m01;
30586 v[1] = this.m11;
30587 v[2] = this.m21;
30588 break;
30589 case 2:
30590 v[0] = this.m02;
30591 v[1] = this.m12;
30592 v[2] = this.m22;
30593 break;
30594 default:
30595 this.err ();
30596 }
30597 }, "~N,~A");
30598 Clazz_defineMethod (c$, "add33", 
30599 function (m1) {
30600 this.m00 += m1.m00;
30601 this.m01 += m1.m01;
30602 this.m02 += m1.m02;
30603 this.m10 += m1.m10;
30604 this.m11 += m1.m11;
30605 this.m12 += m1.m12;
30606 this.m20 += m1.m20;
30607 this.m21 += m1.m21;
30608 this.m22 += m1.m22;
30609 }, "JU.M34");
30610 Clazz_defineMethod (c$, "sub33", 
30611 function (m1) {
30612 this.m00 -= m1.m00;
30613 this.m01 -= m1.m01;
30614 this.m02 -= m1.m02;
30615 this.m10 -= m1.m10;
30616 this.m11 -= m1.m11;
30617 this.m12 -= m1.m12;
30618 this.m20 -= m1.m20;
30619 this.m21 -= m1.m21;
30620 this.m22 -= m1.m22;
30621 }, "JU.M34");
30622 Clazz_defineMethod (c$, "mul33", 
30623 function (x) {
30624 this.m00 *= x;
30625 this.m01 *= x;
30626 this.m02 *= x;
30627 this.m10 *= x;
30628 this.m11 *= x;
30629 this.m12 *= x;
30630 this.m20 *= x;
30631 this.m21 *= x;
30632 this.m22 *= x;
30633 }, "~N");
30634 Clazz_defineMethod (c$, "transpose33", 
30635 function () {
30636 var tmp = this.m01;
30637 this.m01 = this.m10;
30638 this.m10 = tmp;
30639 tmp = this.m02;
30640 this.m02 = this.m20;
30641 this.m20 = tmp;
30642 tmp = this.m12;
30643 this.m12 = this.m21;
30644 this.m21 = tmp;
30645 });
30646 Clazz_defineMethod (c$, "setXRot", 
30647 function (angle) {
30648 var c = Math.cos (angle);
30649 var s = Math.sin (angle);
30650 this.m00 = 1.0;
30651 this.m01 = 0.0;
30652 this.m02 = 0.0;
30653 this.m10 = 0.0;
30654 this.m11 = c;
30655 this.m12 = -s;
30656 this.m20 = 0.0;
30657 this.m21 = s;
30658 this.m22 = c;
30659 }, "~N");
30660 Clazz_defineMethod (c$, "setYRot", 
30661 function (angle) {
30662 var c = Math.cos (angle);
30663 var s = Math.sin (angle);
30664 this.m00 = c;
30665 this.m01 = 0.0;
30666 this.m02 = s;
30667 this.m10 = 0.0;
30668 this.m11 = 1.0;
30669 this.m12 = 0.0;
30670 this.m20 = -s;
30671 this.m21 = 0.0;
30672 this.m22 = c;
30673 }, "~N");
30674 Clazz_defineMethod (c$, "setZRot", 
30675 function (angle) {
30676 var c = Math.cos (angle);
30677 var s = Math.sin (angle);
30678 this.m00 = c;
30679 this.m01 = -s;
30680 this.m02 = 0.0;
30681 this.m10 = s;
30682 this.m11 = c;
30683 this.m12 = 0.0;
30684 this.m20 = 0.0;
30685 this.m21 = 0.0;
30686 this.m22 = 1.0;
30687 }, "~N");
30688 Clazz_defineMethod (c$, "determinant3", 
30689 function () {
30690 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);
30691 });
30692 Clazz_defineMethod (c$, "err", 
30693 function () {
30694 throw  new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds");
30695 });
30696 });
30697 Clazz_declarePackage ("JU");
30698 Clazz_load (["JU.M34"], "JU.M4", ["JU.T3"], function () {
30699 c$ = Clazz_decorateAsClass (function () {
30700 this.m03 = 0;
30701 this.m13 = 0;
30702 this.m23 = 0;
30703 this.m30 = 0;
30704 this.m31 = 0;
30705 this.m32 = 0;
30706 this.m33 = 0;
30707 Clazz_instantialize (this, arguments);
30708 }, JU, "M4", JU.M34);
30709 c$.newA16 = Clazz_defineMethod (c$, "newA16", 
30710 function (v) {
30711 var m =  new JU.M4 ();
30712 m.m00 = v[0];
30713 m.m01 = v[1];
30714 m.m02 = v[2];
30715 m.m03 = v[3];
30716 m.m10 = v[4];
30717 m.m11 = v[5];
30718 m.m12 = v[6];
30719 m.m13 = v[7];
30720 m.m20 = v[8];
30721 m.m21 = v[9];
30722 m.m22 = v[10];
30723 m.m23 = v[11];
30724 m.m30 = v[12];
30725 m.m31 = v[13];
30726 m.m32 = v[14];
30727 m.m33 = v[15];
30728 return m;
30729 }, "~A");
30730 c$.newM4 = Clazz_defineMethod (c$, "newM4", 
30731 function (m1) {
30732 var m =  new JU.M4 ();
30733 if (m1 == null) {
30734 m.setIdentity ();
30735 return m;
30736 }m.setToM3 (m1);
30737 m.m03 = m1.m03;
30738 m.m13 = m1.m13;
30739 m.m23 = m1.m23;
30740 m.m30 = m1.m30;
30741 m.m31 = m1.m31;
30742 m.m32 = m1.m32;
30743 m.m33 = m1.m33;
30744 return m;
30745 }, "JU.M4");
30746 c$.newMV = Clazz_defineMethod (c$, "newMV", 
30747 function (m1, t) {
30748 var m =  new JU.M4 ();
30749 m.setMV (m1, t);
30750 return m;
30751 }, "JU.M3,JU.T3");
30752 Clazz_defineMethod (c$, "setZero", 
30753 function () {
30754 this.clear33 ();
30755 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = this.m33 = 0.0;
30756 });
30757 Clazz_defineMethod (c$, "setIdentity", 
30758 function () {
30759 this.setZero ();
30760 this.m00 = this.m11 = this.m22 = this.m33 = 1.0;
30761 });
30762 Clazz_defineMethod (c$, "setM4", 
30763 function (m1) {
30764 this.setM33 (m1);
30765 this.m03 = m1.m03;
30766 this.m13 = m1.m13;
30767 this.m23 = m1.m23;
30768 this.m30 = m1.m30;
30769 this.m31 = m1.m31;
30770 this.m32 = m1.m32;
30771 this.m33 = m1.m33;
30772 return this;
30773 }, "JU.M4");
30774 Clazz_defineMethod (c$, "setMV", 
30775 function (m1, t) {
30776 this.setM33 (m1);
30777 this.setTranslation (t);
30778 this.m33 = 1;
30779 }, "JU.M3,JU.T3");
30780 Clazz_defineMethod (c$, "setToM3", 
30781 function (m1) {
30782 this.setM33 (m1);
30783 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = 0.0;
30784 this.m33 = 1.0;
30785 }, "JU.M34");
30786 Clazz_defineMethod (c$, "setToAA", 
30787 function (a) {
30788 this.setIdentity ();
30789 this.setAA33 (a);
30790 }, "JU.A4");
30791 Clazz_defineMethod (c$, "setA", 
30792 function (m) {
30793 this.m00 = m[0];
30794 this.m01 = m[1];
30795 this.m02 = m[2];
30796 this.m03 = m[3];
30797 this.m10 = m[4];
30798 this.m11 = m[5];
30799 this.m12 = m[6];
30800 this.m13 = m[7];
30801 this.m20 = m[8];
30802 this.m21 = m[9];
30803 this.m22 = m[10];
30804 this.m23 = m[11];
30805 this.m30 = m[12];
30806 this.m31 = m[13];
30807 this.m32 = m[14];
30808 this.m33 = m[15];
30809 }, "~A");
30810 Clazz_defineMethod (c$, "setTranslation", 
30811 function (trans) {
30812 this.m03 = trans.x;
30813 this.m13 = trans.y;
30814 this.m23 = trans.z;
30815 }, "JU.T3");
30816 Clazz_defineMethod (c$, "setElement", 
30817 function (row, col, v) {
30818 if (row < 3 && col < 3) {
30819 this.set33 (row, col, v);
30820 return;
30821 }if (row > 3 || col > 3) this.err ();
30822 switch (row) {
30823 case 0:
30824 this.m03 = v;
30825 return;
30826 case 1:
30827 this.m13 = v;
30828 return;
30829 case 2:
30830 this.m23 = v;
30831 return;
30832 }
30833 switch (col) {
30834 case 0:
30835 this.m30 = v;
30836 return;
30837 case 1:
30838 this.m31 = v;
30839 return;
30840 case 2:
30841 this.m32 = v;
30842 return;
30843 case 3:
30844 this.m33 = v;
30845 return;
30846 }
30847 }, "~N,~N,~N");
30848 Clazz_defineMethod (c$, "getElement", 
30849 function (row, col) {
30850 if (row < 3 && col < 3) return this.get33 (row, col);
30851 if (row > 3 || col > 3) {
30852 this.err ();
30853 return 0;
30854 }switch (row) {
30855 case 0:
30856 return this.m03;
30857 case 1:
30858 return this.m13;
30859 case 2:
30860 return this.m23;
30861 default:
30862 switch (col) {
30863 case 0:
30864 return this.m30;
30865 case 1:
30866 return this.m31;
30867 case 2:
30868 return this.m32;
30869 default:
30870 return this.m33;
30871 }
30872 }
30873 }, "~N,~N");
30874 Clazz_defineMethod (c$, "getTranslation", 
30875 function (trans) {
30876 trans.x = this.m03;
30877 trans.y = this.m13;
30878 trans.z = this.m23;
30879 }, "JU.T3");
30880 Clazz_defineMethod (c$, "getRotationScale", 
30881 function (m1) {
30882 m1.m00 = this.m00;
30883 m1.m01 = this.m01;
30884 m1.m02 = this.m02;
30885 m1.m10 = this.m10;
30886 m1.m11 = this.m11;
30887 m1.m12 = this.m12;
30888 m1.m20 = this.m20;
30889 m1.m21 = this.m21;
30890 m1.m22 = this.m22;
30891 }, "JU.M3");
30892 Clazz_defineMethod (c$, "setRotationScale", 
30893 function (m1) {
30894 this.m00 = m1.m00;
30895 this.m01 = m1.m01;
30896 this.m02 = m1.m02;
30897 this.m10 = m1.m10;
30898 this.m11 = m1.m11;
30899 this.m12 = m1.m12;
30900 this.m20 = m1.m20;
30901 this.m21 = m1.m21;
30902 this.m22 = m1.m22;
30903 }, "JU.M3");
30904 Clazz_defineMethod (c$, "setRowA", 
30905 function (row, v) {
30906 if (row < 3) this.setRow33 (row, v);
30907 switch (row) {
30908 case 0:
30909 this.m03 = v[3];
30910 return;
30911 case 1:
30912 this.m13 = v[3];
30913 return;
30914 case 2:
30915 this.m23 = v[3];
30916 return;
30917 case 3:
30918 this.m30 = v[0];
30919 this.m31 = v[1];
30920 this.m32 = v[2];
30921 this.m33 = v[3];
30922 return;
30923 }
30924 this.err ();
30925 }, "~N,~A");
30926 Clazz_overrideMethod (c$, "getRow", 
30927 function (row, v) {
30928 if (row < 3) this.getRow33 (row, v);
30929 switch (row) {
30930 case 0:
30931 v[3] = this.m03;
30932 return;
30933 case 1:
30934 v[3] = this.m13;
30935 return;
30936 case 2:
30937 v[3] = this.m23;
30938 return;
30939 case 3:
30940 v[0] = this.m30;
30941 v[1] = this.m31;
30942 v[2] = this.m32;
30943 v[3] = this.m33;
30944 return;
30945 }
30946 this.err ();
30947 }, "~N,~A");
30948 Clazz_defineMethod (c$, "setColumn4", 
30949 function (column, x, y, z, w) {
30950 if (column == 0) {
30951 this.m00 = x;
30952 this.m10 = y;
30953 this.m20 = z;
30954 this.m30 = w;
30955 } else if (column == 1) {
30956 this.m01 = x;
30957 this.m11 = y;
30958 this.m21 = z;
30959 this.m31 = w;
30960 } else if (column == 2) {
30961 this.m02 = x;
30962 this.m12 = y;
30963 this.m22 = z;
30964 this.m32 = w;
30965 } else if (column == 3) {
30966 this.m03 = x;
30967 this.m13 = y;
30968 this.m23 = z;
30969 this.m33 = w;
30970 } else {
30971 this.err ();
30972 }}, "~N,~N,~N,~N,~N");
30973 Clazz_defineMethod (c$, "setColumnA", 
30974 function (column, v) {
30975 if (column < 3) this.setColumn33 (column, v);
30976 switch (column) {
30977 case 0:
30978 this.m30 = v[3];
30979 return;
30980 case 1:
30981 this.m31 = v[3];
30982 return;
30983 case 2:
30984 this.m32 = v[3];
30985 return;
30986 case 3:
30987 this.m03 = v[0];
30988 this.m13 = v[1];
30989 this.m23 = v[2];
30990 this.m33 = v[3];
30991 return;
30992 default:
30993 this.err ();
30994 }
30995 }, "~N,~A");
30996 Clazz_defineMethod (c$, "getColumn", 
30997 function (column, v) {
30998 if (column < 3) this.getColumn33 (column, v);
30999 switch (column) {
31000 case 0:
31001 v[3] = this.m30;
31002 return;
31003 case 1:
31004 v[3] = this.m31;
31005 return;
31006 case 2:
31007 v[3] = this.m32;
31008 return;
31009 case 3:
31010 v[0] = this.m03;
31011 v[1] = this.m13;
31012 v[2] = this.m23;
31013 v[3] = this.m33;
31014 return;
31015 default:
31016 this.err ();
31017 }
31018 }, "~N,~A");
31019 Clazz_defineMethod (c$, "sub", 
31020 function (m1) {
31021 this.sub33 (m1);
31022 this.m03 -= m1.m03;
31023 this.m13 -= m1.m13;
31024 this.m23 -= m1.m23;
31025 this.m30 -= m1.m30;
31026 this.m31 -= m1.m31;
31027 this.m32 -= m1.m32;
31028 this.m33 -= m1.m33;
31029 }, "JU.M4");
31030 Clazz_defineMethod (c$, "transpose", 
31031 function () {
31032 this.transpose33 ();
31033 var tmp = this.m03;
31034 this.m03 = this.m30;
31035 this.m30 = tmp;
31036 tmp = this.m13;
31037 this.m13 = this.m31;
31038 this.m31 = tmp;
31039 tmp = this.m23;
31040 this.m23 = this.m32;
31041 this.m32 = tmp;
31042 });
31043 Clazz_defineMethod (c$, "invert", 
31044 function () {
31045 var s = this.determinant4 ();
31046 if (s == 0.0) return this;
31047 s = 1 / s;
31048 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));
31049 this.scale (s);
31050 return this;
31051 });
31052 Clazz_defineMethod (c$, "set", 
31053  function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {
31054 this.m00 = m00;
31055 this.m01 = m01;
31056 this.m02 = m02;
31057 this.m03 = m03;
31058 this.m10 = m10;
31059 this.m11 = m11;
31060 this.m12 = m12;
31061 this.m13 = m13;
31062 this.m20 = m20;
31063 this.m21 = m21;
31064 this.m22 = m22;
31065 this.m23 = m23;
31066 this.m30 = m30;
31067 this.m31 = m31;
31068 this.m32 = m32;
31069 this.m33 = m33;
31070 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
31071 Clazz_defineMethod (c$, "determinant4", 
31072 function () {
31073 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);
31074 });
31075 Clazz_defineMethod (c$, "scale", 
31076  function (scalar) {
31077 this.mul33 (scalar);
31078 this.m03 *= scalar;
31079 this.m13 *= scalar;
31080 this.m23 *= scalar;
31081 this.m30 *= scalar;
31082 this.m31 *= scalar;
31083 this.m32 *= scalar;
31084 this.m33 *= scalar;
31085 }, "~N");
31086 Clazz_defineMethod (c$, "mul", 
31087 function (m1) {
31088 this.mul2 (this, m1);
31089 }, "JU.M4");
31090 Clazz_defineMethod (c$, "mul2", 
31091 function (m1, m2) {
31092 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);
31093 }, "JU.M4,JU.M4");
31094 Clazz_defineMethod (c$, "transform", 
31095 function (vec) {
31096 this.transform2 (vec, vec);
31097 }, "JU.T4");
31098 Clazz_defineMethod (c$, "transform2", 
31099 function (vec, vecOut) {
31100 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);
31101 }, "JU.T4,JU.T4");
31102 Clazz_defineMethod (c$, "rotTrans", 
31103 function (point) {
31104 this.rotTrans2 (point, point);
31105 }, "JU.T3");
31106 Clazz_defineMethod (c$, "rotTrans2", 
31107 function (point, pointOut) {
31108 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);
31109 return pointOut;
31110 }, "JU.T3,JU.T3");
31111 Clazz_defineMethod (c$, "setAsXYRotation", 
31112 function (angle) {
31113 this.setIdentity ();
31114 var c = Math.cos (angle);
31115 var s = Math.sin (angle);
31116 this.m22 = c;
31117 this.m23 = -s;
31118 this.m32 = s;
31119 this.m33 = c;
31120 return this;
31121 }, "~N");
31122 Clazz_defineMethod (c$, "setAsYZRotation", 
31123 function (angle) {
31124 this.setIdentity ();
31125 var c = Math.cos (angle);
31126 var s = Math.sin (angle);
31127 this.m00 = c;
31128 this.m03 = -s;
31129 this.m30 = s;
31130 this.m33 = c;
31131 return this;
31132 }, "~N");
31133 Clazz_defineMethod (c$, "setAsXZRotation", 
31134 function (angle) {
31135 this.setIdentity ();
31136 var c = Math.cos (angle);
31137 var s = Math.sin (angle);
31138 this.m11 = c;
31139 this.m13 = -s;
31140 this.m31 = s;
31141 this.m33 = c;
31142 return this;
31143 }, "~N");
31144 Clazz_overrideMethod (c$, "equals", 
31145 function (o) {
31146 if (!(Clazz_instanceOf (o, JU.M4))) return false;
31147 var m = o;
31148 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);
31149 }, "~O");
31150 Clazz_overrideMethod (c$, "hashCode", 
31151 function () {
31152 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);
31153 });
31154 Clazz_overrideMethod (c$, "toString", 
31155 function () {
31156 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 + "] ]";
31157 });
31158 });
31159 Clazz_declarePackage ("JU");
31160 Clazz_load (["javajs.api.JSONEncodable"], "JU.T3", ["java.lang.Float"], function () {
31161 c$ = Clazz_decorateAsClass (function () {
31162 this.x = 0;
31163 this.y = 0;
31164 this.z = 0;
31165 Clazz_instantialize (this, arguments);
31166 }, JU, "T3", null, [javajs.api.JSONEncodable, java.io.Serializable]);
31167 Clazz_defineMethod (c$, "set", 
31168 function (x, y, z) {
31169 this.x = x;
31170 this.y = y;
31171 this.z = z;
31172 }, "~N,~N,~N");
31173 Clazz_defineMethod (c$, "setA", 
31174 function (t) {
31175 this.x = t[0];
31176 this.y = t[1];
31177 this.z = t[2];
31178 }, "~A");
31179 Clazz_defineMethod (c$, "setT", 
31180 function (t1) {
31181 this.x = t1.x;
31182 this.y = t1.y;
31183 this.z = t1.z;
31184 }, "JU.T3");
31185 Clazz_defineMethod (c$, "add2", 
31186 function (t1, t2) {
31187 this.x = t1.x + t2.x;
31188 this.y = t1.y + t2.y;
31189 this.z = t1.z + t2.z;
31190 }, "JU.T3,JU.T3");
31191 Clazz_defineMethod (c$, "add", 
31192 function (t1) {
31193 this.x += t1.x;
31194 this.y += t1.y;
31195 this.z += t1.z;
31196 }, "JU.T3");
31197 Clazz_defineMethod (c$, "distanceSquared", 
31198 function (p1) {
31199 var dx = this.x - p1.x;
31200 var dy = this.y - p1.y;
31201 var dz = this.z - p1.z;
31202 return (dx * dx + dy * dy + dz * dz);
31203 }, "JU.T3");
31204 Clazz_defineMethod (c$, "distance", 
31205 function (p1) {
31206 return Math.sqrt (this.distanceSquared (p1));
31207 }, "JU.T3");
31208 Clazz_defineMethod (c$, "sub2", 
31209 function (t1, t2) {
31210 this.x = t1.x - t2.x;
31211 this.y = t1.y - t2.y;
31212 this.z = t1.z - t2.z;
31213 }, "JU.T3,JU.T3");
31214 Clazz_defineMethod (c$, "sub", 
31215 function (t1) {
31216 this.x -= t1.x;
31217 this.y -= t1.y;
31218 this.z -= t1.z;
31219 }, "JU.T3");
31220 Clazz_defineMethod (c$, "scale", 
31221 function (s) {
31222 this.x *= s;
31223 this.y *= s;
31224 this.z *= s;
31225 }, "~N");
31226 Clazz_defineMethod (c$, "add3", 
31227 function (a, b, c) {
31228 this.x += a;
31229 this.y += b;
31230 this.z += c;
31231 }, "~N,~N,~N");
31232 Clazz_defineMethod (c$, "scaleT", 
31233 function (p) {
31234 this.x *= p.x;
31235 this.y *= p.y;
31236 this.z *= p.z;
31237 }, "JU.T3");
31238 Clazz_defineMethod (c$, "scaleAdd2", 
31239 function (s, t1, t2) {
31240 this.x = s * t1.x + t2.x;
31241 this.y = s * t1.y + t2.y;
31242 this.z = s * t1.z + t2.z;
31243 }, "~N,JU.T3,JU.T3");
31244 Clazz_defineMethod (c$, "ave", 
31245 function (a, b) {
31246 this.x = (a.x + b.x) / 2;
31247 this.y = (a.y + b.y) / 2;
31248 this.z = (a.z + b.z) / 2;
31249 }, "JU.T3,JU.T3");
31250 Clazz_defineMethod (c$, "dot", 
31251 function (v) {
31252 return this.x * v.x + this.y * v.y + this.z * v.z;
31253 }, "JU.T3");
31254 Clazz_defineMethod (c$, "lengthSquared", 
31255 function () {
31256 return this.x * this.x + this.y * this.y + this.z * this.z;
31257 });
31258 Clazz_defineMethod (c$, "length", 
31259 function () {
31260 return Math.sqrt (this.lengthSquared ());
31261 });
31262 Clazz_defineMethod (c$, "normalize", 
31263 function () {
31264 var d = this.length ();
31265 this.x /= d;
31266 this.y /= d;
31267 this.z /= d;
31268 });
31269 Clazz_defineMethod (c$, "cross", 
31270 function (v1, v2) {
31271 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);
31272 }, "JU.T3,JU.T3");
31273 Clazz_overrideMethod (c$, "hashCode", 
31274 function () {
31275 var bits = 1;
31276 bits = 31 * bits + JU.T3.floatToIntBits0 (this.x);
31277 bits = 31 * bits + JU.T3.floatToIntBits0 (this.y);
31278 bits = 31 * bits + JU.T3.floatToIntBits0 (this.z);
31279 return (bits ^ (bits >> 32));
31280 });
31281 c$.floatToIntBits0 = Clazz_defineMethod (c$, "floatToIntBits0", 
31282 function (f) {
31283 return (f == 0 ? 0 : Float.floatToIntBits (f));
31284 }, "~N");
31285 Clazz_overrideMethod (c$, "equals", 
31286 function (t1) {
31287 if (!(Clazz_instanceOf (t1, JU.T3))) return false;
31288 var t2 = t1;
31289 return (this.x == t2.x && this.y == t2.y && this.z == t2.z);
31290 }, "~O");
31291 Clazz_overrideMethod (c$, "toString", 
31292 function () {
31293 return "{" + this.x + ", " + this.y + ", " + this.z + "}";
31294 });
31295 Clazz_overrideMethod (c$, "toJSON", 
31296 function () {
31297 return "[" + this.x + "," + this.y + "," + this.z + "]";
31298 });
31299 });
31300 Clazz_declarePackage ("javax.swing");
31301 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 () {
31302 c$ = Clazz_decorateAsClass (function () {
31303 this.windowDecorationStyle = 0;
31304 this.menuBar = null;
31305 this.contentPane = null;
31306 this.layeredPane = null;
31307 this.glassPane = null;
31308 this.defaultButton = null;
31309 this.defaultPressAction = null;
31310 this.defaultReleaseAction = null;
31311 this.useTrueDoubleBuffering = true;
31312 if (!Clazz_isClassDefined ("javax.swing.JRootPane.RootLayout")) {
31313 javax.swing.JRootPane.$JRootPane$RootLayout$ ();
31314 }
31315 Clazz_instantialize (this, arguments);
31316 }, javax.swing, "JRootPane", javax.swing.JComponent);
31317 Clazz_makeConstructor (c$, 
31318 function () {
31319 Clazz_superConstructor (this, javax.swing.JRootPane, []);
31320 var appletName = jssun.awt.AppContext.getAppContext ().getThreadGroup ().getName ();
31321 this.setName (appletName + ".JRootPane");
31322 this.setGlassPane (this.createGlassPane ());
31323 this.setLayeredPane (this.createLayeredPane ());
31324 this.setContentPane (this.createContentPane ());
31325 this.setLayout (this.createRootLayout ());
31326 this.updateUI ();
31327 });
31328 Clazz_overrideMethod (c$, "setDoubleBuffered", 
31329 function (aFlag) {
31330 }, "~B");
31331 Clazz_defineMethod (c$, "getWindowDecorationStyle", 
31332 function () {
31333 return this.windowDecorationStyle;
31334 });
31335 Clazz_defineMethod (c$, "setWindowDecorationStyle", 
31336 function (windowDecorationStyle) {
31337 if (windowDecorationStyle < 0 || windowDecorationStyle > 8) {
31338 throw  new IllegalArgumentException ("Invalid decoration style");
31339 }var oldWindowDecorationStyle = this.getWindowDecorationStyle ();
31340 this.windowDecorationStyle = windowDecorationStyle;
31341 this.firePropertyChangeInt ("windowDecorationStyle", oldWindowDecorationStyle, windowDecorationStyle);
31342 }, "~N");
31343 Clazz_overrideMethod (c$, "getUI", 
31344 function () {
31345 return this.ui;
31346 });
31347 Clazz_overrideMethod (c$, "updateUI", 
31348 function () {
31349 this.setUI (javax.swing.UIManager.getUI (this));
31350 });
31351 Clazz_overrideMethod (c$, "getUIClassID", 
31352 function () {
31353 return "RootPaneUI";
31354 });
31355 Clazz_defineMethod (c$, "createLayeredPane", 
31356 function () {
31357 var p =  new javax.swing.JLayeredPane ();
31358 p.setName (this.getName () + ".layeredPane");
31359 return p;
31360 });
31361 Clazz_defineMethod (c$, "createContentPane", 
31362 function () {
31363 var c =  new javax.swing.JPanel ();
31364 c.setName (this.getName () + ".contentPane");
31365 c.setLayout (((Clazz_isClassDefined ("javax.swing.JRootPane$1") ? 0 : javax.swing.JRootPane.$JRootPane$1$ ()), Clazz_innerTypeInstance (javax.swing.JRootPane$1, this, null)));
31366 return c;
31367 });
31368 Clazz_defineMethod (c$, "createGlassPane", 
31369 function () {
31370 var c =  new javax.swing.JPanel ();
31371 c.setName (this.getName () + ".glassPane");
31372 c.setVisible (false);
31373 (c).setOpaque (false);
31374 return c;
31375 });
31376 Clazz_defineMethod (c$, "createRootLayout", 
31377 function () {
31378 return Clazz_innerTypeInstance (javax.swing.JRootPane.RootLayout, this, null);
31379 });
31380 Clazz_defineMethod (c$, "setJMenuBar", 
31381 function (menu) {
31382 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31383 this.menuBar = menu;
31384 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31385 }, "javax.swing.JMenuBar");
31386 Clazz_defineMethod (c$, "setMenuBar", 
31387 function (menu) {
31388 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31389 this.menuBar = menu;
31390 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31391 }, "javax.swing.JMenuBar");
31392 Clazz_defineMethod (c$, "getJMenuBar", 
31393 function () {
31394 return this.menuBar;
31395 });
31396 Clazz_defineMethod (c$, "getMenuBar", 
31397 function () {
31398 return this.menuBar;
31399 });
31400 Clazz_defineMethod (c$, "setContentPane", 
31401 function (content) {
31402 if (content == null) throw  new java.awt.IllegalComponentStateException ("contentPane cannot be set to null.");
31403 if (this.contentPane != null && this.contentPane.getParent () === this.layeredPane) this.layeredPane.remove (this.contentPane);
31404 this.contentPane = content;
31405 this.layeredPane.add (this.contentPane, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31406 }, "java.awt.Container");
31407 Clazz_defineMethod (c$, "getContentPane", 
31408 function () {
31409 return this.contentPane;
31410 });
31411 Clazz_defineMethod (c$, "setLayeredPane", 
31412 function (layered) {
31413 if (layered == null) throw  new java.awt.IllegalComponentStateException ("layeredPane cannot be set to null.");
31414 if (this.layeredPane != null && this.layeredPane.getParent () === this) this.remove (this.layeredPane);
31415 this.layeredPane = layered;
31416 this.add (this.layeredPane, -1);
31417 }, "javax.swing.JLayeredPane");
31418 Clazz_defineMethod (c$, "getLayeredPane", 
31419 function () {
31420 return this.layeredPane;
31421 });
31422 Clazz_defineMethod (c$, "setGlassPane", 
31423 function (glass) {
31424 if (glass == null) {
31425 throw  new NullPointerException ("glassPane cannot be set to null.");
31426 }var visible = false;
31427 if (this.glassPane != null && this.glassPane.getParent () === this) {
31428 this.remove (this.glassPane);
31429 visible = this.glassPane.isVisible ();
31430 }glass.setVisible (visible);
31431 this.glassPane = glass;
31432 this.add (this.glassPane, 0);
31433 if (visible) {
31434 this.repaint ();
31435 }}, "java.awt.Component");
31436 Clazz_defineMethod (c$, "getGlassPane", 
31437 function () {
31438 return this.glassPane;
31439 });
31440 Clazz_overrideMethod (c$, "isValidateRoot", 
31441 function () {
31442 return true;
31443 });
31444 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
31445 function () {
31446 return !this.glassPane.isVisible ();
31447 });
31448 Clazz_defineMethod (c$, "addNotify", 
31449 function () {
31450 Clazz_superCall (this, javax.swing.JRootPane, "addNotify", []);
31451 this.enableEvents (8);
31452 });
31453 Clazz_defineMethod (c$, "setDefaultButton", 
31454 function (defaultButton) {
31455 var oldDefault = this.defaultButton;
31456 if (oldDefault !== defaultButton) {
31457 this.defaultButton = defaultButton;
31458 if (oldDefault != null) {
31459 oldDefault.repaint ();
31460 }if (defaultButton != null) {
31461 defaultButton.repaint ();
31462 }}this.firePropertyChangeObject ("defaultButton", oldDefault, defaultButton);
31463 }, "javax.swing.JButton");
31464 Clazz_defineMethod (c$, "getDefaultButton", 
31465 function () {
31466 return this.defaultButton;
31467 });
31468 Clazz_defineMethod (c$, "setUseTrueDoubleBuffering", 
31469 function (useTrueDoubleBuffering) {
31470 this.useTrueDoubleBuffering = useTrueDoubleBuffering;
31471 }, "~B");
31472 Clazz_defineMethod (c$, "getUseTrueDoubleBuffering", 
31473 function () {
31474 return this.useTrueDoubleBuffering;
31475 });
31476 Clazz_defineMethod (c$, "disableTrueDoubleBuffering", 
31477 function () {
31478 });
31479 Clazz_overrideMethod (c$, "addImpl", 
31480 function (comp, constraints, index) {
31481 this.addImplSAEM (comp, constraints, index);
31482 if (this.glassPane != null && this.glassPane.getParent () === this && this.getComponent (0) !== this.glassPane) {
31483 this.add (this.glassPane, 0);
31484 }return comp;
31485 }, "java.awt.Component,~O,~N");
31486 c$.$JRootPane$RootLayout$ = function () {
31487 Clazz_pu$h(self.c$);
31488 c$ = Clazz_decorateAsClass (function () {
31489 Clazz_prepareCallback (this, arguments);
31490 Clazz_instantialize (this, arguments);
31491 }, javax.swing.JRootPane, "RootLayout", null, java.awt.LayoutManager2);
31492 Clazz_overrideMethod (c$, "preferredLayoutSize", 
31493 function (a) {
31494 var b;
31495 var c;
31496 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31497 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31498 b = this.b$["javax.swing.JRootPane"].contentPane.getPreferredSize ();
31499 } else {
31500 b = a.getSize ();
31501 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31502 c = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31503 } else {
31504 c =  new java.awt.Dimension (0, 0);
31505 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31506 }, "java.awt.Container");
31507 Clazz_overrideMethod (c$, "minimumLayoutSize", 
31508 function (a) {
31509 var b;
31510 var c;
31511 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31512 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31513 b = this.b$["javax.swing.JRootPane"].contentPane.getMinimumSize ();
31514 } else {
31515 b = a.getSize ();
31516 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31517 c = this.b$["javax.swing.JRootPane"].menuBar.getMinimumSize ();
31518 } else {
31519 c =  new java.awt.Dimension (0, 0);
31520 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31521 }, "java.awt.Container");
31522 Clazz_overrideMethod (c$, "maximumLayoutSize", 
31523 function (a) {
31524 var b;
31525 var c;
31526 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31527 if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31528 c = this.b$["javax.swing.JRootPane"].menuBar.getMaximumSize ();
31529 } else {
31530 c =  new java.awt.Dimension (0, 0);
31531 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31532 b = this.b$["javax.swing.JRootPane"].contentPane.getMaximumSize ();
31533 } else {
31534 b =  new java.awt.Dimension (2147483647, 2147483647 - d.top - d.bottom - c.height - 1);
31535 }return  new java.awt.Dimension (Math.min (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31536 }, "java.awt.Container");
31537 Clazz_overrideMethod (c$, "layoutContainer", 
31538 function (a) {
31539 var b = a.getBounds ();
31540 var c = this.b$["javax.swing.JRootPane"].getInsets ();
31541 var d = 0;
31542 var e = b.width - c.right - c.left;
31543 var f = b.height - c.top - c.bottom;
31544 if (this.b$["javax.swing.JRootPane"].layeredPane != null) {
31545 this.b$["javax.swing.JRootPane"].layeredPane.setBounds (c.left, c.top, e, f);
31546 }if (this.b$["javax.swing.JRootPane"].glassPane != null) {
31547 this.b$["javax.swing.JRootPane"].glassPane.setBounds (c.left, c.top, e, f);
31548 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31549 var g = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31550 this.b$["javax.swing.JRootPane"].menuBar.setBounds (0, 0, e, g.height);
31551 d += g.height;
31552 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31553 this.b$["javax.swing.JRootPane"].contentPane.setBounds (0, d, e, f - d);
31554 }}, "java.awt.Container");
31555 Clazz_defineMethod (c$, "addLayoutComponent", 
31556 function (a, b) {
31557 }, "~S,java.awt.Component");
31558 Clazz_overrideMethod (c$, "removeLayoutComponent", 
31559 function (a) {
31560 }, "java.awt.Component");
31561 Clazz_defineMethod (c$, "addLayoutComponent", 
31562 function (a, b) {
31563 }, "java.awt.Component,~O");
31564 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
31565 function (a) {
31566 return 0.0;
31567 }, "java.awt.Container");
31568 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
31569 function (a) {
31570 return 0.0;
31571 }, "java.awt.Container");
31572 Clazz_overrideMethod (c$, "invalidateLayout", 
31573 function (a) {
31574 }, "java.awt.Container");
31575 c$ = Clazz_p0p ();
31576 };
31577 c$.$JRootPane$1$ = function () {
31578 Clazz_pu$h(self.c$);
31579 c$ = Clazz_declareAnonymous (javax.swing, "JRootPane$1", java.awt.BorderLayout);
31580 Clazz_defineMethod (c$, "addLayoutComponent", 
31581 function (comp, constraints) {
31582 if (constraints == null) {
31583 constraints = "Center";
31584 }Clazz_superCall (this, javax.swing.JRootPane$1, "addLayoutComponent", [comp, constraints]);
31585 }, "java.awt.Component,~O");
31586 c$ = Clazz_p0p ();
31587 };
31588 Clazz_pu$h(self.c$);
31589 c$ = Clazz_decorateAsClass (function () {
31590 this.owner = null;
31591 this.root = null;
31592 this.press = false;
31593 Clazz_instantialize (this, arguments);
31594 }, javax.swing.JRootPane, "DefaultAction", javax.swing.AbstractAction);
31595 Clazz_makeConstructor (c$, 
31596 function (a, b) {
31597 Clazz_superConstructor (this, javax.swing.JRootPane.DefaultAction, []);
31598 this.root = a;
31599 this.press = b;
31600 }, "javax.swing.JRootPane,~B");
31601 Clazz_defineMethod (c$, "setOwner", 
31602 function (a) {
31603 this.owner = a;
31604 }, "javax.swing.JButton");
31605 Clazz_overrideMethod (c$, "actionPerformed", 
31606 function (a) {
31607 if (this.owner != null && javax.swing.SwingUtilities.getRootPane (this.owner) === this.root) {
31608 var b = this.owner.getModel ();
31609 if (this.press) {
31610 b.setArmed (true);
31611 b.setPressed (true);
31612 } else {
31613 b.setPressed (false);
31614 }}}, "java.awt.event.ActionEvent");
31615 Clazz_overrideMethod (c$, "isEnabled", 
31616 function () {
31617 return this.owner.getModel ().isEnabled ();
31618 });
31619 c$ = Clazz_p0p ();
31620 Clazz_defineStatics (c$,
31621 "$uiClassID", "RootPaneUI",
31622 "NONE", 0,
31623 "FRAME", 1,
31624 "PLAIN_DIALOG", 2,
31625 "INFORMATION_DIALOG", 3,
31626 "ERROR_DIALOG", 4,
31627 "COLOR_CHOOSER_DIALOG", 5,
31628 "FILE_CHOOSER_DIALOG", 6,
31629 "QUESTION_DIALOG", 7,
31630 "WARNING_DIALOG", 8);
31631 });
31632 Clazz_declarePackage ("javax.swing");
31633 Clazz_load (["javax.swing.AbstractButton", "$.DefaultButtonModel"], "javax.swing.JToggleButton", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.InputEvent", "$.ItemEvent", "javax.swing.UIManager"], function () {
31634 c$ = Clazz_declareType (javax.swing, "JToggleButton", javax.swing.AbstractButton);
31635 Clazz_makeConstructor (c$, 
31636 function () {
31637 this.construct (null, null, false);
31638 });
31639 Clazz_makeConstructor (c$, 
31640 function (icon) {
31641 this.construct (null, icon, false);
31642 }, "javax.swing.Icon");
31643 Clazz_makeConstructor (c$, 
31644 function (icon, selected) {
31645 this.construct (null, icon, selected);
31646 }, "javax.swing.Icon,~B");
31647 Clazz_makeConstructor (c$, 
31648 function (text) {
31649 this.construct (text, null, false);
31650 }, "~S");
31651 Clazz_makeConstructor (c$, 
31652 function (text, selected) {
31653 this.construct (text, null, selected);
31654 }, "~S,~B");
31655 Clazz_makeConstructor (c$, 
31656 function (a) {
31657 this.construct ();
31658 this.setAction (a);
31659 }, "javax.swing.Action");
31660 Clazz_makeConstructor (c$, 
31661 function (text, icon) {
31662 this.construct (text, icon, false);
31663 }, "~S,javax.swing.Icon");
31664 Clazz_makeConstructor (c$, 
31665 function (text, icon, selected) {
31666 Clazz_superConstructor (this, javax.swing.JToggleButton, []);
31667 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
31668 this.model.setSelected (selected);
31669 this.init (text, icon);
31670 }, "~S,javax.swing.Icon,~B");
31671 Clazz_overrideMethod (c$, "updateUI", 
31672 function () {
31673 this.setUI (javax.swing.UIManager.getUI (this));
31674 });
31675 Clazz_overrideMethod (c$, "getUIClassID", 
31676 function () {
31677 return "ToggleButtonUI";
31678 });
31679 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
31680 function () {
31681 return true;
31682 });
31683 Clazz_pu$h(self.c$);
31684 c$ = Clazz_declareType (javax.swing.JToggleButton, "ToggleButtonModel", javax.swing.DefaultButtonModel);
31685 Clazz_makeConstructor (c$, 
31686 function () {
31687 Clazz_superConstructor (this, javax.swing.JToggleButton.ToggleButtonModel, []);
31688 });
31689 Clazz_overrideMethod (c$, "isSelected", 
31690 function () {
31691 return (this.stateMask & 2) != 0;
31692 });
31693 Clazz_overrideMethod (c$, "setSelected", 
31694 function (a) {
31695 var b = this.getGroup ();
31696 if (b != null) {
31697 b.setSelected (this, a);
31698 a = b.isSelected (this);
31699 }if (this.isSelected () == a) {
31700 return;
31701 }if (a) {
31702 this.stateMask |= 2;
31703 } else {
31704 this.stateMask &= -3;
31705 }this.fireStateChanged ();
31706 this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, this.isSelected () ? 1 : 2));
31707 }, "~B");
31708 Clazz_overrideMethod (c$, "setPressed", 
31709 function (a) {
31710 if ((this.isPressed () == a) || !this.isEnabled ()) {
31711 return;
31712 }if (a == false && this.isArmed ()) {
31713 this.setSelected (!this.isSelected ());
31714 }if (a) {
31715 this.stateMask |= 4;
31716 } else {
31717 this.stateMask &= -5;
31718 }this.fireStateChanged ();
31719 if (!this.isPressed () && this.isArmed ()) {
31720 var b = 0;
31721 var c = java.awt.EventQueue.getCurrentEvent ();
31722 if (Clazz_instanceOf (c, java.awt.event.InputEvent)) {
31723 b = (c).getModifiers ();
31724 } else if (Clazz_instanceOf (c, java.awt.event.ActionEvent)) {
31725 b = (c).getModifiers ();
31726 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), b));
31727 }}, "~B");
31728 c$ = Clazz_p0p ();
31729 Clazz_defineStatics (c$,
31730 "$uiClassID", "ToggleButtonUI");
31731 });
31732 Clazz_declarePackage ("javax.swing");
31733 Clazz_load (["java.awt.ItemSelectable"], "javax.swing.ButtonModel", null, function () {
31734 Clazz_declareInterface (javax.swing, "ButtonModel", java.awt.ItemSelectable);
31735 });
31736 Clazz_declarePackage ("javax.swing");
31737 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JRadioButton", ["javax.swing.UIManager"], function () {
31738 c$ = Clazz_declareType (javax.swing, "JRadioButton", javax.swing.JToggleButton);
31739 Clazz_makeConstructor (c$, 
31740 function () {
31741 this.construct (null, null, false);
31742 });
31743 Clazz_makeConstructor (c$, 
31744 function (icon) {
31745 this.construct (null, icon, false);
31746 }, "javax.swing.Icon");
31747 Clazz_makeConstructor (c$, 
31748 function (a) {
31749 this.construct ();
31750 this.setAction (a);
31751 }, "javax.swing.Action");
31752 Clazz_makeConstructor (c$, 
31753 function (icon, selected) {
31754 this.construct (null, icon, selected);
31755 }, "javax.swing.Icon,~B");
31756 Clazz_makeConstructor (c$, 
31757 function (text) {
31758 this.construct (text, null, false);
31759 }, "~S");
31760 Clazz_makeConstructor (c$, 
31761 function (text, selected) {
31762 this.construct (text, null, selected);
31763 }, "~S,~B");
31764 Clazz_makeConstructor (c$, 
31765 function (text, icon) {
31766 this.construct (text, icon, false);
31767 }, "~S,javax.swing.Icon");
31768 Clazz_makeConstructor (c$, 
31769 function (text, icon, selected) {
31770 Clazz_superConstructor (this, javax.swing.JRadioButton, [text, icon, selected]);
31771 this.setBorderPainted (false);
31772 this.setHorizontalAlignment (10);
31773 }, "~S,javax.swing.Icon,~B");
31774 Clazz_overrideMethod (c$, "updateUI", 
31775 function () {
31776 this.setUI (javax.swing.UIManager.getUI (this));
31777 });
31778 Clazz_overrideMethod (c$, "getUIClassID", 
31779 function () {
31780 return "RadioButtonUI";
31781 });
31782 Clazz_overrideMethod (c$, "setIconFromAction", 
31783 function (a) {
31784 }, "javax.swing.Action");
31785 Clazz_defineStatics (c$,
31786 "$$uiClassID", "RadioButtonUI");
31787 });
31788 Clazz_declarePackage ("javax.swing");
31789 Clazz_load (["java.applet.Applet", "javax.swing.RootPaneContainer"], "javax.swing.JApplet", ["java.awt.BorderLayout", "$.Color", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
31790 c$ = Clazz_decorateAsClass (function () {
31791 this.rootPane = null;
31792 this.rootPaneCheckingEnabled = false;
31793 this.transferHandler = null;
31794 Clazz_instantialize (this, arguments);
31795 }, javax.swing, "JApplet", java.applet.Applet, javax.swing.RootPaneContainer);
31796 Clazz_makeConstructor (c$, 
31797 function () {
31798 Clazz_superConstructor (this, javax.swing.JApplet, []);
31799 this.setJApplet ();
31800 });
31801 Clazz_defineMethod (c$, "setJApplet", 
31802  function () {
31803 this.setPanel ();
31804 this.setForeground (java.awt.Color.black);
31805 this.setBackground (java.awt.Color.white);
31806 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
31807 this.setLayout ( new java.awt.BorderLayout ());
31808 this.setRootPane (this.createRootPane ());
31809 this.setRootPaneCheckingEnabled (true);
31810 this.setFocusTraversalPolicyProvider (true);
31811 this.enableEvents (8);
31812 });
31813 Clazz_defineMethod (c$, "createRootPane", 
31814 function () {
31815 var rp =  new javax.swing.JRootPane ();
31816 rp.setOpaque (true);
31817 return rp;
31818 });
31819 Clazz_defineMethod (c$, "setTransferHandler", 
31820 function (newHandler) {
31821 var oldHandler = this.transferHandler;
31822 this.transferHandler = newHandler;
31823 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
31824 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
31825 }, "javax.swing.TransferHandler");
31826 Clazz_defineMethod (c$, "getTransferHandler", 
31827 function () {
31828 return this.transferHandler;
31829 });
31830 Clazz_defineMethod (c$, "paint", 
31831 function (g) {
31832 this.getContentPane ().paint (g);
31833 }, "java.awt.Graphics");
31834 Clazz_overrideMethod (c$, "update", 
31835 function (g) {
31836 this.paint (g);
31837 }, "java.awt.Graphics");
31838 Clazz_defineMethod (c$, "setJMenuBar", 
31839 function (menuBar) {
31840 this.getRootPane ().setMenuBar (menuBar);
31841 }, "javax.swing.JMenuBar");
31842 Clazz_defineMethod (c$, "getJMenuBar", 
31843 function () {
31844 return this.getRootPane ().getMenuBar ();
31845 });
31846 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
31847 function () {
31848 return this.rootPaneCheckingEnabled;
31849 });
31850 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
31851 function (enabled) {
31852 this.rootPaneCheckingEnabled = enabled;
31853 }, "~B");
31854 Clazz_overrideMethod (c$, "addImpl", 
31855 function (comp, constraints, index) {
31856 if (this.isRootPaneCheckingEnabled ()) {
31857 return this.getContentPane ().add (comp, constraints, index);
31858 }return this.addImplSAEM (comp, constraints, index);
31859 }, "java.awt.Component,~O,~N");
31860 Clazz_defineMethod (c$, "remove", 
31861 function (comp) {
31862 if (comp === this.rootPane) {
31863 this.removeChild (comp);
31864 } else {
31865 this.getContentPane ().removeChild (comp);
31866 }}, "java.awt.Component");
31867 Clazz_defineMethod (c$, "setLayout", 
31868 function (manager) {
31869 if (this.isRootPaneCheckingEnabled ()) {
31870 this.getContentPane ().setLayout (manager);
31871 } else {
31872 Clazz_superCall (this, javax.swing.JApplet, "setLayout", [manager]);
31873 }}, "java.awt.LayoutManager");
31874 Clazz_overrideMethod (c$, "getRootPane", 
31875 function () {
31876 return this.rootPane;
31877 });
31878 Clazz_defineMethod (c$, "setRootPane", 
31879 function (root) {
31880 if (this.rootPane != null) {
31881 this.remove (this.rootPane);
31882 }this.rootPane = root;
31883 if (this.rootPane != null) {
31884 var checkingEnabled = this.isRootPaneCheckingEnabled ();
31885 try {
31886 this.setRootPaneCheckingEnabled (false);
31887 this.add (this.rootPane, "Center");
31888 } finally {
31889 this.setRootPaneCheckingEnabled (checkingEnabled);
31890 }
31891 }}, "javax.swing.JRootPane");
31892 Clazz_overrideMethod (c$, "getContentPane", 
31893 function () {
31894 return this.getRootPane ().getContentPane ();
31895 });
31896 Clazz_overrideMethod (c$, "setContentPane", 
31897 function (contentPane) {
31898 this.getRootPane ().setContentPane (contentPane);
31899 }, "java.awt.Container");
31900 Clazz_overrideMethod (c$, "getLayeredPane", 
31901 function () {
31902 return this.getRootPane ().getLayeredPane ();
31903 });
31904 Clazz_overrideMethod (c$, "setLayeredPane", 
31905 function (layeredPane) {
31906 this.getRootPane ().setLayeredPane (layeredPane);
31907 }, "javax.swing.JLayeredPane");
31908 Clazz_overrideMethod (c$, "getGlassPane", 
31909 function () {
31910 return this.getRootPane ().getGlassPane ();
31911 });
31912 Clazz_overrideMethod (c$, "setGlassPane", 
31913 function (glassPane) {
31914 this.getRootPane ().setGlassPane (glassPane);
31915 }, "java.awt.Component");
31916 Clazz_defineMethod (c$, "getGraphics", 
31917 function () {
31918 javax.swing.JComponent.getGraphicsInvoked (this);
31919 return Clazz_superCall (this, javax.swing.JApplet, "getGraphics", []);
31920 });
31921 Clazz_defineMethod (c$, "repaint", 
31922 function (time, x, y, width, height) {
31923 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
31924 System.out.println ("repaintNow " + this);
31925 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
31926 } else {
31927 Clazz_superCall (this, javax.swing.JApplet, "repaint", [time, x, y, width, height]);
31928 }}, "~N,~N,~N,~N,~N");
31929 Clazz_defineMethod (c$, "repaintNow", 
31930 function () {
31931 this.repaint (100, 0, 0, this.getWidth (), this.getHeight ());
31932 });
31933 Clazz_defineMethod (c$, "paramString", 
31934 function () {
31935 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
31936 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
31937 return Clazz_superCall (this, javax.swing.JApplet, "paramString", []) + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
31938 });
31939 });
31940 Clazz_declarePackage ("java.awt");
31941 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 () {
31942 c$ = Clazz_decorateAsClass (function () {
31943 this.queues = null;
31944 this.nextQueue = null;
31945 this.previousQueue = null;
31946 this.dispatchThread = null;
31947 this.threadGroup = null;
31948 this.mostRecentEventTime = 0;
31949 this.currentEvent = null;
31950 this.waitForID = 0;
31951 this.name = null;
31952 Clazz_instantialize (this, arguments);
31953 }, java.awt, "EventQueue");
31954 Clazz_prepareFields (c$, function () {
31955 this.queues =  new Array (4);
31956 this.threadGroup = Thread.currentThread ().getThreadGroup ();
31957 this.mostRecentEventTime = System.currentTimeMillis ();
31958 this.name = "AWT-EventQueue-" + java.awt.EventQueue.nextThreadNum ();
31959 });
31960 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
31961  function () {
31962 return java.awt.EventQueue.threadInitNumber++;
31963 });
31964 c$.noEvents = Clazz_defineMethod (c$, "noEvents", 
31965 function (eventQueue) {
31966 return eventQueue.noEvents ();
31967 }, "java.awt.EventQueue");
31968 c$.getNextQueue = Clazz_defineMethod (c$, "getNextQueue", 
31969 function (eventQueue) {
31970 return eventQueue.nextQueue;
31971 }, "java.awt.EventQueue");
31972 c$.removeSourceEvents = Clazz_defineMethod (c$, "removeSourceEvents", 
31973 function (eventQueue, source, removeAllEvents) {
31974 eventQueue.removeSourceEvents (source, removeAllEvents);
31975 }, "java.awt.EventQueue,~O,~B");
31976 Clazz_makeConstructor (c$, 
31977 function () {
31978 for (var i = 0; i < 4; i++) {
31979 this.queues[i] =  new java.awt.Queue ();
31980 }
31981 });
31982 Clazz_defineMethod (c$, "postEvent", 
31983 function (event) {
31984 jssun.awt.SunToolkit.flushPendingEvents ();
31985 this.postEventPrivate (event);
31986 }, "java.awt.AWTEvent");
31987 Clazz_defineMethod (c$, "postEventPrivate", 
31988 function (theEvent) {
31989 theEvent.isPosted = true;
31990 {
31991 if (this.dispatchThread == null && this.nextQueue == null) {
31992 if (theEvent.getSource () === jssun.awt.AWTAutoShutdown.getInstance ()) {
31993 return;
31994 } else {
31995 this.initDispatchThread ();
31996 }}if (this.nextQueue != null) {
31997 this.nextQueue.postEventPrivate (theEvent);
31998 return;
31999 }this.postEventNow (theEvent, java.awt.EventQueue.getPriority (theEvent));
32000 }}, "java.awt.AWTEvent");
32001 c$.getPriority = Clazz_defineMethod (c$, "getPriority", 
32002  function (theEvent) {
32003 if (Clazz_instanceOf (theEvent, jssun.awt.PeerEvent)) {
32004 var flags = (theEvent).getFlags ();
32005 if ((flags & 2) != 0) return 3;
32006 if ((flags & 1) != 0) return 2;
32007 if ((flags & 4) != 0) return 0;
32008 }switch (theEvent.getID ()) {
32009 case 1201:
32010 case 800:
32011 case 801:
32012 return 0;
32013 default:
32014 return 1;
32015 }
32016 }, "java.awt.AWTEvent");
32017 Clazz_defineMethod (c$, "postEventNow", 
32018  function (theEvent, priority) {
32019 if (this.coalesceEvent (theEvent, priority)) {
32020 return;
32021 }var newItem =  new java.awt.EventQueueItem (theEvent);
32022 this.cacheEQItem (newItem);
32023 if (this.queues[priority].head == null) {
32024 var shouldNotify = this.noEvents ();
32025 this.queues[priority].head = this.queues[priority].tail = newItem;
32026 if (shouldNotify) {
32027 if (theEvent.getSource () !== jssun.awt.AWTAutoShutdown.getInstance ()) {
32028 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (this.dispatchThread);
32029 }}} else {
32030 this.queues[priority].tail.next = newItem;
32031 this.queues[priority].tail = newItem;
32032 }}, "java.awt.AWTEvent,~N");
32033 Clazz_defineMethod (c$, "coalescePaintEvent", 
32034  function (e) {
32035 var sourcePeer = (e.getSource ()).peer;
32036 if (sourcePeer != null) {
32037 sourcePeer.coalescePaintEvent (e);
32038 }var cache = (e.getSource ()).eventCache;
32039 if (cache == null) {
32040 return false;
32041 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32042 if (index != -1 && cache[index] != null) {
32043 var merged = this.mergePaintEvents (e, cache[index].event);
32044 if (merged != null) {
32045 cache[index].event = merged;
32046 return true;
32047 }}return false;
32048 }, "java.awt.event.PaintEvent");
32049 Clazz_defineMethod (c$, "mergePaintEvents", 
32050  function (a, b) {
32051 var aRect = a.getUpdateRect ();
32052 var bRect = b.getUpdateRect ();
32053 if (bRect.contains (aRect)) {
32054 return b;
32055 }if (aRect.contains (bRect)) {
32056 return a;
32057 }return null;
32058 }, "java.awt.event.PaintEvent,java.awt.event.PaintEvent");
32059 Clazz_defineMethod (c$, "coalesceMouseEvent", 
32060  function (e) {
32061 var cache = (e.getSource ()).eventCache;
32062 if (cache == null) {
32063 return false;
32064 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32065 if (index != -1 && cache[index] != null) {
32066 cache[index].event = e;
32067 return true;
32068 }return false;
32069 }, "java.awt.event.MouseEvent");
32070 Clazz_defineMethod (c$, "coalescePeerEvent", 
32071  function (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 e = e.coalesceEvents (cache[index].event);
32078 if (e != null) {
32079 cache[index].event = e;
32080 return true;
32081 } else {
32082 cache[index] = null;
32083 }}return false;
32084 }, "jssun.awt.PeerEvent");
32085 Clazz_defineMethod (c$, "coalesceOtherEvent", 
32086  function (e, priority) {
32087 var id = e.getID ();
32088 var source = e.getSource ();
32089 for (var entry = this.queues[priority].head; entry != null; entry = entry.next) {
32090 if (entry.event.getSource () === source && entry.id == id) {
32091 var coalescedEvent = source.coalesceEvents (entry.event, e);
32092 if (coalescedEvent != null) {
32093 entry.event = coalescedEvent;
32094 return true;
32095 }}}
32096 return false;
32097 }, "java.awt.AWTEvent,~N");
32098 Clazz_defineMethod (c$, "coalesceEvent", 
32099  function (e, priority) {
32100 if (!(Clazz_instanceOf (e.getSource (), java.awt.Component))) {
32101 return false;
32102 }if (Clazz_instanceOf (e, jssun.awt.PeerEvent)) {
32103 return this.coalescePeerEvent (e);
32104 }if ((e.getSource ()).isCoalescingEnabled () && this.coalesceOtherEvent (e, priority)) {
32105 return true;
32106 }if (Clazz_instanceOf (e, java.awt.event.PaintEvent)) {
32107 return this.coalescePaintEvent (e);
32108 }if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
32109 return this.coalesceMouseEvent (e);
32110 }return false;
32111 }, "java.awt.AWTEvent,~N");
32112 Clazz_defineMethod (c$, "cacheEQItem", 
32113  function (entry) {
32114 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32115 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32116 var source = entry.event.getSource ();
32117 if (source.eventCache == null) {
32118 source.eventCache =  new Array (5);
32119 }source.eventCache[index] = entry;
32120 }}, "java.awt.EventQueueItem");
32121 Clazz_defineMethod (c$, "uncacheEQItem", 
32122  function (entry) {
32123 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32124 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32125 var source = entry.event.getSource ();
32126 if (source.eventCache == null) {
32127 return;
32128 }source.eventCache[index] = null;
32129 }}, "java.awt.EventQueueItem");
32130 c$.eventToCacheIndex = Clazz_defineMethod (c$, "eventToCacheIndex", 
32131  function (e) {
32132 switch (e.getID ()) {
32133 case 800:
32134 return 0;
32135 case 801:
32136 return 1;
32137 case 503:
32138 return 2;
32139 case 506:
32140 return 3;
32141 default:
32142 return -1;
32143 }
32144 }, "java.awt.AWTEvent");
32145 Clazz_defineMethod (c$, "noEvents", 
32146  function () {
32147 for (var i = 0; i < 4; i++) {
32148 if (this.queues[i].head != null) {
32149 return false;
32150 }}
32151 return true;
32152 });
32153 Clazz_defineMethod (c$, "getNextEvent", 
32154 function () {
32155 jssun.awt.SunToolkit.flushPendingEvents ();
32156 {
32157 for (var i = 3; i >= 0; i--) {
32158 if (this.queues[i].head != null) {
32159 var entry = this.queues[i].head;
32160 this.queues[i].head = entry.next;
32161 if (entry.next == null) {
32162 this.queues[i].tail = null;
32163 }this.uncacheEQItem (entry);
32164 return entry.event;
32165 }}
32166 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this.dispatchThread);
32167 }return null;
32168 });
32169 Clazz_defineMethod (c$, "getNextEventForID", 
32170 function (id) {
32171 jssun.awt.SunToolkit.flushPendingEvents ();
32172 {
32173 for (var i = 0; i < 4; i++) {
32174 for (var entry = this.queues[i].head, prev = null; entry != null; prev = entry, entry = entry.next) {
32175 if (entry.id == id) {
32176 if (prev == null) {
32177 this.queues[i].head = entry.next;
32178 } else {
32179 prev.next = entry.next;
32180 }if (this.queues[i].tail === entry) {
32181 this.queues[i].tail = prev;
32182 }this.uncacheEQItem (entry);
32183 return entry.event;
32184 }}
32185 }
32186 this.waitForID = id;
32187 this.waitForID = 0;
32188 }return null;
32189 }, "~N");
32190 Clazz_defineMethod (c$, "peekEvent", 
32191 function () {
32192 for (var i = 3; i >= 0; i--) {
32193 if (this.queues[i].head != null) {
32194 return this.queues[i].head.event;
32195 }}
32196 return null;
32197 });
32198 Clazz_defineMethod (c$, "peekEvent", 
32199 function (id) {
32200 for (var i = 3; i >= 0; i--) {
32201 var q = this.queues[i].head;
32202 for (; q != null; q = q.next) {
32203 if (q.id == id) {
32204 return q.event;
32205 }}
32206 }
32207 return null;
32208 }, "~N");
32209 Clazz_defineMethod (c$, "dispatchEvent", 
32210 function (event) {
32211 var src = event.getSource ();
32212 this.dispatchEventImpl (event, src, false);
32213 }, "java.awt.AWTEvent");
32214 Clazz_defineMethod (c$, "dispatchEventAndWait", 
32215 function (event, src) {
32216 this.dispatchEventImpl (event, src, true);
32217 }, "java.awt.AWTEvent,~O");
32218 Clazz_defineMethod (c$, "dispatchEventImpl", 
32219  function (event, src, andWait) {
32220 event.isPosted = true;
32221 if (Clazz_instanceOf (event, java.awt.ActiveEvent)) {
32222 this.setCurrentEventAndMostRecentTimeImpl (event);
32223 swingjs.JSToolkit.dispatchEvent (event, null, andWait);
32224 } else if (Clazz_instanceOf (src, java.awt.Component)) {
32225 swingjs.JSToolkit.dispatchEvent (event, src, andWait);
32226 event.dispatched ();
32227 } else if (Clazz_instanceOf (src, jssun.awt.AWTAutoShutdown)) {
32228 if (this.noEvents ()) {
32229 this.dispatchThread.stopDispatching ();
32230 }} else {
32231 System.err.println ("unable to dispatch event: " + event);
32232 }}, "java.awt.AWTEvent,~O,~B");
32233 c$.getMostRecentEventTime = Clazz_defineMethod (c$, "getMostRecentEventTime", 
32234 function () {
32235 return 0;
32236 });
32237 Clazz_defineMethod (c$, "getMostRecentEventTimeEx", 
32238 function () {
32239 return this.mostRecentEventTime;
32240 });
32241 c$.getCurrentEvent = Clazz_defineMethod (c$, "getCurrentEvent", 
32242 function () {
32243 return java.awt.Toolkit.getEventQueue ().getCurrentEventImpl ();
32244 });
32245 Clazz_defineMethod (c$, "getCurrentEventImpl", 
32246  function () {
32247 return (swingjs.JSToolkit.isDispatchThread () ? (this.currentEvent) : null);
32248 });
32249 Clazz_defineMethod (c$, "push", 
32250 function (newEventQueue) {
32251 if (this.nextQueue != null) {
32252 this.nextQueue.push (newEventQueue);
32253 return;
32254 }{
32255 while (this.peekEvent () != null) {
32256 try {
32257 newEventQueue.postEventPrivate (this.getNextEvent ());
32258 } catch (ie) {
32259 if (Clazz_exceptionOf (ie, InterruptedException)) {
32260 } else {
32261 throw ie;
32262 }
32263 }
32264 }
32265 newEventQueue.previousQueue = this;
32266 }if (this.dispatchThread != null) {
32267 this.dispatchThread.stopDispatchingLater ();
32268 }this.nextQueue = newEventQueue;
32269 var appContext = jssun.awt.AppContext.getAppContext ();
32270 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32271 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, newEventQueue);
32272 }}, "java.awt.EventQueue");
32273 Clazz_defineMethod (c$, "pop", 
32274 function () {
32275 var prev = this.previousQueue;
32276 {
32277 {
32278 if (this.nextQueue != null) {
32279 this.nextQueue.pop ();
32280 return;
32281 }if (this.previousQueue == null) {
32282 throw  new java.util.EmptyStackException ();
32283 }this.previousQueue.nextQueue = null;
32284 while (this.peekEvent () != null) {
32285 try {
32286 this.previousQueue.postEventPrivate (this.getNextEvent ());
32287 } catch (ie) {
32288 if (Clazz_exceptionOf (ie, InterruptedException)) {
32289 } else {
32290 throw ie;
32291 }
32292 }
32293 }
32294 var appContext = jssun.awt.AppContext.getAppContext ();
32295 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32296 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, this.previousQueue);
32297 }this.previousQueue = null;
32298 }}var dt = this.dispatchThread;
32299 if (dt != null) {
32300 dt.stopDispatching ();
32301 }});
32302 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
32303 function () {
32304 return swingjs.JSToolkit.isDispatchThread ();
32305 });
32306 Clazz_defineMethod (c$, "initDispatchThread", 
32307 function () {
32308 {
32309 if (this.dispatchThread == null) {
32310 var t =  new java.awt.EventDispatchThread (this.threadGroup, this.name, this);
32311 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (t);
32312 this.dispatchThread = t;
32313 this.dispatchThread.start ();
32314 }}});
32315 Clazz_defineMethod (c$, "detachDispatchThread", 
32316 function () {
32317 this.dispatchThread = null;
32318 });
32319 Clazz_defineMethod (c$, "getDispatchThread", 
32320 function () {
32321 return this.dispatchThread;
32322 });
32323 Clazz_defineMethod (c$, "removeSourceEvents", 
32324 function (source, removeAllEvents) {
32325 jssun.awt.SunToolkit.flushPendingEvents ();
32326 {
32327 for (var i = 0; i < 4; i++) {
32328 var entry = this.queues[i].head;
32329 var prev = null;
32330 while (entry != null) {
32331 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)))) {
32332 if (Clazz_instanceOf (entry.event, java.awt.SequencedEvent)) {
32333 (entry.event).dispose ();
32334 }if (Clazz_instanceOf (entry.event, java.awt.SentEvent)) {
32335 (entry.event).dispose ();
32336 }if (prev == null) {
32337 this.queues[i].head = entry.next;
32338 } else {
32339 prev.next = entry.next;
32340 }this.uncacheEQItem (entry);
32341 } else {
32342 prev = entry;
32343 }entry = entry.next;
32344 }
32345 this.queues[i].tail = prev;
32346 }
32347 }}, "~O,~B");
32348 c$.setCurrentEventAndMostRecentTime = Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTime", 
32349 function (e) {
32350 java.awt.Toolkit.getEventQueue ().setCurrentEventAndMostRecentTimeImpl (e);
32351 }, "java.awt.AWTEvent");
32352 Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTimeImpl", 
32353  function (e) {
32354 if (swingjs.JSToolkit.isDispatchThread ()) {
32355 return;
32356 }this.currentEvent = e;
32357 var mostRecentEventTime2 = -9223372036854775808;
32358 if (Clazz_instanceOf (e, java.awt.event.InputEvent)) {
32359 var ie = e;
32360 mostRecentEventTime2 = ie.getWhen ();
32361 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
32362 var ime = e;
32363 mostRecentEventTime2 = ime.getWhen ();
32364 } else if (Clazz_instanceOf (e, java.awt.event.ActionEvent)) {
32365 var ae = e;
32366 mostRecentEventTime2 = ae.getWhen ();
32367 } else if (Clazz_instanceOf (e, java.awt.event.InvocationEvent)) {
32368 var ie = e;
32369 mostRecentEventTime2 = ie.getWhen ();
32370 }this.mostRecentEventTime = Math.max (this.mostRecentEventTime, mostRecentEventTime2);
32371 }, "java.awt.AWTEvent");
32372 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
32373 function (runnable) {
32374 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), runnable));
32375 }, "Runnable");
32376 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
32377 function (runnable) {
32378 java.awt.EventQueue.invokeAndWaitStatic (java.awt.Toolkit.getDefaultToolkit (), runnable);
32379 }, "Runnable");
32380 c$.invokeAndWaitStatic = Clazz_defineMethod (c$, "invokeAndWaitStatic", 
32381  function (source, runnable) {
32382 if (java.awt.EventQueue.isDispatchThread ()) {
32383 throw  new Error ("Cannot call invokeAndWait from the event dispatcher thread");
32384 }var event =  new java.awt.event.InvocationEvent (source, runnable, null, true);
32385 swingjs.JSToolkit.dispatchEvent (event, null, true);
32386 var eventThrowable = event.getThrowable ();
32387 if (eventThrowable != null) {
32388 throw  new java.lang.reflect.InvocationTargetException (eventThrowable);
32389 }}, "~O,Runnable");
32390 Clazz_defineMethod (c$, "wakeup", 
32391 function (isShutdown) {
32392 {
32393 if (this.nextQueue != null) {
32394 this.nextQueue.wakeup (isShutdown);
32395 } else if (this.dispatchThread != null) {
32396 try {
32397 this.dispatchThread.start ();
32398 } catch (e) {
32399 if (Clazz_exceptionOf (e, IllegalThreadStateException)) {
32400 this.dispatchThread.run ();
32401 } else {
32402 throw e;
32403 }
32404 }
32405 } else if (!isShutdown) {
32406 this.initDispatchThread ();
32407 }}}, "~B");
32408 Clazz_defineStatics (c$,
32409 "threadInitNumber", 0,
32410 "LOW_PRIORITY", 0,
32411 "NORM_PRIORITY", 1,
32412 "HIGH_PRIORITY", 2,
32413 "ULTIMATE_PRIORITY", 3,
32414 "NUM_PRIORITIES", 4,
32415 "PAINT", 0,
32416 "UPDATE", 1,
32417 "MOVE", 2,
32418 "DRAG", 3,
32419 "PEER", 4,
32420 "CACHE_LENGTH", 5);
32421 c$ = Clazz_decorateAsClass (function () {
32422 this.head = null;
32423 this.tail = null;
32424 Clazz_instantialize (this, arguments);
32425 }, java.awt, "Queue");
32426 c$ = Clazz_decorateAsClass (function () {
32427 this.event = null;
32428 this.id = 0;
32429 this.next = null;
32430 Clazz_instantialize (this, arguments);
32431 }, java.awt, "EventQueueItem");
32432 Clazz_makeConstructor (c$, 
32433 function (evt) {
32434 this.event = evt;
32435 this.id = evt.getID ();
32436 }, "java.awt.AWTEvent");
32437 });
32438 Clazz_declarePackage ("java.awt");
32439 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 () {
32440 c$ = Clazz_decorateAsClass (function () {
32441 this.a = null;
32442 this.b = null;
32443 Clazz_instantialize (this, arguments);
32444 }, 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]);
32445 Clazz_makeConstructor (c$, 
32446 function (a, b) {
32447 this.a = a;
32448 this.b = b;
32449 }, "java.util.EventListener,java.util.EventListener");
32450 Clazz_defineMethod (c$, "remove", 
32451 function (oldl) {
32452 if (oldl === this.a) return this.b;
32453 if (oldl === this.b) return this.a;
32454 var a2 = java.awt.AWTEventMulticaster.removeInternal (this.a, oldl);
32455 var b2 = java.awt.AWTEventMulticaster.removeInternal (this.b, oldl);
32456 if (a2 === this.a && b2 === this.b) {
32457 return this;
32458 }return java.awt.AWTEventMulticaster.addInternal (a2, b2);
32459 }, "java.util.EventListener");
32460 Clazz_defineMethod (c$, "componentResized", 
32461 function (e) {
32462 (this.a).componentResized (e);
32463 (this.b).componentResized (e);
32464 }, "java.awt.event.ComponentEvent");
32465 Clazz_defineMethod (c$, "componentMoved", 
32466 function (e) {
32467 (this.a).componentMoved (e);
32468 (this.b).componentMoved (e);
32469 }, "java.awt.event.ComponentEvent");
32470 Clazz_defineMethod (c$, "componentShown", 
32471 function (e) {
32472 (this.a).componentShown (e);
32473 (this.b).componentShown (e);
32474 }, "java.awt.event.ComponentEvent");
32475 Clazz_defineMethod (c$, "componentHidden", 
32476 function (e) {
32477 (this.a).componentHidden (e);
32478 (this.b).componentHidden (e);
32479 }, "java.awt.event.ComponentEvent");
32480 Clazz_defineMethod (c$, "componentAdded", 
32481 function (e) {
32482 (this.a).componentAdded (e);
32483 (this.b).componentAdded (e);
32484 }, "java.awt.event.ContainerEvent");
32485 Clazz_defineMethod (c$, "componentRemoved", 
32486 function (e) {
32487 (this.a).componentRemoved (e);
32488 (this.b).componentRemoved (e);
32489 }, "java.awt.event.ContainerEvent");
32490 Clazz_defineMethod (c$, "focusGained", 
32491 function (e) {
32492 (this.a).focusGained (e);
32493 (this.b).focusGained (e);
32494 }, "java.awt.event.FocusEvent");
32495 Clazz_defineMethod (c$, "focusLost", 
32496 function (e) {
32497 (this.a).focusLost (e);
32498 (this.b).focusLost (e);
32499 }, "java.awt.event.FocusEvent");
32500 Clazz_defineMethod (c$, "keyTyped", 
32501 function (e) {
32502 (this.a).keyTyped (e);
32503 (this.b).keyTyped (e);
32504 }, "java.awt.event.KeyEvent");
32505 Clazz_defineMethod (c$, "keyPressed", 
32506 function (e) {
32507 (this.a).keyPressed (e);
32508 (this.b).keyPressed (e);
32509 }, "java.awt.event.KeyEvent");
32510 Clazz_defineMethod (c$, "keyReleased", 
32511 function (e) {
32512 (this.a).keyReleased (e);
32513 (this.b).keyReleased (e);
32514 }, "java.awt.event.KeyEvent");
32515 Clazz_defineMethod (c$, "mouseClicked", 
32516 function (e) {
32517 (this.a).mouseClicked (e);
32518 (this.b).mouseClicked (e);
32519 }, "java.awt.event.MouseEvent");
32520 Clazz_defineMethod (c$, "mousePressed", 
32521 function (e) {
32522 (this.a).mousePressed (e);
32523 (this.b).mousePressed (e);
32524 }, "java.awt.event.MouseEvent");
32525 Clazz_defineMethod (c$, "mouseReleased", 
32526 function (e) {
32527 (this.a).mouseReleased (e);
32528 (this.b).mouseReleased (e);
32529 }, "java.awt.event.MouseEvent");
32530 Clazz_defineMethod (c$, "mouseEntered", 
32531 function (e) {
32532 (this.a).mouseEntered (e);
32533 (this.b).mouseEntered (e);
32534 }, "java.awt.event.MouseEvent");
32535 Clazz_defineMethod (c$, "mouseExited", 
32536 function (e) {
32537 (this.a).mouseExited (e);
32538 (this.b).mouseExited (e);
32539 }, "java.awt.event.MouseEvent");
32540 Clazz_defineMethod (c$, "mouseDragged", 
32541 function (e) {
32542 (this.a).mouseDragged (e);
32543 (this.b).mouseDragged (e);
32544 }, "java.awt.event.MouseEvent");
32545 Clazz_defineMethod (c$, "mouseMoved", 
32546 function (e) {
32547 (this.a).mouseMoved (e);
32548 (this.b).mouseMoved (e);
32549 }, "java.awt.event.MouseEvent");
32550 Clazz_defineMethod (c$, "windowOpened", 
32551 function (e) {
32552 (this.a).windowOpened (e);
32553 (this.b).windowOpened (e);
32554 }, "java.awt.event.WindowEvent");
32555 Clazz_defineMethod (c$, "windowClosing", 
32556 function (e) {
32557 (this.a).windowClosing (e);
32558 (this.b).windowClosing (e);
32559 }, "java.awt.event.WindowEvent");
32560 Clazz_defineMethod (c$, "windowClosed", 
32561 function (e) {
32562 (this.a).windowClosed (e);
32563 (this.b).windowClosed (e);
32564 }, "java.awt.event.WindowEvent");
32565 Clazz_defineMethod (c$, "windowIconified", 
32566 function (e) {
32567 (this.a).windowIconified (e);
32568 (this.b).windowIconified (e);
32569 }, "java.awt.event.WindowEvent");
32570 Clazz_defineMethod (c$, "windowDeiconified", 
32571 function (e) {
32572 (this.a).windowDeiconified (e);
32573 (this.b).windowDeiconified (e);
32574 }, "java.awt.event.WindowEvent");
32575 Clazz_defineMethod (c$, "windowActivated", 
32576 function (e) {
32577 (this.a).windowActivated (e);
32578 (this.b).windowActivated (e);
32579 }, "java.awt.event.WindowEvent");
32580 Clazz_defineMethod (c$, "windowDeactivated", 
32581 function (e) {
32582 (this.a).windowDeactivated (e);
32583 (this.b).windowDeactivated (e);
32584 }, "java.awt.event.WindowEvent");
32585 Clazz_defineMethod (c$, "windowStateChanged", 
32586 function (e) {
32587 (this.a).windowStateChanged (e);
32588 (this.b).windowStateChanged (e);
32589 }, "java.awt.event.WindowEvent");
32590 Clazz_defineMethod (c$, "windowGainedFocus", 
32591 function (e) {
32592 (this.a).windowGainedFocus (e);
32593 (this.b).windowGainedFocus (e);
32594 }, "java.awt.event.WindowEvent");
32595 Clazz_defineMethod (c$, "windowLostFocus", 
32596 function (e) {
32597 (this.a).windowLostFocus (e);
32598 (this.b).windowLostFocus (e);
32599 }, "java.awt.event.WindowEvent");
32600 Clazz_defineMethod (c$, "actionPerformed", 
32601 function (e) {
32602 (this.a).actionPerformed (e);
32603 (this.b).actionPerformed (e);
32604 }, "java.awt.event.ActionEvent");
32605 Clazz_defineMethod (c$, "itemStateChanged", 
32606 function (e) {
32607 (this.a).itemStateChanged (e);
32608 (this.b).itemStateChanged (e);
32609 }, "java.awt.event.ItemEvent");
32610 Clazz_defineMethod (c$, "adjustmentValueChanged", 
32611 function (e) {
32612 (this.a).adjustmentValueChanged (e);
32613 (this.b).adjustmentValueChanged (e);
32614 }, "java.awt.event.AdjustmentEvent");
32615 Clazz_defineMethod (c$, "textValueChanged", 
32616 function (e) {
32617 (this.a).textValueChanged (e);
32618 (this.b).textValueChanged (e);
32619 }, "java.awt.event.TextEvent");
32620 Clazz_defineMethod (c$, "inputMethodTextChanged", 
32621 function (e) {
32622 (this.a).inputMethodTextChanged (e);
32623 (this.b).inputMethodTextChanged (e);
32624 }, "java.awt.event.InputMethodEvent");
32625 Clazz_defineMethod (c$, "caretPositionChanged", 
32626 function (e) {
32627 (this.a).caretPositionChanged (e);
32628 (this.b).caretPositionChanged (e);
32629 }, "java.awt.event.InputMethodEvent");
32630 Clazz_defineMethod (c$, "hierarchyChanged", 
32631 function (e) {
32632 (this.a).hierarchyChanged (e);
32633 (this.b).hierarchyChanged (e);
32634 }, "java.awt.event.HierarchyEvent");
32635 Clazz_defineMethod (c$, "ancestorMoved", 
32636 function (e) {
32637 (this.a).ancestorMoved (e);
32638 (this.b).ancestorMoved (e);
32639 }, "java.awt.event.HierarchyEvent");
32640 Clazz_defineMethod (c$, "ancestorResized", 
32641 function (e) {
32642 (this.a).ancestorResized (e);
32643 (this.b).ancestorResized (e);
32644 }, "java.awt.event.HierarchyEvent");
32645 Clazz_defineMethod (c$, "mouseWheelMoved", 
32646 function (e) {
32647 (this.a).mouseWheelMoved (e);
32648 (this.b).mouseWheelMoved (e);
32649 }, "java.awt.event.MouseWheelEvent");
32650 c$.add = Clazz_defineMethod (c$, "add", 
32651 function (a, b) {
32652 return java.awt.AWTEventMulticaster.addInternal (a, b);
32653 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32654 c$.add = Clazz_defineMethod (c$, "add", 
32655 function (a, b) {
32656 return java.awt.AWTEventMulticaster.addInternal (a, b);
32657 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32658 c$.add = Clazz_defineMethod (c$, "add", 
32659 function (a, b) {
32660 return java.awt.AWTEventMulticaster.addInternal (a, b);
32661 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32662 c$.add = Clazz_defineMethod (c$, "add", 
32663 function (a, b) {
32664 return java.awt.AWTEventMulticaster.addInternal (a, b);
32665 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32666 c$.add = Clazz_defineMethod (c$, "add", 
32667 function (a, b) {
32668 return java.awt.AWTEventMulticaster.addInternal (a, b);
32669 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32670 c$.add = Clazz_defineMethod (c$, "add", 
32671 function (a, b) {
32672 return java.awt.AWTEventMulticaster.addInternal (a, b);
32673 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32674 c$.add = Clazz_defineMethod (c$, "add", 
32675 function (a, b) {
32676 return java.awt.AWTEventMulticaster.addInternal (a, b);
32677 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32678 c$.add = Clazz_defineMethod (c$, "add", 
32679 function (a, b) {
32680 return java.awt.AWTEventMulticaster.addInternal (a, b);
32681 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32682 c$.add = Clazz_defineMethod (c$, "add", 
32683 function (a, b) {
32684 return java.awt.AWTEventMulticaster.addInternal (a, b);
32685 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32686 c$.add = Clazz_defineMethod (c$, "add", 
32687 function (a, b) {
32688 return java.awt.AWTEventMulticaster.addInternal (a, b);
32689 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32690 c$.add = Clazz_defineMethod (c$, "add", 
32691 function (a, b) {
32692 return java.awt.AWTEventMulticaster.addInternal (a, b);
32693 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32694 c$.add = Clazz_defineMethod (c$, "add", 
32695 function (a, b) {
32696 return java.awt.AWTEventMulticaster.addInternal (a, b);
32697 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32698 c$.add = Clazz_defineMethod (c$, "add", 
32699 function (a, b) {
32700 return java.awt.AWTEventMulticaster.addInternal (a, b);
32701 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32702 c$.add = Clazz_defineMethod (c$, "add", 
32703 function (a, b) {
32704 return java.awt.AWTEventMulticaster.addInternal (a, b);
32705 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32706 c$.add = Clazz_defineMethod (c$, "add", 
32707 function (a, b) {
32708 return java.awt.AWTEventMulticaster.addInternal (a, b);
32709 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32710 c$.add = Clazz_defineMethod (c$, "add", 
32711 function (a, b) {
32712 return java.awt.AWTEventMulticaster.addInternal (a, b);
32713 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32714 c$.add = Clazz_defineMethod (c$, "add", 
32715 function (a, b) {
32716 return java.awt.AWTEventMulticaster.addInternal (a, b);
32717 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32718 c$.remove = Clazz_defineMethod (c$, "remove", 
32719 function (l, oldl) {
32720 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32721 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32722 c$.remove = Clazz_defineMethod (c$, "remove", 
32723 function (l, oldl) {
32724 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32725 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32726 c$.remove = Clazz_defineMethod (c$, "remove", 
32727 function (l, oldl) {
32728 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32729 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32730 c$.remove = Clazz_defineMethod (c$, "remove", 
32731 function (l, oldl) {
32732 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32733 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32734 c$.remove = Clazz_defineMethod (c$, "remove", 
32735 function (l, oldl) {
32736 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32737 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32738 c$.remove = Clazz_defineMethod (c$, "remove", 
32739 function (l, oldl) {
32740 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32741 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32742 c$.remove = Clazz_defineMethod (c$, "remove", 
32743 function (l, oldl) {
32744 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32745 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32746 c$.remove = Clazz_defineMethod (c$, "remove", 
32747 function (l, oldl) {
32748 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32749 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32750 c$.remove = Clazz_defineMethod (c$, "remove", 
32751 function (l, oldl) {
32752 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32753 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32754 c$.remove = Clazz_defineMethod (c$, "remove", 
32755 function (l, oldl) {
32756 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32757 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32758 c$.remove = Clazz_defineMethod (c$, "remove", 
32759 function (l, oldl) {
32760 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32761 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32762 c$.remove = Clazz_defineMethod (c$, "remove", 
32763 function (l, oldl) {
32764 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32765 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32766 c$.remove = Clazz_defineMethod (c$, "remove", 
32767 function (l, oldl) {
32768 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32769 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32770 c$.remove = Clazz_defineMethod (c$, "remove", 
32771 function (l, oldl) {
32772 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32773 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32774 c$.remove = Clazz_defineMethod (c$, "remove", 
32775 function (l, oldl) {
32776 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32777 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32778 c$.remove = Clazz_defineMethod (c$, "remove", 
32779 function (l, oldl) {
32780 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32781 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32782 c$.remove = Clazz_defineMethod (c$, "remove", 
32783 function (l, oldl) {
32784 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32785 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32786 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
32787 function (a, b) {
32788 if (a == null) return b;
32789 if (b == null) return a;
32790 return  new java.awt.AWTEventMulticaster (a, b);
32791 }, "java.util.EventListener,java.util.EventListener");
32792 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
32793 function (l, oldl) {
32794 if (l === oldl || l == null) {
32795 return null;
32796 } else if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32797 return (l).remove (oldl);
32798 } else {
32799 return l;
32800 }}, "java.util.EventListener,java.util.EventListener");
32801 c$.getListenerCount = Clazz_defineMethod (c$, "getListenerCount", 
32802  function (l, listenerType) {
32803 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32804 var mc = l;
32805 return java.awt.AWTEventMulticaster.getListenerCount (mc.a, listenerType) + java.awt.AWTEventMulticaster.getListenerCount (mc.b, listenerType);
32806 } else {
32807 return listenerType.isInstance (l) ? 1 : 0;
32808 }}, "java.util.EventListener,Class");
32809 c$.populateListenerArray = Clazz_defineMethod (c$, "populateListenerArray", 
32810  function (a, l, index) {
32811 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32812 var mc = l;
32813 var lhs = java.awt.AWTEventMulticaster.populateListenerArray (a, mc.a, index);
32814 return java.awt.AWTEventMulticaster.populateListenerArray (a, mc.b, lhs);
32815 } else if (a.getClass ().getComponentType ().isInstance (l)) {
32816 a[index] = l;
32817 return index + 1;
32818 } else {
32819 return index;
32820 }}, "~A,java.util.EventListener,~N");
32821 c$.getListeners = Clazz_defineMethod (c$, "getListeners", 
32822 function (l, listenerType) {
32823 if (listenerType == null) {
32824 throw  new NullPointerException ("Listener type should not be null");
32825 }var n = java.awt.AWTEventMulticaster.getListenerCount (l, listenerType);
32826 var result = java.lang.reflect.Array.newInstance (listenerType, n);
32827 java.awt.AWTEventMulticaster.populateListenerArray (result, l, 0);
32828 return result;
32829 }, "java.util.EventListener,Class");
32830 });
32831 Clazz_declarePackage ("java.awt");
32832 Clazz_load (["java.util.EventObject"], "java.awt.AWTEvent", ["java.awt.Component", "java.awt.peer.LightweightPeer"], function () {
32833 c$ = Clazz_decorateAsClass (function () {
32834 this.bdata = null;
32835 this.id = 0;
32836 this.num = 0;
32837 this.consumed = false;
32838 this.focusManagerIsDispatching = false;
32839 this.isPosted = false;
32840 Clazz_instantialize (this, arguments);
32841 }, java.awt, "AWTEvent", java.util.EventObject);
32842 Clazz_makeConstructor (c$, 
32843 function (event) {
32844 this.construct (event.target, event.id);
32845 }, "java.awt.Event");
32846 Clazz_makeConstructor (c$, 
32847 function (source, id) {
32848 Clazz_superConstructor (this, java.awt.AWTEvent, [source]);
32849 this.id = id;
32850 this.num = ++java.awt.AWTEvent.idnum;
32851 switch (id) {
32852 case 1001:
32853 case 701:
32854 case 601:
32855 case 900:
32856 this.consumed = true;
32857 break;
32858 default:
32859 }
32860 }, "~O,~N");
32861 Clazz_defineMethod (c$, "setSource", 
32862 function (newSource) {
32863 if (this.source === newSource) {
32864 return;
32865 }var comp = null;
32866 if (Clazz_instanceOf (newSource, java.awt.Component)) {
32867 comp = newSource;
32868 while (comp != null && comp.peer != null && (Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer))) {
32869 comp = comp.parent;
32870 }
32871 }this.source = newSource;
32872 }, "~O");
32873 Clazz_defineMethod (c$, "getID", 
32874 function () {
32875 return this.id;
32876 });
32877 Clazz_overrideMethod (c$, "toString", 
32878 function () {
32879 var srcName = null;
32880 if (Clazz_instanceOf (this.source, java.awt.Component)) {
32881 srcName = (this.source).getName ();
32882 }return this.getClass ().getName () + "[" + this.paramString () + "] on " + (srcName != null ? srcName : this.source);
32883 });
32884 Clazz_defineMethod (c$, "paramString", 
32885 function () {
32886 return "";
32887 });
32888 Clazz_defineMethod (c$, "consume", 
32889 function () {
32890 switch (this.id) {
32891 case 401:
32892 case 402:
32893 case 501:
32894 case 502:
32895 case 503:
32896 case 506:
32897 case 504:
32898 case 505:
32899 case 507:
32900 case 1100:
32901 case 1101:
32902 this.consumed = true;
32903 break;
32904 default:
32905 }
32906 });
32907 Clazz_defineMethod (c$, "isConsumed", 
32908 function () {
32909 return this.consumed;
32910 });
32911 Clazz_defineMethod (c$, "copyPrivateDataInto", 
32912 function (that) {
32913 that.bdata = this.bdata;
32914 }, "java.awt.AWTEvent");
32915 Clazz_defineMethod (c$, "dispatched", 
32916 function () {
32917 });
32918 Clazz_defineStatics (c$,
32919 "idnum", 0,
32920 "COMPONENT_EVENT_MASK", 0x01,
32921 "CONTAINER_EVENT_MASK", 0x02,
32922 "FOCUS_EVENT_MASK", 0x04,
32923 "KEY_EVENT_MASK", 0x08,
32924 "MOUSE_EVENT_MASK", 0x10,
32925 "MOUSE_MOTION_EVENT_MASK", 0x20,
32926 "WINDOW_EVENT_MASK", 0x40,
32927 "ACTION_EVENT_MASK", 0x80,
32928 "ADJUSTMENT_EVENT_MASK", 0x100,
32929 "ITEM_EVENT_MASK", 0x200,
32930 "TEXT_EVENT_MASK", 0x400,
32931 "INPUT_METHOD_EVENT_MASK", 0x800,
32932 "INPUT_METHODS_ENABLED_MASK", 0x1000,
32933 "PAINT_EVENT_MASK", 0x2000,
32934 "INVOCATION_EVENT_MASK", 0x4000,
32935 "HIERARCHY_EVENT_MASK", 0x8000,
32936 "HIERARCHY_BOUNDS_EVENT_MASK", 0x10000,
32937 "MOUSE_WHEEL_EVENT_MASK", 0x20000,
32938 "WINDOW_STATE_EVENT_MASK", 0x40000,
32939 "WINDOW_FOCUS_EVENT_MASK", 0x80000,
32940 "RESERVED_ID_MAX", 1999);
32941 });
32942 Clazz_declarePackage ("java.awt.event");
32943 Clazz_load (["java.util.EventListener"], "java.awt.event.AWTEventListener", null, function () {
32944 Clazz_declareInterface (java.awt.event, "AWTEventListener", java.util.EventListener);
32945 });
32946 Clazz_declarePackage ("java.awt");
32947 Clazz_declareInterface (java.awt, "ActiveEvent");
32948 Clazz_declarePackage ("java.awt.event");
32949 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.event.InvocationEvent", ["java.lang.Exception"], function () {
32950 c$ = Clazz_decorateAsClass (function () {
32951 this.runnable = null;
32952 this.notifier = null;
32953 this.catchExceptions = false;
32954 this.exception = null;
32955 this.throwable = null;
32956 this.when = 0;
32957 Clazz_instantialize (this, arguments);
32958 }, java.awt.event, "InvocationEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
32959 Clazz_makeConstructor (c$, 
32960 function (source, runnable) {
32961 this.construct (source, runnable, null, false);
32962 }, "~O,Runnable");
32963 Clazz_makeConstructor (c$, 
32964 function (source, runnable, notifier, catchThrowables) {
32965 this.construct (source, 1200, runnable, notifier, catchThrowables);
32966 }, "~O,Runnable,~O,~B");
32967 Clazz_makeConstructor (c$, 
32968 function (source, id, runnable, notifier, catchThrowables) {
32969 Clazz_superConstructor (this, java.awt.event.InvocationEvent, [source, id]);
32970 this.runnable = runnable;
32971 this.notifier = notifier;
32972 this.catchExceptions = catchThrowables;
32973 this.when = System.currentTimeMillis ();
32974 }, "~O,~N,Runnable,~O,~B");
32975 Clazz_overrideMethod (c$, "dispatch", 
32976 function () {
32977 if (this.catchExceptions) {
32978 try {
32979 this.runnable.run ();
32980 } catch (t) {
32981 if (Clazz_instanceOf (t, Exception)) {
32982 this.exception = t;
32983 }this.throwable = t;
32984 }
32985 } else {
32986 this.runnable.run ();
32987 }if (this.notifier != null) {
32988 {
32989 this.notifier.notifyAll ();
32990 }}});
32991 Clazz_defineMethod (c$, "getException", 
32992 function () {
32993 return (this.catchExceptions) ? this.exception : null;
32994 });
32995 Clazz_defineMethod (c$, "getThrowable", 
32996 function () {
32997 return (this.catchExceptions) ? this.throwable : null;
32998 });
32999 Clazz_defineMethod (c$, "getWhen", 
33000 function () {
33001 return this.when;
33002 });
33003 Clazz_overrideMethod (c$, "paramString", 
33004 function () {
33005 var typeStr;
33006 switch (this.id) {
33007 case 1200:
33008 typeStr = "INVOCATION_DEFAULT";
33009 break;
33010 default:
33011 typeStr = "unknown type";
33012 }
33013 return typeStr + ",runnable=" + this.runnable + ",notifier=" + this.notifier + ",catchExceptions=" + this.catchExceptions + ",when=" + this.when;
33014 });
33015 Clazz_defineStatics (c$,
33016 "SWINGJS_INVOCATION_LOW", 1201,
33017 "INVOCATION_FIRST", 1200,
33018 "INVOCATION_DEFAULT", 1200,
33019 "INVOCATION_LAST", 1201);
33020 });
33021 Clazz_declarePackage ("java.awt.event");
33022 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ComponentEvent", ["java.awt.Component"], function () {
33023 c$ = Clazz_declareType (java.awt.event, "ComponentEvent", java.awt.AWTEvent);
33024 Clazz_defineMethod (c$, "getComponent", 
33025 function () {
33026 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
33027 });
33028 Clazz_overrideMethod (c$, "paramString", 
33029 function () {
33030 var typeStr;
33031 var b = (this.source != null ? (this.source).getBounds () : null);
33032 switch (this.id) {
33033 case 102:
33034 typeStr = "COMPONENT_SHOWN";
33035 break;
33036 case 103:
33037 typeStr = "COMPONENT_HIDDEN";
33038 break;
33039 case 100:
33040 typeStr = "COMPONENT_MOVED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33041 break;
33042 case 101:
33043 typeStr = "COMPONENT_RESIZED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33044 break;
33045 default:
33046 typeStr = "unknown type";
33047 }
33048 return typeStr;
33049 });
33050 Clazz_defineStatics (c$,
33051 "COMPONENT_FIRST", 100,
33052 "COMPONENT_LAST", 103,
33053 "COMPONENT_MOVED", 100,
33054 "COMPONENT_RESIZED", 101,
33055 "COMPONENT_SHOWN", 102,
33056 "COMPONENT_HIDDEN", 103);
33057 });
33058 Clazz_declarePackage ("java.awt.event");
33059 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.MouseEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Point", "$.Toolkit"], function () {
33060 c$ = Clazz_decorateAsClass (function () {
33061 this.x = 0;
33062 this.y = 0;
33063 this.xAbs = 0;
33064 this.yAbs = 0;
33065 this.clickCount = 0;
33066 this.button = 0;
33067 this.popupTrigger = false;
33068 Clazz_instantialize (this, arguments);
33069 }, java.awt.event, "MouseEvent", java.awt.event.InputEvent);
33070 Clazz_defineMethod (c$, "getLocationOnScreen", 
33071 function () {
33072 return  new java.awt.Point (this.xAbs, this.yAbs);
33073 });
33074 Clazz_defineMethod (c$, "getXOnScreen", 
33075 function () {
33076 return this.xAbs;
33077 });
33078 Clazz_defineMethod (c$, "getYOnScreen", 
33079 function () {
33080 return this.yAbs;
33081 });
33082 Clazz_makeConstructor (c$, 
33083 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, button) {
33084 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, button);
33085 var eventLocationOnScreen =  new java.awt.Point (0, 0);
33086 try {
33087 eventLocationOnScreen = source.getLocationOnScreen ();
33088 this.xAbs = eventLocationOnScreen.x + x;
33089 this.yAbs = eventLocationOnScreen.y + y;
33090 } catch (e) {
33091 if (Clazz_exceptionOf (e, java.awt.IllegalComponentStateException)) {
33092 this.xAbs = 0;
33093 this.yAbs = 0;
33094 } else {
33095 throw e;
33096 }
33097 }
33098 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N");
33099 Clazz_makeConstructor (c$, 
33100 function (source, id, when, modifiers, x, y, clickCount, popupTrigger) {
33101 this.construct (source, id, when, modifiers, x, y, clickCount, popupTrigger, 0);
33102 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B");
33103 Clazz_makeConstructor (c$, 
33104 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, button) {
33105 Clazz_superConstructor (this, java.awt.event.MouseEvent, [source, id, when, modifiers]);
33106 this.x = x;
33107 this.y = y;
33108 this.xAbs = xAbs;
33109 this.yAbs = yAbs;
33110 this.clickCount = clickCount;
33111 this.popupTrigger = popupTrigger;
33112 if (button < 0 || button > 3) {
33113 throw  new IllegalArgumentException ("Invalid button value");
33114 }this.button = button;
33115 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
33116 this.setNewModifiers ();
33117 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0 || button != 0)) {
33118 this.setOldModifiers ();
33119 }}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N");
33120 Clazz_defineMethod (c$, "getX", 
33121 function () {
33122 return this.x;
33123 });
33124 Clazz_defineMethod (c$, "getY", 
33125 function () {
33126 return this.y;
33127 });
33128 Clazz_defineMethod (c$, "getPoint", 
33129 function () {
33130 var x;
33131 var y;
33132 {
33133 x = this.x;
33134 y = this.y;
33135 }return  new java.awt.Point (x, y);
33136 });
33137 Clazz_defineMethod (c$, "translatePoint", 
33138 function (x, y) {
33139 this.x += x;
33140 this.y += y;
33141 }, "~N,~N");
33142 Clazz_defineMethod (c$, "getClickCount", 
33143 function () {
33144 return this.clickCount;
33145 });
33146 Clazz_defineMethod (c$, "getButton", 
33147 function () {
33148 return this.button;
33149 });
33150 Clazz_defineMethod (c$, "isPopupTrigger", 
33151 function () {
33152 return this.popupTrigger;
33153 });
33154 c$.getMouseModifiersText = Clazz_defineMethod (c$, "getMouseModifiersText", 
33155 function (modifiers) {
33156 var buf =  new StringBuilder ();
33157 if ((modifiers & 8) != 0) {
33158 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33159 buf.append ("+");
33160 }if ((modifiers & 4) != 0) {
33161 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33162 buf.append ("+");
33163 }if ((modifiers & 2) != 0) {
33164 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33165 buf.append ("+");
33166 }if ((modifiers & 1) != 0) {
33167 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33168 buf.append ("+");
33169 }if ((modifiers & 32) != 0) {
33170 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33171 buf.append ("+");
33172 }if ((modifiers & 16) != 0) {
33173 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33174 buf.append ("+");
33175 }if ((modifiers & 8) != 0) {
33176 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33177 buf.append ("+");
33178 }if ((modifiers & 4) != 0) {
33179 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33180 buf.append ("+");
33181 }if (buf.length () > 0) {
33182 buf.setLength (buf.length () - 1);
33183 }return buf.toString ();
33184 }, "~N");
33185 Clazz_overrideMethod (c$, "paramString", 
33186 function () {
33187 var str =  new StringBuilder (80);
33188 str.append (java.awt.event.MouseEvent.getIdString (this.id));
33189 str.append (",(" + this.x).append ("," + this.y).append ("," + this.when).append (")");
33190 str.append (",absolute(").append ("" + this.xAbs).append (",").append ("" + this.yAbs).append (")");
33191 str.append (",button=").append ("" + this.getButton ());
33192 if (this.getModifiers () != 0) {
33193 str.append (",modifiers=").append (java.awt.event.MouseEvent.getMouseModifiersText (this.modifiers));
33194 }if (this.getModifiersEx () != 0) {
33195 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
33196 }str.append (",clickCount=").append ("" + this.clickCount);
33197 return str.toString ();
33198 });
33199 c$.getIdString = Clazz_defineMethod (c$, "getIdString", 
33200 function (id) {
33201 switch (id) {
33202 case 501:
33203 return "MOUSE_PRESSED";
33204 case 502:
33205 return "MOUSE_RELEASED";
33206 case 500:
33207 return "MOUSE_CLICKED";
33208 case 504:
33209 return "MOUSE_ENTERED";
33210 case 505:
33211 return "MOUSE_EXITED";
33212 case 503:
33213 return "MOUSE_MOVED";
33214 case 506:
33215 return "MOUSE_DRAGGED";
33216 case 507:
33217 return "MOUSE_WHEEL";
33218 default:
33219 return "unknown type";
33220 }
33221 }, "~N");
33222 Clazz_defineMethod (c$, "setNewModifiers", 
33223  function () {
33224 if ((this.modifiers & 16) != 0) {
33225 this.modifiers |= 1024;
33226 }if ((this.modifiers & 8) != 0) {
33227 this.modifiers |= 2048;
33228 }if ((this.modifiers & 4) != 0) {
33229 this.modifiers |= 4096;
33230 }if (this.id == 501 || this.id == 502 || this.id == 500) {
33231 if ((this.modifiers & 16) != 0) {
33232 this.button = 1;
33233 this.modifiers &= -13;
33234 if (this.id != 501) {
33235 this.modifiers &= -1025;
33236 }} else if ((this.modifiers & 8) != 0) {
33237 this.button = 2;
33238 this.modifiers &= -21;
33239 if (this.id != 501) {
33240 this.modifiers &= -2049;
33241 }} else if ((this.modifiers & 4) != 0) {
33242 this.button = 3;
33243 this.modifiers &= -25;
33244 if (this.id != 501) {
33245 this.modifiers &= -4097;
33246 }}}if ((this.modifiers & 8) != 0) {
33247 this.modifiers |= 512;
33248 }if ((this.modifiers & 4) != 0) {
33249 this.modifiers |= 256;
33250 }if ((this.modifiers & 1) != 0) {
33251 this.modifiers |= 64;
33252 }if ((this.modifiers & 2) != 0) {
33253 this.modifiers |= 128;
33254 }if ((this.modifiers & 32) != 0) {
33255 this.modifiers |= 8192;
33256 }});
33257 Clazz_defineMethod (c$, "setOldModifiers", 
33258  function () {
33259 if (this.id == 501 || this.id == 502 || this.id == 500) {
33260 switch (this.button) {
33261 case 1:
33262 this.modifiers |= 16;
33263 break;
33264 case 2:
33265 this.modifiers |= 8;
33266 break;
33267 case 3:
33268 this.modifiers |= 4;
33269 break;
33270 }
33271 } else {
33272 if ((this.modifiers & 1024) != 0) {
33273 this.modifiers |= 16;
33274 }if ((this.modifiers & 2048) != 0) {
33275 this.modifiers |= 8;
33276 }if ((this.modifiers & 4096) != 0) {
33277 this.modifiers |= 4;
33278 }}if ((this.modifiers & 512) != 0) {
33279 this.modifiers |= 8;
33280 }if ((this.modifiers & 256) != 0) {
33281 this.modifiers |= 4;
33282 }if ((this.modifiers & 64) != 0) {
33283 this.modifiers |= 1;
33284 }if ((this.modifiers & 128) != 0) {
33285 this.modifiers |= 2;
33286 }if ((this.modifiers & 8192) != 0) {
33287 this.modifiers |= 32;
33288 }});
33289 Clazz_defineStatics (c$,
33290 "MOUSE_FIRST", 500,
33291 "MOUSE_LAST", 507,
33292 "MOUSE_CLICKED", 500,
33293 "MOUSE_PRESSED", 501,
33294 "MOUSE_RELEASED", 502,
33295 "MOUSE_MOVED", 503,
33296 "MOUSE_ENTERED", 504,
33297 "MOUSE_EXITED", 505,
33298 "MOUSE_DRAGGED", 506,
33299 "MOUSE_WHEEL", 507,
33300 "NOBUTTON", 0,
33301 "BUTTON1", 1,
33302 "BUTTON2", 2,
33303 "BUTTON3", 3);
33304 });
33305 Clazz_declarePackage ("java.awt.event");
33306 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.InputEvent", ["java.lang.StringBuilder", "java.awt.Toolkit"], function () {
33307 c$ = Clazz_decorateAsClass (function () {
33308 this.when = 0;
33309 this.modifiers = 0;
33310 this.canAccessSystemClipboard = false;
33311 Clazz_instantialize (this, arguments);
33312 }, java.awt.event, "InputEvent", java.awt.event.ComponentEvent);
33313 Clazz_makeConstructor (c$, 
33314 function (source, id, when, modifiers) {
33315 Clazz_superConstructor (this, java.awt.event.InputEvent, [source, id]);
33316 this.when = when;
33317 this.modifiers = modifiers;
33318 this.canAccessSystemClipboard = false;
33319 }, "java.awt.Component,~N,~N,~N");
33320 Clazz_defineMethod (c$, "isShiftDown", 
33321 function () {
33322 return (this.modifiers & 1) != 0;
33323 });
33324 Clazz_defineMethod (c$, "isControlDown", 
33325 function () {
33326 return (this.modifiers & 2) != 0;
33327 });
33328 Clazz_defineMethod (c$, "isMetaDown", 
33329 function () {
33330 return (this.modifiers & 4) != 0;
33331 });
33332 Clazz_defineMethod (c$, "isAltDown", 
33333 function () {
33334 return (this.modifiers & 8) != 0;
33335 });
33336 Clazz_defineMethod (c$, "isAltGraphDown", 
33337 function () {
33338 return (this.modifiers & 32) != 0;
33339 });
33340 Clazz_defineMethod (c$, "getWhen", 
33341 function () {
33342 return this.when;
33343 });
33344 Clazz_defineMethod (c$, "getModifiers", 
33345 function () {
33346 return this.modifiers & (-16321);
33347 });
33348 Clazz_defineMethod (c$, "getModifiersEx", 
33349 function () {
33350 return this.modifiers & -64;
33351 });
33352 Clazz_overrideMethod (c$, "consume", 
33353 function () {
33354 this.consumed = true;
33355 });
33356 Clazz_overrideMethod (c$, "isConsumed", 
33357 function () {
33358 return this.consumed;
33359 });
33360 c$.getModifiersExText = Clazz_defineMethod (c$, "getModifiersExText", 
33361 function (modifiers) {
33362 var buf =  new StringBuilder ();
33363 if ((modifiers & 256) != 0) {
33364 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33365 buf.append ("+");
33366 }if ((modifiers & 128) != 0) {
33367 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33368 buf.append ("+");
33369 }if ((modifiers & 512) != 0) {
33370 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33371 buf.append ("+");
33372 }if ((modifiers & 64) != 0) {
33373 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33374 buf.append ("+");
33375 }if ((modifiers & 8192) != 0) {
33376 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33377 buf.append ("+");
33378 }if ((modifiers & 1024) != 0) {
33379 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33380 buf.append ("+");
33381 }if ((modifiers & 2048) != 0) {
33382 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33383 buf.append ("+");
33384 }if ((modifiers & 4096) != 0) {
33385 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33386 buf.append ("+");
33387 }if (buf.length () > 0) {
33388 buf.setLength (buf.length () - 1);
33389 }return buf.toString ();
33390 }, "~N");
33391 Clazz_defineStatics (c$,
33392 "SHIFT_MASK", 1,
33393 "CTRL_MASK", 2,
33394 "META_MASK", 4,
33395 "ALT_MASK", 8,
33396 "ALT_GRAPH_MASK", 32,
33397 "BUTTON1_MASK", 16,
33398 "BUTTON2_MASK", 8,
33399 "BUTTON3_MASK", 4,
33400 "SHIFT_DOWN_MASK", 64,
33401 "CTRL_DOWN_MASK", 128,
33402 "META_DOWN_MASK", 256,
33403 "ALT_DOWN_MASK", 512,
33404 "BUTTON1_DOWN_MASK", 1024,
33405 "BUTTON2_DOWN_MASK", 2048,
33406 "BUTTON3_DOWN_MASK", 4096,
33407 "ALT_GRAPH_DOWN_MASK", 8192,
33408 "FIRST_HIGH_BIT", 16384,
33409 "JDK_1_3_MODIFIERS", 63,
33410 "HIGH_MODIFIERS", -16384);
33411 });
33412 Clazz_declarePackage ("java.awt");
33413 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 () {
33414 c$ = Clazz_decorateAsClass (function () {
33415 this.desktopProperties = null;
33416 this.desktopPropsSupport = null;
33417 this.calls = null;
33418 this.eventListener = null;
33419 this.listener2SelectiveListener = null;
33420 if (!Clazz_isClassDefined ("java.awt.Toolkit.SelectiveAWTEventListener")) {
33421 java.awt.Toolkit.$Toolkit$SelectiveAWTEventListener$ ();
33422 }
33423 Clazz_instantialize (this, arguments);
33424 }, java.awt, "Toolkit");
33425 Clazz_prepareFields (c$, function () {
33426 this.desktopProperties =  new java.util.HashMap ();
33427 this.desktopPropsSupport = java.awt.Toolkit.createPropertyChangeSupport (this);
33428 this.calls =  Clazz_newIntArray (32, 0);
33429 this.listener2SelectiveListener =  new java.util.HashMap ();
33430 });
33431 Clazz_defineMethod (c$, "createComponent", 
33432 function (target) {
33433 if (java.awt.Toolkit.lightweightMarker == null) {
33434 java.awt.Toolkit.lightweightMarker =  new jssun.awt.NullComponentPeer ();
33435 }return java.awt.Toolkit.lightweightMarker;
33436 }, "java.awt.Component");
33437 Clazz_defineMethod (c$, "loadSystemColors", 
33438 function (systemColors) {
33439 }, "~A");
33440 Clazz_defineMethod (c$, "setDynamicLayout", 
33441 function (dynamic) {
33442 }, "~B");
33443 Clazz_defineMethod (c$, "isDynamicLayoutSet", 
33444 function () {
33445 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33446 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutSet ();
33447 } else {
33448 return false;
33449 }});
33450 Clazz_defineMethod (c$, "isDynamicLayoutActive", 
33451 function () {
33452 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33453 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutActive ();
33454 } else {
33455 return false;
33456 }});
33457 Clazz_defineMethod (c$, "getScreenInsets", 
33458 function (gc) {
33459 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33460 return java.awt.Toolkit.getDefaultToolkit ().getScreenInsets (gc);
33461 } else {
33462 return  new java.awt.Insets (0, 0, 0, 0);
33463 }}, "java.awt.GraphicsConfiguration");
33464 c$.getDefaultToolkit = Clazz_defineMethod (c$, "getDefaultToolkit", 
33465 function () {
33466 return (java.awt.Toolkit.toolkit == null ? java.awt.Toolkit.toolkit =  new swingjs.JSToolkit () : java.awt.Toolkit.toolkit);
33467 });
33468 Clazz_defineMethod (c$, "createImage", 
33469 function (imagedata) {
33470 return this.createImage (imagedata, 0, imagedata.length);
33471 }, "~A");
33472 Clazz_defineMethod (c$, "getMenuShortcutKeyMask", 
33473 function () {
33474 return 2;
33475 });
33476 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
33477 function (c) {
33478 return null;
33479 }, "java.awt.Component");
33480 Clazz_defineMethod (c$, "createCustomCursor", 
33481 function (cursor, hotSpot, name) {
33482 return  new java.awt.Cursor (0);
33483 }, "java.awt.Image,java.awt.Point,~S");
33484 Clazz_defineMethod (c$, "isFrameStateSupported", 
33485 function (state) {
33486 return (state == 0);
33487 }, "~N");
33488 c$.getProperty = Clazz_defineMethod (c$, "getProperty", 
33489 function (key, defaultValue) {
33490 if (java.awt.Toolkit.resources != null) {
33491 try {
33492 return java.awt.Toolkit.resources.getString (key);
33493 } catch (e) {
33494 if (Clazz_exceptionOf (e, java.util.MissingResourceException)) {
33495 } else {
33496 throw e;
33497 }
33498 }
33499 }return defaultValue;
33500 }, "~S,~S");
33501 Clazz_defineMethod (c$, "getSystemEventQueue", 
33502 function () {
33503 return this.getSystemEventQueueImpl ();
33504 });
33505 c$.getEventQueue = Clazz_defineMethod (c$, "getEventQueue", 
33506 function () {
33507 return java.awt.Toolkit.getDefaultToolkit ().getSystemEventQueueImpl ();
33508 });
33509 Clazz_defineMethod (c$, "getDesktopProperty", 
33510 function (propertyName) {
33511 if (this.desktopProperties.isEmpty ()) {
33512 this.initializeDesktopProperties ();
33513 }var value;
33514 if (propertyName.equals ("awt.dynamicLayoutSupported")) {
33515 value = this.lazilyLoadDesktopProperty (propertyName);
33516 return value;
33517 }value = this.desktopProperties.get (propertyName);
33518 if (value == null) {
33519 value = this.lazilyLoadDesktopProperty (propertyName);
33520 if (value != null) {
33521 this.setDesktopProperty (propertyName, value);
33522 }}if (Clazz_instanceOf (value, java.awt.RenderingHints)) {
33523 value = (value).clone ();
33524 }return value;
33525 }, "~S");
33526 Clazz_defineMethod (c$, "setDesktopProperty", 
33527 function (name, newValue) {
33528 var oldValue;
33529 {
33530 oldValue = this.desktopProperties.get (name);
33531 this.desktopProperties.put (name, newValue);
33532 }this.desktopPropsSupport.firePropertyChange (name, oldValue, newValue);
33533 }, "~S,~O");
33534 Clazz_defineMethod (c$, "lazilyLoadDesktopProperty", 
33535 function (name) {
33536 return null;
33537 }, "~S");
33538 Clazz_defineMethod (c$, "initializeDesktopProperties", 
33539 function () {
33540 });
33541 Clazz_defineMethod (c$, "addPropertyChangeListener", 
33542 function (name, pcl) {
33543 this.desktopPropsSupport.addPropertyChangeListener (name, pcl);
33544 }, "~S,java.beans.PropertyChangeListener");
33545 Clazz_defineMethod (c$, "removePropertyChangeListener", 
33546 function (name, pcl) {
33547 this.desktopPropsSupport.removePropertyChangeListener (name, pcl);
33548 }, "~S,java.beans.PropertyChangeListener");
33549 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33550 function () {
33551 return this.desktopPropsSupport.getPropertyChangeListeners ();
33552 });
33553 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33554 function (propertyName) {
33555 return this.desktopPropsSupport.getPropertyChangeListeners (propertyName);
33556 }, "~S");
33557 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
33558 function () {
33559 return true;
33560 });
33561 c$.deProxyAWTEventListener = Clazz_defineMethod (c$, "deProxyAWTEventListener", 
33562  function (l) {
33563 var localL = l;
33564 if (localL == null) {
33565 return null;
33566 }if (Clazz_instanceOf (l, java.awt.event.AWTEventListenerProxy)) {
33567 localL = (l).getListener ();
33568 }return localL;
33569 }, "java.awt.event.AWTEventListener");
33570 Clazz_defineMethod (c$, "addAWTEventListener", 
33571 function (listener, eventMask) {
33572 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33573 if (localL == null) {
33574 return;
33575 }{
33576 var selectiveListener = this.listener2SelectiveListener.get (localL);
33577 if (selectiveListener == null) {
33578 selectiveListener = Clazz_innerTypeInstance (java.awt.Toolkit.SelectiveAWTEventListener, this, null, localL, eventMask);
33579 this.listener2SelectiveListener.put (localL, selectiveListener);
33580 this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.add (this.eventListener, selectiveListener);
33581 }selectiveListener.orEventMasks (eventMask);
33582 java.awt.Toolkit.enabledOnToolkitMask |= eventMask;
33583 var mask = eventMask;
33584 for (var i = 0; i < 32; i++) {
33585 if (mask == 0) {
33586 break;
33587 }if ((mask & 1) != 0) {
33588 this.calls[i]++;
33589 }mask >>>= 1;
33590 }
33591 }}, "java.awt.event.AWTEventListener,~N");
33592 Clazz_defineMethod (c$, "removeAWTEventListener", 
33593 function (listener) {
33594 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33595 if (listener == null) {
33596 return;
33597 }{
33598 var selectiveListener = this.listener2SelectiveListener.get (localL);
33599 if (selectiveListener != null) {
33600 this.listener2SelectiveListener.remove (localL);
33601 var listenerCalls = selectiveListener.getCalls ();
33602 for (var i = 0; i < 32; i++) {
33603 this.calls[i] -= listenerCalls[i];
33604 if (this.calls[i] == 0) {
33605 java.awt.Toolkit.enabledOnToolkitMask &= ~(1 << i);
33606 }}
33607 }this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.remove (this.eventListener, (selectiveListener == null) ? localL : selectiveListener);
33608 }}, "java.awt.event.AWTEventListener");
33609 c$.enabledOnToolkit = Clazz_defineMethod (c$, "enabledOnToolkit", 
33610 function (eventMask) {
33611 return (java.awt.Toolkit.enabledOnToolkitMask & eventMask) != 0;
33612 }, "~N");
33613 Clazz_defineMethod (c$, "countAWTEventListeners", 
33614 function (eventMask) {
33615 var ci = 0;
33616 for (; eventMask != 0; eventMask >>>= 1, ci++) {
33617 }
33618 ci--;
33619 return this.calls[ci];
33620 }, "~N");
33621 Clazz_defineMethod (c$, "getAWTEventListeners", 
33622 function () {
33623 {
33624 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33625 var ret =  new Array (la.length);
33626 for (var i = 0; i < la.length; i++) {
33627 var sael = la[i];
33628 var tempL = sael.getListener ();
33629 ret[i] =  new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), tempL);
33630 }
33631 return ret;
33632 }});
33633 Clazz_defineMethod (c$, "getAWTEventListeners", 
33634 function (eventMask) {
33635 {
33636 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33637 var list =  new java.util.ArrayList (la.length);
33638 for (var i = 0; i < la.length; i++) {
33639 var sael = la[i];
33640 if ((sael.getEventMask () & eventMask) == eventMask) {
33641 list.add ( new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), sael.getListener ()));
33642 }}
33643 return list.toArray ( new Array (0));
33644 }}, "~N");
33645 Clazz_defineMethod (c$, "notifyAWTEventListeners", 
33646 function (theEvent) {
33647 var eventListener = this.eventListener;
33648 if (eventListener != null) {
33649 eventListener.eventDispatched (theEvent);
33650 }}, "java.awt.AWTEvent");
33651 c$.createPropertyChangeSupport = Clazz_defineMethod (c$, "createPropertyChangeSupport", 
33652  function (toolkit) {
33653 return  new java.beans.PropertyChangeSupport (toolkit);
33654 }, "java.awt.Toolkit");
33655 c$.$Toolkit$SelectiveAWTEventListener$ = function () {
33656 Clazz_pu$h(self.c$);
33657 c$ = Clazz_decorateAsClass (function () {
33658 Clazz_prepareCallback (this, arguments);
33659 this.listener = null;
33660 this.eventMask = 0;
33661 this.calls = null;
33662 Clazz_instantialize (this, arguments);
33663 }, java.awt.Toolkit, "SelectiveAWTEventListener", null, java.awt.event.AWTEventListener);
33664 Clazz_prepareFields (c$, function () {
33665 this.calls =  Clazz_newIntArray (32, 0);
33666 });
33667 Clazz_defineMethod (c$, "getListener", 
33668 function () {
33669 return this.listener;
33670 });
33671 Clazz_defineMethod (c$, "getEventMask", 
33672 function () {
33673 return this.eventMask;
33674 });
33675 Clazz_defineMethod (c$, "getCalls", 
33676 function () {
33677 return this.calls;
33678 });
33679 Clazz_defineMethod (c$, "orEventMasks", 
33680 function (a) {
33681 this.eventMask |= a;
33682 for (var b = 0; b < 32; b++) {
33683 if (a == 0) {
33684 break;
33685 }if ((a & 1) != 0) {
33686 this.calls[b]++;
33687 }a >>>= 1;
33688 }
33689 }, "~N");
33690 Clazz_makeConstructor (c$, 
33691 function (a, b) {
33692 this.listener = a;
33693 this.eventMask = b;
33694 }, "java.awt.event.AWTEventListener,~N");
33695 Clazz_defineMethod (c$, "eventDispatched", 
33696 function (a) {
33697 var b = 0;
33698 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))) {
33699 var c = 0;
33700 for (var d = b; d != 0; d >>>= 1, c++) {
33701 }
33702 c--;
33703 for (var e = 0; e < this.calls[c]; e++) {
33704 this.listener.eventDispatched (a);
33705 }
33706 }}, "java.awt.AWTEvent");
33707 c$ = Clazz_p0p ();
33708 };
33709 Clazz_pu$h(self.c$);
33710 c$ = Clazz_declareType (java.awt.Toolkit, "ToolkitEventMulticaster", java.awt.AWTEventMulticaster, java.awt.event.AWTEventListener);
33711 c$.add = Clazz_defineMethod (c$, "add", 
33712 function (a, b) {
33713 if (a == null) return b;
33714 if (b == null) return a;
33715 return  new java.awt.Toolkit.ToolkitEventMulticaster (a, b);
33716 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33717 c$.remove = Clazz_defineMethod (c$, "remove", 
33718 function (a, b) {
33719 return java.awt.AWTEventMulticaster.removeInternal (a, b);
33720 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33721 Clazz_defineMethod (c$, "remove", 
33722 function (a) {
33723 if (a === this.a) return this.b;
33724 if (a === this.b) return this.a;
33725 var b = java.awt.AWTEventMulticaster.removeInternal (this.a, a);
33726 var c = java.awt.AWTEventMulticaster.removeInternal (this.b, a);
33727 if (b === this.a && c === this.b) {
33728 return this;
33729 }return java.awt.Toolkit.ToolkitEventMulticaster.add (b, c);
33730 }, "java.util.EventListener");
33731 Clazz_defineMethod (c$, "eventDispatched", 
33732 function (a) {
33733 (this.a).eventDispatched (a);
33734 (this.b).eventDispatched (a);
33735 }, "java.awt.AWTEvent");
33736 c$ = Clazz_p0p ();
33737 Clazz_defineStatics (c$,
33738 "lightweightMarker", null,
33739 "toolkit", null,
33740 "resources", null,
33741 "LONG_BITS", 32,
33742 "enabledOnToolkitMask", 0);
33743 });
33744 Clazz_declarePackage ("java.lang");
33745 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 () {
33746 c$ = Clazz_decorateAsClass (function () {
33747 this.name = null;
33748 this.priority = 5;
33749 this.daemon = false;
33750 this.target = null;
33751 this.group = null;
33752 this.tid = 0;
33753 this.threadStatus = 0;
33754 this.parkBlocker = null;
33755 this.stopBeforeStart = false;
33756 this.throwableFromStop = null;
33757 this.me = null;
33758 this.uncaughtExceptionHandler = null;
33759 this.$interrupted = false;
33760 this.stopped = false;
33761 Clazz_instantialize (this, arguments);
33762 }, java.lang, "Thread", null, Runnable);
33763 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
33764  function () {
33765 return java.lang.Thread.threadInitNumber++;
33766 });
33767 c$.nextThreadID = Clazz_defineMethod (c$, "nextThreadID", 
33768  function () {
33769 return ++java.lang.Thread.threadSeqNumber;
33770 });
33771 c$.currentThread = Clazz_defineMethod (c$, "currentThread", 
33772 function () {
33773 if (java.lang.Thread.thisThread == null) {
33774 java.lang.Thread.thisThread =  new java.lang.Thread ("master");
33775 java.lang.Thread.thisThread.setPriority (5);
33776 }return java.lang.Thread.thisThread;
33777 });
33778 c$.yield = Clazz_defineMethod (c$, "yield", 
33779 function () {
33780 });
33781 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33782 function (millis) {
33783 }, "~N");
33784 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33785 function (millis, nanos) {
33786 if (millis < 0) {
33787 throw  new IllegalArgumentException ("timeout value is negative");
33788 }if (nanos < 0 || nanos > 999999) {
33789 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
33790 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
33791 millis++;
33792 }java.lang.Thread.sleep (millis);
33793 }, "~N,~N");
33794 Clazz_defineMethod (c$, "init", 
33795  function (g, target, name, stackSize) {
33796 this.init (g, target, name, stackSize, null);
33797 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33798 Clazz_defineMethod (c$, "init", 
33799  function (g, target, name, stackSize, acc) {
33800 var parent = (java.lang.Thread.thisThread == null ? null : java.lang.Thread.thisThread);
33801 if (g == null) {
33802 if (g == null && parent != null) {
33803 g = parent.getThreadGroup ();
33804 }}if (g == null) {
33805 g = this.newThreadGroup (null, name);
33806 parent = this;
33807 }g.checkAccess ();
33808 g.addUnstarted ();
33809 this.group = g;
33810 this.priority = parent.getPriority ();
33811 this.name = name;
33812 this.target = target;
33813 this.setPriority (this.priority);
33814 this.tid = java.lang.Thread.nextThreadID ();
33815 this.me = this;
33816 }, "java.lang.ThreadGroup,Runnable,~S,~N,~O");
33817 Clazz_defineMethod (c$, "newThreadGroup", 
33818 function (group, name) {
33819 return  new java.lang.ThreadGroup (group, name);
33820 }, "java.lang.ThreadGroup,~S");
33821 Clazz_makeConstructor (c$, 
33822 function () {
33823 this.init (null, null, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33824 });
33825 Clazz_makeConstructor (c$, 
33826 function (target) {
33827 this.init (null, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33828 }, "Runnable");
33829 Clazz_makeConstructor (c$, 
33830 function (group, target) {
33831 this.init (group, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33832 }, "java.lang.ThreadGroup,Runnable");
33833 Clazz_makeConstructor (c$, 
33834 function (name) {
33835 this.init (null, null, name, 0);
33836 }, "~S");
33837 Clazz_makeConstructor (c$, 
33838 function (group, name) {
33839 this.init (group, null, name, 0);
33840 }, "java.lang.ThreadGroup,~S");
33841 Clazz_makeConstructor (c$, 
33842 function (target, name) {
33843 this.init (null, target, name, 0);
33844 }, "Runnable,~S");
33845 Clazz_makeConstructor (c$, 
33846 function (group, target, name) {
33847 this.init (group, target, name, 0);
33848 }, "java.lang.ThreadGroup,Runnable,~S");
33849 Clazz_makeConstructor (c$, 
33850 function (group, target, name, stackSize) {
33851 this.init (group, target, name, stackSize);
33852 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33853 Clazz_defineMethod (c$, "start", 
33854 function () {
33855 if (this.threadStatus != 0 || this !== this.me) throw  new IllegalThreadStateException ();
33856 this.group.add (this);
33857 this.start0 ();
33858 if (this.stopBeforeStart) {
33859 this.stop0 (this.throwableFromStop);
33860 }});
33861 Clazz_defineMethod (c$, "start0", 
33862  function () {
33863 });
33864 Clazz_defineMethod (c$, "run", 
33865 function () {
33866 if (this.target != null) {
33867 this.target.run ();
33868 }});
33869 Clazz_defineMethod (c$, "stop", 
33870 function () {
33871 if ((this.threadStatus != 0) && !this.isAlive ()) {
33872 return;
33873 }this.stop1 ( new ThreadDeath ());
33874 });
33875 Clazz_defineMethod (c$, "stop", 
33876 function (obj) {
33877 this.stop1 (obj);
33878 }, "Throwable");
33879 Clazz_defineMethod (c$, "stop1", 
33880  function (th) {
33881 if (this.threadStatus != 0) {
33882 this.resume ();
33883 this.stop0 (th);
33884 } else {
33885 if (th == null) {
33886 throw  new NullPointerException ();
33887 }this.stopBeforeStart = true;
33888 this.throwableFromStop = th;
33889 }}, "Throwable");
33890 Clazz_defineMethod (c$, "interrupt", 
33891 function () {
33892 this.interrupt0 ();
33893 });
33894 c$.interrupted = Clazz_defineMethod (c$, "interrupted", 
33895 function () {
33896 return java.lang.Thread.currentThread ().isInterruptedB (true);
33897 });
33898 Clazz_defineMethod (c$, "isInterrupted", 
33899 function () {
33900 return this.isInterruptedB (false);
33901 });
33902 Clazz_defineMethod (c$, "isInterruptedB", 
33903  function (clearInterrupted) {
33904 var wasInt = this.$interrupted;
33905 if (clearInterrupted) this.$interrupted = false;
33906 return wasInt;
33907 }, "~B");
33908 Clazz_defineMethod (c$, "destroy", 
33909 function () {
33910 throw  new NoSuchMethodError ();
33911 });
33912 Clazz_defineMethod (c$, "isAlive", 
33913 function () {
33914 return true;
33915 });
33916 Clazz_defineMethod (c$, "suspend", 
33917 function () {
33918 this.checkAccess ();
33919 this.suspend0 ();
33920 });
33921 Clazz_defineMethod (c$, "resume", 
33922 function () {
33923 this.checkAccess ();
33924 this.resume0 ();
33925 });
33926 Clazz_defineMethod (c$, "setPriority", 
33927 function (newPriority) {
33928 var g;
33929 this.checkAccess ();
33930 if (newPriority > 10 || newPriority < 1) {
33931 throw  new IllegalArgumentException ();
33932 }if ((g = this.getThreadGroup ()) != null) {
33933 if (newPriority > g.getMaxPriority ()) {
33934 newPriority = g.getMaxPriority ();
33935 }this.setPriority0 (this.priority = newPriority);
33936 }}, "~N");
33937 Clazz_defineMethod (c$, "getPriority", 
33938 function () {
33939 return this.priority;
33940 });
33941 Clazz_defineMethod (c$, "setName", 
33942 function (name) {
33943 this.checkAccess ();
33944 this.name = name;
33945 }, "~S");
33946 Clazz_defineMethod (c$, "getName", 
33947 function () {
33948 return this.name;
33949 });
33950 Clazz_defineMethod (c$, "getThreadGroup", 
33951 function () {
33952 return this.group;
33953 });
33954 c$.activeCount = Clazz_defineMethod (c$, "activeCount", 
33955 function () {
33956 return java.lang.Thread.currentThread ().getThreadGroup ().activeCount ();
33957 });
33958 c$.enumerate = Clazz_defineMethod (c$, "enumerate", 
33959 function (tarray) {
33960 return java.lang.Thread.currentThread ().getThreadGroup ().enumerate (tarray);
33961 }, "~A");
33962 Clazz_defineMethod (c$, "countStackFrames", 
33963 function () {
33964 return 0;
33965 });
33966 Clazz_defineMethod (c$, "join", 
33967 function (millis) {
33968 var base = System.currentTimeMillis ();
33969 var now = 0;
33970 if (millis < 0) {
33971 throw  new IllegalArgumentException ("timeout value is negative");
33972 }swingjs.JSToolkit.warn ("Cannot wait in Thread");
33973 if (millis == 0) {
33974 while (this.isAlive ()) {
33975 this.wait (0);
33976 }
33977 } else {
33978 while (this.isAlive ()) {
33979 var delay = millis - now;
33980 if (delay <= 0) {
33981 break;
33982 }this.wait (delay);
33983 now = System.currentTimeMillis () - base;
33984 }
33985 }}, "~N");
33986 Clazz_defineMethod (c$, "join", 
33987 function (millis, nanos) {
33988 if (millis < 0) {
33989 throw  new IllegalArgumentException ("timeout value is negative");
33990 }if (nanos < 0 || nanos > 999999) {
33991 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
33992 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
33993 millis++;
33994 }this.join (millis);
33995 }, "~N,~N");
33996 Clazz_defineMethod (c$, "join", 
33997 function () {
33998 this.join (0);
33999 });
34000 c$.dumpStack = Clazz_defineMethod (c$, "dumpStack", 
34001 function () {
34002  new Exception ("Stack trace").printStackTrace ();
34003 });
34004 Clazz_defineMethod (c$, "setDaemon", 
34005 function (on) {
34006 this.checkAccess ();
34007 if (this.isAlive ()) {
34008 throw  new IllegalThreadStateException ();
34009 }this.daemon = on;
34010 }, "~B");
34011 Clazz_defineMethod (c$, "isDaemon", 
34012 function () {
34013 return this.daemon;
34014 });
34015 Clazz_defineMethod (c$, "checkAccess", 
34016 function () {
34017 });
34018 Clazz_overrideMethod (c$, "toString", 
34019 function () {
34020 var group = this.getThreadGroup ();
34021 if (group != null) {
34022 return "Thread[" + this.getName () + "," + this.getPriority () + "," + group.getName () + "]";
34023 } else {
34024 return "Thread[" + this.getName () + "," + this.getPriority () + "," + "" + "]";
34025 }});
34026 Clazz_defineMethod (c$, "getContextClassLoader", 
34027 function () {
34028 return null;
34029 });
34030 Clazz_defineMethod (c$, "setContextClassLoader", 
34031 function (cl) {
34032 }, "ClassLoader");
34033 c$.holdsLock = Clazz_defineMethod (c$, "holdsLock", 
34034 function (obj) {
34035 return false;
34036 }, "~O");
34037 Clazz_defineMethod (c$, "getStackTrace", 
34038 function () {
34039 return ( new Exception ()).getStackTrace ();
34040 });
34041 c$.getAllStackTraces = Clazz_defineMethod (c$, "getAllStackTraces", 
34042 function () {
34043 var threads = java.lang.Thread.getThreads ();
34044 var traces = java.lang.Thread.dumpThreads (threads);
34045 var m =  new java.util.HashMap (threads.length);
34046 for (var i = 0; i < threads.length; i++) {
34047 var stackTrace = traces[i];
34048 if (stackTrace != null) {
34049 m.put (threads[i], stackTrace);
34050 }}
34051 return m;
34052 });
34053 c$.dumpThreads = Clazz_defineMethod (c$, "dumpThreads", 
34054  function (threads) {
34055 return null;
34056 }, "~A");
34057 c$.getThreads = Clazz_defineMethod (c$, "getThreads", 
34058  function () {
34059 return null;
34060 });
34061 Clazz_defineMethod (c$, "getId", 
34062 function () {
34063 return this.tid;
34064 });
34065 Clazz_defineMethod (c$, "getState", 
34066 function () {
34067 switch (this.threadStatus) {
34068 case 0:
34069 return java.lang.Thread.State.NEW;
34070 case 1:
34071 return java.lang.Thread.State.RUNNABLE;
34072 case 2:
34073 default:
34074 return java.lang.Thread.State.TERMINATED;
34075 case 3:
34076 return java.lang.Thread.State.TIMED_WAITING;
34077 case 4:
34078 return java.lang.Thread.State.WAITING;
34079 }
34080 });
34081 c$.setDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "setDefaultUncaughtExceptionHandler", 
34082 function (eh) {
34083 java.lang.Thread.defaultUncaughtExceptionHandler = eh;
34084 }, "java.lang.Thread.UncaughtExceptionHandler");
34085 c$.getDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "getDefaultUncaughtExceptionHandler", 
34086 function () {
34087 return java.lang.Thread.defaultUncaughtExceptionHandler;
34088 });
34089 Clazz_defineMethod (c$, "getUncaughtExceptionHandler", 
34090 function () {
34091 return this.uncaughtExceptionHandler != null ? this.uncaughtExceptionHandler : this.group;
34092 });
34093 Clazz_defineMethod (c$, "setUncaughtExceptionHandler", 
34094 function (eh) {
34095 this.checkAccess ();
34096 this.uncaughtExceptionHandler = eh;
34097 }, "java.lang.Thread.UncaughtExceptionHandler");
34098 Clazz_defineMethod (c$, "setPriority0", 
34099  function (newPriority) {
34100 }, "~N");
34101 Clazz_defineMethod (c$, "stop0", 
34102  function (o) {
34103 this.stopped = true;
34104 }, "~O");
34105 Clazz_defineMethod (c$, "suspend0", 
34106  function () {
34107 });
34108 Clazz_defineMethod (c$, "resume0", 
34109  function () {
34110 });
34111 Clazz_defineMethod (c$, "interrupt0", 
34112  function () {
34113 this.$interrupted = true;
34114 });
34115 Clazz_pu$h(self.c$);
34116 c$ = Clazz_declareType (java.lang.Thread, "State", Enum);
34117 Clazz_defineEnumConstant (c$, "NEW", 0, []);
34118 Clazz_defineEnumConstant (c$, "RUNNABLE", 1, []);
34119 Clazz_defineEnumConstant (c$, "BLOCKED", 2, []);
34120 Clazz_defineEnumConstant (c$, "WAITING", 3, []);
34121 Clazz_defineEnumConstant (c$, "TIMED_WAITING", 4, []);
34122 Clazz_defineEnumConstant (c$, "TERMINATED", 5, []);
34123 c$ = Clazz_p0p ();
34124 Clazz_declareInterface (java.lang.Thread, "UncaughtExceptionHandler");
34125 Clazz_defineStatics (c$,
34126 "threadInitNumber", 0,
34127 "threadSeqNumber", 0,
34128 "thisThread", null,
34129 "MIN_PRIORITY", 1,
34130 "NORM_PRIORITY", 5,
34131 "MAX_PRIORITY", 10,
34132 "defaultUncaughtExceptionHandler", null);
34133 });
34134 Clazz_declarePackage ("java.lang");
34135 Clazz_load (["java.lang.Thread"], "java.lang.ThreadGroup", ["java.lang.IllegalThreadStateException", "$.ThreadDeath", "java.util.Arrays"], function () {
34136 c$ = Clazz_decorateAsClass (function () {
34137 this.parent = null;
34138 this.name = null;
34139 this.maxPriority = 10;
34140 this.destroyed = false;
34141 this.daemon = false;
34142 this.vmAllowSuspension = false;
34143 this.nUnstartedThreads = 0;
34144 this.nthreads = 0;
34145 this.threads = null;
34146 this.ngroups = 0;
34147 this.groups = null;
34148 this.html5Applet = null;
34149 Clazz_instantialize (this, arguments);
34150 }, java.lang, "ThreadGroup", null, java.lang.Thread.UncaughtExceptionHandler);
34151 Clazz_makeConstructor (c$, 
34152 function (name) {
34153 this.construct (java.lang.Thread.currentThread ().getThreadGroup (), name);
34154 }, "~S");
34155 Clazz_makeConstructor (c$, 
34156 function (parent, name) {
34157 this.name = name;
34158 this.parent = parent;
34159 if (parent != null) {
34160 this.maxPriority = parent.maxPriority;
34161 this.daemon = parent.daemon;
34162 this.vmAllowSuspension = parent.vmAllowSuspension;
34163 parent.add (this);
34164 }}, "java.lang.ThreadGroup,~S");
34165 Clazz_defineMethod (c$, "getName", 
34166 function () {
34167 return this.name;
34168 });
34169 Clazz_defineMethod (c$, "getParent", 
34170 function () {
34171 if (this.parent != null) this.parent.checkAccess ();
34172 return this.parent;
34173 });
34174 Clazz_defineMethod (c$, "getMaxPriority", 
34175 function () {
34176 return this.maxPriority;
34177 });
34178 Clazz_defineMethod (c$, "isDaemon", 
34179 function () {
34180 return this.daemon;
34181 });
34182 Clazz_defineMethod (c$, "isDestroyed", 
34183 function () {
34184 return this.destroyed;
34185 });
34186 Clazz_defineMethod (c$, "setDaemon", 
34187 function (daemon) {
34188 this.checkAccess ();
34189 this.daemon = daemon;
34190 }, "~B");
34191 Clazz_defineMethod (c$, "setMaxPriority", 
34192 function (pri) {
34193 var ngroupsSnapshot;
34194 var groupsSnapshot;
34195 {
34196 this.checkAccess ();
34197 if (pri < 1 || pri > 10) {
34198 return;
34199 }this.maxPriority = (this.parent != null) ? Math.min (pri, this.parent.maxPriority) : pri;
34200 ngroupsSnapshot = this.ngroups;
34201 if (this.groups != null) {
34202 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34203 } else {
34204 groupsSnapshot = null;
34205 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34206 groupsSnapshot[i].setMaxPriority (pri);
34207 }
34208 }, "~N");
34209 Clazz_defineMethod (c$, "parentOf", 
34210 function (g) {
34211 for (; g != null; g = g.parent) {
34212 if (g === this) {
34213 return true;
34214 }}
34215 return false;
34216 }, "java.lang.ThreadGroup");
34217 Clazz_defineMethod (c$, "checkAccess", 
34218 function () {
34219 });
34220 Clazz_defineMethod (c$, "activeCount", 
34221 function () {
34222 var result;
34223 var ngroupsSnapshot;
34224 var groupsSnapshot;
34225 {
34226 if (this.destroyed) {
34227 return 0;
34228 }result = this.nthreads;
34229 ngroupsSnapshot = this.ngroups;
34230 if (this.groups != null) {
34231 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34232 } else {
34233 groupsSnapshot = null;
34234 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34235 result += groupsSnapshot[i].activeCount ();
34236 }
34237 return result;
34238 });
34239 Clazz_defineMethod (c$, "enumerate", 
34240 function (list) {
34241 this.checkAccess ();
34242 return this.enumerate (list, 0, true);
34243 }, "~A");
34244 Clazz_defineMethod (c$, "enumerate", 
34245 function (list, recurse) {
34246 this.checkAccess ();
34247 return this.enumerate (list, 0, recurse);
34248 }, "~A,~B");
34249 Clazz_defineMethod (c$, "enumerate", 
34250  function (list, n, recurse) {
34251 var ngroupsSnapshot = 0;
34252 var groupsSnapshot = null;
34253 {
34254 if (this.destroyed) {
34255 return 0;
34256 }var nt = this.nthreads;
34257 if (nt > list.length - n) {
34258 nt = list.length - n;
34259 }for (var i = 0; i < nt; i++) {
34260 if (this.threads[i].isAlive ()) {
34261 list[n++] = this.threads[i];
34262 }}
34263 if (recurse) {
34264 ngroupsSnapshot = this.ngroups;
34265 if (this.groups != null) {
34266 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34267 } else {
34268 groupsSnapshot = null;
34269 }}}if (recurse) {
34270 for (var i = 0; i < ngroupsSnapshot; i++) {
34271 n = groupsSnapshot[i].enumerate (list, n, true);
34272 }
34273 }return n;
34274 }, "~A,~N,~B");
34275 Clazz_defineMethod (c$, "activeGroupCount", 
34276 function () {
34277 var ngroupsSnapshot;
34278 var groupsSnapshot;
34279 {
34280 if (this.destroyed) {
34281 return 0;
34282 }ngroupsSnapshot = this.ngroups;
34283 if (this.groups != null) {
34284 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34285 } else {
34286 groupsSnapshot = null;
34287 }}var n = ngroupsSnapshot;
34288 for (var i = 0; i < ngroupsSnapshot; i++) {
34289 n += groupsSnapshot[i].activeGroupCount ();
34290 }
34291 return n;
34292 });
34293 Clazz_defineMethod (c$, "enumerate", 
34294 function (list) {
34295 this.checkAccess ();
34296 return this.enumerate (list, 0, true);
34297 }, "~A");
34298 Clazz_defineMethod (c$, "enumerate", 
34299 function (list, recurse) {
34300 this.checkAccess ();
34301 return this.enumerate (list, 0, recurse);
34302 }, "~A,~B");
34303 Clazz_defineMethod (c$, "enumerate", 
34304  function (list, n, recurse) {
34305 var ngroupsSnapshot = 0;
34306 var groupsSnapshot = null;
34307 {
34308 if (this.destroyed) {
34309 return 0;
34310 }var ng = this.ngroups;
34311 if (ng > list.length - n) {
34312 ng = list.length - n;
34313 }if (ng > 0) {
34314 System.arraycopy (this.groups, 0, list, n, ng);
34315 n += ng;
34316 }if (recurse) {
34317 ngroupsSnapshot = this.ngroups;
34318 if (this.groups != null) {
34319 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34320 } else {
34321 groupsSnapshot = null;
34322 }}}if (recurse) {
34323 for (var i = 0; i < ngroupsSnapshot; i++) {
34324 n = groupsSnapshot[i].enumerate (list, n, true);
34325 }
34326 }return n;
34327 }, "~A,~N,~B");
34328 Clazz_defineMethod (c$, "stop", 
34329 function () {
34330 if (this.stopOrSuspend (false)) java.lang.Thread.currentThread ().stop ();
34331 });
34332 Clazz_defineMethod (c$, "interrupt", 
34333 function () {
34334 var ngroupsSnapshot;
34335 var groupsSnapshot;
34336 {
34337 this.checkAccess ();
34338 for (var i = 0; i < this.nthreads; i++) {
34339 this.threads[i].interrupt ();
34340 }
34341 ngroupsSnapshot = this.ngroups;
34342 if (this.groups != null) {
34343 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34344 } else {
34345 groupsSnapshot = null;
34346 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34347 groupsSnapshot[i].interrupt ();
34348 }
34349 });
34350 Clazz_defineMethod (c$, "suspend", 
34351 function () {
34352 if (this.stopOrSuspend (true)) java.lang.Thread.currentThread ().suspend ();
34353 });
34354 Clazz_defineMethod (c$, "stopOrSuspend", 
34355  function (suspend) {
34356 var suicide = false;
34357 var us = java.lang.Thread.currentThread ();
34358 var ngroupsSnapshot;
34359 var groupsSnapshot = null;
34360 {
34361 this.checkAccess ();
34362 for (var i = 0; i < this.nthreads; i++) {
34363 if (this.threads[i] === us) suicide = true;
34364  else if (suspend) this.threads[i].suspend ();
34365  else this.threads[i].stop ();
34366 }
34367 ngroupsSnapshot = this.ngroups;
34368 if (this.groups != null) {
34369 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34370 }}for (var i = 0; i < ngroupsSnapshot; i++) suicide = groupsSnapshot[i].stopOrSuspend (suspend) || suicide;
34371
34372 return suicide;
34373 }, "~B");
34374 Clazz_defineMethod (c$, "resume", 
34375 function () {
34376 var ngroupsSnapshot;
34377 var groupsSnapshot;
34378 {
34379 this.checkAccess ();
34380 for (var i = 0; i < this.nthreads; i++) {
34381 this.threads[i].resume ();
34382 }
34383 ngroupsSnapshot = this.ngroups;
34384 if (this.groups != null) {
34385 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34386 } else {
34387 groupsSnapshot = null;
34388 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34389 groupsSnapshot[i].resume ();
34390 }
34391 });
34392 Clazz_defineMethod (c$, "destroy", 
34393 function () {
34394 var ngroupsSnapshot;
34395 var groupsSnapshot;
34396 {
34397 this.checkAccess ();
34398 if (this.destroyed || (this.nthreads > 0)) {
34399 throw  new IllegalThreadStateException ();
34400 }ngroupsSnapshot = this.ngroups;
34401 if (this.groups != null) {
34402 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34403 } else {
34404 groupsSnapshot = null;
34405 }if (this.parent != null) {
34406 this.destroyed = true;
34407 this.ngroups = 0;
34408 this.groups = null;
34409 this.nthreads = 0;
34410 this.threads = null;
34411 }}for (var i = 0; i < ngroupsSnapshot; i += 1) {
34412 groupsSnapshot[i].destroy ();
34413 }
34414 if (this.parent != null) {
34415 this.parent.remove (this);
34416 }});
34417 Clazz_defineMethod (c$, "add", 
34418  function (g) {
34419 {
34420 if (this.destroyed) {
34421 throw  new IllegalThreadStateException ();
34422 }if (this.groups == null) {
34423 this.groups =  new Array (4);
34424 } else if (this.ngroups == this.groups.length) {
34425 this.groups = java.util.Arrays.copyOf (this.groups, this.ngroups * 2);
34426 }this.groups[this.ngroups] = g;
34427 this.ngroups++;
34428 }}, "java.lang.ThreadGroup");
34429 Clazz_defineMethod (c$, "remove", 
34430  function (g) {
34431 {
34432 if (this.destroyed) {
34433 return;
34434 }for (var i = 0; i < this.ngroups; i++) {
34435 if (this.groups[i] === g) {
34436 this.ngroups -= 1;
34437 System.arraycopy (this.groups, i + 1, this.groups, i, this.ngroups - i);
34438 this.groups[this.ngroups] = null;
34439 break;
34440 }}
34441 if (this.nthreads == 0) {
34442 this.notifyAll ();
34443 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34444 this.destroy ();
34445 }}}, "java.lang.ThreadGroup");
34446 Clazz_defineMethod (c$, "addUnstarted", 
34447 function () {
34448 {
34449 if (this.destroyed) {
34450 throw  new IllegalThreadStateException ();
34451 }this.nUnstartedThreads++;
34452 }});
34453 Clazz_defineMethod (c$, "add", 
34454 function (t) {
34455 {
34456 if (this.destroyed) {
34457 throw  new IllegalThreadStateException ();
34458 }if (this.threads == null) {
34459 this.threads =  new Array (4);
34460 } else if (this.nthreads == this.threads.length) {
34461 this.threads = java.util.Arrays.copyOf (this.threads, this.nthreads * 2);
34462 }this.threads[this.nthreads] = t;
34463 this.nthreads++;
34464 this.nUnstartedThreads--;
34465 }}, "java.lang.Thread");
34466 Clazz_defineMethod (c$, "remove", 
34467 function (t) {
34468 {
34469 if (this.destroyed) {
34470 return;
34471 }for (var i = 0; i < this.nthreads; i++) {
34472 if (this.threads[i] === t) {
34473 System.arraycopy (this.threads, i + 1, this.threads, i, --this.nthreads - i);
34474 this.threads[this.nthreads] = null;
34475 break;
34476 }}
34477 if (this.nthreads == 0) {
34478 this.notifyAll ();
34479 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34480 this.destroy ();
34481 }}}, "java.lang.Thread");
34482 Clazz_defineMethod (c$, "uncaughtException", 
34483 function (t, e) {
34484 if (this.parent != null) {
34485 this.parent.uncaughtException (t, e);
34486 } else {
34487 var ueh = java.lang.Thread.getDefaultUncaughtExceptionHandler ();
34488 if (ueh != null) {
34489 ueh.uncaughtException (t, e);
34490 } else if (!(Clazz_instanceOf (e, ThreadDeath))) {
34491 System.err.print ("Exception in thread \"" + t.getName () + "\" ");
34492 e.printStackTrace (System.err);
34493 }}}, "java.lang.Thread,Throwable");
34494 Clazz_overrideMethod (c$, "toString", 
34495 function () {
34496 return this.getClass ().getName () + "[name=" + this.getName () + ",maxpri=" + this.maxPriority + ",html5Applet=" + this.html5Applet + "]";
34497 });
34498 });
34499 Clazz_declarePackage ("java.awt");
34500 Clazz_load (["java.awt.LayoutManager"], "java.awt.FlowLayout", ["java.awt.Dimension"], function () {
34501 c$ = Clazz_decorateAsClass (function () {
34502 this.align = 0;
34503 this.newAlign = 0;
34504 this.hgap = 0;
34505 this.vgap = 0;
34506 this.alignOnBaseline = false;
34507 Clazz_instantialize (this, arguments);
34508 }, java.awt, "FlowLayout", null, [java.awt.LayoutManager, java.io.Serializable]);
34509 Clazz_makeConstructor (c$, 
34510 function () {
34511 this.construct (1, 5, 5);
34512 });
34513 Clazz_makeConstructor (c$, 
34514 function (align) {
34515 this.construct (align, 5, 5);
34516 }, "~N");
34517 Clazz_makeConstructor (c$, 
34518 function (align, hgap, vgap) {
34519 this.hgap = hgap;
34520 this.vgap = vgap;
34521 this.setAlignment (align);
34522 }, "~N,~N,~N");
34523 Clazz_defineMethod (c$, "getAlignment", 
34524 function () {
34525 return this.newAlign;
34526 });
34527 Clazz_defineMethod (c$, "setAlignment", 
34528 function (align) {
34529 this.newAlign = align;
34530 switch (align) {
34531 case 3:
34532 this.align = 0;
34533 break;
34534 case 4:
34535 this.align = 2;
34536 break;
34537 default:
34538 this.align = align;
34539 break;
34540 }
34541 }, "~N");
34542 Clazz_defineMethod (c$, "getHgap", 
34543 function () {
34544 return this.hgap;
34545 });
34546 Clazz_defineMethod (c$, "setHgap", 
34547 function (hgap) {
34548 this.hgap = hgap;
34549 }, "~N");
34550 Clazz_defineMethod (c$, "getVgap", 
34551 function () {
34552 return this.vgap;
34553 });
34554 Clazz_defineMethod (c$, "setVgap", 
34555 function (vgap) {
34556 this.vgap = vgap;
34557 }, "~N");
34558 Clazz_defineMethod (c$, "setAlignOnBaseline", 
34559 function (alignOnBaseline) {
34560 this.alignOnBaseline = alignOnBaseline;
34561 }, "~B");
34562 Clazz_defineMethod (c$, "getAlignOnBaseline", 
34563 function () {
34564 return this.alignOnBaseline;
34565 });
34566 Clazz_overrideMethod (c$, "addLayoutComponent", 
34567 function (name, comp) {
34568 }, "~S,java.awt.Component");
34569 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34570 function (comp) {
34571 }, "java.awt.Component");
34572 Clazz_overrideMethod (c$, "preferredLayoutSize", 
34573 function (target) {
34574 {
34575 var dim =  new java.awt.Dimension (0, 0);
34576 var nmembers = target.getComponentCount ();
34577 var firstVisibleComponent = true;
34578 var useBaseline = this.getAlignOnBaseline ();
34579 var maxAscent = 0;
34580 var maxDescent = 0;
34581 for (var i = 0; i < nmembers; i++) {
34582 var m = target.getComponent (i);
34583 if (m.isVisible ()) {
34584 var d = m.getPreferredSize ();
34585 dim.height = Math.max (dim.height, d.height);
34586 if (firstVisibleComponent) {
34587 firstVisibleComponent = false;
34588 } else {
34589 dim.width += this.hgap;
34590 }dim.width += d.width;
34591 if (useBaseline) {
34592 var baseline = m.getBaseline (d.width, d.height);
34593 if (baseline >= 0) {
34594 maxAscent = Math.max (maxAscent, baseline);
34595 maxDescent = Math.max (maxDescent, d.height - baseline);
34596 }}}}
34597 if (useBaseline) {
34598 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34599 }var insets = target.getInsets ();
34600 dim.width += insets.left + insets.right + this.hgap * 2;
34601 dim.height += insets.top + insets.bottom + this.vgap * 2;
34602 return dim;
34603 }}, "java.awt.Container");
34604 Clazz_overrideMethod (c$, "minimumLayoutSize", 
34605 function (target) {
34606 {
34607 var useBaseline = this.getAlignOnBaseline ();
34608 var dim =  new java.awt.Dimension (0, 0);
34609 var nmembers = target.getComponentCount ();
34610 var maxAscent = 0;
34611 var maxDescent = 0;
34612 var firstVisibleComponent = true;
34613 for (var i = 0; i < nmembers; i++) {
34614 var m = target.getComponent (i);
34615 if (m.visible) {
34616 var d = m.getMinimumSize ();
34617 dim.height = Math.max (dim.height, d.height);
34618 if (firstVisibleComponent) {
34619 firstVisibleComponent = false;
34620 } else {
34621 dim.width += this.hgap;
34622 }dim.width += d.width;
34623 if (useBaseline) {
34624 var baseline = m.getBaseline (d.width, d.height);
34625 if (baseline >= 0) {
34626 maxAscent = Math.max (maxAscent, baseline);
34627 maxDescent = Math.max (maxDescent, dim.height - baseline);
34628 }}}}
34629 if (useBaseline) {
34630 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34631 }var insets = target.getInsets ();
34632 dim.width += insets.left + insets.right + this.hgap * 2;
34633 dim.height += insets.top + insets.bottom + this.vgap * 2;
34634 return dim;
34635 }}, "java.awt.Container");
34636 Clazz_defineMethod (c$, "moveComponents", 
34637  function (target, x, y, width, height, rowStart, rowEnd, ltr, useBaseline, ascent, descent) {
34638 switch (this.newAlign) {
34639 case 0:
34640 x += ltr ? 0 : width;
34641 break;
34642 case 1:
34643 x += Clazz_doubleToInt (width / 2);
34644 break;
34645 case 2:
34646 x += ltr ? width : 0;
34647 break;
34648 case 3:
34649 break;
34650 case 4:
34651 x += width;
34652 break;
34653 }
34654 var maxAscent = 0;
34655 var nonbaselineHeight = 0;
34656 var baselineOffset = 0;
34657 if (useBaseline) {
34658 var maxDescent = 0;
34659 for (var i = rowStart; i < rowEnd; i++) {
34660 var m = target.getComponent (i);
34661 if (m.visible) {
34662 if (ascent[i] >= 0) {
34663 maxAscent = Math.max (maxAscent, ascent[i]);
34664 maxDescent = Math.max (maxDescent, descent[i]);
34665 } else {
34666 nonbaselineHeight = Math.max (m.getHeight (), nonbaselineHeight);
34667 }}}
34668 height = Math.max (maxAscent + maxDescent, nonbaselineHeight);
34669 baselineOffset = Clazz_doubleToInt ((height - maxAscent - maxDescent) / 2);
34670 }for (var i = rowStart; i < rowEnd; i++) {
34671 var m = target.getComponent (i);
34672 if (m.isVisible ()) {
34673 var cy;
34674 if (useBaseline && ascent[i] >= 0) {
34675 cy = y + baselineOffset + maxAscent - ascent[i];
34676 } else {
34677 cy = y + Clazz_doubleToInt ((height - m.height) / 2);
34678 }if (ltr) {
34679 m.setLocation (x, cy);
34680 } else {
34681 m.setLocation (target.width - x - m.width, cy);
34682 }x += m.width + this.hgap;
34683 }}
34684 return height;
34685 }, "java.awt.Container,~N,~N,~N,~N,~N,~N,~B,~B,~A,~A");
34686 Clazz_overrideMethod (c$, "layoutContainer", 
34687 function (target) {
34688 System.out.println ("FlowLayout laying out " + target);
34689 {
34690 var insets = target.getInsets ();
34691 var maxwidth = target.width - (insets.left + insets.right + this.hgap * 2);
34692 var nmembers = target.getComponentCount ();
34693 var x = 0;
34694 var y = insets.top + this.vgap;
34695 var rowh = 0;
34696 var start = 0;
34697 var ltr = target.getComponentOrientation ().isLeftToRight ();
34698 var useBaseline = this.getAlignOnBaseline ();
34699 var ascent = null;
34700 var descent = null;
34701 if (useBaseline) {
34702 ascent =  Clazz_newIntArray (nmembers, 0);
34703 descent =  Clazz_newIntArray (nmembers, 0);
34704 }for (var i = 0; i < nmembers; i++) {
34705 var m = target.getComponent (i);
34706 if (m.isVisible ()) {
34707 var d = m.getPreferredSize ();
34708 m.setSize (d.width, d.height);
34709 if (useBaseline) {
34710 var baseline = m.getBaseline (d.width, d.height);
34711 if (baseline >= 0) {
34712 ascent[i] = baseline;
34713 descent[i] = d.height - baseline;
34714 } else {
34715 ascent[i] = -1;
34716 }}if ((x == 0) || ((x + d.width) <= maxwidth)) {
34717 if (x > 0) {
34718 x += this.hgap;
34719 }x += d.width;
34720 rowh = Math.max (rowh, d.height);
34721 } else {
34722 rowh = this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, i, ltr, useBaseline, ascent, descent);
34723 x = d.width;
34724 y += this.vgap + rowh;
34725 rowh = d.height;
34726 start = i;
34727 }}}
34728 this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, nmembers, ltr, useBaseline, ascent, descent);
34729 }}, "java.awt.Container");
34730 Clazz_overrideMethod (c$, "toString", 
34731 function () {
34732 var str = "";
34733 switch (this.align) {
34734 case 0:
34735 str = ",align=left";
34736 break;
34737 case 1:
34738 str = ",align=center";
34739 break;
34740 case 2:
34741 str = ",align=right";
34742 break;
34743 case 3:
34744 str = ",align=leading";
34745 break;
34746 case 4:
34747 str = ",align=trailing";
34748 break;
34749 }
34750 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + str + "]";
34751 });
34752 Clazz_defineStatics (c$,
34753 "LEFT", 0,
34754 "CENTER", 1,
34755 "RIGHT", 2,
34756 "LEADING", 3,
34757 "TRAILING", 4);
34758 });
34759 Clazz_declarePackage ("java.awt");
34760 Clazz_load (["java.awt.LayoutManager2"], "java.awt.BorderLayout", ["java.lang.IllegalArgumentException", "java.awt.Dimension"], function () {
34761 c$ = Clazz_decorateAsClass (function () {
34762 this.hgap = 0;
34763 this.vgap = 0;
34764 this.north = null;
34765 this.west = null;
34766 this.east = null;
34767 this.south = null;
34768 this.center = null;
34769 this.firstLine = null;
34770 this.lastLine = null;
34771 this.firstItem = null;
34772 this.lastItem = null;
34773 Clazz_instantialize (this, arguments);
34774 }, java.awt, "BorderLayout", null, [java.awt.LayoutManager2, java.io.Serializable]);
34775 Clazz_makeConstructor (c$, 
34776 function () {
34777 this.construct (0, 0);
34778 });
34779 Clazz_makeConstructor (c$, 
34780 function (hgap, vgap) {
34781 this.hgap = hgap;
34782 this.vgap = vgap;
34783 }, "~N,~N");
34784 Clazz_defineMethod (c$, "getHgap", 
34785 function () {
34786 return this.hgap;
34787 });
34788 Clazz_defineMethod (c$, "setHgap", 
34789 function (hgap) {
34790 this.hgap = hgap;
34791 }, "~N");
34792 Clazz_defineMethod (c$, "getVgap", 
34793 function () {
34794 return this.vgap;
34795 });
34796 Clazz_defineMethod (c$, "setVgap", 
34797 function (vgap) {
34798 this.vgap = vgap;
34799 }, "~N");
34800 Clazz_defineMethod (c$, "addLayoutComponent", 
34801 function (comp, constraints) {
34802 {
34803 if ((constraints == null) || (Clazz_instanceOf (constraints, String))) {
34804 this.addLayoutComponent (constraints, comp);
34805 } else {
34806 throw  new IllegalArgumentException ("cannot add to layout: constraint must be a string (or null)");
34807 }}}, "java.awt.Component,~O");
34808 Clazz_defineMethod (c$, "addLayoutComponent", 
34809 function (name, comp) {
34810 {
34811 if (name == null) {
34812 name = "Center";
34813 }System.out.println ("BorderLayout adding " + name + " " + comp);
34814 if ("Center".equals (name)) {
34815 this.center = comp;
34816 } else if ("North".equals (name)) {
34817 this.north = comp;
34818 } else if ("South".equals (name)) {
34819 this.south = comp;
34820 } else if ("East".equals (name)) {
34821 this.east = comp;
34822 } else if ("West".equals (name)) {
34823 this.west = comp;
34824 } else if ("First".equals (name)) {
34825 this.firstLine = comp;
34826 } else if ("Last".equals (name)) {
34827 this.lastLine = comp;
34828 } else if ("Before".equals (name)) {
34829 this.firstItem = comp;
34830 } else if ("After".equals (name)) {
34831 this.lastItem = comp;
34832 } else {
34833 throw  new IllegalArgumentException ("cannot add to layout: unknown constraint: " + name);
34834 }}}, "~S,java.awt.Component");
34835 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34836 function (comp) {
34837 {
34838 if (comp === this.center) {
34839 this.center = null;
34840 } else if (comp === this.north) {
34841 this.north = null;
34842 } else if (comp === this.south) {
34843 this.south = null;
34844 } else if (comp === this.east) {
34845 this.east = null;
34846 } else if (comp === this.west) {
34847 this.west = null;
34848 }if (comp === this.firstLine) {
34849 this.firstLine = null;
34850 } else if (comp === this.lastLine) {
34851 this.lastLine = null;
34852 } else if (comp === this.firstItem) {
34853 this.firstItem = null;
34854 } else if (comp === this.lastItem) {
34855 this.lastItem = null;
34856 }}}, "java.awt.Component");
34857 Clazz_defineMethod (c$, "getLayoutComponent", 
34858 function (constraints) {
34859 if ("Center".equals (constraints)) {
34860 return this.center;
34861 } else if ("North".equals (constraints)) {
34862 return this.north;
34863 } else if ("South".equals (constraints)) {
34864 return this.south;
34865 } else if ("West".equals (constraints)) {
34866 return this.west;
34867 } else if ("East".equals (constraints)) {
34868 return this.east;
34869 } else if ("First".equals (constraints)) {
34870 return this.firstLine;
34871 } else if ("Last".equals (constraints)) {
34872 return this.lastLine;
34873 } else if ("Before".equals (constraints)) {
34874 return this.firstItem;
34875 } else if ("After".equals (constraints)) {
34876 return this.lastItem;
34877 } else {
34878 throw  new IllegalArgumentException ("cannot get component: unknown constraint: " + constraints);
34879 }}, "~O");
34880 Clazz_defineMethod (c$, "getLayoutComponent", 
34881 function (target, constraints) {
34882 var ltr = target.getComponentOrientation ().isLeftToRight ();
34883 var result = null;
34884 if ("North".equals (constraints)) {
34885 result = (this.firstLine != null) ? this.firstLine : this.north;
34886 } else if ("South".equals (constraints)) {
34887 result = (this.lastLine != null) ? this.lastLine : this.south;
34888 } else if ("West".equals (constraints)) {
34889 result = ltr ? this.firstItem : this.lastItem;
34890 if (result == null) {
34891 result = this.west;
34892 }} else if ("East".equals (constraints)) {
34893 result = ltr ? this.lastItem : this.firstItem;
34894 if (result == null) {
34895 result = this.east;
34896 }} else if ("Center".equals (constraints)) {
34897 result = this.center;
34898 } else {
34899 throw  new IllegalArgumentException ("cannot get component: invalid constraint: " + constraints);
34900 }return result;
34901 }, "java.awt.Container,~O");
34902 Clazz_defineMethod (c$, "getConstraints", 
34903 function (comp) {
34904 if (comp == null) {
34905 return null;
34906 }if (comp === this.center) {
34907 return "Center";
34908 } else if (comp === this.north) {
34909 return "North";
34910 } else if (comp === this.south) {
34911 return "South";
34912 } else if (comp === this.west) {
34913 return "West";
34914 } else if (comp === this.east) {
34915 return "East";
34916 } else if (comp === this.firstLine) {
34917 return "First";
34918 } else if (comp === this.lastLine) {
34919 return "Last";
34920 } else if (comp === this.firstItem) {
34921 return "Before";
34922 } else if (comp === this.lastItem) {
34923 return "After";
34924 }return null;
34925 }, "java.awt.Component");
34926 Clazz_overrideMethod (c$, "minimumLayoutSize", 
34927 function (target) {
34928 {
34929 var dim =  new java.awt.Dimension (0, 0);
34930 var ltr = target.getComponentOrientation ().isLeftToRight ();
34931 var c = null;
34932 if ((c = this.getChild ("East", ltr)) != null) {
34933 var d = c.getMinimumSize ();
34934 dim.width += d.width + this.hgap;
34935 dim.height = Math.max (d.height, dim.height);
34936 }if ((c = this.getChild ("West", ltr)) != null) {
34937 var d = c.getMinimumSize ();
34938 dim.width += d.width + this.hgap;
34939 dim.height = Math.max (d.height, dim.height);
34940 }if ((c = this.getChild ("Center", ltr)) != null) {
34941 var d = c.getMinimumSize ();
34942 dim.width += d.width;
34943 dim.height = Math.max (d.height, dim.height);
34944 }if ((c = this.getChild ("North", ltr)) != null) {
34945 var d = c.getMinimumSize ();
34946 dim.width = Math.max (d.width, dim.width);
34947 dim.height += d.height + this.vgap;
34948 }if ((c = this.getChild ("South", ltr)) != null) {
34949 var d = c.getMinimumSize ();
34950 dim.width = Math.max (d.width, dim.width);
34951 dim.height += d.height + this.vgap;
34952 }var insets = target.getInsets ();
34953 dim.width += insets.left + insets.right;
34954 dim.height += insets.top + insets.bottom;
34955 return dim;
34956 }}, "java.awt.Container");
34957 Clazz_overrideMethod (c$, "preferredLayoutSize", 
34958 function (target) {
34959 {
34960 var dim =  new java.awt.Dimension (0, 0);
34961 var ltr = target.getComponentOrientation ().isLeftToRight ();
34962 var c = null;
34963 if ((c = this.getChild ("East", ltr)) != null) {
34964 var d = c.getPreferredSize ();
34965 dim.width += d.width + this.hgap;
34966 dim.height = Math.max (d.height, dim.height);
34967 }if ((c = this.getChild ("West", ltr)) != null) {
34968 var d = c.getPreferredSize ();
34969 dim.width += d.width + this.hgap;
34970 dim.height = Math.max (d.height, dim.height);
34971 }if ((c = this.getChild ("Center", ltr)) != null) {
34972 var d = c.getPreferredSize ();
34973 dim.width += d.width;
34974 dim.height = Math.max (d.height, dim.height);
34975 }if ((c = this.getChild ("North", ltr)) != null) {
34976 var d = c.getPreferredSize ();
34977 dim.width = Math.max (d.width, dim.width);
34978 dim.height += d.height + this.vgap;
34979 }if ((c = this.getChild ("South", ltr)) != null) {
34980 var d = c.getPreferredSize ();
34981 dim.width = Math.max (d.width, dim.width);
34982 dim.height += d.height + this.vgap;
34983 }var insets = target.getInsets ();
34984 dim.width += insets.left + insets.right;
34985 dim.height += insets.top + insets.bottom;
34986 return dim;
34987 }}, "java.awt.Container");
34988 Clazz_overrideMethod (c$, "maximumLayoutSize", 
34989 function (target) {
34990 return  new java.awt.Dimension (2147483647, 2147483647);
34991 }, "java.awt.Container");
34992 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
34993 function (parent) {
34994 return 0.5;
34995 }, "java.awt.Container");
34996 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
34997 function (parent) {
34998 return 0.5;
34999 }, "java.awt.Container");
35000 Clazz_overrideMethod (c$, "invalidateLayout", 
35001 function (target) {
35002 }, "java.awt.Container");
35003 Clazz_overrideMethod (c$, "layoutContainer", 
35004 function (target) {
35005 System.out.println ("BorderLayout laying out " + target);
35006 {
35007 var insets = target.getInsets ();
35008 var top = insets.top;
35009 var bottom = target.height - insets.bottom;
35010 var left = insets.left;
35011 var right = target.width - insets.right;
35012 var ltr = target.getComponentOrientation ().isLeftToRight ();
35013 var c = null;
35014 if ((c = this.getChild ("North", ltr)) != null) {
35015 c.setSize (right - left, c.height);
35016 var d = c.getPreferredSize ();
35017 c.setBounds (left, top, right - left, d.height);
35018 top += d.height + this.vgap;
35019 }if ((c = this.getChild ("South", ltr)) != null) {
35020 c.setSize (right - left, c.height);
35021 var d = c.getPreferredSize ();
35022 c.setBounds (left, bottom - d.height, right - left, d.height);
35023 bottom -= d.height + this.vgap;
35024 }if ((c = this.getChild ("East", ltr)) != null) {
35025 c.setSize (c.width, bottom - top);
35026 var d = c.getPreferredSize ();
35027 c.setBounds (right - d.width, top, d.width, bottom - top);
35028 right -= d.width + this.hgap;
35029 }if ((c = this.getChild ("West", ltr)) != null) {
35030 c.setSize (c.width, bottom - top);
35031 var d = c.getPreferredSize ();
35032 c.setBounds (left, top, d.width, bottom - top);
35033 left += d.width + this.hgap;
35034 }if ((c = this.getChild ("Center", ltr)) != null) {
35035 c.setBounds (left, top, right - left, bottom - top);
35036 }}}, "java.awt.Container");
35037 Clazz_defineMethod (c$, "getChild", 
35038  function (key, ltr) {
35039 var result = null;
35040 if (key === "North") {
35041 result = (this.firstLine != null) ? this.firstLine : this.north;
35042 } else if (key === "South") {
35043 result = (this.lastLine != null) ? this.lastLine : this.south;
35044 } else if (key === "West") {
35045 result = ltr ? this.firstItem : this.lastItem;
35046 if (result == null) {
35047 result = this.west;
35048 }} else if (key === "East") {
35049 result = ltr ? this.lastItem : this.firstItem;
35050 if (result == null) {
35051 result = this.east;
35052 }} else if (key === "Center") {
35053 result = this.center;
35054 }if (result != null && !result.visible) {
35055 result = null;
35056 }return result;
35057 }, "~S,~B");
35058 Clazz_overrideMethod (c$, "toString", 
35059 function () {
35060 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + "]";
35061 });
35062 Clazz_defineStatics (c$,
35063 "NORTH", "North",
35064 "SOUTH", "South",
35065 "EAST", "East",
35066 "WEST", "West",
35067 "CENTER", "Center",
35068 "BEFORE_FIRST_LINE", "First",
35069 "AFTER_LAST_LINE", "Last",
35070 "BEFORE_LINE_BEGINS", "Before",
35071 "AFTER_LINE_ENDS", "After");
35072 c$.PAGE_START = c$.prototype.PAGE_START = "First";
35073 c$.PAGE_END = c$.prototype.PAGE_END = "Last";
35074 c$.LINE_START = c$.prototype.LINE_START = "Before";
35075 c$.LINE_END = c$.prototype.LINE_END = "After";
35076 });
35077 Clazz_declarePackage ("java.awt");
35078 Clazz_load (["java.awt.LayoutManager"], "java.awt.LayoutManager2", null, function () {
35079 Clazz_declareInterface (java.awt, "LayoutManager2", java.awt.LayoutManager);
35080 });
35081 Clazz_declarePackage ("java.awt");
35082 Clazz_declareInterface (java.awt, "LayoutManager");
35083 Clazz_declarePackage ("java.awt");
35084 Clazz_load (["jssun.awt.SunGraphicsCallback"], "java.awt.GraphicsCallback", null, function () {
35085 c$ = Clazz_declareType (java.awt, "GraphicsCallback", jssun.awt.SunGraphicsCallback);
35086 Clazz_pu$h(self.c$);
35087 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintCallback", java.awt.GraphicsCallback);
35088 Clazz_makeConstructor (c$, 
35089  function () {
35090 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintCallback, []);
35091 });
35092 Clazz_overrideMethod (c$, "run", 
35093 function (a, b) {
35094 a.paint (b);
35095 }, "java.awt.Component,java.awt.Graphics");
35096 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35097 function () {
35098 return java.awt.GraphicsCallback.PaintCallback.instance;
35099 });
35100 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintCallback ();
35101 c$ = Clazz_p0p ();
35102 Clazz_pu$h(self.c$);
35103 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintAllCallback", java.awt.GraphicsCallback);
35104 Clazz_makeConstructor (c$, 
35105  function () {
35106 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintAllCallback, []);
35107 });
35108 Clazz_overrideMethod (c$, "run", 
35109 function (a, b) {
35110 a.paintAll (b);
35111 }, "java.awt.Component,java.awt.Graphics");
35112 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35113 function () {
35114 return java.awt.GraphicsCallback.PaintAllCallback.instance;
35115 });
35116 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintAllCallback ();
35117 c$ = Clazz_p0p ();
35118 Clazz_pu$h(self.c$);
35119 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintHeavyweightComponentsCallback", java.awt.GraphicsCallback);
35120 Clazz_makeConstructor (c$, 
35121  function () {
35122 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback, []);
35123 });
35124 Clazz_overrideMethod (c$, "run", 
35125 function (a, b) {
35126 if (a.isLightweight ()) {
35127 a.paintHeavyweightComponents (b);
35128 } else {
35129 a.paintAll (b);
35130 }}, "java.awt.Component,java.awt.Graphics");
35131 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35132 function () {
35133 return java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.instance;
35134 });
35135 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback ();
35136 c$ = Clazz_p0p ();
35137 });
35138 Clazz_declarePackage ("java.awt");
35139 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 () {
35140 c$ = Clazz_decorateAsClass (function () {
35141 this.component = null;
35142 this.layoutMgr = null;
35143 this.dispatcher = null;
35144 this.focusCycleRoot = false;
35145 this.focusTraversalPolicyProvider = false;
35146 this.containerListener = null;
35147 this.listeningChildren = 0;
35148 this.listeningBoundsChildren = 0;
35149 this.descendantsCount = 0;
35150 this.preserveBackgroundColor = null;
35151 this.numOfHWComponents = 0;
35152 this.numOfLWComponents = 0;
35153 this.modalComp = null;
35154 this.modalAppContext = null;
35155 Clazz_instantialize (this, arguments);
35156 }, java.awt, "Container", java.awt.Component);
35157 Clazz_makeConstructor (c$, 
35158 function () {
35159 Clazz_superConstructor (this, java.awt.Container, []);
35160 this.component =  new java.util.ArrayList ();
35161 });
35162 Clazz_defineMethod (c$, "initializeFocusTraversalKeys", 
35163 function () {
35164 });
35165 Clazz_defineMethod (c$, "getComponentCount", 
35166 function () {
35167 return this.countComponents ();
35168 });
35169 Clazz_defineMethod (c$, "countComponents", 
35170 function () {
35171 return this.component.size ();
35172 });
35173 Clazz_defineMethod (c$, "getComponent", 
35174 function (n) {
35175 if ((n < 0) || (n >= this.component.size ())) {
35176 throw  new ArrayIndexOutOfBoundsException ("No such child: " + n);
35177 }return this.component.get (n);
35178 }, "~N");
35179 Clazz_defineMethod (c$, "getComponents", 
35180 function () {
35181 return this.getComponents_NoClientCode ();
35182 });
35183 Clazz_defineMethod (c$, "getComponents_NoClientCode", 
35184 function () {
35185 return this.component.toArray (java.awt.Container.EMPTY_ARRAY);
35186 });
35187 Clazz_defineMethod (c$, "getInsets", 
35188 function () {
35189 var peer = this.peer;
35190 if (Clazz_instanceOf (peer, java.awt.peer.ContainerPeer)) {
35191 var cpeer = peer;
35192 return cpeer.getInsets ().clone ();
35193 }return  new java.awt.Insets (0, 0, 0, 0);
35194 });
35195 Clazz_defineMethod (c$, "checkAddToSelf", 
35196  function (comp) {
35197 if (Clazz_instanceOf (comp, java.awt.Container)) {
35198 for (var cn = this; cn != null; cn = cn.parent) {
35199 if (cn === comp) {
35200 throw  new IllegalArgumentException ("adding container's parent to itself");
35201 }}
35202 }}, "java.awt.Component");
35203 Clazz_defineMethod (c$, "checkNotAWindow", 
35204  function (comp) {
35205 if (Clazz_instanceOf (comp, java.awt.Window)) {
35206 throw  new IllegalArgumentException ("adding a window to a container");
35207 }}, "java.awt.Component");
35208 Clazz_defineMethod (c$, "removeDelicately", 
35209  function (comp, newParent, newIndex) {
35210 var index = this.getComponentZOrder (comp);
35211 var needRemoveNotify = java.awt.Container.isRemoveNotifyNeeded (comp, this, newParent);
35212 if (needRemoveNotify) {
35213 comp.removeNotify ();
35214 }if (newParent !== this) {
35215 if (this.layoutMgr != null) {
35216 this.layoutMgr.removeLayoutComponent (comp);
35217 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35218 this.adjustListeningChildren (65536, -comp.numListening (65536));
35219 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35220 comp.parent = null;
35221 this.component.remove (index);
35222 this.invalidateIfValid ();
35223 } else {
35224 this.component.remove (index);
35225 this.component.add (newIndex, comp);
35226 }if (comp.parent == null) {
35227 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35228 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35229 this.dispatchEvent (e);
35230 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35231 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35232 this.updateCursorImmediately ();
35233 }}return needRemoveNotify;
35234 }, "java.awt.Component,java.awt.Container,~N");
35235 Clazz_defineMethod (c$, "canContainFocusOwner", 
35236 function (focusOwnerCandidate) {
35237 if (!(this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ())) {
35238 return false;
35239 }{
35240 if (this.parent != null) {
35241 return this.parent.canContainFocusOwner (focusOwnerCandidate);
35242 }}return true;
35243 }, "java.awt.Component");
35244 Clazz_defineMethod (c$, "hasHeavyweightDescendants", 
35245 function () {
35246 return this.numOfHWComponents > 0;
35247 });
35248 Clazz_defineMethod (c$, "hasLightweightDescendants", 
35249 function () {
35250 return this.numOfLWComponents > 0;
35251 });
35252 Clazz_defineMethod (c$, "getHeavyweightContainer", 
35253 function () {
35254 if (this.peer != null && !(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35255 return this;
35256 } else {
35257 return this.getNativeContainer ();
35258 }});
35259 c$.isRemoveNotifyNeeded = Clazz_defineMethod (c$, "isRemoveNotifyNeeded", 
35260  function (comp, oldContainer, newContainer) {
35261 return false;
35262 }, "java.awt.Component,java.awt.Container,java.awt.Container");
35263 Clazz_defineMethod (c$, "setComponentZOrder", 
35264 function (comp, index) {
35265 {
35266 var curParent = comp.parent;
35267 var oldZindex = this.getComponentZOrder (comp);
35268 if (curParent === this && index == oldZindex) {
35269 return;
35270 }var peerRecreated = (curParent != null) ? curParent.removeDelicately (comp, this, index) : false;
35271 this.addDelicately (comp, curParent, index);
35272 if (!peerRecreated && oldZindex != -1) {
35273 comp.mixOnZOrderChanging (oldZindex, index);
35274 }}}, "java.awt.Component,~N");
35275 Clazz_defineMethod (c$, "reparentTraverse", 
35276  function (parentPeer, child) {
35277 this.checkTreeLock ();
35278 for (var i = 0; i < child.getComponentCount (); i++) {
35279 var comp = child.getComponent (i);
35280 if (comp.isLightweight ()) {
35281 if (Clazz_instanceOf (comp, java.awt.Container)) {
35282 this.reparentTraverse (parentPeer, comp);
35283 }} else {
35284 comp.getPeer ().reparent (parentPeer);
35285 }}
35286 }, "java.awt.peer.ContainerPeer,java.awt.Container");
35287 Clazz_defineMethod (c$, "reparentChild", 
35288  function (comp) {
35289 if (comp == null) {
35290 return;
35291 }if (comp.isLightweight ()) {
35292 if (Clazz_instanceOf (comp, java.awt.Container)) {
35293 this.reparentTraverse (this.getPeer (), comp);
35294 }} else {
35295 comp.getPeer ().reparent (this.getPeer ());
35296 }}, "java.awt.Component");
35297 Clazz_defineMethod (c$, "addDelicately", 
35298  function (comp, curParent, index) {
35299 this.checkTreeLock ();
35300 if (curParent !== this) {
35301 if (index == -1) {
35302 this.component.add (comp);
35303 } else {
35304 this.component.add (index, comp);
35305 }comp.parent = this;
35306 this.adjustListeningChildren (32768, comp.numListening (32768));
35307 this.adjustListeningChildren (65536, comp.numListening (65536));
35308 this.adjustDescendants (comp.countHierarchyMembers ());
35309 } else {
35310 if (index < this.component.size ()) {
35311 this.component.set (index, comp);
35312 }}this.invalidateIfValid ();
35313 if (this.peer != null) {
35314 if (comp.peer == null) {
35315 comp.addNotify ();
35316 } else {
35317 var newNativeContainer = this.getHeavyweightContainer ();
35318 var oldNativeContainer = curParent.getHeavyweightContainer ();
35319 if (oldNativeContainer !== newNativeContainer) {
35320 newNativeContainer.reparentChild (comp);
35321 }if (!comp.isLightweight () && this.isLightweight ()) {
35322 comp.relocateComponent ();
35323 }}}if (curParent !== this) {
35324 if (this.layoutMgr != null) {
35325 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35326 (this.layoutMgr).addLayoutComponent (comp, null);
35327 } else {
35328 this.layoutMgr.addLayoutComponent (null, comp);
35329 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35330 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35331 this.dispatchEvent (e);
35332 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35333 } else {
35334 comp.createHierarchyEvents (1400, comp, this, 1400, java.awt.Toolkit.enabledOnToolkit (32768));
35335 }if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35336 this.updateCursorImmediately ();
35337 }}, "java.awt.Component,java.awt.Container,~N");
35338 Clazz_defineMethod (c$, "checkTreeLock", 
35339  function () {
35340 });
35341 Clazz_defineMethod (c$, "getComponentZOrder", 
35342 function (comp) {
35343 if (comp == null) {
35344 return -1;
35345 }{
35346 if (comp.parent !== this) {
35347 return -1;
35348 }return this.component.indexOf (comp);
35349 }}, "java.awt.Component");
35350 Clazz_defineMethod (c$, "add", 
35351 function (comp, constraints, index) {
35352 {
35353 switch (arguments.length) {
35354 case 1:
35355 constraints = null;
35356 index = -1;
35357 break;
35358 case 2:
35359 if (typeof comp == "string") {
35360 index = -1;
35361 var c = constraints;
35362 constraints = comp;
35363 comp = c;
35364 } else if (typeof constraints == "number") {
35365 index = constraints;
35366 constraints = null;
35367 } else {
35368 index = -1;
35369 }
35370 break;
35371 }
35372 }return this.addImpl (comp, constraints, index);
35373 }, "java.awt.Component,~O,~N");
35374 Clazz_defineMethod (c$, "addImpl", 
35375 function (comp, constraints, index) {
35376 return this.addImplSAEM (comp, constraints, index);
35377 }, "java.awt.Component,~O,~N");
35378 Clazz_defineMethod (c$, "addImplSAEM", 
35379 function (comp, constraints, index) {
35380 {
35381 if (index > this.component.size () || (index < 0 && index != -1)) {
35382 throw  new IllegalArgumentException ("illegal component position");
35383 }this.checkAddToSelf (comp);
35384 this.checkNotAWindow (comp);
35385 if (comp.parent != null) {
35386 comp.parent.remove (comp);
35387 if (index > this.component.size ()) {
35388 throw  new IllegalArgumentException ("illegal component position");
35389 }}if (index == -1) {
35390 this.component.add (comp);
35391 } else {
35392 this.component.add (index, comp);
35393 }comp.parent = this;
35394 this.adjustListeningChildren (32768, comp.numListening (32768));
35395 this.adjustListeningChildren (65536, comp.numListening (65536));
35396 this.adjustDescendants (comp.countHierarchyMembers ());
35397 this.invalidateIfValid ();
35398 if (this.peer != null) {
35399 comp.addNotify ();
35400 }if (this.layoutMgr != null) {
35401 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35402 (this.layoutMgr).addLayoutComponent (comp, constraints);
35403 } else if (Clazz_instanceOf (constraints, String)) {
35404 this.layoutMgr.addLayoutComponent (constraints, comp);
35405 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35406 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35407 this.dispatchEvent (e);
35408 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35409 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35410 this.updateCursorImmediately ();
35411 }}return comp;
35412 }, "java.awt.Component,~O,~N");
35413 Clazz_defineMethod (c$, "checkGD", 
35414 function (stringID) {
35415 }, "~S");
35416 Clazz_defineMethod (c$, "removeInt", 
35417 function (index) {
35418 {
35419 if (index < 0 || index >= this.component.size ()) {
35420 throw  new ArrayIndexOutOfBoundsException (index);
35421 }var comp = this.component.get (index);
35422 if (this.peer != null) {
35423 comp.removeNotify ();
35424 }if (this.layoutMgr != null) {
35425 this.layoutMgr.removeLayoutComponent (comp);
35426 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35427 this.adjustListeningChildren (65536, -comp.numListening (65536));
35428 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35429 comp.parent = null;
35430 this.component.remove (index);
35431 this.invalidateIfValid ();
35432 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35433 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35434 this.dispatchEvent (e);
35435 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35436 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35437 this.updateCursorImmediately ();
35438 }}}, "~N");
35439 Clazz_defineMethod (c$, "remove", 
35440 function (comp) {
35441 this.removeChild (comp);
35442 }, "java.awt.Component");
35443 Clazz_defineMethod (c$, "removeChild", 
35444 function (comp) {
35445 {
35446 if (comp.parent === this) {
35447 var index = this.component.indexOf (comp);
35448 if (index >= 0) {
35449 this.remove (index);
35450 }}}}, "java.awt.Component");
35451 Clazz_defineMethod (c$, "removeAll", 
35452 function () {
35453 {
35454 this.adjustListeningChildren (32768, -this.listeningChildren);
35455 this.adjustListeningChildren (65536, -this.listeningBoundsChildren);
35456 this.adjustDescendants (-this.descendantsCount);
35457 while (!this.component.isEmpty ()) {
35458 var comp = this.component.remove (this.component.size () - 1);
35459 if (this.peer != null) {
35460 comp.removeNotify ();
35461 }if (this.layoutMgr != null) {
35462 this.layoutMgr.removeLayoutComponent (comp);
35463 }comp.parent = null;
35464 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35465 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35466 this.dispatchEvent (e);
35467 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35468 }
35469 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35470 this.updateCursorImmediately ();
35471 }this.invalidateIfValid ();
35472 }});
35473 Clazz_defineMethod (c$, "numListening", 
35474 function (mask) {
35475 var superListening = this.numListeningMask (mask);
35476 if (mask == 32768) {
35477 return this.listeningChildren + superListening;
35478 } else if (mask == 65536) {
35479 return this.listeningBoundsChildren + superListening;
35480 } else {
35481 return superListening;
35482 }}, "~N");
35483 Clazz_defineMethod (c$, "adjustListeningChildren", 
35484 function (mask, num) {
35485 if (num == 0) return;
35486 if ((mask & 32768) != 0) {
35487 this.listeningChildren += num;
35488 }if ((mask & 65536) != 0) {
35489 this.listeningBoundsChildren += num;
35490 }this.adjustListeningChildrenOnParent (mask, num);
35491 }, "~N,~N");
35492 Clazz_defineMethod (c$, "adjustDescendants", 
35493 function (num) {
35494 if (num == 0) return;
35495 this.descendantsCount += num;
35496 this.adjustDecendantsOnParent (num);
35497 }, "~N");
35498 Clazz_defineMethod (c$, "adjustDecendantsOnParent", 
35499 function (num) {
35500 if (this.parent != null) {
35501 this.parent.adjustDescendants (num);
35502 }}, "~N");
35503 Clazz_defineMethod (c$, "countHierarchyMembers", 
35504 function () {
35505 return this.descendantsCount + 1;
35506 });
35507 Clazz_defineMethod (c$, "getListenersCount", 
35508  function (id, enabledOnToolkit) {
35509 if (enabledOnToolkit) {
35510 return this.descendantsCount;
35511 }switch (id) {
35512 case 1400:
35513 return this.listeningChildren;
35514 case 1401:
35515 case 1402:
35516 return this.listeningBoundsChildren;
35517 default:
35518 return 0;
35519 }
35520 }, "~N,~B");
35521 Clazz_defineMethod (c$, "createHierarchyEvents", 
35522 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
35523 var listeners = this.getListenersCount (id, enabledOnToolkit);
35524 for (var count = listeners, i = 0; count > 0; i++) {
35525 count -= this.component.get (i).createHierarchyEvents (id, changed, changedParent, changeFlags, enabledOnToolkit);
35526 }
35527 return listeners + this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
35528 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
35529 Clazz_defineMethod (c$, "createChildHierarchyEvents", 
35530 function (id, changeFlags, enabledOnToolkit) {
35531 if (this.component.isEmpty ()) {
35532 return;
35533 }var listeners = this.getListenersCount (id, enabledOnToolkit);
35534 for (var count = listeners, i = 0; count > 0; i++) {
35535 count -= this.component.get (i).createHierarchyEvents (id, this, this.parent, changeFlags, enabledOnToolkit);
35536 }
35537 }, "~N,~N,~B");
35538 Clazz_defineMethod (c$, "getLayout", 
35539 function () {
35540 return this.layoutMgr;
35541 });
35542 Clazz_defineMethod (c$, "setLayout", 
35543 function (mgr) {
35544 this.layoutMgr = mgr;
35545 this.invalidateIfValid ();
35546 }, "java.awt.LayoutManager");
35547 Clazz_overrideMethod (c$, "doLayout", 
35548 function () {
35549 this.layout ();
35550 });
35551 Clazz_overrideMethod (c$, "layout", 
35552 function () {
35553 var layoutMgr = this.layoutMgr;
35554 if (layoutMgr != null) {
35555 layoutMgr.layoutContainer (this);
35556 }});
35557 Clazz_overrideMethod (c$, "invalidate", 
35558 function () {
35559 var layoutMgr = this.layoutMgr;
35560 if (Clazz_instanceOf (layoutMgr, java.awt.LayoutManager2)) {
35561 var lm = layoutMgr;
35562 lm.invalidateLayout (this);
35563 }this.invalidateComp ();
35564 });
35565 Clazz_overrideMethod (c$, "validate", 
35566 function () {
35567 if (!this.isValid ()) {
35568 var updateCur = false;
35569 {
35570 if (!this.isValid () && this.peer != null) {
35571 var p = null;
35572 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35573 p = this.peer;
35574 }if (p != null) {
35575 p.beginValidate ();
35576 }this.validateTree ();
35577 if (p != null) {
35578 p.endValidate ();
35579 updateCur = this.isVisible ();
35580 }}}if (updateCur) {
35581 this.updateCursorImmediately ();
35582 }}});
35583 Clazz_defineMethod (c$, "validateTree", 
35584 function () {
35585 if (!this.isValid ()) {
35586 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35587 (this.peer).beginLayout ();
35588 }this.doLayout ();
35589 for (var i = 0; i < this.component.size (); i++) {
35590 var comp = this.component.get (i);
35591 if ((Clazz_instanceOf (comp, java.awt.Container)) && !(Clazz_instanceOf (comp, java.awt.Window)) && !comp.isValid ()) {
35592 (comp).validateTree ();
35593 } else {
35594 comp.validate ();
35595 }}
35596 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35597 (this.peer).endLayout ();
35598 }}this.validateComponent ();
35599 });
35600 Clazz_defineMethod (c$, "invalidateTree", 
35601 function () {
35602 {
35603 for (var i = 0; i < this.component.size (); i++) {
35604 var comp = this.component.get (i);
35605 if (Clazz_instanceOf (comp, java.awt.Container)) {
35606 (comp).invalidateTree ();
35607 } else {
35608 comp.invalidateIfValid ();
35609 }}
35610 this.invalidateIfValid ();
35611 }});
35612 Clazz_overrideMethod (c$, "setFont", 
35613 function (f) {
35614 var oldfont = this.getFont ();
35615 this.setFontComp (f);
35616 var newfont = this.getFont ();
35617 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
35618 this.invalidateTree ();
35619 }}, "java.awt.Font");
35620 Clazz_overrideMethod (c$, "getPreferredSize", 
35621 function () {
35622 return this.preferredSize ();
35623 });
35624 Clazz_overrideMethod (c$, "preferredSize", 
35625 function () {
35626 var dim = this.prefSize;
35627 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
35628 {
35629 this.prefSize = (this.layoutMgr != null) ? this.layoutMgr.preferredLayoutSize (this) : this.prefSizeComp ();
35630 dim = this.prefSize;
35631 }}return (dim == null ? null :  new java.awt.Dimension (dim));
35632 });
35633 Clazz_overrideMethod (c$, "getMinimumSize", 
35634 function () {
35635 var dim = this.minSize;
35636 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
35637 {
35638 this.minSize = (this.layoutMgr != null) ? this.layoutMgr.minimumLayoutSize (this) : this.minimumSize ();
35639 dim = this.minSize;
35640 }}if (dim != null) {
35641 return  new java.awt.Dimension (dim);
35642 } else {
35643 return dim;
35644 }});
35645 Clazz_overrideMethod (c$, "getMaximumSize", 
35646 function () {
35647 var dim = this.maxSize;
35648 if (dim == null || !(this.isMaximumSizeSet () || this.isValid ())) {
35649 {
35650 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35651 var lm = this.layoutMgr;
35652 this.maxSize = lm.maximumLayoutSize (this);
35653 } else {
35654 this.maxSize = this.getMaxSizeComp ();
35655 }dim = this.maxSize;
35656 }}if (dim != null) {
35657 return  new java.awt.Dimension (dim);
35658 } else {
35659 return dim;
35660 }});
35661 Clazz_overrideMethod (c$, "getAlignmentX", 
35662 function () {
35663 var xAlign;
35664 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35665 {
35666 var lm = this.layoutMgr;
35667 xAlign = lm.getLayoutAlignmentX (this);
35668 }} else {
35669 xAlign = this.getAlignmentXComp ();
35670 }return xAlign;
35671 });
35672 Clazz_overrideMethod (c$, "getAlignmentY", 
35673 function () {
35674 var yAlign;
35675 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35676 {
35677 var lm = this.layoutMgr;
35678 yAlign = lm.getLayoutAlignmentY (this);
35679 }} else {
35680 yAlign = this.getAlignmentYComp ();
35681 }return yAlign;
35682 });
35683 Clazz_overrideMethod (c$, "paint", 
35684 function (g) {
35685 java.awt.GraphicsCallback.PaintCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 2);
35686 }, "java.awt.Graphics");
35687 Clazz_overrideMethod (c$, "update", 
35688 function (g) {
35689 if (this.isShowing ()) {
35690 g.clearRect (0, 0, this.width, this.height);
35691 this.paint (g);
35692 }}, "java.awt.Graphics");
35693 Clazz_defineMethod (c$, "paintComponents", 
35694 function (g) {
35695 if (this.isShowing ()) {
35696 java.awt.GraphicsCallback.PaintAllCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 4);
35697 }}, "java.awt.Graphics");
35698 Clazz_overrideMethod (c$, "lightweightPaint", 
35699 function (g) {
35700 this.lwPaintComp (g);
35701 this.paintHeavyweightComponents (g);
35702 }, "java.awt.Graphics");
35703 Clazz_overrideMethod (c$, "paintHeavyweightComponents", 
35704 function (g) {
35705 if (this.isShowing ()) {
35706 java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 3);
35707 }}, "java.awt.Graphics");
35708 Clazz_defineMethod (c$, "addContainerListener", 
35709 function (l) {
35710 if (l == null) {
35711 return;
35712 }this.containerListener = java.awt.AWTEventMulticaster.add (this.containerListener, l);
35713 this.newEventsOnly = true;
35714 }, "java.awt.event.ContainerListener");
35715 Clazz_defineMethod (c$, "removeContainerListener", 
35716 function (l) {
35717 if (l == null) {
35718 return;
35719 }this.containerListener = java.awt.AWTEventMulticaster.remove (this.containerListener, l);
35720 }, "java.awt.event.ContainerListener");
35721 Clazz_defineMethod (c$, "getContainerListeners", 
35722 function () {
35723 return (this.getListeners (java.awt.event.ContainerListener));
35724 });
35725 Clazz_overrideMethod (c$, "getListeners", 
35726 function (listenerType) {
35727 var l = null;
35728 if (listenerType === java.awt.event.ContainerListener) {
35729 l = this.containerListener;
35730 } else {
35731 return this.getListenersComp (listenerType);
35732 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
35733 }, "Class");
35734 Clazz_overrideMethod (c$, "eventEnabled", 
35735 function (e) {
35736 var id = e.getID ();
35737 if (id == 300 || id == 301) {
35738 if ((this.eventMask & 2) != 0 || this.containerListener != null) {
35739 return true;
35740 }return false;
35741 }return this.eventTypeEnabled (e.id);
35742 }, "java.awt.AWTEvent");
35743 Clazz_overrideMethod (c$, "processEvent", 
35744 function (e) {
35745 this.processEventCont (e);
35746 }, "java.awt.AWTEvent");
35747 Clazz_defineMethod (c$, "processEventCont", 
35748 function (e) {
35749 if (Clazz_instanceOf (e, java.awt.event.ContainerEvent)) {
35750 this.processContainerEvent (e);
35751 return;
35752 }this.processEventComp (e);
35753 }, "java.awt.AWTEvent");
35754 Clazz_defineMethod (c$, "processContainerEvent", 
35755 function (e) {
35756 var listener = this.containerListener;
35757 if (listener != null) {
35758 switch (e.getID ()) {
35759 case 300:
35760 listener.componentAdded (e);
35761 break;
35762 case 301:
35763 listener.componentRemoved (e);
35764 break;
35765 }
35766 }}, "java.awt.event.ContainerEvent");
35767 Clazz_overrideMethod (c$, "dispatchEventImpl", 
35768 function (e) {
35769 if ((this.dispatcher != null) && this.dispatcher.dispatchEvent (e)) {
35770 e.consume ();
35771 if (this.peer != null) {
35772 this.peer.handleEvent (e);
35773 }return;
35774 }this.dispatchEventImplComp (e);
35775 {
35776 switch (e.getID ()) {
35777 case 101:
35778 break;
35779 case 100:
35780 break;
35781 default:
35782 break;
35783 }
35784 }}, "java.awt.AWTEvent");
35785 Clazz_defineMethod (c$, "dispatchEventToSelf", 
35786 function (e) {
35787 this.dispatchEventImplComp (e);
35788 }, "java.awt.AWTEvent");
35789 Clazz_defineMethod (c$, "getMouseEventTarget", 
35790  function (x, y, includeSelf, filter, searchHeavyweights) {
35791 {
35792 if (arguments.length == 3) {
35793 filter = java.awt.Container.MouseEventTargetFilter.FILTER;
35794 searchHeavyWeights = false;
35795 }
35796 }var comp = null;
35797 if (comp == null || comp === this) {
35798 comp = this.getMouseEventTargetImpl (x, y, includeSelf, filter, false, searchHeavyweights);
35799 }return comp;
35800 }, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B");
35801 Clazz_defineMethod (c$, "getMouseEventTargetImpl", 
35802  function (x, y, includeSelf, filter, searchHeavyweightChildren, searchHeavyweightDescendants) {
35803 {
35804 for (var i = 0; i < this.component.size (); i++) {
35805 var comp = this.component.get (i);
35806 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)) {
35807 if (Clazz_instanceOf (comp, java.awt.Container)) {
35808 var child = comp;
35809 var deeper = child.getMouseEventTarget (x - child.x, y - child.y, includeSelf, filter, searchHeavyweightDescendants);
35810 if (deeper != null) {
35811 return deeper;
35812 }} else {
35813 if (filter.accept (comp)) {
35814 return comp;
35815 }}}}
35816 var isPeerOK;
35817 var isMouseOverMe;
35818 isPeerOK = includeSelf;
35819 isMouseOverMe = this.contains (x, y);
35820 if (isMouseOverMe && isPeerOK && filter.accept (this)) {
35821 return this;
35822 }return null;
35823 }}, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B,~B");
35824 Clazz_defineMethod (c$, "proxyEnableEvents", 
35825 function (events) {
35826 if (this.parent != null) {
35827 this.parent.proxyEnableEvents (events);
35828 }if (this.dispatcher != null) {
35829 this.dispatcher.enableEvents (events);
35830 }}, "~N");
35831 Clazz_defineMethod (c$, "deliverEvent", 
35832 function (e) {
35833 var comp = this.getComponentAt (e.x, e.y);
35834 if ((comp != null) && (comp !== this)) {
35835 e.translate (-comp.x, -comp.y);
35836 comp.deliverEvent (e);
35837 } else {
35838 this.postEvent (e);
35839 }}, "java.awt.Event");
35840 Clazz_defineMethod (c$, "getComponentAt", 
35841 function (x, y) {
35842 return this.locate (x, y);
35843 }, "~N,~N");
35844 Clazz_overrideMethod (c$, "locate", 
35845 function (x, y) {
35846 return this;
35847 }, "~N,~N");
35848 Clazz_defineMethod (c$, "getComponentAt", 
35849 function (p) {
35850 return this.getComponentAt (p.x, p.y);
35851 }, "java.awt.Point");
35852 Clazz_defineMethod (c$, "getMousePosition", 
35853 function (allowChildren) {
35854 return null;
35855 }, "~B");
35856 Clazz_overrideMethod (c$, "isSameOrAncestorOf", 
35857 function (comp, allowChildren) {
35858 return this === comp || (allowChildren && this.isParentOf (comp));
35859 }, "java.awt.Component,~B");
35860 Clazz_defineMethod (c$, "findComponentAt", 
35861 function (x, y) {
35862 {
35863 return this.findComponentAt (x, y, true);
35864 }}, "~N,~N");
35865 Clazz_defineMethod (c$, "findComponentAt", 
35866 function (x, y, ignoreEnabled) {
35867 return null;
35868 }, "~N,~N,~B");
35869 Clazz_defineMethod (c$, "findComponentAt", 
35870 function (p) {
35871 return this.findComponentAt (p.x, p.y);
35872 }, "java.awt.Point");
35873 Clazz_defineMethod (c$, "addNotify", 
35874 function () {
35875 {
35876 this.addNotifyComp ();
35877 if (!(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35878 this.setDispatcher ();
35879 }for (var i = 0; i < this.component.size (); i++) {
35880 this.component.get (i).addNotify ();
35881 }
35882 }});
35883 Clazz_defineMethod (c$, "setDispatcher", 
35884 function () {
35885 this.dispatcher =  new java.awt.LightweightDispatcher (this);
35886 });
35887 Clazz_defineMethod (c$, "removeNotify", 
35888 function () {
35889 for (var i = this.component.size () - 1; i >= 0; i--) {
35890 var comp = this.component.get (i);
35891 if (comp != null) {
35892 comp.setAutoFocusTransferOnDisposal (false);
35893 comp.removeNotify ();
35894 comp.setAutoFocusTransferOnDisposal (true);
35895 }}
35896 if (this.dispatcher != null) {
35897 this.dispatcher.dispose ();
35898 this.dispatcher = null;
35899 }this.removeNotifyComp ();
35900 });
35901 Clazz_defineMethod (c$, "isAncestorOf", 
35902 function (c) {
35903 var p;
35904 if (c == null || ((p = c.getParent ()) == null)) {
35905 return false;
35906 }while (p != null) {
35907 if (p === this) {
35908 return true;
35909 }p = p.getParent ();
35910 }
35911 return false;
35912 }, "java.awt.Component");
35913 Clazz_overrideMethod (c$, "paramString", 
35914 function () {
35915 var str = this.paramStringComp ();
35916 var layoutMgr = this.layoutMgr;
35917 if (layoutMgr != null) {
35918 str += ",layout=" + layoutMgr.getClass ().getName ();
35919 }return str;
35920 });
35921 Clazz_defineMethod (c$, "setFocusTraversalKeys", 
35922 function (id, keystrokes) {
35923 }, "~N,java.util.Set");
35924 Clazz_defineMethod (c$, "getFocusTraversalKeys", 
35925 function (id) {
35926 return null;
35927 }, "~N");
35928 Clazz_defineMethod (c$, "areFocusTraversalKeysSet", 
35929 function (id) {
35930 return false;
35931 }, "~N");
35932 Clazz_defineMethod (c$, "isFocusCycleRoot", 
35933 function (container) {
35934 if (this.isFocusCycleRoot () && container === this) {
35935 return true;
35936 } else {
35937 return this.isFocusCycleRootComp (container);
35938 }}, "java.awt.Container");
35939 Clazz_overrideMethod (c$, "containsFocus", 
35940 function () {
35941 return false;
35942 });
35943 Clazz_defineMethod (c$, "isParentOf", 
35944  function (comp) {
35945 {
35946 while (comp != null && comp !== this && !(Clazz_instanceOf (comp, java.awt.Window))) {
35947 comp = comp.getParent ();
35948 }
35949 return (comp === this);
35950 }}, "java.awt.Component");
35951 Clazz_defineMethod (c$, "clearMostRecentFocusOwnerOnHide", 
35952 function () {
35953 });
35954 Clazz_overrideMethod (c$, "clearCurrentFocusCycleRootOnHide", 
35955 function () {
35956 });
35957 Clazz_defineMethod (c$, "getTraversalRoot", 
35958 function () {
35959 return null;
35960 });
35961 Clazz_defineMethod (c$, "isFocusCycleRoot", 
35962 function () {
35963 return this.focusCycleRoot;
35964 });
35965 Clazz_defineMethod (c$, "setFocusTraversalPolicyProvider", 
35966 function (provider) {
35967 var oldProvider;
35968 {
35969 oldProvider = this.focusTraversalPolicyProvider;
35970 this.focusTraversalPolicyProvider = provider;
35971 }this.firePropertyChangeBool ("focusTraversalPolicyProvider", oldProvider, provider);
35972 }, "~B");
35973 Clazz_defineMethod (c$, "isFocusTraversalPolicyProvider", 
35974 function () {
35975 return this.focusTraversalPolicyProvider;
35976 });
35977 Clazz_defineMethod (c$, "transferFocusDownCycle", 
35978 function () {
35979 });
35980 Clazz_defineMethod (c$, "preProcessKeyEvent", 
35981 function (e) {
35982 var parent = this.parent;
35983 if (parent != null) {
35984 parent.preProcessKeyEvent (e);
35985 }}, "java.awt.event.KeyEvent");
35986 Clazz_defineMethod (c$, "postProcessKeyEvent", 
35987 function (e) {
35988 var parent = this.parent;
35989 if (parent != null) {
35990 parent.postProcessKeyEvent (e);
35991 }}, "java.awt.event.KeyEvent");
35992 Clazz_overrideMethod (c$, "postsOldMouseEvents", 
35993 function () {
35994 return true;
35995 });
35996 Clazz_defineMethod (c$, "applyComponentOrientation", 
35997 function (o) {
35998 this.applyCompOrientComp (o);
35999 {
36000 for (var i = 0; i < this.component.size (); i++) {
36001 var comp = this.component.get (i);
36002 comp.applyComponentOrientation (o);
36003 }
36004 }}, "java.awt.ComponentOrientation");
36005 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36006 function (listener) {
36007 this.addPropChangeListenerComp (listener);
36008 }, "java.beans.PropertyChangeListener");
36009 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36010 function (propertyName, listener) {
36011 this.addPropChangeListComp (propertyName, listener);
36012 }, "~S,java.beans.PropertyChangeListener");
36013 Clazz_defineMethod (c$, "increaseComponentCount", 
36014 function (c) {
36015 if (!c.isDisplayable ()) {
36016 throw  new IllegalStateException ("Peer does not exist while invoking the increaseComponentCount() method");
36017 }var addHW = 0;
36018 var addLW = 0;
36019 if (Clazz_instanceOf (c, java.awt.Container)) {
36020 addLW = (c).numOfLWComponents;
36021 addHW = (c).numOfHWComponents;
36022 }if (c.isLightweight ()) {
36023 addLW++;
36024 } else {
36025 addHW++;
36026 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36027 cont.numOfLWComponents += addLW;
36028 cont.numOfHWComponents += addHW;
36029 }
36030 }, "java.awt.Component");
36031 Clazz_defineMethod (c$, "decreaseComponentCount", 
36032 function (c) {
36033 if (!c.isDisplayable ()) {
36034 throw  new IllegalStateException ("Peer does not exist while invoking the decreaseComponentCount() method");
36035 }var subHW = 0;
36036 var subLW = 0;
36037 if (Clazz_instanceOf (c, java.awt.Container)) {
36038 subLW = (c).numOfLWComponents;
36039 subHW = (c).numOfHWComponents;
36040 }if (c.isLightweight ()) {
36041 subLW++;
36042 } else {
36043 subHW++;
36044 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36045 cont.numOfLWComponents -= subLW;
36046 cont.numOfHWComponents -= subHW;
36047 }
36048 }, "java.awt.Component");
36049 Clazz_declareInterface (java.awt.Container, "EventTargetFilter");
36050 Clazz_pu$h(self.c$);
36051 c$ = Clazz_declareType (java.awt.Container, "MouseEventTargetFilter", null, java.awt.Container.EventTargetFilter);
36052 Clazz_makeConstructor (c$, 
36053  function () {
36054 });
36055 Clazz_overrideMethod (c$, "accept", 
36056 function (a) {
36057 return (a.eventMask & 32) != 0 || (a.eventMask & 16) != 0 || (a.eventMask & 131072) != 0 || a.mouseListener != null || a.mouseMotionListener != null || a.mouseWheelListener != null;
36058 }, "java.awt.Component");
36059 c$.FILTER = c$.prototype.FILTER =  new java.awt.Container.MouseEventTargetFilter ();
36060 c$ = Clazz_p0p ();
36061 c$.EMPTY_ARRAY = c$.prototype.EMPTY_ARRAY =  new Array (0);
36062 Clazz_defineStatics (c$,
36063 "INCLUDE_SELF", true,
36064 "SEARCH_HEAVYWEIGHTS", true);
36065 c$ = Clazz_decorateAsClass (function () {
36066 this.nativeContainer = null;
36067 this.mouseEventTarget = null;
36068 this.targetLastEntered = null;
36069 this.isMouseInNativeContainer = false;
36070 this.eventMask = 0;
36071 Clazz_instantialize (this, arguments);
36072 }, java.awt, "LightweightDispatcher", null, java.awt.event.AWTEventListener);
36073 Clazz_makeConstructor (c$, 
36074 function (nativeContainer) {
36075 this.nativeContainer = nativeContainer;
36076 this.mouseEventTarget = null;
36077 this.eventMask = 0;
36078 }, "java.awt.Container");
36079 Clazz_defineMethod (c$, "dispose", 
36080 function () {
36081 this.stopListeningForOtherDrags ();
36082 this.mouseEventTarget = null;
36083 });
36084 Clazz_defineMethod (c$, "enableEvents", 
36085 function (events) {
36086 this.eventMask |= events;
36087 }, "~N");
36088 Clazz_defineMethod (c$, "dispatchEvent", 
36089 function (e) {
36090 var ret = false;
36091 if (Clazz_instanceOf (e, java.awt.event.MouseEvent) && (this.eventMask & 131120) != 0) {
36092 var me = e;
36093 ret = this.processMouseEvent (me);
36094 }return ret;
36095 }, "java.awt.AWTEvent");
36096 Clazz_defineMethod (c$, "isMouseGrab", 
36097  function (e) {
36098 var modifiers = e.getModifiersEx ();
36099 if (e.getID () == 501 || e.getID () == 502) {
36100 switch (e.getButton ()) {
36101 case 1:
36102 modifiers ^= 1024;
36103 break;
36104 case 2:
36105 modifiers ^= 2048;
36106 break;
36107 case 3:
36108 modifiers ^= 4096;
36109 break;
36110 }
36111 }return ((modifiers & (7168)) != 0);
36112 }, "java.awt.event.MouseEvent");
36113 Clazz_defineMethod (c$, "processMouseEvent", 
36114  function (e) {
36115 var id = e.getID ();
36116 var mouseOver = this.nativeContainer.getMouseEventTarget (e.getX (), e.getY (), true);
36117 this.trackMouseEnterExit (mouseOver, e);
36118 if (!this.isMouseGrab (e) && id != 500) {
36119 this.mouseEventTarget = (mouseOver !== this.nativeContainer) ? mouseOver : null;
36120 }if (this.mouseEventTarget != null) {
36121 switch (id) {
36122 case 504:
36123 case 505:
36124 break;
36125 case 501:
36126 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36127 break;
36128 case 502:
36129 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36130 break;
36131 case 500:
36132 if (mouseOver === this.mouseEventTarget) {
36133 this.retargetMouseEvent (mouseOver, id, e);
36134 }break;
36135 case 503:
36136 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36137 break;
36138 case 506:
36139 if (this.isMouseGrab (e)) {
36140 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36141 }break;
36142 case 507:
36143 this.retargetMouseEvent (mouseOver, id, e);
36144 break;
36145 }
36146 e.consume ();
36147 }return e.isConsumed ();
36148 }, "java.awt.event.MouseEvent");
36149 Clazz_defineMethod (c$, "trackMouseEnterExit", 
36150  function (targetOver, e) {
36151 var targetEnter = null;
36152 var id = e.getID ();
36153 if (id != 505 && id != 506 && id != 1500 && this.isMouseInNativeContainer == false) {
36154 this.isMouseInNativeContainer = true;
36155 this.startListeningForOtherDrags ();
36156 } else if (id == 505) {
36157 this.isMouseInNativeContainer = false;
36158 this.stopListeningForOtherDrags ();
36159 }if (this.isMouseInNativeContainer) {
36160 targetEnter = targetOver;
36161 }if (this.targetLastEntered === targetEnter) {
36162 return;
36163 }if (this.targetLastEntered != null) {
36164 this.retargetMouseEvent (this.targetLastEntered, 505, e);
36165 }if (id == 505) {
36166 e.consume ();
36167 }if (targetEnter != null) {
36168 this.retargetMouseEvent (targetEnter, 504, e);
36169 }if (id == 504) {
36170 e.consume ();
36171 }this.targetLastEntered = targetEnter;
36172 }, "java.awt.Component,java.awt.event.MouseEvent");
36173 Clazz_defineMethod (c$, "startListeningForOtherDrags", 
36174  function () {
36175 });
36176 Clazz_defineMethod (c$, "stopListeningForOtherDrags", 
36177  function () {
36178 });
36179 Clazz_overrideMethod (c$, "eventDispatched", 
36180 function (e) {
36181 var isForeignDrag = (Clazz_instanceOf (e, java.awt.event.MouseEvent)) && (e.id == 506) && (e.getSource () !== this.nativeContainer);
36182 if (!isForeignDrag) {
36183 return;
36184 }var srcEvent = e;
36185 var me;
36186 {
36187 var srcComponent = srcEvent.getComponent ();
36188 if (!srcComponent.isShowing ()) {
36189 return;
36190 }var c = this.nativeContainer;
36191 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
36192 c = c.getParent_NoClientCode ();
36193 }
36194 if ((c == null) || (c).isModalBlocked ()) {
36195 return;
36196 }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 ());
36197 (srcEvent).copyPrivateDataInto (me);
36198 }var targetOver = this.nativeContainer.getMouseEventTarget (me.getX (), me.getY (), true);
36199 this.trackMouseEnterExit (targetOver, me);
36200 }, "java.awt.AWTEvent");
36201 Clazz_defineMethod (c$, "retargetMouseEvent", 
36202 function (target, id, e) {
36203 if (target == null) {
36204 return;
36205 }var x = e.getX ();
36206 var y = e.getY ();
36207 var component;
36208 for (component = target; component != null && component !== this.nativeContainer; component = component.getParent ()) {
36209 x -= component.x;
36210 y -= component.y;
36211 }
36212 var retargeted;
36213 if (component != null) {
36214 if (id == 507) {
36215 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 ());
36216 } else {
36217 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 ());
36218 }(e).copyPrivateDataInto (retargeted);
36219 if (target === this.nativeContainer) {
36220 (target).dispatchEventToSelf (retargeted);
36221 } else {
36222 if (this.nativeContainer.modalComp != null) {
36223 if ((this.nativeContainer.modalComp).isAncestorOf (target)) {
36224 target.dispatchEvent (retargeted);
36225 } else {
36226 e.consume ();
36227 }} else {
36228 target.dispatchEvent (retargeted);
36229 }}}}, "java.awt.Component,~N,java.awt.event.MouseEvent");
36230 Clazz_defineStatics (c$,
36231 "LWD_MOUSE_DRAGGED_OVER", 1500,
36232 "MOUSE_MASK", 131120);
36233 });
36234 Clazz_declarePackage ("java.awt");
36235 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 () {
36236 c$ = Clazz_decorateAsClass (function () {
36237 this.threadGroup = null;
36238 this.myThread = null;
36239 this.peer = null;
36240 this.parent = null;
36241 this.appContext = null;
36242 this.x = 0;
36243 this.y = 0;
36244 this.width = 0;
36245 this.height = 0;
36246 this.foreground = null;
36247 this.background = null;
36248 this.font = null;
36249 this.peerFont = null;
36250 this.cursor = null;
36251 this.locale = null;
36252 this.visible = true;
36253 this.enabled = true;
36254 this.valid = false;
36255 this.popups = null;
36256 this.name = null;
36257 this.nameExplicitlySet = false;
36258 this.focusable = true;
36259 this.$isFocusTraversableOverridden = 0;
36260 this.focusTraversalKeysEnabled = false;
36261 this.minSize = null;
36262 this.minSizeSet = false;
36263 this.prefSize = null;
36264 this.prefSizeSet = false;
36265 this.maxSize = null;
36266 this.maxSizeSet = false;
36267 this.componentOrientation = null;
36268 this.newEventsOnly = false;
36269 this.componentListener = null;
36270 this.focusListener = null;
36271 this.hierarchyListener = null;
36272 this.hierarchyBoundsListener = null;
36273 this.keyListener = null;
36274 this.mouseListener = null;
36275 this.mouseMotionListener = null;
36276 this.mouseWheelListener = null;
36277 this.inputMethodListener = null;
36278 this.windowClosingException = null;
36279 this.eventMask = 4096;
36280 this.changeSupport = null;
36281 this.changeSupportLock = null;
36282 this.isPacked = false;
36283 this.boundsOp = 3;
36284 this.isAddNotifyComplete = false;
36285 this.backgroundEraseDisabled = false;
36286 this.htmlName = null;
36287 this.num = 0;
36288 this.graphicsConfig = null;
36289 this.eventCache = null;
36290 this.coalescingEnabled = false;
36291 this.autoFocusTransferOnDisposal = true;
36292 Clazz_instantialize (this, arguments);
36293 }, java.awt, "Component", null, java.awt.image.ImageObserver);
36294 Clazz_prepareFields (c$, function () {
36295 this.componentOrientation = java.awt.ComponentOrientation.UNKNOWN;
36296 this.changeSupportLock =  new Clazz._O ();
36297 this.coalescingEnabled = this.checkCoalescing ();
36298 });
36299 Clazz_defineMethod (c$, "getAppContext", 
36300 function () {
36301 return this.appContext;
36302 });
36303 Clazz_defineMethod (c$, "getChangeSupportLock", 
36304  function () {
36305 return this.changeSupportLock;
36306 });
36307 Clazz_defineMethod (c$, "getBoundsOp", 
36308 function () {
36309 return this.boundsOp;
36310 });
36311 Clazz_defineMethod (c$, "setBoundsOp", 
36312 function (op) {
36313 if (op == 5) {
36314 this.boundsOp = 3;
36315 } else if (this.boundsOp == 3) {
36316 this.boundsOp = op;
36317 }}, "~N");
36318 Clazz_makeConstructor (c$, 
36319 function () {
36320 this.setAppContext ();
36321 });
36322 Clazz_defineMethod (c$, "setAppContext", 
36323 function () {
36324 this.appContext = jssun.awt.AppContext.getAppContext ();
36325 this.num = ++java.awt.Component.incr;
36326 });
36327 Clazz_defineMethod (c$, "getHTMLName", 
36328 function (uid) {
36329 return (this.htmlName == null ? this.htmlName = this.appContext.getThreadGroup ().getName () + "_" + uid + "_" + this.num : this.htmlName);
36330 }, "~S");
36331 Clazz_defineMethod (c$, "constructComponentName", 
36332 function () {
36333 return null;
36334 });
36335 Clazz_defineMethod (c$, "getName", 
36336 function () {
36337 if (this.name == null && !this.nameExplicitlySet) {
36338 {
36339 if (this.name == null && !this.nameExplicitlySet) this.name = this.constructComponentName ();
36340 }}return this.name;
36341 });
36342 Clazz_defineMethod (c$, "setName", 
36343 function (name) {
36344 var oldName;
36345 {
36346 oldName = this.name;
36347 this.name = name;
36348 this.nameExplicitlySet = true;
36349 }this.firePropertyChangeObject ("name", oldName, name);
36350 }, "~S");
36351 Clazz_defineMethod (c$, "getParent", 
36352 function () {
36353 return this.getParent_NoClientCode ();
36354 });
36355 Clazz_defineMethod (c$, "getParent_NoClientCode", 
36356 function () {
36357 return this.parent;
36358 });
36359 Clazz_defineMethod (c$, "getContainer", 
36360 function () {
36361 return this.getParent ();
36362 });
36363 Clazz_defineMethod (c$, "getPeer", 
36364 function () {
36365 return this.peer;
36366 });
36367 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
36368 function () {
36369 return swingjs.JSToolkit.getGraphicsConfiguration ();
36370 });
36371 Clazz_defineMethod (c$, "resetGC", 
36372 function () {
36373 });
36374 Clazz_defineMethod (c$, "getToolkit", 
36375 function () {
36376 return this.getToolkitImpl ();
36377 });
36378 Clazz_defineMethod (c$, "getToolkitImpl", 
36379 function () {
36380 var peer = this.peer;
36381 if ((peer != null) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
36382 return peer.getToolkit ();
36383 }var parent = this.parent;
36384 if (parent != null) {
36385 return parent.getToolkitImpl ();
36386 }return java.awt.Toolkit.getDefaultToolkit ();
36387 });
36388 Clazz_defineMethod (c$, "isValid", 
36389 function () {
36390 return this.valid;
36391 });
36392 Clazz_defineMethod (c$, "isDisplayable", 
36393 function () {
36394 return true;
36395 });
36396 Clazz_defineMethod (c$, "isVisible", 
36397 function () {
36398 return this.isVisible_NoClientCode ();
36399 });
36400 Clazz_defineMethod (c$, "isVisible_NoClientCode", 
36401 function () {
36402 return this.visible;
36403 });
36404 Clazz_defineMethod (c$, "isRecursivelyVisible", 
36405 function () {
36406 return this.visible && (this.parent == null || this.parent.isRecursivelyVisible ());
36407 });
36408 Clazz_defineMethod (c$, "pointRelativeToComponent", 
36409 function (absolute) {
36410 var compCoords = this.getLocationOnScreen ();
36411 return  new java.awt.Point (absolute.x - compCoords.x, absolute.y - compCoords.y);
36412 }, "java.awt.Point");
36413 Clazz_defineMethod (c$, "getMousePosition", 
36414 function () {
36415 return null;
36416 });
36417 Clazz_defineMethod (c$, "isSameOrAncestorOf", 
36418 function (comp, allowChildren) {
36419 return comp === this;
36420 }, "java.awt.Component,~B");
36421 Clazz_defineMethod (c$, "isShowing", 
36422 function () {
36423 if (this.visible) {
36424 var parent = this.parent;
36425 return (parent == null) || parent.isShowing ();
36426 }return false;
36427 });
36428 Clazz_defineMethod (c$, "isEnabled", 
36429 function () {
36430 return this.isEnabledImpl ();
36431 });
36432 Clazz_defineMethod (c$, "isEnabledImpl", 
36433 function () {
36434 return this.enabled;
36435 });
36436 Clazz_defineMethod (c$, "setEnabled", 
36437 function (b) {
36438 this.enable (b);
36439 }, "~B");
36440 Clazz_defineMethod (c$, "enable", 
36441 function () {
36442 if (!this.enabled) {
36443 this.enabled = true;
36444 var peer = this.peer;
36445 if (peer != null) {
36446 peer.setEnabled (true);
36447 if (this.visible) {
36448 this.updateCursorImmediately ();
36449 }}}});
36450 Clazz_defineMethod (c$, "enable", 
36451 function (b) {
36452 if (b) {
36453 this.enable ();
36454 } else {
36455 this.disable ();
36456 }}, "~B");
36457 Clazz_defineMethod (c$, "disable", 
36458 function () {
36459 if (this.enabled) {
36460 this.enabled = false;
36461 var peer = this.peer;
36462 if (peer != null) {
36463 peer.setEnabled (false);
36464 if (this.visible) {
36465 this.updateCursorImmediately ();
36466 }}}});
36467 Clazz_defineMethod (c$, "isDoubleBuffered", 
36468 function () {
36469 return false;
36470 });
36471 Clazz_defineMethod (c$, "setVisible", 
36472 function (b) {
36473 this.show (b);
36474 }, "~B");
36475 Clazz_defineMethod (c$, "show", 
36476 function () {
36477 if (!this.visible) {
36478 this.visible = true;
36479 var peer = this.peer;
36480 if (peer != null) {
36481 peer.setVisible (true);
36482 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36483 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36484 this.repaint ();
36485 }this.updateCursorImmediately ();
36486 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36487 var e =  new java.awt.event.ComponentEvent (this, 102);
36488 java.awt.Toolkit.getEventQueue ().postEvent (e);
36489 }}var parent = this.parent;
36490 if (parent != null) {
36491 parent.invalidate ();
36492 }});
36493 Clazz_defineMethod (c$, "containsFocus", 
36494 function () {
36495 return this.isFocusOwner ();
36496 });
36497 Clazz_defineMethod (c$, "clearCurrentFocusCycleRootOnHide", 
36498 function () {
36499 });
36500 Clazz_defineMethod (c$, "hide", 
36501 function () {
36502 this.isPacked = false;
36503 if (this.visible) {
36504 this.clearCurrentFocusCycleRootOnHide ();
36505 this.visible = false;
36506 this.mixOnHiding (this.isLightweight ());
36507 var peer = this.peer;
36508 if (peer != null) {
36509 peer.setVisible (false);
36510 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36511 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36512 this.repaint ();
36513 }this.updateCursorImmediately ();
36514 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36515 var e =  new java.awt.event.ComponentEvent (this, 103);
36516 java.awt.Toolkit.getEventQueue ().postEvent (e);
36517 }}var parent = this.parent;
36518 if (parent != null) {
36519 parent.invalidate ();
36520 }});
36521 Clazz_defineMethod (c$, "getForeground", 
36522 function () {
36523 var foreground = this.foreground;
36524 if (foreground != null) {
36525 return foreground;
36526 }var parent = this.parent;
36527 return (parent != null) ? parent.getForeground () : null;
36528 });
36529 Clazz_defineMethod (c$, "setForeground", 
36530 function (c) {
36531 var oldColor = this.foreground;
36532 var peer = this.peer;
36533 this.foreground = c;
36534 if (peer != null) {
36535 c = this.getForeground ();
36536 if (c != null) {
36537 peer.setForeground (c);
36538 }}this.firePropertyChangeObject ("foreground", oldColor, c);
36539 }, "java.awt.Color");
36540 Clazz_defineMethod (c$, "isForegroundSet", 
36541 function () {
36542 return (this.foreground != null);
36543 });
36544 Clazz_defineMethod (c$, "getBackground", 
36545 function () {
36546 var background = this.background;
36547 if (background != null) {
36548 return background;
36549 }var parent = this.parent;
36550 return (parent != null) ? parent.getBackground () : null;
36551 });
36552 Clazz_defineMethod (c$, "setBackground", 
36553 function (c) {
36554 var oldColor = this.background;
36555 var peer = this.peer;
36556 this.background = c;
36557 if (peer != null) {
36558 c = this.getBackground ();
36559 if (c != null) {
36560 peer.setBackground (c);
36561 }}this.firePropertyChangeObject ("background", oldColor, c);
36562 }, "java.awt.Color");
36563 Clazz_defineMethod (c$, "isBackgroundSet", 
36564 function () {
36565 return (this.background != null);
36566 });
36567 Clazz_defineMethod (c$, "getFont", 
36568 function () {
36569 return this.getFont_NoClientCode ();
36570 });
36571 Clazz_defineMethod (c$, "getFont_NoClientCode", 
36572 function () {
36573 var font = this.font;
36574 if (font != null) {
36575 return font;
36576 }var parent = this.parent;
36577 return (parent != null) ? parent.getFont_NoClientCode () : null;
36578 });
36579 Clazz_defineMethod (c$, "setFont", 
36580 function (f) {
36581 this.setFontComp (f);
36582 }, "java.awt.Font");
36583 Clazz_defineMethod (c$, "setFontComp", 
36584 function (f) {
36585 var oldFont;
36586 var newFont;
36587 oldFont = this.font;
36588 newFont = this.font = f;
36589 {
36590 {
36591 }var peer = this.peer;
36592 if (peer != null) {
36593 f = this.getFont ();
36594 if (f != null) {
36595 peer.setFont (f);
36596 this.peerFont = f;
36597 }}}this.firePropertyChangeObject ("font", oldFont, newFont);
36598 if (f !== oldFont && (oldFont == null || !oldFont.equals (f))) {
36599 this.invalidateIfValid ();
36600 }}, "java.awt.Font");
36601 Clazz_defineMethod (c$, "isFontSet", 
36602 function () {
36603 return (this.font != null);
36604 });
36605 Clazz_defineMethod (c$, "getLocale", 
36606 function () {
36607 var locale = this.locale;
36608 if (locale != null) {
36609 return locale;
36610 }var parent = this.parent;
36611 if (parent == null) {
36612 throw  new java.awt.IllegalComponentStateException ("This component must have a parent in order to determine its locale");
36613 } else {
36614 return parent.getLocale ();
36615 }});
36616 Clazz_defineMethod (c$, "setLocale", 
36617 function (l) {
36618 var oldValue = this.locale;
36619 this.locale = l;
36620 this.firePropertyChangeObject ("locale", oldValue, l);
36621 this.invalidateIfValid ();
36622 }, "java.util.Locale");
36623 Clazz_defineMethod (c$, "getLocation", 
36624 function () {
36625 return this.location ();
36626 });
36627 Clazz_defineMethod (c$, "getLocationOnScreen", 
36628 function () {
36629 return this.getLocationOnScreen_NoTreeLock ();
36630 });
36631 Clazz_defineMethod (c$, "getLocationOnScreen_NoTreeLock", 
36632 function () {
36633 if (this.isShowing ()) {
36634 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
36635 var host = this.getNativeContainer ();
36636 var pt = host.peer.getLocationOnScreen ();
36637 for (var c = this; c !== host; c = c.getParent ()) {
36638 pt.x += c.x;
36639 pt.y += c.y;
36640 }
36641 return pt;
36642 } else {
36643 var pt = this.peer.getLocationOnScreen ();
36644 return pt;
36645 }} else {
36646 throw  new java.awt.IllegalComponentStateException ("component must be showing on the screen to determine its location");
36647 }});
36648 Clazz_defineMethod (c$, "location", 
36649 function () {
36650 return this.location_NoClientCode ();
36651 });
36652 Clazz_defineMethod (c$, "location_NoClientCode", 
36653  function () {
36654 return  new java.awt.Point (this.x, this.y);
36655 });
36656 Clazz_defineMethod (c$, "setLocation", 
36657 function (x, y) {
36658 this.setBoundsOp (1);
36659 this.setBounds (x, y, this.width, this.height);
36660 }, "~N,~N");
36661 Clazz_defineMethod (c$, "setLocation", 
36662 function (p) {
36663 this.setLocation (p.x, p.y);
36664 }, "java.awt.Point");
36665 Clazz_defineMethod (c$, "getSize", 
36666 function () {
36667 return this.size ();
36668 });
36669 Clazz_defineMethod (c$, "size", 
36670 function () {
36671 return  new java.awt.Dimension (this.width, this.height);
36672 });
36673 Clazz_defineMethod (c$, "setSize", 
36674 function (width, height) {
36675 {
36676 if (arguments.length == 1) {
36677 var d = arguments[0];
36678 width = d.width;
36679 height = d.height;
36680 }
36681 }this.resize (width, height);
36682 }, "~N,~N");
36683 Clazz_defineMethod (c$, "resize", 
36684 function (width, height) {
36685 this.setBoundsOp (2);
36686 this.setBounds (this.x, this.y, width, height);
36687 }, "~N,~N");
36688 Clazz_defineMethod (c$, "setBounds", 
36689 function (x, y, width, height) {
36690 this.reshape (x, y, width, height);
36691 }, "~N,~N,~N,~N");
36692 Clazz_defineMethod (c$, "setBounds", 
36693 function (r) {
36694 this.setBounds (r.x, r.y, r.width, r.height);
36695 }, "java.awt.Rectangle");
36696 Clazz_defineMethod (c$, "reshape", 
36697 function (x, y, width, height) {
36698 try {
36699 this.setBoundsOp (3);
36700 var resized = (this.width != width) || (this.height != height);
36701 var moved = (this.x != x) || (this.y != y);
36702 if (!resized && !moved) {
36703 return;
36704 }var oldX = this.x;
36705 var oldY = this.y;
36706 var oldWidth = this.width;
36707 var oldHeight = this.height;
36708 this.x = x;
36709 this.y = y;
36710 this.width = width;
36711 this.height = height;
36712 if (resized) {
36713 this.isPacked = false;
36714 System.out.println ("C " + swingjs.JSToolkit.getClassName (this) + " resized to " + this.getBounds ());
36715 }var needNotify = true;
36716 this.mixOnReshaping ();
36717 if (this.peer != null) {
36718 this.reshapeNativePeer (x, y, width, height, this.getBoundsOp ());
36719 resized = (oldWidth != this.width) || (oldHeight != this.height);
36720 moved = (oldX != this.x) || (oldY != this.y);
36721 if (Clazz_instanceOf (this, java.awt.Window)) {
36722 needNotify = false;
36723 }if (resized) {
36724 this.invalidate ();
36725 }if (this.parent != null) {
36726 this.parent.invalidateIfValid ();
36727 }}if (needNotify) {
36728 this.notifyNewBounds (resized, moved);
36729 }this.repaintParentIfNeeded (oldX, oldY, oldWidth, oldHeight);
36730 } finally {
36731 this.setBoundsOp (5);
36732 }
36733 }, "~N,~N,~N,~N");
36734 Clazz_defineMethod (c$, "repaintParentIfNeeded", 
36735  function (oldX, oldY, oldWidth, oldHeight) {
36736 if (this.parent != null && Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer) && this.isShowing ()) {
36737 this.parent.repaint (oldX, oldY, oldWidth, oldHeight);
36738 this.repaint ();
36739 }}, "~N,~N,~N,~N");
36740 Clazz_defineMethod (c$, "reshapeNativePeer", 
36741  function (x, y, width, height, op) {
36742 var nativeX = x;
36743 var nativeY = y;
36744 for (var c = this.parent; (c != null) && (Clazz_instanceOf (c.peer, java.awt.peer.LightweightPeer)); c = c.parent) {
36745 nativeX += c.x;
36746 nativeY += c.y;
36747 }
36748 this.peer.setBounds (nativeX, nativeY, width, height, op);
36749 }, "~N,~N,~N,~N,~N");
36750 Clazz_defineMethod (c$, "notifyNewBounds", 
36751  function (resized, moved) {
36752 if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36753 if (resized) {
36754 var e =  new java.awt.event.ComponentEvent (this, 101);
36755 java.awt.Toolkit.getEventQueue ().postEvent (e);
36756 }if (moved) {
36757 var e =  new java.awt.event.ComponentEvent (this, 100);
36758 java.awt.Toolkit.getEventQueue ().postEvent (e);
36759 }} else {
36760 if (Clazz_instanceOf (this, java.awt.Container) && (this).countComponents () > 0) {
36761 var enabledOnToolkit = java.awt.Toolkit.enabledOnToolkit (65536);
36762 if (resized) {
36763 (this).createChildHierarchyEvents (1402, 0, enabledOnToolkit);
36764 }if (moved) {
36765 (this).createChildHierarchyEvents (1401, 0, enabledOnToolkit);
36766 }}}}, "~B,~B");
36767 Clazz_defineMethod (c$, "getX", 
36768 function () {
36769 return this.x;
36770 });
36771 Clazz_defineMethod (c$, "getY", 
36772 function () {
36773 return this.y;
36774 });
36775 Clazz_defineMethod (c$, "getWidth", 
36776 function () {
36777 return this.width;
36778 });
36779 Clazz_defineMethod (c$, "getHeight", 
36780 function () {
36781 return this.height;
36782 });
36783 Clazz_defineMethod (c$, "getBounds", 
36784 function (rv) {
36785 if (rv == null) return  new java.awt.Rectangle (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36786 rv.reshape (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36787 return rv;
36788 }, "java.awt.Rectangle");
36789 Clazz_defineMethod (c$, "getSize", 
36790 function (rv) {
36791 if (rv == null) {
36792 return  new java.awt.Dimension (this.getWidth (), this.getHeight ());
36793 } else {
36794 rv.setSize (this.getWidth (), this.getHeight ());
36795 return rv;
36796 }}, "java.awt.Dimension");
36797 Clazz_defineMethod (c$, "getLocation", 
36798 function (rv) {
36799 if (rv == null) {
36800 return  new java.awt.Point (this.getX (), this.getY ());
36801 } else {
36802 rv.setLocation (this.getX (), this.getY ());
36803 return rv;
36804 }}, "java.awt.Point");
36805 Clazz_defineMethod (c$, "isOpaque", 
36806 function () {
36807 return true;
36808 });
36809 Clazz_defineMethod (c$, "isLightweight", 
36810 function () {
36811 return false;
36812 });
36813 Clazz_defineMethod (c$, "setPreferredSize", 
36814 function (preferredSize) {
36815 this.setPrefSizeComp (preferredSize);
36816 }, "java.awt.Dimension");
36817 Clazz_defineMethod (c$, "setPrefSizeComp", 
36818 function (preferredSize) {
36819 var old = (this.prefSizeSet ? this.prefSize : null);
36820 this.prefSize = preferredSize;
36821 this.prefSizeSet = (preferredSize != null);
36822 this.firePropertyChangeObject ("preferredSize", old, preferredSize);
36823 }, "java.awt.Dimension");
36824 Clazz_defineMethod (c$, "isPreferredSizeSet", 
36825 function () {
36826 return this.prefSizeSet;
36827 });
36828 Clazz_defineMethod (c$, "getPreferredSize", 
36829 function () {
36830 return this.preferredSize ();
36831 });
36832 Clazz_defineMethod (c$, "preferredSize", 
36833 function () {
36834 return this.prefSizeComp ();
36835 });
36836 Clazz_defineMethod (c$, "prefSizeComp", 
36837 function () {
36838 var dim = this.prefSize;
36839 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
36840 this.prefSize = this.getMinimumSize ();
36841 dim = this.prefSize;
36842 }return  new java.awt.Dimension (dim);
36843 });
36844 Clazz_defineMethod (c$, "setMinimumSize", 
36845 function (minimumSize) {
36846 var old;
36847 if (this.minSizeSet) {
36848 old = this.minSize;
36849 } else {
36850 old = null;
36851 }this.minSize = minimumSize;
36852 this.minSizeSet = (minimumSize != null);
36853 this.firePropertyChangeObject ("minimumSize", old, minimumSize);
36854 }, "java.awt.Dimension");
36855 Clazz_defineMethod (c$, "isMinimumSizeSet", 
36856 function () {
36857 return this.minSizeSet;
36858 });
36859 Clazz_defineMethod (c$, "getMinimumSize", 
36860 function () {
36861 return this.minimumSize ();
36862 });
36863 Clazz_defineMethod (c$, "minimumSize", 
36864 function () {
36865 var dim = this.minSize;
36866 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
36867 this.minSize = this.getSize ();
36868 dim = this.minSize;
36869 }return  new java.awt.Dimension (dim);
36870 });
36871 Clazz_defineMethod (c$, "setMaximumSize", 
36872 function (maximumSize) {
36873 var old;
36874 if (this.maxSizeSet) {
36875 old = this.maxSize;
36876 } else {
36877 old = null;
36878 }this.maxSize = maximumSize;
36879 this.maxSizeSet = (maximumSize != null);
36880 this.firePropertyChangeObject ("maximumSize", old, maximumSize);
36881 }, "java.awt.Dimension");
36882 Clazz_defineMethod (c$, "isMaximumSizeSet", 
36883 function () {
36884 return this.maxSizeSet;
36885 });
36886 Clazz_defineMethod (c$, "getMaximumSize", 
36887 function () {
36888 return this.getMaxSizeComp ();
36889 });
36890 Clazz_defineMethod (c$, "getMaxSizeComp", 
36891 function () {
36892 if (this.isMaximumSizeSet ()) {
36893 return  new java.awt.Dimension (this.maxSize);
36894 }return  new java.awt.Dimension (32767, 32767);
36895 });
36896 Clazz_defineMethod (c$, "getAlignmentX", 
36897 function () {
36898 return this.getAlignmentXComp ();
36899 });
36900 Clazz_defineMethod (c$, "getAlignmentXComp", 
36901 function () {
36902 return 0.5;
36903 });
36904 Clazz_defineMethod (c$, "getAlignmentY", 
36905 function () {
36906 return this.getAlignmentYComp ();
36907 });
36908 Clazz_defineMethod (c$, "getAlignmentYComp", 
36909 function () {
36910 return 0.5;
36911 });
36912 Clazz_defineMethod (c$, "getBaseline", 
36913 function (width, height) {
36914 if (width < 0 || height < 0) {
36915 throw  new IllegalArgumentException ("Width and height must be >= 0");
36916 }return -1;
36917 }, "~N,~N");
36918 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
36919 function () {
36920 return java.awt.Component.BaselineResizeBehavior.OTHER;
36921 });
36922 Clazz_defineMethod (c$, "doLayout", 
36923 function () {
36924 this.layout ();
36925 });
36926 Clazz_defineMethod (c$, "layout", 
36927 function () {
36928 });
36929 Clazz_defineMethod (c$, "validate", 
36930 function () {
36931 this.validateComponent ();
36932 });
36933 Clazz_defineMethod (c$, "validateComponent", 
36934 function () {
36935 {
36936 var peer = this.peer;
36937 var wasValid = this.isValid ();
36938 if (!wasValid && peer != null) {
36939 var newfont = this.getFont ();
36940 var oldfont = this.peerFont;
36941 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
36942 peer.setFont (newfont);
36943 this.peerFont = newfont;
36944 }peer.layout ();
36945 }this.valid = true;
36946 if (!wasValid) {
36947 this.mixOnValidating ();
36948 }}});
36949 Clazz_defineMethod (c$, "invalidate", 
36950 function () {
36951 this.invalidateComp ();
36952 });
36953 Clazz_defineMethod (c$, "invalidateComp", 
36954 function () {
36955 this.valid = false;
36956 if (!this.isPreferredSizeSet ()) {
36957 this.prefSize = null;
36958 }if (!this.isMinimumSizeSet ()) {
36959 this.minSize = null;
36960 }if (!this.isMaximumSizeSet ()) {
36961 this.maxSize = null;
36962 }if (this.parent != null) {
36963 this.parent.invalidateIfValid ();
36964 }});
36965 Clazz_defineMethod (c$, "invalidateIfValid", 
36966 function () {
36967 if (this.isValid ()) {
36968 this.invalidate ();
36969 }});
36970 Clazz_defineMethod (c$, "getGraphics", 
36971 function () {
36972 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
36973 if (this.parent == null) return null;
36974 var g = this.parent.getGraphics ();
36975 if (g == null) return null;
36976 g.setFont (this.getFont ());
36977 return g;
36978 } else {
36979 var peer = this.peer;
36980 return (peer != null) ? peer.getGraphics () : null;
36981 }});
36982 Clazz_defineMethod (c$, "getTreeLock", 
36983 function () {
36984 return this;
36985 });
36986 Clazz_defineMethod (c$, "getFontMetrics", 
36987 function (font) {
36988 return jssun.font.FontDesignMetrics.getMetrics (font);
36989 }, "java.awt.Font");
36990 Clazz_defineMethod (c$, "setCursor", 
36991 function (cursor) {
36992 this.cursor = cursor;
36993 this.updateCursorImmediately ();
36994 }, "java.awt.Cursor");
36995 Clazz_defineMethod (c$, "updateCursorImmediately", 
36996 function () {
36997 });
36998 Clazz_defineMethod (c$, "getCursor", 
36999 function () {
37000 return this.getCursor_NoClientCode ();
37001 });
37002 Clazz_defineMethod (c$, "getCursor_NoClientCode", 
37003 function () {
37004 var cursor = this.cursor;
37005 if (cursor != null) {
37006 return cursor;
37007 }var parent = this.parent;
37008 if (parent != null) {
37009 return parent.getCursor_NoClientCode ();
37010 } else {
37011 return java.awt.Cursor.getPredefinedCursor (0);
37012 }});
37013 Clazz_defineMethod (c$, "isCursorSet", 
37014 function () {
37015 return (this.cursor != null);
37016 });
37017 Clazz_defineMethod (c$, "paint", 
37018 function (g) {
37019 }, "java.awt.Graphics");
37020 Clazz_defineMethod (c$, "update", 
37021 function (g) {
37022 this.paint (g);
37023 }, "java.awt.Graphics");
37024 Clazz_defineMethod (c$, "paintAll", 
37025 function (g) {
37026 }, "java.awt.Graphics");
37027 Clazz_defineMethod (c$, "lightweightPaint", 
37028 function (g) {
37029 this.lwPaintComp (g);
37030 }, "java.awt.Graphics");
37031 Clazz_defineMethod (c$, "lwPaintComp", 
37032 function (g) {
37033 this.paint (g);
37034 }, "java.awt.Graphics");
37035 Clazz_defineMethod (c$, "paintHeavyweightComponents", 
37036 function (g) {
37037 }, "java.awt.Graphics");
37038 Clazz_defineMethod (c$, "repaint", 
37039 function () {
37040 this.repaintImpl (0, 0, 0, this.width, this.height);
37041 });
37042 Clazz_defineMethod (c$, "repaint", 
37043 function (tm) {
37044 this.repaintImpl (tm, 0, 0, this.width, this.height);
37045 }, "~N");
37046 Clazz_defineMethod (c$, "repaint", 
37047 function (x, y, width, height) {
37048 this.repaintImpl (0, x, y, width, height);
37049 }, "~N,~N,~N,~N");
37050 Clazz_defineMethod (c$, "repaint", 
37051 function (tm, x, y, width, height) {
37052 this.repaintImpl (tm, x, y, width, height);
37053 }, "~N,~N,~N,~N,~N");
37054 Clazz_defineMethod (c$, "repaintImpl", 
37055 function (tm, x, y, width, height) {
37056 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37057 if (this.parent != null) {
37058 var px = this.x + ((x < 0) ? 0 : x);
37059 var py = this.y + ((y < 0) ? 0 : y);
37060 var pwidth = (width > this.width) ? this.width : width;
37061 var pheight = (height > this.height) ? this.height : height;
37062 this.parent.repaint (tm, px, py, pwidth, pheight);
37063 }} else {
37064 if (this.isVisible () && (this.peer != null) && (width > 0) && (height > 0)) {
37065 var e =  new java.awt.event.PaintEvent (this, 801,  new java.awt.Rectangle (x, y, width, height));
37066 java.awt.Toolkit.getEventQueue ().postEvent (e);
37067 }}}, "~N,~N,~N,~N,~N");
37068 Clazz_defineMethod (c$, "print", 
37069 function (g) {
37070 this.paint (g);
37071 }, "java.awt.Graphics");
37072 Clazz_defineMethod (c$, "printAll", 
37073 function (g) {
37074 }, "java.awt.Graphics");
37075 Clazz_defineMethod (c$, "printHeavyweightComponents", 
37076 function (g) {
37077 }, "java.awt.Graphics");
37078 Clazz_overrideMethod (c$, "imageUpdate", 
37079 function (img, infoflags, x, y, w, h) {
37080 return false;
37081 }, "java.awt.Image,~N,~N,~N,~N,~N");
37082 Clazz_defineMethod (c$, "createImage", 
37083 function (producer) {
37084 return this.getToolkit ().createImage (producer);
37085 }, "java.awt.image.ImageProducer");
37086 Clazz_defineMethod (c$, "createImage", 
37087 function (width, height) {
37088 return null;
37089 }, "~N,~N");
37090 Clazz_defineMethod (c$, "createVolatileImage", 
37091 function (width, height) {
37092 return null;
37093 }, "~N,~N");
37094 Clazz_defineMethod (c$, "createVolatileImage", 
37095 function (width, height, caps) {
37096 return this.createVolatileImage (width, height);
37097 }, "~N,~N,java.awt.ImageCapabilities");
37098 Clazz_defineMethod (c$, "prepareImage", 
37099 function (image, observer) {
37100 return this.prepareImage (image, -1, -1, observer);
37101 }, "java.awt.Image,java.awt.image.ImageObserver");
37102 Clazz_defineMethod (c$, "prepareImage", 
37103 function (image, width, height, observer) {
37104 return false;
37105 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37106 Clazz_defineMethod (c$, "checkImage", 
37107 function (image, observer) {
37108 return this.checkImage (image, -1, -1, observer);
37109 }, "java.awt.Image,java.awt.image.ImageObserver");
37110 Clazz_defineMethod (c$, "checkImage", 
37111 function (image, width, height, observer) {
37112 return 0;
37113 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37114 Clazz_defineMethod (c$, "setIgnoreRepaint", 
37115 function (ignoreRepaint) {
37116 }, "~B");
37117 Clazz_defineMethod (c$, "getIgnoreRepaint", 
37118 function () {
37119 return false;
37120 });
37121 Clazz_defineMethod (c$, "contains", 
37122 function (x, y) {
37123 return this.inside (x, y);
37124 }, "~N,~N");
37125 Clazz_defineMethod (c$, "inside", 
37126 function (x, y) {
37127 return (x >= 0) && (x < this.width) && (y >= 0) && (y < this.height);
37128 }, "~N,~N");
37129 Clazz_defineMethod (c$, "getComponentAt", 
37130 function (x, y) {
37131 return this.locate (x, y);
37132 }, "~N,~N");
37133 Clazz_defineMethod (c$, "locate", 
37134 function (x, y) {
37135 return this.contains (x, y) ? this : null;
37136 }, "~N,~N");
37137 Clazz_defineMethod (c$, "getComponentAt", 
37138 function (p) {
37139 return this.getComponentAt (p.x, p.y);
37140 }, "java.awt.Point");
37141 Clazz_defineMethod (c$, "deliverEvent", 
37142 function (e) {
37143 this.postEvent (e);
37144 }, "java.awt.Event");
37145 Clazz_defineMethod (c$, "dispatchEvent", 
37146 function (e) {
37147 this.dispatchEventImpl (e);
37148 }, "java.awt.AWTEvent");
37149 Clazz_defineMethod (c$, "dispatchEventImpl", 
37150 function (e) {
37151 this.dispatchEventImplComp (e);
37152 }, "java.awt.AWTEvent");
37153 Clazz_defineMethod (c$, "dispatchEventImplComp", 
37154 function (e) {
37155 var id = e.getID ();
37156 java.awt.EventQueue.setCurrentEventAndMostRecentTime (e);
37157 if (!e.focusManagerIsDispatching) {
37158 if (e.isPosted) {
37159 e.isPosted = true;
37160 }}if (!e.isConsumed ()) {
37161 if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37162 if (e.isConsumed ()) {
37163 return;
37164 }}}if (this.areInputMethodsEnabled ()) {
37165 if ((Clazz_instanceOf (e, java.awt.event.InputEvent)) || (Clazz_instanceOf (e, java.awt.event.FocusEvent))) {
37166 }} else {
37167 if (id == 1004) {
37168 }}switch (id) {
37169 case 401:
37170 case 402:
37171 var p = ((Clazz_instanceOf (this, java.awt.Container)) ? this : this.parent);
37172 if (p != null) {
37173 p.preProcessKeyEvent (e);
37174 }break;
37175 case 201:
37176 break;
37177 default:
37178 break;
37179 }
37180 if (this.newEventsOnly) {
37181 if (this.eventEnabled (e)) {
37182 this.processEvent (e);
37183 }} else if (id == 507) {
37184 this.autoProcessMouseWheel (e);
37185 } else if (!(Clazz_instanceOf (e, java.awt.event.MouseEvent) && !this.postsOldMouseEvents ())) {
37186 }if (id == 201 && !e.isConsumed ()) {
37187 }if (!(Clazz_instanceOf (e, java.awt.event.KeyEvent))) {
37188 }}, "java.awt.AWTEvent");
37189 Clazz_defineMethod (c$, "autoProcessMouseWheel", 
37190 function (e) {
37191 }, "java.awt.event.MouseWheelEvent");
37192 Clazz_defineMethod (c$, "dispatchMouseWheelToAncestor", 
37193 function (e) {
37194 var newX;
37195 var newY;
37196 newX = e.getX () + this.getX ();
37197 newY = e.getY () + this.getY ();
37198 var newMWE;
37199 {
37200 var anc = this.getParent ();
37201 while (anc != null && !anc.eventEnabled (e)) {
37202 newX += anc.getX ();
37203 newY += anc.getY ();
37204 if (!(Clazz_instanceOf (anc, java.awt.Window))) {
37205 anc = anc.getParent ();
37206 } else {
37207 break;
37208 }}
37209 if (anc != null && anc.eventEnabled (e)) {
37210 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 ());
37211 (e).copyPrivateDataInto (newMWE);
37212 anc.dispatchEventToSelf (newMWE);
37213 }}return true;
37214 }, "java.awt.event.MouseWheelEvent");
37215 Clazz_defineMethod (c$, "checkWindowClosingException", 
37216 function () {
37217 if (this.windowClosingException != null) {
37218 if (Clazz_instanceOf (this, java.awt.Dialog)) {
37219 (this).interruptBlocking ();
37220 } else {
37221 this.windowClosingException.fillInStackTrace ();
37222 this.windowClosingException.printStackTrace ();
37223 this.windowClosingException = null;
37224 }return true;
37225 }return false;
37226 });
37227 Clazz_defineMethod (c$, "areInputMethodsEnabled", 
37228 function () {
37229 return ((this.eventMask & 4096) != 0) && ((this.eventMask & 8) != 0 || this.keyListener != null);
37230 });
37231 Clazz_defineMethod (c$, "eventEnabled", 
37232 function (e) {
37233 return this.eventTypeEnabled (e.id);
37234 }, "java.awt.AWTEvent");
37235 Clazz_defineMethod (c$, "eventTypeEnabled", 
37236 function (type) {
37237 switch (type) {
37238 case 100:
37239 case 101:
37240 case 102:
37241 case 103:
37242 if ((this.eventMask & 1) != 0 || this.componentListener != null) {
37243 return true;
37244 }break;
37245 case 1004:
37246 case 1005:
37247 if ((this.eventMask & 4) != 0 || this.focusListener != null) {
37248 return true;
37249 }break;
37250 case 401:
37251 case 402:
37252 case 400:
37253 if ((this.eventMask & 8) != 0 || this.keyListener != null) {
37254 return true;
37255 }break;
37256 case 501:
37257 case 502:
37258 case 504:
37259 case 505:
37260 case 500:
37261 if ((this.eventMask & 16) != 0 || this.mouseListener != null) {
37262 return true;
37263 }break;
37264 case 503:
37265 case 506:
37266 if ((this.eventMask & 32) != 0 || this.mouseMotionListener != null) {
37267 return true;
37268 }break;
37269 case 507:
37270 if ((this.eventMask & 131072) != 0 || this.mouseWheelListener != null) {
37271 return true;
37272 }break;
37273 case 1100:
37274 case 1101:
37275 if ((this.eventMask & 2048) != 0 || this.inputMethodListener != null) {
37276 return true;
37277 }break;
37278 case 1400:
37279 if ((this.eventMask & 32768) != 0 || this.hierarchyListener != null) {
37280 return true;
37281 }break;
37282 case 1401:
37283 case 1402:
37284 if ((this.eventMask & 65536) != 0 || this.hierarchyBoundsListener != null) {
37285 return true;
37286 }break;
37287 case 1001:
37288 if ((this.eventMask & 128) != 0) {
37289 return true;
37290 }break;
37291 case 900:
37292 if ((this.eventMask & 1024) != 0) {
37293 return true;
37294 }break;
37295 case 701:
37296 if ((this.eventMask & 512) != 0) {
37297 return true;
37298 }break;
37299 case 601:
37300 if ((this.eventMask & 256) != 0) {
37301 return true;
37302 }break;
37303 default:
37304 break;
37305 }
37306 if (type > 1999) {
37307 return true;
37308 }return false;
37309 }, "~N");
37310 Clazz_defineMethod (c$, "postEvent", 
37311 function (e) {
37312 if (this.handleEvent (e)) {
37313 e.consume ();
37314 return true;
37315 }var parent = this.parent;
37316 var eventx = e.x;
37317 var eventy = e.y;
37318 if (parent != null) {
37319 e.translate (this.x, this.y);
37320 if (parent.postEvent (e)) {
37321 e.consume ();
37322 return true;
37323 }e.x = eventx;
37324 e.y = eventy;
37325 }return false;
37326 }, "java.awt.Event");
37327 Clazz_defineMethod (c$, "addComponentListener", 
37328 function (l) {
37329 if (l == null) {
37330 return;
37331 }this.componentListener = java.awt.AWTEventMulticaster.add (this.componentListener, l);
37332 this.newEventsOnly = true;
37333 }, "java.awt.event.ComponentListener");
37334 Clazz_defineMethod (c$, "removeComponentListener", 
37335 function (l) {
37336 if (l == null) {
37337 return;
37338 }this.componentListener = java.awt.AWTEventMulticaster.remove (this.componentListener, l);
37339 }, "java.awt.event.ComponentListener");
37340 Clazz_defineMethod (c$, "getComponentListeners", 
37341 function () {
37342 return (this.getListeners (java.awt.event.ComponentListener));
37343 });
37344 Clazz_defineMethod (c$, "addFocusListener", 
37345 function (l) {
37346 if (l == null) {
37347 return;
37348 }this.focusListener = java.awt.AWTEventMulticaster.add (this.focusListener, l);
37349 this.newEventsOnly = true;
37350 }, "java.awt.event.FocusListener");
37351 Clazz_defineMethod (c$, "removeFocusListener", 
37352 function (l) {
37353 if (l == null) {
37354 return;
37355 }this.focusListener = java.awt.AWTEventMulticaster.remove (this.focusListener, l);
37356 }, "java.awt.event.FocusListener");
37357 Clazz_defineMethod (c$, "getFocusListeners", 
37358 function () {
37359 return (this.getListeners (java.awt.event.FocusListener));
37360 });
37361 Clazz_defineMethod (c$, "addHierarchyListener", 
37362 function (l) {
37363 }, "java.awt.event.HierarchyListener");
37364 Clazz_defineMethod (c$, "removeHierarchyListener", 
37365 function (l) {
37366 }, "java.awt.event.HierarchyListener");
37367 Clazz_defineMethod (c$, "getHierarchyListeners", 
37368 function () {
37369 return (this.getListeners (java.awt.event.HierarchyListener));
37370 });
37371 Clazz_defineMethod (c$, "addHierarchyBoundsListener", 
37372 function (l) {
37373 if (l == null) {
37374 return;
37375 }var notifyAncestors;
37376 {
37377 notifyAncestors = (this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0);
37378 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.add (this.hierarchyBoundsListener, l);
37379 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener != null);
37380 this.newEventsOnly = true;
37381 }if (notifyAncestors) {
37382 {
37383 this.adjustListeningChildrenOnParent (65536, 1);
37384 }}}, "java.awt.event.HierarchyBoundsListener");
37385 Clazz_defineMethod (c$, "removeHierarchyBoundsListener", 
37386 function (l) {
37387 if (l == null) {
37388 return;
37389 }var notifyAncestors;
37390 {
37391 notifyAncestors = (this.hierarchyBoundsListener != null && (this.eventMask & 65536) == 0);
37392 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.remove (this.hierarchyBoundsListener, l);
37393 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener == null);
37394 }if (notifyAncestors) {
37395 {
37396 this.adjustListeningChildrenOnParent (65536, -1);
37397 }}}, "java.awt.event.HierarchyBoundsListener");
37398 Clazz_defineMethod (c$, "numListening", 
37399 function (mask) {
37400 return this.numListeningMask (mask);
37401 }, "~N");
37402 Clazz_defineMethod (c$, "numListeningMask", 
37403 function (mask) {
37404 if ((mask == 32768 && (this.hierarchyListener != null || (this.eventMask & 32768) != 0)) || (mask == 65536 && (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0))) {
37405 return 1;
37406 } else {
37407 return 0;
37408 }}, "~N");
37409 Clazz_defineMethod (c$, "countHierarchyMembers", 
37410 function () {
37411 return 1;
37412 });
37413 Clazz_defineMethod (c$, "createHierarchyEvents", 
37414 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37415 return this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
37416 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37417 Clazz_defineMethod (c$, "createHierEventsComp", 
37418 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37419 switch (id) {
37420 case 1400:
37421 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || enabledOnToolkit) {
37422 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent, changeFlags);
37423 this.dispatchEvent (e);
37424 return 1;
37425 }break;
37426 case 1401:
37427 case 1402:
37428 if (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0 || enabledOnToolkit) {
37429 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent);
37430 this.dispatchEvent (e);
37431 return 1;
37432 }break;
37433 default:
37434 break;
37435 }
37436 return 0;
37437 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37438 Clazz_defineMethod (c$, "getHierarchyBoundsListeners", 
37439 function () {
37440 return (this.getListeners (java.awt.event.HierarchyBoundsListener));
37441 });
37442 Clazz_defineMethod (c$, "adjustListeningChildrenOnParent", 
37443 function (mask, num) {
37444 if (this.parent != null) {
37445 this.parent.adjustListeningChildren (mask, num);
37446 }}, "~N,~N");
37447 Clazz_defineMethod (c$, "addKeyListener", 
37448 function (l) {
37449 if (l == null) {
37450 return;
37451 }this.keyListener = java.awt.AWTEventMulticaster.add (this.keyListener, l);
37452 this.newEventsOnly = true;
37453 }, "java.awt.event.KeyListener");
37454 Clazz_defineMethod (c$, "removeKeyListener", 
37455 function (l) {
37456 if (l == null) {
37457 return;
37458 }this.keyListener = java.awt.AWTEventMulticaster.remove (this.keyListener, l);
37459 }, "java.awt.event.KeyListener");
37460 Clazz_defineMethod (c$, "getKeyListeners", 
37461 function () {
37462 return (this.getListeners (java.awt.event.KeyListener));
37463 });
37464 Clazz_defineMethod (c$, "addMouseListener", 
37465 function (l) {
37466 if (l == null) {
37467 return;
37468 }System.out.println ("C adding mouse listener " + l);
37469 this.mouseListener = java.awt.AWTEventMulticaster.add (this.mouseListener, l);
37470 this.newEventsOnly = true;
37471 }, "java.awt.event.MouseListener");
37472 Clazz_defineMethod (c$, "removeMouseListener", 
37473 function (l) {
37474 if (l == null) {
37475 return;
37476 }this.mouseListener = java.awt.AWTEventMulticaster.remove (this.mouseListener, l);
37477 }, "java.awt.event.MouseListener");
37478 Clazz_defineMethod (c$, "getMouseListeners", 
37479 function () {
37480 return (this.getListeners (java.awt.event.MouseListener));
37481 });
37482 Clazz_defineMethod (c$, "addMouseMotionListener", 
37483 function (l) {
37484 if (l == null) {
37485 return;
37486 }this.mouseMotionListener = java.awt.AWTEventMulticaster.add (this.mouseMotionListener, l);
37487 this.newEventsOnly = true;
37488 }, "java.awt.event.MouseMotionListener");
37489 Clazz_defineMethod (c$, "removeMouseMotionListener", 
37490 function (l) {
37491 if (l == null) {
37492 return;
37493 }this.mouseMotionListener = java.awt.AWTEventMulticaster.remove (this.mouseMotionListener, l);
37494 }, "java.awt.event.MouseMotionListener");
37495 Clazz_defineMethod (c$, "getMouseMotionListeners", 
37496 function () {
37497 return (this.getListeners (java.awt.event.MouseMotionListener));
37498 });
37499 Clazz_defineMethod (c$, "addMouseWheelListener", 
37500 function (l) {
37501 if (l == null) {
37502 return;
37503 }this.mouseWheelListener = java.awt.AWTEventMulticaster.add (this.mouseWheelListener, l);
37504 this.newEventsOnly = true;
37505 }, "java.awt.event.MouseWheelListener");
37506 Clazz_defineMethod (c$, "removeMouseWheelListener", 
37507 function (l) {
37508 if (l == null) {
37509 return;
37510 }this.mouseWheelListener = java.awt.AWTEventMulticaster.remove (this.mouseWheelListener, l);
37511 }, "java.awt.event.MouseWheelListener");
37512 Clazz_defineMethod (c$, "getMouseWheelListeners", 
37513 function () {
37514 return (this.getListeners (java.awt.event.MouseWheelListener));
37515 });
37516 Clazz_defineMethod (c$, "addInputMethodListener", 
37517 function (l) {
37518 if (l == null) {
37519 return;
37520 }this.inputMethodListener = java.awt.AWTEventMulticaster.add (this.inputMethodListener, l);
37521 this.newEventsOnly = true;
37522 }, "java.awt.event.InputMethodListener");
37523 Clazz_defineMethod (c$, "removeInputMethodListener", 
37524 function (l) {
37525 if (l == null) {
37526 return;
37527 }this.inputMethodListener = java.awt.AWTEventMulticaster.remove (this.inputMethodListener, l);
37528 }, "java.awt.event.InputMethodListener");
37529 Clazz_defineMethod (c$, "getInputMethodListeners", 
37530 function () {
37531 return (this.getListeners (java.awt.event.InputMethodListener));
37532 });
37533 Clazz_defineMethod (c$, "getListeners", 
37534 function (listenerType) {
37535 return this.getListenersComp (listenerType);
37536 }, "Class");
37537 Clazz_defineMethod (c$, "getListenersComp", 
37538 function (listenerType) {
37539 var l = null;
37540 if (listenerType === java.awt.event.ComponentListener) {
37541 l = this.componentListener;
37542 } else if (listenerType === java.awt.event.FocusListener) {
37543 l = this.focusListener;
37544 } else if (listenerType === java.awt.event.HierarchyListener) {
37545 l = this.hierarchyListener;
37546 } else if (listenerType === java.awt.event.HierarchyBoundsListener) {
37547 l = this.hierarchyBoundsListener;
37548 } else if (listenerType === java.awt.event.KeyListener) {
37549 l = this.keyListener;
37550 } else if (listenerType === java.awt.event.MouseListener) {
37551 l = this.mouseListener;
37552 } else if (listenerType === java.awt.event.MouseMotionListener) {
37553 l = this.mouseMotionListener;
37554 } else if (listenerType === java.awt.event.MouseWheelListener) {
37555 l = this.mouseWheelListener;
37556 } else if (listenerType === java.awt.event.InputMethodListener) {
37557 l = this.inputMethodListener;
37558 } else if (listenerType === java.beans.PropertyChangeListener) {
37559 return this.getPropertyChangeListeners ();
37560 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
37561 }, "Class");
37562 Clazz_defineMethod (c$, "enableEvents", 
37563 function (eventsToEnable) {
37564 var notifyAncestors = 0;
37565 {
37566 if ((eventsToEnable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) == 0) {
37567 notifyAncestors |= 32768;
37568 }if ((eventsToEnable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0) {
37569 notifyAncestors |= 65536;
37570 }this.eventMask |= eventsToEnable;
37571 this.newEventsOnly = true;
37572 }if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37573 this.parent.proxyEnableEvents (this.eventMask);
37574 }if (notifyAncestors != 0) {
37575 {
37576 this.adjustListeningChildrenOnParent (notifyAncestors, 1);
37577 }}}, "~N");
37578 Clazz_defineMethod (c$, "disableEvents", 
37579 function (eventsToDisable) {
37580 var notifyAncestors = 0;
37581 {
37582 if ((eventsToDisable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) != 0) {
37583 notifyAncestors |= 32768;
37584 }if ((eventsToDisable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) != 0) {
37585 notifyAncestors |= 65536;
37586 }this.eventMask &= ~eventsToDisable;
37587 }if (notifyAncestors != 0) {
37588 {
37589 this.adjustListeningChildrenOnParent (notifyAncestors, -1);
37590 }}}, "~N");
37591 Clazz_defineMethod (c$, "checkCoalescing", 
37592  function () {
37593 if (this.getClass ().getClassLoader () == null) {
37594 return false;
37595 }var clazz = this.getClass ();
37596 {
37597 var value = java.awt.Component.coalesceMap.get (clazz);
37598 if (value != null) {
37599 return value;
37600 }var enabled = Boolean.$valueOf (swingjs.JSToolkit.checkClassMethod (this, "coalesceEvents", "\\java.awt.AWTEvent\\java.awt.AWTEvent"));
37601 java.awt.Component.coalesceMap.put (clazz, enabled);
37602 return enabled;
37603 }});
37604 Clazz_defineMethod (c$, "isCoalescingEnabled", 
37605 function () {
37606 return this.coalescingEnabled;
37607 });
37608 Clazz_defineMethod (c$, "coalesceEvents", 
37609 function (existingEvent, newEvent) {
37610 return null;
37611 }, "java.awt.AWTEvent,java.awt.AWTEvent");
37612 Clazz_defineMethod (c$, "processEvent", 
37613 function (e) {
37614 this.processEventComp (e);
37615 }, "java.awt.AWTEvent");
37616 Clazz_defineMethod (c$, "processEventComp", 
37617 function (e) {
37618 if (Clazz_instanceOf (e, java.awt.event.FocusEvent)) {
37619 this.processFocusEvent (e);
37620 } else if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
37621 switch (e.getID ()) {
37622 case 501:
37623 case 502:
37624 case 500:
37625 case 504:
37626 case 505:
37627 this.processMouseEvent (e);
37628 break;
37629 case 503:
37630 case 506:
37631 this.processMouseMotionEvent (e);
37632 break;
37633 case 507:
37634 this.processMouseWheelEvent (e);
37635 break;
37636 }
37637 } else if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37638 this.processKeyEvent (e);
37639 } else if (Clazz_instanceOf (e, java.awt.event.ComponentEvent)) {
37640 this.processComponentEvent (e);
37641 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
37642 this.processInputMethodEvent (e);
37643 } else if (Clazz_instanceOf (e, java.awt.event.HierarchyEvent)) {
37644 switch (e.getID ()) {
37645 case 1400:
37646 this.processHierarchyEvent (e);
37647 break;
37648 case 1401:
37649 case 1402:
37650 this.processHierarchyBoundsEvent (e);
37651 break;
37652 }
37653 }}, "java.awt.AWTEvent");
37654 Clazz_defineMethod (c$, "processComponentEvent", 
37655 function (e) {
37656 var listener = this.componentListener;
37657 if (listener != null) {
37658 var id = e.getID ();
37659 switch (id) {
37660 case 101:
37661 listener.componentResized (e);
37662 break;
37663 case 100:
37664 listener.componentMoved (e);
37665 break;
37666 case 102:
37667 listener.componentShown (e);
37668 break;
37669 case 103:
37670 listener.componentHidden (e);
37671 break;
37672 }
37673 }}, "java.awt.event.ComponentEvent");
37674 Clazz_defineMethod (c$, "processFocusEvent", 
37675 function (e) {
37676 var listener = this.focusListener;
37677 if (listener != null) {
37678 var id = e.getID ();
37679 switch (id) {
37680 case 1004:
37681 listener.focusGained (e);
37682 break;
37683 case 1005:
37684 listener.focusLost (e);
37685 break;
37686 }
37687 }}, "java.awt.event.FocusEvent");
37688 Clazz_defineMethod (c$, "processKeyEvent", 
37689 function (e) {
37690 var listener = this.keyListener;
37691 if (listener != null) {
37692 var id = e.getID ();
37693 switch (id) {
37694 case 400:
37695 listener.keyTyped (e);
37696 break;
37697 case 401:
37698 listener.keyPressed (e);
37699 break;
37700 case 402:
37701 listener.keyReleased (e);
37702 break;
37703 }
37704 }}, "java.awt.event.KeyEvent");
37705 Clazz_defineMethod (c$, "processMouseEvent", 
37706 function (e) {
37707 var listener = this.mouseListener;
37708 if (listener != null) {
37709 var id = e.getID ();
37710 switch (id) {
37711 case 501:
37712 listener.mousePressed (e);
37713 break;
37714 case 502:
37715 listener.mouseReleased (e);
37716 break;
37717 case 500:
37718 listener.mouseClicked (e);
37719 break;
37720 case 505:
37721 listener.mouseExited (e);
37722 break;
37723 case 504:
37724 listener.mouseEntered (e);
37725 break;
37726 }
37727 }}, "java.awt.event.MouseEvent");
37728 Clazz_defineMethod (c$, "processMouseMotionEvent", 
37729 function (e) {
37730 var listener = this.mouseMotionListener;
37731 if (listener != null) {
37732 var id = e.getID ();
37733 switch (id) {
37734 case 503:
37735 listener.mouseMoved (e);
37736 break;
37737 case 506:
37738 listener.mouseDragged (e);
37739 break;
37740 }
37741 }}, "java.awt.event.MouseEvent");
37742 Clazz_defineMethod (c$, "processMouseWheelEvent", 
37743 function (e) {
37744 var listener = this.mouseWheelListener;
37745 if (listener != null) {
37746 var id = e.getID ();
37747 switch (id) {
37748 case 507:
37749 listener.mouseWheelMoved (e);
37750 break;
37751 }
37752 }}, "java.awt.event.MouseWheelEvent");
37753 Clazz_defineMethod (c$, "postsOldMouseEvents", 
37754 function () {
37755 return false;
37756 });
37757 Clazz_defineMethod (c$, "processInputMethodEvent", 
37758 function (e) {
37759 var listener = this.inputMethodListener;
37760 if (listener != null) {
37761 var id = e.getID ();
37762 switch (id) {
37763 case 1100:
37764 listener.inputMethodTextChanged (e);
37765 break;
37766 case 1101:
37767 listener.caretPositionChanged (e);
37768 break;
37769 }
37770 }}, "java.awt.event.InputMethodEvent");
37771 Clazz_defineMethod (c$, "processHierarchyEvent", 
37772 function (e) {
37773 var listener = this.hierarchyListener;
37774 if (listener != null) {
37775 var id = e.getID ();
37776 switch (id) {
37777 case 1400:
37778 listener.hierarchyChanged (e);
37779 break;
37780 }
37781 }}, "java.awt.event.HierarchyEvent");
37782 Clazz_defineMethod (c$, "processHierarchyBoundsEvent", 
37783 function (e) {
37784 var listener = this.hierarchyBoundsListener;
37785 if (listener != null) {
37786 var id = e.getID ();
37787 switch (id) {
37788 case 1401:
37789 listener.ancestorMoved (e);
37790 break;
37791 case 1402:
37792 listener.ancestorResized (e);
37793 break;
37794 }
37795 }}, "java.awt.event.HierarchyEvent");
37796 Clazz_defineMethod (c$, "handleEvent", 
37797 function (evt) {
37798 switch (evt.id) {
37799 case 504:
37800 return this.mouseEnter (evt, evt.x, evt.y);
37801 case 505:
37802 return this.mouseExit (evt, evt.x, evt.y);
37803 case 503:
37804 return this.mouseMove (evt, evt.x, evt.y);
37805 case 501:
37806 return this.mouseDown (evt, evt.x, evt.y);
37807 case 506:
37808 return this.mouseDrag (evt, evt.x, evt.y);
37809 case 502:
37810 return this.mouseUp (evt, evt.x, evt.y);
37811 case 401:
37812 case 403:
37813 return this.keyDown (evt, evt.key);
37814 case 402:
37815 case 404:
37816 return this.keyUp (evt, evt.key);
37817 case 1001:
37818 return this.action (evt, evt.arg);
37819 case 1004:
37820 return this.gotFocus (evt, evt.arg);
37821 case 1005:
37822 return this.lostFocus (evt, evt.arg);
37823 }
37824 return false;
37825 }, "java.awt.Event");
37826 Clazz_defineMethod (c$, "mouseDown", 
37827 function (evt, x, y) {
37828 return false;
37829 }, "java.awt.Event,~N,~N");
37830 Clazz_defineMethod (c$, "mouseDrag", 
37831 function (evt, x, y) {
37832 return false;
37833 }, "java.awt.Event,~N,~N");
37834 Clazz_defineMethod (c$, "mouseUp", 
37835 function (evt, x, y) {
37836 return false;
37837 }, "java.awt.Event,~N,~N");
37838 Clazz_defineMethod (c$, "mouseMove", 
37839 function (evt, x, y) {
37840 return false;
37841 }, "java.awt.Event,~N,~N");
37842 Clazz_defineMethod (c$, "mouseEnter", 
37843 function (evt, x, y) {
37844 return false;
37845 }, "java.awt.Event,~N,~N");
37846 Clazz_defineMethod (c$, "mouseExit", 
37847 function (evt, x, y) {
37848 return false;
37849 }, "java.awt.Event,~N,~N");
37850 Clazz_defineMethod (c$, "keyDown", 
37851 function (evt, key) {
37852 return false;
37853 }, "java.awt.Event,~N");
37854 Clazz_defineMethod (c$, "keyUp", 
37855 function (evt, key) {
37856 return false;
37857 }, "java.awt.Event,~N");
37858 Clazz_defineMethod (c$, "action", 
37859 function (evt, what) {
37860 return false;
37861 }, "java.awt.Event,~O");
37862 Clazz_defineMethod (c$, "addNotify", 
37863 function () {
37864 this.addNotifyComp ();
37865 });
37866 Clazz_defineMethod (c$, "addNotifyComp", 
37867 function () {
37868 {
37869 var peer = this.peer;
37870 if (peer == null || Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
37871 if (peer == null) {
37872 this.peer = peer = this.getToolkit ().createComponent (this);
37873 }if (this.parent != null) {
37874 var mask = 0;
37875 if ((this.mouseListener != null) || ((this.eventMask & 16) != 0)) {
37876 mask |= 16;
37877 }if ((this.mouseMotionListener != null) || ((this.eventMask & 32) != 0)) {
37878 mask |= 32;
37879 }if ((this.mouseWheelListener != null) || ((this.eventMask & 131072) != 0)) {
37880 mask |= 131072;
37881 }if (this.focusListener != null || (this.eventMask & 4) != 0) {
37882 mask |= 4;
37883 }if (this.keyListener != null || (this.eventMask & 8) != 0) {
37884 mask |= 8;
37885 }if (mask != 0) {
37886 this.parent.proxyEnableEvents (mask);
37887 }}} else {
37888 var parent = this.parent;
37889 if (parent != null && Clazz_instanceOf (parent.peer, java.awt.peer.LightweightPeer)) {
37890 this.relocateComponent ();
37891 }}this.invalidate ();
37892 this.peerFont = this.getFont ();
37893 if (this.getContainer () != null && !this.isAddNotifyComplete) {
37894 this.getContainer ().increaseComponentCount (this);
37895 }if (this.parent != null && this.parent.peer != null) {
37896 var parentContPeer = this.parent.peer;
37897 if (Clazz_instanceOf (parentContPeer, java.awt.peer.LightweightPeer) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
37898 var hwParent = this.getNativeContainer ();
37899 if (hwParent != null && hwParent.peer != null) {
37900 parentContPeer = hwParent.peer;
37901 }}}if (!this.isAddNotifyComplete) {
37902 this.mixOnShowing ();
37903 }this.isAddNotifyComplete = true;
37904 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
37905 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
37906 this.dispatchEvent (e);
37907 }}});
37908 Clazz_defineMethod (c$, "getNativeContainer", 
37909 function () {
37910 var p = this.parent;
37911 while (p != null && Clazz_instanceOf (p.peer, java.awt.peer.LightweightPeer)) {
37912 p = p.getParent ();
37913 }
37914 return p;
37915 });
37916 Clazz_defineMethod (c$, "removeNotify", 
37917 function () {
37918 this.removeNotifyComp ();
37919 });
37920 Clazz_defineMethod (c$, "removeNotifyComp", 
37921 function () {
37922 {
37923 if (this.getContainer () != null && this.isAddNotifyComplete) {
37924 this.getContainer ().decreaseComponentCount (this);
37925 }var p = this.peer;
37926 if (p != null) {
37927 var isLightweight = this.isLightweight ();
37928 this.peer = null;
37929 this.peerFont = null;
37930 java.awt.Toolkit.getEventQueue ().removeSourceEvents (this, false);
37931 p.dispose ();
37932 this.mixOnHiding (isLightweight);
37933 this.isAddNotifyComplete = false;
37934 }if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
37935 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
37936 this.dispatchEvent (e);
37937 }}});
37938 Clazz_defineMethod (c$, "gotFocus", 
37939 function (evt, what) {
37940 return false;
37941 }, "java.awt.Event,~O");
37942 Clazz_defineMethod (c$, "lostFocus", 
37943 function (evt, what) {
37944 return false;
37945 }, "java.awt.Event,~O");
37946 Clazz_defineMethod (c$, "isFocusTraversable", 
37947 function () {
37948 if (this.$isFocusTraversableOverridden == 0) {
37949 this.$isFocusTraversableOverridden = 1;
37950 }return this.focusable;
37951 });
37952 Clazz_defineMethod (c$, "isFocusable", 
37953 function () {
37954 return this.isFocusTraversable ();
37955 });
37956 Clazz_defineMethod (c$, "setFocusable", 
37957 function (focusable) {
37958 var oldFocusable;
37959 {
37960 oldFocusable = this.focusable;
37961 this.focusable = focusable;
37962 }this.$isFocusTraversableOverridden = 2;
37963 this.firePropertyChangeObject ("focusable", new Boolean (oldFocusable), new Boolean (focusable));
37964 }, "~B");
37965 Clazz_defineMethod (c$, "isFocusTraversableOverridden", 
37966 function () {
37967 return (this.$isFocusTraversableOverridden != 1);
37968 });
37969 Clazz_defineMethod (c$, "getFocusTraversalKeysEnabled", 
37970 function () {
37971 return this.focusTraversalKeysEnabled;
37972 });
37973 Clazz_defineMethod (c$, "requestFocus", 
37974 function () {
37975 swingjs.JSToolkit.requestFocus (this);
37976 });
37977 Clazz_defineMethod (c$, "requestFocus", 
37978 function (temporary) {
37979 return swingjs.JSToolkit.requestFocus (this);
37980 }, "~B");
37981 Clazz_defineMethod (c$, "requestFocusInWindow", 
37982 function () {
37983 return swingjs.JSToolkit.requestFocus (this);
37984 });
37985 Clazz_defineMethod (c$, "requestFocusInWindow", 
37986 function (temporary) {
37987 return swingjs.JSToolkit.requestFocus (this);
37988 }, "~B");
37989 Clazz_defineMethod (c$, "getFocusCycleRootAncestor", 
37990 function () {
37991 var rootAncestor = this.parent;
37992 while (rootAncestor != null && !rootAncestor.isFocusCycleRoot ()) {
37993 rootAncestor = rootAncestor.parent;
37994 }
37995 return rootAncestor;
37996 });
37997 Clazz_defineMethod (c$, "isFocusCycleRoot", 
37998 function (container) {
37999 return this.isFocusCycleRootComp (container);
38000 }, "java.awt.Container");
38001 Clazz_defineMethod (c$, "isFocusCycleRootComp", 
38002 function (container) {
38003 var rootAncestor = this.getFocusCycleRootAncestor ();
38004 return (rootAncestor === container);
38005 }, "java.awt.Container");
38006 Clazz_defineMethod (c$, "hasFocus", 
38007 function () {
38008 return swingjs.JSToolkit.hasFocus (this);
38009 });
38010 Clazz_defineMethod (c$, "isFocusOwner", 
38011 function () {
38012 return this.hasFocus ();
38013 });
38014 Clazz_defineMethod (c$, "setAutoFocusTransferOnDisposal", 
38015 function (value) {
38016 this.autoFocusTransferOnDisposal = value;
38017 }, "~B");
38018 Clazz_defineMethod (c$, "isAutoFocusTransferOnDisposal", 
38019 function () {
38020 return this.autoFocusTransferOnDisposal;
38021 });
38022 Clazz_defineMethod (c$, "paramString", 
38023 function () {
38024 return this.paramStringComp ();
38025 });
38026 Clazz_defineMethod (c$, "paramStringComp", 
38027 function () {
38028 var thisName = this.getName ();
38029 var str = (thisName != null ? thisName : "");
38030 if (!this.isValid ()) {
38031 str += ",invalid";
38032 }if (!this.visible) {
38033 str += ",hidden";
38034 }if (!this.enabled) {
38035 str += ",disabled";
38036 }str += ",parent:" + (this.parent == null ? null : this.parent.getName ()) + "," + this.x + "," + this.y + "," + this.width + "x" + this.height;
38037 return str;
38038 });
38039 Clazz_overrideMethod (c$, "toString", 
38040 function () {
38041 return this.getClass ().getName () + "[" + this.paramString () + "]";
38042 });
38043 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38044 function (listener) {
38045 this.addPropChangeListenerComp (listener);
38046 }, "java.beans.PropertyChangeListener");
38047 Clazz_defineMethod (c$, "addPropChangeListenerComp", 
38048 function (listener) {
38049 {
38050 if (listener == null) {
38051 return;
38052 }if (this.changeSupport == null) {
38053 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38054 }this.changeSupport.addPropertyChangeListener1 (listener);
38055 }}, "java.beans.PropertyChangeListener");
38056 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38057 function (listener) {
38058 {
38059 if (listener == null || this.changeSupport == null) {
38060 return;
38061 }this.changeSupport.removePropertyChangeListener (listener);
38062 }}, "java.beans.PropertyChangeListener");
38063 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38064 function () {
38065 {
38066 if (this.changeSupport == null) {
38067 return  new Array (0);
38068 }return this.changeSupport.getPropertyChangeListeners ();
38069 }});
38070 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38071 function (propertyName, listener) {
38072 this.addPropChangeListComp (propertyName, listener);
38073 }, "~S,java.beans.PropertyChangeListener");
38074 Clazz_defineMethod (c$, "addPropChangeListComp", 
38075 function (propertyName, listener) {
38076 {
38077 if (arguments.length == 1) {
38078 addPropertyChangeListener1(propertyName); return; }
38079 }{
38080 if (listener == null) {
38081 return;
38082 }if (this.changeSupport == null) {
38083 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38084 }this.changeSupport.addPropertyChangeListener2 (propertyName, listener);
38085 }}, "~S,java.beans.PropertyChangeListener");
38086 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38087 function (propertyName, listener) {
38088 {
38089 if (listener == null || this.changeSupport == null) {
38090 return;
38091 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
38092 }}, "~S,java.beans.PropertyChangeListener");
38093 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38094 function (propertyName) {
38095 {
38096 if (this.changeSupport == null) {
38097 return  new Array (0);
38098 }return this.changeSupport.getPropertyChangeListeners (propertyName);
38099 }}, "~S");
38100 Clazz_defineMethod (c$, "firePropertyChange", 
38101 function (propertyName, oldValue, newValue) {
38102 this.firePropertyChangeObject (propertyName, oldValue, newValue);
38103 }, "~S,~O,~O");
38104 Clazz_defineMethod (c$, "firePropertyChangeObject", 
38105 function (propertyName, oldValue, newValue) {
38106 var changeSupport;
38107 {
38108 changeSupport = this.changeSupport;
38109 }if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
38110 return;
38111 }changeSupport.firePropertyChange (propertyName, oldValue, newValue);
38112 }, "~S,~O,~O");
38113 Clazz_defineMethod (c$, "firePropertyChange", 
38114 function (propertyName, oldValue, newValue) {
38115 this.firePropertyChangeBool (propertyName, oldValue, newValue);
38116 }, "~S,~B,~B");
38117 Clazz_defineMethod (c$, "firePropertyChangeBool", 
38118 function (propertyName, oldValue, newValue) {
38119 var changeSupport = this.changeSupport;
38120 if (changeSupport == null || oldValue == newValue) {
38121 return;
38122 }changeSupport.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
38123 }, "~S,~B,~B");
38124 Clazz_defineMethod (c$, "firePropertyChange", 
38125 function (propertyName, oldValue, newValue) {
38126 this.firePropertyChangeInt (propertyName, oldValue, newValue);
38127 }, "~S,~N,~N");
38128 Clazz_defineMethod (c$, "firePropertyChangeInt", 
38129 function (propertyName, oldValue, newValue) {
38130 var changeSupport = this.changeSupport;
38131 if (changeSupport == null || oldValue == newValue) {
38132 return;
38133 }changeSupport.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
38134 }, "~S,~N,~N");
38135 Clazz_defineMethod (c$, "firePropertyChange", 
38136 function (propertyName, oldValue, newValue) {
38137 this.firePropertyChangeChar (propertyName, oldValue, newValue);
38138 }, "~S,~S,~S");
38139 Clazz_defineMethod (c$, "firePropertyChangeChar", 
38140 function (propertyName, oldValue, newValue) {
38141 if (this.changeSupport == null || oldValue == newValue) {
38142 return;
38143 }this.firePropertyChangeObject (propertyName,  new Character (oldValue),  new Character (newValue));
38144 }, "~S,~S,~S");
38145 Clazz_defineMethod (c$, "firePropertyChangeShort", 
38146 function (propertyName, oldValue, newValue) {
38147 if (this.changeSupport == null || oldValue == newValue) {
38148 return;
38149 }this.firePropertyChangeObject (propertyName, Short.$valueOf (oldValue), Short.$valueOf (newValue));
38150 }, "~S,~N,~N");
38151 Clazz_defineMethod (c$, "firePropertyChangeLong", 
38152 function (propertyName, oldValue, newValue) {
38153 if (this.changeSupport == null || oldValue == newValue) {
38154 return;
38155 }this.firePropertyChangeObject (propertyName, Long.$valueOf (oldValue), Long.$valueOf (newValue));
38156 }, "~S,~N,~N");
38157 Clazz_defineMethod (c$, "firePropertyChangeFloat", 
38158 function (propertyName, oldValue, newValue) {
38159 if (this.changeSupport == null || oldValue == newValue) {
38160 return;
38161 }this.firePropertyChangeObject (propertyName, Float.$valueOf (oldValue), Float.$valueOf (newValue));
38162 }, "~S,~N,~N");
38163 Clazz_defineMethod (c$, "firePropertyChangeDouble", 
38164 function (propertyName, oldValue, newValue) {
38165 if (this.changeSupport == null || oldValue == newValue) {
38166 return;
38167 }this.firePropertyChangeObject (propertyName, Double.$valueOf (oldValue), Double.$valueOf (newValue));
38168 }, "~S,~N,~N");
38169 Clazz_defineMethod (c$, "setComponentOrientation", 
38170 function (o) {
38171 var oldValue = this.componentOrientation;
38172 this.componentOrientation = o;
38173 this.firePropertyChangeObject ("componentOrientation", oldValue, o);
38174 this.invalidateIfValid ();
38175 }, "java.awt.ComponentOrientation");
38176 Clazz_defineMethod (c$, "getComponentOrientation", 
38177 function () {
38178 return this.componentOrientation;
38179 });
38180 Clazz_defineMethod (c$, "applyComponentOrientation", 
38181 function (orientation) {
38182 this.applyCompOrientComp (orientation);
38183 }, "java.awt.ComponentOrientation");
38184 Clazz_defineMethod (c$, "applyCompOrientComp", 
38185 function (orientation) {
38186 if (orientation == null) {
38187 throw  new NullPointerException ();
38188 }this.setComponentOrientation (orientation);
38189 }, "java.awt.ComponentOrientation");
38190 Clazz_defineMethod (c$, "canBeFocusOwner", 
38191 function () {
38192 if (this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ()) {
38193 return true;
38194 }return false;
38195 });
38196 Clazz_defineMethod (c$, "canBeFocusOwnerRecursively", 
38197 function () {
38198 if (!this.canBeFocusOwner ()) {
38199 return false;
38200 }if (this.parent != null) {
38201 return this.parent.canContainFocusOwner (this);
38202 }return true;
38203 });
38204 Clazz_defineMethod (c$, "relocateComponent", 
38205 function () {
38206 });
38207 Clazz_defineMethod (c$, "getContainingWindow", 
38208 function () {
38209 return jssun.awt.SunToolkit.getContainingWindow (this);
38210 });
38211 c$.isInstanceOf = Clazz_defineMethod (c$, "isInstanceOf", 
38212 function (obj, className) {
38213 if (obj == null) return false;
38214 if (className == null) return false;
38215 var cls = obj.getClass ();
38216 while (cls != null) {
38217 if (cls.getName ().equals (className)) {
38218 return true;
38219 }cls = cls.getSuperclass ();
38220 }
38221 return false;
38222 }, "~O,~S");
38223 Clazz_defineMethod (c$, "areBoundsValid", 
38224 function () {
38225 var cont = this.getContainer ();
38226 return cont == null || cont.isValid () || cont.getLayout () == null;
38227 });
38228 Clazz_defineMethod (c$, "getLocationOnWindow", 
38229 function () {
38230 var curLocation = this.getLocation ();
38231 for (var parent = this.getContainer (); parent != null && !(Clazz_instanceOf (parent, java.awt.Window)); parent = parent.getContainer ()) {
38232 curLocation.x += parent.getX ();
38233 curLocation.y += parent.getY ();
38234 }
38235 return curLocation;
38236 });
38237 Clazz_defineMethod (c$, "getSiblingIndexAbove", 
38238 function () {
38239 var parent = this.getContainer ();
38240 if (parent == null) {
38241 return -1;
38242 }var nextAbove = parent.getComponentZOrder (this) - 1;
38243 return nextAbove < 0 ? -1 : nextAbove;
38244 });
38245 Clazz_defineMethod (c$, "getSiblingIndexBelow", 
38246 function () {
38247 var parent = this.getContainer ();
38248 if (parent == null) {
38249 return -1;
38250 }var nextBelow = parent.getComponentZOrder (this) + 1;
38251 return nextBelow >= parent.getComponentCount () ? -1 : nextBelow;
38252 });
38253 Clazz_defineMethod (c$, "mixOnShowing", 
38254 function () {
38255 });
38256 Clazz_defineMethod (c$, "mixOnHiding", 
38257 function (isLightweight) {
38258 }, "~B");
38259 Clazz_defineMethod (c$, "mixOnReshaping", 
38260 function () {
38261 swingjs.JSToolkit.taintUI (this);
38262 });
38263 Clazz_defineMethod (c$, "mixOnZOrderChanging", 
38264 function (oldZorder, newZorder) {
38265 }, "~N,~N");
38266 Clazz_defineMethod (c$, "mixOnValidating", 
38267 function () {
38268 });
38269 c$.doesClassImplement = Clazz_defineMethod (c$, "doesClassImplement", 
38270  function (cls, interfaceName) {
38271 if (cls == null) return false;
38272 for (var c, $c = 0, $$c = cls.getInterfaces (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
38273 if (c.getName ().equals (interfaceName)) {
38274 return true;
38275 }}
38276 return java.awt.Component.doesClassImplement (cls.getSuperclass (), interfaceName);
38277 }, "Class,~S");
38278 c$.doesImplement = Clazz_defineMethod (c$, "doesImplement", 
38279 function (obj, interfaceName) {
38280 if (obj == null) return false;
38281 if (interfaceName == null) return false;
38282 return java.awt.Component.doesClassImplement (obj.getClass (), interfaceName);
38283 }, "~O,~S");
38284 Clazz_pu$h(self.c$);
38285 c$ = Clazz_declareType (java.awt.Component, "BaselineResizeBehavior", Enum);
38286 Clazz_defineEnumConstant (c$, "CONSTANT_ASCENT", 0, []);
38287 Clazz_defineEnumConstant (c$, "CONSTANT_DESCENT", 1, []);
38288 Clazz_defineEnumConstant (c$, "CENTER_OFFSET", 2, []);
38289 Clazz_defineEnumConstant (c$, "OTHER", 3, []);
38290 c$ = Clazz_p0p ();
38291 Clazz_pu$h(self.c$);
38292 c$ = Clazz_declareType (java.awt.Component, "AWTTreeLock");
38293 c$ = Clazz_p0p ();
38294 Clazz_defineStatics (c$,
38295 "FOCUS_TRAVERSABLE_UNKNOWN", 0,
38296 "FOCUS_TRAVERSABLE_DEFAULT", 1,
38297 "FOCUS_TRAVERSABLE_SET", 2,
38298 "actionListenerK", "actionL",
38299 "adjustmentListenerK", "adjustmentL",
38300 "componentListenerK", "componentL",
38301 "containerListenerK", "containerL",
38302 "focusListenerK", "focusL",
38303 "itemListenerK", "itemL",
38304 "keyListenerK", "keyL",
38305 "mouseListenerK", "mouseL",
38306 "mouseMotionListenerK", "mouseMotionL",
38307 "mouseWheelListenerK", "mouseWheelL",
38308 "textListenerK", "textL",
38309 "ownedWindowK", "ownedL",
38310 "windowListenerK", "windowL",
38311 "inputMethodListenerK", "inputMethodL",
38312 "hierarchyListenerK", "hierarchyL",
38313 "hierarchyBoundsListenerK", "hierarchyBoundsL",
38314 "windowStateListenerK", "windowStateL",
38315 "windowFocusListenerK", "windowFocusL",
38316 "isInc", false,
38317 "incRate", 0,
38318 "TOP_ALIGNMENT", 0.0,
38319 "CENTER_ALIGNMENT", 0.5,
38320 "BOTTOM_ALIGNMENT", 1.0,
38321 "LEFT_ALIGNMENT", 0.0,
38322 "RIGHT_ALIGNMENT", 1.0,
38323 "incr", 0);
38324 c$.coalesceMap = c$.prototype.coalesceMap =  new java.util.HashMap ();
38325 });
38326 Clazz_declarePackage ("jssun.awt");
38327 Clazz_load (null, "jssun.awt.SunGraphicsCallback", ["java.awt.Container", "$.Graphics2D", "jssun.awt.ConstrainableGraphics", "$.Graphics2Delegate"], function () {
38328 c$ = Clazz_declareType (jssun.awt, "SunGraphicsCallback");
38329 Clazz_defineMethod (c$, "constrainGraphics", 
38330 function (g, bounds) {
38331 if (Clazz_instanceOf (g, jssun.awt.ConstrainableGraphics)) {
38332 (g).constrain (bounds.x, bounds.y, bounds.width, bounds.height);
38333 } else {
38334 g.translate (bounds.x, bounds.y);
38335 }g.clipRect (0, 0, bounds.width, bounds.height);
38336 }, "java.awt.Graphics,java.awt.Rectangle");
38337 Clazz_defineMethod (c$, "runOneComponent", 
38338 function (comp, bounds, g, clip, weightFlags) {
38339 if (comp == null || !comp.isLightweight () || !comp.isVisible ()) {
38340 return;
38341 }var lightweight = comp.isLightweight ();
38342 if ((lightweight && (weightFlags & 2) == 0) || (!lightweight && (weightFlags & 1) == 0)) {
38343 return;
38344 }if (bounds == null) {
38345 bounds = comp.getBounds ();
38346 }if (clip == null || clip.intersects (bounds)) {
38347 var cg = g.createSwingJS ();
38348 try {
38349 this.constrainGraphics (cg, bounds);
38350 cg.setFont (comp.getFont ());
38351 cg.setColor (comp.getForeground ());
38352 if (Clazz_instanceOf (cg, java.awt.Graphics2D)) {
38353 (cg).setBackground (comp.getBackground ());
38354 } else if (Clazz_instanceOf (cg, jssun.awt.Graphics2Delegate)) {
38355 (cg).setBackground (comp.getBackground ());
38356 }this.run (comp, cg);
38357 } finally {
38358 cg.dispose ();
38359 }
38360 }}, "java.awt.Component,java.awt.Rectangle,java.awt.Graphics,java.awt.Shape,~N");
38361 Clazz_defineMethod (c$, "runComponents", 
38362 function (comps, g, weightFlags) {
38363 var ncomponents = comps.length;
38364 var clip = g.getClip ();
38365 for (var i = ncomponents - 1; i >= 0; i--) {
38366 this.runOneComponent (comps[i], null, g, clip, weightFlags);
38367 }
38368 }, "~A,java.awt.Graphics,~N");
38369 Clazz_pu$h(self.c$);
38370 c$ = Clazz_declareType (jssun.awt.SunGraphicsCallback, "PaintHeavyweightComponentsCallback", jssun.awt.SunGraphicsCallback);
38371 Clazz_makeConstructor (c$, 
38372  function () {
38373 Clazz_superConstructor (this, jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback, []);
38374 });
38375 Clazz_overrideMethod (c$, "run", 
38376 function (a, b) {
38377 if (!a.isLightweight ()) {
38378 a.paintAll (b);
38379 } else if (Clazz_instanceOf (a, java.awt.Container)) {
38380 this.runComponents ((a).getComponents (), b, 3);
38381 }}, "java.awt.Component,java.awt.Graphics");
38382 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
38383 function () {
38384 return jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback.instance;
38385 });
38386 c$.instance = c$.prototype.instance =  new jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback ();
38387 c$ = Clazz_p0p ();
38388 Clazz_defineStatics (c$,
38389 "HEAVYWEIGHTS", 0x1,
38390 "LIGHTWEIGHTS", 0x2,
38391 "TWO_PASSES", 0x4);
38392 });
38393 Clazz_declarePackage ("javax.swing");
38394 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 () {
38395 c$ = Clazz_decorateAsClass (function () {
38396 this.volatileMap = null;
38397 this.hwDirtyComponents = null;
38398 this.dirtyComponents = null;
38399 this.tmpDirtyComponents = null;
38400 this.invalidComponents = null;
38401 this.runnableList = null;
38402 this.paintDepth = 0;
38403 this.painting = false;
38404 this.repaintRoot = null;
38405 this.paintThread = null;
38406 this.processingRunnable = null;
38407 this.myComponent = null;
38408 this.tmp = null;
38409 if (!Clazz_isClassDefined ("javax.swing.RepaintManager.ProcessingRunnable")) {
38410 javax.swing.RepaintManager.$RepaintManager$ProcessingRunnable$ ();
38411 }
38412 Clazz_instantialize (this, arguments);
38413 }, javax.swing, "RepaintManager");
38414 Clazz_prepareFields (c$, function () {
38415 this.volatileMap =  new java.util.HashMap (1);
38416 this.tmp =  new java.awt.Rectangle ();
38417 });
38418 c$.currentManager = Clazz_defineMethod (c$, "currentManager", 
38419 function (c) {
38420 var appContext = jssun.awt.AppContext.getAppContext ();
38421 var rm = appContext.get (javax.swing.RepaintManager.repaintManagerKey);
38422 if (rm == null) {
38423 rm =  new javax.swing.RepaintManager ();
38424 rm.set (c);
38425 appContext.put (javax.swing.RepaintManager.repaintManagerKey, rm);
38426 }return rm;
38427 }, "java.awt.Component");
38428 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
38429 function (aRepaintManager) {
38430 if (aRepaintManager != null) {
38431 javax.swing.SwingUtilities.appContextPut (javax.swing.RepaintManager.repaintManagerKey, aRepaintManager);
38432 } else {
38433 javax.swing.SwingUtilities.appContextRemove (javax.swing.RepaintManager.repaintManagerKey);
38434 }}, "javax.swing.RepaintManager");
38435 Clazz_makeConstructor (c$, 
38436  function () {
38437 this.processingRunnable = Clazz_innerTypeInstance (javax.swing.RepaintManager.ProcessingRunnable, this, null);
38438 });
38439 Clazz_defineMethod (c$, "set", 
38440  function (c) {
38441 this.myComponent = c;
38442 this.dirtyComponents =  new java.util.IdentityHashMap ();
38443 this.tmpDirtyComponents =  new java.util.IdentityHashMap ();
38444 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38445 }, "java.awt.Component");
38446 Clazz_defineMethod (c$, "addInvalidComponent", 
38447 function (invalidComponent) {
38448 var validateRoot = null;
38449 for (var c = invalidComponent; c != null; c = c.getParent ()) {
38450 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane))) {
38451 return;
38452 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
38453 validateRoot = c;
38454 break;
38455 }}
38456 if (validateRoot == null) {
38457 return;
38458 }var root = null;
38459 for (var c = validateRoot; c != null; c = c.getParent ()) {
38460 if (!c.isVisible ()) {
38461 return;
38462 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
38463 root = c;
38464 break;
38465 }}
38466 if (root == null) {
38467 return;
38468 }if (this.invalidComponents == null) {
38469 this.invalidComponents =  new java.util.ArrayList ();
38470 } else {
38471 var n = this.invalidComponents.size ();
38472 for (var i = 0; i < n; i++) {
38473 if (validateRoot === this.invalidComponents.get (i)) {
38474 return;
38475 }}
38476 }this.invalidComponents.add (validateRoot);
38477 this.scheduleProcessingRunnable (root);
38478 }, "javax.swing.JComponent");
38479 Clazz_defineMethod (c$, "removeInvalidComponent", 
38480 function (component) {
38481 if (this.invalidComponents != null) {
38482 var index = this.invalidComponents.indexOf (component);
38483 if (index != -1) {
38484 this.invalidComponents.remove (index);
38485 }}}, "javax.swing.JComponent");
38486 Clazz_defineMethod (c$, "addDirtyRegion0", 
38487  function (c, x, y, w, h) {
38488 if ((w <= 0) || (h <= 0) || (c == null)) {
38489 return;
38490 }if ((c.getWidth () <= 0) || (c.getHeight () <= 0)) {
38491 return;
38492 }if (this.extendDirtyRegion (c, x, y, w, h)) {
38493 return;
38494 }var root = null;
38495 for (var p = c; p != null; p = p.getParent ()) {
38496 if (!p.isVisible () || p.getPeer () == null) {
38497 return;
38498 }if ((Clazz_instanceOf (p, java.awt.Window)) || (Clazz_instanceOf (p, java.applet.Applet))) {
38499 if (Clazz_instanceOf (p, java.awt.Frame) && ((p).getExtendedState () & 1) == 1) {
38500 return;
38501 }root = p;
38502 break;
38503 }}
38504 if (root == null) return;
38505 {
38506 if (this.extendDirtyRegion (c, x, y, w, h)) {
38507 return;
38508 }this.dirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38509 }this.scheduleProcessingRunnable (c);
38510 }, "java.awt.Container,~N,~N,~N,~N");
38511 Clazz_defineMethod (c$, "addDirtyRegion", 
38512 function (c, x, y, w, h) {
38513 this.addDirtyRegion0 (c, x, y, w, h);
38514 }, "javax.swing.JComponent,~N,~N,~N,~N");
38515 Clazz_defineMethod (c$, "addDirtyRegion", 
38516 function (window, x, y, w, h) {
38517 this.addDirtyRegion0 (window, x, y, w, h);
38518 }, "java.awt.Window,~N,~N,~N,~N");
38519 Clazz_defineMethod (c$, "addDirtyRegion", 
38520 function (applet, x, y, w, h) {
38521 this.addDirtyRegion0 (applet, x, y, w, h);
38522 }, "java.applet.Applet,~N,~N,~N,~N");
38523 Clazz_defineMethod (c$, "scheduleHeavyWeightPaints", 
38524 function () {
38525 var hws;
38526 {
38527 if (this.hwDirtyComponents.size () == 0) {
38528 return;
38529 }hws = this.hwDirtyComponents;
38530 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38531 }for (var hw, $hw = hws.keySet ().iterator (); $hw.hasNext () && ((hw = $hw.next ()) || true);) {
38532 var dirty = hws.get (hw);
38533 if (Clazz_instanceOf (hw, java.awt.Window)) {
38534 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38535 } else if (Clazz_instanceOf (hw, java.applet.Applet)) {
38536 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38537 } else {
38538 this.addDirtyRegion0 (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38539 }}
38540 });
38541 Clazz_defineMethod (c$, "nativeAddDirtyRegion", 
38542 function (appContext, c, x, y, w, h) {
38543 if (w > 0 && h > 0) {
38544 {
38545 var dirty = this.hwDirtyComponents.get (c);
38546 if (dirty == null) {
38547 this.hwDirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38548 } else {
38549 this.hwDirtyComponents.put (c, javax.swing.SwingUtilities.computeUnion (x, y, w, h, dirty));
38550 }}this.scheduleProcessingRunnable (appContext);
38551 }}, "jssun.awt.AppContext,java.awt.Container,~N,~N,~N,~N");
38552 Clazz_defineMethod (c$, "extendDirtyRegion", 
38553  function (c, x, y, w, h) {
38554 var r = this.dirtyComponents.get (c);
38555 if (r != null) {
38556 javax.swing.SwingUtilities.computeUnion (x, y, w, h, r);
38557 return true;
38558 }return false;
38559 }, "java.awt.Component,~N,~N,~N,~N");
38560 Clazz_defineMethod (c$, "getDirtyRegion", 
38561 function (aComponent) {
38562 var r = null;
38563 {
38564 r = this.dirtyComponents.get (aComponent);
38565 }if (r == null) return  new java.awt.Rectangle (0, 0, 0, 0);
38566  else return  new java.awt.Rectangle (r);
38567 }, "javax.swing.JComponent");
38568 Clazz_defineMethod (c$, "markCompletelyDirty", 
38569 function (aComponent) {
38570 this.addDirtyRegion (aComponent, 0, 0, 2147483647, 2147483647);
38571 }, "javax.swing.JComponent");
38572 Clazz_defineMethod (c$, "markCompletelyClean", 
38573 function (aComponent) {
38574 {
38575 this.dirtyComponents.remove (aComponent);
38576 }}, "javax.swing.JComponent");
38577 Clazz_defineMethod (c$, "isCompletelyDirty", 
38578 function (aComponent) {
38579 var r;
38580 r = this.getDirtyRegion (aComponent);
38581 if (r.width == 2147483647 && r.height == 2147483647) return true;
38582  else return false;
38583 }, "javax.swing.JComponent");
38584 Clazz_defineMethod (c$, "validateInvalidComponents", 
38585 function () {
38586 var ic;
38587 {
38588 if (this.invalidComponents == null) {
38589 return;
38590 }ic = this.invalidComponents;
38591 this.invalidComponents = null;
38592 }var n = ic.size ();
38593 for (var i = 0; i < n; i++) {
38594 var c = ic.get (i);
38595 c.validate ();
38596 }
38597 });
38598 Clazz_defineMethod (c$, "prePaintDirtyRegions", 
38599  function () {
38600 var dirtyComponents;
38601 var runnableList;
38602 {
38603 dirtyComponents = this.dirtyComponents;
38604 runnableList = this.runnableList;
38605 this.runnableList = null;
38606 }if (runnableList != null) {
38607 for (var runnable, $runnable = runnableList.iterator (); $runnable.hasNext () && ((runnable = $runnable.next ()) || true);) {
38608 runnable.run ();
38609 }
38610 }this.paintDirtyRegions ();
38611 if (dirtyComponents.size () > 0) {
38612 this.paintDirtyRegions1 (dirtyComponents);
38613 }});
38614 Clazz_defineMethod (c$, "updateWindows", 
38615  function (dirtyComponents) {
38616 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
38617 if (!(Clazz_instanceOf (toolkit, jssun.awt.SunToolkit) && (toolkit).needUpdateWindow ())) {
38618 return dirtyComponents;
38619 }var windows =  new java.util.HashSet ();
38620 var dirtyComps = dirtyComponents.keySet ();
38621 for (var it = dirtyComps.iterator (); it.hasNext (); ) {
38622 var dirty = it.next ();
38623 var window = Clazz_instanceOf (dirty, java.awt.Window) ? dirty : javax.swing.SwingUtilities.getWindowAncestor (dirty);
38624 if (window != null && !jssun.awt.AWTAccessor.getWindowAccessor ().isOpaque (window)) {
38625 it.remove ();
38626 windows.add (window);
38627 }}
38628 for (var window, $window = windows.iterator (); $window.hasNext () && ((window = $window.next ()) || true);) {
38629 jssun.awt.AWTAccessor.getWindowAccessor ().updateWindow (window, null);
38630 }
38631 return dirtyComponents;
38632 }, "java.util.Map");
38633 Clazz_defineMethod (c$, "paintDirtyRegions", 
38634 function () {
38635 {
38636 var tmp = this.tmpDirtyComponents;
38637 this.tmpDirtyComponents = this.dirtyComponents;
38638 this.dirtyComponents = tmp;
38639 this.dirtyComponents.clear ();
38640 }this.paintDirtyRegions1 (this.tmpDirtyComponents);
38641 });
38642 Clazz_defineMethod (c$, "paintDirtyRegions1", 
38643  function (tmpDirtyComponents) {
38644 if (tmpDirtyComponents.isEmpty ()) {
38645 return;
38646 }this.updateWindows (tmpDirtyComponents);
38647 var roots =  new java.util.ArrayList (tmpDirtyComponents.size ());
38648 for (var dirty, $dirty = tmpDirtyComponents.keySet ().iterator (); $dirty.hasNext () && ((dirty = $dirty.next ()) || true);) {
38649 this.collectDirtyComponents (tmpDirtyComponents, dirty, roots);
38650 }
38651 var count = roots.size ();
38652 this.painting = true;
38653 try {
38654 for (var j = 0; j < count; j++) {
38655 var i = j;
38656 var dirtyComponent = roots.get (j);
38657 var rect = tmpDirtyComponents.get (dirtyComponent);
38658 var localBoundsH = dirtyComponent.getHeight ();
38659 var localBoundsW = dirtyComponent.getWidth ();
38660 javax.swing.SwingUtilities.computeIntersection (0, 0, localBoundsW, localBoundsH, rect);
38661 if (Clazz_instanceOf (dirtyComponent, javax.swing.JComponent)) {
38662 (dirtyComponent).paintImmediately (rect.x, rect.y, rect.width, rect.height);
38663 } else if (dirtyComponent.isShowing ()) {
38664 var g = javax.swing.JComponent.safelyGetGraphics (dirtyComponent, dirtyComponent);
38665 if (g != null) {
38666 try {
38667 dirtyComponent.paint (g);
38668 } finally {
38669 g.dispose ();
38670 }
38671 }}if (this.repaintRoot != null) {
38672 this.adjustRoots (this.repaintRoot, roots, i + 1);
38673 count = roots.size ();
38674 this.repaintRoot.paintImmediately (0, 0, this.repaintRoot.getWidth (), this.repaintRoot.getHeight ());
38675 this.repaintRoot = null;
38676 }}
38677 } finally {
38678 this.painting = false;
38679 }
38680 tmpDirtyComponents.clear ();
38681 }, "java.util.Map");
38682 Clazz_defineMethod (c$, "adjustRoots", 
38683  function (root, roots, index) {
38684 for (var i = roots.size () - 1; i >= index; i--) {
38685 var c = roots.get (i);
38686 for (; ; ) {
38687 if (c === root || c == null || !(Clazz_instanceOf (c, javax.swing.JComponent))) {
38688 break;
38689 }c = c.getParent ();
38690 }
38691 if (c === root) {
38692 roots.remove (i);
38693 }}
38694 }, "javax.swing.JComponent,java.util.List,~N");
38695 Clazz_defineMethod (c$, "collectDirtyComponents", 
38696 function (dirtyComponents, dirtyComponent, roots) {
38697 var dx;
38698 var dy;
38699 var rootDx;
38700 var rootDy;
38701 var component;
38702 var rootDirtyComponent;
38703 var parent;
38704 component = rootDirtyComponent = dirtyComponent;
38705 var x = dirtyComponent.getX ();
38706 var y = dirtyComponent.getY ();
38707 var w = dirtyComponent.getWidth ();
38708 var h = dirtyComponent.getHeight ();
38709 dx = rootDx = 0;
38710 dy = rootDy = 0;
38711 this.tmp.setBounds (dirtyComponents.get (dirtyComponent));
38712 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38713 if (this.tmp.isEmpty ()) {
38714 return;
38715 }for (; ; ) {
38716 if (!(Clazz_instanceOf (component, javax.swing.JComponent))) break;
38717 parent = component.getParent ();
38718 if (parent == null) break;
38719 component = parent;
38720 dx += x;
38721 dy += y;
38722 this.tmp.setLocation (this.tmp.x + x, this.tmp.y + y);
38723 x = component.getX ();
38724 y = component.getY ();
38725 w = component.getWidth ();
38726 h = component.getHeight ();
38727 this.tmp = javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38728 if (this.tmp.isEmpty ()) {
38729 return;
38730 }if (dirtyComponents.get (component) != null) {
38731 rootDirtyComponent = component;
38732 rootDx = dx;
38733 rootDy = dy;
38734 }}
38735 if (dirtyComponent !== rootDirtyComponent) {
38736 var r;
38737 this.tmp.setLocation (this.tmp.x + rootDx - dx, this.tmp.y + rootDy - dy);
38738 r = dirtyComponents.get (rootDirtyComponent);
38739 javax.swing.SwingUtilities.computeUnion (this.tmp.x, this.tmp.y, this.tmp.width, this.tmp.height, r);
38740 }if (!roots.contains (rootDirtyComponent)) roots.add (rootDirtyComponent);
38741 }, "java.util.Map,java.awt.Component,java.util.List");
38742 Clazz_overrideMethod (c$, "toString", 
38743 function () {
38744 var sb =  new StringBuffer ();
38745 if (this.dirtyComponents != null) sb.append ("" + this.dirtyComponents);
38746 return sb.toString ();
38747 });
38748 Clazz_defineMethod (c$, "getOffscreenBuffer", 
38749 function (c, proposedWidth, proposedHeight) {
38750 return null;
38751 }, "java.awt.Component,~N,~N");
38752 Clazz_defineMethod (c$, "getVolatileOffscreenBuffer", 
38753 function (c, proposedWidth, proposedHeight) {
38754 var config = c.getGraphicsConfiguration ();
38755 var maxSize = this.getDoubleBufferMaximumSize ();
38756 var width = proposedWidth < 1 ? 1 : (proposedWidth > maxSize.width ? maxSize.width : proposedWidth);
38757 var height = proposedHeight < 1 ? 1 : (proposedHeight > maxSize.height ? maxSize.height : proposedHeight);
38758 var image = this.volatileMap.get (config);
38759 if (image == null || image.getWidth () < width || image.getHeight () < height) {
38760 if (image != null) {
38761 image.flush ();
38762 }image = config.createCompatibleVolatileImage (width, height);
38763 this.volatileMap.put (config, image);
38764 }return image;
38765 }, "java.awt.Component,~N,~N");
38766 Clazz_defineMethod (c$, "setDoubleBufferMaximumSize", 
38767 function (d) {
38768 }, "java.awt.Dimension");
38769 Clazz_defineMethod (c$, "getDoubleBufferMaximumSize", 
38770 function () {
38771 return null;
38772 });
38773 Clazz_defineMethod (c$, "setDoubleBufferingEnabled", 
38774 function (aFlag) {
38775 }, "~B");
38776 Clazz_defineMethod (c$, "resetDoubleBuffer", 
38777 function () {
38778 });
38779 Clazz_defineMethod (c$, "resetVolatileDoubleBuffer", 
38780 function (gc) {
38781 var image = this.volatileMap.remove (gc);
38782 if (image != null) {
38783 image.flush ();
38784 }}, "java.awt.GraphicsConfiguration");
38785 Clazz_defineMethod (c$, "useVolatileDoubleBuffer", 
38786 function () {
38787 return javax.swing.RepaintManager.volatileImageBufferEnabled;
38788 });
38789 Clazz_defineMethod (c$, "isPaintingThread", 
38790  function () {
38791 return (Thread.currentThread () === this.paintThread);
38792 });
38793 Clazz_defineMethod (c$, "paint", 
38794 function (paintingComponent, bufferComponent, g, x, y, w, h) {
38795 paintingComponent.paintToOffscreen (g, x, y, w, h, x + w, y + h);
38796 }, "javax.swing.JComponent,javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N");
38797 Clazz_defineMethod (c$, "beginPaint", 
38798 function () {
38799 var multiThreadedPaint = false;
38800 var paintDepth = 0;
38801 var currentThread = Thread.currentThread ();
38802 {
38803 paintDepth = this.paintDepth;
38804 if (this.paintThread == null || currentThread === this.paintThread) {
38805 this.paintThread = currentThread;
38806 this.paintDepth++;
38807 } else {
38808 multiThreadedPaint = true;
38809 }}});
38810 Clazz_defineMethod (c$, "endPaint", 
38811 function () {
38812 if (this.isPaintingThread ()) {
38813 }});
38814 Clazz_defineMethod (c$, "doubleBufferingChanged", 
38815 function (rootPane) {
38816 }, "javax.swing.JRootPane");
38817 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38818  function (c) {
38819 this.scheduleProcessingRunnable (c.getAppContext ());
38820 }, "java.awt.Component");
38821 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38822  function (context) {
38823 if (this.processingRunnable.markPending ()) {
38824 jssun.awt.SunToolkit.getSystemEventQueueImplPP (context).postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), this.processingRunnable));
38825 }}, "jssun.awt.AppContext");
38826 c$.$RepaintManager$ProcessingRunnable$ = function () {
38827 Clazz_pu$h(self.c$);
38828 c$ = Clazz_decorateAsClass (function () {
38829 Clazz_prepareCallback (this, arguments);
38830 this.pending = false;
38831 Clazz_instantialize (this, arguments);
38832 }, javax.swing.RepaintManager, "ProcessingRunnable", null, Runnable);
38833 Clazz_defineMethod (c$, "markPending", 
38834 function () {
38835 if (!this.pending) {
38836 this.pending = true;
38837 return true;
38838 }return false;
38839 });
38840 Clazz_overrideMethod (c$, "run", 
38841 function () {
38842 {
38843 this.pending = false;
38844 }this.b$["javax.swing.RepaintManager"].scheduleHeavyWeightPaints ();
38845 this.b$["javax.swing.RepaintManager"].validateInvalidComponents ();
38846 this.b$["javax.swing.RepaintManager"].prePaintDirtyRegions ();
38847 swingjs.JSToolkit.forceRepaint (this.b$["javax.swing.RepaintManager"].myComponent);
38848 });
38849 c$ = Clazz_p0p ();
38850 };
38851 Clazz_defineStatics (c$,
38852 "HANDLE_TOP_LEVEL_PAINT", false);
38853 c$.repaintManagerKey = c$.prototype.repaintManagerKey = javax.swing.RepaintManager;
38854 Clazz_defineStatics (c$,
38855 "volatileImageBufferEnabled", true);
38856 {
38857 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38858 var headless = false;
38859 if (javax.swing.RepaintManager.volatileImageBufferEnabled && headless) {
38860 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38861 }javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT = true;
38862 }});
38863 Clazz_declarePackage ("jssun.awt");
38864 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 () {
38865 c$ = Clazz_decorateAsClass (function () {
38866 this.windowClosingListener = null;
38867 Clazz_instantialize (this, arguments);
38868 }, jssun.awt, "SunToolkit", java.awt.Toolkit, [jssun.awt.WindowClosingSupport, jssun.awt.WindowClosingListener, jssun.awt.ComponentFactory]);
38869 Clazz_makeConstructor (c$, 
38870 function () {
38871 Clazz_superConstructor (this, jssun.awt.SunToolkit, []);
38872 var eventQueue;
38873 eventQueue =  new java.awt.EventQueue ();
38874 var appContext = jssun.awt.AppContext.getAppContext ();
38875 if (appContext != null) {
38876 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
38877 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
38878 appContext.put ("PostEventQueue", postEventQueue);
38879 }});
38880 Clazz_defineMethod (c$, "useBufferPerWindow", 
38881 function () {
38882 return false;
38883 });
38884 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
38885 function () {
38886 var threadGroup = Thread.currentThread ().getThreadGroup ();
38887 return jssun.awt.SunToolkit.createNewAppContext (threadGroup);
38888 });
38889 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
38890 function (threadGroup) {
38891 var eventQueue;
38892 var eqName = System.getProperty ("AWT.EventQueueClass", "java.awt.EventQueue");
38893 try {
38894 eventQueue = Clazz._4Name (eqName).newInstance ();
38895 } catch (e) {
38896 if (Clazz_exceptionOf (e, Exception)) {
38897 System.err.println ("Failed loading " + eqName + ": " + e);
38898 eventQueue =  new java.awt.EventQueue ();
38899 } else {
38900 throw e;
38901 }
38902 }
38903 var appContext =  new jssun.awt.AppContext (threadGroup);
38904 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
38905 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
38906 appContext.put ("PostEventQueue", postEventQueue);
38907 return appContext;
38908 }, "ThreadGroup");
38909 c$.wakeupEventQueue = Clazz_defineMethod (c$, "wakeupEventQueue", 
38910 function (q, isShutdown) {
38911 q.wakeup (isShutdown);
38912 }, "java.awt.EventQueue,~B");
38913 c$.targetToPeer = Clazz_defineMethod (c$, "targetToPeer", 
38914 function (target) {
38915 if (target != null) {
38916 return jssun.awt.AWTAutoShutdown.getInstance ().getPeer (target);
38917 }return null;
38918 }, "~O");
38919 c$.targetCreatedPeer = Clazz_defineMethod (c$, "targetCreatedPeer", 
38920 function (target, peer) {
38921 if (target != null && peer != null) {
38922 jssun.awt.AWTAutoShutdown.getInstance ().registerPeer (target, peer);
38923 }}, "~O,~O");
38924 c$.targetDisposedPeer = Clazz_defineMethod (c$, "targetDisposedPeer", 
38925 function (target, peer) {
38926 if (target != null && peer != null) {
38927 jssun.awt.AWTAutoShutdown.getInstance ().unregisterPeer (target, peer);
38928 }}, "~O,~O");
38929 c$.setAppContext = Clazz_defineMethod (c$, "setAppContext", 
38930  function (target, context) {
38931 if (Clazz_instanceOf (target, java.awt.Component)) {
38932 jssun.awt.AWTAccessor.getComponentAccessor ().setAppContext (target, context);
38933 } else {
38934 return false;
38935 }return true;
38936 }, "~O,jssun.awt.AppContext");
38937 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
38938  function (target) {
38939 if (Clazz_instanceOf (target, java.awt.Component)) {
38940 {
38941 return target.appContext;
38942 }} else {
38943 return null;
38944 }}, "~O");
38945 c$.targetToAppContext = Clazz_defineMethod (c$, "targetToAppContext", 
38946 function (target) {
38947 if (target == null) {
38948 return null;
38949 }var context = jssun.awt.SunToolkit.getAppContext (target);
38950 if (context == null) {
38951 context = jssun.awt.SunToolkit.appContextMap.get (target);
38952 }return context;
38953 }, "~O");
38954 c$.setLWRequestStatus = Clazz_defineMethod (c$, "setLWRequestStatus", 
38955 function (changed, status) {
38956 jssun.awt.AWTAccessor.getWindowAccessor ().setLWRequestStatus (changed, status);
38957 }, "java.awt.Window,~B");
38958 c$.checkAndSetPolicy = Clazz_defineMethod (c$, "checkAndSetPolicy", 
38959 function (cont, isSwingCont) {
38960 }, "java.awt.Container,~B");
38961 c$.insertTargetMapping = Clazz_defineMethod (c$, "insertTargetMapping", 
38962 function (target, appContext) {
38963 if (!jssun.awt.SunToolkit.setAppContext (target, appContext)) {
38964 jssun.awt.SunToolkit.appContextMap.put (target, appContext);
38965 }}, "~O,jssun.awt.AppContext");
38966 c$.postEvent = Clazz_defineMethod (c$, "postEvent", 
38967 function (appContext, event) {
38968 if (event == null) {
38969 throw  new NullPointerException ();
38970 }var postEventQueue = appContext.get ("PostEventQueue");
38971 if (postEventQueue != null) {
38972 postEventQueue.postEvent (event);
38973 }}, "jssun.awt.AppContext,java.awt.AWTEvent");
38974 c$.postPriorityEvent = Clazz_defineMethod (c$, "postPriorityEvent", 
38975 function (e) {
38976 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);
38977 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (e.getSource ()), pe);
38978 }, "java.awt.AWTEvent");
38979 c$.flushPendingEvents = Clazz_defineMethod (c$, "flushPendingEvents", 
38980 function () {
38981 var appContext = jssun.awt.AppContext.getAppContext ();
38982 var postEventQueue = appContext.get ("PostEventQueue");
38983 if (postEventQueue != null) {
38984 postEventQueue.flush ();
38985 }});
38986 c$.isPostEventQueueEmpty = Clazz_defineMethod (c$, "isPostEventQueueEmpty", 
38987 function () {
38988 var appContext = jssun.awt.AppContext.getAppContext ();
38989 var postEventQueue = appContext.get ("PostEventQueue");
38990 return (postEventQueue == null || postEventQueue.noEvents ());
38991 });
38992 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
38993 function (target, runnable) {
38994 jssun.awt.SunToolkit.executeOnEventHandlerThread ( new jssun.awt.PeerEvent (target, runnable, 1));
38995 }, "~O,Runnable");
38996 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
38997 function (target, runnable, when) {
38998 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)));
38999 }, "~O,Runnable,~N");
39000 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39001 function (peerEvent) {
39002 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (peerEvent.getSource ()), peerEvent);
39003 }, "jssun.awt.PeerEvent");
39004 c$.invokeLaterOnAppContext = Clazz_defineMethod (c$, "invokeLaterOnAppContext", 
39005 function (appContext, dispatcher) {
39006 jssun.awt.SunToolkit.postEvent (appContext,  new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), dispatcher, 1));
39007 }, "jssun.awt.AppContext,Runnable");
39008 c$.isDispatchThreadForAppContext = Clazz_defineMethod (c$, "isDispatchThreadForAppContext", 
39009 function (target) {
39010 var appContext = jssun.awt.SunToolkit.targetToAppContext (target);
39011 var eq = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39012 var next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39013 while (next != null) {
39014 eq = next;
39015 next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39016 }
39017 return (Thread.currentThread () === jssun.awt.AWTAccessor.getEventQueueAccessor ().getDispatchThread (eq));
39018 }, "~O");
39019 Clazz_overrideMethod (c$, "getScreenSize", 
39020 function () {
39021 return  new java.awt.Dimension (this.getScreenWidth (), this.getScreenHeight ());
39022 });
39023 Clazz_overrideMethod (c$, "getFontMetrics", 
39024 function (font) {
39025 return jssun.font.FontDesignMetrics.getMetrics (font);
39026 }, "java.awt.Font");
39027 Clazz_overrideMethod (c$, "getFontList", 
39028 function () {
39029 var hardwiredFontList =  Clazz_newArray (-1, ["Dialog", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
39030 return hardwiredFontList;
39031 });
39032 Clazz_overrideMethod (c$, "createPanel", 
39033 function (target) {
39034 return this.createComponent (target);
39035 }, "java.awt.Panel");
39036 Clazz_defineMethod (c$, "disableBackgroundErase", 
39037 function (component) {
39038 this.disableBackgroundEraseImpl (component);
39039 }, "java.awt.Component");
39040 Clazz_defineMethod (c$, "disableBackgroundEraseImpl", 
39041  function (component) {
39042 jssun.awt.AWTAccessor.getComponentAccessor ().setBackgroundEraseDisabled (component, true);
39043 }, "java.awt.Component");
39044 c$.getSunAwtNoerasebackground = Clazz_defineMethod (c$, "getSunAwtNoerasebackground", 
39045 function () {
39046 return false;
39047 });
39048 c$.getSunAwtErasebackgroundonresize = Clazz_defineMethod (c$, "getSunAwtErasebackgroundonresize", 
39049 function () {
39050 return true;
39051 });
39052 Clazz_defineMethod (c$, "setOverrideRedirect", 
39053 function (target) {
39054 }, "java.awt.Window");
39055 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39056 function (tk, url) {
39057 var img = jssun.awt.SunToolkit.imgCache.get (url);
39058 if (img == null) {
39059 try {
39060 img = tk.createImage (url);
39061 jssun.awt.SunToolkit.imgCache.put (url, img);
39062 } catch (e) {
39063 if (Clazz_exceptionOf (e, Exception)) {
39064 } else {
39065 throw e;
39066 }
39067 }
39068 }return img;
39069 }, "java.awt.Toolkit,java.net.URL");
39070 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39071 function (tk, filename) {
39072 var img = jssun.awt.SunToolkit.imgCache.get (filename);
39073 if (img == null) {
39074 try {
39075 tk.createImage (filename);
39076 jssun.awt.SunToolkit.imgCache.put (filename, img);
39077 } catch (e) {
39078 if (Clazz_exceptionOf (e, Exception)) {
39079 } else {
39080 throw e;
39081 }
39082 }
39083 }return img;
39084 }, "java.awt.Toolkit,~S");
39085 Clazz_defineMethod (c$, "getImage", 
39086 function (filename) {
39087 return jssun.awt.SunToolkit.getImageFromHash (this, filename);
39088 }, "~S");
39089 Clazz_defineMethod (c$, "getImage", 
39090 function (url) {
39091 return jssun.awt.SunToolkit.getImageFromHash (this, url);
39092 }, "java.net.URL");
39093 Clazz_overrideMethod (c$, "checkImage", 
39094 function (img, w, h, o) {
39095 return 0;
39096 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39097 Clazz_overrideMethod (c$, "prepareImage", 
39098 function (img, w, h, o) {
39099 if (w == 0 || h == 0) {
39100 return true;
39101 }return true;
39102 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39103 Clazz_overrideMethod (c$, "getSystemEventQueueImpl", 
39104 function () {
39105 return jssun.awt.SunToolkit.getSystemEventQueueImplPP ();
39106 });
39107 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39108 function () {
39109 return jssun.awt.SunToolkit.getSystemEventQueueImplPP (jssun.awt.AppContext.getAppContext ());
39110 });
39111 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39112 function (appContext) {
39113 var theEventQueue = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39114 return theEventQueue;
39115 }, "jssun.awt.AppContext");
39116 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
39117 function (c) {
39118 return java.awt.Toolkit.getNativeContainer (c);
39119 }, "java.awt.Component");
39120 Clazz_defineMethod (c$, "enableInputMethodsForTextComponent", 
39121 function () {
39122 return false;
39123 });
39124 c$.getStartupLocale = Clazz_defineMethod (c$, "getStartupLocale", 
39125 function () {
39126 if (jssun.awt.SunToolkit.startupLocale == null) {
39127 {
39128 }}return jssun.awt.SunToolkit.startupLocale;
39129 });
39130 Clazz_defineMethod (c$, "getDefaultKeyboardLocale", 
39131 function () {
39132 return jssun.awt.SunToolkit.getStartupLocale ();
39133 });
39134 c$.setDataTransfererClassName = Clazz_defineMethod (c$, "setDataTransfererClassName", 
39135 function (className) {
39136 jssun.awt.SunToolkit.dataTransfererClassName = className;
39137 }, "~S");
39138 c$.getDataTransfererClassName = Clazz_defineMethod (c$, "getDataTransfererClassName", 
39139 function () {
39140 if (jssun.awt.SunToolkit.dataTransfererClassName == null) {
39141 java.awt.Toolkit.getDefaultToolkit ();
39142 }return jssun.awt.SunToolkit.dataTransfererClassName;
39143 });
39144 Clazz_overrideMethod (c$, "getWindowClosingListener", 
39145 function () {
39146 return this.windowClosingListener;
39147 });
39148 Clazz_overrideMethod (c$, "setWindowClosingListener", 
39149 function (wcl) {
39150 this.windowClosingListener = wcl;
39151 }, "jssun.awt.WindowClosingListener");
39152 Clazz_defineMethod (c$, "windowClosingNotify", 
39153 function (event) {
39154 if (this.windowClosingListener != null) {
39155 return this.windowClosingListener.windowClosingNotify (event);
39156 } else {
39157 return null;
39158 }}, "java.awt.event.WindowEvent");
39159 Clazz_defineMethod (c$, "windowClosingDelivered", 
39160 function (event) {
39161 if (this.windowClosingListener != null) {
39162 return this.windowClosingListener.windowClosingDelivered (event);
39163 } else {
39164 return null;
39165 }}, "java.awt.event.WindowEvent");
39166 c$.isModalExcluded = Clazz_defineMethod (c$, "isModalExcluded", 
39167 function (window) {
39168 return true;
39169 }, "java.awt.Window");
39170 c$.isLightweightOrUnknown = Clazz_defineMethod (c$, "isLightweightOrUnknown", 
39171 function (comp) {
39172 if (comp.isLightweight () || !(Clazz_instanceOf (java.awt.Toolkit.getDefaultToolkit (), jssun.awt.SunToolkit))) {
39173 return true;
39174 }return !(Clazz_instanceOf (comp, java.awt.Panel) || Clazz_instanceOf (comp, java.awt.Window));
39175 }, "java.awt.Component");
39176 Clazz_defineMethod (c$, "getDesktopAAHints", 
39177 function () {
39178 return null;
39179 });
39180 c$.getContainingWindow = Clazz_defineMethod (c$, "getContainingWindow", 
39181 function (comp) {
39182 while (comp != null && !(Clazz_instanceOf (comp, java.awt.Window))) {
39183 comp = comp.getParent ();
39184 }
39185 return comp;
39186 }, "java.awt.Component");
39187 Clazz_defineMethod (c$, "isNativeGTKAvailable", 
39188 function () {
39189 return false;
39190 });
39191 Clazz_defineMethod (c$, "isWindowOpacitySupported", 
39192 function () {
39193 return false;
39194 });
39195 Clazz_defineMethod (c$, "isWindowShapingSupported", 
39196 function () {
39197 return false;
39198 });
39199 Clazz_defineMethod (c$, "isWindowTranslucencySupported", 
39200 function () {
39201 return false;
39202 });
39203 Clazz_defineMethod (c$, "isTranslucencyCapable", 
39204 function (gc) {
39205 return false;
39206 }, "java.awt.GraphicsConfiguration");
39207 Clazz_defineMethod (c$, "needUpdateWindow", 
39208 function () {
39209 return false;
39210 });
39211 c$.$SunToolkit$1$ = function () {
39212 Clazz_pu$h(self.c$);
39213 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$1", null, Runnable);
39214 Clazz_overrideMethod (c$, "run", 
39215 function () {
39216 jssun.awt.AWTAccessor.getAWTEventAccessor ().setPosted (this.f$.e);
39217 (this.f$.e.getSource ()).dispatchEvent (this.f$.e);
39218 });
39219 c$ = Clazz_p0p ();
39220 };
39221 c$.$SunToolkit$2$ = function () {
39222 Clazz_pu$h(self.c$);
39223 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$2", jssun.awt.PeerEvent);
39224 Clazz_overrideMethod (c$, "getWhen", 
39225 function () {
39226 return this.f$.when;
39227 });
39228 c$ = Clazz_p0p ();
39229 };
39230 Clazz_defineStatics (c$,
39231 "GRAB_EVENT_MASK", 0x80000000,
39232 "POST_EVENT_QUEUE_KEY", "PostEventQueue");
39233 c$.appContextMap = c$.prototype.appContextMap =  new java.util.HashMap ();
39234 c$.imgCache = c$.prototype.imgCache =  new java.util.HashMap ();
39235 Clazz_defineStatics (c$,
39236 "startupLocale", null,
39237 "dataTransfererClassName", null,
39238 "DESKTOPFONTHINTS", "awt.font.desktophints");
39239 });
39240 Clazz_declarePackage ("java.awt");
39241 Clazz_declareInterface (java.awt, "Conditional");
39242 Clazz_declarePackage ("java.awt.event");
39243 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.PaintEvent", null, function () {
39244 c$ = Clazz_decorateAsClass (function () {
39245 this.updateRect = null;
39246 Clazz_instantialize (this, arguments);
39247 }, java.awt.event, "PaintEvent", java.awt.event.ComponentEvent);
39248 Clazz_makeConstructor (c$, 
39249 function (source, id, updateRect) {
39250 Clazz_superConstructor (this, java.awt.event.PaintEvent, [source, id]);
39251 this.updateRect = updateRect;
39252 }, "java.awt.Component,~N,java.awt.Rectangle");
39253 Clazz_defineMethod (c$, "getUpdateRect", 
39254 function () {
39255 return this.updateRect;
39256 });
39257 Clazz_defineMethod (c$, "setUpdateRect", 
39258 function (updateRect) {
39259 this.updateRect = updateRect;
39260 }, "java.awt.Rectangle");
39261 Clazz_overrideMethod (c$, "paramString", 
39262 function () {
39263 var typeStr;
39264 switch (this.id) {
39265 case 800:
39266 typeStr = "PAINT";
39267 break;
39268 case 801:
39269 typeStr = "UPDATE";
39270 break;
39271 default:
39272 typeStr = "unknown type";
39273 }
39274 return typeStr + ",updateRect=" + (this.updateRect != null ? this.updateRect.toString () : "null");
39275 });
39276 Clazz_defineStatics (c$,
39277 "PAINT_FIRST", 800,
39278 "PAINT_LAST", 801,
39279 "PAINT", 800,
39280 "UPDATE", 801);
39281 });
39282 Clazz_declarePackage ("java.awt");
39283 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 () {
39284 c$ = Clazz_decorateAsClass (function () {
39285 this.theQueue = null;
39286 this.eventFilters = null;
39287 this.modalFiltersCount = 0;
39288 this.filter = null;
39289 this.cond = null;
39290 this.id = 0;
39291 if (!Clazz_isClassDefined ("java.awt.EventDispatchThread.StopDispatchEvent")) {
39292 java.awt.EventDispatchThread.$EventDispatchThread$StopDispatchEvent$ ();
39293 }
39294 Clazz_instantialize (this, arguments);
39295 }, java.awt, "EventDispatchThread", swingjs.JSThread);
39296 Clazz_prepareFields (c$, function () {
39297 this.eventFilters =  new java.util.Vector ();
39298 });
39299 Clazz_makeConstructor (c$, 
39300 function (group, name, queue) {
39301 Clazz_superConstructor (this, java.awt.EventDispatchThread, [group, name]);
39302 this.theQueue = queue;
39303 }, "ThreadGroup,~S,java.awt.EventQueue");
39304 Clazz_defineMethod (c$, "stopDispatchingImpl", 
39305 function (wait) {
39306 var stopEvent = Clazz_innerTypeInstance (java.awt.EventDispatchThread.StopDispatchEvent, this, null);
39307 if (Thread.currentThread () !== this) {
39308 this.theQueue.postEventPrivate (stopEvent);
39309 if (wait) {
39310 try {
39311 this.join ();
39312 } catch (e) {
39313 if (Clazz_exceptionOf (e, InterruptedException)) {
39314 } else {
39315 throw e;
39316 }
39317 }
39318 }} else {
39319 stopEvent.dispatch ();
39320 }{
39321 if (this.theQueue.getDispatchThread () === this) {
39322 this.theQueue.detachDispatchThread ();
39323 }}}, "~B");
39324 Clazz_defineMethod (c$, "stopDispatching", 
39325 function () {
39326 this.stopDispatchingImpl (true);
39327 });
39328 Clazz_defineMethod (c$, "stopDispatchingLater", 
39329 function () {
39330 this.stopDispatchingImpl (false);
39331 });
39332 Clazz_overrideMethod (c$, "run", 
39333 function () {
39334 this.pumpEvents (-1, null);
39335 });
39336 Clazz_defineMethod (c$, "pumpEvents", 
39337 function (id, cond) {
39338 this.pumpEventsForHierarchy (id, cond, null);
39339 }, "~N,java.awt.Conditional");
39340 Clazz_defineMethod (c$, "pumpEventsForHierarchy", 
39341 function (id, cond, modalComponent) {
39342 this.pumpEventsForFilter (id, cond,  new java.awt.EventDispatchThread.HierarchyEventFilter (modalComponent));
39343 }, "~N,java.awt.Conditional,java.awt.Component");
39344 Clazz_defineMethod (c$, "pumpEventsForFilter", 
39345 function (id, cond, filter) {
39346 this.filter = filter;
39347 this.cond = cond;
39348 this.id = id;
39349 this.run1 (0);
39350 }, "~N,java.awt.Conditional,java.awt.EventFilter");
39351 Clazz_overrideMethod (c$, "run1", 
39352 function (mode) {
39353 try {
39354 while (true) switch (mode) {
39355 case 0:
39356 this.addEventFilter (this.filter);
39357 mode = 1;
39358 case 1:
39359 if (!this.doDispatch || this.cond != null && !this.cond.evaluate () || this.isInterrupted ()) {
39360 this.doDispatch = false;
39361 return;
39362 }var myid = this.id;
39363 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)));
39364 this.dispatchAndReturn (r, mode);
39365 if (this.isJS) return;
39366 break;
39367 case 2:
39368 this.doDispatch = false;
39369 return;
39370 }
39371
39372 } finally {
39373 if (!this.doDispatch) this.finish ();
39374 }
39375 }, "~N");
39376 Clazz_overrideMethod (c$, "dispatchAndReturn", 
39377 function (r, mode) {
39378 var f = null;
39379 var me = this;
39380 {
39381 f = function() {r.run();me.run1(mode)
39382 };
39383 }swingjs.JSToolkit.setTimeout (f, 0, 0);
39384 }, "Runnable,~N");
39385 Clazz_defineMethod (c$, "finish", 
39386  function () {
39387 this.doDispatch = false;
39388 this.removeEventFilter (this.filter);
39389 {
39390 if (this.theQueue.getDispatchThread () === this) {
39391 this.theQueue.detachDispatchThread ();
39392 }if (this.theQueue.peekEvent () != null || !jssun.awt.SunToolkit.isPostEventQueueEmpty ()) {
39393 this.theQueue.initDispatchThread ();
39394 }jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this);
39395 }});
39396 Clazz_defineMethod (c$, "addEventFilter", 
39397 function (filter) {
39398 {
39399 if (!this.eventFilters.contains (filter)) {
39400 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39401 var newFilter = filter;
39402 var k = 0;
39403 for (k = 0; k < this.eventFilters.size (); k++) {
39404 var f = this.eventFilters.get (k);
39405 if (Clazz_instanceOf (f, java.awt.ModalEventFilter)) {
39406 var cf = f;
39407 if (cf.compareTo (newFilter) > 0) {
39408 break;
39409 }}}
39410 this.eventFilters.add (k, filter);
39411 this.modalFiltersCount++;
39412 } else {
39413 this.eventFilters.add (filter);
39414 }}}}, "java.awt.EventFilter");
39415 Clazz_defineMethod (c$, "removeEventFilter", 
39416 function (filter) {
39417 {
39418 if (this.eventFilters.contains (filter)) {
39419 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39420 this.modalFiltersCount--;
39421 }this.eventFilters.remove (filter);
39422 }}}, "java.awt.EventFilter");
39423 Clazz_defineMethod (c$, "pumpOneEventForFilters", 
39424 function (id) {
39425 try {
39426 var event;
39427 var eventOK;
39428 do {
39429 event = (id == -1) ? this.theQueue.getNextEvent () : this.theQueue.getNextEventForID (id);
39430 if (event == null) return (this.doDispatch = false);
39431 eventOK = true;
39432 {
39433 for (var i = this.eventFilters.size () - 1; i >= 0; i--) {
39434 var f = this.eventFilters.get (i);
39435 var accept = f.acceptEvent (event);
39436 if (accept === java.awt.EventFilter.FilterAction.REJECT) {
39437 eventOK = false;
39438 break;
39439 } else if (accept === java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY) {
39440 break;
39441 }}
39442 }if (!eventOK) {
39443 event.consume ();
39444 }} while (eventOK == false);
39445 this.theQueue.dispatchEvent (event);
39446 return this.doDispatch = true;
39447 } catch (e$$) {
39448 if (Clazz_exceptionOf (e$$, ThreadDeath)) {
39449 var death = e$$;
39450 {
39451 return this.doDispatch = false;
39452 }
39453 } else if (Clazz_exceptionOf (e$$, InterruptedException)) {
39454 var interruptedException = e$$;
39455 {
39456 return this.doDispatch = false;
39457 }
39458 } else {
39459 var e = e$$;
39460 {
39461 this.processException (e, this.modalFiltersCount > 0);
39462 }
39463 }
39464 }
39465 return this.doDispatch = true;
39466 }, "~N");
39467 Clazz_defineMethod (c$, "processException", 
39468  function (e, isModal) {
39469 if (!this.handleException (e)) {
39470 if (isModal) {
39471 System.err.println ("Exception occurred during event dispatching:");
39472 e.printStackTrace ();
39473 } else if (Clazz_instanceOf (e, RuntimeException)) {
39474 throw e;
39475 } else if (Clazz_instanceOf (e, Error)) {
39476 throw e;
39477 }}}, "Throwable,~B");
39478 Clazz_defineMethod (c$, "handleException", 
39479  function (thrown) {
39480 return false;
39481 }, "Throwable");
39482 Clazz_defineMethod (c$, "isDispatching", 
39483 function (eq) {
39484 return this.theQueue.equals (eq);
39485 }, "java.awt.EventQueue");
39486 Clazz_defineMethod (c$, "getEventQueue", 
39487 function () {
39488 return this.theQueue;
39489 });
39490 c$.$EventDispatchThread$StopDispatchEvent$ = function () {
39491 Clazz_pu$h(self.c$);
39492 c$ = Clazz_decorateAsClass (function () {
39493 Clazz_prepareCallback (this, arguments);
39494 Clazz_instantialize (this, arguments);
39495 }, java.awt.EventDispatchThread, "StopDispatchEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39496 Clazz_makeConstructor (c$, 
39497 function () {
39498 Clazz_superConstructor (this, java.awt.EventDispatchThread.StopDispatchEvent, [this.b$["java.awt.EventDispatchThread"], 0]);
39499 });
39500 Clazz_overrideMethod (c$, "dispatch", 
39501 function () {
39502 this.b$["java.awt.EventDispatchThread"].doDispatch = false;
39503 });
39504 c$ = Clazz_p0p ();
39505 };
39506 c$.$EventDispatchThread$1$ = function () {
39507 Clazz_pu$h(self.c$);
39508 c$ = Clazz_declareAnonymous (java.awt, "EventDispatchThread$1", null, Runnable);
39509 Clazz_overrideMethod (c$, "run", 
39510 function () {
39511 this.b$["java.awt.EventDispatchThread"].pumpOneEventForFilters (this.f$.myid);
39512 });
39513 c$ = Clazz_p0p ();
39514 };
39515 Clazz_pu$h(self.c$);
39516 c$ = Clazz_decorateAsClass (function () {
39517 this.modalComponent = null;
39518 Clazz_instantialize (this, arguments);
39519 }, java.awt.EventDispatchThread, "HierarchyEventFilter", null, java.awt.EventFilter);
39520 Clazz_makeConstructor (c$, 
39521 function (a) {
39522 this.modalComponent = a;
39523 }, "java.awt.Component");
39524 Clazz_overrideMethod (c$, "acceptEvent", 
39525 function (a) {
39526 if (this.modalComponent != null) {
39527 var b = a.getID ();
39528 var c = (b >= 500) && (b <= 507);
39529 var d = (b >= 1001) && (b <= 1001);
39530 var e = (b == 201);
39531 if (java.awt.Component.isInstanceOf (this.modalComponent, "javax.swing.JInternalFrame")) {
39532 return e ? java.awt.EventFilter.FilterAction.REJECT : java.awt.EventFilter.FilterAction.ACCEPT;
39533 }if (c || d || e) {
39534 var f = a.getSource ();
39535 if (Clazz_instanceOf (f, jssun.awt.ModalExclude)) {
39536 return java.awt.EventFilter.FilterAction.ACCEPT;
39537 } else if (Clazz_instanceOf (f, java.awt.Component)) {
39538 var g = f;
39539 var h = false;
39540 if (Clazz_instanceOf (this.modalComponent, java.awt.Container)) {
39541 while (g !== this.modalComponent && g != null) {
39542 if ((Clazz_instanceOf (g, java.awt.Window)) && (jssun.awt.SunToolkit.isModalExcluded (g))) {
39543 h = true;
39544 break;
39545 }g = g.getParent ();
39546 }
39547 }if (!h && (g !== this.modalComponent)) {
39548 return java.awt.EventFilter.FilterAction.REJECT;
39549 }}}}return java.awt.EventFilter.FilterAction.ACCEPT;
39550 }, "java.awt.AWTEvent");
39551 c$ = Clazz_p0p ();
39552 Clazz_defineStatics (c$,
39553 "ANY_EVENT", -1);
39554 });
39555 Clazz_declarePackage ("java.awt");
39556 Clazz_load (["java.lang.Enum"], "java.awt.EventFilter", null, function () {
39557 Clazz_declareInterface (java.awt, "EventFilter");
39558 Clazz_pu$h(self.c$);
39559 c$ = Clazz_declareType (java.awt.EventFilter, "FilterAction", Enum);
39560 Clazz_defineEnumConstant (c$, "ACCEPT", 0, []);
39561 Clazz_defineEnumConstant (c$, "REJECT", 1, []);
39562 Clazz_defineEnumConstant (c$, "ACCEPT_IMMEDIATELY", 2, []);
39563 c$ = Clazz_p0p ();
39564 });
39565 Clazz_declarePackage ("java.awt");
39566 Clazz_load (["java.awt.EventFilter"], "java.awt.ModalEventFilter", ["java.awt.Component", "$.Dialog", "$.Window", "jssun.awt.ModalExclude"], function () {
39567 c$ = Clazz_decorateAsClass (function () {
39568 this.modalDialog = null;
39569 this.disabled = false;
39570 Clazz_instantialize (this, arguments);
39571 }, java.awt, "ModalEventFilter", null, java.awt.EventFilter);
39572 Clazz_makeConstructor (c$, 
39573 function (modalDialog) {
39574 this.modalDialog = modalDialog;
39575 this.disabled = false;
39576 }, "java.awt.Dialog");
39577 Clazz_defineMethod (c$, "getModalDialog", 
39578 function () {
39579 return this.modalDialog;
39580 });
39581 Clazz_overrideMethod (c$, "acceptEvent", 
39582 function (event) {
39583 if (this.disabled || !this.modalDialog.isVisible ()) {
39584 return java.awt.EventFilter.FilterAction.ACCEPT;
39585 }var eventID = event.getID ();
39586 if ((eventID >= 500 && eventID <= 507) || (eventID >= 1001 && eventID <= 1001) || eventID == 201) {
39587 var o = event.getSource ();
39588 if (Clazz_instanceOf (o, jssun.awt.ModalExclude)) {
39589 } else if (Clazz_instanceOf (o, java.awt.Component)) {
39590 var c = o;
39591 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
39592 c = c.getParent_NoClientCode ();
39593 }
39594 if (c != null) {
39595 return this.acceptWindow (c);
39596 }}}return java.awt.EventFilter.FilterAction.ACCEPT;
39597 }, "java.awt.AWTEvent");
39598 Clazz_defineMethod (c$, "disable", 
39599 function () {
39600 this.disabled = true;
39601 });
39602 Clazz_defineMethod (c$, "compareTo", 
39603 function (another) {
39604 var anotherDialog = another.getModalDialog ();
39605 var c = this.modalDialog;
39606 while (c != null) {
39607 if (c === anotherDialog) {
39608 return 1;
39609 }c = c.getParent_NoClientCode ();
39610 }
39611 c = anotherDialog;
39612 while (c != null) {
39613 if (c === this.modalDialog) {
39614 return -1;
39615 }c = c.getParent_NoClientCode ();
39616 }
39617 var blocker = this.modalDialog.getModalBlocker ();
39618 while (blocker != null) {
39619 if (blocker === anotherDialog) {
39620 return -1;
39621 }blocker = blocker.getModalBlocker ();
39622 }
39623 blocker = anotherDialog.getModalBlocker ();
39624 while (blocker != null) {
39625 if (blocker === this.modalDialog) {
39626 return 1;
39627 }blocker = blocker.getModalBlocker ();
39628 }
39629 return this.modalDialog.getModalityType ().compareTo (anotherDialog.getModalityType ());
39630 }, "java.awt.ModalEventFilter");
39631 c$.createFilterForDialog = Clazz_defineMethod (c$, "createFilterForDialog", 
39632 function (modalDialog) {
39633 switch (modalDialog.getModalityType ()) {
39634 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
39635 return  new java.awt.ModalEventFilter.DocumentModalEventFilter (modalDialog);
39636 case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
39637 return  new java.awt.ModalEventFilter.ApplicationModalEventFilter (modalDialog);
39638 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
39639 return  new java.awt.ModalEventFilter.ToolkitModalEventFilter (modalDialog);
39640 }
39641 return null;
39642 }, "java.awt.Dialog");
39643 Clazz_pu$h(self.c$);
39644 c$ = Clazz_decorateAsClass (function () {
39645 this.appContext = null;
39646 Clazz_instantialize (this, arguments);
39647 }, java.awt.ModalEventFilter, "ToolkitModalEventFilter", java.awt.ModalEventFilter);
39648 Clazz_makeConstructor (c$, 
39649 function (a) {
39650 Clazz_superConstructor (this, java.awt.ModalEventFilter.ToolkitModalEventFilter, [a]);
39651 this.appContext = a.appContext;
39652 }, "java.awt.Dialog");
39653 Clazz_overrideMethod (c$, "acceptWindow", 
39654 function (a) {
39655 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE)) {
39656 return java.awt.EventFilter.FilterAction.ACCEPT;
39657 }if (a.appContext !== this.appContext) {
39658 return java.awt.EventFilter.FilterAction.REJECT;
39659 }while (a != null) {
39660 if (a === this.modalDialog) {
39661 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39662 }a = a.getOwner ();
39663 }
39664 return java.awt.EventFilter.FilterAction.REJECT;
39665 }, "java.awt.Window");
39666 c$ = Clazz_p0p ();
39667 Clazz_pu$h(self.c$);
39668 c$ = Clazz_decorateAsClass (function () {
39669 this.appContext = null;
39670 Clazz_instantialize (this, arguments);
39671 }, java.awt.ModalEventFilter, "ApplicationModalEventFilter", java.awt.ModalEventFilter);
39672 Clazz_makeConstructor (c$, 
39673 function (a) {
39674 Clazz_superConstructor (this, java.awt.ModalEventFilter.ApplicationModalEventFilter, [a]);
39675 this.appContext = a.appContext;
39676 }, "java.awt.Dialog");
39677 Clazz_overrideMethod (c$, "acceptWindow", 
39678 function (a) {
39679 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39680 return java.awt.EventFilter.FilterAction.ACCEPT;
39681 }if (a.appContext === this.appContext) {
39682 while (a != null) {
39683 if (a === this.modalDialog) {
39684 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39685 }a = a.getOwner ();
39686 }
39687 return java.awt.EventFilter.FilterAction.REJECT;
39688 }return java.awt.EventFilter.FilterAction.ACCEPT;
39689 }, "java.awt.Window");
39690 c$ = Clazz_p0p ();
39691 Clazz_pu$h(self.c$);
39692 c$ = Clazz_decorateAsClass (function () {
39693 this.documentRoot = null;
39694 Clazz_instantialize (this, arguments);
39695 }, java.awt.ModalEventFilter, "DocumentModalEventFilter", java.awt.ModalEventFilter);
39696 Clazz_makeConstructor (c$, 
39697 function (a) {
39698 Clazz_superConstructor (this, java.awt.ModalEventFilter.DocumentModalEventFilter, [a]);
39699 this.documentRoot = a.getDocumentRoot ();
39700 }, "java.awt.Dialog");
39701 Clazz_overrideMethod (c$, "acceptWindow", 
39702 function (a) {
39703 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39704 var b = this.modalDialog.getOwner ();
39705 while (b != null) {
39706 if (b === a) {
39707 return java.awt.EventFilter.FilterAction.REJECT;
39708 }b = b.getOwner ();
39709 }
39710 return java.awt.EventFilter.FilterAction.ACCEPT;
39711 }while (a != null) {
39712 if (a === this.modalDialog) {
39713 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39714 }if (a === this.documentRoot) {
39715 return java.awt.EventFilter.FilterAction.REJECT;
39716 }a = a.getOwner ();
39717 }
39718 return java.awt.EventFilter.FilterAction.ACCEPT;
39719 }, "java.awt.Window");
39720 c$ = Clazz_p0p ();
39721 });
39722 Clazz_declarePackage ("java.awt.peer");
39723 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.CanvasPeer", null, function () {
39724 Clazz_declareInterface (java.awt.peer, "CanvasPeer", java.awt.peer.ComponentPeer);
39725 });
39726 Clazz_declarePackage ("java.awt.peer");
39727 c$ = Clazz_declareInterface (java.awt.peer, "ComponentPeer");
39728 Clazz_defineStatics (c$,
39729 "SET_LOCATION", 1,
39730 "SET_SIZE", 2,
39731 "SET_BOUNDS", 3,
39732 "SET_CLIENT_SIZE", 4,
39733 "RESET_OPERATION", 5,
39734 "NO_EMBEDDED_CHECK", (16384),
39735 "DEFAULT_OPERATION", 3);
39736 Clazz_declarePackage ("java.awt.peer");
39737 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.ContainerPeer", null, function () {
39738 Clazz_declareInterface (java.awt.peer, "ContainerPeer", java.awt.peer.ComponentPeer);
39739 });
39740 Clazz_declarePackage ("java.awt.peer");
39741 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.LightweightPeer", null, function () {
39742 Clazz_declareInterface (java.awt.peer, "LightweightPeer", java.awt.peer.ComponentPeer);
39743 });
39744 Clazz_declarePackage ("java.awt.peer");
39745 Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.PanelPeer", null, function () {
39746 Clazz_declareInterface (java.awt.peer, "PanelPeer", java.awt.peer.ContainerPeer);
39747 });
39748 Clazz_declarePackage ("java.awt");
39749 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.SentEvent", ["java.awt.Toolkit", "jssun.awt.SunToolkit"], function () {
39750 c$ = Clazz_decorateAsClass (function () {
39751 this.$dispatched = false;
39752 this.nested = null;
39753 this.toNotify = null;
39754 Clazz_instantialize (this, arguments);
39755 }, java.awt, "SentEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39756 Clazz_makeConstructor (c$, 
39757 function () {
39758 this.construct (null);
39759 });
39760 Clazz_makeConstructor (c$, 
39761 function (nested) {
39762 this.construct (nested, null);
39763 }, "java.awt.AWTEvent");
39764 Clazz_makeConstructor (c$, 
39765 function (nested, toNotify) {
39766 Clazz_superConstructor (this, java.awt.SentEvent, [(nested != null) ? nested.getSource () : java.awt.Toolkit.getDefaultToolkit (), 1007]);
39767 this.nested = nested;
39768 this.toNotify = toNotify;
39769 }, "java.awt.AWTEvent,jssun.awt.AppContext");
39770 Clazz_overrideMethod (c$, "dispatch", 
39771 function () {
39772 try {
39773 if (this.nested != null) {
39774 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39775 }} finally {
39776 this.$dispatched = true;
39777 if (this.toNotify != null) {
39778 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39779 }{
39780 this.notifyAll ();
39781 }}
39782 });
39783 Clazz_defineMethod (c$, "dispose", 
39784 function () {
39785 this.$dispatched = true;
39786 if (this.toNotify != null) {
39787 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39788 }{
39789 this.notifyAll ();
39790 }});
39791 Clazz_defineStatics (c$,
39792 "ID", 1007);
39793 });
39794 Clazz_declarePackage ("java.awt");
39795 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 () {
39796 c$ = Clazz_decorateAsClass (function () {
39797 this.nested = null;
39798 this.appContext = null;
39799 this.disposed = false;
39800 Clazz_instantialize (this, arguments);
39801 }, java.awt, "SequencedEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39802 Clazz_makeConstructor (c$, 
39803 function (nested) {
39804 Clazz_superConstructor (this, java.awt.SequencedEvent, [nested.getSource (), 1006]);
39805 this.nested = nested;
39806 {
39807 java.awt.SequencedEvent.list.add (this);
39808 }}, "java.awt.AWTEvent");
39809 Clazz_overrideMethod (c$, "dispatch", 
39810 function () {
39811 try {
39812 this.appContext = jssun.awt.AppContext.getAppContext ();
39813 if (java.awt.SequencedEvent.getFirst () !== this) {
39814 if (java.awt.EventQueue.isDispatchThread ()) {
39815 var edt = Thread.currentThread ();
39816 edt.pumpEvents (1007, ((Clazz_isClassDefined ("java.awt.SequencedEvent$1") ? 0 : java.awt.SequencedEvent.$SequencedEvent$1$ ()), Clazz_innerTypeInstance (java.awt.SequencedEvent$1, this, null)));
39817 } else {
39818 while (!this.isFirstOrDisposed ()) {
39819 {
39820 try {
39821 swingjs.JSToolkit.warn ("Cannot wait in SequenceEvent");
39822 java.awt.SequencedEvent.wait (1000);
39823 } catch (e) {
39824 if (Clazz_exceptionOf (e, InterruptedException)) {
39825 break;
39826 } else {
39827 throw e;
39828 }
39829 }
39830 }}
39831 }}if (!this.disposed) {
39832 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39833 }} finally {
39834 this.dispose ();
39835 }
39836 });
39837 c$.isOwnerAppContextDisposed = Clazz_defineMethod (c$, "isOwnerAppContextDisposed", 
39838  function (se) {
39839 if (se != null) {
39840 var target = se.nested.getSource ();
39841 if (Clazz_instanceOf (target, java.awt.Component)) {
39842 return (target).appContext.isDisposed ();
39843 }}return false;
39844 }, "java.awt.SequencedEvent");
39845 Clazz_defineMethod (c$, "isFirstOrDisposed", 
39846 function () {
39847 if (this.disposed) {
39848 return true;
39849 }return this === java.awt.SequencedEvent.getFirstWithContext () || this.disposed;
39850 });
39851 c$.getFirst = Clazz_defineMethod (c$, "getFirst", 
39852  function () {
39853 return java.awt.SequencedEvent.list.getFirst ();
39854 });
39855 c$.getFirstWithContext = Clazz_defineMethod (c$, "getFirstWithContext", 
39856  function () {
39857 var first = java.awt.SequencedEvent.getFirst ();
39858 while (java.awt.SequencedEvent.isOwnerAppContextDisposed (first)) {
39859 first.dispose ();
39860 first = java.awt.SequencedEvent.getFirst ();
39861 }
39862 return first;
39863 });
39864 Clazz_defineMethod (c$, "dispose", 
39865 function () {
39866 {
39867 if (this.disposed) {
39868 return;
39869 }this.disposed = true;
39870 }if (this.appContext != null) {
39871 jssun.awt.SunToolkit.postEvent (this.appContext,  new java.awt.SentEvent ());
39872 }var next = null;
39873 {
39874 java.awt.SequencedEvent.notifyAll ();
39875 if (java.awt.SequencedEvent.list.getFirst () === this) {
39876 java.awt.SequencedEvent.list.removeFirst ();
39877 if (!java.awt.SequencedEvent.list.isEmpty ()) {
39878 next = java.awt.SequencedEvent.list.getFirst ();
39879 }} else {
39880 java.awt.SequencedEvent.list.remove (this);
39881 }}if (next != null && next.appContext != null) {
39882 jssun.awt.SunToolkit.postEvent (next.appContext,  new java.awt.SentEvent ());
39883 }});
39884 c$.$SequencedEvent$1$ = function () {
39885 Clazz_pu$h(self.c$);
39886 c$ = Clazz_declareAnonymous (java.awt, "SequencedEvent$1", null, java.awt.Conditional);
39887 Clazz_overrideMethod (c$, "evaluate", 
39888 function () {
39889 return !this.b$["java.awt.SequencedEvent"].isFirstOrDisposed ();
39890 });
39891 c$ = Clazz_p0p ();
39892 };
39893 Clazz_defineStatics (c$,
39894 "ID", 1006);
39895 c$.list = c$.prototype.list =  new java.util.LinkedList ();
39896 });
39897 Clazz_load(["java.util.AbstractList"],"java.util.AbstractSequentialList",["java.lang.IndexOutOfBoundsException"],function(){
39898 c$=Clazz_declareType(java.util,"AbstractSequentialList",java.util.AbstractList);
39899 Clazz_defineMethod(c$,"add",
39900 function(location,object){
39901 this.listIterator(location).add(object);
39902 },"~N,~O");
39903 Clazz_defineMethod(c$,"addAll",
39904 function(location,collection){
39905 var it=this.listIterator(location);
39906 var colIt=collection.iterator();
39907 var next=it.nextIndex();
39908 while(colIt.hasNext()){
39909 it.add(colIt.next());
39910 it.previous();
39911 }
39912 return next!=it.nextIndex();
39913 },"~N,java.util.Collection");
39914 Clazz_overrideMethod(c$,"get",
39915 function(location){
39916 try{
39917 return this.listIterator(location).next();
39918 }catch(e){
39919 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
39920 throw new IndexOutOfBoundsException();
39921 }else{
39922 throw e;
39923 }
39924 }
39925 },"~N");
39926 Clazz_overrideMethod(c$,"iterator",
39927 function(){
39928 return this.listIterator(0);
39929 });
39930 Clazz_defineMethod(c$,"remove",
39931 function(location){
39932 try{
39933 var it=this.listIterator(location);
39934 var result=it.next();
39935 it.remove();
39936 return result;
39937 }catch(e){
39938 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
39939 throw new IndexOutOfBoundsException();
39940 }else{
39941 throw e;
39942 }
39943 }
39944 },"~N");
39945 Clazz_overrideMethod(c$,"set",
39946 function(location,object){
39947 var it=this.listIterator(location);
39948 var result=it.next();
39949 it.set(object);
39950 return result;
39951 },"~N,~O");
39952 });
39953 Clazz_load(["java.util.AbstractSequentialList","$.List","$.ListIterator","$.Queue"],"java.util.LinkedList",["java.lang.IllegalStateException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.ConcurrentModificationException","$.NoSuchElementException"],function(){
39954 c$=Clazz_decorateAsClass(function(){
39955 this.$size=0;
39956 this.voidLink=null;
39957 Clazz_instantialize(this,arguments);
39958 },java.util,"LinkedList",java.util.AbstractSequentialList,[java.util.List,java.util.Queue,Cloneable,java.io.Serializable]);
39959 Clazz_makeConstructor(c$,
39960 function(){
39961 Clazz_superConstructor(this,java.util.LinkedList,[]);
39962 this.voidLink=new java.util.LinkedList.Link(null,null,null);
39963 this.voidLink.previous=this.voidLink;
39964 this.voidLink.next=this.voidLink;
39965 });
39966 Clazz_makeConstructor(c$,
39967 function(collection){
39968 this.construct();
39969 this.addAll(collection);
39970 },"java.util.Collection");
39971 Clazz_defineMethod(c$,"add",
39972 function(location,object){
39973 if(0<=location&&location<=this.$size){
39974 var link=this.voidLink;
39975 if(location<(Math.floor(this.$size/2))){
39976 for(var i=0;i<=location;i++){
39977 link=link.next;
39978 }
39979 }else{
39980 for(var i=this.$size;i>location;i--){
39981 link=link.previous;
39982 }
39983 }var previous=link.previous;
39984 var newLink=new java.util.LinkedList.Link(object,previous,link);
39985 previous.next=newLink;
39986 link.previous=newLink;
39987 this.$size++;
39988 this.modCount++;
39989 }else{
39990 throw new IndexOutOfBoundsException();
39991 }},"~N,~O");
39992 Clazz_defineMethod(c$,"add",
39993 function(object){
39994 var oldLast=this.voidLink.previous;
39995 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
39996 this.voidLink.previous=newLink;
39997 oldLast.next=newLink;
39998 this.$size++;
39999 this.modCount++;
40000 return true;
40001 },"~O");
40002 Clazz_defineMethod(c$,"addAll",
40003 function(location,collection){
40004 if(location<0||location>this.$size){
40005 throw new IndexOutOfBoundsException();
40006 }var adding=collection.size();
40007 if(adding==0){
40008 return false;
40009 }var previous=this.voidLink;
40010 if(location<(Math.floor(this.$size/2))){
40011 for(var i=0;i<location;i++){
40012 previous=previous.next;
40013 }
40014 }else{
40015 for(var i=this.$size;i>=location;i--){
40016 previous=previous.previous;
40017 }
40018 }var next=previous.next;
40019 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40020 var newLink=new java.util.LinkedList.Link(e,previous,null);
40021 previous.next=newLink;
40022 previous=newLink;
40023 }
40024 previous.next=next;
40025 next.previous=previous;
40026 this.$size+=adding;
40027 this.modCount++;
40028 return true;
40029 },"~N,java.util.Collection");
40030 Clazz_defineMethod(c$,"addAll",
40031 function(collection){
40032 var adding=collection.size();
40033 if(adding==0){
40034 return false;
40035 }var previous=this.voidLink.previous;
40036 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40037 var newLink=new java.util.LinkedList.Link(e,previous,null);
40038 previous.next=newLink;
40039 previous=newLink;
40040 }
40041 previous.next=this.voidLink;
40042 this.voidLink.previous=previous;
40043 this.$size+=adding;
40044 this.modCount++;
40045 return true;
40046 },"java.util.Collection");
40047 Clazz_defineMethod(c$,"addFirst",
40048 function(object){
40049 var oldFirst=this.voidLink.next;
40050 var newLink=new java.util.LinkedList.Link(object,this.voidLink,oldFirst);
40051 this.voidLink.next=newLink;
40052 oldFirst.previous=newLink;
40053 this.$size++;
40054 this.modCount++;
40055 },"~O");
40056 Clazz_defineMethod(c$,"addLast",
40057 function(object){
40058 var oldLast=this.voidLink.previous;
40059 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
40060 this.voidLink.previous=newLink;
40061 oldLast.next=newLink;
40062 this.$size++;
40063 this.modCount++;
40064 },"~O");
40065 Clazz_overrideMethod(c$,"clear",
40066 function(){
40067 if(this.$size>0){
40068 this.$size=0;
40069 this.voidLink.next=this.voidLink;
40070 this.voidLink.previous=this.voidLink;
40071 this.modCount++;
40072 }});
40073 Clazz_overrideMethod(c$,"clone",
40074 function(){
40075 return new java.util.LinkedList(this);
40076 });
40077 Clazz_overrideMethod(c$,"contains",
40078 function(object){
40079 var link=this.voidLink.next;
40080 if(object!=null){
40081 while(link!==this.voidLink){
40082 if(object.equals(link.data)){
40083 return true;
40084 }link=link.next;
40085 }
40086 }else{
40087 while(link!==this.voidLink){
40088 if(link.data==null){
40089 return true;
40090 }link=link.next;
40091 }
40092 }return false;
40093 },"~O");
40094 Clazz_overrideMethod(c$,"get",
40095 function(location){
40096 if(0<=location&&location<this.$size){
40097 var link=this.voidLink;
40098 if(location<(Math.floor(this.$size/2))){
40099 for(var i=0;i<=location;i++){
40100 link=link.next;
40101 }
40102 }else{
40103 for(var i=this.$size;i>location;i--){
40104 link=link.previous;
40105 }
40106 }return link.data;
40107 }throw new IndexOutOfBoundsException();
40108 },"~N");
40109 Clazz_defineMethod(c$,"getFirst",
40110 function(){
40111 var first=this.voidLink.next;
40112 if(first!==this.voidLink){
40113 return first.data;
40114 }throw new java.util.NoSuchElementException();
40115 });
40116 Clazz_defineMethod(c$,"getLast",
40117 function(){
40118 var last=this.voidLink.previous;
40119 if(last!==this.voidLink){
40120 return last.data;
40121 }throw new java.util.NoSuchElementException();
40122 });
40123 Clazz_overrideMethod(c$,"indexOf",
40124 function(object){
40125 var pos=0;
40126 var link=this.voidLink.next;
40127 if(object!=null){
40128 while(link!==this.voidLink){
40129 if(object.equals(link.data)){
40130 return pos;
40131 }link=link.next;
40132 pos++;
40133 }
40134 }else{
40135 while(link!==this.voidLink){
40136 if(link.data==null){
40137 return pos;
40138 }link=link.next;
40139 pos++;
40140 }
40141 }return-1;
40142 },"~O");
40143 Clazz_overrideMethod(c$,"lastIndexOf",
40144 function(object){
40145 var pos=this.$size;
40146 var link=this.voidLink.previous;
40147 if(object!=null){
40148 while(link!==this.voidLink){
40149 pos--;
40150 if(object.equals(link.data)){
40151 return pos;
40152 }link=link.previous;
40153 }
40154 }else{
40155 while(link!==this.voidLink){
40156 pos--;
40157 if(link.data==null){
40158 return pos;
40159 }link=link.previous;
40160 }
40161 }return-1;
40162 },"~O");
40163 Clazz_defineMethod(c$,"listIterator",
40164 function(location){
40165 return new java.util.LinkedList.LinkIterator(this,location);
40166 },"~N");
40167 Clazz_defineMethod(c$,"remove",
40168 function(location){
40169 if(0<=location&&location<this.$size){
40170 var link=this.voidLink;
40171 if(location<(Math.floor(this.$size/2))){
40172 for(var i=0;i<=location;i++){
40173 link=link.next;
40174 }
40175 }else{
40176 for(var i=this.$size;i>location;i--){
40177 link=link.previous;
40178 }
40179 }var previous=link.previous;
40180 var next=link.next;
40181 previous.next=next;
40182 next.previous=previous;
40183 this.$size--;
40184 this.modCount++;
40185 return link.data;
40186 }throw new IndexOutOfBoundsException();
40187 },"~N");
40188 Clazz_defineMethod(c$,"remove",
40189 function(object){
40190 var link=this.voidLink.next;
40191 if(object!=null){
40192 while(link!==this.voidLink&&!object.equals(link.data)){
40193 link=link.next;
40194 }
40195 }else{
40196 while(link!==this.voidLink&&link.data!=null){
40197 link=link.next;
40198 }
40199 }if(link===this.voidLink){
40200 return false;
40201 }var next=link.next;
40202 var previous=link.previous;
40203 previous.next=next;
40204 next.previous=previous;
40205 this.$size--;
40206 this.modCount++;
40207 return true;
40208 },"~O");
40209 Clazz_defineMethod(c$,"removeFirst",
40210 function(){
40211 var first=this.voidLink.next;
40212 if(first!==this.voidLink){
40213 var next=first.next;
40214 this.voidLink.next=next;
40215 next.previous=this.voidLink;
40216 this.$size--;
40217 this.modCount++;
40218 return first.data;
40219 }throw new java.util.NoSuchElementException();
40220 });
40221 Clazz_defineMethod(c$,"removeLast",
40222 function(){
40223 var last=this.voidLink.previous;
40224 if(last!==this.voidLink){
40225 var previous=last.previous;
40226 this.voidLink.previous=previous;
40227 previous.next=this.voidLink;
40228 this.$size--;
40229 this.modCount++;
40230 return last.data;
40231 }throw new java.util.NoSuchElementException();
40232 });
40233 Clazz_overrideMethod(c$,"set",
40234 function(location,object){
40235 if(0<=location&&location<this.$size){
40236 var link=this.voidLink;
40237 if(location<(Math.floor(this.$size/2))){
40238 for(var i=0;i<=location;i++){
40239 link=link.next;
40240 }
40241 }else{
40242 for(var i=this.$size;i>location;i--){
40243 link=link.previous;
40244 }
40245 }var result=link.data;
40246 link.data=object;
40247 return result;
40248 }throw new IndexOutOfBoundsException();
40249 },"~N,~O");
40250 Clazz_overrideMethod(c$,"size",
40251 function(){
40252 return this.$size;
40253 });
40254 Clazz_overrideMethod(c$,"offer",
40255 function(o){
40256 this.add(o);
40257 return true;
40258 },"~O");
40259 Clazz_overrideMethod(c$,"poll",
40260 function(){
40261 return this.$size==0?null:this.removeFirst();
40262 });
40263 Clazz_defineMethod(c$,"remove",
40264 function(){
40265 return this.removeFirst();
40266 });
40267 Clazz_overrideMethod(c$,"peek",
40268 function(){
40269 var first=this.voidLink.next;
40270 return first===this.voidLink?null:first.data;
40271 });
40272 Clazz_overrideMethod(c$,"element",
40273 function(){
40274 return this.getFirst();
40275 });
40276 Clazz_defineMethod(c$,"toArray",
40277 function(){
40278 var index=0;
40279 var contents=new Array(this.$size);
40280 var link=this.voidLink.next;
40281 while(link!==this.voidLink){
40282 contents[index++]=link.data;
40283 link=link.next;
40284 }
40285 return contents;
40286 });
40287 Clazz_defineMethod(c$,"toArray",
40288 function(contents){
40289 var index=0;
40290 if(this.$size>contents.length){
40291 var ct=contents.getClass().getComponentType();
40292 contents=java.lang.reflect.Array.newInstance(ct,this.$size);
40293 }var link=this.voidLink.next;
40294 while(link!==this.voidLink){
40295 contents[index++]=link.data;
40296 link=link.next;
40297 }
40298 if(index<contents.length){
40299 contents[index]=null;
40300 }return contents;
40301 },"~A");
40302 Clazz_pu$h(self.c$);
40303 c$=Clazz_decorateAsClass(function(){
40304 this.data=null;
40305 this.previous=null;
40306 this.next=null;
40307 Clazz_instantialize(this,arguments);
40308 },java.util.LinkedList,"Link");
40309 Clazz_makeConstructor(c$,
40310 function(a,b,c){
40311 this.data=a;
40312 this.previous=b;
40313 this.next=c;
40314 },"~O,java.util.LinkedList.Link,java.util.LinkedList.Link");
40315 c$=Clazz_p0p();
40316 Clazz_pu$h(self.c$);
40317 c$=Clazz_decorateAsClass(function(){
40318 this.pos=0;
40319 this.expectedModCount=0;
40320 this.list=null;
40321 this.link=null;
40322 this.lastLink=null;
40323 Clazz_instantialize(this,arguments);
40324 },java.util.LinkedList,"LinkIterator",null,java.util.ListIterator);
40325 Clazz_makeConstructor(c$,
40326 function(a,b){
40327 this.list=a;
40328 this.expectedModCount=this.list.modCount;
40329 if(0<=b&&b<=this.list.$size){
40330 this.link=this.list.voidLink;
40331 if(b<Math.floor(this.list.$size/2)){
40332 for(this.pos=-1;this.pos+1<b;this.pos++){
40333 this.link=this.link.next;
40334 }
40335 }else{
40336 for(this.pos=this.list.$size;this.pos>=b;this.pos--){
40337 this.link=this.link.previous;
40338 }
40339 }}else{
40340 throw new IndexOutOfBoundsException();
40341 }},"java.util.LinkedList,~N");
40342 Clazz_overrideMethod(c$,"add",
40343 function(a){
40344 if(this.expectedModCount==this.list.modCount){
40345 var b=this.link.next;
40346 var c=new java.util.LinkedList.Link(a,this.link,b);
40347 this.link.next=c;
40348 b.previous=c;
40349 this.link=c;
40350 this.lastLink=null;
40351 this.pos++;
40352 this.expectedModCount++;
40353 this.list.$size++;
40354 this.list.modCount++;
40355 }else{
40356 throw new java.util.ConcurrentModificationException();
40357 }},"~O");
40358 Clazz_overrideMethod(c$,"hasNext",
40359 function(){
40360 return this.link.next!==this.list.voidLink;
40361 });
40362 Clazz_overrideMethod(c$,"hasPrevious",
40363 function(){
40364 return this.link!==this.list.voidLink;
40365 });
40366 Clazz_overrideMethod(c$,"next",
40367 function(){
40368 if(this.expectedModCount==this.list.modCount){
40369 var a=this.link.next;
40370 if(a!==this.list.voidLink){
40371 this.lastLink=this.link=a;
40372 this.pos++;
40373 return this.link.data;
40374 }throw new java.util.NoSuchElementException();
40375 }throw new java.util.ConcurrentModificationException();
40376 });
40377 Clazz_overrideMethod(c$,"nextIndex",
40378 function(){
40379 return this.pos+1;
40380 });
40381 Clazz_overrideMethod(c$,"previous",
40382 function(){
40383 if(this.expectedModCount==this.list.modCount){
40384 if(this.link!==this.list.voidLink){
40385 this.lastLink=this.link;
40386 this.link=this.link.previous;
40387 this.pos--;
40388 return this.lastLink.data;
40389 }throw new java.util.NoSuchElementException();
40390 }throw new java.util.ConcurrentModificationException();
40391 });
40392 Clazz_overrideMethod(c$,"previousIndex",
40393 function(){
40394 return this.pos;
40395 });
40396 Clazz_overrideMethod(c$,"remove",
40397 function(){
40398 if(this.expectedModCount==this.list.modCount){
40399 if(this.lastLink!=null){
40400 var a=this.lastLink.next;
40401 var b=this.lastLink.previous;
40402 a.previous=b;
40403 b.next=a;
40404 if(this.lastLink===this.link){
40405 this.pos--;
40406 }this.link=b;
40407 this.lastLink=null;
40408 this.expectedModCount++;
40409 this.list.$size--;
40410 this.list.modCount++;
40411 }else{
40412 throw new IllegalStateException();
40413 }}else{
40414 throw new java.util.ConcurrentModificationException();
40415 }});
40416 Clazz_overrideMethod(c$,"set",
40417 function(a){
40418 if(this.expectedModCount==this.list.modCount){
40419 if(this.lastLink!=null){
40420 this.lastLink.data=a;
40421 }else{
40422 throw new IllegalStateException();
40423 }}else{
40424 throw new java.util.ConcurrentModificationException();
40425 }},"~O");
40426 c$=Clazz_p0p();
40427 });
40428 Clazz_declarePackage ("JU");
40429 Clazz_load (["JU.T3"], "JU.V3", null, function () {
40430 c$ = Clazz_declareType (JU, "V3", JU.T3);
40431 Clazz_makeConstructor (c$, 
40432 function () {
40433 });
40434 c$.newV = Clazz_defineMethod (c$, "newV", 
40435 function (t) {
40436 return JU.V3.new3 (t.x, t.y, t.z);
40437 }, "JU.T3");
40438 c$.newVsub = Clazz_defineMethod (c$, "newVsub", 
40439 function (t1, t2) {
40440 return JU.V3.new3 (t1.x - t2.x, t1.y - t2.y, t1.z - t2.z);
40441 }, "JU.T3,JU.T3");
40442 c$.new3 = Clazz_defineMethod (c$, "new3", 
40443 function (x, y, z) {
40444 var v =  new JU.V3 ();
40445 v.x = x;
40446 v.y = y;
40447 v.z = z;
40448 return v;
40449 }, "~N,~N,~N");
40450 Clazz_defineMethod (c$, "angle", 
40451 function (v1) {
40452 var xx = this.y * v1.z - this.z * v1.y;
40453 var yy = this.z * v1.x - this.x * v1.z;
40454 var zz = this.x * v1.y - this.y * v1.x;
40455 var cross = Math.sqrt (xx * xx + yy * yy + zz * zz);
40456 return Math.abs (Math.atan2 (cross, this.dot (v1)));
40457 }, "JU.V3");
40458 });
40459 Clazz_declarePackage ("javax.swing");
40460 Clazz_load (["java.util.Vector"], "javax.swing.ButtonGroup", null, function () {
40461 c$ = Clazz_decorateAsClass (function () {
40462 this.buttons = null;
40463 this.selection = null;
40464 Clazz_instantialize (this, arguments);
40465 }, javax.swing, "ButtonGroup");
40466 Clazz_prepareFields (c$, function () {
40467 this.buttons =  new java.util.Vector ();
40468 });
40469 Clazz_makeConstructor (c$, 
40470 function () {
40471 });
40472 Clazz_defineMethod (c$, "add", 
40473 function (b) {
40474 if (b == null) {
40475 return;
40476 }this.buttons.addElement (b);
40477 if (b.isSelected ()) {
40478 if (this.selection == null) {
40479 this.selection = b.getModel ();
40480 } else {
40481 b.setSelected (false);
40482 }}b.getModel ().setGroup (this);
40483 }, "javax.swing.AbstractButton");
40484 Clazz_defineMethod (c$, "remove", 
40485 function (b) {
40486 if (b == null) {
40487 return;
40488 }this.buttons.removeElement (b);
40489 if (b.getModel () === this.selection) {
40490 this.selection = null;
40491 }b.getModel ().setGroup (null);
40492 }, "javax.swing.AbstractButton");
40493 Clazz_defineMethod (c$, "clearSelection", 
40494 function () {
40495 if (this.selection != null) {
40496 var oldSelection = this.selection;
40497 this.selection = null;
40498 oldSelection.setSelected (false);
40499 }});
40500 Clazz_defineMethod (c$, "getElements", 
40501 function () {
40502 return this.buttons.elements ();
40503 });
40504 Clazz_defineMethod (c$, "getSelection", 
40505 function () {
40506 return this.selection;
40507 });
40508 Clazz_defineMethod (c$, "setSelected", 
40509 function (m, b) {
40510 if (b && m != null && m !== this.selection) {
40511 var oldSelection = this.selection;
40512 this.selection = m;
40513 if (oldSelection != null) {
40514 oldSelection.setSelected (false);
40515 }m.setSelected (true);
40516 }}, "javax.swing.ButtonModel,~B");
40517 Clazz_defineMethod (c$, "isSelected", 
40518 function (m) {
40519 return (m === this.selection);
40520 }, "javax.swing.ButtonModel");
40521 Clazz_defineMethod (c$, "getButtonCount", 
40522 function () {
40523 if (this.buttons == null) {
40524 return 0;
40525 } else {
40526 return this.buttons.size ();
40527 }});
40528 });
40529 Clazz_declarePackage ("javax.swing");
40530 Clazz_load (["jssun.awt.PaintEventDispatcher"], "javax.swing.SwingPaintEventDispatcher", ["javax.swing.RootPaneContainer", "jssun.awt.SunToolkit"], function () {
40531 c$ = Clazz_declareType (javax.swing, "SwingPaintEventDispatcher", jssun.awt.PaintEventDispatcher);
40532 Clazz_overrideMethod (c$, "shouldDoNativeBackgroundErase", 
40533 function (c) {
40534 return javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND || !(Clazz_instanceOf (c, javax.swing.RootPaneContainer));
40535 }, "java.awt.Component");
40536 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
40537 function (c, r) {
40538 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
40539 var appContext = jssun.awt.SunToolkit.targetToAppContext (c);
40540 return true;
40541 }return Clazz_superCall (this, javax.swing.SwingPaintEventDispatcher, "queueSurfaceDataReplacing", [c, r]);
40542 }, "java.awt.Component,Runnable");
40543 Clazz_defineStatics (c$,
40544 "SHOW_FROM_DOUBLE_BUFFER", false,
40545 "ERASE_BACKGROUND", false);
40546 {
40547 javax.swing.SwingPaintEventDispatcher.SHOW_FROM_DOUBLE_BUFFER = false;
40548 javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND = true;
40549 }});
40550 Clazz_declarePackage ("jssun.awt");
40551 Clazz_load (["java.util.HashSet", "$.IdentityHashMap"], "jssun.awt.AWTAutoShutdown", ["java.awt.AWTEvent"], function () {
40552 c$ = Clazz_decorateAsClass (function () {
40553 this.busyThreadSet = null;
40554 this.toolkitThreadBusy = false;
40555 this.peerMap = null;
40556 Clazz_instantialize (this, arguments);
40557 }, jssun.awt, "AWTAutoShutdown", null, Runnable);
40558 Clazz_prepareFields (c$, function () {
40559 this.busyThreadSet =  new java.util.HashSet (7);
40560 this.peerMap =  new java.util.IdentityHashMap ();
40561 });
40562 Clazz_makeConstructor (c$, 
40563  function () {
40564 });
40565 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
40566 function () {
40567 return (jssun.awt.AWTAutoShutdown.theInstance == null ? (jssun.awt.AWTAutoShutdown.theInstance =  new jssun.awt.AWTAutoShutdown ()) : jssun.awt.AWTAutoShutdown.theInstance);
40568 });
40569 c$.notifyToolkitThreadBusy = Clazz_defineMethod (c$, "notifyToolkitThreadBusy", 
40570 function () {
40571 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (true);
40572 });
40573 c$.notifyToolkitThreadFree = Clazz_defineMethod (c$, "notifyToolkitThreadFree", 
40574 function () {
40575 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (false);
40576 });
40577 Clazz_defineMethod (c$, "notifyThreadBusy", 
40578 function (thread) {
40579 this.busyThreadSet.add (thread);
40580 }, "Thread");
40581 Clazz_defineMethod (c$, "notifyThreadFree", 
40582 function (thread) {
40583 this.busyThreadSet.remove (thread);
40584 }, "Thread");
40585 Clazz_defineMethod (c$, "notifyPeerMapUpdated", 
40586 function () {
40587 if (!this.isReadyToShutdown ()) {
40588 this.activateBlockerThread ();
40589 }});
40590 Clazz_defineMethod (c$, "isReadyToShutdown", 
40591  function () {
40592 return (!this.toolkitThreadBusy && this.peerMap.isEmpty () && this.busyThreadSet.isEmpty ());
40593 });
40594 Clazz_defineMethod (c$, "setToolkitBusy", 
40595  function (busy) {
40596 if (busy != this.toolkitThreadBusy) {
40597 if (busy != this.toolkitThreadBusy) {
40598 if (busy) {
40599 this.toolkitThreadBusy = busy;
40600 } else {
40601 this.toolkitThreadBusy = busy;
40602 }}}}, "~B");
40603 Clazz_overrideMethod (c$, "run", 
40604 function () {
40605 });
40606 c$.getShutdownEvent = Clazz_defineMethod (c$, "getShutdownEvent", 
40607 function () {
40608 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));
40609 });
40610 Clazz_defineMethod (c$, "activateBlockerThread", 
40611  function () {
40612 });
40613 Clazz_defineMethod (c$, "registerPeer", 
40614 function (target, peer) {
40615 this.peerMap.put (target, peer);
40616 this.notifyPeerMapUpdated ();
40617 }, "~O,~O");
40618 Clazz_defineMethod (c$, "unregisterPeer", 
40619 function (target, peer) {
40620 if (this.peerMap.get (target) === peer) {
40621 this.peerMap.remove (target);
40622 }}, "~O,~O");
40623 Clazz_defineMethod (c$, "getPeer", 
40624 function (target) {
40625 return this.peerMap.get (target);
40626 }, "~O");
40627 Clazz_defineMethod (c$, "dumpPeers", 
40628 function (aLog) {
40629 aLog.fine ("Mapped peers:");
40630 for (var key, $key = this.peerMap.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
40631 aLog.fine (key + "->" + this.peerMap.get (key));
40632 }
40633 }, "java.util.logging.Logger");
40634 c$.$AWTAutoShutdown$1$ = function () {
40635 Clazz_pu$h(self.c$);
40636 c$ = Clazz_declareAnonymous (jssun.awt, "AWTAutoShutdown$1", java.awt.AWTEvent);
40637 c$ = Clazz_p0p ();
40638 };
40639 Clazz_defineStatics (c$,
40640 "theInstance", null);
40641 });
40642 Clazz_declarePackage ("jssun.awt");
40643 c$ = Clazz_decorateAsClass (function () {
40644 this.event = null;
40645 this.next = null;
40646 Clazz_instantialize (this, arguments);
40647 }, jssun.awt, "EventQueueItem");
40648 Clazz_makeConstructor (c$, 
40649 function (evt) {
40650 this.event = evt;
40651 }, "java.awt.AWTEvent");
40652 Clazz_declarePackage ("jssun.awt");
40653 Clazz_declareInterface (jssun.awt, "ModalExclude");
40654 Clazz_declarePackage ("jssun.awt");
40655 Clazz_load (["java.awt.peer.CanvasPeer", "$.LightweightPeer", "$.PanelPeer"], "jssun.awt.NullComponentPeer", ["java.lang.IllegalStateException", "$.UnsupportedOperationException", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle"], function () {
40656 c$ = Clazz_declareType (jssun.awt, "NullComponentPeer", null, [java.awt.peer.LightweightPeer, java.awt.peer.CanvasPeer, java.awt.peer.PanelPeer]);
40657 Clazz_overrideMethod (c$, "isObscured", 
40658 function () {
40659 return false;
40660 });
40661 Clazz_overrideMethod (c$, "canDetermineObscurity", 
40662 function () {
40663 return false;
40664 });
40665 Clazz_overrideMethod (c$, "isFocusable", 
40666 function () {
40667 return false;
40668 });
40669 Clazz_overrideMethod (c$, "setVisible", 
40670 function (b) {
40671 }, "~B");
40672 Clazz_defineMethod (c$, "show", 
40673 function () {
40674 });
40675 Clazz_defineMethod (c$, "hide", 
40676 function () {
40677 });
40678 Clazz_overrideMethod (c$, "setEnabled", 
40679 function (b) {
40680 }, "~B");
40681 Clazz_defineMethod (c$, "enable", 
40682 function () {
40683 });
40684 Clazz_defineMethod (c$, "disable", 
40685 function () {
40686 });
40687 Clazz_overrideMethod (c$, "paint", 
40688 function (g) {
40689 }, "java.awt.Graphics");
40690 Clazz_overrideMethod (c$, "repaint", 
40691 function (tm, x, y, width, height) {
40692 }, "~N,~N,~N,~N,~N");
40693 Clazz_overrideMethod (c$, "print", 
40694 function (g) {
40695 }, "java.awt.Graphics");
40696 Clazz_overrideMethod (c$, "setBounds", 
40697 function (x, y, width, height, op) {
40698 }, "~N,~N,~N,~N,~N");
40699 Clazz_defineMethod (c$, "reshape", 
40700 function (x, y, width, height) {
40701 }, "~N,~N,~N,~N");
40702 Clazz_overrideMethod (c$, "coalescePaintEvent", 
40703 function (e) {
40704 }, "java.awt.event.PaintEvent");
40705 Clazz_defineMethod (c$, "handleEvent", 
40706 function (e) {
40707 return false;
40708 }, "java.awt.Event");
40709 Clazz_defineMethod (c$, "handleEvent", 
40710 function (arg0) {
40711 }, "java.awt.AWTEvent");
40712 Clazz_overrideMethod (c$, "getPreferredSize", 
40713 function () {
40714 return  new java.awt.Dimension (1, 1);
40715 });
40716 Clazz_overrideMethod (c$, "getMinimumSize", 
40717 function () {
40718 return  new java.awt.Dimension (1, 1);
40719 });
40720 Clazz_overrideMethod (c$, "getToolkit", 
40721 function () {
40722 return null;
40723 });
40724 Clazz_overrideMethod (c$, "getColorModel", 
40725 function () {
40726 return null;
40727 });
40728 Clazz_overrideMethod (c$, "getGraphics", 
40729 function () {
40730 return null;
40731 });
40732 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
40733 function () {
40734 return null;
40735 });
40736 Clazz_overrideMethod (c$, "getFontMetrics", 
40737 function (font) {
40738 return null;
40739 }, "java.awt.Font");
40740 Clazz_overrideMethod (c$, "dispose", 
40741 function () {
40742 });
40743 Clazz_overrideMethod (c$, "setForeground", 
40744 function (c) {
40745 }, "java.awt.Color");
40746 Clazz_overrideMethod (c$, "setBackground", 
40747 function (c) {
40748 }, "java.awt.Color");
40749 Clazz_overrideMethod (c$, "setFont", 
40750 function (f) {
40751 }, "java.awt.Font");
40752 Clazz_overrideMethod (c$, "updateCursorImmediately", 
40753 function () {
40754 });
40755 Clazz_defineMethod (c$, "setCursor", 
40756 function (cursor) {
40757 }, "java.awt.Cursor");
40758 Clazz_overrideMethod (c$, "requestFocus", 
40759 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
40760 return false;
40761 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
40762 Clazz_defineMethod (c$, "createImage", 
40763 function (producer) {
40764 return null;
40765 }, "java.awt.image.ImageProducer");
40766 Clazz_defineMethod (c$, "createImage", 
40767 function (width, height) {
40768 return null;
40769 }, "~N,~N");
40770 Clazz_overrideMethod (c$, "prepareImage", 
40771 function (img, w, h, o) {
40772 return false;
40773 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40774 Clazz_overrideMethod (c$, "checkImage", 
40775 function (img, w, h, o) {
40776 return 0;
40777 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40778 Clazz_defineMethod (c$, "preferredSize", 
40779 function () {
40780 return this.getPreferredSize ();
40781 });
40782 Clazz_defineMethod (c$, "minimumSize", 
40783 function () {
40784 return this.getMinimumSize ();
40785 });
40786 Clazz_overrideMethod (c$, "getLocationOnScreen", 
40787 function () {
40788 return  new java.awt.Point (0, 0);
40789 });
40790 Clazz_overrideMethod (c$, "getInsets", 
40791 function () {
40792 return this.insets ();
40793 });
40794 Clazz_overrideMethod (c$, "beginValidate", 
40795 function () {
40796 });
40797 Clazz_overrideMethod (c$, "endValidate", 
40798 function () {
40799 });
40800 Clazz_defineMethod (c$, "insets", 
40801 function () {
40802 return  new java.awt.Insets (0, 0, 0, 0);
40803 });
40804 Clazz_defineMethod (c$, "isPaintPending", 
40805 function () {
40806 return false;
40807 });
40808 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
40809 function () {
40810 return false;
40811 });
40812 Clazz_overrideMethod (c$, "createVolatileImage", 
40813 function (width, height) {
40814 return null;
40815 }, "~N,~N");
40816 Clazz_overrideMethod (c$, "beginLayout", 
40817 function () {
40818 });
40819 Clazz_overrideMethod (c$, "endLayout", 
40820 function () {
40821 });
40822 Clazz_overrideMethod (c$, "getBackBuffer", 
40823 function () {
40824 throw  new IllegalStateException ("Page-flipping is not allowed on a lightweight component");
40825 });
40826 Clazz_overrideMethod (c$, "destroyBuffers", 
40827 function () {
40828 });
40829 Clazz_overrideMethod (c$, "isReparentSupported", 
40830 function () {
40831 return false;
40832 });
40833 Clazz_overrideMethod (c$, "reparent", 
40834 function (newNativeParent) {
40835 throw  new UnsupportedOperationException ();
40836 }, "java.awt.peer.ContainerPeer");
40837 Clazz_defineMethod (c$, "restack", 
40838 function () {
40839 throw  new UnsupportedOperationException ();
40840 });
40841 Clazz_defineMethod (c$, "isRestackSupported", 
40842 function () {
40843 return false;
40844 });
40845 Clazz_overrideMethod (c$, "layout", 
40846 function () {
40847 });
40848 Clazz_overrideMethod (c$, "getBounds", 
40849 function () {
40850 return  new java.awt.Rectangle (0, 0, 0, 0);
40851 });
40852 });
40853 Clazz_declarePackage ("jssun.awt");
40854 Clazz_load (null, "jssun.awt.PaintEventDispatcher", ["java.awt.Rectangle", "java.awt.event.PaintEvent"], function () {
40855 c$ = Clazz_declareType (jssun.awt, "PaintEventDispatcher");
40856 c$.setPaintEventDispatcher = Clazz_defineMethod (c$, "setPaintEventDispatcher", 
40857 function (dispatcher) {
40858 {
40859 jssun.awt.PaintEventDispatcher.dispatcher = dispatcher;
40860 }}, "jssun.awt.PaintEventDispatcher");
40861 c$.getPaintEventDispatcher = Clazz_defineMethod (c$, "getPaintEventDispatcher", 
40862 function () {
40863 {
40864 if (jssun.awt.PaintEventDispatcher.dispatcher == null) {
40865 jssun.awt.PaintEventDispatcher.dispatcher =  new jssun.awt.PaintEventDispatcher ();
40866 }return jssun.awt.PaintEventDispatcher.dispatcher;
40867 }});
40868 Clazz_defineMethod (c$, "createPaintEvent", 
40869 function (target, x, y, w, h) {
40870 return  new java.awt.event.PaintEvent (target, 800,  new java.awt.Rectangle (x, y, w, h));
40871 }, "java.awt.Component,~N,~N,~N,~N");
40872 Clazz_defineMethod (c$, "shouldDoNativeBackgroundErase", 
40873 function (c) {
40874 return true;
40875 }, "java.awt.Component");
40876 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
40877 function (c, r) {
40878 return false;
40879 }, "java.awt.Component,Runnable");
40880 Clazz_defineStatics (c$,
40881 "dispatcher", null);
40882 });
40883 Clazz_declarePackage ("jssun.awt");
40884 Clazz_load (null, "jssun.awt.PostEventQueue", ["jssun.awt.EventQueueItem", "$.SunToolkit", "swingjs.JSToolkit"], function () {
40885 c$ = Clazz_decorateAsClass (function () {
40886 this.queueHead = null;
40887 this.queueTail = null;
40888 this.eventQueue = null;
40889 Clazz_instantialize (this, arguments);
40890 }, jssun.awt, "PostEventQueue");
40891 Clazz_makeConstructor (c$, 
40892 function (eq) {
40893 this.eventQueue = eq;
40894 }, "java.awt.EventQueue");
40895 Clazz_defineMethod (c$, "noEvents", 
40896 function () {
40897 return this.queueHead == null;
40898 });
40899 Clazz_defineMethod (c$, "flush", 
40900 function () {
40901 if (this.queueHead != null) {
40902 var tempQueue;
40903 {
40904 tempQueue = this.queueHead;
40905 this.queueHead = this.queueTail = null;
40906 while (tempQueue != null) {
40907 swingjs.JSToolkit.alert ("postevent IS NOT IMPLEMENTED " + tempQueue.event);
40908 this.eventQueue.postEvent (tempQueue.event);
40909 tempQueue = tempQueue.next;
40910 }
40911 }}});
40912 Clazz_defineMethod (c$, "postEvent", 
40913 function (event) {
40914 var item =  new jssun.awt.EventQueueItem (event);
40915 {
40916 if (this.queueHead == null) {
40917 this.queueHead = this.queueTail = item;
40918 } else {
40919 this.queueTail.next = item;
40920 this.queueTail = item;
40921 }}jssun.awt.SunToolkit.wakeupEventQueue (this.eventQueue, false);
40922 }, "java.awt.AWTEvent");
40923 });
40924 Clazz_declarePackage ("jssun.java2d");
40925 Clazz_load (["java.awt.Graphics2D"], "jssun.java2d.SunGraphics2D", ["java.awt.geom.AffineTransform"], function () {
40926 c$ = Clazz_decorateAsClass (function () {
40927 this.transformState = 0;
40928 this.foregroundColor = null;
40929 this.backgroundColor = null;
40930 this.$transform = null;
40931 this.transX = 0;
40932 this.transY = 0;
40933 this.hints = null;
40934 Clazz_instantialize (this, arguments);
40935 }, jssun.java2d, "SunGraphics2D", java.awt.Graphics2D);
40936 Clazz_defineMethod (c$, "clone", 
40937 function () {
40938 return this.clone0 ();
40939 });
40940 Clazz_defineMethod (c$, "clone0", 
40941 function () {
40942 try {
40943 var g;
40944 {
40945 g = Clazz_clone(this);
40946 }g.$transform =  new java.awt.geom.AffineTransform (this.$transform);
40947 if (this.hints != null) {
40948 g.hints = this.hints.clone ();
40949 }return g;
40950 } catch (e) {
40951 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
40952 } else {
40953 throw e;
40954 }
40955 }
40956 return null;
40957 });
40958 Clazz_defineMethod (c$, "create", 
40959 function () {
40960 return this.clone0 ();
40961 });
40962 Clazz_defineStatics (c$,
40963 "TRANSFORM_GENERIC", 4,
40964 "TRANSFORM_TRANSLATESCALE", 3,
40965 "TRANSFORM_ANY_TRANSLATE", 2,
40966 "TRANSFORM_INT_TRANSLATE", 1,
40967 "TRANSFORM_ISIDENT", 0);
40968 });
40969 Clazz_declarePackage ("javax.swing");
40970 Clazz_load (null, "javax.swing.UIManager", ["java.util.ArrayList", "java.util.Locale", "javax.swing.RepaintManager", "$.SwingPaintEventDispatcher", "$.SwingUtilities", "jssun.awt.PaintEventDispatcher", "swingjs.JSToolkit"], function () {
40971 c$ = Clazz_declareType (javax.swing, "UIManager");
40972 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
40973 function () {
40974 return javax.swing.UIManager.uid;
40975 });
40976 c$.getInstalledLookAndFeels = Clazz_defineMethod (c$, "getInstalledLookAndFeels", 
40977 function () {
40978 return javax.swing.UIManager.installedLAFs;
40979 });
40980 c$.setInstalledLookAndFeels = Clazz_defineMethod (c$, "setInstalledLookAndFeels", 
40981 function (infos) {
40982 swingjs.JSToolkit.notImplemented (null);
40983 }, "~A");
40984 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
40985 function (info) {
40986 swingjs.JSToolkit.notImplemented (null);
40987 }, "javax.swing.UIManager.LookAndFeelInfo");
40988 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
40989 function (name, className) {
40990 swingjs.JSToolkit.notImplemented (null);
40991 }, "~S,~S");
40992 c$.getLookAndFeel = Clazz_defineMethod (c$, "getLookAndFeel", 
40993 function () {
40994 return (javax.swing.UIManager.laf == null ? (javax.swing.UIManager.laf = swingjs.JSToolkit.getInstance ("swingjs.plaf.HTML5LookAndFeel")) : javax.swing.UIManager.laf);
40995 });
40996 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
40997 function (newLookAndFeel) {
40998 }, "javax.swing.LookAndFeel");
40999 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
41000 function (className) {
41001 var lnfClass = javax.swing.SwingUtilities.loadSystemClass (className);
41002 javax.swing.UIManager.setLookAndFeel ((lnfClass.newInstance ()));
41003 }, "~S");
41004 c$.getSystemLookAndFeelClassName = Clazz_defineMethod (c$, "getSystemLookAndFeelClassName", 
41005 function () {
41006 return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName ();
41007 });
41008 c$.getCrossPlatformLookAndFeelClassName = Clazz_defineMethod (c$, "getCrossPlatformLookAndFeelClassName", 
41009 function () {
41010 return "swingjs.plaf.HTML5LookAndFeel";
41011 });
41012 c$.getDefaults = Clazz_defineMethod (c$, "getDefaults", 
41013 function () {
41014 javax.swing.UIManager.maybeInitialize ();
41015 return javax.swing.UIManager.uid;
41016 });
41017 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41018 function (key) {
41019 return javax.swing.UIManager.getDefaults ().getFont (key);
41020 }, "~O");
41021 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41022 function (key, l) {
41023 return javax.swing.UIManager.getDefaults ().getFont (key, l);
41024 }, "~O,java.util.Locale");
41025 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41026 function (key) {
41027 return javax.swing.UIManager.getDefaults ().getColor (key);
41028 }, "~O");
41029 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41030 function (key, l) {
41031 return javax.swing.UIManager.getDefaults ().getColor (key, l);
41032 }, "~O,java.util.Locale");
41033 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41034 function (key) {
41035 return javax.swing.UIManager.getDefaults ().getIcon (key);
41036 }, "~O");
41037 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41038 function (key, l) {
41039 return javax.swing.UIManager.getDefaults ().getIcon (key, l);
41040 }, "~O,java.util.Locale");
41041 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41042 function (key) {
41043 return javax.swing.UIManager.getDefaults ().getBorder (key);
41044 }, "~O");
41045 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41046 function (key, l) {
41047 return javax.swing.UIManager.getDefaults ().getBorder (key, l);
41048 }, "~O,java.util.Locale");
41049 c$.getString = Clazz_defineMethod (c$, "getString", 
41050 function (key) {
41051 return javax.swing.UIManager.getDefaults ().getString (key);
41052 }, "~O");
41053 c$.getString = Clazz_defineMethod (c$, "getString", 
41054 function (key, l) {
41055 return javax.swing.UIManager.getDefaults ().getString (key, l);
41056 }, "~O,java.util.Locale");
41057 c$.getString = Clazz_defineMethod (c$, "getString", 
41058 function (key, c) {
41059 var l = (c == null) ? java.util.Locale.getDefault () : c.getLocale ();
41060 return javax.swing.UIManager.getString (key, l);
41061 }, "~O,java.awt.Component");
41062 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41063 function (key) {
41064 return javax.swing.UIManager.getDefaults ().getInt (key);
41065 }, "~O");
41066 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41067 function (key, l) {
41068 return javax.swing.UIManager.getDefaults ().getInt (key, l);
41069 }, "~O,java.util.Locale");
41070 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41071 function (key) {
41072 return javax.swing.UIManager.getDefaults ().getBoolean (key);
41073 }, "~O");
41074 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41075 function (key, l) {
41076 return javax.swing.UIManager.getDefaults ().getBoolean (key, l);
41077 }, "~O,java.util.Locale");
41078 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41079 function (key) {
41080 return javax.swing.UIManager.getDefaults ().getInsets (key);
41081 }, "~O");
41082 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41083 function (key, l) {
41084 return javax.swing.UIManager.getDefaults ().getInsets (key, l);
41085 }, "~O,java.util.Locale");
41086 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41087 function (key) {
41088 return javax.swing.UIManager.getDefaults ().getDimension (key);
41089 }, "~O");
41090 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41091 function (key, l) {
41092 return javax.swing.UIManager.getDefaults ().getDimension (key, l);
41093 }, "~O,java.util.Locale");
41094 c$.get = Clazz_defineMethod (c$, "get", 
41095 function (key) {
41096 return javax.swing.UIManager.getDefaults ().get (key);
41097 }, "~O");
41098 c$.get = Clazz_defineMethod (c$, "get", 
41099 function (key, l) {
41100 return javax.swing.UIManager.getDefaults ().get (key, l);
41101 }, "~O,java.util.Locale");
41102 c$.put = Clazz_defineMethod (c$, "put", 
41103 function (key, value) {
41104 return javax.swing.UIManager.getDefaults ().put (key, value);
41105 }, "~O,~O");
41106 c$.getUI = Clazz_defineMethod (c$, "getUI", 
41107 function (target) {
41108 javax.swing.UIManager.maybeInitialize ();
41109 var ui = null;
41110 ui = javax.swing.UIManager.getDefaults ().getUI (target);
41111 if (ui == null) System.out.println (target.getUIClassID () + " has not been implemented");
41112 return ui;
41113 }, "javax.swing.JComponent");
41114 c$.addPropertyChangeListener = Clazz_defineMethod (c$, "addPropertyChangeListener", 
41115 function (listener) {
41116 }, "java.beans.PropertyChangeListener");
41117 c$.removePropertyChangeListener = Clazz_defineMethod (c$, "removePropertyChangeListener", 
41118 function (listener) {
41119 }, "java.beans.PropertyChangeListener");
41120 c$.getPropertyChangeListeners = Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41121 function () {
41122 return  new Array (0);
41123 });
41124 c$.maybeInitialize = Clazz_defineMethod (c$, "maybeInitialize", 
41125  function () {
41126 if (javax.swing.UIManager.uid == null) {
41127 javax.swing.UIManager.uid = swingjs.JSToolkit.getLookAndFeelDefaults ();
41128 javax.swing.UIManager.initialize ();
41129 }});
41130 c$.initialize = Clazz_defineMethod (c$, "initialize", 
41131  function () {
41132 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
41133 jssun.awt.PaintEventDispatcher.setPaintEventDispatcher ( new javax.swing.SwingPaintEventDispatcher ());
41134 }});
41135 Clazz_pu$h(self.c$);
41136 c$ = Clazz_decorateAsClass (function () {
41137 this.name = null;
41138 this.className = null;
41139 Clazz_instantialize (this, arguments);
41140 }, javax.swing.UIManager, "LookAndFeelInfo");
41141 Clazz_makeConstructor (c$, 
41142 function (a, b) {
41143 this.name = a;
41144 this.className = b;
41145 }, "~S,~S");
41146 Clazz_defineMethod (c$, "getName", 
41147 function () {
41148 return this.name;
41149 });
41150 Clazz_defineMethod (c$, "getClassName", 
41151 function () {
41152 return this.className;
41153 });
41154 Clazz_overrideMethod (c$, "toString", 
41155 function () {
41156 return this.getClass ().getName () + "[" + this.getName () + " " + this.getClassName () + "]";
41157 });
41158 c$ = Clazz_p0p ();
41159 Clazz_defineStatics (c$,
41160 "installedLAFs", null);
41161 {
41162 var iLAFs =  new java.util.ArrayList (4);
41163 iLAFs.add ( new javax.swing.UIManager.LookAndFeelInfo ("HTML5", "swingjs.plaf.HTML5LookAndFeel"));
41164 javax.swing.UIManager.installedLAFs = iLAFs.toArray ( new Array (iLAFs.size ()));
41165 }Clazz_defineStatics (c$,
41166 "laf", null,
41167 "uid", null);
41168 });
41169 Clazz_declarePackage ("javax.swing");
41170 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 () {
41171 c$ = Clazz_decorateAsClass (function () {
41172 this.changeSupport = null;
41173 this.resourceBundles = null;
41174 this.defaultLocale = null;
41175 this.resourceCache = null;
41176 Clazz_instantialize (this, arguments);
41177 }, javax.swing, "UIDefaults", java.util.Hashtable);
41178 Clazz_prepareFields (c$, function () {
41179 this.defaultLocale = java.util.Locale.getDefault ();
41180 });
41181 Clazz_makeConstructor (c$, 
41182 function () {
41183 this.construct (700, .75);
41184 });
41185 Clazz_makeConstructor (c$, 
41186 function (initialCapacity, loadFactor) {
41187 Clazz_superConstructor (this, javax.swing.UIDefaults, [initialCapacity, loadFactor]);
41188 this.resourceCache =  new java.util.HashMap ();
41189 }, "~N,~N");
41190 Clazz_makeConstructor (c$, 
41191 function (keyValueList) {
41192 Clazz_superConstructor (this, javax.swing.UIDefaults, [Clazz_doubleToInt (keyValueList.length / 2)]);
41193 for (var i = 0; i < keyValueList.length; i += 2) {
41194 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], keyValueList[i + 1]]);
41195 }
41196 }, "~A");
41197 Clazz_defineMethod (c$, "get", 
41198 function (key) {
41199 var value = this.getFromHashtable (key);
41200 return (value != null) ? value : this.getFromResourceBundle (key, null);
41201 }, "~O");
41202 Clazz_defineMethod (c$, "getFromHashtable", 
41203  function (key) {
41204 var value = Clazz_superCall (this, javax.swing.UIDefaults, "get", [key]);
41205 if (value == null && (Clazz_instanceOf (key, String))) {
41206 var skey = key;
41207 if (skey.endsWith (".font") || skey.endsWith (".background") || skey.endsWith (".foreground")) value = Clazz_superCall (this, javax.swing.UIDefaults, "get", ["*" + skey.substring (skey.lastIndexOf ("."))]);
41208 }if ((value !== javax.swing.UIDefaults.PENDING) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue)) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue))) {
41209 return value;
41210 }if (!(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue))) {
41211 return value;
41212 }if (Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue)) {
41213 try {
41214 value = (value).createValue (this);
41215 } finally {
41216 if (value == null) {
41217 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]);
41218 } else {
41219 Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41220 }}
41221 } else {
41222 value = (value).createValue (this);
41223 }return value;
41224 }, "~O");
41225 Clazz_defineMethod (c$, "get", 
41226 function (key, l) {
41227 var value = this.getFromHashtable (key);
41228 return (value != null) ? value : this.getFromResourceBundle (key, l);
41229 }, "~O,java.util.Locale");
41230 Clazz_defineMethod (c$, "getFromResourceBundle", 
41231  function (key, l) {
41232 if (this.resourceBundles == null || this.resourceBundles.isEmpty () || !(Clazz_instanceOf (key, String))) {
41233 return null;
41234 }if (l == null) {
41235 if (this.defaultLocale == null) return null;
41236  else l = this.defaultLocale;
41237 }{
41238 return this.getResourceCache (l).get (key);
41239 }}, "~O,java.util.Locale");
41240 Clazz_defineMethod (c$, "getResourceCache", 
41241  function (l) {
41242 return null;
41243 }, "java.util.Locale");
41244 Clazz_defineMethod (c$, "put", 
41245 function (key, value) {
41246 var oldValue = (value == null) ? Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]) : Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41247 if (Clazz_instanceOf (key, String)) {
41248 this.firePropertyChange (key, oldValue, value);
41249 }return oldValue;
41250 }, "~O,~O");
41251 Clazz_defineMethod (c$, "putDefaults", 
41252 function (keyValueList) {
41253 for (var i = 0, max = keyValueList.length; i < max; i += 2) {
41254 var value = keyValueList[i + 1];
41255 if (value == null) {
41256 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [keyValueList[i]]);
41257 } else {
41258 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], value]);
41259 }}
41260 this.firePropertyChange ("UIDefaults", null, null);
41261 }, "~A");
41262 Clazz_defineMethod (c$, "getFont", 
41263 function (key) {
41264 var value = this.get (key);
41265 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41266 }, "~O");
41267 Clazz_defineMethod (c$, "getFont", 
41268 function (key, l) {
41269 var value = this.get (key, l);
41270 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41271 }, "~O,java.util.Locale");
41272 Clazz_defineMethod (c$, "getColor", 
41273 function (key) {
41274 var value = this.get (key);
41275 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41276 }, "~O");
41277 Clazz_defineMethod (c$, "getColor", 
41278 function (key, l) {
41279 var value = this.get (key, l);
41280 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41281 }, "~O,java.util.Locale");
41282 Clazz_defineMethod (c$, "getIcon", 
41283 function (key) {
41284 var value = this.get (key);
41285 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41286 }, "~O");
41287 Clazz_defineMethod (c$, "getIcon", 
41288 function (key, l) {
41289 var value = this.get (key, l);
41290 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41291 }, "~O,java.util.Locale");
41292 Clazz_defineMethod (c$, "getBorder", 
41293 function (key) {
41294 var value = this.get (key);
41295 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41296 }, "~O");
41297 Clazz_defineMethod (c$, "getBorder", 
41298 function (key, l) {
41299 var value = this.get (key, l);
41300 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41301 }, "~O,java.util.Locale");
41302 Clazz_defineMethod (c$, "getString", 
41303 function (key) {
41304 var value = this.get (key);
41305 return (Clazz_instanceOf (value, String)) ? value : null;
41306 }, "~O");
41307 Clazz_defineMethod (c$, "getString", 
41308 function (key, l) {
41309 var value = this.get (key, l);
41310 return (Clazz_instanceOf (value, String)) ? value : null;
41311 }, "~O,java.util.Locale");
41312 Clazz_defineMethod (c$, "getInt", 
41313 function (key) {
41314 var value = this.get (key);
41315 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41316 }, "~O");
41317 Clazz_defineMethod (c$, "getInt", 
41318 function (key, l) {
41319 var value = this.get (key, l);
41320 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41321 }, "~O,java.util.Locale");
41322 Clazz_defineMethod (c$, "getBoolean", 
41323 function (key) {
41324 var value = this.get (key);
41325 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41326 }, "~O");
41327 Clazz_defineMethod (c$, "getBoolean", 
41328 function (key, l) {
41329 var value = this.get (key, l);
41330 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41331 }, "~O,java.util.Locale");
41332 Clazz_defineMethod (c$, "getInsets", 
41333 function (key) {
41334 var value = this.get (key);
41335 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41336 }, "~O");
41337 Clazz_defineMethod (c$, "getInsets", 
41338 function (key, l) {
41339 var value = this.get (key, l);
41340 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41341 }, "~O,java.util.Locale");
41342 Clazz_defineMethod (c$, "getDimension", 
41343 function (key) {
41344 var value = this.get (key);
41345 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41346 }, "~O");
41347 Clazz_defineMethod (c$, "getDimension", 
41348 function (key, l) {
41349 var value = this.get (key, l);
41350 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41351 }, "~O,java.util.Locale");
41352 Clazz_defineMethod (c$, "getUIClass", 
41353 function (uiClassID, uiClassLoader) {
41354 try {
41355 var className = this.get (uiClassID);
41356 if (className != null) {
41357 var cls = this.get (className);
41358 if (cls == null) {
41359 if (uiClassLoader == null) {
41360 cls = javax.swing.SwingUtilities.loadSystemClass (className);
41361 } else {
41362 cls = uiClassLoader.loadClass (className);
41363 }if (cls != null) {
41364 this.put (className, cls);
41365 }}return cls;
41366 }} catch (e$$) {
41367 if (Clazz_exceptionOf (e$$, ClassNotFoundException)) {
41368 var e = e$$;
41369 {
41370 return null;
41371 }
41372 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
41373 var e = e$$;
41374 {
41375 return null;
41376 }
41377 } else {
41378 throw e$$;
41379 }
41380 }
41381 return null;
41382 }, "~S,ClassLoader");
41383 Clazz_defineMethod (c$, "getUIClass", 
41384 function (uiClassID) {
41385 return this.getUIClass (uiClassID, null);
41386 }, "~S");
41387 Clazz_defineMethod (c$, "getUIError", 
41388 function (msg) {
41389 System.err.println ("UIDefaults.getUI() failed: " + msg);
41390 try {
41391 throw  new Error ();
41392 } catch (e) {
41393 e.printStackTrace ();
41394 }
41395 }, "~S");
41396 Clazz_defineMethod (c$, "getUI", 
41397 function (target) {
41398 return swingjs.JSToolkit.getComponentUI (target);
41399 }, "javax.swing.JComponent");
41400 Clazz_defineMethod (c$, "addPropertyChangeListener", 
41401 function (listener) {
41402 if (this.changeSupport == null) {
41403 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
41404 }this.changeSupport.addPropertyChangeListener (listener);
41405 }, "java.beans.PropertyChangeListener");
41406 Clazz_defineMethod (c$, "removePropertyChangeListener", 
41407 function (listener) {
41408 if (this.changeSupport != null) {
41409 this.changeSupport.removePropertyChangeListener (listener);
41410 }}, "java.beans.PropertyChangeListener");
41411 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41412 function () {
41413 if (this.changeSupport == null) {
41414 return  new Array (0);
41415 }return this.changeSupport.getPropertyChangeListeners ();
41416 });
41417 Clazz_defineMethod (c$, "firePropertyChange", 
41418 function (propertyName, oldValue, newValue) {
41419 if (this.changeSupport != null) {
41420 this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
41421 }}, "~S,~O,~O");
41422 Clazz_defineMethod (c$, "addResourceBundle", 
41423 function (bundleName) {
41424 if (bundleName == null) {
41425 return;
41426 }if (this.resourceBundles == null) {
41427 this.resourceBundles =  new java.util.Vector (5);
41428 }if (!this.resourceBundles.contains (bundleName)) {
41429 this.resourceBundles.add (bundleName);
41430 this.resourceCache.clear ();
41431 }}, "~S");
41432 Clazz_defineMethod (c$, "removeResourceBundle", 
41433 function (bundleName) {
41434 if (this.resourceBundles != null) {
41435 this.resourceBundles.remove (bundleName);
41436 }this.resourceCache.clear ();
41437 }, "~S");
41438 Clazz_defineMethod (c$, "setDefaultLocale", 
41439 function (l) {
41440 this.defaultLocale = l;
41441 }, "java.util.Locale");
41442 Clazz_defineMethod (c$, "getDefaultLocale", 
41443 function () {
41444 return this.defaultLocale;
41445 });
41446 Clazz_declareInterface (javax.swing.UIDefaults, "LazyValue");
41447 Clazz_declareInterface (javax.swing.UIDefaults, "ActiveValue");
41448 c$.PENDING = c$.prototype.PENDING =  String.instantialize ("Pending");
41449 });
41450 Clazz_declarePackage ("javax.swing");
41451 Clazz_load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () {
41452 c$ = Clazz_declareType (javax.swing, "LookAndFeel");
41453 c$.installColors = Clazz_defineMethod (c$, "installColors", 
41454 function (c, defaultBgName, defaultFgName) {
41455 var bg = c.getBackground ();
41456 if (bg == null || Clazz_instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName));
41457 var fg = c.getForeground ();
41458 if (fg == null || Clazz_instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName));
41459 }, "javax.swing.JComponent,~S,~S");
41460 c$.installColorsAndFont = Clazz_defineMethod (c$, "installColorsAndFont", 
41461 function (c, defaultBgName, defaultFgName, defaultFontName) {
41462 var f = c.getFont ();
41463 if (f == null || Clazz_instanceOf (f, javax.swing.plaf.UIResource)) {
41464 c.setFont (javax.swing.UIManager.getFont (defaultFontName));
41465 }javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName);
41466 }, "javax.swing.JComponent,~S,~S,~S");
41467 c$.installBorder = Clazz_defineMethod (c$, "installBorder", 
41468 function (c, defaultBorderName) {
41469 swingjs.JSToolkit.notImplemented (null);
41470 }, "javax.swing.JComponent,~S");
41471 c$.uninstallBorder = Clazz_defineMethod (c$, "uninstallBorder", 
41472 function (c) {
41473 swingjs.JSToolkit.notImplemented (null);
41474 }, "javax.swing.JComponent");
41475 c$.installProperty = Clazz_defineMethod (c$, "installProperty", 
41476 function (c, propertyName, propertyValue) {
41477 if (Clazz_instanceOf (c, javax.swing.JPasswordField)) {
41478 if (!(c).customSetUIProperty (propertyName, propertyValue)) {
41479 c.setUIProperty (propertyName, propertyValue);
41480 }} else {
41481 c.setUIProperty (propertyName, propertyValue);
41482 }}, "javax.swing.JComponent,~S,~O");
41483 c$.makeKeyBindings = Clazz_defineMethod (c$, "makeKeyBindings", 
41484 function (keyBindingList) {
41485 swingjs.JSToolkit.notImplemented (null);
41486 return null;
41487 }, "~A");
41488 c$.makeInputMap = Clazz_defineMethod (c$, "makeInputMap", 
41489 function (keys) {
41490 swingjs.JSToolkit.notImplemented (null);
41491 return null;
41492 }, "~A");
41493 c$.makeComponentInputMap = Clazz_defineMethod (c$, "makeComponentInputMap", 
41494 function (c, keys) {
41495 swingjs.JSToolkit.notImplemented (null);
41496 return null;
41497 }, "javax.swing.JComponent,~A");
41498 c$.loadKeyBindings = Clazz_defineMethod (c$, "loadKeyBindings", 
41499 function (retMap, keys) {
41500 swingjs.JSToolkit.notImplemented (null);
41501 }, "javax.swing.InputMap,~A");
41502 c$.makeIcon = Clazz_defineMethod (c$, "makeIcon", 
41503 function (baseClass, gifFile) {
41504 swingjs.JSToolkit.notImplemented (null);
41505 return null;
41506 }, "Class,~S");
41507 Clazz_defineMethod (c$, "getLayoutStyle", 
41508 function () {
41509 return jssun.swing.DefaultLayoutStyle.getInstance ();
41510 });
41511 Clazz_defineMethod (c$, "provideErrorFeedback", 
41512 function (component) {
41513 swingjs.JSToolkit.notImplemented (null);
41514 }, "java.awt.Component");
41515 c$.getDesktopPropertyValue = Clazz_defineMethod (c$, "getDesktopPropertyValue", 
41516 function (systemPropertyName, fallbackValue) {
41517 swingjs.JSToolkit.notImplemented (null);
41518 return fallbackValue;
41519 }, "~S,~O");
41520 Clazz_defineMethod (c$, "getDisabledIcon", 
41521 function (component, icon) {
41522 swingjs.JSToolkit.notImplemented (null);
41523 return null;
41524 }, "javax.swing.JComponent,javax.swing.Icon");
41525 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
41526 function (component, icon) {
41527 return this.getDisabledIcon (component, icon);
41528 }, "javax.swing.JComponent,javax.swing.Icon");
41529 Clazz_defineMethod (c$, "getSupportsWindowDecorations", 
41530 function () {
41531 return false;
41532 });
41533 Clazz_defineMethod (c$, "initialize", 
41534 function () {
41535 });
41536 Clazz_defineMethod (c$, "uninitialize", 
41537 function () {
41538 });
41539 Clazz_defineMethod (c$, "getDefaults", 
41540 function () {
41541 return null;
41542 });
41543 Clazz_overrideMethod (c$, "toString", 
41544 function () {
41545 return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]";
41546 });
41547 });
41548 Clazz_declarePackage ("javax.swing");
41549 Clazz_load (["java.lang.Enum"], "javax.swing.DropMode", null, function () {
41550 c$ = Clazz_declareType (javax.swing, "DropMode", Enum);
41551 Clazz_defineEnumConstant (c$, "USE_SELECTION", 0, []);
41552 Clazz_defineEnumConstant (c$, "ON", 1, []);
41553 Clazz_defineEnumConstant (c$, "INSERT", 2, []);
41554 Clazz_defineEnumConstant (c$, "INSERT_ROWS", 3, []);
41555 Clazz_defineEnumConstant (c$, "INSERT_COLS", 4, []);
41556 Clazz_defineEnumConstant (c$, "ON_OR_INSERT", 5, []);
41557 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_ROWS", 6, []);
41558 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_COLS", 7, []);
41559 });
41560 Clazz_declarePackage ("java.awt.font");
41561 Clazz_load (null, "java.awt.font.FontRenderContext", ["java.awt.RenderingHints", "java.awt.geom.AffineTransform"], function () {
41562 c$ = Clazz_decorateAsClass (function () {
41563 this.tx = null;
41564 this.aaHintValue = null;
41565 this.fmHintValue = null;
41566 this.defaulting = false;
41567 Clazz_instantialize (this, arguments);
41568 }, java.awt.font, "FontRenderContext");
41569 Clazz_makeConstructor (c$, 
41570 function () {
41571 this.defaulting = true;
41572 });
41573 Clazz_makeConstructor (c$, 
41574 function (tx, isAntiAliased, usesFractionalMetrics) {
41575 if (tx != null && !tx.isIdentity ()) {
41576 this.tx =  new java.awt.geom.AffineTransform (tx);
41577 }}, "java.awt.geom.AffineTransform,~B,~B");
41578 Clazz_makeConstructor (c$, 
41579 function (tx, aaHint, fmHint) {
41580 if (tx != null && !tx.isIdentity ()) {
41581 this.tx =  new java.awt.geom.AffineTransform (tx);
41582 }this.aaHintValue = aaHint;
41583 this.fmHintValue = fmHint;
41584 }, "java.awt.geom.AffineTransform,~O,~O");
41585 Clazz_defineMethod (c$, "isTransformed", 
41586 function () {
41587 if (!this.defaulting) {
41588 return this.tx != null;
41589 } else {
41590 return !this.getTransform ().isIdentity ();
41591 }});
41592 Clazz_defineMethod (c$, "getTransformType", 
41593 function () {
41594 if (!this.defaulting) {
41595 if (this.tx == null) {
41596 return 0;
41597 } else {
41598 return this.tx.getType ();
41599 }} else {
41600 return this.getTransform ().getType ();
41601 }});
41602 Clazz_defineMethod (c$, "getTransform", 
41603 function () {
41604 return (this.tx == null) ?  new java.awt.geom.AffineTransform () :  new java.awt.geom.AffineTransform (this.tx);
41605 });
41606 Clazz_defineMethod (c$, "isAntiAliased", 
41607 function () {
41608 return !(this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF || this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
41609 });
41610 Clazz_defineMethod (c$, "usesFractionalMetrics", 
41611 function () {
41612 return !(this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF || this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT);
41613 });
41614 Clazz_defineMethod (c$, "getAntiAliasingHint", 
41615 function () {
41616 if (this.defaulting) {
41617 if (this.isAntiAliased ()) {
41618 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON;
41619 } else {
41620 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF;
41621 }}return this.aaHintValue;
41622 });
41623 Clazz_defineMethod (c$, "getFractionalMetricsHint", 
41624 function () {
41625 if (this.defaulting) {
41626 if (this.usesFractionalMetrics ()) {
41627 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_ON;
41628 } else {
41629 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF;
41630 }}return this.fmHintValue;
41631 });
41632 Clazz_defineMethod (c$, "equals", 
41633 function (obj) {
41634 try {
41635 return this.equals (obj);
41636 } catch (e) {
41637 if (Clazz_exceptionOf (e, ClassCastException)) {
41638 return false;
41639 } else {
41640 throw e;
41641 }
41642 }
41643 }, "~O");
41644 Clazz_defineMethod (c$, "equals", 
41645 function (rhs) {
41646 if (this === rhs) {
41647 return true;
41648 }if (rhs == null) {
41649 return false;
41650 }if (!rhs.defaulting && !this.defaulting) {
41651 if (rhs.aaHintValue === this.aaHintValue && rhs.fmHintValue === this.fmHintValue) {
41652 return this.tx == null ? rhs.tx == null : this.tx.equals (rhs.tx);
41653 }return false;
41654 } else {
41655 return rhs.getAntiAliasingHint () === this.getAntiAliasingHint () && rhs.getFractionalMetricsHint () === this.getFractionalMetricsHint () && rhs.getTransform ().equals (this.getTransform ());
41656 }}, "java.awt.font.FontRenderContext");
41657 Clazz_defineMethod (c$, "hashCode", 
41658 function () {
41659 var hash = this.tx == null ? 0 : this.tx.hashCode ();
41660 if (this.defaulting) {
41661 hash += this.getAntiAliasingHint ().hashCode ();
41662 hash += this.getFractionalMetricsHint ().hashCode ();
41663 } else {
41664 hash += this.aaHintValue.hashCode ();
41665 hash += this.fmHintValue.hashCode ();
41666 }return hash;
41667 });
41668 });
41669 Clazz_declarePackage ("java.awt.event");
41670 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.InputMethodEvent", null, function () {
41671 c$ = Clazz_decorateAsClass (function () {
41672 this.when = 0;
41673 this.text = null;
41674 this.committedCharacterCount = 0;
41675 Clazz_instantialize (this, arguments);
41676 }, java.awt.event, "InputMethodEvent", java.awt.AWTEvent);
41677 Clazz_defineMethod (c$, "getText", 
41678 function () {
41679 return this.text;
41680 });
41681 Clazz_defineMethod (c$, "getCommittedCharacterCount", 
41682 function () {
41683 return this.committedCharacterCount;
41684 });
41685 Clazz_defineMethod (c$, "getWhen", 
41686 function () {
41687 return this.when;
41688 });
41689 Clazz_defineStatics (c$,
41690 "INPUT_METHOD_FIRST", 1100,
41691 "INPUT_METHOD_TEXT_CHANGED", 1100,
41692 "CARET_POSITION_CHANGED", 1101,
41693 "INPUT_METHOD_LAST", 1101);
41694 });
41695 Clazz_declarePackage ("javax.swing");
41696 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 () {
41697 c$ = Clazz_decorateAsClass (function () {
41698 this.isViewSizeSet = false;
41699 this.lastPaintPosition = null;
41700 this.backingStore = false;
41701 this.backingStoreImage = null;
41702 this.scrollUnderway = false;
41703 this.viewListener = null;
41704 this.changeEvent = null;
41705 this.scrollMode = 1;
41706 this.repaintAll = false;
41707 this.waitingForRepaint = false;
41708 this.inBlitPaint = false;
41709 this.hasHadValidView = false;
41710 if (!Clazz_isClassDefined ("javax.swing.JViewport.ViewListener")) {
41711 javax.swing.JViewport.$JViewport$ViewListener$ ();
41712 }
41713 Clazz_instantialize (this, arguments);
41714 }, javax.swing, "JViewport", javax.swing.JComponent);
41715 Clazz_makeConstructor (c$, 
41716 function () {
41717 Clazz_superConstructor (this, javax.swing.JViewport);
41718 this.setLayout (this.createLayoutManager ());
41719 this.setOpaque (true);
41720 this.updateUI ();
41721 this.setInheritsPopupMenu (true);
41722 });
41723 Clazz_overrideMethod (c$, "getUI", 
41724 function () {
41725 return this.ui;
41726 });
41727 Clazz_overrideMethod (c$, "updateUI", 
41728 function () {
41729 this.setUI (javax.swing.UIManager.getUI (this));
41730 });
41731 Clazz_overrideMethod (c$, "getUIClassID", 
41732 function () {
41733 return "ViewportUI";
41734 });
41735 Clazz_overrideMethod (c$, "addImpl", 
41736 function (child, constraints, index) {
41737 this.setView (child);
41738 return child;
41739 }, "java.awt.Component,~O,~N");
41740 Clazz_defineMethod (c$, "remove", 
41741 function (child) {
41742 child.removeComponentListener (this.viewListener);
41743 this.removeChild (child);
41744 }, "java.awt.Component");
41745 Clazz_overrideMethod (c$, "scrollRectToVisible", 
41746 function (contentRect) {
41747 var view = this.getView ();
41748 if (view == null) {
41749 return;
41750 } else {
41751 if (!view.isValid ()) {
41752 this.validateView ();
41753 }var dx = 0;
41754 var dy = 0;
41755 dx = this.positionAdjustment (this.getWidth (), contentRect.width, contentRect.x);
41756 dy = this.positionAdjustment (this.getHeight (), contentRect.height, contentRect.y);
41757 if (dx != 0 || dy != 0) {
41758 var viewPosition = this.getViewPosition ();
41759 var viewSize = view.getSize ();
41760 var startX = viewPosition.x;
41761 var startY = viewPosition.y;
41762 var extent = this.getExtentSize ();
41763 viewPosition.x -= dx;
41764 viewPosition.y -= dy;
41765 if (view.isValid ()) {
41766 if (this.getParent ().getComponentOrientation ().isLeftToRight ()) {
41767 if (viewPosition.x + extent.width > viewSize.width) {
41768 viewPosition.x = Math.max (0, viewSize.width - extent.width);
41769 } else if (viewPosition.x < 0) {
41770 viewPosition.x = 0;
41771 }} else {
41772 if (extent.width > viewSize.width) {
41773 viewPosition.x = viewSize.width - extent.width;
41774 } else {
41775 viewPosition.x = Math.max (0, Math.min (viewSize.width - extent.width, viewPosition.x));
41776 }}if (viewPosition.y + extent.height > viewSize.height) {
41777 viewPosition.y = Math.max (0, viewSize.height - extent.height);
41778 } else if (viewPosition.y < 0) {
41779 viewPosition.y = 0;
41780 }}if (viewPosition.x != startX || viewPosition.y != startY) {
41781 this.setViewPosition (viewPosition);
41782 this.scrollUnderway = false;
41783 }}}}, "java.awt.Rectangle");
41784 Clazz_defineMethod (c$, "validateView", 
41785  function () {
41786 var validateRoot = null;
41787 for (var c = this; c != null; c = c.getParent ()) {
41788 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane)) || !c.isLightweight ()) {
41789 return;
41790 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
41791 validateRoot = c;
41792 break;
41793 }}
41794 if (validateRoot == null) {
41795 return;
41796 }var root = null;
41797 for (var c = validateRoot; c != null; c = c.getParent ()) {
41798 if (!c.isLightweight ()) {
41799 return;
41800 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
41801 root = c;
41802 break;
41803 }}
41804 if (root == null) {
41805 return;
41806 }validateRoot.validate ();
41807 var rm = javax.swing.RepaintManager.currentManager (this);
41808 if (rm != null) {
41809 rm.removeInvalidComponent (validateRoot);
41810 }});
41811 Clazz_defineMethod (c$, "positionAdjustment", 
41812  function (parentWidth, childWidth, childAt) {
41813 if (childAt >= 0 && childWidth + childAt <= parentWidth) {
41814 return 0;
41815 }if (childAt <= 0 && childWidth + childAt >= parentWidth) {
41816 return 0;
41817 }if (childAt > 0 && childWidth <= parentWidth) {
41818 return -childAt + parentWidth - childWidth;
41819 }if (childAt >= 0 && childWidth >= parentWidth) {
41820 return -childAt;
41821 }if (childAt <= 0 && childWidth <= parentWidth) {
41822 return -childAt;
41823 }if (childAt < 0 && childWidth >= parentWidth) {
41824 return -childAt + parentWidth - childWidth;
41825 }return 0;
41826 }, "~N,~N,~N");
41827 Clazz_overrideMethod (c$, "setBorder", 
41828 function (border) {
41829 if (border != null) {
41830 throw  new IllegalArgumentException ("JViewport.setBorder() not supported");
41831 }}, "javax.swing.border.Border");
41832 Clazz_defineMethod (c$, "getInsets", 
41833 function () {
41834 return  new java.awt.Insets (0, 0, 0, 0);
41835 });
41836 Clazz_defineMethod (c$, "getInsets", 
41837 function (insets) {
41838 insets.left = insets.top = insets.right = insets.bottom = 0;
41839 return insets;
41840 }, "java.awt.Insets");
41841 Clazz_defineMethod (c$, "getBackingStoreGraphics", 
41842  function (g) {
41843 var bsg = this.backingStoreImage.getGraphics ();
41844 bsg.setColor (g.getColor ());
41845 bsg.setFont (g.getFont ());
41846 bsg.setClip (g.getClipBounds ());
41847 return bsg;
41848 }, "java.awt.Graphics");
41849 Clazz_defineMethod (c$, "paintViaBackingStore", 
41850  function (g) {
41851 var bsg = this.getBackingStoreGraphics (g);
41852 try {
41853 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41854 g.drawImage (this.backingStoreImage, 0, 0, this);
41855 } finally {
41856 bsg.dispose ();
41857 }
41858 }, "java.awt.Graphics");
41859 Clazz_defineMethod (c$, "paintViaBackingStore", 
41860  function (g, oClip) {
41861 var bsg = this.getBackingStoreGraphics (g);
41862 try {
41863 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41864 g.setClip (oClip);
41865 g.drawImage (this.backingStoreImage, 0, 0, this);
41866 } finally {
41867 bsg.dispose ();
41868 }
41869 }, "java.awt.Graphics,java.awt.Rectangle");
41870 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
41871 function () {
41872 return false;
41873 });
41874 Clazz_overrideMethod (c$, "isPaintingOrigin", 
41875 function () {
41876 if (this.scrollMode == 2) {
41877 return true;
41878 }return false;
41879 });
41880 Clazz_defineMethod (c$, "getViewLocation", 
41881  function () {
41882 var view = this.getView ();
41883 if (view != null) {
41884 return view.getLocation ();
41885 } else {
41886 return  new java.awt.Point (0, 0);
41887 }});
41888 Clazz_defineMethod (c$, "paint", 
41889 function (g) {
41890 var width = this.getWidth ();
41891 var height = this.getHeight ();
41892 if ((width <= 0) || (height <= 0)) {
41893 return;
41894 }if (this.inBlitPaint) {
41895 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
41896 return;
41897 }if (this.repaintAll) {
41898 this.repaintAll = false;
41899 var clipB = g.getClipBounds ();
41900 } else if (this.waitingForRepaint) {
41901 var clipB = g.getClipBounds ();
41902 if (clipB.width >= this.getWidth () && clipB.height >= this.getHeight ()) {
41903 this.waitingForRepaint = false;
41904 }}if (!this.backingStore || this.isBlitting () || this.getView () == null) {
41905 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
41906 this.lastPaintPosition = this.getViewLocation ();
41907 return;
41908 }var viewBounds = this.getView ().getBounds ();
41909 if (!this.isOpaque ()) {
41910 g.clipRect (0, 0, viewBounds.width, viewBounds.height);
41911 }if (this.backingStoreImage == null) {
41912 this.backingStoreImage = this.createImage (width, height);
41913 var clip = g.getClipBounds ();
41914 if (clip.width != width || clip.height != height) {
41915 if (!this.isOpaque ()) {
41916 g.setClip (0, 0, Math.min (viewBounds.width, width), Math.min (viewBounds.height, height));
41917 } else {
41918 g.setClip (0, 0, width, height);
41919 }this.paintViaBackingStore (g, clip);
41920 } else {
41921 this.paintViaBackingStore (g);
41922 }} else {
41923 if (!this.scrollUnderway || this.lastPaintPosition.equals (this.getViewLocation ())) {
41924 this.paintViaBackingStore (g);
41925 } else {
41926 var blitFrom =  new java.awt.Point ();
41927 var blitTo =  new java.awt.Point ();
41928 var blitSize =  new java.awt.Dimension ();
41929 var blitPaint =  new java.awt.Rectangle ();
41930 var newLocation = this.getViewLocation ();
41931 var dx = newLocation.x - this.lastPaintPosition.x;
41932 var dy = newLocation.y - this.lastPaintPosition.y;
41933 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
41934 if (!canBlit) {
41935 this.paintViaBackingStore (g);
41936 } else {
41937 var bdx = blitTo.x - blitFrom.x;
41938 var bdy = blitTo.y - blitFrom.y;
41939 var clip = g.getClipBounds ();
41940 g.setClip (0, 0, width, height);
41941 var bsg = this.getBackingStoreGraphics (g);
41942 try {
41943 bsg.copyArea (blitFrom.x, blitFrom.y, blitSize.width, blitSize.height, bdx, bdy);
41944 g.setClip (clip.x, clip.y, clip.width, clip.height);
41945 var r = viewBounds.intersection (blitPaint);
41946 bsg.setClip (r);
41947 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41948 g.drawImage (this.backingStoreImage, 0, 0, this);
41949 } finally {
41950 bsg.dispose ();
41951 }
41952 }}}this.lastPaintPosition = this.getViewLocation ();
41953 this.scrollUnderway = false;
41954 }, "java.awt.Graphics");
41955 Clazz_defineMethod (c$, "reshape", 
41956 function (x, y, w, h) {
41957 var sizeChanged = (this.getWidth () != w) || (this.getHeight () != h);
41958 if (sizeChanged) {
41959 this.backingStoreImage = null;
41960 }Clazz_superCall (this, javax.swing.JViewport, "reshape", [x, y, w, h]);
41961 if (sizeChanged) {
41962 this.fireStateChanged ();
41963 }}, "~N,~N,~N,~N");
41964 Clazz_defineMethod (c$, "setScrollMode", 
41965 function (mode) {
41966 this.scrollMode = mode;
41967 if (mode == 2) {
41968 this.backingStore = true;
41969 } else {
41970 this.backingStore = false;
41971 }}, "~N");
41972 Clazz_defineMethod (c$, "getScrollMode", 
41973 function () {
41974 return this.scrollMode;
41975 });
41976 Clazz_defineMethod (c$, "isBackingStoreEnabled", 
41977 function () {
41978 return this.scrollMode == 2;
41979 });
41980 Clazz_defineMethod (c$, "setBackingStoreEnabled", 
41981 function (enabled) {
41982 if (enabled) {
41983 this.setScrollMode (2);
41984 } else {
41985 this.setScrollMode (1);
41986 }}, "~B");
41987 Clazz_defineMethod (c$, "isBlitting", 
41988  function () {
41989 var view = this.getView ();
41990 return (this.scrollMode == 1) && (Clazz_instanceOf (view, javax.swing.JComponent)) && (view).isOpaque ();
41991 });
41992 Clazz_defineMethod (c$, "getView", 
41993 function () {
41994 return (this.getComponentCount () > 0) ? this.getComponent (0) : null;
41995 });
41996 Clazz_defineMethod (c$, "setView", 
41997 function (view) {
41998 var n = this.getComponentCount ();
41999 for (var i = n - 1; i >= 0; i--) {
42000 this.remove (this.getComponent (i));
42001 }
42002 this.isViewSizeSet = false;
42003 if (view != null) {
42004 this.addImplSAEM (view, null, -1);
42005 this.viewListener = this.createViewListener ();
42006 view.addComponentListener (this.viewListener);
42007 }if (this.hasHadValidView) {
42008 this.fireStateChanged ();
42009 } else if (view != null) {
42010 this.hasHadValidView = true;
42011 }this.revalidate ();
42012 this.repaint ();
42013 }, "java.awt.Component");
42014 Clazz_defineMethod (c$, "getViewSize", 
42015 function () {
42016 var view = this.getView ();
42017 if (view == null) {
42018 return  new java.awt.Dimension (0, 0);
42019 } else if (this.isViewSizeSet) {
42020 return view.getSize ();
42021 } else {
42022 return view.getPreferredSize ();
42023 }});
42024 Clazz_defineMethod (c$, "setViewSize", 
42025 function (newSize) {
42026 var view = this.getView ();
42027 if (view != null) {
42028 var oldSize = view.getSize ();
42029 if (!newSize.equals (oldSize)) {
42030 this.scrollUnderway = false;
42031 view.setSize (newSize);
42032 this.isViewSizeSet = true;
42033 this.fireStateChanged ();
42034 }}}, "java.awt.Dimension");
42035 Clazz_defineMethod (c$, "getViewPosition", 
42036 function () {
42037 var view = this.getView ();
42038 if (view != null) {
42039 var p = view.getLocation ();
42040 p.x = -p.x;
42041 p.y = -p.y;
42042 return p;
42043 } else {
42044 return  new java.awt.Point (0, 0);
42045 }});
42046 Clazz_defineMethod (c$, "setViewPosition", 
42047 function (p) {
42048 var view = this.getView ();
42049 if (view == null) {
42050 return;
42051 }var oldX;
42052 var oldY;
42053 var x = p.x;
42054 var y = p.y;
42055 if (Clazz_instanceOf (view, javax.swing.JComponent)) {
42056 var c = view;
42057 oldX = c.getX ();
42058 oldY = c.getY ();
42059 } else {
42060 var r = view.getBounds ();
42061 oldX = r.x;
42062 oldY = r.y;
42063 }var newX = -x;
42064 var newY = -y;
42065 if ((oldX != newX) || (oldY != newY)) {
42066 if (!this.waitingForRepaint && this.isBlitting () && this.canUseWindowBlitter ()) {
42067 var rm = javax.swing.RepaintManager.currentManager (this);
42068 var jview = view;
42069 var dirty = rm.getDirtyRegion (jview);
42070 if (dirty == null || !dirty.contains (jview.getVisibleRect ())) {
42071 rm.beginPaint ();
42072 try {
42073 var g = javax.swing.JComponent.safelyGetGraphics (this, javax.swing.SwingUtilities.getRoot (this));
42074 this.flushViewDirtyRegion (g, dirty);
42075 view.setLocation (newX, newY);
42076 g.setClip (0, 0, this.getWidth (), Math.min (this.getHeight (), jview.getHeight ()));
42077 this.repaintAll = (this.windowBlitPaint (g) && this.needsRepaintAfterBlit ());
42078 g.dispose ();
42079 rm.markCompletelyClean (this.getParent ());
42080 rm.markCompletelyClean (this);
42081 rm.markCompletelyClean (jview);
42082 } finally {
42083 rm.endPaint ();
42084 }
42085 } else {
42086 view.setLocation (newX, newY);
42087 this.repaintAll = false;
42088 }} else {
42089 this.scrollUnderway = true;
42090 view.setLocation (newX, newY);
42091 this.repaintAll = false;
42092 }this.fireStateChanged ();
42093 }}, "java.awt.Point");
42094 Clazz_defineMethod (c$, "getViewRect", 
42095 function () {
42096 return  new java.awt.Rectangle (this.getViewPosition (), this.getExtentSize ());
42097 });
42098 Clazz_defineMethod (c$, "computeBlit", 
42099 function (dx, dy, blitFrom, blitTo, blitSize, blitPaint) {
42100 var dxAbs = Math.abs (dx);
42101 var dyAbs = Math.abs (dy);
42102 var extentSize = this.getExtentSize ();
42103 if ((dx == 0) && (dy != 0) && (dyAbs < extentSize.height)) {
42104 if (dy < 0) {
42105 blitFrom.y = -dy;
42106 blitTo.y = 0;
42107 blitPaint.y = extentSize.height + dy;
42108 } else {
42109 blitFrom.y = 0;
42110 blitTo.y = dy;
42111 blitPaint.y = 0;
42112 }blitPaint.x = blitFrom.x = blitTo.x = 0;
42113 blitSize.width = extentSize.width;
42114 blitSize.height = extentSize.height - dyAbs;
42115 blitPaint.width = extentSize.width;
42116 blitPaint.height = dyAbs;
42117 return true;
42118 } else if ((dy == 0) && (dx != 0) && (dxAbs < extentSize.width)) {
42119 if (dx < 0) {
42120 blitFrom.x = -dx;
42121 blitTo.x = 0;
42122 blitPaint.x = extentSize.width + dx;
42123 } else {
42124 blitFrom.x = 0;
42125 blitTo.x = dx;
42126 blitPaint.x = 0;
42127 }blitPaint.y = blitFrom.y = blitTo.y = 0;
42128 blitSize.width = extentSize.width - dxAbs;
42129 blitSize.height = extentSize.height;
42130 blitPaint.width = dxAbs;
42131 blitPaint.height = extentSize.height;
42132 return true;
42133 } else {
42134 return false;
42135 }}, "~N,~N,java.awt.Point,java.awt.Point,java.awt.Dimension,java.awt.Rectangle");
42136 Clazz_defineMethod (c$, "getExtentSize", 
42137 function () {
42138 return this.getSize ();
42139 });
42140 Clazz_defineMethod (c$, "toViewCoordinates", 
42141 function (size) {
42142 return  new java.awt.Dimension (size);
42143 }, "java.awt.Dimension");
42144 Clazz_defineMethod (c$, "toViewCoordinates", 
42145 function (p) {
42146 return  new java.awt.Point (p);
42147 }, "java.awt.Point");
42148 Clazz_defineMethod (c$, "setExtentSize", 
42149 function (newExtent) {
42150 var oldExtent = this.getExtentSize ();
42151 if (!newExtent.equals (oldExtent)) {
42152 this.setSize (newExtent);
42153 this.fireStateChanged ();
42154 }}, "java.awt.Dimension");
42155 Clazz_defineMethod (c$, "createViewListener", 
42156 function () {
42157 return Clazz_innerTypeInstance (javax.swing.JViewport.ViewListener, this, null);
42158 });
42159 Clazz_defineMethod (c$, "createLayoutManager", 
42160 function () {
42161 return javax.swing.ViewportLayout.SHARED_INSTANCE;
42162 });
42163 Clazz_defineMethod (c$, "addChangeListener", 
42164 function (l) {
42165 this.listenerList.add (javax.swing.event.ChangeListener, l);
42166 }, "javax.swing.event.ChangeListener");
42167 Clazz_defineMethod (c$, "removeChangeListener", 
42168 function (l) {
42169 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42170 }, "javax.swing.event.ChangeListener");
42171 Clazz_defineMethod (c$, "getChangeListeners", 
42172 function () {
42173 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42174 });
42175 Clazz_defineMethod (c$, "fireStateChanged", 
42176 function () {
42177 var listeners = this.listenerList.getListenerList ();
42178 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42179 if (listeners[i] === javax.swing.event.ChangeListener) {
42180 if (this.changeEvent == null) {
42181 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42182 }(listeners[i + 1]).stateChanged (this.changeEvent);
42183 }}
42184 });
42185 Clazz_defineMethod (c$, "repaint", 
42186 function (tm, x, y, w, h) {
42187 var parent = this.getParent ();
42188 if (parent != null) parent.repaint (tm, x + this.getX (), y + this.getY (), w, h);
42189  else Clazz_superCall (this, javax.swing.JViewport, "repaint", [tm, x, y, w, h]);
42190 }, "~N,~N,~N,~N,~N");
42191 Clazz_defineMethod (c$, "paramString", 
42192 function () {
42193 var isViewSizeSetString = (this.isViewSizeSet ? "true" : "false");
42194 var lastPaintPositionString = (this.lastPaintPosition != null ? this.lastPaintPosition.toString () : "");
42195 var scrollUnderwayString = (this.scrollUnderway ? "true" : "false");
42196 return Clazz_superCall (this, javax.swing.JViewport, "paramString", []) + ",isViewSizeSet=" + isViewSizeSetString + ",lastPaintPosition=" + lastPaintPositionString + ",scrollUnderway=" + scrollUnderwayString;
42197 });
42198 Clazz_defineMethod (c$, "firePropertyChangeObject", 
42199 function (propertyName, oldValue, newValue) {
42200 Clazz_superCall (this, javax.swing.JViewport, "firePropertyChangeObject", [propertyName, oldValue, newValue]);
42201 if (propertyName.equals (javax.swing.JViewport.EnableWindowBlit)) {
42202 if (newValue != null) {
42203 this.setScrollMode (1);
42204 } else {
42205 this.setScrollMode (0);
42206 }}}, "~S,~O,~O");
42207 Clazz_defineMethod (c$, "needsRepaintAfterBlit", 
42208  function () {
42209 var heavyParent = this.getParent ();
42210 while (heavyParent != null && heavyParent.isLightweight ()) {
42211 heavyParent = heavyParent.getParent ();
42212 }
42213 if (heavyParent != null) {
42214 }return true;
42215 });
42216 Clazz_defineMethod (c$, "flushViewDirtyRegion", 
42217  function (g, dirty) {
42218 var view = this.getView ();
42219 if (dirty != null && dirty.width > 0 && dirty.height > 0) {
42220 dirty.x += view.getX ();
42221 dirty.y += view.getY ();
42222 var clip = g.getClipBounds ();
42223 if (clip == null) {
42224 g.setClip (0, 0, this.getWidth (), this.getHeight ());
42225 }g.clipRect (dirty.x, dirty.y, dirty.width, dirty.height);
42226 clip = g.getClipBounds ();
42227 if (clip.width > 0 && clip.height > 0) {
42228 this.paintView (g);
42229 }}}, "java.awt.Graphics,java.awt.Rectangle");
42230 Clazz_defineMethod (c$, "windowBlitPaint", 
42231  function (g) {
42232 var width = this.getWidth ();
42233 var height = this.getHeight ();
42234 if ((width == 0) || (height == 0)) {
42235 return false;
42236 }var retValue;
42237 var rm = javax.swing.RepaintManager.currentManager (this);
42238 var view = this.getView ();
42239 if (this.lastPaintPosition == null || this.lastPaintPosition.equals (this.getViewLocation ())) {
42240 this.paintView (g);
42241 retValue = false;
42242 } else {
42243 var blitFrom =  new java.awt.Point ();
42244 var blitTo =  new java.awt.Point ();
42245 var blitSize =  new java.awt.Dimension ();
42246 var blitPaint =  new java.awt.Rectangle ();
42247 var newLocation = this.getViewLocation ();
42248 var dx = newLocation.x - this.lastPaintPosition.x;
42249 var dy = newLocation.y - this.lastPaintPosition.y;
42250 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
42251 if (!canBlit) {
42252 this.paintView (g);
42253 retValue = false;
42254 } else {
42255 var r = view.getBounds ().intersection (blitPaint);
42256 r.x -= view.getX ();
42257 r.y -= view.getY ();
42258 this.blitDoubleBuffered (view, g, r.x, r.y, r.width, r.height, blitFrom.x, blitFrom.y, blitTo.x, blitTo.y, blitSize.width, blitSize.height);
42259 retValue = true;
42260 }}this.lastPaintPosition = this.getViewLocation ();
42261 return retValue;
42262 }, "java.awt.Graphics");
42263 Clazz_defineMethod (c$, "blitDoubleBuffered", 
42264  function (view, g, clipX, clipY, clipW, clipH, blitFromX, blitFromY, blitToX, blitToY, blitW, blitH) {
42265 var rm = javax.swing.RepaintManager.currentManager (this);
42266 var bdx = blitToX - blitFromX;
42267 var bdy = blitToY - blitFromY;
42268 var x = view.getX ();
42269 var y = view.getY ();
42270 g.translate (x, y);
42271 g.setClip (clipX, clipY, clipW, clipH);
42272 view.paintForceDoubleBuffered (g);
42273 g.translate (-x, -y);
42274 }, "javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
42275 Clazz_defineMethod (c$, "paintView", 
42276  function (g) {
42277 var clip = g.getClipBounds ();
42278 var view = this.getView ();
42279 if (view.getWidth () >= this.getWidth ()) {
42280 var x = view.getX ();
42281 var y = view.getY ();
42282 g.translate (x, y);
42283 g.setClip (clip.x - x, clip.y - y, clip.width, clip.height);
42284 view.paintForceDoubleBuffered (g);
42285 g.translate (-x, -y);
42286 g.setClip (clip.x, clip.y, clip.width, clip.height);
42287 } else {
42288 try {
42289 this.inBlitPaint = true;
42290 this.paintForceDoubleBuffered (g);
42291 } finally {
42292 this.inBlitPaint = false;
42293 }
42294 }}, "java.awt.Graphics");
42295 Clazz_defineMethod (c$, "canUseWindowBlitter", 
42296  function () {
42297 if (!this.isShowing () || (!(Clazz_instanceOf (this.getParent (), javax.swing.JComponent)) && !(Clazz_instanceOf (this.getView (), javax.swing.JComponent)))) {
42298 return false;
42299 }if (this.isPainting ()) {
42300 return false;
42301 }var dirtyRegion = javax.swing.RepaintManager.currentManager (this).getDirtyRegion (this.getParent ());
42302 if (dirtyRegion != null && dirtyRegion.width > 0 && dirtyRegion.height > 0) {
42303 return false;
42304 }var clip =  new java.awt.Rectangle (0, 0, this.getWidth (), this.getHeight ());
42305 var oldClip =  new java.awt.Rectangle ();
42306 var tmp2 = null;
42307 var parent;
42308 var lastParent = null;
42309 var x;
42310 var y;
42311 var w;
42312 var h;
42313 for (parent = this; parent != null && javax.swing.JComponent.isLightweightComponent (parent); parent = parent.getParent ()) {
42314 x = parent.getX ();
42315 y = parent.getY ();
42316 w = parent.getWidth ();
42317 h = parent.getHeight ();
42318 oldClip.setBounds (clip);
42319 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, clip);
42320 if (!clip.equals (oldClip)) return false;
42321 if (lastParent != null && Clazz_instanceOf (parent, javax.swing.JComponent) && !(parent).isOptimizedDrawingEnabled ()) {
42322 var comps = parent.getComponents ();
42323 var index = 0;
42324 for (var i = comps.length - 1; i >= 0; i--) {
42325 if (comps[i] === lastParent) {
42326 index = i - 1;
42327 break;
42328 }}
42329 while (index >= 0) {
42330 tmp2 = comps[index].getBounds (tmp2);
42331 if (tmp2.intersects (clip)) return false;
42332 index--;
42333 }
42334 }clip.x += x;
42335 clip.y += y;
42336 lastParent = parent;
42337 }
42338 if (parent == null) {
42339 return false;
42340 }return true;
42341 });
42342 c$.$JViewport$ViewListener$ = function () {
42343 Clazz_pu$h(self.c$);
42344 c$ = Clazz_decorateAsClass (function () {
42345 Clazz_prepareCallback (this, arguments);
42346 Clazz_instantialize (this, arguments);
42347 }, javax.swing.JViewport, "ViewListener", java.awt.event.ComponentAdapter);
42348 Clazz_overrideMethod (c$, "componentResized", 
42349 function (a) {
42350 this.b$["javax.swing.JViewport"].fireStateChanged ();
42351 this.b$["javax.swing.JViewport"].revalidate ();
42352 }, "java.awt.event.ComponentEvent");
42353 c$ = Clazz_p0p ();
42354 };
42355 Clazz_defineStatics (c$,
42356 "$uiClassID", "ViewportUI",
42357 "EnableWindowBlit", "EnableWindowBlit",
42358 "BLIT_SCROLL_MODE", 1,
42359 "BACKINGSTORE_SCROLL_MODE", 2,
42360 "SIMPLE_SCROLL_MODE", 0);
42361 });
42362 Clazz_declarePackage ("java.awt.event");
42363 Clazz_load (["java.awt.event.ComponentListener"], "java.awt.event.ComponentAdapter", null, function () {
42364 c$ = Clazz_declareType (java.awt.event, "ComponentAdapter", null, java.awt.event.ComponentListener);
42365 Clazz_overrideMethod (c$, "componentResized", 
42366 function (e) {
42367 }, "java.awt.event.ComponentEvent");
42368 Clazz_overrideMethod (c$, "componentMoved", 
42369 function (e) {
42370 }, "java.awt.event.ComponentEvent");
42371 Clazz_overrideMethod (c$, "componentShown", 
42372 function (e) {
42373 }, "java.awt.event.ComponentEvent");
42374 Clazz_overrideMethod (c$, "componentHidden", 
42375 function (e) {
42376 }, "java.awt.event.ComponentEvent");
42377 });
42378 Clazz_declarePackage ("javax.swing");
42379 Clazz_load (["java.awt.Container"], "javax.swing.CellRendererPane", null, function () {
42380 c$ = Clazz_declareType (javax.swing, "CellRendererPane", java.awt.Container);
42381 Clazz_makeConstructor (c$, 
42382 function () {
42383 Clazz_superConstructor (this, javax.swing.CellRendererPane);
42384 this.setLayout (null);
42385 this.setVisible (false);
42386 });
42387 Clazz_overrideMethod (c$, "invalidate", 
42388 function () {
42389 });
42390 Clazz_overrideMethod (c$, "paint", 
42391 function (g) {
42392 }, "java.awt.Graphics");
42393 Clazz_overrideMethod (c$, "update", 
42394 function (g) {
42395 }, "java.awt.Graphics");
42396 Clazz_overrideMethod (c$, "addImpl", 
42397 function (x, constraints, index) {
42398 if (x.getParent () === this) {
42399 return null;
42400 } else {
42401 return this.addImplSAEM (x, constraints, index);
42402 }}, "java.awt.Component,~O,~N");
42403 Clazz_defineMethod (c$, "paintComponent", 
42404 function (g, c, p, x, y, w, h, shouldValidate) {
42405 if (c == null) {
42406 if (p != null) {
42407 var oldColor = g.getColor ();
42408 g.setColor (p.getBackground ());
42409 g.fillRect (x, y, w, h);
42410 g.setColor (oldColor);
42411 }return;
42412 }if (c.getParent () !== this) {
42413 this.add (c);
42414 }c.setBounds (x, y, w, h);
42415 if (shouldValidate) {
42416 c.validate ();
42417 }var cg = g.create4 (x, y, w, h);
42418 try {
42419 c.paint (cg);
42420 } finally {
42421 cg.dispose ();
42422 }
42423 c.setBounds (-w, -h, 0, 0);
42424 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N,~B");
42425 Clazz_defineMethod (c$, "paintComponent", 
42426 function (g, c, p, x, y, w, h) {
42427 this.paintComponent (g, c, p, x, y, w, h, false);
42428 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
42429 Clazz_defineMethod (c$, "paintComponent", 
42430 function (g, c, p, r) {
42431 this.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
42432 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
42433 });
42434 Clazz_declarePackage ("jssun.awt");
42435 c$ = Clazz_declareType (jssun.awt, "AWTAccessor");
42436 c$.setWindowAccessor = Clazz_defineMethod (c$, "setWindowAccessor", 
42437 function (wa) {
42438 jssun.awt.AWTAccessor.windowAccessor = wa;
42439 }, "jssun.awt.AWTAccessor.WindowAccessor");
42440 c$.getWindowAccessor = Clazz_defineMethod (c$, "getWindowAccessor", 
42441 function () {
42442 return jssun.awt.AWTAccessor.windowAccessor;
42443 });
42444 c$.setComponentAccessor = Clazz_defineMethod (c$, "setComponentAccessor", 
42445 function (ca) {
42446 jssun.awt.AWTAccessor.componentAccessor = ca;
42447 }, "jssun.awt.AWTAccessor.ComponentAccessor");
42448 c$.getComponentAccessor = Clazz_defineMethod (c$, "getComponentAccessor", 
42449 function () {
42450 return jssun.awt.AWTAccessor.componentAccessor;
42451 });
42452 c$.setAWTEventAccessor = Clazz_defineMethod (c$, "setAWTEventAccessor", 
42453 function (aea) {
42454 jssun.awt.AWTAccessor.awtEventAccessor = aea;
42455 }, "jssun.awt.AWTAccessor.AWTEventAccessor");
42456 c$.getAWTEventAccessor = Clazz_defineMethod (c$, "getAWTEventAccessor", 
42457 function () {
42458 return jssun.awt.AWTAccessor.awtEventAccessor;
42459 });
42460 c$.setEventQueueAccessor = Clazz_defineMethod (c$, "setEventQueueAccessor", 
42461 function (eqa) {
42462 jssun.awt.AWTAccessor.eventQueueAccessor = eqa;
42463 }, "jssun.awt.AWTAccessor.EventQueueAccessor");
42464 c$.getEventQueueAccessor = Clazz_defineMethod (c$, "getEventQueueAccessor", 
42465 function () {
42466 return jssun.awt.AWTAccessor.eventQueueAccessor;
42467 });
42468 Clazz_declareInterface (jssun.awt.AWTAccessor, "WindowAccessor");
42469 Clazz_declareInterface (jssun.awt.AWTAccessor, "ComponentAccessor");
42470 Clazz_declareInterface (jssun.awt.AWTAccessor, "KeyboardFocusManagerAccessor");
42471 Clazz_declareInterface (jssun.awt.AWTAccessor, "AWTEventAccessor");
42472 Clazz_declareInterface (jssun.awt.AWTAccessor, "EventQueueAccessor");
42473 Clazz_declareInterface (jssun.awt.AWTAccessor, "CursorAccessor");
42474 Clazz_declareInterface (jssun.awt.AWTAccessor, "ClientPropertyKeyAccessor");
42475 Clazz_defineStatics (c$,
42476 "componentAccessor", null,
42477 "windowAccessor", null,
42478 "awtEventAccessor", null,
42479 "eventQueueAccessor", null);
42480 Clazz_declarePackage ("javax.swing");
42481 Clazz_load (["java.awt.LayoutManager"], "javax.swing.ViewportLayout", ["java.awt.Dimension", "javax.swing.Scrollable"], function () {
42482 c$ = Clazz_declareType (javax.swing, "ViewportLayout", null, java.awt.LayoutManager);
42483 Clazz_overrideMethod (c$, "addLayoutComponent", 
42484 function (name, c) {
42485 }, "~S,java.awt.Component");
42486 Clazz_overrideMethod (c$, "removeLayoutComponent", 
42487 function (c) {
42488 }, "java.awt.Component");
42489 Clazz_overrideMethod (c$, "preferredLayoutSize", 
42490 function (parent) {
42491 var view = (parent).getView ();
42492 if (view == null) {
42493 return  new java.awt.Dimension (0, 0);
42494 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42495 return (view).getPreferredScrollableViewportSize ();
42496 } else {
42497 return view.getPreferredSize ();
42498 }}, "java.awt.Container");
42499 Clazz_overrideMethod (c$, "minimumLayoutSize", 
42500 function (parent) {
42501 return  new java.awt.Dimension (4, 4);
42502 }, "java.awt.Container");
42503 Clazz_overrideMethod (c$, "layoutContainer", 
42504 function (parent) {
42505 var vp = parent;
42506 var view = vp.getView ();
42507 var scrollableView = null;
42508 if (view == null) {
42509 return;
42510 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42511 scrollableView = view;
42512 }var insets = vp.getInsets ();
42513 var viewPrefSize = view.getPreferredSize ();
42514 var vpSize = vp.getSize ();
42515 var extentSize = vp.toViewCoordinates (vpSize);
42516 var viewSize =  new java.awt.Dimension (viewPrefSize);
42517 if (scrollableView != null) {
42518 if (scrollableView.getScrollableTracksViewportWidth ()) {
42519 viewSize.width = vpSize.width;
42520 }if (scrollableView.getScrollableTracksViewportHeight ()) {
42521 viewSize.height = vpSize.height;
42522 }}var viewPosition = vp.getViewPosition ();
42523 if (scrollableView == null || vp.getParent () == null || vp.getParent ().getComponentOrientation ().isLeftToRight ()) {
42524 if ((viewPosition.x + extentSize.width) > viewSize.width) {
42525 viewPosition.x = Math.max (0, viewSize.width - extentSize.width);
42526 }} else {
42527 if (extentSize.width > viewSize.width) {
42528 viewPosition.x = viewSize.width - extentSize.width;
42529 } else {
42530 viewPosition.x = Math.max (0, Math.min (viewSize.width - extentSize.width, viewPosition.x));
42531 }}if ((viewPosition.y + extentSize.height) > viewSize.height) {
42532 viewPosition.y = Math.max (0, viewSize.height - extentSize.height);
42533 }if (scrollableView == null) {
42534 if ((viewPosition.x == 0) && (vpSize.width > viewPrefSize.width)) {
42535 viewSize.width = vpSize.width;
42536 }if ((viewPosition.y == 0) && (vpSize.height > viewPrefSize.height)) {
42537 viewSize.height = vpSize.height;
42538 }}vp.setViewPosition (viewPosition);
42539 vp.setViewSize (viewSize);
42540 }, "java.awt.Container");
42541 c$.SHARED_INSTANCE = c$.prototype.SHARED_INSTANCE =  new javax.swing.ViewportLayout ();
42542 });
42543 Clazz_declarePackage ("javax.swing.event");
42544 Clazz_load (["java.util.EventListener"], "javax.swing.event.CaretListener", null, function () {
42545 Clazz_declareInterface (javax.swing.event, "CaretListener", java.util.EventListener);
42546 });
42547 Clazz_declarePackage ("javax.swing");
42548 Clazz_load (["javax.swing.BoundedRangeModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultBoundedRangeModel", ["java.lang.IllegalArgumentException", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
42549 c$ = Clazz_decorateAsClass (function () {
42550 this.changeEvent = null;
42551 this.listenerList = null;
42552 this.value = 0;
42553 this.extent = 0;
42554 this.min = 0;
42555 this.max = 100;
42556 this.isAdjusting = false;
42557 Clazz_instantialize (this, arguments);
42558 }, javax.swing, "DefaultBoundedRangeModel", null, javax.swing.BoundedRangeModel);
42559 Clazz_prepareFields (c$, function () {
42560 this.listenerList =  new javax.swing.event.EventListenerList ();
42561 });
42562 Clazz_makeConstructor (c$, 
42563 function () {
42564 });
42565 Clazz_makeConstructor (c$, 
42566 function (value, extent, min, max) {
42567 if ((max >= min) && (value >= min) && ((value + extent) >= value) && ((value + extent) <= max)) {
42568 this.value = value;
42569 this.extent = extent;
42570 this.min = min;
42571 this.max = max;
42572 } else {
42573 throw  new IllegalArgumentException ("invalid range properties");
42574 }}, "~N,~N,~N,~N");
42575 Clazz_overrideMethod (c$, "getValue", 
42576 function () {
42577 return this.value;
42578 });
42579 Clazz_overrideMethod (c$, "getExtent", 
42580 function () {
42581 return this.extent;
42582 });
42583 Clazz_overrideMethod (c$, "getMinimum", 
42584 function () {
42585 return this.min;
42586 });
42587 Clazz_overrideMethod (c$, "getMaximum", 
42588 function () {
42589 return this.max;
42590 });
42591 Clazz_overrideMethod (c$, "setValue", 
42592 function (n) {
42593 n = Math.min (n, 2147483647 - this.extent);
42594 var newValue = Math.max (n, this.min);
42595 if (newValue + this.extent > this.max) {
42596 newValue = this.max - this.extent;
42597 }this.setRangeProperties (newValue, this.extent, this.min, this.max, this.isAdjusting);
42598 }, "~N");
42599 Clazz_overrideMethod (c$, "setExtent", 
42600 function (n) {
42601 var newExtent = Math.max (0, n);
42602 if (this.value + newExtent > this.max) {
42603 newExtent = this.max - this.value;
42604 }this.setRangeProperties (this.value, newExtent, this.min, this.max, this.isAdjusting);
42605 }, "~N");
42606 Clazz_overrideMethod (c$, "setMinimum", 
42607 function (n) {
42608 var newMax = Math.max (n, this.max);
42609 var newValue = Math.max (n, this.value);
42610 var newExtent = Math.min (newMax - newValue, this.extent);
42611 this.setRangeProperties (newValue, newExtent, n, newMax, this.isAdjusting);
42612 }, "~N");
42613 Clazz_overrideMethod (c$, "setMaximum", 
42614 function (n) {
42615 var newMin = Math.min (n, this.min);
42616 var newExtent = Math.min (n - newMin, this.extent);
42617 var newValue = Math.min (n - newExtent, this.value);
42618 this.setRangeProperties (newValue, newExtent, newMin, n, this.isAdjusting);
42619 }, "~N");
42620 Clazz_overrideMethod (c$, "setValueIsAdjusting", 
42621 function (b) {
42622 this.setRangeProperties (this.value, this.extent, this.min, this.max, b);
42623 }, "~B");
42624 Clazz_overrideMethod (c$, "getValueIsAdjusting", 
42625 function () {
42626 return this.isAdjusting;
42627 });
42628 Clazz_overrideMethod (c$, "setRangeProperties", 
42629 function (newValue, newExtent, newMin, newMax, adjusting) {
42630 if (newMin > newMax) {
42631 newMin = newMax;
42632 }if (newValue > newMax) {
42633 newMax = newValue;
42634 }if (newValue < newMin) {
42635 newMin = newValue;
42636 }if ((newExtent + newValue) > newMax) {
42637 newExtent = newMax - newValue;
42638 }if (newExtent < 0) {
42639 newExtent = 0;
42640 }var isChange = (newValue != this.value) || (newExtent != this.extent) || (newMin != this.min) || (newMax != this.max) || (adjusting != this.isAdjusting);
42641 if (isChange) {
42642 this.value = newValue;
42643 this.extent = newExtent;
42644 this.min = newMin;
42645 this.max = newMax;
42646 this.isAdjusting = adjusting;
42647 this.fireStateChanged ();
42648 }}, "~N,~N,~N,~N,~B");
42649 Clazz_overrideMethod (c$, "addChangeListener", 
42650 function (l) {
42651 this.listenerList.add (javax.swing.event.ChangeListener, l);
42652 }, "javax.swing.event.ChangeListener");
42653 Clazz_overrideMethod (c$, "removeChangeListener", 
42654 function (l) {
42655 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42656 }, "javax.swing.event.ChangeListener");
42657 Clazz_defineMethod (c$, "getChangeListeners", 
42658 function () {
42659 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42660 });
42661 Clazz_defineMethod (c$, "fireStateChanged", 
42662 function () {
42663 var listeners = this.listenerList.getListenerList ();
42664 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42665 if (listeners[i] === javax.swing.event.ChangeListener) {
42666 if (this.changeEvent == null) {
42667 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42668 }(listeners[i + 1]).stateChanged (this.changeEvent);
42669 }}
42670 });
42671 Clazz_overrideMethod (c$, "toString", 
42672 function () {
42673 var modelString = "value=" + this.getValue () + ", " + "extent=" + this.getExtent () + ", " + "min=" + this.getMinimum () + ", " + "max=" + this.getMaximum () + ", " + "adj=" + this.getValueIsAdjusting ();
42674 return this.getClass ().getName () + "[" + modelString + "]";
42675 });
42676 Clazz_defineMethod (c$, "getListeners", 
42677 function (listenerType) {
42678 return this.listenerList.getListeners (listenerType);
42679 }, "Class");
42680 });
42681 Clazz_declarePackage ("javax.swing");
42682 Clazz_declareInterface (javax.swing, "BoundedRangeModel");
42683 Clazz_declarePackage ("javax.swing");
42684 Clazz_load (["java.awt.AWTKeyStroke"], "javax.swing.KeyStroke", null, function () {
42685 c$ = Clazz_declareType (javax.swing, "KeyStroke", java.awt.AWTKeyStroke);
42686 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42687 function (keyChar) {
42688 {
42689 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42690 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar);
42691 }}, "~S");
42692 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42693 function (keyChar, onKeyRelease) {
42694 return  new javax.swing.KeyStroke (keyChar, 0, 0, onKeyRelease);
42695 }, "~S,~B");
42696 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42697 function (keyChar, modifiers) {
42698 {
42699 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42700 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar, modifiers);
42701 }}, "Character,~N");
42702 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42703 function (keyCode, modifiers, onKeyRelease) {
42704 {
42705 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42706 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers, onKeyRelease);
42707 }}, "~N,~N,~B");
42708 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42709 function (keyCode, modifiers) {
42710 {
42711 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42712 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers);
42713 }}, "~N,~N");
42714 c$.getKeyStrokeForEvent = Clazz_defineMethod (c$, "getKeyStrokeForEvent", 
42715 function (anEvent) {
42716 {
42717 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42718 return java.awt.AWTKeyStroke.getAWTKeyStrokeForEvent (anEvent);
42719 }}, "java.awt.event.KeyEvent");
42720 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42721 function (s) {
42722 if (s == null || s.length == 0) {
42723 return null;
42724 }{
42725 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42726 try {
42727 return java.awt.AWTKeyStroke.getAWTKeyStroke (s);
42728 } catch (e) {
42729 if (Clazz_exceptionOf (e, IllegalArgumentException)) {
42730 return null;
42731 } else {
42732 throw e;
42733 }
42734 }
42735 }}, "~S");
42736 });
42737 Clazz_declarePackage ("java.awt");
42738 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 () {
42739 c$ = Clazz_decorateAsClass (function () {
42740 this.keyChar = '\uffff';
42741 this.keyCode = 0;
42742 this.modifiers = 0;
42743 this.onKeyRelease = false;
42744 Clazz_instantialize (this, arguments);
42745 }, java.awt, "AWTKeyStroke");
42746 c$.getAWTKeyStrokeClass = Clazz_defineMethod (c$, "getAWTKeyStrokeClass", 
42747  function () {
42748 var clazz = jssun.awt.AppContext.getAppContext ().get (java.awt.AWTKeyStroke);
42749 if (clazz == null) {
42750 clazz = java.awt.AWTKeyStroke;
42751 jssun.awt.AppContext.getAppContext ().put (java.awt.AWTKeyStroke, java.awt.AWTKeyStroke);
42752 }return clazz;
42753 });
42754 Clazz_makeConstructor (c$, 
42755 function () {
42756 });
42757 Clazz_makeConstructor (c$, 
42758 function (keyChar, keyCode, modifiers, onKeyRelease) {
42759 this.keyChar = keyChar;
42760 this.keyCode = keyCode;
42761 this.modifiers = modifiers;
42762 this.onKeyRelease = onKeyRelease;
42763 }, "~S,~N,~N,~B");
42764 c$.registerSubclass = Clazz_defineMethod (c$, "registerSubclass", 
42765 function (subclass) {
42766 }, "Class");
42767 c$.getCachedStroke = Clazz_defineMethod (c$, "getCachedStroke", 
42768  function (keyChar, keyCode, modifiers, onKeyRelease) {
42769 return null;
42770 }, "~S,~N,~N,~B");
42771 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42772 function (keyChar) {
42773 return java.awt.AWTKeyStroke.getCachedStroke (keyChar, 0, 0, false);
42774 }, "~S");
42775 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42776 function (keyChar, modifiers) {
42777 if (keyChar == null) {
42778 throw  new IllegalArgumentException ("keyChar cannot be null");
42779 }return java.awt.AWTKeyStroke.getCachedStroke (keyChar.charValue (), 0, modifiers, false);
42780 }, "Character,~N");
42781 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42782 function (keyCode, modifiers, onKeyRelease) {
42783 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, onKeyRelease);
42784 }, "~N,~N,~B");
42785 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42786 function (keyCode, modifiers) {
42787 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, false);
42788 }, "~N,~N");
42789 c$.getAWTKeyStrokeForEvent = Clazz_defineMethod (c$, "getAWTKeyStrokeForEvent", 
42790 function (anEvent) {
42791 var id = anEvent.getID ();
42792 switch (id) {
42793 case 401:
42794 case 402:
42795 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', anEvent.getKeyCode (), anEvent.getModifiers (), (id == 402));
42796 case 400:
42797 return java.awt.AWTKeyStroke.getCachedStroke (anEvent.getKeyChar (), 0, anEvent.getModifiers (), false);
42798 default:
42799 return null;
42800 }
42801 }, "java.awt.event.KeyEvent");
42802 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42803 function (s) {
42804 if (s == null) {
42805 throw  new IllegalArgumentException ("String cannot be null");
42806 }var errmsg = "String formatted incorrectly";
42807 var st =  new java.util.StringTokenizer (s, " ");
42808 var mask = 0;
42809 var released = false;
42810 var typed = false;
42811 var pressed = false;
42812 {
42813 if (java.awt.AWTKeyStroke.modifierKeywords == null) {
42814 var uninitializedMap =  new java.util.HashMap (8, 1.0);
42815 uninitializedMap.put ("shift", Integer.$valueOf (65));
42816 uninitializedMap.put ("control", Integer.$valueOf (130));
42817 uninitializedMap.put ("ctrl", Integer.$valueOf (130));
42818 uninitializedMap.put ("meta", Integer.$valueOf (260));
42819 uninitializedMap.put ("alt", Integer.$valueOf (520));
42820 uninitializedMap.put ("altGraph", Integer.$valueOf (8224));
42821 uninitializedMap.put ("button1", Integer.$valueOf (1024));
42822 uninitializedMap.put ("button2", Integer.$valueOf (2048));
42823 uninitializedMap.put ("button3", Integer.$valueOf (4096));
42824 java.awt.AWTKeyStroke.modifierKeywords = java.util.Collections.synchronizedMap (uninitializedMap);
42825 }}var count = st.countTokens ();
42826 for (var i = 1; i <= count; i++) {
42827 var token = st.nextToken ();
42828 if (typed) {
42829 if (token.length != 1 || i != count) {
42830 throw  new IllegalArgumentException ("String formatted incorrectly");
42831 }return java.awt.AWTKeyStroke.getCachedStroke (token.charAt (0), 0, mask, false);
42832 }if (pressed || released || i == count) {
42833 if (i != count) {
42834 throw  new IllegalArgumentException ("String formatted incorrectly");
42835 }var keyCodeName = "VK_" + token;
42836 var keyCode = java.awt.AWTKeyStroke.getVKValue (keyCodeName);
42837 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, mask, released);
42838 }if (token.equals ("released")) {
42839 released = true;
42840 continue;
42841 }if (token.equals ("pressed")) {
42842 pressed = true;
42843 continue;
42844 }if (token.equals ("typed")) {
42845 typed = true;
42846 continue;
42847 }var tokenMask = java.awt.AWTKeyStroke.modifierKeywords.get (token);
42848 if (tokenMask != null) {
42849 mask |= tokenMask.intValue ();
42850 } else {
42851 throw  new IllegalArgumentException ("String formatted incorrectly");
42852 }}
42853 throw  new IllegalArgumentException ("String formatted incorrectly");
42854 }, "~S");
42855 c$.getVKCollection = Clazz_defineMethod (c$, "getVKCollection", 
42856  function () {
42857 if (java.awt.AWTKeyStroke.vks == null) {
42858 java.awt.AWTKeyStroke.vks =  new java.awt.VKCollection ();
42859 }return java.awt.AWTKeyStroke.vks;
42860 });
42861 c$.getVKValue = Clazz_defineMethod (c$, "getVKValue", 
42862  function (key) {
42863 var vkCollect = java.awt.AWTKeyStroke.getVKCollection ();
42864 var value = vkCollect.findCode (key);
42865 if (value == null) {
42866 var keyCode = 0;
42867 var errmsg = "String formatted incorrectly";
42868 try {
42869 keyCode = java.awt.event.KeyEvent.getField (key).getInt (java.awt.event.KeyEvent);
42870 } catch (e$$) {
42871 if (Clazz_exceptionOf (e$$, NoSuchFieldException)) {
42872 var nsfe = e$$;
42873 {
42874 throw  new IllegalArgumentException ("String formatted incorrectly");
42875 }
42876 } else if (Clazz_exceptionOf (e$$, IllegalAccessException)) {
42877 var iae = e$$;
42878 {
42879 throw  new IllegalArgumentException ("String formatted incorrectly");
42880 }
42881 } else {
42882 throw e$$;
42883 }
42884 }
42885 value = Integer.$valueOf (keyCode);
42886 vkCollect.put (key, value);
42887 }return value.intValue ();
42888 }, "~S");
42889 Clazz_defineMethod (c$, "getKeyChar", 
42890 function () {
42891 return this.keyChar;
42892 });
42893 Clazz_defineMethod (c$, "getKeyCode", 
42894 function () {
42895 return this.keyCode;
42896 });
42897 Clazz_defineMethod (c$, "getModifiers", 
42898 function () {
42899 return this.modifiers;
42900 });
42901 Clazz_defineMethod (c$, "isOnKeyRelease", 
42902 function () {
42903 return this.onKeyRelease;
42904 });
42905 Clazz_defineMethod (c$, "getKeyEventType", 
42906 function () {
42907 if (this.keyCode == 0) {
42908 return 400;
42909 } else {
42910 return (this.onKeyRelease) ? 402 : 401;
42911 }});
42912 Clazz_overrideMethod (c$, "hashCode", 
42913 function () {
42914 return (((this.keyChar).charCodeAt (0)) + 1) * (2 * (this.keyCode + 1)) * (this.modifiers + 1) + (this.onKeyRelease ? 1 : 2);
42915 });
42916 Clazz_defineMethod (c$, "equals", 
42917 function (anObject) {
42918 if (Clazz_instanceOf (anObject, java.awt.AWTKeyStroke)) {
42919 var ks = anObject;
42920 return (ks.keyChar == this.keyChar && ks.keyCode == this.keyCode && ks.onKeyRelease == this.onKeyRelease && ks.modifiers == this.modifiers);
42921 }return false;
42922 }, "~O");
42923 Clazz_overrideMethod (c$, "toString", 
42924 function () {
42925 if (this.keyCode == 0) {
42926 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + "typed " + this.keyChar;
42927 } else {
42928 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + (this.onKeyRelease ? "released" : "pressed") + " " + java.awt.AWTKeyStroke.getVKText (this.keyCode);
42929 }});
42930 c$.getModifiersText = Clazz_defineMethod (c$, "getModifiersText", 
42931 function (modifiers) {
42932 var buf =  new StringBuilder ();
42933 if ((modifiers & 64) != 0) {
42934 buf.append ("shift ");
42935 }if ((modifiers & 128) != 0) {
42936 buf.append ("ctrl ");
42937 }if ((modifiers & 256) != 0) {
42938 buf.append ("meta ");
42939 }if ((modifiers & 512) != 0) {
42940 buf.append ("alt ");
42941 }if ((modifiers & 8192) != 0) {
42942 buf.append ("altGraph ");
42943 }if ((modifiers & 1024) != 0) {
42944 buf.append ("button1 ");
42945 }if ((modifiers & 2048) != 0) {
42946 buf.append ("button2 ");
42947 }if ((modifiers & 4096) != 0) {
42948 buf.append ("button3 ");
42949 }return buf.toString ();
42950 }, "~N");
42951 c$.getVKText = Clazz_defineMethod (c$, "getVKText", 
42952 function (keyCode) {
42953 return "UNKNOWN";
42954 }, "~N");
42955 Clazz_defineMethod (c$, "readResolve", 
42956 function () {
42957 {
42958 var newClass = this.getClass ();
42959 var awtKeyStrokeClass = java.awt.AWTKeyStroke.getAWTKeyStrokeClass ();
42960 if (!newClass.equals (awtKeyStrokeClass)) {
42961 java.awt.AWTKeyStroke.registerSubclass (newClass);
42962 }return java.awt.AWTKeyStroke.getCachedStroke (this.keyChar, this.keyCode, this.modifiers, this.onKeyRelease);
42963 }});
42964 Clazz_defineStatics (c$,
42965 "modifierKeywords", null,
42966 "vks", null);
42967 c$ = Clazz_decorateAsClass (function () {
42968 this.code2name = null;
42969 this.name2code = null;
42970 Clazz_instantialize (this, arguments);
42971 }, java.awt, "VKCollection");
42972 Clazz_makeConstructor (c$, 
42973 function () {
42974 this.code2name =  new java.util.HashMap ();
42975 this.name2code =  new java.util.HashMap ();
42976 });
42977 Clazz_defineMethod (c$, "put", 
42978 function (name, code) {
42979 this.code2name.put (code, name);
42980 this.name2code.put (name, code);
42981 }, "~S,Integer");
42982 Clazz_defineMethod (c$, "findCode", 
42983 function (name) {
42984 return this.name2code.get (name);
42985 }, "~S");
42986 Clazz_defineMethod (c$, "findName", 
42987 function (code) {
42988 return this.code2name.get (code);
42989 }, "Integer");
42990 });
42991 Clazz_load(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){
42992 c$=Clazz_decorateAsClass(function(){
42993 this.string=null;
42994 this.delimiters=null;
42995 this.returnDelimiters=false;
42996 this.position=0;
42997 Clazz_instantialize(this,arguments);
42998 },java.util,"StringTokenizer",null,java.util.Enumeration);
42999 Clazz_makeConstructor(c$,
43000 function(string){
43001 this.construct(string," \t\n\r\f",false);
43002 },"~S");
43003 Clazz_makeConstructor(c$,
43004 function(string,delimiters){
43005 this.construct(string,delimiters,false);
43006 },"~S,~S");
43007 Clazz_makeConstructor(c$,
43008 function(string,delimiters,returnDelimiters){
43009 if(string!=null){
43010 this.string=string;
43011 this.delimiters=delimiters;
43012 this.returnDelimiters=returnDelimiters;
43013 this.position=0;
43014 }else throw new NullPointerException();
43015 },"~S,~S,~B");
43016 Clazz_defineMethod(c$,"countTokens",
43017 function(){
43018 var count=0;
43019 var inToken=false;
43020 for(var i=this.position,length=this.string.length;i<length;i++){
43021 if(this.delimiters.indexOf(this.string.charAt(i),0)>=0){
43022 if(this.returnDelimiters)count++;
43023 if(inToken){
43024 count++;
43025 inToken=false;
43026 }}else{
43027 inToken=true;
43028 }}
43029 if(inToken)count++;
43030 return count;
43031 });
43032 Clazz_overrideMethod(c$,"hasMoreElements",
43033 function(){
43034 return this.hasMoreTokens();
43035 });
43036 Clazz_defineMethod(c$,"hasMoreTokens",
43037 function(){
43038 var length=this.string.length;
43039 if(this.position<length){
43040 if(this.returnDelimiters)return true;
43041 for(var i=this.position;i<length;i++)if(this.delimiters.indexOf(this.string.charAt(i),0)==-1)return true;
43042
43043 }return false;
43044 });
43045 Clazz_overrideMethod(c$,"nextElement",
43046 function(){
43047 return this.nextToken();
43048 });
43049 Clazz_defineMethod(c$,"nextToken",
43050 function(){
43051 var i=this.position;
43052 var length=this.string.length;
43053 if(i<length){
43054 if(this.returnDelimiters){
43055 if(this.delimiters.indexOf(this.string.charAt(this.position),0)>=0)return String.valueOf(this.string.charAt(this.position++));
43056 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);
43057
43058 return this.string.substring(i);
43059 }while(i<length&&this.delimiters.indexOf(this.string.charAt(i),0)>=0)i++;
43060
43061 this.position=i;
43062 if(i<length){
43063 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);
43064
43065 return this.string.substring(i);
43066 }}throw new java.util.NoSuchElementException();
43067 });
43068 Clazz_defineMethod(c$,"nextToken",
43069 function(delims){
43070 this.delimiters=delims;
43071 return this.nextToken();
43072 },"~S");
43073 });
43074 Clazz_declarePackage ("javax.swing");
43075 Clazz_load (["javax.swing.InputMap"], "javax.swing.ComponentInputMap", ["java.lang.IllegalArgumentException"], function () {
43076 c$ = Clazz_decorateAsClass (function () {
43077 this.component = null;
43078 Clazz_instantialize (this, arguments);
43079 }, javax.swing, "ComponentInputMap", javax.swing.InputMap);
43080 Clazz_makeConstructor (c$, 
43081 function (component) {
43082 Clazz_superConstructor (this, javax.swing.ComponentInputMap, []);
43083 this.component = component;
43084 if (component == null) {
43085 throw  new IllegalArgumentException ("ComponentInputMaps must be associated with a non-null JComponent");
43086 }}, "javax.swing.JComponent");
43087 Clazz_defineMethod (c$, "setParent", 
43088 function (map) {
43089 if (this.getParent () === map) {
43090 return;
43091 }if (map != null && (!(Clazz_instanceOf (map, javax.swing.ComponentInputMap)) || (map).getComponent () !== this.getComponent ())) {
43092 throw  new IllegalArgumentException ("ComponentInputMaps must have a parent ComponentInputMap associated with the same component");
43093 }Clazz_superCall (this, javax.swing.ComponentInputMap, "setParent", [map]);
43094 this.getComponent ().componentInputMapChanged (this);
43095 }, "javax.swing.InputMap");
43096 Clazz_defineMethod (c$, "getComponent", 
43097 function () {
43098 return this.component;
43099 });
43100 Clazz_defineMethod (c$, "put", 
43101 function (keyStroke, actionMapKey) {
43102 Clazz_superCall (this, javax.swing.ComponentInputMap, "put", [keyStroke, actionMapKey]);
43103 if (this.getComponent () != null) {
43104 this.getComponent ().componentInputMapChanged (this);
43105 }}, "javax.swing.KeyStroke,~O");
43106 Clazz_defineMethod (c$, "remove", 
43107 function (key) {
43108 Clazz_superCall (this, javax.swing.ComponentInputMap, "remove", [key]);
43109 if (this.getComponent () != null) {
43110 this.getComponent ().componentInputMapChanged (this);
43111 }}, "javax.swing.KeyStroke");
43112 Clazz_defineMethod (c$, "clear", 
43113 function () {
43114 var oldSize = this.size ();
43115 Clazz_superCall (this, javax.swing.ComponentInputMap, "clear", []);
43116 if (oldSize > 0 && this.getComponent () != null) {
43117 this.getComponent ().componentInputMapChanged (this);
43118 }});
43119 });
43120 Clazz_declarePackage ("jssun.swing");
43121 Clazz_load (["javax.swing.LayoutStyle"], "jssun.swing.DefaultLayoutStyle", ["java.lang.IllegalArgumentException", "$.NullPointerException", "javax.swing.Icon", "$.JCheckBox", "$.JLabel", "$.JRadioButton", "$.UIManager", "javax.swing.plaf.UIResource"], function () {
43122 c$ = Clazz_declareType (jssun.swing, "DefaultLayoutStyle", javax.swing.LayoutStyle);
43123 c$.getInstance = Clazz_overrideMethod (c$, "getInstance", 
43124 function () {
43125 return jssun.swing.DefaultLayoutStyle.INSTANCE;
43126 });
43127 Clazz_overrideMethod (c$, "getPreferredGap", 
43128 function (component1, component2, type, position, parent) {
43129 if (component1 == null || component2 == null || type == null) {
43130 throw  new NullPointerException ();
43131 }this.checkPosition (position);
43132 if (type === javax.swing.LayoutStyle.ComponentPlacement.INDENT && (position == 3 || position == 7)) {
43133 var indent = this.getIndent (component1, position);
43134 if (indent > 0) {
43135 return indent;
43136 }}return (type === javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) ? 12 : 6;
43137 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,java.awt.Container");
43138 Clazz_overrideMethod (c$, "getContainerGap", 
43139 function (component, position, parent) {
43140 if (component == null) {
43141 throw  new NullPointerException ();
43142 }this.checkPosition (position);
43143 return 6;
43144 }, "javax.swing.JComponent,~N,java.awt.Container");
43145 Clazz_defineMethod (c$, "isLabelAndNonlabel", 
43146 function (c1, c2, position) {
43147 if (position == 3 || position == 7) {
43148 var c1Label = (Clazz_instanceOf (c1, javax.swing.JLabel));
43149 var c2Label = (Clazz_instanceOf (c2, javax.swing.JLabel));
43150 return ((c1Label || c2Label) && (c1Label != c2Label));
43151 }return false;
43152 }, "javax.swing.JComponent,javax.swing.JComponent,~N");
43153 Clazz_defineMethod (c$, "getButtonGap", 
43154 function (source, target, position, offset) {
43155 offset -= this.getButtonGap (source, position);
43156 if (offset > 0) {
43157 offset -= this.getButtonGap (target, this.flipDirection (position));
43158 }if (offset < 0) {
43159 return 0;
43160 }return offset;
43161 }, "javax.swing.JComponent,javax.swing.JComponent,~N,~N");
43162 Clazz_defineMethod (c$, "getButtonGap", 
43163 function (source, position, offset) {
43164 offset -= this.getButtonGap (source, position);
43165 return Math.max (offset, 0);
43166 }, "javax.swing.JComponent,~N,~N");
43167 Clazz_defineMethod (c$, "getButtonGap", 
43168 function (c, position) {
43169 var classID = c.getUIClassID ();
43170 if ((classID === "CheckBoxUI" || classID === "RadioButtonUI") && !(c).isBorderPainted ()) {
43171 var border = c.getBorder ();
43172 if (Clazz_instanceOf (border, javax.swing.plaf.UIResource)) {
43173 return this.getInset (c, position);
43174 }}return 0;
43175 }, "javax.swing.JComponent,~N");
43176 Clazz_defineMethod (c$, "checkPosition", 
43177  function (position) {
43178 if (position != 1 && position != 5 && position != 7 && position != 3) {
43179 throw  new IllegalArgumentException ();
43180 }}, "~N");
43181 Clazz_defineMethod (c$, "flipDirection", 
43182 function (position) {
43183 switch (position) {
43184 case 1:
43185 return 5;
43186 case 5:
43187 return 1;
43188 case 3:
43189 return 7;
43190 case 7:
43191 return 3;
43192 }
43193 return 0;
43194 }, "~N");
43195 Clazz_defineMethod (c$, "getIndent", 
43196 function (c, position) {
43197 var classID = c.getUIClassID ();
43198 if (classID === "CheckBoxUI" || classID === "RadioButtonUI") {
43199 var button = c;
43200 var insets = c.getInsets ();
43201 var icon = this.getIcon (button);
43202 var gap = button.getIconTextGap ();
43203 if (this.isLeftAligned (button, position)) {
43204 return insets.left + icon.getIconWidth () + gap;
43205 } else if (this.isRightAligned (button, position)) {
43206 return insets.right + icon.getIconWidth () + gap;
43207 }}return 0;
43208 }, "javax.swing.JComponent,~N");
43209 Clazz_defineMethod (c$, "getIcon", 
43210  function (button) {
43211 var icon = button.getIcon ();
43212 if (icon != null) {
43213 return icon;
43214 }var key = null;
43215 if (Clazz_instanceOf (button, javax.swing.JCheckBox)) {
43216 key = "CheckBox.icon";
43217 } else if (Clazz_instanceOf (button, javax.swing.JRadioButton)) {
43218 key = "RadioButton.icon";
43219 }if (key != null) {
43220 var oIcon = javax.swing.UIManager.get (key);
43221 if (Clazz_instanceOf (oIcon, javax.swing.Icon)) {
43222 return oIcon;
43223 }}return null;
43224 }, "javax.swing.AbstractButton");
43225 Clazz_defineMethod (c$, "isLeftAligned", 
43226  function (button, position) {
43227 if (position == 7) {
43228 var ltr = button.getComponentOrientation ().isLeftToRight ();
43229 var hAlign = button.getHorizontalAlignment ();
43230 return ((ltr && (hAlign == 2 || hAlign == 10)) || (!ltr && (hAlign == 11)));
43231 }return false;
43232 }, "javax.swing.AbstractButton,~N");
43233 Clazz_defineMethod (c$, "isRightAligned", 
43234  function (button, position) {
43235 if (position == 3) {
43236 var ltr = button.getComponentOrientation ().isLeftToRight ();
43237 var hAlign = button.getHorizontalAlignment ();
43238 return ((ltr && (hAlign == 4 || hAlign == 11)) || (!ltr && (hAlign == 10)));
43239 }return false;
43240 }, "javax.swing.AbstractButton,~N");
43241 Clazz_defineMethod (c$, "getInset", 
43242  function (c, position) {
43243 return this.getInset (c.getInsets (), position);
43244 }, "javax.swing.JComponent,~N");
43245 Clazz_defineMethod (c$, "getInset", 
43246  function (insets, position) {
43247 if (insets == null) {
43248 return 0;
43249 }switch (position) {
43250 case 1:
43251 return insets.top;
43252 case 5:
43253 return insets.bottom;
43254 case 3:
43255 return insets.right;
43256 case 7:
43257 return insets.left;
43258 }
43259 return 0;
43260 }, "java.awt.Insets,~N");
43261 c$.INSTANCE = c$.prototype.INSTANCE =  new jssun.swing.DefaultLayoutStyle ();
43262 });
43263 Clazz_declarePackage ("javax.swing");
43264 Clazz_load (["java.lang.Enum"], "javax.swing.LayoutStyle", ["javax.swing.UIManager", "jssun.awt.AppContext"], function () {
43265 c$ = Clazz_declareType (javax.swing, "LayoutStyle");
43266 c$.setInstance = Clazz_defineMethod (c$, "setInstance", 
43267 function (style) {
43268 {
43269 if (style == null) {
43270 jssun.awt.AppContext.getAppContext ().remove (javax.swing.LayoutStyle);
43271 } else {
43272 jssun.awt.AppContext.getAppContext ().put (javax.swing.LayoutStyle, style);
43273 }}}, "javax.swing.LayoutStyle");
43274 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
43275 function () {
43276 var style;
43277 {
43278 style = jssun.awt.AppContext.getAppContext ().get (javax.swing.LayoutStyle);
43279 }if (style == null) {
43280 return javax.swing.UIManager.getLookAndFeel ().getLayoutStyle ();
43281 }return style;
43282 });
43283 Clazz_makeConstructor (c$, 
43284 function () {
43285 });
43286 Clazz_pu$h(self.c$);
43287 c$ = Clazz_declareType (javax.swing.LayoutStyle, "ComponentPlacement", Enum);
43288 Clazz_defineEnumConstant (c$, "RELATED", 0, []);
43289 Clazz_defineEnumConstant (c$, "UNRELATED", 1, []);
43290 Clazz_defineEnumConstant (c$, "INDENT", 2, []);
43291 c$ = Clazz_p0p ();
43292 });
43293 Clazz_declarePackage ("javax.swing");
43294 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JCheckBox", ["java.lang.Boolean", "javax.swing.UIManager"], function () {
43295 c$ = Clazz_decorateAsClass (function () {
43296 this.flat = false;
43297 Clazz_instantialize (this, arguments);
43298 }, javax.swing, "JCheckBox", javax.swing.JToggleButton);
43299 Clazz_makeConstructor (c$, 
43300 function () {
43301 this.construct (null, null, false);
43302 });
43303 Clazz_makeConstructor (c$, 
43304 function (icon) {
43305 this.construct (null, icon, false);
43306 }, "javax.swing.Icon");
43307 Clazz_makeConstructor (c$, 
43308 function (icon, selected) {
43309 this.construct (null, icon, selected);
43310 }, "javax.swing.Icon,~B");
43311 Clazz_makeConstructor (c$, 
43312 function (text) {
43313 this.construct (text, null, false);
43314 }, "~S");
43315 Clazz_makeConstructor (c$, 
43316 function (a) {
43317 this.construct ();
43318 this.setAction (a);
43319 }, "javax.swing.Action");
43320 Clazz_makeConstructor (c$, 
43321 function (text, selected) {
43322 this.construct (text, null, selected);
43323 }, "~S,~B");
43324 Clazz_makeConstructor (c$, 
43325 function (text, icon) {
43326 this.construct (text, icon, false);
43327 }, "~S,javax.swing.Icon");
43328 Clazz_makeConstructor (c$, 
43329 function (text, icon, selected) {
43330 Clazz_superConstructor (this, javax.swing.JCheckBox, [text, icon, selected]);
43331 this.setUIProperty ("borderPainted", Boolean.FALSE);
43332 this.setHorizontalAlignment (10);
43333 }, "~S,javax.swing.Icon,~B");
43334 Clazz_defineMethod (c$, "setBorderPaintedFlat", 
43335 function (b) {
43336 var oldValue = this.flat;
43337 this.flat = b;
43338 this.firePropertyChangeBool ("borderPaintedFlat", oldValue, this.flat);
43339 if (b != oldValue) {
43340 this.revalidate ();
43341 this.repaint ();
43342 }}, "~B");
43343 Clazz_defineMethod (c$, "isBorderPaintedFlat", 
43344 function () {
43345 return this.flat;
43346 });
43347 Clazz_overrideMethod (c$, "updateUI", 
43348 function () {
43349 this.setUI (javax.swing.UIManager.getUI (this));
43350 });
43351 Clazz_overrideMethod (c$, "getUIClassID", 
43352 function () {
43353 return "CheckBoxUI";
43354 });
43355 Clazz_overrideMethod (c$, "setIconFromAction", 
43356 function (a) {
43357 }, "javax.swing.Action");
43358 Clazz_defineStatics (c$,
43359 "BORDER_PAINTED_FLAT_CHANGED_PROPERTY", "borderPaintedFlat",
43360 "$$uiClassID", "CheckBoxUI");
43361 });
43362 Clazz_declarePackage ("java.awt");
43363 Clazz_declareInterface (java.awt, "ItemSelectable");
43364 Clazz_declarePackage ("java.awt.event");
43365 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ItemEvent", null, function () {
43366 c$ = Clazz_decorateAsClass (function () {
43367 this.item = null;
43368 this.stateChange = 0;
43369 Clazz_instantialize (this, arguments);
43370 }, java.awt.event, "ItemEvent", java.awt.AWTEvent);
43371 Clazz_makeConstructor (c$, 
43372 function (source, id, item, stateChange) {
43373 Clazz_superConstructor (this, java.awt.event.ItemEvent, [source, id]);
43374 this.item = item;
43375 this.stateChange = stateChange;
43376 }, "java.awt.ItemSelectable,~N,~O,~N");
43377 Clazz_defineMethod (c$, "getItemSelectable", 
43378 function () {
43379 return this.source;
43380 });
43381 Clazz_defineMethod (c$, "getItem", 
43382 function () {
43383 return this.item;
43384 });
43385 Clazz_defineMethod (c$, "getStateChange", 
43386 function () {
43387 return this.stateChange;
43388 });
43389 Clazz_overrideMethod (c$, "paramString", 
43390 function () {
43391 var typeStr;
43392 switch (this.id) {
43393 case 701:
43394 typeStr = "ITEM_STATE_CHANGED";
43395 break;
43396 default:
43397 typeStr = "unknown type";
43398 }
43399 var stateStr;
43400 switch (this.stateChange) {
43401 case 1:
43402 stateStr = "SELECTED";
43403 break;
43404 case 2:
43405 stateStr = "DESELECTED";
43406 break;
43407 default:
43408 stateStr = "unknown type";
43409 }
43410 return typeStr + ",item=" + this.item + ",stateChange=" + stateStr;
43411 });
43412 Clazz_defineStatics (c$,
43413 "ITEM_FIRST", 701,
43414 "ITEM_LAST", 701,
43415 "ITEM_STATE_CHANGED", 701,
43416 "SELECTED", 1,
43417 "DESELECTED", 2);
43418 });
43419 Clazz_declarePackage ("javax.swing");
43420 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 () {
43421 c$ = Clazz_decorateAsClass (function () {
43422 this.stateMask = 0;
43423 this.actionCommand = null;
43424 this.group = null;
43425 this.mnemonic = 0;
43426 this.changeEvent = null;
43427 this.listenerList = null;
43428 this.menuItem = false;
43429 Clazz_instantialize (this, arguments);
43430 }, javax.swing, "DefaultButtonModel", null, javax.swing.ButtonModel);
43431 Clazz_prepareFields (c$, function () {
43432 this.listenerList =  new javax.swing.event.EventListenerList ();
43433 });
43434 Clazz_makeConstructor (c$, 
43435 function () {
43436 this.stateMask = 0;
43437 this.setEnabled (true);
43438 });
43439 Clazz_overrideMethod (c$, "setActionCommand", 
43440 function (actionCommand) {
43441 this.actionCommand = actionCommand;
43442 }, "~S");
43443 Clazz_overrideMethod (c$, "getActionCommand", 
43444 function () {
43445 return this.actionCommand;
43446 });
43447 Clazz_overrideMethod (c$, "isArmed", 
43448 function () {
43449 return (this.stateMask & 1) != 0;
43450 });
43451 Clazz_overrideMethod (c$, "isSelected", 
43452 function () {
43453 return (this.stateMask & 2) != 0;
43454 });
43455 Clazz_overrideMethod (c$, "isEnabled", 
43456 function () {
43457 return (this.stateMask & 8) != 0;
43458 });
43459 Clazz_overrideMethod (c$, "isPressed", 
43460 function () {
43461 return (this.stateMask & 4) != 0;
43462 });
43463 Clazz_overrideMethod (c$, "isRollover", 
43464 function () {
43465 return (this.stateMask & 16) != 0;
43466 });
43467 Clazz_overrideMethod (c$, "setArmed", 
43468 function (b) {
43469 if (this.isMenuItem () && javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
43470 if ((this.isArmed () == b)) {
43471 return;
43472 }} else {
43473 if ((this.isArmed () == b) || !this.isEnabled ()) {
43474 return;
43475 }}if (b) {
43476 this.stateMask |= 1;
43477 } else {
43478 this.stateMask &= -2;
43479 }this.fireStateChanged ();
43480 }, "~B");
43481 Clazz_overrideMethod (c$, "setEnabled", 
43482 function (b) {
43483 if (this.isEnabled () == b) {
43484 return;
43485 }if (b) {
43486 this.stateMask |= 8;
43487 } else {
43488 this.stateMask &= -9;
43489 this.stateMask &= -2;
43490 this.stateMask &= -5;
43491 }this.fireStateChanged ();
43492 }, "~B");
43493 Clazz_overrideMethod (c$, "setSelected", 
43494 function (b) {
43495 if (this.isSelected () == b) {
43496 return;
43497 }if (b) {
43498 this.stateMask |= 2;
43499 } else {
43500 this.stateMask &= -3;
43501 }this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, b ? 1 : 2));
43502 this.fireStateChanged ();
43503 }, "~B");
43504 Clazz_overrideMethod (c$, "setPressed", 
43505 function (b) {
43506 if ((this.isPressed () == b) || !this.isEnabled ()) {
43507 return;
43508 }if (b) {
43509 this.stateMask |= 4;
43510 } else {
43511 this.stateMask &= -5;
43512 }if (!this.isPressed () && this.isArmed ()) {
43513 var modifiers = 0;
43514 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
43515 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
43516 modifiers = (currentEvent).getModifiers ();
43517 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
43518 modifiers = (currentEvent).getModifiers ();
43519 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), modifiers));
43520 }this.fireStateChanged ();
43521 }, "~B");
43522 Clazz_overrideMethod (c$, "setRollover", 
43523 function (b) {
43524 if ((this.isRollover () == b) || !this.isEnabled ()) {
43525 return;
43526 }if (b) {
43527 this.stateMask |= 16;
43528 } else {
43529 this.stateMask &= -17;
43530 }this.fireStateChanged ();
43531 }, "~B");
43532 Clazz_overrideMethod (c$, "setMnemonic", 
43533 function (key) {
43534 this.mnemonic = key;
43535 this.fireStateChanged ();
43536 }, "~N");
43537 Clazz_overrideMethod (c$, "getMnemonic", 
43538 function () {
43539 return this.mnemonic;
43540 });
43541 Clazz_overrideMethod (c$, "addChangeListener", 
43542 function (l) {
43543 this.listenerList.add (javax.swing.event.ChangeListener, l);
43544 }, "javax.swing.event.ChangeListener");
43545 Clazz_overrideMethod (c$, "removeChangeListener", 
43546 function (l) {
43547 this.listenerList.remove (javax.swing.event.ChangeListener, l);
43548 }, "javax.swing.event.ChangeListener");
43549 Clazz_defineMethod (c$, "getChangeListeners", 
43550 function () {
43551 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
43552 });
43553 Clazz_defineMethod (c$, "fireStateChanged", 
43554 function () {
43555 var listeners = this.listenerList.getListenerList ();
43556 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43557 if (listeners[i] === javax.swing.event.ChangeListener) {
43558 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
43559 (listeners[i + 1]).stateChanged (this.changeEvent);
43560 }}
43561 });
43562 Clazz_overrideMethod (c$, "addActionListener", 
43563 function (l) {
43564 this.listenerList.add (java.awt.event.ActionListener, l);
43565 }, "java.awt.event.ActionListener");
43566 Clazz_overrideMethod (c$, "removeActionListener", 
43567 function (l) {
43568 this.listenerList.remove (java.awt.event.ActionListener, l);
43569 }, "java.awt.event.ActionListener");
43570 Clazz_defineMethod (c$, "getActionListeners", 
43571 function () {
43572 return this.listenerList.getListeners (java.awt.event.ActionListener);
43573 });
43574 Clazz_defineMethod (c$, "fireActionPerformed", 
43575 function (e) {
43576 var listeners = this.listenerList.getListenerList ();
43577 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43578 if (listeners[i] === java.awt.event.ActionListener) {
43579 (listeners[i + 1]).actionPerformed (e);
43580 }}
43581 }, "java.awt.event.ActionEvent");
43582 Clazz_overrideMethod (c$, "addItemListener", 
43583 function (l) {
43584 this.listenerList.add (java.awt.event.ItemListener, l);
43585 }, "java.awt.event.ItemListener");
43586 Clazz_overrideMethod (c$, "removeItemListener", 
43587 function (l) {
43588 this.listenerList.remove (java.awt.event.ItemListener, l);
43589 }, "java.awt.event.ItemListener");
43590 Clazz_defineMethod (c$, "getItemListeners", 
43591 function () {
43592 return this.listenerList.getListeners (java.awt.event.ItemListener);
43593 });
43594 Clazz_defineMethod (c$, "fireItemStateChanged", 
43595 function (e) {
43596 var listeners = this.listenerList.getListenerList ();
43597 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43598 if (listeners[i] === java.awt.event.ItemListener) {
43599 (listeners[i + 1]).itemStateChanged (e);
43600 }}
43601 }, "java.awt.event.ItemEvent");
43602 Clazz_defineMethod (c$, "getListeners", 
43603 function (listenerType) {
43604 return this.listenerList.getListeners (listenerType);
43605 }, "Class");
43606 Clazz_overrideMethod (c$, "getSelectedObjects", 
43607 function () {
43608 return null;
43609 });
43610 Clazz_overrideMethod (c$, "setGroup", 
43611 function (group) {
43612 this.group = group;
43613 }, "javax.swing.ButtonGroup");
43614 Clazz_defineMethod (c$, "getGroup", 
43615 function () {
43616 return this.group;
43617 });
43618 Clazz_defineMethod (c$, "isMenuItem", 
43619 function () {
43620 return this.menuItem;
43621 });
43622 Clazz_defineMethod (c$, "setMenuItem", 
43623 function (menuItem) {
43624 this.menuItem = menuItem;
43625 }, "~B");
43626 Clazz_defineStatics (c$,
43627 "ARMED", 1,
43628 "SELECTED", 2,
43629 "PRESSED", 4,
43630 "ENABLED", 8,
43631 "ROLLOVER", 16);
43632 });
43633 Clazz_declarePackage ("javax.swing");
43634 Clazz_load (["java.awt.LayoutManager2"], "javax.swing.OverlayLayout", ["java.awt.AWTError", "$.Dimension", "javax.swing.SizeRequirements"], function () {
43635 c$ = Clazz_decorateAsClass (function () {
43636 this.target = null;
43637 this.xChildren = null;
43638 this.yChildren = null;
43639 this.xTotal = null;
43640 this.yTotal = null;
43641 Clazz_instantialize (this, arguments);
43642 }, javax.swing, "OverlayLayout", null, java.awt.LayoutManager2);
43643 Clazz_makeConstructor (c$, 
43644 function (target) {
43645 this.target = target;
43646 }, "java.awt.Container");
43647 Clazz_defineMethod (c$, "getTarget", 
43648 function () {
43649 return this.target;
43650 });
43651 Clazz_overrideMethod (c$, "invalidateLayout", 
43652 function (target) {
43653 this.checkContainer (target);
43654 this.xChildren = null;
43655 this.yChildren = null;
43656 this.xTotal = null;
43657 this.yTotal = null;
43658 }, "java.awt.Container");
43659 Clazz_defineMethod (c$, "addLayoutComponent", 
43660 function (name, comp) {
43661 this.invalidateLayout (comp.getParent ());
43662 }, "~S,java.awt.Component");
43663 Clazz_overrideMethod (c$, "removeLayoutComponent", 
43664 function (comp) {
43665 this.invalidateLayout (comp.getParent ());
43666 }, "java.awt.Component");
43667 Clazz_defineMethod (c$, "addLayoutComponent", 
43668 function (comp, constraints) {
43669 this.invalidateLayout (comp.getParent ());
43670 }, "java.awt.Component,~O");
43671 Clazz_overrideMethod (c$, "preferredLayoutSize", 
43672 function (target) {
43673 this.checkContainer (target);
43674 this.checkRequests ();
43675 var size =  new java.awt.Dimension (this.xTotal.preferred, this.yTotal.preferred);
43676 var insets = target.getInsets ();
43677 size.width += insets.left + insets.right;
43678 size.height += insets.top + insets.bottom;
43679 return size;
43680 }, "java.awt.Container");
43681 Clazz_overrideMethod (c$, "minimumLayoutSize", 
43682 function (target) {
43683 this.checkContainer (target);
43684 this.checkRequests ();
43685 var size =  new java.awt.Dimension (this.xTotal.minimum, this.yTotal.minimum);
43686 var insets = target.getInsets ();
43687 size.width += insets.left + insets.right;
43688 size.height += insets.top + insets.bottom;
43689 return size;
43690 }, "java.awt.Container");
43691 Clazz_overrideMethod (c$, "maximumLayoutSize", 
43692 function (target) {
43693 this.checkContainer (target);
43694 this.checkRequests ();
43695 var size =  new java.awt.Dimension (this.xTotal.maximum, this.yTotal.maximum);
43696 var insets = target.getInsets ();
43697 size.width += insets.left + insets.right;
43698 size.height += insets.top + insets.bottom;
43699 return size;
43700 }, "java.awt.Container");
43701 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
43702 function (target) {
43703 this.checkContainer (target);
43704 this.checkRequests ();
43705 return this.xTotal.alignment;
43706 }, "java.awt.Container");
43707 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
43708 function (target) {
43709 this.checkContainer (target);
43710 this.checkRequests ();
43711 return this.yTotal.alignment;
43712 }, "java.awt.Container");
43713 Clazz_overrideMethod (c$, "layoutContainer", 
43714 function (target) {
43715 this.checkContainer (target);
43716 this.checkRequests ();
43717 var nChildren = target.getComponentCount ();
43718 var xOffsets =  Clazz_newIntArray (nChildren, 0);
43719 var xSpans =  Clazz_newIntArray (nChildren, 0);
43720 var yOffsets =  Clazz_newIntArray (nChildren, 0);
43721 var ySpans =  Clazz_newIntArray (nChildren, 0);
43722 var alloc = target.getSize ();
43723 var $in = target.getInsets ();
43724 alloc.width -= $in.left + $in.right;
43725 alloc.height -= $in.top + $in.bottom;
43726 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.width, this.xTotal, this.xChildren, xOffsets, xSpans);
43727 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.height, this.yTotal, this.yChildren, yOffsets, ySpans);
43728 for (var i = 0; i < nChildren; i++) {
43729 var c = target.getComponent (i);
43730 c.setBounds ($in.left + xOffsets[i], $in.top + yOffsets[i], xSpans[i], ySpans[i]);
43731 }
43732 }, "java.awt.Container");
43733 Clazz_defineMethod (c$, "checkContainer", 
43734 function (target) {
43735 if (this.target !== target) {
43736 throw  new java.awt.AWTError ("OverlayLayout can't be shared");
43737 }}, "java.awt.Container");
43738 Clazz_defineMethod (c$, "checkRequests", 
43739 function () {
43740 if (this.xChildren == null || this.yChildren == null) {
43741 var n = this.target.getComponentCount ();
43742 this.xChildren =  new Array (n);
43743 this.yChildren =  new Array (n);
43744 for (var i = 0; i < n; i++) {
43745 var c = this.target.getComponent (i);
43746 var min = c.getMinimumSize ();
43747 var typ = c.getPreferredSize ();
43748 var max = c.getMaximumSize ();
43749 this.xChildren[i] =  new javax.swing.SizeRequirements (min.width, typ.width, max.width, c.getAlignmentX ());
43750 this.yChildren[i] =  new javax.swing.SizeRequirements (min.height, typ.height, max.height, c.getAlignmentY ());
43751 }
43752 this.xTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.xChildren);
43753 this.yTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.yChildren);
43754 }});
43755 });
43756 Clazz_declarePackage ("javax.swing");
43757 c$ = Clazz_decorateAsClass (function () {
43758 this.minimum = 0;
43759 this.preferred = 0;
43760 this.maximum = 0;
43761 this.alignment = 0;
43762 Clazz_instantialize (this, arguments);
43763 }, javax.swing, "SizeRequirements");
43764 Clazz_makeConstructor (c$, 
43765 function () {
43766 this.minimum = 0;
43767 this.preferred = 0;
43768 this.maximum = 0;
43769 this.alignment = 0.5;
43770 });
43771 Clazz_makeConstructor (c$, 
43772 function (min, pref, max, a) {
43773 this.minimum = min;
43774 this.preferred = pref;
43775 this.maximum = max;
43776 this.alignment = a > 1.0 ? 1.0 : a < 0.0 ? 0.0 : a;
43777 }, "~N,~N,~N,~N");
43778 Clazz_overrideMethod (c$, "toString", 
43779 function () {
43780 return "[" + this.minimum + "," + this.preferred + "," + this.maximum + "]@" + this.alignment;
43781 });
43782 c$.getTiledSizeRequirements = Clazz_defineMethod (c$, "getTiledSizeRequirements", 
43783 function (children) {
43784 var total =  new javax.swing.SizeRequirements ();
43785 for (var i = 0; i < children.length; i++) {
43786 var req = children[i];
43787 total.minimum = Math.min (total.minimum + req.minimum, 2147483647);
43788 total.preferred = Math.min (total.preferred + req.preferred, 2147483647);
43789 total.maximum = Math.min (total.maximum + req.maximum, 2147483647);
43790 }
43791 return total;
43792 }, "~A");
43793 c$.getAlignedSizeRequirements = Clazz_defineMethod (c$, "getAlignedSizeRequirements", 
43794 function (children) {
43795 var totalAscent =  new javax.swing.SizeRequirements ();
43796 var totalDescent =  new javax.swing.SizeRequirements ();
43797 for (var i = 0; i < children.length; i++) {
43798 var req = children[i];
43799 var ascent = Clazz_floatToInt (req.alignment * req.minimum);
43800 var descent = req.minimum - ascent;
43801 totalAscent.minimum = Math.max (ascent, totalAscent.minimum);
43802 totalDescent.minimum = Math.max (descent, totalDescent.minimum);
43803 ascent = Clazz_floatToInt (req.alignment * req.preferred);
43804 descent = req.preferred - ascent;
43805 totalAscent.preferred = Math.max (ascent, totalAscent.preferred);
43806 totalDescent.preferred = Math.max (descent, totalDescent.preferred);
43807 ascent = Clazz_floatToInt (req.alignment * req.maximum);
43808 descent = req.maximum - ascent;
43809 totalAscent.maximum = Math.max (ascent, totalAscent.maximum);
43810 totalDescent.maximum = Math.max (descent, totalDescent.maximum);
43811 }
43812 var min = Math.min (totalAscent.minimum + totalDescent.minimum, 2147483647);
43813 var pref = Math.min (totalAscent.preferred + totalDescent.preferred, 2147483647);
43814 var max = Math.min (totalAscent.maximum + totalDescent.maximum, 2147483647);
43815 var alignment = 0.0;
43816 if (min > 0) {
43817 alignment = totalAscent.minimum / min;
43818 alignment = alignment > 1.0 ? 1.0 : alignment < 0.0 ? 0.0 : alignment;
43819 }return  new javax.swing.SizeRequirements (min, pref, max, alignment);
43820 }, "~A");
43821 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43822 function (allocated, total, children, offsets, spans) {
43823 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, true);
43824 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
43825 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43826 function (allocated, total, children, offsets, spans, forward) {
43827 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, forward);
43828 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43829 c$.calcTiled = Clazz_defineMethod (c$, "calcTiled", 
43830 function (allocated, total, children, offsets, spans, forward) {
43831 var min = 0;
43832 var pref = 0;
43833 var max = 0;
43834 for (var i = 0; i < children.length; i++) {
43835 min += children[i].minimum;
43836 pref += children[i].preferred;
43837 max += children[i].maximum;
43838 }
43839 if (allocated >= pref) {
43840 javax.swing.SizeRequirements.expandedTile (allocated, min, pref, max, children, offsets, spans, forward);
43841 } else {
43842 javax.swing.SizeRequirements.compressedTile (allocated, min, pref, max, children, offsets, spans, forward);
43843 }}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43844 c$.compressedTile = Clazz_defineMethod (c$, "compressedTile", 
43845  function (allocated, min, pref, max, request, offsets, spans, forward) {
43846 var totalPlay = Math.min (pref - allocated, pref - min);
43847 var factor = (pref - min == 0) ? 0.0 : totalPlay / (pref - min);
43848 var totalOffset;
43849 if (forward) {
43850 totalOffset = 0;
43851 for (var i = 0; i < spans.length; i++) {
43852 offsets[i] = totalOffset;
43853 var req = request[i];
43854 var play = factor * (req.preferred - req.minimum);
43855 spans[i] = Clazz_floatToInt (req.preferred - play);
43856 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
43857 }
43858 } else {
43859 totalOffset = allocated;
43860 for (var i = 0; i < spans.length; i++) {
43861 var req = request[i];
43862 var play = factor * (req.preferred - req.minimum);
43863 spans[i] = Clazz_floatToInt (req.preferred - play);
43864 offsets[i] = totalOffset - spans[i];
43865 totalOffset = Math.max (totalOffset - spans[i], 0);
43866 }
43867 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
43868 c$.expandedTile = Clazz_defineMethod (c$, "expandedTile", 
43869  function (allocated, min, pref, max, request, offsets, spans, forward) {
43870 var totalPlay = Math.min (allocated - pref, max - pref);
43871 var factor = (max - pref == 0) ? 0.0 : totalPlay / (max - pref);
43872 var totalOffset;
43873 if (forward) {
43874 totalOffset = 0;
43875 for (var i = 0; i < spans.length; i++) {
43876 offsets[i] = totalOffset;
43877 var req = request[i];
43878 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
43879 spans[i] = Math.min (req.preferred + play, 2147483647);
43880 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
43881 }
43882 } else {
43883 totalOffset = allocated;
43884 for (var i = 0; i < spans.length; i++) {
43885 var req = request[i];
43886 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
43887 spans[i] = Math.min (req.preferred + play, 2147483647);
43888 offsets[i] = totalOffset - spans[i];
43889 totalOffset = Math.max (totalOffset - spans[i], 0);
43890 }
43891 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
43892 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
43893 function (allocated, total, children, offsets, spans) {
43894 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, true);
43895 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
43896 c$.calcAligned = Clazz_defineMethod (c$, "calcAligned", 
43897 function (allocated, total, children, offsets, spans, normal) {
43898 var totalAlignment = normal ? total.alignment : 1.0 - total.alignment;
43899 var totalAscent = Clazz_floatToInt (allocated * totalAlignment);
43900 var totalDescent = allocated - totalAscent;
43901 for (var i = 0; i < children.length; i++) {
43902 var req = children[i];
43903 var alignment = normal ? req.alignment : 1.0 - req.alignment;
43904 var maxAscent = Clazz_floatToInt (req.maximum * alignment);
43905 var maxDescent = req.maximum - maxAscent;
43906 var ascent = Math.min (totalAscent, maxAscent);
43907 var descent = Math.min (totalDescent, maxDescent);
43908 offsets[i] = totalAscent - ascent;
43909 spans[i] = Math.min (ascent + descent, 2147483647);
43910 }
43911 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43912 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
43913 function (allocated, total, children, offsets, spans, normal) {
43914 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, normal);
43915 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43916 c$.adjustSizes = Clazz_defineMethod (c$, "adjustSizes", 
43917 function (delta, children) {
43918 return  Clazz_newIntArray (0, 0);
43919 }, "~N,~A");
43920 Clazz_declarePackage ("javax.swing");
43921 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JLabel", ["java.lang.IllegalArgumentException", "javax.swing.SwingUtilities", "$.UIManager"], function () {
43922 c$ = Clazz_decorateAsClass (function () {
43923 this.mnemonic = '\0';
43924 this.mnemonicIndex = -1;
43925 this.text = "";
43926 this.defaultIcon = null;
43927 this.disabledIcon = null;
43928 this.disabledIconSet = false;
43929 this.verticalAlignment = 0;
43930 this.horizontalAlignment = 10;
43931 this.verticalTextPosition = 0;
43932 this.horizontalTextPosition = 11;
43933 this.iconTextGap = 4;
43934 this.labelFor = null;
43935 Clazz_instantialize (this, arguments);
43936 }, javax.swing, "JLabel", javax.swing.JComponent, javax.swing.SwingConstants);
43937 Clazz_makeConstructor (c$, 
43938 function (text, icon, horizontalAlignment) {
43939 Clazz_superConstructor (this, javax.swing.JLabel, []);
43940 this.setText (text);
43941 this.setIcon (icon);
43942 this.setHorizontalAlignment (horizontalAlignment);
43943 this.updateUI ();
43944 this.setAlignmentX (0.0);
43945 }, "~S,javax.swing.Icon,~N");
43946 Clazz_makeConstructor (c$, 
43947 function (text, horizontalAlignment) {
43948 this.construct (text, null, horizontalAlignment);
43949 }, "~S,~N");
43950 Clazz_makeConstructor (c$, 
43951 function (text) {
43952 this.construct (text, null, 10);
43953 }, "~S");
43954 Clazz_makeConstructor (c$, 
43955 function (image, horizontalAlignment) {
43956 this.construct (null, image, horizontalAlignment);
43957 }, "javax.swing.Icon,~N");
43958 Clazz_makeConstructor (c$, 
43959 function (image) {
43960 this.construct (null, image, 0);
43961 }, "javax.swing.Icon");
43962 Clazz_makeConstructor (c$, 
43963 function () {
43964 this.construct ("", null, 10);
43965 });
43966 Clazz_overrideMethod (c$, "getUI", 
43967 function () {
43968 return this.ui;
43969 });
43970 Clazz_defineMethod (c$, "setUI", 
43971 function (ui) {
43972 Clazz_superCall (this, javax.swing.JLabel, "setUI", [ui]);
43973 if (!this.disabledIconSet && this.disabledIcon != null) {
43974 this.setDisabledIcon (null);
43975 }}, "javax.swing.plaf.LabelUI");
43976 Clazz_overrideMethod (c$, "updateUI", 
43977 function () {
43978 this.setUI (javax.swing.UIManager.getUI (this));
43979 });
43980 Clazz_overrideMethod (c$, "getUIClassID", 
43981 function () {
43982 return "LabelUI";
43983 });
43984 Clazz_defineMethod (c$, "getText", 
43985 function () {
43986 return this.text;
43987 });
43988 Clazz_defineMethod (c$, "setText", 
43989 function (text) {
43990 var oldValue = this.text;
43991 this.text = text;
43992 this.firePropertyChangeObject ("text", oldValue, text);
43993 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, this.getDisplayedMnemonic ()));
43994 if (text == null || oldValue == null || !text.equals (oldValue)) {
43995 this.revalidate ();
43996 this.repaint ();
43997 }}, "~S");
43998 Clazz_defineMethod (c$, "getIcon", 
43999 function () {
44000 return this.defaultIcon;
44001 });
44002 Clazz_defineMethod (c$, "setIcon", 
44003 function (icon) {
44004 var oldValue = this.defaultIcon;
44005 this.defaultIcon = icon;
44006 if ((this.defaultIcon !== oldValue) && !this.disabledIconSet) {
44007 this.disabledIcon = null;
44008 }this.firePropertyChangeObject ("icon", oldValue, this.defaultIcon);
44009 if (this.defaultIcon !== oldValue) {
44010 if ((this.defaultIcon == null) || (oldValue == null) || (this.defaultIcon.getIconWidth () != oldValue.getIconWidth ()) || (this.defaultIcon.getIconHeight () != oldValue.getIconHeight ())) {
44011 this.revalidate ();
44012 }this.repaint ();
44013 }}, "javax.swing.Icon");
44014 Clazz_defineMethod (c$, "getDisabledIcon", 
44015 function () {
44016 if (!this.disabledIconSet && this.disabledIcon == null && this.defaultIcon != null) {
44017 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.defaultIcon);
44018 if (this.disabledIcon != null) {
44019 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
44020 }}return this.disabledIcon;
44021 });
44022 Clazz_defineMethod (c$, "setDisabledIcon", 
44023 function (disabledIcon) {
44024 var oldValue = this.disabledIcon;
44025 this.disabledIcon = disabledIcon;
44026 this.disabledIconSet = (disabledIcon != null);
44027 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
44028 if (disabledIcon !== oldValue) {
44029 if (disabledIcon == null || oldValue == null || disabledIcon.getIconWidth () != oldValue.getIconWidth () || disabledIcon.getIconHeight () != oldValue.getIconHeight ()) {
44030 this.revalidate ();
44031 }if (!this.isEnabled ()) {
44032 this.repaint ();
44033 }}}, "javax.swing.Icon");
44034 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44035 function (key) {
44036 var oldKey = this.mnemonic;
44037 this.mnemonic = key;
44038 this.firePropertyChangeInt ("displayedMnemonic", oldKey, this.mnemonic);
44039 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (this.getText (), this.mnemonic));
44040 if (key != oldKey) {
44041 this.revalidate ();
44042 this.repaint ();
44043 }}, "~N");
44044 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44045 function (aChar) {
44046 var vk = (aChar).charCodeAt (0);
44047 if (vk >= 97 && vk <= 122) vk -= (32);
44048 this.setDisplayedMnemonic (vk);
44049 }, "~S");
44050 Clazz_defineMethod (c$, "getDisplayedMnemonic", 
44051 function () {
44052 return this.mnemonic;
44053 });
44054 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
44055 function (index) {
44056 var oldValue = this.mnemonicIndex;
44057 if (index == -1) {
44058 this.mnemonicIndex = -1;
44059 } else {
44060 var text = this.getText ();
44061 var textLength = (text == null) ? 0 : text.length;
44062 if (index < -1 || index >= textLength) {
44063 throw  new IllegalArgumentException ("index == " + index);
44064 }}this.mnemonicIndex = index;
44065 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
44066 if (index != oldValue) {
44067 this.revalidate ();
44068 this.repaint ();
44069 }}, "~N");
44070 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
44071 function () {
44072 return this.mnemonicIndex;
44073 });
44074 Clazz_defineMethod (c$, "checkHorizontalKey", 
44075 function (key, message) {
44076 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
44077 return key;
44078 } else {
44079 throw  new IllegalArgumentException (message);
44080 }}, "~N,~S");
44081 Clazz_defineMethod (c$, "checkVerticalKey", 
44082 function (key, message) {
44083 if ((key == 1) || (key == 0) || (key == 3)) {
44084 return key;
44085 } else {
44086 throw  new IllegalArgumentException (message);
44087 }}, "~N,~S");
44088 Clazz_defineMethod (c$, "getIconTextGap", 
44089 function () {
44090 return this.iconTextGap;
44091 });
44092 Clazz_defineMethod (c$, "setIconTextGap", 
44093 function (iconTextGap) {
44094 var oldValue = this.iconTextGap;
44095 this.iconTextGap = iconTextGap;
44096 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
44097 if (iconTextGap != oldValue) {
44098 this.revalidate ();
44099 this.repaint ();
44100 }}, "~N");
44101 Clazz_defineMethod (c$, "getVerticalAlignment", 
44102 function () {
44103 return this.verticalAlignment;
44104 });
44105 Clazz_defineMethod (c$, "setVerticalAlignment", 
44106 function (alignment) {
44107 if (alignment == this.verticalAlignment) return;
44108 var oldValue = this.verticalAlignment;
44109 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
44110 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
44111 this.repaint ();
44112 }, "~N");
44113 Clazz_defineMethod (c$, "getHorizontalAlignment", 
44114 function () {
44115 return this.horizontalAlignment;
44116 });
44117 Clazz_defineMethod (c$, "setHorizontalAlignment", 
44118 function (alignment) {
44119 if (alignment == this.horizontalAlignment) return;
44120 var oldValue = this.horizontalAlignment;
44121 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
44122 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
44123 this.repaint ();
44124 }, "~N");
44125 Clazz_defineMethod (c$, "getVerticalTextPosition", 
44126 function () {
44127 return this.verticalTextPosition;
44128 });
44129 Clazz_defineMethod (c$, "setVerticalTextPosition", 
44130 function (textPosition) {
44131 if (textPosition == this.verticalTextPosition) return;
44132 var old = this.verticalTextPosition;
44133 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
44134 this.firePropertyChangeInt ("verticalTextPosition", old, this.verticalTextPosition);
44135 this.revalidate ();
44136 this.repaint ();
44137 }, "~N");
44138 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
44139 function () {
44140 return this.horizontalTextPosition;
44141 });
44142 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
44143 function (textPosition) {
44144 var old = this.horizontalTextPosition;
44145 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
44146 this.firePropertyChangeInt ("horizontalTextPosition", old, this.horizontalTextPosition);
44147 this.revalidate ();
44148 this.repaint ();
44149 }, "~N");
44150 Clazz_defineMethod (c$, "imageUpdate", 
44151 function (img, infoflags, x, y, w, h) {
44152 if (!this.isShowing () || !javax.swing.SwingUtilities.doesIconReferenceImage (this.getIcon (), img) && !javax.swing.SwingUtilities.doesIconReferenceImage (this.disabledIcon, img)) {
44153 return false;
44154 }return Clazz_superCall (this, javax.swing.JLabel, "imageUpdate", [img, infoflags, x, y, w, h]);
44155 }, "java.awt.Image,~N,~N,~N,~N,~N");
44156 Clazz_defineMethod (c$, "paramString", 
44157 function () {
44158 var textString = (this.text != null ? this.text : "");
44159 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
44160 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
44161 var labelForString = (this.labelFor != null ? this.labelFor.toString () : "");
44162 var verticalAlignmentString;
44163 if (this.verticalAlignment == 1) {
44164 verticalAlignmentString = "TOP";
44165 } else if (this.verticalAlignment == 0) {
44166 verticalAlignmentString = "CENTER";
44167 } else if (this.verticalAlignment == 3) {
44168 verticalAlignmentString = "BOTTOM";
44169 } else verticalAlignmentString = "";
44170 var horizontalAlignmentString;
44171 if (this.horizontalAlignment == 2) {
44172 horizontalAlignmentString = "LEFT";
44173 } else if (this.horizontalAlignment == 0) {
44174 horizontalAlignmentString = "CENTER";
44175 } else if (this.horizontalAlignment == 4) {
44176 horizontalAlignmentString = "RIGHT";
44177 } else if (this.horizontalAlignment == 10) {
44178 horizontalAlignmentString = "LEADING";
44179 } else if (this.horizontalAlignment == 11) {
44180 horizontalAlignmentString = "TRAILING";
44181 } else horizontalAlignmentString = "";
44182 var verticalTextPositionString;
44183 if (this.verticalTextPosition == 1) {
44184 verticalTextPositionString = "TOP";
44185 } else if (this.verticalTextPosition == 0) {
44186 verticalTextPositionString = "CENTER";
44187 } else if (this.verticalTextPosition == 3) {
44188 verticalTextPositionString = "BOTTOM";
44189 } else verticalTextPositionString = "";
44190 var horizontalTextPositionString;
44191 if (this.horizontalTextPosition == 2) {
44192 horizontalTextPositionString = "LEFT";
44193 } else if (this.horizontalTextPosition == 0) {
44194 horizontalTextPositionString = "CENTER";
44195 } else if (this.horizontalTextPosition == 4) {
44196 horizontalTextPositionString = "RIGHT";
44197 } else if (this.horizontalTextPosition == 10) {
44198 horizontalTextPositionString = "LEADING";
44199 } else if (this.horizontalTextPosition == 11) {
44200 horizontalTextPositionString = "TRAILING";
44201 } else horizontalTextPositionString = "";
44202 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;
44203 });
44204 Clazz_defineMethod (c$, "getLabelFor", 
44205 function () {
44206 return this.labelFor;
44207 });
44208 Clazz_defineMethod (c$, "setLabelFor", 
44209 function (c) {
44210 var oldC = this.labelFor;
44211 this.labelFor = c;
44212 this.firePropertyChangeObject ("labelFor", oldC, c);
44213 if (Clazz_instanceOf (oldC, javax.swing.JComponent)) {
44214 (oldC).putClientProperty ("labeledBy", null);
44215 }if (Clazz_instanceOf (c, javax.swing.JComponent)) {
44216 (c).putClientProperty ("labeledBy", this);
44217 }}, "java.awt.Component");
44218 Clazz_defineStatics (c$,
44219 "$uiClassID", "LabelUI",
44220 "LABELED_BY_PROPERTY", "labeledBy");
44221 });
44222 Clazz_declarePackage ("javax.swing.border");
44223 Clazz_declareInterface (javax.swing.border, "Border");
44224 Clazz_declarePackage ("javax.swing");
44225 Clazz_declareInterface (javax.swing, "RootPaneContainer");
44226 Clazz_declarePackage ("javax.swing.event");
44227 Clazz_load (["java.awt.event.MouseEvent"], "javax.swing.event.MenuDragMouseEvent", null, function () {
44228 c$ = Clazz_decorateAsClass (function () {
44229 this.path = null;
44230 this.manager = null;
44231 Clazz_instantialize (this, arguments);
44232 }, javax.swing.event, "MenuDragMouseEvent", java.awt.event.MouseEvent);
44233 Clazz_makeConstructor (c$, 
44234 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, p, m) {
44235 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, clickCount, popupTrigger]);
44236 this.path = p;
44237 this.manager = m;
44238 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44239 Clazz_makeConstructor (c$, 
44240 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, p, m) {
44241 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
44242 this.path = p;
44243 this.manager = m;
44244 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44245 Clazz_defineMethod (c$, "getPath", 
44246 function () {
44247 return this.path;
44248 });
44249 Clazz_defineMethod (c$, "getMenuSelectionManager", 
44250 function () {
44251 return this.manager;
44252 });
44253 });
44254 Clazz_declarePackage ("jssun.swing");
44255 Clazz_load (["javax.swing.Action"], "jssun.swing.UIAction", null, function () {
44256 c$ = Clazz_decorateAsClass (function () {
44257 this.name = null;
44258 Clazz_instantialize (this, arguments);
44259 }, jssun.swing, "UIAction", null, javax.swing.Action);
44260 Clazz_makeConstructor (c$, 
44261 function (name) {
44262 this.name = name;
44263 }, "~S");
44264 Clazz_defineMethod (c$, "getName", 
44265 function () {
44266 return this.name;
44267 });
44268 Clazz_overrideMethod (c$, "getValue", 
44269 function (key) {
44270 if (key === "Name") {
44271 return this.name;
44272 }return null;
44273 }, "~S");
44274 Clazz_overrideMethod (c$, "putValue", 
44275 function (key, value) {
44276 }, "~S,~O");
44277 Clazz_overrideMethod (c$, "setEnabled", 
44278 function (b) {
44279 }, "~B");
44280 Clazz_defineMethod (c$, "isEnabled", 
44281 function () {
44282 return this.isEnabled (null);
44283 });
44284 Clazz_defineMethod (c$, "isEnabled", 
44285 function (sender) {
44286 return true;
44287 }, "~O");
44288 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
44289 function (listener) {
44290 }, "java.beans.PropertyChangeListener");
44291 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
44292 function (listener) {
44293 }, "java.beans.PropertyChangeListener");
44294 });
44295 Clazz_declarePackage ("jssun.awt");
44296 Clazz_declareInterface (jssun.awt, "RequestFocusController");
44297 Clazz_declarePackage ("javax.swing");
44298 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 () {
44299 c$ = Clazz_decorateAsClass (function () {
44300 this.firstInvisibleAncestor = null;
44301 this.listenerList = null;
44302 this.root = null;
44303 Clazz_instantialize (this, arguments);
44304 }, javax.swing, "AncestorNotifier", null, [java.awt.event.ComponentListener, java.beans.PropertyChangeListener]);
44305 Clazz_prepareFields (c$, function () {
44306 this.listenerList =  new javax.swing.event.EventListenerList ();
44307 });
44308 Clazz_makeConstructor (c$, 
44309 function (root) {
44310 this.root = root;
44311 this.addListeners (root, true);
44312 }, "javax.swing.JComponent");
44313 Clazz_defineMethod (c$, "addAncestorListener", 
44314 function (l) {
44315 this.listenerList.add (javax.swing.event.AncestorListener, l);
44316 }, "javax.swing.event.AncestorListener");
44317 Clazz_defineMethod (c$, "removeAncestorListener", 
44318 function (l) {
44319 this.listenerList.remove (javax.swing.event.AncestorListener, l);
44320 }, "javax.swing.event.AncestorListener");
44321 Clazz_defineMethod (c$, "getAncestorListeners", 
44322 function () {
44323 return this.listenerList.getListeners (javax.swing.event.AncestorListener);
44324 });
44325 Clazz_defineMethod (c$, "fireAncestorAdded", 
44326 function (source, id, ancestor, ancestorParent) {
44327 var listeners = this.listenerList.getListenerList ();
44328 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44329 if (listeners[i] === javax.swing.event.AncestorListener) {
44330 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44331 (listeners[i + 1]).ancestorAdded (ancestorEvent);
44332 }}
44333 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44334 Clazz_defineMethod (c$, "fireAncestorRemoved", 
44335 function (source, id, ancestor, ancestorParent) {
44336 var listeners = this.listenerList.getListenerList ();
44337 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44338 if (listeners[i] === javax.swing.event.AncestorListener) {
44339 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44340 (listeners[i + 1]).ancestorRemoved (ancestorEvent);
44341 }}
44342 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44343 Clazz_defineMethod (c$, "fireAncestorMoved", 
44344 function (source, id, ancestor, ancestorParent) {
44345 var listeners = this.listenerList.getListenerList ();
44346 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44347 if (listeners[i] === javax.swing.event.AncestorListener) {
44348 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44349 (listeners[i + 1]).ancestorMoved (ancestorEvent);
44350 }}
44351 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44352 Clazz_defineMethod (c$, "removeAllListeners", 
44353 function () {
44354 this.removeListeners (this.root);
44355 });
44356 Clazz_defineMethod (c$, "addListeners", 
44357 function (ancestor, addToFirst) {
44358 var a;
44359 this.firstInvisibleAncestor = null;
44360 for (a = ancestor; this.firstInvisibleAncestor == null; a = a.getParent ()) {
44361 if (addToFirst || a !== ancestor) {
44362 a.addComponentListener (this);
44363 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44364 var jAncestor = a;
44365 jAncestor.addPropertyChangeListener (this);
44366 }}if (!a.isVisible () || a.getParent () == null || Clazz_instanceOf (a, java.awt.Window)) {
44367 this.firstInvisibleAncestor = a;
44368 }}
44369 if (Clazz_instanceOf (this.firstInvisibleAncestor, java.awt.Window) && this.firstInvisibleAncestor.isVisible ()) {
44370 this.firstInvisibleAncestor = null;
44371 }}, "java.awt.Component,~B");
44372 Clazz_defineMethod (c$, "removeListeners", 
44373 function (ancestor) {
44374 var a;
44375 for (a = ancestor; a != null; a = a.getParent ()) {
44376 a.removeComponentListener (this);
44377 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44378 var jAncestor = a;
44379 jAncestor.removePropertyChangeListener (this);
44380 }if (a === this.firstInvisibleAncestor || Clazz_instanceOf (a, java.awt.Window)) {
44381 break;
44382 }}
44383 }, "java.awt.Component");
44384 Clazz_overrideMethod (c$, "componentResized", 
44385 function (e) {
44386 }, "java.awt.event.ComponentEvent");
44387 Clazz_overrideMethod (c$, "componentMoved", 
44388 function (e) {
44389 var source = e.getComponent ();
44390 this.fireAncestorMoved (this.root, 3, source, source.getParent ());
44391 }, "java.awt.event.ComponentEvent");
44392 Clazz_overrideMethod (c$, "componentShown", 
44393 function (e) {
44394 var ancestor = e.getComponent ();
44395 if (ancestor === this.firstInvisibleAncestor) {
44396 this.addListeners (ancestor, false);
44397 if (this.firstInvisibleAncestor == null) {
44398 this.fireAncestorAdded (this.root, 1, ancestor, ancestor.getParent ());
44399 }}}, "java.awt.event.ComponentEvent");
44400 Clazz_overrideMethod (c$, "componentHidden", 
44401 function (e) {
44402 var ancestor = e.getComponent ();
44403 var needsNotify = this.firstInvisibleAncestor == null;
44404 if (!(Clazz_instanceOf (ancestor, java.awt.Window))) {
44405 this.removeListeners (ancestor.getParent ());
44406 }this.firstInvisibleAncestor = ancestor;
44407 if (needsNotify) {
44408 this.fireAncestorRemoved (this.root, 2, ancestor, ancestor.getParent ());
44409 }}, "java.awt.event.ComponentEvent");
44410 Clazz_overrideMethod (c$, "propertyChange", 
44411 function (evt) {
44412 var s = evt.getPropertyName ();
44413 if (s != null && (s.equals ("parent") || s.equals ("ancestor"))) {
44414 var component = evt.getSource ();
44415 if (evt.getNewValue () != null) {
44416 if (component === this.firstInvisibleAncestor) {
44417 this.addListeners (component, false);
44418 if (this.firstInvisibleAncestor == null) {
44419 this.fireAncestorAdded (this.root, 1, component, component.getParent ());
44420 }}} else {
44421 var needsNotify = this.firstInvisibleAncestor == null;
44422 var oldParent = evt.getOldValue ();
44423 this.removeListeners (oldParent);
44424 this.firstInvisibleAncestor = component;
44425 if (needsNotify) {
44426 this.fireAncestorRemoved (this.root, 2, component, oldParent);
44427 }}}}, "java.beans.PropertyChangeEvent");
44428 });
44429 Clazz_declarePackage ("javax.swing.event");
44430 Clazz_load (["java.awt.AWTEvent"], "javax.swing.event.AncestorEvent", null, function () {
44431 c$ = Clazz_decorateAsClass (function () {
44432 this.ancestor = null;
44433 this.ancestorParent = null;
44434 Clazz_instantialize (this, arguments);
44435 }, javax.swing.event, "AncestorEvent", java.awt.AWTEvent);
44436 Clazz_makeConstructor (c$, 
44437 function (source, id, ancestor, ancestorParent) {
44438 Clazz_superConstructor (this, javax.swing.event.AncestorEvent, [source, id]);
44439 this.ancestor = ancestor;
44440 this.ancestorParent = ancestorParent;
44441 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44442 Clazz_defineMethod (c$, "getAncestor", 
44443 function () {
44444 return this.ancestor;
44445 });
44446 Clazz_defineMethod (c$, "getAncestorParent", 
44447 function () {
44448 return this.ancestorParent;
44449 });
44450 Clazz_defineMethod (c$, "getComponent", 
44451 function () {
44452 return this.getSource ();
44453 });
44454 Clazz_defineStatics (c$,
44455 "ANCESTOR_ADDED", 1,
44456 "ANCESTOR_REMOVED", 2,
44457 "ANCESTOR_MOVED", 3);
44458 });
44459 Clazz_declarePackage ("javax.swing.event");
44460 Clazz_load (["java.util.EventListener"], "javax.swing.event.AncestorListener", null, function () {
44461 Clazz_declareInterface (javax.swing.event, "AncestorListener", java.util.EventListener);
44462 });
44463 Clazz_declarePackage ("javax.swing");
44464 Clazz_load (["java.lang.Enum"], "javax.swing.ClientPropertyKey", null, function () {
44465 c$ = Clazz_declareType (javax.swing, "ClientPropertyKey", Enum);
44466 Clazz_makeConstructor (c$, 
44467  function (reportValueNotSerializable) {
44468 }, "~B");
44469 Clazz_defineEnumConstant (c$, "JComponent_INPUT_VERIFIER", 0, [true]);
44470 Clazz_defineEnumConstant (c$, "JComponent_TRANSFER_HANDLER", 1, [true]);
44471 Clazz_defineEnumConstant (c$, "JComponent_ANCESTOR_NOTIFIER", 2, [true]);
44472 Clazz_defineEnumConstant (c$, "PopupFactory_FORCE_HEAVYWEIGHT_POPUP", 3, [true]);
44473 });
44474 Clazz_declarePackage ("javax.swing");
44475 Clazz_load (["java.awt.Dialog", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JDialog", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
44476 c$ = Clazz_decorateAsClass (function () {
44477 this.defaultCloseOperation = 1;
44478 this.rootPane = null;
44479 this.rootPaneCheckingEnabled = false;
44480 this.transferHandler = null;
44481 Clazz_instantialize (this, arguments);
44482 }, javax.swing, "JDialog", java.awt.Dialog, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
44483 Clazz_makeConstructor (c$, 
44484 function () {
44485 this.construct (Clazz_castNullAs ("java.awt.Frame"), false);
44486 });
44487 Clazz_makeConstructor (c$, 
44488 function (owner) {
44489 this.construct (owner, false);
44490 }, "java.awt.Frame");
44491 Clazz_makeConstructor (c$, 
44492 function (owner, modal) {
44493 this.construct (owner, null, modal);
44494 }, "java.awt.Frame,~B");
44495 Clazz_makeConstructor (c$, 
44496 function (owner, title) {
44497 this.construct (owner, title, false);
44498 }, "java.awt.Frame,~S");
44499 Clazz_makeConstructor (c$, 
44500 function (owner, title, modal) {
44501 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal]);
44502 if (owner == null) {
44503 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44504 this.addWindowListener (ownerShutdownListener);
44505 }this.dialogInit ();
44506 }, "java.awt.Frame,~S,~B");
44507 Clazz_makeConstructor (c$, 
44508 function (owner, title, modal, gc) {
44509 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal, gc]);
44510 if (owner == null) {
44511 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44512 this.addWindowListener (ownerShutdownListener);
44513 }this.dialogInit ();
44514 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44515 Clazz_makeConstructor (c$, 
44516 function (owner) {
44517 this.construct (owner, false);
44518 }, "java.awt.Dialog");
44519 Clazz_makeConstructor (c$, 
44520 function (owner, modal) {
44521 this.construct (owner, null, modal);
44522 }, "java.awt.Dialog,~B");
44523 Clazz_makeConstructor (c$, 
44524 function (owner, title) {
44525 this.construct (owner, title, false);
44526 }, "java.awt.Dialog,~S");
44527 Clazz_makeConstructor (c$, 
44528 function (owner, title, modal) {
44529 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal]);
44530 this.dialogInit ();
44531 }, "java.awt.Dialog,~S,~B");
44532 Clazz_makeConstructor (c$, 
44533 function (owner, title, modal, gc) {
44534 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal, gc]);
44535 this.dialogInit ();
44536 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44537 Clazz_makeConstructor (c$, 
44538 function (owner) {
44539 this.construct (owner, java.awt.Dialog.ModalityType.MODELESS);
44540 }, "java.awt.Window");
44541 Clazz_makeConstructor (c$, 
44542 function (owner, modalityType) {
44543 this.construct (owner, null, modalityType);
44544 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44545 Clazz_makeConstructor (c$, 
44546 function (owner, title) {
44547 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44548 }, "java.awt.Window,~S");
44549 Clazz_makeConstructor (c$, 
44550 function (owner, title, modalityType) {
44551 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType]);
44552 this.dialogInit ();
44553 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44554 Clazz_makeConstructor (c$, 
44555 function (owner, title, modalityType, gc) {
44556 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType, gc]);
44557 this.dialogInit ();
44558 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44559 Clazz_defineMethod (c$, "dialogInit", 
44560 function () {
44561 this.enableEvents (72);
44562 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
44563 this.setRootPane (this.createRootPane ());
44564 this.setRootPaneCheckingEnabled (true);
44565 if (javax.swing.JDialog.isDefaultLookAndFeelDecorated ()) {
44566 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
44567 if (supportsWindowDecorations) {
44568 this.setUndecorated (true);
44569 this.getRootPane ().setWindowDecorationStyle (2);
44570 }}});
44571 Clazz_defineMethod (c$, "createRootPane", 
44572 function () {
44573 var rp =  new javax.swing.JRootPane ();
44574 rp.setOpaque (true);
44575 return rp;
44576 });
44577 Clazz_defineMethod (c$, "processWindowEvent", 
44578 function (e) {
44579 Clazz_superCall (this, javax.swing.JDialog, "processWindowEvent", [e]);
44580 if (e.getID () == 201) {
44581 switch (this.defaultCloseOperation) {
44582 case 1:
44583 this.setVisible (false);
44584 break;
44585 case 2:
44586 this.dispose ();
44587 break;
44588 case 0:
44589 default:
44590 break;
44591 }
44592 }}, "java.awt.event.WindowEvent");
44593 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
44594 function (operation) {
44595 if (operation != 0 && operation != 1 && operation != 2) {
44596 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");
44597 }var oldValue = this.defaultCloseOperation;
44598 this.defaultCloseOperation = operation;
44599 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
44600 }, "~N");
44601 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
44602 function () {
44603 return this.defaultCloseOperation;
44604 });
44605 Clazz_defineMethod (c$, "setTransferHandler", 
44606 function (newHandler) {
44607 var oldHandler = this.transferHandler;
44608 this.transferHandler = newHandler;
44609 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
44610 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
44611 }, "javax.swing.TransferHandler");
44612 Clazz_defineMethod (c$, "getTransferHandler", 
44613 function () {
44614 return this.transferHandler;
44615 });
44616 Clazz_overrideMethod (c$, "update", 
44617 function (g) {
44618 this.paint (g);
44619 }, "java.awt.Graphics");
44620 Clazz_defineMethod (c$, "setJMenuBar", 
44621 function (menu) {
44622 this.getRootPane ().setMenuBar (menu);
44623 }, "javax.swing.JMenuBar");
44624 Clazz_defineMethod (c$, "getJMenuBar", 
44625 function () {
44626 return this.getRootPane ().getMenuBar ();
44627 });
44628 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
44629 function () {
44630 return this.rootPaneCheckingEnabled;
44631 });
44632 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
44633 function (enabled) {
44634 this.rootPaneCheckingEnabled = enabled;
44635 }, "~B");
44636 Clazz_overrideMethod (c$, "addImpl", 
44637 function (comp, constraints, index) {
44638 if (this.isRootPaneCheckingEnabled ()) {
44639 return this.getContentPane ().add (comp, constraints, index);
44640 }return this.addImplSAEM (comp, constraints, index);
44641 }, "java.awt.Component,~O,~N");
44642 Clazz_defineMethod (c$, "remove", 
44643 function (comp) {
44644 if (comp === this.rootPane) {
44645 this.removeChild (comp);
44646 } else {
44647 this.getContentPane ().removeChild (comp);
44648 }}, "java.awt.Component");
44649 Clazz_defineMethod (c$, "setLayout", 
44650 function (manager) {
44651 if (this.isRootPaneCheckingEnabled ()) {
44652 this.getContentPane ().setLayout (manager);
44653 } else {
44654 Clazz_superCall (this, javax.swing.JDialog, "setLayout", [manager]);
44655 }}, "java.awt.LayoutManager");
44656 Clazz_overrideMethod (c$, "getRootPane", 
44657 function () {
44658 return this.rootPane;
44659 });
44660 Clazz_defineMethod (c$, "setRootPane", 
44661 function (root) {
44662 if (this.rootPane != null) {
44663 this.remove (this.rootPane);
44664 }this.rootPane = root;
44665 if (this.rootPane != null) {
44666 var checkingEnabled = this.isRootPaneCheckingEnabled ();
44667 try {
44668 this.setRootPaneCheckingEnabled (false);
44669 this.add (this.rootPane, "Center");
44670 } finally {
44671 this.setRootPaneCheckingEnabled (checkingEnabled);
44672 }
44673 }}, "javax.swing.JRootPane");
44674 Clazz_overrideMethod (c$, "getContentPane", 
44675 function () {
44676 return this.getRootPane ().getContentPane ();
44677 });
44678 Clazz_overrideMethod (c$, "setContentPane", 
44679 function (contentPane) {
44680 this.getRootPane ().setContentPane (contentPane);
44681 }, "java.awt.Container");
44682 Clazz_overrideMethod (c$, "getLayeredPane", 
44683 function () {
44684 return this.getRootPane ().getLayeredPane ();
44685 });
44686 Clazz_overrideMethod (c$, "setLayeredPane", 
44687 function (layeredPane) {
44688 this.getRootPane ().setLayeredPane (layeredPane);
44689 }, "javax.swing.JLayeredPane");
44690 Clazz_overrideMethod (c$, "getGlassPane", 
44691 function () {
44692 return this.getRootPane ().getGlassPane ();
44693 });
44694 Clazz_overrideMethod (c$, "setGlassPane", 
44695 function (glassPane) {
44696 this.getRootPane ().setGlassPane (glassPane);
44697 }, "java.awt.Component");
44698 Clazz_defineMethod (c$, "getGraphics", 
44699 function () {
44700 javax.swing.JComponent.getGraphicsInvoked (this);
44701 return Clazz_superCall (this, javax.swing.JDialog, "getGraphics", []);
44702 });
44703 Clazz_defineMethod (c$, "repaint", 
44704 function (time, x, y, width, height) {
44705 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
44706 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
44707 } else {
44708 Clazz_superCall (this, javax.swing.JDialog, "repaint", [time, x, y, width, height]);
44709 }}, "~N,~N,~N,~N,~N");
44710 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
44711 function (defaultLookAndFeelDecorated) {
44712 if (defaultLookAndFeelDecorated) {
44713 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
44714 } else {
44715 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
44716 }}, "~B");
44717 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
44718 function () {
44719 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JDialog.defaultLookAndFeelDecoratedKey);
44720 if (defaultLookAndFeelDecorated == null) {
44721 defaultLookAndFeelDecorated = Boolean.FALSE;
44722 }return defaultLookAndFeelDecorated.booleanValue ();
44723 });
44724 Clazz_defineMethod (c$, "paramString", 
44725 function () {
44726 var defaultCloseOperationString;
44727 if (this.defaultCloseOperation == 1) {
44728 defaultCloseOperationString = "HIDE_ON_CLOSE";
44729 } else if (this.defaultCloseOperation == 2) {
44730 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
44731 } else if (this.defaultCloseOperation == 0) {
44732 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
44733 } else defaultCloseOperationString = "";
44734 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
44735 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
44736 return Clazz_superCall (this, javax.swing.JDialog, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
44737 });
44738 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
44739 });
44740 Clazz_declarePackage ("java.awt");
44741 Clazz_load (["java.lang.Enum", "java.awt.Window"], "java.awt.Dialog", ["java.lang.IllegalArgumentException", "java.awt.Frame", "$.IllegalComponentStateException"], function () {
44742 c$ = Clazz_decorateAsClass (function () {
44743 this.resizable = true;
44744 this.undecorated = false;
44745 this.modal = false;
44746 this.modalityType = null;
44747 this.title = null;
44748 this.isInHide = false;
44749 this.isInDispose = false;
44750 Clazz_instantialize (this, arguments);
44751 }, java.awt, "Dialog", java.awt.Window);
44752 Clazz_makeConstructor (c$, 
44753 function (owner) {
44754 this.construct (owner, "", false);
44755 }, "java.awt.Frame");
44756 Clazz_makeConstructor (c$, 
44757 function (owner, modal) {
44758 this.construct (owner, "", modal);
44759 }, "java.awt.Frame,~B");
44760 Clazz_makeConstructor (c$, 
44761 function (owner, title) {
44762 this.construct (owner, title, false);
44763 }, "java.awt.Frame,~S");
44764 Clazz_makeConstructor (c$, 
44765 function (owner, title, modal) {
44766 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44767 }, "java.awt.Frame,~S,~B");
44768 Clazz_makeConstructor (c$, 
44769 function (owner, title, modal, gc) {
44770 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44771 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44772 Clazz_makeConstructor (c$, 
44773 function (owner) {
44774 this.construct (owner, "", false);
44775 }, "java.awt.Dialog");
44776 Clazz_makeConstructor (c$, 
44777 function (owner, title) {
44778 this.construct (owner, title, false);
44779 }, "java.awt.Dialog,~S");
44780 Clazz_makeConstructor (c$, 
44781 function (owner, title, modal) {
44782 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44783 }, "java.awt.Dialog,~S,~B");
44784 Clazz_makeConstructor (c$, 
44785 function (owner, title, modal, gc) {
44786 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44787 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44788 Clazz_makeConstructor (c$, 
44789 function (owner) {
44790 this.construct (owner, null, java.awt.Dialog.ModalityType.MODELESS);
44791 }, "java.awt.Window");
44792 Clazz_makeConstructor (c$, 
44793 function (owner, title) {
44794 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44795 }, "java.awt.Window,~S");
44796 Clazz_makeConstructor (c$, 
44797 function (owner, modalityType) {
44798 this.construct (owner, null, modalityType);
44799 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44800 Clazz_makeConstructor (c$, 
44801 function (owner, title, modalityType) {
44802 Clazz_superConstructor (this, java.awt.Dialog, [owner]);
44803 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44804 throw  new IllegalArgumentException ("Wrong parent window");
44805 }this.title = title;
44806 this.setModalityType (modalityType);
44807 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44808 Clazz_makeConstructor (c$, 
44809 function (owner, title, modalityType, gc) {
44810 Clazz_superConstructor (this, java.awt.Dialog, [owner, gc]);
44811 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44812 throw  new IllegalArgumentException ("wrong owner window");
44813 }this.title = title;
44814 this.setModalityType (modalityType);
44815 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44816 Clazz_overrideMethod (c$, "constructComponentName", 
44817 function () {
44818 {
44819 return "dialog" + java.awt.Dialog.$nameCounter++;
44820 }});
44821 Clazz_defineMethod (c$, "addNotify", 
44822 function () {
44823 {
44824 if (this.parent != null) {
44825 this.parent.addNotify ();
44826 }Clazz_superCall (this, java.awt.Dialog, "addNotify", []);
44827 }});
44828 Clazz_defineMethod (c$, "isModal", 
44829 function () {
44830 return this.isModal_NoClientCode ();
44831 });
44832 Clazz_defineMethod (c$, "isModal_NoClientCode", 
44833 function () {
44834 return this.modalityType !== java.awt.Dialog.ModalityType.MODELESS;
44835 });
44836 Clazz_defineMethod (c$, "setModal", 
44837 function (modal) {
44838 this.modal = modal;
44839 this.setModalityType (modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44840 }, "~B");
44841 Clazz_defineMethod (c$, "getModalityType", 
44842 function () {
44843 return this.modalityType;
44844 });
44845 Clazz_defineMethod (c$, "setModalityType", 
44846 function (type) {
44847 if (type == null) {
44848 type = java.awt.Dialog.ModalityType.MODELESS;
44849 }if (this.modalityType === type) {
44850 return;
44851 }this.checkModalityPermission (type);
44852 this.modalityType = type;
44853 this.modal = (this.modalityType !== java.awt.Dialog.ModalityType.MODELESS);
44854 }, "java.awt.Dialog.ModalityType");
44855 Clazz_defineMethod (c$, "getTitle", 
44856 function () {
44857 return this.title;
44858 });
44859 Clazz_defineMethod (c$, "setTitle", 
44860 function (title) {
44861 var oldTitle = this.title;
44862 {
44863 this.title = title;
44864 }this.firePropertyChangeObject ("title", oldTitle, title);
44865 }, "~S");
44866 Clazz_defineMethod (c$, "show", 
44867 function () {
44868 });
44869 Clazz_defineMethod (c$, "modalityPushed", 
44870 function () {
44871 });
44872 Clazz_defineMethod (c$, "modalityPopped", 
44873 function () {
44874 });
44875 Clazz_defineMethod (c$, "interruptBlocking", 
44876 function () {
44877 if (this.isModal ()) {
44878 this.disposeImpl ();
44879 } else if (this.windowClosingException != null) {
44880 this.windowClosingException.fillInStackTrace ();
44881 this.windowClosingException.printStackTrace ();
44882 this.windowClosingException = null;
44883 }});
44884 Clazz_defineMethod (c$, "hideAndDisposePreHandler", 
44885  function () {
44886 this.isInHide = true;
44887 });
44888 Clazz_defineMethod (c$, "hideAndDisposeHandler", 
44889  function () {
44890 this.isInHide = false;
44891 });
44892 Clazz_defineMethod (c$, "hide", 
44893 function () {
44894 this.hideAndDisposePreHandler ();
44895 Clazz_superCall (this, java.awt.Dialog, "hide", []);
44896 if (!this.isInDispose) {
44897 this.hideAndDisposeHandler ();
44898 }});
44899 Clazz_defineMethod (c$, "doDispose", 
44900 function () {
44901 this.isInDispose = true;
44902 Clazz_superCall (this, java.awt.Dialog, "doDispose", []);
44903 this.hideAndDisposeHandler ();
44904 this.isInDispose = false;
44905 });
44906 Clazz_defineMethod (c$, "isResizable", 
44907 function () {
44908 return this.resizable;
44909 });
44910 Clazz_defineMethod (c$, "setResizable", 
44911 function (resizable) {
44912 var testvalid = false;
44913 {
44914 this.resizable = resizable;
44915 }if (testvalid) {
44916 this.invalidateIfValid ();
44917 }}, "~B");
44918 Clazz_defineMethod (c$, "setUndecorated", 
44919 function (undecorated) {
44920 {
44921 if (this.isDisplayable ()) {
44922 throw  new java.awt.IllegalComponentStateException ("The dialog is displayable.");
44923 }this.undecorated = undecorated;
44924 }}, "~B");
44925 Clazz_defineMethod (c$, "isUndecorated", 
44926 function () {
44927 return this.undecorated;
44928 });
44929 Clazz_defineMethod (c$, "paramString", 
44930 function () {
44931 var str = Clazz_superCall (this, java.awt.Dialog, "paramString", []) + "," + this.modalityType;
44932 if (this.title != null) {
44933 str += ",title=" + this.title;
44934 }return str;
44935 });
44936 Clazz_defineMethod (c$, "modalShow", 
44937 function () {
44938 });
44939 Clazz_defineMethod (c$, "modalHide", 
44940 function () {
44941 });
44942 Clazz_defineMethod (c$, "shouldBlock", 
44943 function (w) {
44944 if (!this.isVisible_NoClientCode () || (!w.isVisible_NoClientCode () && !w.isInShow) || this.isInHide || (w === this) || !this.isModal_NoClientCode ()) {
44945 return false;
44946 }if ((Clazz_instanceOf (w, java.awt.Dialog)) && (w).isInHide) {
44947 return false;
44948 }var blockerToCheck = this;
44949 while (blockerToCheck != null) {
44950 var c = w;
44951 while ((c != null) && (c !== blockerToCheck)) {
44952 c = c.getParent_NoClientCode ();
44953 }
44954 if (c === blockerToCheck) {
44955 return false;
44956 }blockerToCheck = blockerToCheck.getModalBlocker ();
44957 }
44958 switch (this.modalityType) {
44959 case java.awt.Dialog.ModalityType.MODELESS:
44960 return false;
44961 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
44962 if (w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
44963 var c = this;
44964 while ((c != null) && (c !== w)) {
44965 c = c.getParent_NoClientCode ();
44966 }
44967 return c === w;
44968 } else {
44969 return this.getDocumentRoot () === w.getDocumentRoot ();
44970 }case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
44971 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE) && (this.appContext === w.appContext);
44972 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
44973 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
44974 }
44975 return false;
44976 }, "java.awt.Window");
44977 Clazz_defineMethod (c$, "checkModalityPermission", 
44978  function (mt) {
44979 }, "java.awt.Dialog.ModalityType");
44980 Clazz_pu$h(self.c$);
44981 c$ = Clazz_declareType (java.awt.Dialog, "ModalityType", Enum);
44982 Clazz_defineEnumConstant (c$, "MODELESS", 0, []);
44983 Clazz_defineEnumConstant (c$, "DOCUMENT_MODAL", 1, []);
44984 Clazz_defineEnumConstant (c$, "APPLICATION_MODAL", 2, []);
44985 Clazz_defineEnumConstant (c$, "TOOLKIT_MODAL", 3, []);
44986 c$ = Clazz_p0p ();
44987 Clazz_pu$h(self.c$);
44988 c$ = Clazz_declareType (java.awt.Dialog, "ModalExclusionType", Enum);
44989 Clazz_defineEnumConstant (c$, "NO_EXCLUDE", 0, []);
44990 Clazz_defineEnumConstant (c$, "APPLICATION_EXCLUDE", 1, []);
44991 Clazz_defineEnumConstant (c$, "TOOLKIT_EXCLUDE", 2, []);
44992 c$ = Clazz_p0p ();
44993 c$.DEFAULT_MODALITY_TYPE = c$.prototype.DEFAULT_MODALITY_TYPE = java.awt.Dialog.ModalityType.APPLICATION_MODAL;
44994 Clazz_defineStatics (c$,
44995 "$base", "dialog",
44996 "$nameCounter", 0);
44997 });
44998 Clazz_declarePackage ("javax.swing");
44999 c$ = Clazz_declareInterface (javax.swing, "WindowConstants");
45000 Clazz_defineStatics (c$,
45001 "DO_NOTHING_ON_CLOSE", 0,
45002 "HIDE_ON_CLOSE", 1,
45003 "DISPOSE_ON_CLOSE", 2,
45004 "EXIT_ON_CLOSE", 3);
45005 Clazz_declarePackage ("javax.swing");
45006 Clazz_load (["java.awt.Frame", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JFrame", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
45007 c$ = Clazz_decorateAsClass (function () {
45008 this.defaultCloseOperation = 1;
45009 this.transferHandler = null;
45010 this.rootPane = null;
45011 this.rootPaneCheckingEnabled = false;
45012 Clazz_instantialize (this, arguments);
45013 }, javax.swing, "JFrame", java.awt.Frame, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
45014 Clazz_makeConstructor (c$, 
45015 function () {
45016 Clazz_superConstructor (this, javax.swing.JFrame);
45017 this.frameInit ();
45018 });
45019 Clazz_makeConstructor (c$, 
45020 function (gc) {
45021 Clazz_superConstructor (this, javax.swing.JFrame, [gc]);
45022 this.frameInit ();
45023 }, "java.awt.GraphicsConfiguration");
45024 Clazz_makeConstructor (c$, 
45025 function (title) {
45026 Clazz_superConstructor (this, javax.swing.JFrame, [title]);
45027 this.frameInit ();
45028 }, "~S");
45029 Clazz_makeConstructor (c$, 
45030 function (title, gc) {
45031 Clazz_superConstructor (this, javax.swing.JFrame, [title, gc]);
45032 this.frameInit ();
45033 }, "~S,java.awt.GraphicsConfiguration");
45034 Clazz_defineMethod (c$, "frameInit", 
45035 function () {
45036 this.enableEvents (72);
45037 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45038 this.setRootPane (this.createRootPane ());
45039 this.setBackground (javax.swing.UIManager.getColor ("control"));
45040 this.setRootPaneCheckingEnabled (true);
45041 if (javax.swing.JFrame.isDefaultLookAndFeelDecorated ()) {
45042 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
45043 if (supportsWindowDecorations) {
45044 this.setUndecorated (true);
45045 this.getRootPane ().setWindowDecorationStyle (1);
45046 }}});
45047 Clazz_defineMethod (c$, "createRootPane", 
45048 function () {
45049 var rp =  new javax.swing.JRootPane ();
45050 rp.setOpaque (true);
45051 return rp;
45052 });
45053 Clazz_defineMethod (c$, "processWindowEvent", 
45054 function (e) {
45055 Clazz_superCall (this, javax.swing.JFrame, "processWindowEvent", [e]);
45056 if (e.getID () == 201) {
45057 switch (this.defaultCloseOperation) {
45058 case 1:
45059 this.setVisible (false);
45060 break;
45061 case 2:
45062 this.dispose ();
45063 break;
45064 case 0:
45065 default:
45066 break;
45067 case 3:
45068 System.exit (0);
45069 break;
45070 }
45071 }}, "java.awt.event.WindowEvent");
45072 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
45073 function (operation) {
45074 if (operation != 0 && operation != 1 && operation != 2 && operation != 3) {
45075 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE");
45076 }if (this.defaultCloseOperation != operation) {
45077 if (operation == 3) {
45078 var security = System.getSecurityManager ();
45079 if (security != null) {
45080 security.checkExit (0);
45081 }}var oldValue = this.defaultCloseOperation;
45082 this.defaultCloseOperation = operation;
45083 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
45084 }}, "~N");
45085 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
45086 function () {
45087 return this.defaultCloseOperation;
45088 });
45089 Clazz_defineMethod (c$, "setTransferHandler", 
45090 function (newHandler) {
45091 var oldHandler = this.transferHandler;
45092 this.transferHandler = newHandler;
45093 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45094 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45095 }, "javax.swing.TransferHandler");
45096 Clazz_defineMethod (c$, "getTransferHandler", 
45097 function () {
45098 return this.transferHandler;
45099 });
45100 Clazz_overrideMethod (c$, "update", 
45101 function (g) {
45102 this.paint (g);
45103 }, "java.awt.Graphics");
45104 Clazz_defineMethod (c$, "setJMenuBar", 
45105 function (menubar) {
45106 this.getRootPane ().setMenuBar (menubar);
45107 }, "javax.swing.JMenuBar");
45108 Clazz_defineMethod (c$, "getJMenuBar", 
45109 function () {
45110 return this.getRootPane ().getMenuBar ();
45111 });
45112 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45113 function () {
45114 return this.rootPaneCheckingEnabled;
45115 });
45116 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45117 function (enabled) {
45118 this.rootPaneCheckingEnabled = enabled;
45119 }, "~B");
45120 Clazz_overrideMethod (c$, "addImpl", 
45121 function (comp, constraints, index) {
45122 if (this.isRootPaneCheckingEnabled ()) {
45123 return this.getContentPane ().add (comp, constraints, index);
45124 }return this.addImplSAEM (comp, constraints, index);
45125 }, "java.awt.Component,~O,~N");
45126 Clazz_defineMethod (c$, "remove", 
45127 function (comp) {
45128 if (comp === this.rootPane) {
45129 this.removeChild (comp);
45130 } else {
45131 this.getContentPane ().removeChild (comp);
45132 }}, "java.awt.Component");
45133 Clazz_defineMethod (c$, "setLayout", 
45134 function (manager) {
45135 if (this.isRootPaneCheckingEnabled ()) {
45136 this.getContentPane ().setLayout (manager);
45137 } else {
45138 Clazz_superCall (this, javax.swing.JFrame, "setLayout", [manager]);
45139 }}, "java.awt.LayoutManager");
45140 Clazz_overrideMethod (c$, "getRootPane", 
45141 function () {
45142 return this.rootPane;
45143 });
45144 Clazz_defineMethod (c$, "setRootPane", 
45145 function (root) {
45146 if (this.rootPane != null) {
45147 this.remove (this.rootPane);
45148 }this.rootPane = root;
45149 if (this.rootPane != null) {
45150 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45151 try {
45152 this.setRootPaneCheckingEnabled (false);
45153 this.add (this.rootPane, "Center");
45154 } finally {
45155 this.setRootPaneCheckingEnabled (checkingEnabled);
45156 }
45157 }}, "javax.swing.JRootPane");
45158 Clazz_overrideMethod (c$, "getContentPane", 
45159 function () {
45160 return this.getRootPane ().getContentPane ();
45161 });
45162 Clazz_overrideMethod (c$, "setContentPane", 
45163 function (contentPane) {
45164 this.getRootPane ().setContentPane (contentPane);
45165 }, "java.awt.Container");
45166 Clazz_overrideMethod (c$, "getLayeredPane", 
45167 function () {
45168 return this.getRootPane ().getLayeredPane ();
45169 });
45170 Clazz_overrideMethod (c$, "setLayeredPane", 
45171 function (layeredPane) {
45172 this.getRootPane ().setLayeredPane (layeredPane);
45173 }, "javax.swing.JLayeredPane");
45174 Clazz_overrideMethod (c$, "getGlassPane", 
45175 function () {
45176 return this.getRootPane ().getGlassPane ();
45177 });
45178 Clazz_overrideMethod (c$, "setGlassPane", 
45179 function (glassPane) {
45180 this.getRootPane ().setGlassPane (glassPane);
45181 }, "java.awt.Component");
45182 Clazz_defineMethod (c$, "getGraphics", 
45183 function () {
45184 javax.swing.JComponent.getGraphicsInvoked (this);
45185 return Clazz_superCall (this, javax.swing.JFrame, "getGraphics", []);
45186 });
45187 Clazz_defineMethod (c$, "repaint", 
45188 function (time, x, y, width, height) {
45189 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45190 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45191 } else {
45192 Clazz_superCall (this, javax.swing.JFrame, "repaint", [time, x, y, width, height]);
45193 }}, "~N,~N,~N,~N,~N");
45194 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
45195 function (defaultLookAndFeelDecorated) {
45196 if (defaultLookAndFeelDecorated) {
45197 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
45198 } else {
45199 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
45200 }}, "~B");
45201 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
45202 function () {
45203 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JFrame.defaultLookAndFeelDecoratedKey);
45204 if (defaultLookAndFeelDecorated == null) {
45205 defaultLookAndFeelDecorated = Boolean.FALSE;
45206 }return defaultLookAndFeelDecorated.booleanValue ();
45207 });
45208 Clazz_defineMethod (c$, "paramString", 
45209 function () {
45210 var defaultCloseOperationString;
45211 if (this.defaultCloseOperation == 1) {
45212 defaultCloseOperationString = "HIDE_ON_CLOSE";
45213 } else if (this.defaultCloseOperation == 2) {
45214 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
45215 } else if (this.defaultCloseOperation == 0) {
45216 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
45217 } else if (this.defaultCloseOperation == 3) {
45218 defaultCloseOperationString = "EXIT_ON_CLOSE";
45219 } else defaultCloseOperationString = "";
45220 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
45221 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45222 return Clazz_superCall (this, javax.swing.JFrame, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45223 });
45224 Clazz_defineStatics (c$,
45225 "EXIT_ON_CLOSE", 3);
45226 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
45227 });
45228 Clazz_declarePackage ("javax.swing");
45229 Clazz_load (["java.awt.Window", "javax.swing.RootPaneContainer"], "javax.swing.JWindow", ["javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
45230 c$ = Clazz_decorateAsClass (function () {
45231 this.rootPane = null;
45232 this.rootPaneCheckingEnabled = false;
45233 this.transferHandler = null;
45234 Clazz_instantialize (this, arguments);
45235 }, javax.swing, "JWindow", java.awt.Window, javax.swing.RootPaneContainer);
45236 Clazz_makeConstructor (c$, 
45237 function () {
45238 this.construct (Clazz_castNullAs ("java.awt.Frame"));
45239 });
45240 Clazz_makeConstructor (c$, 
45241 function (gc) {
45242 this.construct (null, gc);
45243 Clazz_superCall (this, javax.swing.JWindow, "setFocusableWindowState", [false]);
45244 }, "java.awt.GraphicsConfiguration");
45245 Clazz_makeConstructor (c$, 
45246 function (owner) {
45247 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45248 if (owner == null) {
45249 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45250 this.addWindowListener (ownerShutdownListener);
45251 }this.windowInit ();
45252 }, "java.awt.Frame");
45253 Clazz_makeConstructor (c$, 
45254 function (owner) {
45255 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45256 if (owner == null) {
45257 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45258 this.addWindowListener (ownerShutdownListener);
45259 }this.windowInit ();
45260 }, "java.awt.Window");
45261 Clazz_makeConstructor (c$, 
45262 function (owner, gc) {
45263 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, gc]);
45264 if (owner == null) {
45265 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45266 this.addWindowListener (ownerShutdownListener);
45267 }this.windowInit ();
45268 }, "java.awt.Window,java.awt.GraphicsConfiguration");
45269 Clazz_defineMethod (c$, "windowInit", 
45270 function () {
45271 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45272 this.setRootPane (this.createRootPane ());
45273 this.setRootPaneCheckingEnabled (true);
45274 });
45275 Clazz_defineMethod (c$, "createRootPane", 
45276 function () {
45277 var rp =  new javax.swing.JRootPane ();
45278 rp.setOpaque (true);
45279 return rp;
45280 });
45281 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45282 function () {
45283 return this.rootPaneCheckingEnabled;
45284 });
45285 Clazz_defineMethod (c$, "setTransferHandler", 
45286 function (newHandler) {
45287 var oldHandler = this.transferHandler;
45288 this.transferHandler = newHandler;
45289 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45290 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45291 }, "javax.swing.TransferHandler");
45292 Clazz_defineMethod (c$, "getTransferHandler", 
45293 function () {
45294 return this.transferHandler;
45295 });
45296 Clazz_overrideMethod (c$, "update", 
45297 function (g) {
45298 this.paint (g);
45299 }, "java.awt.Graphics");
45300 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45301 function (enabled) {
45302 this.rootPaneCheckingEnabled = enabled;
45303 }, "~B");
45304 Clazz_overrideMethod (c$, "addImpl", 
45305 function (comp, constraints, index) {
45306 if (this.isRootPaneCheckingEnabled ()) {
45307 return this.getContentPane ().add (comp, constraints, index);
45308 }return this.addImplSAEM (comp, constraints, index);
45309 }, "java.awt.Component,~O,~N");
45310 Clazz_defineMethod (c$, "remove", 
45311 function (comp) {
45312 if (comp === this.rootPane) {
45313 this.removeChild (comp);
45314 } else {
45315 this.getContentPane ().removeChild (comp);
45316 }}, "java.awt.Component");
45317 Clazz_defineMethod (c$, "setLayout", 
45318 function (manager) {
45319 if (this.isRootPaneCheckingEnabled ()) {
45320 this.getContentPane ().setLayout (manager);
45321 } else {
45322 Clazz_superCall (this, javax.swing.JWindow, "setLayout", [manager]);
45323 }}, "java.awt.LayoutManager");
45324 Clazz_overrideMethod (c$, "getRootPane", 
45325 function () {
45326 return this.rootPane;
45327 });
45328 Clazz_defineMethod (c$, "setRootPane", 
45329 function (root) {
45330 if (this.rootPane != null) {
45331 this.remove (this.rootPane);
45332 }this.rootPane = root;
45333 if (this.rootPane != null) {
45334 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45335 try {
45336 this.setRootPaneCheckingEnabled (false);
45337 this.add (this.rootPane, "Center");
45338 } finally {
45339 this.setRootPaneCheckingEnabled (checkingEnabled);
45340 }
45341 }}, "javax.swing.JRootPane");
45342 Clazz_overrideMethod (c$, "getContentPane", 
45343 function () {
45344 return this.getRootPane ().getContentPane ();
45345 });
45346 Clazz_overrideMethod (c$, "setContentPane", 
45347 function (contentPane) {
45348 this.getRootPane ().setContentPane (contentPane);
45349 }, "java.awt.Container");
45350 Clazz_overrideMethod (c$, "getLayeredPane", 
45351 function () {
45352 return this.getRootPane ().getLayeredPane ();
45353 });
45354 Clazz_overrideMethod (c$, "setLayeredPane", 
45355 function (layeredPane) {
45356 this.getRootPane ().setLayeredPane (layeredPane);
45357 }, "javax.swing.JLayeredPane");
45358 Clazz_overrideMethod (c$, "getGlassPane", 
45359 function () {
45360 return this.getRootPane ().getGlassPane ();
45361 });
45362 Clazz_overrideMethod (c$, "setGlassPane", 
45363 function (glassPane) {
45364 this.getRootPane ().setGlassPane (glassPane);
45365 }, "java.awt.Component");
45366 Clazz_defineMethod (c$, "getGraphics", 
45367 function () {
45368 javax.swing.JComponent.getGraphicsInvoked (this);
45369 return Clazz_superCall (this, javax.swing.JWindow, "getGraphics", []);
45370 });
45371 Clazz_defineMethod (c$, "repaint", 
45372 function (time, x, y, width, height) {
45373 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45374 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45375 } else {
45376 Clazz_superCall (this, javax.swing.JWindow, "repaint", [time, x, y, width, height]);
45377 }}, "~N,~N,~N,~N,~N");
45378 Clazz_defineMethod (c$, "paramString", 
45379 function () {
45380 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45381 return Clazz_superCall (this, javax.swing.JWindow, "paramString", []) + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45382 });
45383 });
45384 Clazz_declarePackage ("javax.swing");
45385 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 () {
45386 c$ = Clazz_decorateAsClass (function () {
45387 this.containerMap = null;
45388 this.componentKeyStrokeMap = null;
45389 if (!Clazz_isClassDefined ("javax.swing.KeyboardManager.ComponentKeyStrokePair")) {
45390 javax.swing.KeyboardManager.$KeyboardManager$ComponentKeyStrokePair$ ();
45391 }
45392 Clazz_instantialize (this, arguments);
45393 }, javax.swing, "KeyboardManager");
45394 Clazz_prepareFields (c$, function () {
45395 this.containerMap =  new java.util.Hashtable ();
45396 this.componentKeyStrokeMap =  new java.util.Hashtable ();
45397 });
45398 c$.getCurrentManager = Clazz_defineMethod (c$, "getCurrentManager", 
45399 function () {
45400 return javax.swing.KeyboardManager.currentManager;
45401 });
45402 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
45403 function (km) {
45404 javax.swing.KeyboardManager.currentManager = km;
45405 }, "javax.swing.KeyboardManager");
45406 Clazz_defineMethod (c$, "registerKeyStroke", 
45407 function (k, c) {
45408 var topContainer = javax.swing.KeyboardManager.getTopAncestor (c);
45409 if (topContainer == null) {
45410 return;
45411 }var keyMap = this.containerMap.get (topContainer);
45412 if (keyMap == null) {
45413 keyMap = this.registerNewTopContainer (topContainer);
45414 }var tmp = keyMap.get (k);
45415 if (tmp == null) {
45416 keyMap.put (k, c);
45417 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45418 var v = tmp;
45419 if (!v.contains (c)) {
45420 v.addElement (c);
45421 }} else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45422 if (tmp !== c) {
45423 var v =  new java.util.Vector ();
45424 v.addElement (tmp);
45425 v.addElement (c);
45426 keyMap.put (k, v);
45427 }} else {
45428 System.out.println ("Unexpected condition in registerKeyStroke");
45429 Thread.dumpStack ();
45430 }this.componentKeyStrokeMap.put (Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, k), topContainer);
45431 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45432 c$.getTopAncestor = Clazz_defineMethod (c$, "getTopAncestor", 
45433  function (c) {
45434 for (var p = c.getParent (); p != null; p = p.getParent ()) {
45435 if (Clazz_instanceOf (p, java.awt.Window) && (p).isFocusableWindow () || Clazz_instanceOf (p, java.applet.Applet)) {
45436 return p;
45437 }}
45438 return null;
45439 }, "javax.swing.JComponent");
45440 Clazz_defineMethod (c$, "unregisterKeyStroke", 
45441 function (ks, c) {
45442 var ckp = Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, ks);
45443 var topContainer = this.componentKeyStrokeMap.get (ckp);
45444 if (topContainer == null) {
45445 return;
45446 }var keyMap = this.containerMap.get (topContainer);
45447 if (keyMap == null) {
45448 Thread.dumpStack ();
45449 return;
45450 }var tmp = keyMap.get (ks);
45451 if (tmp == null) {
45452 Thread.dumpStack ();
45453 return;
45454 }if (Clazz_instanceOf (tmp, javax.swing.JComponent) && tmp === c) {
45455 keyMap.remove (ks);
45456 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45457 var v = tmp;
45458 v.removeElement (c);
45459 if (v.isEmpty ()) {
45460 keyMap.remove (ks);
45461 }}if (keyMap.isEmpty ()) {
45462 this.containerMap.remove (topContainer);
45463 }this.componentKeyStrokeMap.remove (ckp);
45464 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45465 Clazz_defineMethod (c$, "fireKeyboardAction", 
45466 function (e, pressed, topAncestor) {
45467 if (e.isConsumed ()) {
45468 System.out.println ("Aquired pre-used event!");
45469 Thread.dumpStack ();
45470 }var ks;
45471 if (e.getID () == 400) {
45472 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
45473 } else {
45474 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), !pressed);
45475 }var keyMap = this.containerMap.get (topAncestor);
45476 if (keyMap != null) {
45477 var tmp = keyMap.get (ks);
45478 if (tmp == null) {
45479 } else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45480 var c = tmp;
45481 if (c.isShowing () && c.isEnabled ()) {
45482 this.fireBinding (c, ks, e, pressed);
45483 }} else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45484 var v = tmp;
45485 for (var counter = v.size () - 1; counter >= 0; counter--) {
45486 var c = v.elementAt (counter);
45487 if (c.isShowing () && c.isEnabled ()) {
45488 this.fireBinding (c, ks, e, pressed);
45489 if (e.isConsumed ()) return true;
45490 }}
45491 } else {
45492 System.out.println ("Unexpected condition in fireKeyboardAction " + tmp);
45493 Thread.dumpStack ();
45494 }}if (e.isConsumed ()) {
45495 return true;
45496 }if (keyMap != null) {
45497 var v = keyMap.get (javax.swing.JMenuBar);
45498 if (v != null) {
45499 var iter = v.elements ();
45500 while (iter.hasMoreElements ()) {
45501 var mb = iter.nextElement ();
45502 if (mb.isShowing () && mb.isEnabled ()) {
45503 this.fireBinding (mb, ks, e, pressed);
45504 if (e.isConsumed ()) {
45505 return true;
45506 }}}
45507 }}return e.isConsumed ();
45508 }, "java.awt.event.KeyEvent,~B,java.awt.Container");
45509 Clazz_defineMethod (c$, "fireBinding", 
45510 function (c, ks, e, pressed) {
45511 if (c.processKeyBinding (ks, e, 2, pressed)) {
45512 e.consume ();
45513 }}, "javax.swing.JComponent,javax.swing.KeyStroke,java.awt.event.KeyEvent,~B");
45514 Clazz_defineMethod (c$, "registerMenuBar", 
45515 function (mb) {
45516 var top = javax.swing.KeyboardManager.getTopAncestor (mb);
45517 if (top == null) {
45518 return;
45519 }var keyMap = this.containerMap.get (top);
45520 if (keyMap == null) {
45521 keyMap = this.registerNewTopContainer (top);
45522 }var menuBars = keyMap.get (javax.swing.JMenuBar);
45523 if (menuBars == null) {
45524 menuBars =  new java.util.Vector ();
45525 keyMap.put (javax.swing.JMenuBar, menuBars);
45526 }if (!menuBars.contains (mb)) {
45527 menuBars.addElement (mb);
45528 }}, "javax.swing.JMenuBar");
45529 Clazz_defineMethod (c$, "unregisterMenuBar", 
45530 function (mb) {
45531 var topContainer = javax.swing.KeyboardManager.getTopAncestor (mb);
45532 if (topContainer == null) {
45533 return;
45534 }var keyMap = this.containerMap.get (topContainer);
45535 if (keyMap != null) {
45536 var v = keyMap.get (javax.swing.JMenuBar);
45537 if (v != null) {
45538 v.removeElement (mb);
45539 if (v.isEmpty ()) {
45540 keyMap.remove (javax.swing.JMenuBar);
45541 if (keyMap.isEmpty ()) {
45542 this.containerMap.remove (topContainer);
45543 }}}}}, "javax.swing.JMenuBar");
45544 Clazz_defineMethod (c$, "registerNewTopContainer", 
45545 function (topContainer) {
45546 var keyMap =  new java.util.Hashtable ();
45547 this.containerMap.put (topContainer, keyMap);
45548 return keyMap;
45549 }, "java.awt.Container");
45550 c$.$KeyboardManager$ComponentKeyStrokePair$ = function () {
45551 Clazz_pu$h(self.c$);
45552 c$ = Clazz_decorateAsClass (function () {
45553 Clazz_prepareCallback (this, arguments);
45554 this.component = null;
45555 this.keyStroke = null;
45556 Clazz_instantialize (this, arguments);
45557 }, javax.swing.KeyboardManager, "ComponentKeyStrokePair");
45558 Clazz_makeConstructor (c$, 
45559 function (a, b) {
45560 this.component = a;
45561 this.keyStroke = b;
45562 }, "~O,~O");
45563 Clazz_defineMethod (c$, "equals", 
45564 function (a) {
45565 if (!(Clazz_instanceOf (a, javax.swing.KeyboardManager.ComponentKeyStrokePair))) {
45566 return false;
45567 }var b = a;
45568 return ((this.component.equals (b.component)) && (this.keyStroke.equals (b.keyStroke)));
45569 }, "~O");
45570 Clazz_defineMethod (c$, "hashCode", 
45571 function () {
45572 return this.component.hashCode () * this.keyStroke.hashCode ();
45573 });
45574 c$ = Clazz_p0p ();
45575 };
45576 c$.currentManager = c$.prototype.currentManager =  new javax.swing.KeyboardManager ();
45577 });
45578 Clazz_declarePackage ("javax.swing");
45579 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 () {
45580 c$ = Clazz_decorateAsClass (function () {
45581 this.selectionModel = null;
45582 this.$paintBorder = true;
45583 this.margin = null;
45584 Clazz_instantialize (this, arguments);
45585 }, javax.swing, "JMenuBar", javax.swing.JComponent, javax.swing.MenuElement);
45586 Clazz_makeConstructor (c$, 
45587 function () {
45588 Clazz_superConstructor (this, javax.swing.JMenuBar);
45589 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
45590 this.updateUI ();
45591 });
45592 Clazz_overrideMethod (c$, "getUI", 
45593 function () {
45594 return this.ui;
45595 });
45596 Clazz_overrideMethod (c$, "updateUI", 
45597 function () {
45598 this.setUI (javax.swing.UIManager.getUI (this));
45599 });
45600 Clazz_overrideMethod (c$, "getUIClassID", 
45601 function () {
45602 return "MenuBarUI";
45603 });
45604 Clazz_defineMethod (c$, "getSelectionModel", 
45605 function () {
45606 return this.selectionModel;
45607 });
45608 Clazz_defineMethod (c$, "setSelectionModel", 
45609 function (model) {
45610 var oldValue = this.selectionModel;
45611 this.selectionModel = model;
45612 this.firePropertyChangeObject ("selectionModel", oldValue, this.selectionModel);
45613 }, "javax.swing.SingleSelectionModel");
45614 Clazz_defineMethod (c$, "add", 
45615 function (c) {
45616 Clazz_superCall (this, javax.swing.JMenuBar, "add", [c]);
45617 return c;
45618 }, "javax.swing.JMenu");
45619 Clazz_defineMethod (c$, "getMenu", 
45620 function (index) {
45621 var c = this.getComponentAtIndex (index);
45622 if (Clazz_instanceOf (c, javax.swing.JMenu)) return c;
45623 return null;
45624 }, "~N");
45625 Clazz_defineMethod (c$, "getMenuCount", 
45626 function () {
45627 return this.getComponentCount ();
45628 });
45629 Clazz_defineMethod (c$, "setHelpMenu", 
45630 function (menu) {
45631 throw  new Error ("setHelpMenu() not yet implemented.");
45632 }, "javax.swing.JMenu");
45633 Clazz_defineMethod (c$, "getHelpMenu", 
45634 function () {
45635 throw  new Error ("getHelpMenu() not yet implemented.");
45636 });
45637 Clazz_defineMethod (c$, "getComponentAtIndex", 
45638 function (i) {
45639 if (i < 0 || i >= this.getComponentCount ()) {
45640 return null;
45641 }return this.getComponent (i);
45642 }, "~N");
45643 Clazz_defineMethod (c$, "getComponentIndex", 
45644 function (c) {
45645 var ncomponents = this.getComponentCount ();
45646 var component = this.getComponents ();
45647 for (var i = 0; i < ncomponents; i++) {
45648 var comp = component[i];
45649 if (comp === c) return i;
45650 }
45651 return -1;
45652 }, "java.awt.Component");
45653 Clazz_defineMethod (c$, "setSelected", 
45654 function (sel) {
45655 var model = this.getSelectionModel ();
45656 var index = this.getComponentIndex (sel);
45657 model.setSelectedIndex (index);
45658 }, "java.awt.Component");
45659 Clazz_defineMethod (c$, "isSelected", 
45660 function () {
45661 return this.selectionModel.isSelected ();
45662 });
45663 Clazz_defineMethod (c$, "isBorderPainted", 
45664 function () {
45665 return this.$paintBorder;
45666 });
45667 Clazz_defineMethod (c$, "setBorderPainted", 
45668 function (b) {
45669 var oldValue = this.$paintBorder;
45670 this.$paintBorder = b;
45671 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
45672 if (b != oldValue) {
45673 this.revalidate ();
45674 this.repaint ();
45675 }}, "~B");
45676 Clazz_defineMethod (c$, "paintBorder", 
45677 function (g) {
45678 if (this.isBorderPainted ()) {
45679 Clazz_superCall (this, javax.swing.JMenuBar, "paintBorder", [g]);
45680 }}, "java.awt.Graphics");
45681 Clazz_defineMethod (c$, "setMargin", 
45682 function (m) {
45683 var old = this.margin;
45684 this.margin = m;
45685 this.firePropertyChangeObject ("margin", old, m);
45686 if (old == null || !old.equals (m)) {
45687 this.revalidate ();
45688 this.repaint ();
45689 }}, "java.awt.Insets");
45690 Clazz_defineMethod (c$, "getMargin", 
45691 function () {
45692 if (this.margin == null) {
45693 return  new java.awt.Insets (0, 0, 0, 0);
45694 } else {
45695 return this.margin;
45696 }});
45697 Clazz_defineMethod (c$, "processMouseEvent", 
45698 function (event, path, manager) {
45699 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
45700 Clazz_defineMethod (c$, "processKeyEvent", 
45701 function (e, path, manager) {
45702 }, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
45703 Clazz_overrideMethod (c$, "menuSelectionChanged", 
45704 function (isIncluded) {
45705 }, "~B");
45706 Clazz_defineMethod (c$, "getSubElements", 
45707 function () {
45708 var result;
45709 var tmp =  new java.util.Vector ();
45710 var c = this.getComponentCount ();
45711 var i;
45712 var m;
45713 for (i = 0; i < c; i++) {
45714 m = this.getComponent (i);
45715 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
45716 }
45717 result =  new Array (tmp.size ());
45718 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
45719
45720 return result;
45721 });
45722 Clazz_defineMethod (c$, "getComponent", 
45723 function () {
45724 return this;
45725 });
45726 Clazz_defineMethod (c$, "paramString", 
45727 function () {
45728 var paintBorderString = (this.$paintBorder ? "true" : "false");
45729 var marginString = (this.margin != null ? this.margin.toString () : "");
45730 return Clazz_superCall (this, javax.swing.JMenuBar, "paramString", []) + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
45731 });
45732 Clazz_defineMethod (c$, "processKeyBinding", 
45733 function (ks, e, condition, pressed) {
45734 var retValue = Clazz_superCall (this, javax.swing.JMenuBar, "processKeyBinding", [ks, e, condition, pressed]);
45735 if (!retValue) {
45736 var subElements = this.getSubElements ();
45737 for (var i = 0; i < subElements.length; i++) {
45738 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45739 return true;
45740 }}
45741 }return retValue;
45742 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45743 c$.processBindingForKeyStrokeRecursive = Clazz_defineMethod (c$, "processBindingForKeyStrokeRecursive", 
45744 function (elem, ks, e, condition, pressed) {
45745 if (elem == null) {
45746 return false;
45747 }var c = elem.getComponent ();
45748 if (!(c.isVisible () || (Clazz_instanceOf (c, javax.swing.JPopupMenu))) || !c.isEnabled ()) {
45749 return false;
45750 }if (c != null && Clazz_instanceOf (c, javax.swing.JComponent) && (c).processKeyBinding (ks, e, condition, pressed)) {
45751 return true;
45752 }var subElements = elem.getSubElements ();
45753 for (var i = 0; i < subElements.length; i++) {
45754 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45755 return true;
45756 }}
45757 return false;
45758 }, "javax.swing.MenuElement,javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45759 Clazz_defineMethod (c$, "addNotify", 
45760 function () {
45761 Clazz_superCall (this, javax.swing.JMenuBar, "addNotify", []);
45762 javax.swing.KeyboardManager.getCurrentManager ().registerMenuBar (this);
45763 });
45764 Clazz_defineMethod (c$, "removeNotify", 
45765 function () {
45766 Clazz_superCall (this, javax.swing.JMenuBar, "removeNotify", []);
45767 javax.swing.KeyboardManager.getCurrentManager ().unregisterMenuBar (this);
45768 });
45769 Clazz_defineStatics (c$,
45770 "$uiClassID", "MenuBarUI");
45771 });
45772 Clazz_declarePackage ("javax.swing");
45773 Clazz_declareInterface (javax.swing, "MenuElement");
45774 Clazz_declarePackage ("javax.swing");
45775 Clazz_load (["javax.swing.SingleSelectionModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultSingleSelectionModel", ["javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
45776 c$ = Clazz_decorateAsClass (function () {
45777 this.changeEvent = null;
45778 this.listenerList = null;
45779 this.index = -1;
45780 Clazz_instantialize (this, arguments);
45781 }, javax.swing, "DefaultSingleSelectionModel", null, javax.swing.SingleSelectionModel);
45782 Clazz_prepareFields (c$, function () {
45783 this.listenerList =  new javax.swing.event.EventListenerList ();
45784 });
45785 Clazz_overrideMethod (c$, "getSelectedIndex", 
45786 function () {
45787 return this.index;
45788 });
45789 Clazz_overrideMethod (c$, "setSelectedIndex", 
45790 function (index) {
45791 if (this.index != index) {
45792 this.index = index;
45793 this.fireStateChanged ();
45794 }}, "~N");
45795 Clazz_overrideMethod (c$, "clearSelection", 
45796 function () {
45797 this.setSelectedIndex (-1);
45798 });
45799 Clazz_overrideMethod (c$, "isSelected", 
45800 function () {
45801 var ret = false;
45802 if (this.getSelectedIndex () != -1) {
45803 ret = true;
45804 }return ret;
45805 });
45806 Clazz_overrideMethod (c$, "addChangeListener", 
45807 function (l) {
45808 this.listenerList.add (javax.swing.event.ChangeListener, l);
45809 }, "javax.swing.event.ChangeListener");
45810 Clazz_overrideMethod (c$, "removeChangeListener", 
45811 function (l) {
45812 this.listenerList.remove (javax.swing.event.ChangeListener, l);
45813 }, "javax.swing.event.ChangeListener");
45814 Clazz_defineMethod (c$, "getChangeListeners", 
45815 function () {
45816 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
45817 });
45818 Clazz_defineMethod (c$, "fireStateChanged", 
45819 function () {
45820 var listeners = this.listenerList.getListenerList ();
45821 for (var i = listeners.length - 2; i >= 0; i -= 2) {
45822 if (listeners[i] === javax.swing.event.ChangeListener) {
45823 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
45824 (listeners[i + 1]).stateChanged (this.changeEvent);
45825 }}
45826 });
45827 Clazz_defineMethod (c$, "getListeners", 
45828 function (listenerType) {
45829 return this.listenerList.getListeners (listenerType);
45830 }, "Class");
45831 });
45832 Clazz_declarePackage ("javax.swing");
45833 Clazz_declareInterface (javax.swing, "SingleSelectionModel");
45834 Clazz_declarePackage ("javax.swing");
45835 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 () {
45836 c$ = Clazz_decorateAsClass (function () {
45837 this.$popupMenu = null;
45838 this.menuChangeListener = null;
45839 this.menuEvent = null;
45840 this.delay = 0;
45841 this.customMenuLocation = null;
45842 this.popupListener = null;
45843 if (!Clazz_isClassDefined ("javax.swing.JMenu.MenuChangeListener")) {
45844 javax.swing.JMenu.$JMenu$MenuChangeListener$ ();
45845 }
45846 if (!Clazz_isClassDefined ("javax.swing.JMenu.WinListener")) {
45847 javax.swing.JMenu.$JMenu$WinListener$ ();
45848 }
45849 Clazz_instantialize (this, arguments);
45850 }, javax.swing, "JMenu", javax.swing.JMenuItem, javax.swing.MenuElement);
45851 Clazz_makeConstructor (c$, 
45852 function () {
45853 this.construct ("");
45854 });
45855 Clazz_makeConstructor (c$, 
45856 function (a) {
45857 this.construct ();
45858 this.setAction (a);
45859 }, "javax.swing.Action");
45860 Clazz_makeConstructor (c$, 
45861 function (s, b) {
45862 this.construct (s);
45863 }, "~S,~B");
45864 Clazz_overrideMethod (c$, "initFocusability", 
45865 function () {
45866 });
45867 Clazz_overrideMethod (c$, "updateUI", 
45868 function () {
45869 this.setUI (javax.swing.UIManager.getUI (this));
45870 if (this.$popupMenu != null) {
45871 this.$popupMenu.setUI (javax.swing.UIManager.getUI (this.$popupMenu));
45872 }});
45873 Clazz_overrideMethod (c$, "getUIClassID", 
45874 function () {
45875 return "MenuUI";
45876 });
45877 Clazz_defineMethod (c$, "setModel", 
45878 function (newModel) {
45879 var oldModel = this.getModel ();
45880 Clazz_superCall (this, javax.swing.JMenu, "setModel", [newModel]);
45881 if (oldModel != null && this.menuChangeListener != null) {
45882 oldModel.removeChangeListener (this.menuChangeListener);
45883 this.menuChangeListener = null;
45884 }this.model = newModel;
45885 if (newModel != null) {
45886 this.menuChangeListener = this.createMenuChangeListener ();
45887 newModel.addChangeListener (this.menuChangeListener);
45888 }}, "javax.swing.ButtonModel");
45889 Clazz_overrideMethod (c$, "isSelected", 
45890 function () {
45891 return this.getModel ().isSelected ();
45892 });
45893 Clazz_overrideMethod (c$, "setSelected", 
45894 function (b) {
45895 var model = this.getModel ();
45896 if (b != model.isSelected ()) {
45897 this.getModel ().setSelected (b);
45898 }}, "~B");
45899 Clazz_defineMethod (c$, "isPopupMenuVisible", 
45900 function () {
45901 this.ensurePopupMenuCreated ();
45902 return this.$popupMenu.isVisible ();
45903 });
45904 Clazz_defineMethod (c$, "setPopupMenuVisible", 
45905 function (b) {
45906 var isVisible = this.isPopupMenuVisible ();
45907 if (b != isVisible && (this.isEnabled () || !b)) {
45908 this.ensurePopupMenuCreated ();
45909 if ((b == true) && this.isShowing ()) {
45910 var p = this.getCustomMenuLocation ();
45911 if (p == null) {
45912 p = this.getPopupMenuOrigin ();
45913 }this.getPopupMenu ().show (this, p.x, p.y);
45914 } else {
45915 this.getPopupMenu ().setVisible (false);
45916 }}}, "~B");
45917 Clazz_defineMethod (c$, "getPopupMenuOrigin", 
45918 function () {
45919 var x = 0;
45920 var y = 0;
45921 var pm = this.getPopupMenu ();
45922 var s = this.getSize ();
45923 var pmSize = pm.getSize ();
45924 if (pmSize.width == 0) {
45925 pmSize = pm.getPreferredSize ();
45926 }var position = this.getLocationOnScreen ();
45927 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
45928 var gc = this.getGraphicsConfiguration ();
45929 var screenBounds =  new java.awt.Rectangle (toolkit.getScreenSize ());
45930 if (gc != null) {
45931 screenBounds = gc.getBounds ();
45932 var screenInsets = toolkit.getScreenInsets (gc);
45933 screenBounds.width -= Math.abs (screenInsets.left + screenInsets.right);
45934 screenBounds.height -= Math.abs (screenInsets.top + screenInsets.bottom);
45935 position.x -= Math.abs (screenInsets.left);
45936 position.y -= Math.abs (screenInsets.top);
45937 }var parent = this.getParent ();
45938 if (Clazz_instanceOf (parent, javax.swing.JPopupMenu)) {
45939 var xOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetX");
45940 var yOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetY");
45941 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
45942 x = s.width + xOffset;
45943 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
45944 x = 0 - xOffset - pmSize.width;
45945 }} else {
45946 x = 0 - xOffset - pmSize.width;
45947 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
45948 x = s.width + xOffset;
45949 }}y = yOffset;
45950 if (position.y + y + pmSize.height >= screenBounds.height + screenBounds.y && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
45951 y = s.height - yOffset - pmSize.height;
45952 }} else {
45953 var xOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetX");
45954 var yOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetY");
45955 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
45956 x = xOffset;
45957 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
45958 x = s.width - xOffset - pmSize.width;
45959 }} else {
45960 x = s.width - xOffset - pmSize.width;
45961 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
45962 x = xOffset;
45963 }}y = s.height + yOffset;
45964 if (position.y + y + pmSize.height >= screenBounds.height && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
45965 y = 0 - yOffset - pmSize.height;
45966 }}return  new java.awt.Point (x, y);
45967 });
45968 Clazz_defineMethod (c$, "getDelay", 
45969 function () {
45970 return this.delay;
45971 });
45972 Clazz_defineMethod (c$, "setDelay", 
45973 function (d) {
45974 if (d < 0) throw  new IllegalArgumentException ("Delay must be a positive integer");
45975 this.delay = d;
45976 }, "~N");
45977 Clazz_defineMethod (c$, "ensurePopupMenuCreated", 
45978  function () {
45979 if (this.$popupMenu == null) {
45980 this.$popupMenu =  new javax.swing.JPopupMenu ();
45981 this.$popupMenu.setInvoker (this);
45982 this.popupListener = this.createWinListener (this.$popupMenu);
45983 }});
45984 Clazz_defineMethod (c$, "getCustomMenuLocation", 
45985  function () {
45986 return this.customMenuLocation;
45987 });
45988 Clazz_defineMethod (c$, "setMenuLocation", 
45989 function (x, y) {
45990 this.customMenuLocation =  new java.awt.Point (x, y);
45991 if (this.$popupMenu != null) this.$popupMenu.setLocation (x, y);
45992 }, "~N,~N");
45993 Clazz_defineMethod (c$, "add", 
45994 function (menuItem) {
45995 this.ensurePopupMenuCreated ();
45996 return this.$popupMenu.add (menuItem);
45997 }, "javax.swing.JMenuItem");
45998 Clazz_defineMethod (c$, "add", 
45999 function (c) {
46000 this.ensurePopupMenuCreated ();
46001 this.$popupMenu.add (c);
46002 return c;
46003 }, "java.awt.Component");
46004 Clazz_defineMethod (c$, "add", 
46005 function (c, index) {
46006 this.ensurePopupMenuCreated ();
46007 this.$popupMenu.add (c, index);
46008 return c;
46009 }, "java.awt.Component,~N");
46010 Clazz_defineMethod (c$, "add", 
46011 function (s) {
46012 return this.add ( new javax.swing.JMenuItem (s));
46013 }, "~S");
46014 Clazz_defineMethod (c$, "add", 
46015 function (a) {
46016 var mi = this.createActionComponent (a);
46017 mi.setAction (a);
46018 this.add (mi);
46019 return mi;
46020 }, "javax.swing.Action");
46021 Clazz_defineMethod (c$, "createActionComponent", 
46022 function (a) {
46023 var mi = ((Clazz_isClassDefined ("javax.swing.JMenu$1") ? 0 : javax.swing.JMenu.$JMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JMenu$1, this, null));
46024 mi.setHorizontalTextPosition (11);
46025 mi.setVerticalTextPosition (0);
46026 return mi;
46027 }, "javax.swing.Action");
46028 Clazz_defineMethod (c$, "createActionChangeListener", 
46029 function (b) {
46030 return b.createActionPropertyChangeListener0 (b.getAction ());
46031 }, "javax.swing.JMenuItem");
46032 Clazz_defineMethod (c$, "addSeparator", 
46033 function () {
46034 this.ensurePopupMenuCreated ();
46035 this.$popupMenu.addSeparator ();
46036 });
46037 Clazz_defineMethod (c$, "insert", 
46038 function (s, pos) {
46039 if (pos < 0) {
46040 throw  new IllegalArgumentException ("index less than zero.");
46041 }this.ensurePopupMenuCreated ();
46042 this.$popupMenu.insert ( new javax.swing.JMenuItem (s), pos);
46043 }, "~S,~N");
46044 Clazz_defineMethod (c$, "insert", 
46045 function (mi, pos) {
46046 if (pos < 0) {
46047 throw  new IllegalArgumentException ("index less than zero.");
46048 }this.ensurePopupMenuCreated ();
46049 this.$popupMenu.insert (mi, pos);
46050 return mi;
46051 }, "javax.swing.JMenuItem,~N");
46052 Clazz_defineMethod (c$, "insert", 
46053 function (a, pos) {
46054 if (pos < 0) {
46055 throw  new IllegalArgumentException ("index less than zero.");
46056 }this.ensurePopupMenuCreated ();
46057 var mi =  new javax.swing.JMenuItem (a);
46058 mi.setHorizontalTextPosition (11);
46059 mi.setVerticalTextPosition (0);
46060 this.$popupMenu.insert (mi, pos);
46061 return mi;
46062 }, "javax.swing.Action,~N");
46063 Clazz_defineMethod (c$, "insertSeparator", 
46064 function (index) {
46065 if (index < 0) {
46066 throw  new IllegalArgumentException ("index less than zero.");
46067 }this.ensurePopupMenuCreated ();
46068 this.$popupMenu.insert ( new javax.swing.JPopupMenu.Separator (), index);
46069 }, "~N");
46070 Clazz_defineMethod (c$, "getItem", 
46071 function (pos) {
46072 if (pos < 0) {
46073 throw  new IllegalArgumentException ("index less than zero.");
46074 }var c = this.getMenuComponent (pos);
46075 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) {
46076 var mi = c;
46077 return mi;
46078 }return null;
46079 }, "~N");
46080 Clazz_defineMethod (c$, "getItemCount", 
46081 function () {
46082 return this.getMenuComponentCount ();
46083 });
46084 Clazz_defineMethod (c$, "isTearOff", 
46085 function () {
46086 throw  new Error ("boolean isTearOff() {} not yet implemented");
46087 });
46088 Clazz_defineMethod (c$, "remove", 
46089 function (pos) {
46090 if (pos < 0) {
46091 throw  new IllegalArgumentException ("index less than zero.");
46092 }if (pos > this.getItemCount ()) {
46093 throw  new IllegalArgumentException ("index greater than the number of items.");
46094 }if (this.$popupMenu != null) this.$popupMenu.remove (pos);
46095 }, "~N");
46096 Clazz_defineMethod (c$, "remove", 
46097 function (c) {
46098 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) if (this.$popupMenu != null) this.$popupMenu.remove (c);
46099 if (this.$popupMenu != null) this.$popupMenu.remove (c);
46100 }, "java.awt.Component");
46101 Clazz_defineMethod (c$, "removeAll", 
46102 function () {
46103 if (this.$popupMenu != null) this.$popupMenu.removeAll ();
46104 });
46105 Clazz_defineMethod (c$, "getMenuComponentCount", 
46106 function () {
46107 var componentCount = 0;
46108 if (this.$popupMenu != null) componentCount = this.$popupMenu.getComponentCount ();
46109 return componentCount;
46110 });
46111 Clazz_defineMethod (c$, "getMenuComponent", 
46112 function (n) {
46113 if (this.$popupMenu != null) return this.$popupMenu.getComponent (n);
46114 return null;
46115 }, "~N");
46116 Clazz_defineMethod (c$, "getMenuComponents", 
46117 function () {
46118 if (this.$popupMenu != null) return this.$popupMenu.getComponents ();
46119 return  new Array (0);
46120 });
46121 Clazz_defineMethod (c$, "isTopLevelMenu", 
46122 function () {
46123 if (Clazz_instanceOf (this.getParent (), javax.swing.JMenuBar)) return true;
46124 return false;
46125 });
46126 Clazz_defineMethod (c$, "isMenuComponent", 
46127 function (c) {
46128 if (c === this) return true;
46129 if (Clazz_instanceOf (c, javax.swing.JPopupMenu)) {
46130 var comp = c;
46131 if (comp === this.getPopupMenu ()) return true;
46132 }var ncomponents = this.getMenuComponentCount ();
46133 var component = this.getMenuComponents ();
46134 for (var i = 0; i < ncomponents; i++) {
46135 var comp = component[i];
46136 if (comp === c) return true;
46137 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
46138 var subMenu = comp;
46139 if (subMenu.isMenuComponent (c)) return true;
46140 }}
46141 return false;
46142 }, "java.awt.Component");
46143 Clazz_defineMethod (c$, "getPopupMenu", 
46144 function () {
46145 this.ensurePopupMenuCreated ();
46146 return this.$popupMenu;
46147 });
46148 Clazz_defineMethod (c$, "addMenuListener", 
46149 function (l) {
46150 this.listenerList.add (javax.swing.event.MenuListener, l);
46151 }, "javax.swing.event.MenuListener");
46152 Clazz_defineMethod (c$, "removeMenuListener", 
46153 function (l) {
46154 this.listenerList.remove (javax.swing.event.MenuListener, l);
46155 }, "javax.swing.event.MenuListener");
46156 Clazz_defineMethod (c$, "getMenuListeners", 
46157 function () {
46158 return this.listenerList.getListeners (javax.swing.event.MenuListener);
46159 });
46160 Clazz_defineMethod (c$, "fireMenuSelected", 
46161 function () {
46162 var listeners = this.listenerList.getListenerList ();
46163 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46164 if (listeners[i] === javax.swing.event.MenuListener) {
46165 if (listeners[i + 1] == null) {
46166 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46167 } else {
46168 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46169 (listeners[i + 1]).menuSelected (this.menuEvent);
46170 }}}
46171 });
46172 Clazz_defineMethod (c$, "fireMenuDeselected", 
46173 function () {
46174 var listeners = this.listenerList.getListenerList ();
46175 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46176 if (listeners[i] === javax.swing.event.MenuListener) {
46177 if (listeners[i + 1] == null) {
46178 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46179 } else {
46180 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46181 (listeners[i + 1]).menuDeselected (this.menuEvent);
46182 }}}
46183 });
46184 Clazz_defineMethod (c$, "fireMenuCanceled", 
46185 function () {
46186 var listeners = this.listenerList.getListenerList ();
46187 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46188 if (listeners[i] === javax.swing.event.MenuListener) {
46189 if (listeners[i + 1] == null) {
46190 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46191 } else {
46192 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46193 (listeners[i + 1]).menuCanceled (this.menuEvent);
46194 }}}
46195 });
46196 Clazz_overrideMethod (c$, "configureAcceleratorFromAction", 
46197 function (a) {
46198 }, "javax.swing.Action");
46199 Clazz_defineMethod (c$, "createMenuChangeListener", 
46200  function () {
46201 return Clazz_innerTypeInstance (javax.swing.JMenu.MenuChangeListener, this, null);
46202 });
46203 Clazz_defineMethod (c$, "createWinListener", 
46204 function (p) {
46205 return Clazz_innerTypeInstance (javax.swing.JMenu.WinListener, this, null, p);
46206 }, "javax.swing.JPopupMenu");
46207 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46208 function (isIncluded) {
46209 this.setSelected (isIncluded);
46210 }, "~B");
46211 Clazz_overrideMethod (c$, "getSubElements", 
46212 function () {
46213 if (this.$popupMenu == null) return  new Array (0);
46214  else {
46215 var result =  new Array (1);
46216 result[0] = this.$popupMenu;
46217 return result;
46218 }});
46219 Clazz_defineMethod (c$, "getComponent", 
46220 function () {
46221 return this;
46222 });
46223 Clazz_defineMethod (c$, "applyComponentOrientation", 
46224 function (o) {
46225 Clazz_superCall (this, javax.swing.JMenu, "applyComponentOrientation", [o]);
46226 if (this.$popupMenu != null) {
46227 var ncomponents = this.getMenuComponentCount ();
46228 for (var i = 0; i < ncomponents; ++i) {
46229 this.getMenuComponent (i).applyComponentOrientation (o);
46230 }
46231 this.$popupMenu.setComponentOrientation (o);
46232 }}, "java.awt.ComponentOrientation");
46233 Clazz_defineMethod (c$, "setComponentOrientation", 
46234 function (o) {
46235 Clazz_superCall (this, javax.swing.JMenu, "setComponentOrientation", [o]);
46236 if (this.$popupMenu != null) {
46237 this.$popupMenu.setComponentOrientation (o);
46238 }}, "java.awt.ComponentOrientation");
46239 Clazz_overrideMethod (c$, "setAccelerator", 
46240 function (keyStroke) {
46241 throw  new Error ("setAccelerator() is not defined for JMenu.  Use setMnemonic() instead.");
46242 }, "javax.swing.KeyStroke");
46243 Clazz_defineMethod (c$, "processKeyEvent", 
46244 function (evt) {
46245 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46246 if (evt.isConsumed ()) return;
46247 Clazz_superCall (this, javax.swing.JMenu, "processKeyEvent", [evt]);
46248 }, "java.awt.event.KeyEvent");
46249 Clazz_defineMethod (c$, "doClick", 
46250 function (pressTime) {
46251 var me = this.buildMenuElementArray (this);
46252 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
46253 }, "~N");
46254 Clazz_defineMethod (c$, "buildMenuElementArray", 
46255  function (leaf) {
46256 var elements =  new java.util.Vector ();
46257 var current = leaf.getPopupMenu ();
46258 var pop;
46259 var menu;
46260 var bar;
46261 while (true) {
46262 if (Clazz_instanceOf (current, javax.swing.JPopupMenu)) {
46263 pop = current;
46264 elements.insertElementAt (pop, 0);
46265 current = pop.getInvoker ();
46266 } else if (Clazz_instanceOf (current, javax.swing.JMenu)) {
46267 menu = current;
46268 elements.insertElementAt (menu, 0);
46269 current = menu.getParent ();
46270 } else if (Clazz_instanceOf (current, javax.swing.JMenuBar)) {
46271 bar = current;
46272 elements.insertElementAt (bar, 0);
46273 var me =  new Array (elements.size ());
46274 elements.copyInto (me);
46275 return me;
46276 }}
46277 }, "javax.swing.JMenu");
46278 c$.$JMenu$MenuChangeListener$ = function () {
46279 Clazz_pu$h(self.c$);
46280 c$ = Clazz_decorateAsClass (function () {
46281 Clazz_prepareCallback (this, arguments);
46282 this.isSelected = false;
46283 Clazz_instantialize (this, arguments);
46284 }, javax.swing.JMenu, "MenuChangeListener", null, javax.swing.event.ChangeListener);
46285 Clazz_overrideMethod (c$, "stateChanged", 
46286 function (a) {
46287 var b = a.getSource ();
46288 var c = b.isSelected ();
46289 if (c != this.isSelected) {
46290 if (c == true) {
46291 this.b$["javax.swing.JMenu"].fireMenuSelected ();
46292 } else {
46293 this.b$["javax.swing.JMenu"].fireMenuDeselected ();
46294 }this.isSelected = c;
46295 }}, "javax.swing.event.ChangeEvent");
46296 c$ = Clazz_p0p ();
46297 };
46298 c$.$JMenu$WinListener$ = function () {
46299 Clazz_pu$h(self.c$);
46300 c$ = Clazz_decorateAsClass (function () {
46301 Clazz_prepareCallback (this, arguments);
46302 this.popupMenu = null;
46303 Clazz_instantialize (this, arguments);
46304 }, javax.swing.JMenu, "WinListener", java.awt.event.WindowAdapter);
46305 Clazz_makeConstructor (c$, 
46306 function (a) {
46307 Clazz_superConstructor (this, javax.swing.JMenu.WinListener, []);
46308 this.popupMenu = a;
46309 }, "javax.swing.JPopupMenu");
46310 Clazz_overrideMethod (c$, "windowClosing", 
46311 function (a) {
46312 this.b$["javax.swing.JMenu"].setSelected (false);
46313 }, "java.awt.event.WindowEvent");
46314 c$ = Clazz_p0p ();
46315 };
46316 c$.$JMenu$1$ = function () {
46317 Clazz_pu$h(self.c$);
46318 c$ = Clazz_declareAnonymous (javax.swing, "JMenu$1", javax.swing.JMenuItem);
46319 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
46320 function (a) {
46321 var pcl = this.b$["javax.swing.JMenu"].createActionChangeListener (this);
46322 if (pcl == null) {
46323 pcl = Clazz_superCall (this, javax.swing.JMenu$1, "createActionPropertyChangeListener", [a]);
46324 }return pcl;
46325 }, "javax.swing.Action");
46326 c$ = Clazz_p0p ();
46327 };
46328 Clazz_defineStatics (c$,
46329 "$$uiClassID", "MenuUI");
46330 });
46331 Clazz_declarePackage ("java.awt.event");
46332 Clazz_load (["java.awt.event.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.event.WindowAdapter", null, function () {
46333 c$ = Clazz_declareType (java.awt.event, "WindowAdapter", null, [java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.awt.event.WindowFocusListener]);
46334 Clazz_overrideMethod (c$, "windowOpened", 
46335 function (e) {
46336 }, "java.awt.event.WindowEvent");
46337 Clazz_overrideMethod (c$, "windowClosing", 
46338 function (e) {
46339 }, "java.awt.event.WindowEvent");
46340 Clazz_overrideMethod (c$, "windowClosed", 
46341 function (e) {
46342 }, "java.awt.event.WindowEvent");
46343 Clazz_overrideMethod (c$, "windowIconified", 
46344 function (e) {
46345 }, "java.awt.event.WindowEvent");
46346 Clazz_overrideMethod (c$, "windowDeiconified", 
46347 function (e) {
46348 }, "java.awt.event.WindowEvent");
46349 Clazz_overrideMethod (c$, "windowActivated", 
46350 function (e) {
46351 }, "java.awt.event.WindowEvent");
46352 Clazz_overrideMethod (c$, "windowDeactivated", 
46353 function (e) {
46354 }, "java.awt.event.WindowEvent");
46355 Clazz_overrideMethod (c$, "windowStateChanged", 
46356 function (e) {
46357 }, "java.awt.event.WindowEvent");
46358 Clazz_overrideMethod (c$, "windowGainedFocus", 
46359 function (e) {
46360 }, "java.awt.event.WindowEvent");
46361 Clazz_overrideMethod (c$, "windowLostFocus", 
46362 function (e) {
46363 }, "java.awt.event.WindowEvent");
46364 });
46365 Clazz_declarePackage ("javax.swing");
46366 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 () {
46367 c$ = Clazz_decorateAsClass (function () {
46368 this.isMouseDragged = false;
46369 this.accelerator = null;
46370 Clazz_instantialize (this, arguments);
46371 }, javax.swing, "JMenuItem", javax.swing.AbstractButton, javax.swing.MenuElement);
46372 Clazz_makeConstructor (c$, 
46373 function () {
46374 this.construct (null, Clazz_castNullAs ("javax.swing.Icon"));
46375 });
46376 Clazz_makeConstructor (c$, 
46377 function (icon) {
46378 this.construct (null, icon);
46379 }, "javax.swing.Icon");
46380 Clazz_makeConstructor (c$, 
46381 function (text) {
46382 this.construct (text, Clazz_castNullAs ("javax.swing.Icon"));
46383 }, "~S");
46384 Clazz_makeConstructor (c$, 
46385 function (a) {
46386 this.construct ();
46387 this.setAction (a);
46388 }, "javax.swing.Action");
46389 Clazz_makeConstructor (c$, 
46390 function (text, icon) {
46391 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46392 this.setModel ( new javax.swing.DefaultButtonModel ());
46393 this.init (text, icon);
46394 this.initFocusability ();
46395 }, "~S,javax.swing.Icon");
46396 Clazz_makeConstructor (c$, 
46397 function (text, mnemonic) {
46398 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46399 this.setModel ( new javax.swing.DefaultButtonModel ());
46400 this.init (text, null);
46401 this.setMnemonic (mnemonic);
46402 this.initFocusability ();
46403 }, "~S,~N");
46404 Clazz_defineMethod (c$, "setModel", 
46405 function (newModel) {
46406 Clazz_superCall (this, javax.swing.JMenuItem, "setModel", [newModel]);
46407 if (Clazz_instanceOf (newModel, javax.swing.DefaultButtonModel)) {
46408 (newModel).setMenuItem (true);
46409 }}, "javax.swing.ButtonModel");
46410 Clazz_defineMethod (c$, "initFocusability", 
46411 function () {
46412 this.setFocusable (false);
46413 });
46414 Clazz_overrideMethod (c$, "init", 
46415 function (text, icon) {
46416 if (text != null) {
46417 this.setText (text);
46418 }if (icon != null) {
46419 this.setIcon (icon);
46420 }this.addFocusListener ( new javax.swing.JMenuItem.MenuItemFocusListener ());
46421 this.setUIProperty ("borderPainted", Boolean.FALSE);
46422 this.setFocusPainted (false);
46423 this.setHorizontalTextPosition (11);
46424 this.setHorizontalAlignment (10);
46425 this.updateUI ();
46426 }, "~S,javax.swing.Icon");
46427 Clazz_overrideMethod (c$, "updateUI", 
46428 function () {
46429 this.setUI (javax.swing.UIManager.getUI (this));
46430 });
46431 Clazz_overrideMethod (c$, "getUIClassID", 
46432 function () {
46433 return "MenuItemUI";
46434 });
46435 Clazz_defineMethod (c$, "setArmed", 
46436 function (b) {
46437 var model = this.getModel ();
46438 if (model.isArmed () != b) {
46439 model.setArmed (b);
46440 }}, "~B");
46441 Clazz_defineMethod (c$, "isArmed", 
46442 function () {
46443 var model = this.getModel ();
46444 return model.isArmed ();
46445 });
46446 Clazz_defineMethod (c$, "setEnabled", 
46447 function (b) {
46448 if (!b && !javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
46449 this.setArmed (false);
46450 }Clazz_superCall (this, javax.swing.JMenuItem, "setEnabled", [b]);
46451 }, "~B");
46452 Clazz_overrideMethod (c$, "alwaysOnTop", 
46453 function () {
46454 return true;
46455 });
46456 Clazz_defineMethod (c$, "setAccelerator", 
46457 function (keyStroke) {
46458 var oldAccelerator = this.accelerator;
46459 this.accelerator = keyStroke;
46460 this.repaint ();
46461 this.revalidate ();
46462 this.firePropertyChangeObject ("accelerator", oldAccelerator, this.accelerator);
46463 }, "javax.swing.KeyStroke");
46464 Clazz_defineMethod (c$, "getAccelerator", 
46465 function () {
46466 return this.accelerator;
46467 });
46468 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
46469 function (a) {
46470 Clazz_superCall (this, javax.swing.JMenuItem, "configurePropertiesFromAction", [a]);
46471 this.configureAcceleratorFromAction (a);
46472 }, "javax.swing.Action");
46473 Clazz_overrideMethod (c$, "setIconFromAction", 
46474 function (a) {
46475 var icon = null;
46476 if (a != null) {
46477 icon = a.getValue ("SmallIcon");
46478 }this.setIcon (icon);
46479 }, "javax.swing.Action");
46480 Clazz_overrideMethod (c$, "largeIconChanged", 
46481 function (a) {
46482 }, "javax.swing.Action");
46483 Clazz_overrideMethod (c$, "smallIconChanged", 
46484 function (a) {
46485 this.setIconFromAction (a);
46486 }, "javax.swing.Action");
46487 Clazz_defineMethod (c$, "configureAcceleratorFromAction", 
46488 function (a) {
46489 var ks = (a == null) ? null : a.getValue ("AcceleratorKey");
46490 this.setAccelerator (ks);
46491 }, "javax.swing.Action");
46492 Clazz_defineMethod (c$, "actionPropertyChanged", 
46493 function (action, propertyName) {
46494 if (propertyName === "AcceleratorKey") {
46495 this.configureAcceleratorFromAction (action);
46496 } else {
46497 Clazz_superCall (this, javax.swing.JMenuItem, "actionPropertyChanged", [action, propertyName]);
46498 }}, "javax.swing.Action,~S");
46499 Clazz_defineMethod (c$, "processMouseEvent", 
46500 function (e, path, manager) {
46501 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));
46502 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
46503 Clazz_defineMethod (c$, "processKeyEvent", 
46504 function (e, path, manager) {
46505 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
46506 this.processMenuKeyEvent (mke);
46507 if (mke.isConsumed ()) {
46508 e.consume ();
46509 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
46510 Clazz_defineMethod (c$, "processMenuDragMouseEvent", 
46511 function (e) {
46512 switch (e.getID ()) {
46513 case 504:
46514 this.isMouseDragged = false;
46515 this.fireMenuDragMouseEntered (e);
46516 break;
46517 case 505:
46518 this.isMouseDragged = false;
46519 this.fireMenuDragMouseExited (e);
46520 break;
46521 case 506:
46522 this.isMouseDragged = true;
46523 this.fireMenuDragMouseDragged (e);
46524 break;
46525 case 502:
46526 if (this.isMouseDragged) this.fireMenuDragMouseReleased (e);
46527 break;
46528 default:
46529 break;
46530 }
46531 }, "javax.swing.event.MenuDragMouseEvent");
46532 Clazz_defineMethod (c$, "processMenuKeyEvent", 
46533 function (e) {
46534 switch (e.getID ()) {
46535 case 401:
46536 this.fireMenuKeyPressed (e);
46537 break;
46538 case 402:
46539 this.fireMenuKeyReleased (e);
46540 break;
46541 case 400:
46542 this.fireMenuKeyTyped (e);
46543 break;
46544 default:
46545 break;
46546 }
46547 }, "javax.swing.event.MenuKeyEvent");
46548 Clazz_defineMethod (c$, "fireMenuDragMouseEntered", 
46549 function (event) {
46550 var listeners = this.listenerList.getListenerList ();
46551 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46552 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46553 (listeners[i + 1]).menuDragMouseEntered (event);
46554 }}
46555 }, "javax.swing.event.MenuDragMouseEvent");
46556 Clazz_defineMethod (c$, "fireMenuDragMouseExited", 
46557 function (event) {
46558 var listeners = this.listenerList.getListenerList ();
46559 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46560 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46561 (listeners[i + 1]).menuDragMouseExited (event);
46562 }}
46563 }, "javax.swing.event.MenuDragMouseEvent");
46564 Clazz_defineMethod (c$, "fireMenuDragMouseDragged", 
46565 function (event) {
46566 var listeners = this.listenerList.getListenerList ();
46567 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46568 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46569 (listeners[i + 1]).menuDragMouseDragged (event);
46570 }}
46571 }, "javax.swing.event.MenuDragMouseEvent");
46572 Clazz_defineMethod (c$, "fireMenuDragMouseReleased", 
46573 function (event) {
46574 var listeners = this.listenerList.getListenerList ();
46575 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46576 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46577 (listeners[i + 1]).menuDragMouseReleased (event);
46578 }}
46579 }, "javax.swing.event.MenuDragMouseEvent");
46580 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
46581 function (event) {
46582 var listeners = this.listenerList.getListenerList ();
46583 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46584 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46585 (listeners[i + 1]).menuKeyPressed (event);
46586 }}
46587 }, "javax.swing.event.MenuKeyEvent");
46588 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
46589 function (event) {
46590 var listeners = this.listenerList.getListenerList ();
46591 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46592 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46593 (listeners[i + 1]).menuKeyReleased (event);
46594 }}
46595 }, "javax.swing.event.MenuKeyEvent");
46596 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
46597 function (event) {
46598 var listeners = this.listenerList.getListenerList ();
46599 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46600 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46601 (listeners[i + 1]).menuKeyTyped (event);
46602 }}
46603 }, "javax.swing.event.MenuKeyEvent");
46604 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46605 function (isIncluded) {
46606 this.setArmed (isIncluded);
46607 }, "~B");
46608 Clazz_overrideMethod (c$, "getSubElements", 
46609 function () {
46610 return  new Array (0);
46611 });
46612 Clazz_defineMethod (c$, "getComponent", 
46613 function () {
46614 return this;
46615 });
46616 Clazz_defineMethod (c$, "addMenuDragMouseListener", 
46617 function (l) {
46618 this.listenerList.add (javax.swing.event.MenuDragMouseListener, l);
46619 }, "javax.swing.event.MenuDragMouseListener");
46620 Clazz_defineMethod (c$, "removeMenuDragMouseListener", 
46621 function (l) {
46622 this.listenerList.remove (javax.swing.event.MenuDragMouseListener, l);
46623 }, "javax.swing.event.MenuDragMouseListener");
46624 Clazz_defineMethod (c$, "getMenuDragMouseListeners", 
46625 function () {
46626 return this.listenerList.getListeners (javax.swing.event.MenuDragMouseListener);
46627 });
46628 Clazz_defineMethod (c$, "addMenuKeyListener", 
46629 function (l) {
46630 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
46631 }, "javax.swing.event.MenuKeyListener");
46632 Clazz_defineMethod (c$, "removeMenuKeyListener", 
46633 function (l) {
46634 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
46635 }, "javax.swing.event.MenuKeyListener");
46636 Clazz_defineMethod (c$, "getMenuKeyListeners", 
46637 function () {
46638 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
46639 });
46640 Clazz_pu$h(self.c$);
46641 c$ = Clazz_declareType (javax.swing.JMenuItem, "MenuItemFocusListener", null, java.awt.event.FocusListener);
46642 Clazz_overrideMethod (c$, "focusGained", 
46643 function (a) {
46644 }, "java.awt.event.FocusEvent");
46645 Clazz_overrideMethod (c$, "focusLost", 
46646 function (a) {
46647 var b = a.getSource ();
46648 if (b.isFocusPainted ()) {
46649 b.repaint ();
46650 }}, "java.awt.event.FocusEvent");
46651 c$ = Clazz_p0p ();
46652 Clazz_defineStatics (c$,
46653 "$uiClassID", "MenuItemUI");
46654 });
46655 Clazz_declarePackage ("javax.swing.event");
46656 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuDragMouseListener", null, function () {
46657 Clazz_declareInterface (javax.swing.event, "MenuDragMouseListener", java.util.EventListener);
46658 });
46659 Clazz_declarePackage ("javax.swing.event");
46660 Clazz_load (["java.awt.event.KeyEvent"], "javax.swing.event.MenuKeyEvent", null, function () {
46661 c$ = Clazz_decorateAsClass (function () {
46662 this.path = null;
46663 this.manager = null;
46664 Clazz_instantialize (this, arguments);
46665 }, javax.swing.event, "MenuKeyEvent", java.awt.event.KeyEvent);
46666 Clazz_makeConstructor (c$, 
46667 function (source, id, when, modifiers, keyCode, keyChar, p, m) {
46668 Clazz_superConstructor (this, javax.swing.event.MenuKeyEvent, [source, id, when, modifiers, keyCode, keyChar]);
46669 this.path = p;
46670 this.manager = m;
46671 }, "java.awt.Component,~N,~N,~N,~N,~S,~A,javax.swing.MenuSelectionManager");
46672 Clazz_defineMethod (c$, "getPath", 
46673 function () {
46674 return this.path;
46675 });
46676 Clazz_defineMethod (c$, "getMenuSelectionManager", 
46677 function () {
46678 return this.manager;
46679 });
46680 });
46681 Clazz_declarePackage ("javax.swing.event");
46682 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuKeyListener", null, function () {
46683 Clazz_declareInterface (javax.swing.event, "MenuKeyListener", java.util.EventListener);
46684 });
46685 Clazz_declarePackage ("javax.swing");
46686 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 () {
46687 c$ = Clazz_decorateAsClass (function () {
46688 this.invoker = null;
46689 this.popup = null;
46690 this.frame = null;
46691 this.desiredLocationX = 0;
46692 this.desiredLocationY = 0;
46693 this.label = null;
46694 this.$paintBorder = true;
46695 this.margin = null;
46696 this.lightWeightPopup = true;
46697 this.selectionModel = null;
46698 Clazz_instantialize (this, arguments);
46699 }, javax.swing, "JPopupMenu", javax.swing.JComponent, javax.swing.MenuElement);
46700 c$.setDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "setDefaultLightWeightPopupEnabled", 
46701 function (aFlag) {
46702 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.$valueOf (aFlag));
46703 }, "~B");
46704 c$.getDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "getDefaultLightWeightPopupEnabled", 
46705 function () {
46706 var b = javax.swing.SwingUtilities.appContextGet (javax.swing.JPopupMenu.defaultLWPopupEnabledKey);
46707 if (b == null) {
46708 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.TRUE);
46709 return true;
46710 }return b.booleanValue ();
46711 });
46712 Clazz_makeConstructor (c$, 
46713 function () {
46714 this.construct (null);
46715 });
46716 Clazz_makeConstructor (c$, 
46717 function (label) {
46718 Clazz_superConstructor (this, javax.swing.JPopupMenu, []);
46719 this.label = label;
46720 this.lightWeightPopup = javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled ();
46721 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
46722 this.enableEvents (16);
46723 this.updateUI ();
46724 }, "~S");
46725 Clazz_overrideMethod (c$, "getUI", 
46726 function () {
46727 return this.ui;
46728 });
46729 Clazz_overrideMethod (c$, "updateUI", 
46730 function () {
46731 this.setUI (javax.swing.UIManager.getUI (this));
46732 });
46733 Clazz_overrideMethod (c$, "getUIClassID", 
46734 function () {
46735 return "PopupMenuUI";
46736 });
46737 Clazz_defineMethod (c$, "processKeyEvent", 
46738 function (evt) {
46739 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46740 if (evt.isConsumed ()) {
46741 return;
46742 }Clazz_superCall (this, javax.swing.JPopupMenu, "processKeyEvent", [evt]);
46743 }, "java.awt.event.KeyEvent");
46744 Clazz_defineMethod (c$, "getSelectionModel", 
46745 function () {
46746 return this.selectionModel;
46747 });
46748 Clazz_defineMethod (c$, "setSelectionModel", 
46749 function (model) {
46750 this.selectionModel = model;
46751 }, "javax.swing.SingleSelectionModel");
46752 Clazz_defineMethod (c$, "add", 
46753 function (menuItem) {
46754 Clazz_superCall (this, javax.swing.JPopupMenu, "add", [menuItem]);
46755 return menuItem;
46756 }, "javax.swing.JMenuItem");
46757 Clazz_defineMethod (c$, "add", 
46758 function (s) {
46759 return this.add ( new javax.swing.JMenuItem (s));
46760 }, "~S");
46761 Clazz_defineMethod (c$, "add", 
46762 function (a) {
46763 var mi = this.createActionComponent (a);
46764 mi.setAction (a);
46765 this.add (mi);
46766 return mi;
46767 }, "javax.swing.Action");
46768 Clazz_defineMethod (c$, "adjustPopupLocationToFitScreen", 
46769 function (xposition, yposition) {
46770 var p =  new java.awt.Point (xposition, yposition);
46771 if (javax.swing.JPopupMenu.popupPostionFixDisabled == true || java.awt.GraphicsEnvironment.isHeadless ()) return p;
46772 return p;
46773 }, "~N,~N");
46774 Clazz_defineMethod (c$, "createActionComponent", 
46775 function (a) {
46776 var mi = ((Clazz_isClassDefined ("javax.swing.JPopupMenu$1") ? 0 : javax.swing.JPopupMenu.$JPopupMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JPopupMenu$1, this, null));
46777 mi.setHorizontalTextPosition (11);
46778 mi.setVerticalTextPosition (0);
46779 return mi;
46780 }, "javax.swing.Action");
46781 Clazz_defineMethod (c$, "createActionChangeListener", 
46782 function (b) {
46783 return b.createActionPropertyChangeListener0 (b.getAction ());
46784 }, "javax.swing.JMenuItem");
46785 Clazz_defineMethod (c$, "remove", 
46786 function (pos) {
46787 if (pos < 0) {
46788 throw  new IllegalArgumentException ("index less than zero.");
46789 }if (pos > this.getComponentCount () - 1) {
46790 throw  new IllegalArgumentException ("index greater than the number of items.");
46791 }Clazz_superCall (this, javax.swing.JPopupMenu, "remove", [pos]);
46792 }, "~N");
46793 Clazz_defineMethod (c$, "setLightWeightPopupEnabled", 
46794 function (aFlag) {
46795 this.lightWeightPopup = aFlag;
46796 }, "~B");
46797 Clazz_defineMethod (c$, "isLightWeightPopupEnabled", 
46798 function () {
46799 return this.lightWeightPopup;
46800 });
46801 Clazz_defineMethod (c$, "getLabel", 
46802 function () {
46803 return this.label;
46804 });
46805 Clazz_defineMethod (c$, "setLabel", 
46806 function (label) {
46807 var oldValue = this.label;
46808 this.label = label;
46809 this.firePropertyChangeObject ("label", oldValue, label);
46810 this.invalidate ();
46811 this.repaint ();
46812 }, "~S");
46813 Clazz_defineMethod (c$, "addSeparator", 
46814 function () {
46815 this.add ( new javax.swing.JPopupMenu.Separator ());
46816 });
46817 Clazz_defineMethod (c$, "insert", 
46818 function (a, index) {
46819 var mi = this.createActionComponent (a);
46820 mi.setAction (a);
46821 this.insert (mi, index);
46822 }, "javax.swing.Action,~N");
46823 Clazz_defineMethod (c$, "insert", 
46824 function (component, index) {
46825 if (index < 0) {
46826 throw  new IllegalArgumentException ("index less than zero.");
46827 }var nitems = this.getComponentCount ();
46828 var tempItems =  new java.util.Vector ();
46829 for (var i = index; i < nitems; i++) {
46830 tempItems.addElement (this.getComponent (index));
46831 this.remove (index);
46832 }
46833 this.add (component);
46834 for (var i = 0; i < tempItems.size (); i++) {
46835 this.add (tempItems.elementAt (i));
46836 }
46837 }, "java.awt.Component,~N");
46838 Clazz_defineMethod (c$, "addPopupMenuListener", 
46839 function (l) {
46840 this.listenerList.add (javax.swing.event.PopupMenuListener, l);
46841 }, "javax.swing.event.PopupMenuListener");
46842 Clazz_defineMethod (c$, "removePopupMenuListener", 
46843 function (l) {
46844 this.listenerList.remove (javax.swing.event.PopupMenuListener, l);
46845 }, "javax.swing.event.PopupMenuListener");
46846 Clazz_defineMethod (c$, "getPopupMenuListeners", 
46847 function () {
46848 return this.listenerList.getListeners (javax.swing.event.PopupMenuListener);
46849 });
46850 Clazz_defineMethod (c$, "addMenuKeyListener", 
46851 function (l) {
46852 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
46853 }, "javax.swing.event.MenuKeyListener");
46854 Clazz_defineMethod (c$, "removeMenuKeyListener", 
46855 function (l) {
46856 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
46857 }, "javax.swing.event.MenuKeyListener");
46858 Clazz_defineMethod (c$, "getMenuKeyListeners", 
46859 function () {
46860 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
46861 });
46862 Clazz_defineMethod (c$, "firePopupMenuWillBecomeVisible", 
46863 function () {
46864 var listeners = this.listenerList.getListenerList ();
46865 var e = null;
46866 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46867 if (listeners[i] === javax.swing.event.PopupMenuListener) {
46868 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
46869 (listeners[i + 1]).popupMenuWillBecomeVisible (e);
46870 }}
46871 });
46872 Clazz_defineMethod (c$, "firePopupMenuWillBecomeInvisible", 
46873 function () {
46874 var listeners = this.listenerList.getListenerList ();
46875 var e = null;
46876 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46877 if (listeners[i] === javax.swing.event.PopupMenuListener) {
46878 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
46879 (listeners[i + 1]).popupMenuWillBecomeInvisible (e);
46880 }}
46881 });
46882 Clazz_defineMethod (c$, "firePopupMenuCanceled", 
46883 function () {
46884 var listeners = this.listenerList.getListenerList ();
46885 var e = null;
46886 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46887 if (listeners[i] === javax.swing.event.PopupMenuListener) {
46888 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
46889 (listeners[i + 1]).popupMenuCanceled (e);
46890 }}
46891 });
46892 Clazz_overrideMethod (c$, "alwaysOnTop", 
46893 function () {
46894 return true;
46895 });
46896 Clazz_defineMethod (c$, "pack", 
46897 function () {
46898 if (this.popup != null) {
46899 var pref = this.getPreferredSize ();
46900 if (pref == null || pref.width != this.getWidth () || pref.height != this.getHeight ()) {
46901 this.popup = this.getPopup ();
46902 } else {
46903 this.validate ();
46904 }}});
46905 Clazz_overrideMethod (c$, "setVisible", 
46906 function (b) {
46907 if (b == this.isVisible ()) return;
46908 if (b == false) {
46909 var doCanceled = this.getClientProperty ("JPopupMenu.firePopupMenuCanceled");
46910 if (doCanceled != null && doCanceled === Boolean.TRUE) {
46911 this.putClientProperty ("JPopupMenu.firePopupMenuCanceled", Boolean.FALSE);
46912 this.firePopupMenuCanceled ();
46913 }this.getSelectionModel ().clearSelection ();
46914 } else {
46915 if (this.isPopupMenu ()) {
46916 var me =  new Array (1);
46917 me[0] = this;
46918 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
46919 }}if (b) {
46920 this.firePopupMenuWillBecomeVisible ();
46921 this.popup = this.getPopup ();
46922 this.firePropertyChangeObject ("visible", Boolean.FALSE, Boolean.TRUE);
46923 } else if (this.popup != null) {
46924 this.firePopupMenuWillBecomeInvisible ();
46925 this.popup.hide ();
46926 this.popup = null;
46927 this.firePropertyChangeObject ("visible", Boolean.TRUE, Boolean.FALSE);
46928 if (this.isPopupMenu ()) {
46929 javax.swing.MenuSelectionManager.defaultManager ().clearSelectedPath ();
46930 }}}, "~B");
46931 Clazz_defineMethod (c$, "getPopup", 
46932  function () {
46933 var oldPopup = this.popup;
46934 if (oldPopup != null) {
46935 oldPopup.hide ();
46936 }var popupFactory = javax.swing.PopupFactory.getSharedInstance ();
46937 if (this.isLightWeightPopupEnabled ()) {
46938 popupFactory.setPopupType (0);
46939 } else {
46940 popupFactory.setPopupType (1);
46941 }var p = this.adjustPopupLocationToFitScreen (this.desiredLocationX, this.desiredLocationY);
46942 this.desiredLocationX = p.x;
46943 this.desiredLocationY = p.y;
46944 var newPopup = this.getUI ().getPopup (this, this.desiredLocationX, this.desiredLocationY);
46945 popupFactory.setPopupType (0);
46946 newPopup.show ();
46947 return newPopup;
46948 });
46949 Clazz_overrideMethod (c$, "isVisible", 
46950 function () {
46951 if (this.popup != null) return true;
46952  else return false;
46953 });
46954 Clazz_defineMethod (c$, "setLocation", 
46955 function (x, y) {
46956 var oldX = this.desiredLocationX;
46957 var oldY = this.desiredLocationY;
46958 this.desiredLocationX = x;
46959 this.desiredLocationY = y;
46960 if (this.popup != null && (x != oldX || y != oldY)) {
46961 this.popup = this.getPopup ();
46962 }}, "~N,~N");
46963 Clazz_defineMethod (c$, "isPopupMenu", 
46964  function () {
46965 return ((this.invoker != null) && !(Clazz_instanceOf (this.invoker, javax.swing.JMenu)));
46966 });
46967 Clazz_defineMethod (c$, "getInvoker", 
46968 function () {
46969 return this.invoker;
46970 });
46971 Clazz_defineMethod (c$, "setInvoker", 
46972 function (invoker) {
46973 var oldInvoker = this.invoker;
46974 this.invoker = invoker;
46975 if ((oldInvoker !== this.invoker) && (this.ui != null)) {
46976 this.ui.uninstallUI (this);
46977 this.ui.installUI (this);
46978 }this.invalidate ();
46979 }, "java.awt.Component");
46980 Clazz_defineMethod (c$, "show", 
46981 function (invoker, x, y) {
46982 this.setInvoker (invoker);
46983 var newFrame = javax.swing.JPopupMenu.getFrame (invoker);
46984 if (newFrame !== this.frame) {
46985 if (newFrame != null) {
46986 this.frame = newFrame;
46987 if (this.popup != null) {
46988 this.setVisible (false);
46989 }}}var invokerOrigin;
46990 if (invoker != null) {
46991 invokerOrigin = invoker.getLocationOnScreen ();
46992 var lx;
46993 var ly;
46994 lx = (invokerOrigin.x) + (x);
46995 ly = (invokerOrigin.y) + (y);
46996 if (lx > 2147483647) lx = 2147483647;
46997 if (lx < -2147483648) lx = -2147483648;
46998 if (ly > 2147483647) ly = 2147483647;
46999 if (ly < -2147483648) ly = -2147483648;
47000 this.setLocation (lx, ly);
47001 } else {
47002 this.setLocation (x, y);
47003 }this.setVisible (true);
47004 }, "java.awt.Component,~N,~N");
47005 Clazz_defineMethod (c$, "getRootPopupMenu", 
47006 function () {
47007 var mp = this;
47008 while ((mp != null) && (mp.isPopupMenu () != true) && (mp.getInvoker () != null) && (mp.getInvoker ().getParent () != null) && (Clazz_instanceOf (mp.getInvoker ().getParent (), javax.swing.JPopupMenu))) {
47009 mp = mp.getInvoker ().getParent ();
47010 }
47011 return mp;
47012 });
47013 Clazz_defineMethod (c$, "getComponentAtIndex", 
47014 function (i) {
47015 return this.getComponent (i);
47016 }, "~N");
47017 Clazz_defineMethod (c$, "getComponentIndex", 
47018 function (c) {
47019 var ncomponents = this.getComponentCount ();
47020 var component = this.getComponents ();
47021 for (var i = 0; i < ncomponents; i++) {
47022 var comp = component[i];
47023 if (comp === c) return i;
47024 }
47025 return -1;
47026 }, "java.awt.Component");
47027 Clazz_defineMethod (c$, "setPopupSize", 
47028 function (d) {
47029 var oldSize = this.getPreferredSize ();
47030 this.setPreferredSize (d);
47031 if (this.popup != null) {
47032 var newSize = this.getPreferredSize ();
47033 if (!oldSize.equals (newSize)) {
47034 this.popup = this.getPopup ();
47035 }}}, "java.awt.Dimension");
47036 Clazz_defineMethod (c$, "setPopupSize", 
47037 function (width, height) {
47038 this.setPopupSize ( new java.awt.Dimension (width, height));
47039 }, "~N,~N");
47040 Clazz_defineMethod (c$, "setSelected", 
47041 function (sel) {
47042 var model = this.getSelectionModel ();
47043 var index = this.getComponentIndex (sel);
47044 model.setSelectedIndex (index);
47045 }, "java.awt.Component");
47046 Clazz_defineMethod (c$, "isBorderPainted", 
47047 function () {
47048 return this.$paintBorder;
47049 });
47050 Clazz_defineMethod (c$, "setBorderPainted", 
47051 function (b) {
47052 this.$paintBorder = b;
47053 this.repaint ();
47054 }, "~B");
47055 Clazz_defineMethod (c$, "paintBorder", 
47056 function (g) {
47057 if (this.isBorderPainted ()) {
47058 Clazz_superCall (this, javax.swing.JPopupMenu, "paintBorder", [g]);
47059 }}, "java.awt.Graphics");
47060 Clazz_defineMethod (c$, "getMargin", 
47061 function () {
47062 if (this.margin == null) {
47063 return  new java.awt.Insets (0, 0, 0, 0);
47064 } else {
47065 return this.margin;
47066 }});
47067 Clazz_defineMethod (c$, "isSubPopupMenu", 
47068 function (popup) {
47069 var ncomponents = this.getComponentCount ();
47070 var component = this.getComponents ();
47071 for (var i = 0; i < ncomponents; i++) {
47072 var comp = component[i];
47073 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
47074 var menu = comp;
47075 var subPopup = menu.getPopupMenu ();
47076 if (subPopup === popup) return true;
47077 if (subPopup.isSubPopupMenu (popup)) return true;
47078 }}
47079 return false;
47080 }, "javax.swing.JPopupMenu");
47081 c$.getFrame = Clazz_defineMethod (c$, "getFrame", 
47082  function (c) {
47083 var w = c;
47084 while (!(Clazz_instanceOf (w, java.awt.Frame)) && (w != null)) {
47085 w = w.getParent ();
47086 }
47087 return w;
47088 }, "java.awt.Component");
47089 Clazz_defineMethod (c$, "paramString", 
47090 function () {
47091 var labelString = (this.label != null ? this.label : "");
47092 var paintBorderString = (this.$paintBorder ? "true" : "false");
47093 var marginString = (this.margin != null ? this.margin.toString () : "");
47094 var lightWeightPopupEnabledString = (this.isLightWeightPopupEnabled () ? "true" : "false");
47095 return Clazz_superCall (this, javax.swing.JPopupMenu, "paramString", []) + ",desiredLocationX=" + this.desiredLocationX + ",desiredLocationY=" + this.desiredLocationY + ",label=" + labelString + ",lightWeightPopupEnabled=" + lightWeightPopupEnabledString + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
47096 });
47097 Clazz_defineMethod (c$, "processMouseEvent", 
47098 function (event, path, manager) {
47099 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
47100 Clazz_defineMethod (c$, "processKeyEvent", 
47101 function (e, path, manager) {
47102 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
47103 this.processMenuKeyEvent (mke);
47104 if (mke.isConsumed ()) {
47105 e.consume ();
47106 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
47107 Clazz_defineMethod (c$, "processMenuKeyEvent", 
47108  function (e) {
47109 switch (e.getID ()) {
47110 case 401:
47111 this.fireMenuKeyPressed (e);
47112 break;
47113 case 402:
47114 this.fireMenuKeyReleased (e);
47115 break;
47116 case 400:
47117 this.fireMenuKeyTyped (e);
47118 break;
47119 default:
47120 break;
47121 }
47122 }, "javax.swing.event.MenuKeyEvent");
47123 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
47124  function (event) {
47125 var listeners = this.listenerList.getListenerList ();
47126 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47127 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47128 (listeners[i + 1]).menuKeyPressed (event);
47129 }}
47130 }, "javax.swing.event.MenuKeyEvent");
47131 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
47132  function (event) {
47133 var listeners = this.listenerList.getListenerList ();
47134 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47135 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47136 (listeners[i + 1]).menuKeyReleased (event);
47137 }}
47138 }, "javax.swing.event.MenuKeyEvent");
47139 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
47140  function (event) {
47141 var listeners = this.listenerList.getListenerList ();
47142 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47143 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47144 (listeners[i + 1]).menuKeyTyped (event);
47145 }}
47146 }, "javax.swing.event.MenuKeyEvent");
47147 Clazz_overrideMethod (c$, "menuSelectionChanged", 
47148 function (isIncluded) {
47149 if (Clazz_instanceOf (this.invoker, javax.swing.JMenu)) {
47150 var m = this.invoker;
47151 if (isIncluded) m.setPopupMenuVisible (true);
47152  else m.setPopupMenuVisible (false);
47153 }if (this.isPopupMenu () && !isIncluded) this.setVisible (false);
47154 }, "~B");
47155 Clazz_overrideMethod (c$, "getSubElements", 
47156 function () {
47157 var result;
47158 var tmp =  new java.util.Vector ();
47159 var c = this.getComponentCount ();
47160 var i;
47161 var m;
47162 for (i = 0; i < c; i++) {
47163 m = this.getComponent (i);
47164 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
47165 }
47166 result =  new Array (tmp.size ());
47167 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
47168
47169 return result;
47170 });
47171 Clazz_defineMethod (c$, "getComponent", 
47172 function () {
47173 return this;
47174 });
47175 Clazz_defineMethod (c$, "isPopupTrigger", 
47176 function (e) {
47177 return this.getUI ().isPopupTrigger (e);
47178 }, "java.awt.event.MouseEvent");
47179 c$.$JPopupMenu$1$ = function () {
47180 Clazz_pu$h(self.c$);
47181 c$ = Clazz_declareAnonymous (javax.swing, "JPopupMenu$1", javax.swing.JMenuItem);
47182 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
47183 function (a) {
47184 var pcl = this.b$["javax.swing.JPopupMenu"].createActionChangeListener (this);
47185 if (pcl == null) {
47186 pcl = Clazz_superCall (this, javax.swing.JPopupMenu$1, "createActionPropertyChangeListener", [a]);
47187 }return pcl;
47188 }, "javax.swing.Action");
47189 c$ = Clazz_p0p ();
47190 };
47191 Clazz_pu$h(self.c$);
47192 c$ = Clazz_declareType (javax.swing.JPopupMenu, "Separator", javax.swing.JSeparator);
47193 Clazz_makeConstructor (c$, 
47194 function () {
47195 Clazz_superConstructor (this, javax.swing.JPopupMenu.Separator, [0]);
47196 });
47197 Clazz_overrideMethod (c$, "getUIClassID", 
47198 function () {
47199 return "PopupMenuSeparatorUI";
47200 });
47201 c$ = Clazz_p0p ();
47202 Clazz_defineStatics (c$,
47203 "$uiClassID", "PopupMenuUI");
47204 c$.defaultLWPopupEnabledKey = c$.prototype.defaultLWPopupEnabledKey =  new Clazz._O ();
47205 Clazz_defineStatics (c$,
47206 "popupPostionFixDisabled", false);
47207 });
47208 Clazz_declarePackage ("javax.swing");
47209 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JSeparator", ["java.lang.IllegalArgumentException", "javax.swing.UIManager"], function () {
47210 c$ = Clazz_decorateAsClass (function () {
47211 this.orientation = 0;
47212 Clazz_instantialize (this, arguments);
47213 }, javax.swing, "JSeparator", javax.swing.JComponent, javax.swing.SwingConstants);
47214 Clazz_makeConstructor (c$, 
47215 function () {
47216 this.construct (0);
47217 });
47218 Clazz_makeConstructor (c$, 
47219 function (orientation) {
47220 Clazz_superConstructor (this, javax.swing.JSeparator, []);
47221 this.checkOrientation (orientation);
47222 this.orientation = orientation;
47223 this.setFocusable (false);
47224 this.updateUI ();
47225 }, "~N");
47226 Clazz_overrideMethod (c$, "getUI", 
47227 function () {
47228 return this.ui;
47229 });
47230 Clazz_overrideMethod (c$, "updateUI", 
47231 function () {
47232 this.setUI (javax.swing.UIManager.getUI (this));
47233 });
47234 Clazz_overrideMethod (c$, "getUIClassID", 
47235 function () {
47236 return "SeparatorUI";
47237 });
47238 Clazz_defineMethod (c$, "getOrientation", 
47239 function () {
47240 return this.orientation;
47241 });
47242 Clazz_defineMethod (c$, "setOrientation", 
47243 function (orientation) {
47244 if (this.orientation == orientation) {
47245 return;
47246 }var oldValue = this.orientation;
47247 this.checkOrientation (orientation);
47248 this.orientation = orientation;
47249 this.firePropertyChangeInt ("orientation", oldValue, orientation);
47250 this.revalidate ();
47251 this.repaint ();
47252 }, "~N");
47253 Clazz_defineMethod (c$, "checkOrientation", 
47254  function (orientation) {
47255 switch (orientation) {
47256 case 1:
47257 case 0:
47258 break;
47259 default:
47260 throw  new IllegalArgumentException ("orientation must be one of: VERTICAL, HORIZONTAL");
47261 }
47262 }, "~N");
47263 Clazz_defineMethod (c$, "paramString", 
47264 function () {
47265 var orientationString = (this.orientation == 0 ? "HORIZONTAL" : "VERTICAL");
47266 return Clazz_superCall (this, javax.swing.JSeparator, "paramString", []) + ",orientation=" + orientationString;
47267 });
47268 Clazz_defineStatics (c$,
47269 "$uiClassID", "SeparatorUI");
47270 });
47271 Clazz_declarePackage ("javax.swing");
47272 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 () {
47273 c$ = Clazz_decorateAsClass (function () {
47274 this.selection = null;
47275 this.changeEvent = null;
47276 this.listenerList = null;
47277 Clazz_instantialize (this, arguments);
47278 }, javax.swing, "MenuSelectionManager");
47279 Clazz_prepareFields (c$, function () {
47280 this.selection =  new java.util.Vector ();
47281 this.listenerList =  new javax.swing.event.EventListenerList ();
47282 });
47283 c$.defaultManager = Clazz_defineMethod (c$, "defaultManager", 
47284 function () {
47285 {
47286 var context = jssun.awt.AppContext.getAppContext ();
47287 var msm = context.get (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY);
47288 if (msm == null) {
47289 msm =  new javax.swing.MenuSelectionManager ();
47290 context.put (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY, msm);
47291 }return msm;
47292 }});
47293 Clazz_defineMethod (c$, "setSelectedPath", 
47294 function (path) {
47295 var i;
47296 var c;
47297 var currentSelectionCount = this.selection.size ();
47298 var firstDifference = 0;
47299 if (path == null) {
47300 path =  new Array (0);
47301 }for (i = 0, c = path.length; i < c; i++) {
47302 if (i < currentSelectionCount && this.selection.elementAt (i) === path[i]) firstDifference++;
47303  else break;
47304 }
47305 for (i = currentSelectionCount - 1; i >= firstDifference; i--) {
47306 var me = this.selection.elementAt (i);
47307 this.selection.removeElementAt (i);
47308 me.menuSelectionChanged (false);
47309 }
47310 for (i = firstDifference, c = path.length; i < c; i++) {
47311 if (path[i] != null) {
47312 this.selection.addElement (path[i]);
47313 path[i].menuSelectionChanged (true);
47314 }}
47315 this.fireStateChanged ();
47316 }, "~A");
47317 Clazz_defineMethod (c$, "getSelectedPath", 
47318 function () {
47319 var res =  new Array (this.selection.size ());
47320 var i;
47321 var c;
47322 for (i = 0, c = this.selection.size (); i < c; i++) res[i] = this.selection.elementAt (i);
47323
47324 return res;
47325 });
47326 Clazz_defineMethod (c$, "clearSelectedPath", 
47327 function () {
47328 if (this.selection.size () > 0) {
47329 this.setSelectedPath (null);
47330 }});
47331 Clazz_defineMethod (c$, "addChangeListener", 
47332 function (l) {
47333 this.listenerList.add (javax.swing.event.ChangeListener, l);
47334 }, "javax.swing.event.ChangeListener");
47335 Clazz_defineMethod (c$, "removeChangeListener", 
47336 function (l) {
47337 this.listenerList.remove (javax.swing.event.ChangeListener, l);
47338 }, "javax.swing.event.ChangeListener");
47339 Clazz_defineMethod (c$, "getChangeListeners", 
47340 function () {
47341 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
47342 });
47343 Clazz_defineMethod (c$, "fireStateChanged", 
47344 function () {
47345 var listeners = this.listenerList.getListenerList ();
47346 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47347 if (listeners[i] === javax.swing.event.ChangeListener) {
47348 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
47349 (listeners[i + 1]).stateChanged (this.changeEvent);
47350 }}
47351 });
47352 Clazz_defineMethod (c$, "processMouseEvent", 
47353 function (event) {
47354 var screenX;
47355 var screenY;
47356 var p;
47357 var i;
47358 var j;
47359 var d;
47360 var mc;
47361 var r2;
47362 var cWidth;
47363 var cHeight;
47364 var menuElement;
47365 var subElements;
47366 var path;
47367 var tmp;
47368 var selectionSize;
47369 p = event.getPoint ();
47370 var source = event.getSource ();
47371 if (!source.isShowing ()) {
47372 return;
47373 }var type = event.getID ();
47374 var modifiers = event.getModifiers ();
47375 if ((type == 504 || type == 505) && ((modifiers & (28)) != 0)) {
47376 return;
47377 }javax.swing.SwingUtilities.convertPointToScreen (p, source);
47378 screenX = p.x;
47379 screenY = p.y;
47380 tmp = this.selection.clone ();
47381 selectionSize = tmp.size ();
47382 var success = false;
47383 for (i = selectionSize - 1; i >= 0 && success == false; i--) {
47384 menuElement = tmp.elementAt (i);
47385 subElements = menuElement.getSubElements ();
47386 path = null;
47387 for (j = 0, d = subElements.length; j < d && success == false; j++) {
47388 if (subElements[j] == null) continue;
47389 mc = subElements[j].getComponent ();
47390 if (!mc.isShowing ()) continue;
47391 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47392 cWidth = (mc).getWidth ();
47393 cHeight = (mc).getHeight ();
47394 } else {
47395 r2 = mc.getBounds ();
47396 cWidth = r2.width;
47397 cHeight = r2.height;
47398 }p.x = screenX;
47399 p.y = screenY;
47400 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47401 if ((p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight)) {
47402 var k;
47403 if (path == null) {
47404 path =  new Array (i + 2);
47405 for (k = 0; k <= i; k++) path[k] = tmp.elementAt (k);
47406
47407 }path[i + 1] = subElements[j];
47408 var currentSelection = this.getSelectedPath ();
47409 if (currentSelection[currentSelection.length - 1] !== path[i + 1] && (currentSelection.length < 2 || currentSelection[currentSelection.length - 2] !== path[i + 1])) {
47410 var oldMC = currentSelection[currentSelection.length - 1].getComponent ();
47411 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);
47412 currentSelection[currentSelection.length - 1].processMouseEvent (exitEvent, path, this);
47413 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);
47414 subElements[j].processMouseEvent (enterEvent, path, this);
47415 }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);
47416 subElements[j].processMouseEvent (mouseEvent, path, this);
47417 success = true;
47418 event.consume ();
47419 }}
47420 }
47421 }, "java.awt.event.MouseEvent");
47422 Clazz_defineMethod (c$, "componentForPoint", 
47423 function (source, sourcePoint) {
47424 var screenX;
47425 var screenY;
47426 var p = sourcePoint;
47427 var i;
47428 var j;
47429 var d;
47430 var mc;
47431 var r2;
47432 var cWidth;
47433 var cHeight;
47434 var menuElement;
47435 var subElements;
47436 var tmp;
47437 var selectionSize;
47438 javax.swing.SwingUtilities.convertPointToScreen (p, source);
47439 screenX = p.x;
47440 screenY = p.y;
47441 tmp = this.selection.clone ();
47442 selectionSize = tmp.size ();
47443 for (i = selectionSize - 1; i >= 0; i--) {
47444 menuElement = tmp.elementAt (i);
47445 subElements = menuElement.getSubElements ();
47446 for (j = 0, d = subElements.length; j < d; j++) {
47447 if (subElements[j] == null) continue;
47448 mc = subElements[j].getComponent ();
47449 if (!mc.isShowing ()) continue;
47450 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47451 cWidth = (mc).getWidth ();
47452 cHeight = (mc).getHeight ();
47453 } else {
47454 r2 = mc.getBounds ();
47455 cWidth = r2.width;
47456 cHeight = r2.height;
47457 }p.x = screenX;
47458 p.y = screenY;
47459 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47460 if (p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight) {
47461 return mc;
47462 }}
47463 }
47464 return null;
47465 }, "java.awt.Component,java.awt.Point");
47466 Clazz_defineMethod (c$, "processKeyEvent", 
47467 function (e) {
47468 var sel2 =  new Array (0);
47469 sel2 = this.selection.toArray (sel2);
47470 var selSize = sel2.length;
47471 var path;
47472 if (selSize < 1) {
47473 return;
47474 }for (var i = selSize - 1; i >= 0; i--) {
47475 var elem = sel2[i];
47476 var subs = elem.getSubElements ();
47477 path = null;
47478 for (var j = 0; j < subs.length; j++) {
47479 if (subs[j] == null || !subs[j].getComponent ().isShowing () || !subs[j].getComponent ().isEnabled ()) {
47480 continue;
47481 }if (path == null) {
47482 path =  new Array (i + 2);
47483 System.arraycopy (sel2, 0, path, 0, i + 1);
47484 }path[i + 1] = subs[j];
47485 subs[j].processKeyEvent (e, path, this);
47486 if (e.isConsumed ()) {
47487 return;
47488 }}
47489 }
47490 path =  new Array (1);
47491 path[0] = sel2[0];
47492 path[0].processKeyEvent (e, path, this);
47493 if (e.isConsumed ()) {
47494 return;
47495 }}, "java.awt.event.KeyEvent");
47496 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47497 function (c) {
47498 if (this.selection.size () > 0) {
47499 var me = this.selection.elementAt (0);
47500 return this.isComponentPartOfCurrentMenu (me, c);
47501 } else return false;
47502 }, "java.awt.Component");
47503 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47504  function (root, c) {
47505 var children;
47506 var i;
47507 var d;
47508 if (root == null) return false;
47509 if (root.getComponent () === c) return true;
47510  else {
47511 children = root.getSubElements ();
47512 for (i = 0, d = children.length; i < d; i++) {
47513 if (this.isComponentPartOfCurrentMenu (children[i], c)) return true;
47514 }
47515 }return false;
47516 }, "javax.swing.MenuElement,java.awt.Component");
47517 c$.MENU_SELECTION_MANAGER_KEY = c$.prototype.MENU_SELECTION_MANAGER_KEY =  new Clazz._O ();
47518 });
47519 Clazz_declarePackage ("javax.swing");
47520 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 () {
47521 c$ = Clazz_decorateAsClass (function () {
47522 this.popupType = 0;
47523 Clazz_instantialize (this, arguments);
47524 }, javax.swing, "PopupFactory");
47525 c$.setSharedInstance = Clazz_defineMethod (c$, "setSharedInstance", 
47526 function (factory) {
47527 if (factory == null) {
47528 throw  new IllegalArgumentException ("PopupFactory can not be null");
47529 }javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.SharedInstanceKey, factory);
47530 }, "javax.swing.PopupFactory");
47531 c$.getSharedInstance = Clazz_defineMethod (c$, "getSharedInstance", 
47532 function () {
47533 var factory = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.SharedInstanceKey);
47534 if (factory == null) {
47535 factory =  new javax.swing.PopupFactory ();
47536 javax.swing.PopupFactory.setSharedInstance (factory);
47537 }return factory;
47538 });
47539 Clazz_defineMethod (c$, "setPopupType", 
47540 function (type) {
47541 this.popupType = type;
47542 }, "~N");
47543 Clazz_defineMethod (c$, "getPopupType", 
47544 function () {
47545 return this.popupType;
47546 });
47547 Clazz_defineMethod (c$, "getPopup", 
47548 function (owner, contents, x, y) {
47549 if (contents == null) {
47550 throw  new IllegalArgumentException ("Popup.getPopup must be passed non-null contents");
47551 }var popupType = this.getPopupType (owner, contents, x, y);
47552 var popup = this.getPopup (owner, contents, x, y, popupType);
47553 if (popup == null) {
47554 popup = this.getPopup (owner, contents, x, y, 2);
47555 }return popup;
47556 }, "java.awt.Component,java.awt.Component,~N,~N");
47557 Clazz_defineMethod (c$, "getPopupType", 
47558  function (owner, contents, ownerX, ownerY) {
47559 var popupType = this.getPopupType ();
47560 if (owner == null || this.invokerInHeavyWeightPopup (owner)) {
47561 popupType = 2;
47562 } else if (popupType == 0 && !(Clazz_instanceOf (contents, javax.swing.JToolTip)) && !(Clazz_instanceOf (contents, javax.swing.JPopupMenu))) {
47563 popupType = 1;
47564 }var c = owner;
47565 while (c != null) {
47566 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
47567 if ((c).getClientProperty (javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP) === Boolean.TRUE) {
47568 popupType = 2;
47569 break;
47570 }}c = c.getParent ();
47571 }
47572 return popupType;
47573 }, "java.awt.Component,java.awt.Component,~N,~N");
47574 Clazz_defineMethod (c$, "getPopup", 
47575  function (owner, contents, ownerX, ownerY, popupType) {
47576 switch (popupType) {
47577 case 0:
47578 return this.getLightWeightPopup (owner, contents, ownerX, ownerY);
47579 case 1:
47580 return this.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47581 case 2:
47582 return this.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47583 }
47584 return null;
47585 }, "java.awt.Component,java.awt.Component,~N,~N,~N");
47586 Clazz_defineMethod (c$, "getLightWeightPopup", 
47587  function (owner, contents, ownerX, ownerY) {
47588 return javax.swing.PopupFactory.LightWeightPopup.getLightWeightPopup (owner, contents, ownerX, ownerY);
47589 }, "java.awt.Component,java.awt.Component,~N,~N");
47590 Clazz_defineMethod (c$, "getMediumWeightPopup", 
47591  function (owner, contents, ownerX, ownerY) {
47592 return javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47593 }, "java.awt.Component,java.awt.Component,~N,~N");
47594 Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47595  function (owner, contents, ownerX, ownerY) {
47596 return javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47597 }, "java.awt.Component,java.awt.Component,~N,~N");
47598 Clazz_defineMethod (c$, "invokerInHeavyWeightPopup", 
47599  function (i) {
47600 if (i != null) {
47601 var parent;
47602 for (parent = i.getParent (); parent != null; parent = parent.getParent ()) {
47603 if (Clazz_instanceOf (parent, javax.swing.Popup.HeavyWeightWindow)) {
47604 return true;
47605 }}
47606 }return false;
47607 }, "java.awt.Component");
47608 Clazz_pu$h(self.c$);
47609 c$ = Clazz_declareType (javax.swing.PopupFactory, "HeavyWeightPopup", javax.swing.Popup);
47610 c$.getHeavyWeightPopup = Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47611 function (a, b, c, d) {
47612 var e = (a != null) ? javax.swing.SwingUtilities.getWindowAncestor (a) : null;
47613 var f = null;
47614 if (e != null) {
47615 f = javax.swing.PopupFactory.HeavyWeightPopup.getRecycledHeavyWeightPopup (e);
47616 }var g = false;
47617 if (b != null && b.isFocusable ()) {
47618 if (Clazz_instanceOf (b, javax.swing.JPopupMenu)) {
47619 var h = b;
47620 var i = h.getComponents ();
47621 for (var j = 0; j < i.length; j++) {
47622 if (!(Clazz_instanceOf (i[j], javax.swing.MenuElement)) && !(Clazz_instanceOf (i[j], javax.swing.JSeparator))) {
47623 g = true;
47624 break;
47625 }}
47626 }}if (f == null || (f.getComponent ()).getFocusableWindowState () != g) {
47627 if (f != null) {
47628 f._dispose ();
47629 }f =  new javax.swing.PopupFactory.HeavyWeightPopup ();
47630 }f.reset (a, b, c, d);
47631 if (g) {
47632 var h = f.getComponent ();
47633 h.setFocusableWindowState (true);
47634 h.setName ("###focusableSwingPopup###");
47635 }return f;
47636 }, "java.awt.Component,java.awt.Component,~N,~N");
47637 c$.getRecycledHeavyWeightPopup = Clazz_defineMethod (c$, "getRecycledHeavyWeightPopup", 
47638  function (a) {
47639 {
47640 var b;
47641 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47642 if (c.containsKey (a)) {
47643 b = c.get (a);
47644 } else {
47645 return null;
47646 }var d;
47647 if ((d = b.size ()) > 0) {
47648 var e = b.get (0);
47649 b.remove (0);
47650 return e;
47651 }return null;
47652 }}, "java.awt.Window");
47653 c$.getHeavyWeightPopupCache = Clazz_defineMethod (c$, "getHeavyWeightPopupCache", 
47654  function () {
47655 {
47656 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey);
47657 if (a == null) {
47658 a =  new java.util.HashMap (2);
47659 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey, a);
47660 }return a;
47661 }});
47662 c$.recycleHeavyWeightPopup = Clazz_defineMethod (c$, "recycleHeavyWeightPopup", 
47663  function (a) {
47664 {
47665 var b;
47666 var c = javax.swing.SwingUtilities.getWindowAncestor (a.getComponent ());
47667 var d = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47668 if (Clazz_instanceOf (c, javax.swing.Popup.DefaultFrame) || !(c).isVisible ()) {
47669 a._dispose ();
47670 return;
47671 } else if (d.containsKey (c)) {
47672 b = d.get (c);
47673 } else {
47674 b =  new java.util.ArrayList ();
47675 d.put (c, b);
47676 var e = c;
47677 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))));
47678 }if (b.size () < 5) {
47679 b.add (a);
47680 } else {
47681 a._dispose ();
47682 }}}, "javax.swing.PopupFactory.HeavyWeightPopup");
47683 Clazz_defineMethod (c$, "hide", 
47684 function () {
47685 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "hide", []);
47686 javax.swing.PopupFactory.HeavyWeightPopup.recycleHeavyWeightPopup (this);
47687 });
47688 Clazz_defineMethod (c$, "dispose", 
47689 function () {
47690 });
47691 Clazz_defineMethod (c$, "_dispose", 
47692 function () {
47693 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "dispose", []);
47694 });
47695 c$.$PopupFactory$HeavyWeightPopup$1$ = function () {
47696 Clazz_pu$h(self.c$);
47697 c$ = Clazz_declareAnonymous (javax.swing, "PopupFactory$HeavyWeightPopup$1", java.awt.event.WindowAdapter);
47698 Clazz_overrideMethod (c$, "windowClosed", 
47699 function (a) {
47700 var b;
47701 {
47702 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47703 b = c.remove (this.f$.e);
47704 }if (b != null) {
47705 for (var c = b.size () - 1; c >= 0; c--) {
47706 (b.get (c))._dispose ();
47707 }
47708 }}, "java.awt.event.WindowEvent");
47709 c$ = Clazz_p0p ();
47710 };
47711 c$.heavyWeightPopupCacheKey = c$.prototype.heavyWeightPopupCacheKey =  new Clazz._O ();
47712 c$ = Clazz_p0p ();
47713 Clazz_pu$h(self.c$);
47714 c$ = Clazz_decorateAsClass (function () {
47715 this.owner = null;
47716 this.x = 0;
47717 this.y = 0;
47718 Clazz_instantialize (this, arguments);
47719 }, javax.swing.PopupFactory, "ContainerPopup", javax.swing.Popup);
47720 Clazz_overrideMethod (c$, "hide", 
47721 function () {
47722 var a = this.getComponent ();
47723 if (a != null) {
47724 var b = a.getParent ();
47725 if (b != null) {
47726 var c = a.getBounds ();
47727 b.remove (a);
47728 b.repaint (c.x, c.y, c.width, c.height);
47729 }}this.owner = null;
47730 });
47731 Clazz_overrideMethod (c$, "pack", 
47732 function () {
47733 var a = this.getComponent ();
47734 if (a != null) {
47735 a.setSize (a.getPreferredSize ());
47736 }});
47737 Clazz_defineMethod (c$, "reset", 
47738 function (a, b, c, d) {
47739 if ((Clazz_instanceOf (a, javax.swing.JFrame)) || (Clazz_instanceOf (a, javax.swing.JDialog)) || (Clazz_instanceOf (a, javax.swing.JWindow))) {
47740 a = (a).getLayeredPane ();
47741 }Clazz_superCall (this, javax.swing.PopupFactory.ContainerPopup, "reset", [a, b, c, d]);
47742 this.x = c;
47743 this.y = d;
47744 this.owner = a;
47745 }, "java.awt.Component,java.awt.Component,~N,~N");
47746 Clazz_defineMethod (c$, "overlappedByOwnedWindow", 
47747 function () {
47748 var a = this.getComponent ();
47749 if (this.owner != null && a != null) {
47750 var b = javax.swing.SwingUtilities.getWindowAncestor (this.owner);
47751 if (b == null) {
47752 return false;
47753 }var c = b.getOwnedWindows ();
47754 if (c != null) {
47755 var d = a.getBounds ();
47756 for (var e = 0; e < c.length; e++) {
47757 var f = c[e];
47758 if (f.isVisible () && d.intersects (f.getBounds ())) {
47759 return true;
47760 }}
47761 }}return false;
47762 });
47763 Clazz_defineMethod (c$, "fitsOnScreen", 
47764 function () {
47765 var a = this.getComponent ();
47766 if (this.owner != null && a != null) {
47767 var b;
47768 var c = a.getWidth ();
47769 var d = a.getHeight ();
47770 for (b = this.owner.getParent (); b != null; b = b.getParent ()) {
47771 if (Clazz_instanceOf (b, javax.swing.JFrame) || Clazz_instanceOf (b, javax.swing.JDialog) || Clazz_instanceOf (b, javax.swing.JWindow)) {
47772 var e = b.getBounds ();
47773 var f = b.getInsets ();
47774 e.x += f.left;
47775 e.y += f.top;
47776 e.width -= (f.left + f.right);
47777 e.height -= (f.top + f.bottom);
47778 var g = b.getGraphicsConfiguration ();
47779 var h = this.getContainerPopupArea (g);
47780 return e.intersection (h).contains (this.x, this.y, c, d);
47781 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
47782 var e = b.getBounds ();
47783 var f = b.getLocationOnScreen ();
47784 e.x = f.x;
47785 e.y = f.y;
47786 return e.contains (this.x, this.y, c, d);
47787 } else if (Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) {
47788 break;
47789 }}
47790 }return false;
47791 });
47792 Clazz_defineMethod (c$, "getContainerPopupArea", 
47793 function (a) {
47794 var b;
47795 var c = java.awt.Toolkit.getDefaultToolkit ();
47796 var d;
47797 if (a != null) {
47798 b = a.getBounds ();
47799 d = c.getScreenInsets (a);
47800 } else {
47801 b =  new java.awt.Rectangle (c.getScreenSize ());
47802 d =  new java.awt.Insets (0, 0, 0, 0);
47803 }b.x += d.left;
47804 b.y += d.top;
47805 b.width -= (d.left + d.right);
47806 b.height -= (d.top + d.bottom);
47807 return b;
47808 }, "java.awt.GraphicsConfiguration");
47809 c$ = Clazz_p0p ();
47810 Clazz_pu$h(self.c$);
47811 c$ = Clazz_declareType (javax.swing.PopupFactory, "LightWeightPopup", javax.swing.PopupFactory.ContainerPopup);
47812 c$.getLightWeightPopup = Clazz_defineMethod (c$, "getLightWeightPopup", 
47813 function (a, b, c, d) {
47814 var e = null;
47815 if (e == null) {
47816 e =  new javax.swing.PopupFactory.LightWeightPopup ();
47817 }e.reset (a, b, c, d);
47818 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
47819 e.hide ();
47820 return null;
47821 }return e;
47822 }, "java.awt.Component,java.awt.Component,~N,~N");
47823 Clazz_defineMethod (c$, "hide", 
47824 function () {
47825 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "hide", []);
47826 var a = this.getComponent ();
47827 a.removeAll ();
47828 });
47829 Clazz_overrideMethod (c$, "show", 
47830 function () {
47831 var a = null;
47832 if (this.owner != null) {
47833 a = (Clazz_instanceOf (this.owner, java.awt.Container) ? this.owner : this.owner.getParent ());
47834 }for (var b = a; b != null; b = b.getParent ()) {
47835 if (Clazz_instanceOf (b, javax.swing.JRootPane)) {
47836 a = (b).getLayeredPane ();
47837 } else if (Clazz_instanceOf (b, java.awt.Window)) {
47838 if (a == null) {
47839 a = b;
47840 }break;
47841 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
47842 break;
47843 }}
47844 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (a, this.x, this.y);
47845 var d = this.getComponent ();
47846 d.setLocation (c.x, c.y);
47847 if (Clazz_instanceOf (a, javax.swing.JLayeredPane)) {
47848 (a).add (d, javax.swing.JLayeredPane.POPUP_LAYER, 0);
47849 } else {
47850 a.add (d);
47851 }});
47852 Clazz_overrideMethod (c$, "createComponent", 
47853 function (a) {
47854 var b =  new javax.swing.JPanel ( new java.awt.BorderLayout (), true);
47855 b.setOpaque (true);
47856 return b;
47857 }, "java.awt.Component");
47858 Clazz_defineMethod (c$, "reset", 
47859 function (a, b, c, d) {
47860 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "reset", [a, b, c, d]);
47861 var e = this.getComponent ();
47862 e.setOpaque (b.isOpaque ());
47863 e.setLocation (c, d);
47864 e.add (b, "Center");
47865 b.invalidate ();
47866 this.pack ();
47867 }, "java.awt.Component,java.awt.Component,~N,~N");
47868 c$.lightWeightPopupCacheKey = c$.prototype.lightWeightPopupCacheKey =  new Clazz._O ();
47869 c$ = Clazz_p0p ();
47870 Clazz_pu$h(self.c$);
47871 c$ = Clazz_decorateAsClass (function () {
47872 this.rootPane = null;
47873 Clazz_instantialize (this, arguments);
47874 }, javax.swing.PopupFactory, "MediumWeightPopup", javax.swing.PopupFactory.ContainerPopup);
47875 c$.getMediumWeightPopup = Clazz_defineMethod (c$, "getMediumWeightPopup", 
47876 function (a, b, c, d) {
47877 var e = javax.swing.PopupFactory.MediumWeightPopup.getRecycledMediumWeightPopup ();
47878 if (e == null) {
47879 e =  new javax.swing.PopupFactory.MediumWeightPopup ();
47880 }e.reset (a, b, c, d);
47881 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
47882 e.hide ();
47883 return null;
47884 }return e;
47885 }, "java.awt.Component,java.awt.Component,~N,~N");
47886 c$.getMediumWeightPopupCache = Clazz_defineMethod (c$, "getMediumWeightPopupCache", 
47887  function () {
47888 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey);
47889 if (a == null) {
47890 a =  new java.util.ArrayList ();
47891 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey, a);
47892 }return a;
47893 });
47894 c$.recycleMediumWeightPopup = Clazz_defineMethod (c$, "recycleMediumWeightPopup", 
47895  function (a) {
47896 {
47897 var b = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
47898 if (b.size () < 5) {
47899 b.add (a);
47900 }}}, "javax.swing.PopupFactory.MediumWeightPopup");
47901 c$.getRecycledMediumWeightPopup = Clazz_defineMethod (c$, "getRecycledMediumWeightPopup", 
47902  function () {
47903 {
47904 var a = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
47905 var b;
47906 if ((b = a.size ()) > 0) {
47907 var c = a.get (0);
47908 a.remove (0);
47909 return c;
47910 }return null;
47911 }});
47912 Clazz_defineMethod (c$, "hide", 
47913 function () {
47914 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "hide", []);
47915 this.rootPane.getContentPane ().removeAll ();
47916 javax.swing.PopupFactory.MediumWeightPopup.recycleMediumWeightPopup (this);
47917 });
47918 Clazz_overrideMethod (c$, "show", 
47919 function () {
47920 var a = this.getComponent ();
47921 var b = null;
47922 if (this.owner != null) {
47923 b = this.owner.getParent ();
47924 }while (!(Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) && (b != null)) {
47925 b = b.getParent ();
47926 }
47927 if (Clazz_instanceOf (b, javax.swing.RootPaneContainer)) {
47928 b = (b).getLayeredPane ();
47929 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
47930 a.setVisible (false);
47931 a.setLocation (c.x, c.y);
47932 (b).add (a, javax.swing.JLayeredPane.POPUP_LAYER, 0);
47933 } else {
47934 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
47935 a.setLocation (c.x, c.y);
47936 a.setVisible (false);
47937 b.add (a);
47938 }a.setVisible (true);
47939 });
47940 Clazz_overrideMethod (c$, "createComponent", 
47941 function (a) {
47942 var b =  new javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent ();
47943 this.rootPane =  new javax.swing.JRootPane ();
47944 this.rootPane.setOpaque (true);
47945 b.add (this.rootPane, "Center");
47946 return b;
47947 }, "java.awt.Component");
47948 Clazz_defineMethod (c$, "reset", 
47949 function (a, b, c, d) {
47950 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "reset", [a, b, c, d]);
47951 var e = this.getComponent ();
47952 e.setLocation (c, d);
47953 this.rootPane.getContentPane ().add (b, "Center");
47954 b.invalidate ();
47955 e.validate ();
47956 this.pack ();
47957 }, "java.awt.Component,java.awt.Component,~N,~N");
47958 Clazz_pu$h(self.c$);
47959 c$ = Clazz_declareType (javax.swing.PopupFactory.MediumWeightPopup, "MediumWeightComponent", java.awt.Panel, javax.swing.SwingHeavyWeight);
47960 Clazz_makeConstructor (c$, 
47961 function () {
47962 Clazz_superConstructor (this, javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent, [ new java.awt.BorderLayout ()]);
47963 });
47964 c$ = Clazz_p0p ();
47965 c$.mediumWeightPopupCacheKey = c$.prototype.mediumWeightPopupCacheKey =  new Clazz._O ();
47966 c$ = Clazz_p0p ();
47967 c$.SharedInstanceKey = c$.prototype.SharedInstanceKey =  new Clazz._O ();
47968 Clazz_defineStatics (c$,
47969 "MAX_CACHE_SIZE", 5,
47970 "LIGHT_WEIGHT_POPUP", 0,
47971 "MEDIUM_WEIGHT_POPUP", 1,
47972 "HEAVY_WEIGHT_POPUP", 2);
47973 });
47974 Clazz_declarePackage ("javax.swing");
47975 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 () {
47976 c$ = Clazz_decorateAsClass (function () {
47977 this.component = null;
47978 Clazz_instantialize (this, arguments);
47979 }, javax.swing, "Popup");
47980 Clazz_makeConstructor (c$, 
47981 function (owner, contents, x, y) {
47982 this.construct ();
47983 if (contents == null) {
47984 throw  new IllegalArgumentException ("Contents must be non-null");
47985 }this.reset (owner, contents, x, y);
47986 }, "java.awt.Component,java.awt.Component,~N,~N");
47987 Clazz_makeConstructor (c$, 
47988 function () {
47989 });
47990 Clazz_defineMethod (c$, "show", 
47991 function () {
47992 var component = this.getComponent ();
47993 if (component != null) {
47994 component.show ();
47995 }});
47996 Clazz_defineMethod (c$, "hide", 
47997 function () {
47998 var component = this.getComponent ();
47999 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48000 component.hide ();
48001 (component).getContentPane ().removeAll ();
48002 }this.dispose ();
48003 });
48004 Clazz_defineMethod (c$, "dispose", 
48005 function () {
48006 var component = this.getComponent ();
48007 var window = javax.swing.SwingUtilities.getWindowAncestor (component);
48008 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48009 (component).dispose ();
48010 component = null;
48011 }if (Clazz_instanceOf (window, javax.swing.Popup.DefaultFrame)) {
48012 window.dispose ();
48013 }});
48014 Clazz_defineMethod (c$, "reset", 
48015 function (owner, contents, ownerX, ownerY) {
48016 if (this.getComponent () == null) {
48017 this.component = this.createComponent (owner);
48018 }var c = this.getComponent ();
48019 if (Clazz_instanceOf (c, javax.swing.JWindow)) {
48020 var component = this.getComponent ();
48021 component.setLocation (ownerX, ownerY);
48022 component.getContentPane ().add (contents, "Center");
48023 contents.invalidate ();
48024 if (component.isVisible ()) {
48025 this.pack ();
48026 }}}, "java.awt.Component,java.awt.Component,~N,~N");
48027 Clazz_defineMethod (c$, "pack", 
48028 function () {
48029 var component = this.getComponent ();
48030 if (Clazz_instanceOf (component, java.awt.Window)) {
48031 (component).pack ();
48032 }});
48033 Clazz_defineMethod (c$, "getParentWindow", 
48034  function (owner) {
48035 var window = null;
48036 if (Clazz_instanceOf (owner, java.awt.Window)) {
48037 window = owner;
48038 } else if (owner != null) {
48039 window = javax.swing.SwingUtilities.getWindowAncestor (owner);
48040 }if (window == null) {
48041 window =  new javax.swing.Popup.DefaultFrame ();
48042 }return window;
48043 }, "java.awt.Component");
48044 Clazz_defineMethod (c$, "createComponent", 
48045 function (owner) {
48046 return  new javax.swing.Popup.HeavyWeightWindow (this.getParentWindow (owner));
48047 }, "java.awt.Component");
48048 Clazz_defineMethod (c$, "getComponent", 
48049 function () {
48050 return this.component;
48051 });
48052 Clazz_pu$h(self.c$);
48053 c$ = Clazz_declareType (javax.swing.Popup, "HeavyWeightWindow", javax.swing.JWindow);
48054 Clazz_makeConstructor (c$, 
48055 function (a) {
48056 Clazz_superConstructor (this, javax.swing.Popup.HeavyWeightWindow, [a]);
48057 this.setFocusableWindowState (false);
48058 var b = java.awt.Toolkit.getDefaultToolkit ();
48059 if (Clazz_instanceOf (b, jssun.awt.SunToolkit)) {
48060 (b).setOverrideRedirect (this);
48061 }this.getRootPane ().setUseTrueDoubleBuffering (false);
48062 try {
48063 this.setAlwaysOnTop (true);
48064 } catch (se) {
48065 if (Clazz_exceptionOf (se, SecurityException)) {
48066 } else {
48067 throw se;
48068 }
48069 }
48070 }, "java.awt.Window");
48071 Clazz_overrideMethod (c$, "update", 
48072 function (a) {
48073 this.paint (a);
48074 }, "java.awt.Graphics");
48075 Clazz_defineMethod (c$, "show", 
48076 function () {
48077 this.pack ();
48078 if (this.getWidth () > 0 && this.getHeight () > 0) {
48079 Clazz_superCall (this, javax.swing.Popup.HeavyWeightWindow, "show", []);
48080 }});
48081 c$ = Clazz_p0p ();
48082 Clazz_pu$h(self.c$);
48083 c$ = Clazz_declareType (javax.swing.Popup, "DefaultFrame", java.awt.Frame);
48084 c$ = Clazz_p0p ();
48085 });
48086 Clazz_declarePackage ("javax.swing");
48087 Clazz_declareInterface (javax.swing, "SwingHeavyWeight");
48088 Clazz_declarePackage ("javax.swing");
48089 Clazz_load (["javax.swing.JComponent"], "javax.swing.JToolTip", ["javax.swing.UIManager"], function () {
48090 c$ = Clazz_decorateAsClass (function () {
48091 this.tipText = null;
48092 this.$component = null;
48093 Clazz_instantialize (this, arguments);
48094 }, javax.swing, "JToolTip", javax.swing.JComponent);
48095 Clazz_makeConstructor (c$, 
48096 function () {
48097 Clazz_superConstructor (this, javax.swing.JToolTip, []);
48098 this.setOpaque (true);
48099 this.updateUI ();
48100 });
48101 Clazz_overrideMethod (c$, "getUI", 
48102 function () {
48103 return this.ui;
48104 });
48105 Clazz_overrideMethod (c$, "updateUI", 
48106 function () {
48107 this.setUI (javax.swing.UIManager.getUI (this));
48108 });
48109 Clazz_overrideMethod (c$, "getUIClassID", 
48110 function () {
48111 return "ToolTipUI";
48112 });
48113 Clazz_defineMethod (c$, "setTipText", 
48114 function (tipText) {
48115 var oldValue = this.tipText;
48116 this.tipText = tipText;
48117 this.firePropertyChangeObject ("tiptext", oldValue, tipText);
48118 }, "~S");
48119 Clazz_defineMethod (c$, "getTipText", 
48120 function () {
48121 return this.tipText;
48122 });
48123 Clazz_defineMethod (c$, "setComponent", 
48124 function (c) {
48125 var oldValue = this.$component;
48126 this.$component = c;
48127 this.firePropertyChangeObject ("component", oldValue, c);
48128 }, "javax.swing.JComponent");
48129 Clazz_defineMethod (c$, "getComponent", 
48130 function () {
48131 return this.$component;
48132 });
48133 Clazz_overrideMethod (c$, "alwaysOnTop", 
48134 function () {
48135 return true;
48136 });
48137 Clazz_defineMethod (c$, "paramString", 
48138 function () {
48139 var tipTextString = (this.tipText != null ? this.tipText : "");
48140 return Clazz_superCall (this, javax.swing.JToolTip, "paramString", []) + ",tipText=" + tipTextString;
48141 });
48142 Clazz_defineStatics (c$,
48143 "$uiClassID", "ToolTipUI");
48144 });
48145 Clazz_declarePackage ("javax.swing.event");
48146 Clazz_load (["java.util.EventObject"], "javax.swing.event.PopupMenuEvent", null, function () {
48147 c$ = Clazz_declareType (javax.swing.event, "PopupMenuEvent", java.util.EventObject);
48148 });
48149 Clazz_declarePackage ("javax.swing.event");
48150 Clazz_load (["java.util.EventListener"], "javax.swing.event.PopupMenuListener", null, function () {
48151 Clazz_declareInterface (javax.swing.event, "PopupMenuListener", java.util.EventListener);
48152 });
48153 Clazz_declarePackage ("javax.swing.event");
48154 Clazz_load (["java.util.EventObject"], "javax.swing.event.MenuEvent", null, function () {
48155 c$ = Clazz_declareType (javax.swing.event, "MenuEvent", java.util.EventObject);
48156 });
48157 Clazz_declarePackage ("javax.swing.event");
48158 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuListener", null, function () {
48159 Clazz_declareInterface (javax.swing.event, "MenuListener", java.util.EventListener);
48160 });
48161 Clazz_declarePackage ("javax.swing.border");
48162 Clazz_load (["javax.swing.border.Border"], "javax.swing.border.AbstractBorder", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Component", "$.Insets", "$.Rectangle"], function () {
48163 c$ = Clazz_declareType (javax.swing.border, "AbstractBorder", null, javax.swing.border.Border);
48164 Clazz_overrideMethod (c$, "paintBorder", 
48165 function (c, g, x, y, width, height) {
48166 }, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N");
48167 Clazz_defineMethod (c$, "getBorderInsets", 
48168 function (c) {
48169 return  new java.awt.Insets (0, 0, 0, 0);
48170 }, "java.awt.Component");
48171 Clazz_defineMethod (c$, "getBorderInsets", 
48172 function (c, insets) {
48173 insets.left = insets.top = insets.right = insets.bottom = 0;
48174 return insets;
48175 }, "java.awt.Component,java.awt.Insets");
48176 Clazz_overrideMethod (c$, "isBorderOpaque", 
48177 function () {
48178 return false;
48179 });
48180 Clazz_defineMethod (c$, "getInteriorRectangle", 
48181 function (c, x, y, width, height) {
48182 return javax.swing.border.AbstractBorder.getInteriorRectangle (c, this, x, y, width, height);
48183 }, "java.awt.Component,~N,~N,~N,~N");
48184 c$.getInteriorRectangle = Clazz_defineMethod (c$, "getInteriorRectangle", 
48185 function (c, b, x, y, width, height) {
48186 var insets;
48187 if (b != null) insets = b.getBorderInsets (c);
48188  else insets =  new java.awt.Insets (0, 0, 0, 0);
48189 return  new java.awt.Rectangle (x + insets.left, y + insets.top, width - insets.right - insets.left, height - insets.top - insets.bottom);
48190 }, "java.awt.Component,javax.swing.border.Border,~N,~N,~N,~N");
48191 Clazz_defineMethod (c$, "getBaseline", 
48192 function (c, width, height) {
48193 if (width < 0 || height < 0) {
48194 throw  new IllegalArgumentException ("Width and height must be >= 0");
48195 }return -1;
48196 }, "java.awt.Component,~N,~N");
48197 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
48198 function (c) {
48199 if (c == null) {
48200 throw  new NullPointerException ("Component must be non-null");
48201 }return java.awt.Component.BaselineResizeBehavior.OTHER;
48202 }, "java.awt.Component");
48203 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
48204 function (c) {
48205 return c.getComponentOrientation ().isLeftToRight ();
48206 }, "java.awt.Component");
48207 });
48208 Clazz_declarePackage ("jssun.awt");
48209 Clazz_load (["java.awt.event.InvocationEvent"], "jssun.awt.PeerEvent", null, function () {
48210 c$ = Clazz_decorateAsClass (function () {
48211 this.flags = 0;
48212 Clazz_instantialize (this, arguments);
48213 }, jssun.awt, "PeerEvent", java.awt.event.InvocationEvent);
48214 Clazz_makeConstructor (c$, 
48215 function (source, runnable, flags) {
48216 this.construct (source, runnable, null, false, flags);
48217 }, "~O,Runnable,~N");
48218 Clazz_makeConstructor (c$, 
48219 function (source, runnable, notifier, catchExceptions, flags) {
48220 Clazz_superConstructor (this, jssun.awt.PeerEvent, [source, runnable, notifier, catchExceptions]);
48221 this.flags = flags;
48222 }, "~O,Runnable,~O,~B,~N");
48223 Clazz_defineMethod (c$, "getFlags", 
48224 function () {
48225 return this.flags;
48226 });
48227 Clazz_defineMethod (c$, "coalesceEvents", 
48228 function (newEvent) {
48229 return null;
48230 }, "jssun.awt.PeerEvent");
48231 Clazz_defineStatics (c$,
48232 "PRIORITY_EVENT", 0x01,
48233 "ULTIMATE_PRIORITY_EVENT", 0x02,
48234 "LOW_PRIORITY_EVENT", 0x04);
48235 });
48236 Clazz_declarePackage ("jssun.awt.image");
48237 Clazz_load (["jssun.awt.image.InputStreamImageSource"], "jssun.awt.image.URLImageSource", ["java.net.URL"], function () {
48238 c$ = Clazz_decorateAsClass (function () {
48239 this.url = null;
48240 this.conn = null;
48241 this.actualHost = null;
48242 this.actualPort = 0;
48243 Clazz_instantialize (this, arguments);
48244 }, jssun.awt.image, "URLImageSource", jssun.awt.image.InputStreamImageSource);
48245 Clazz_makeConstructor (c$, 
48246 function (u) {
48247 Clazz_superConstructor (this, jssun.awt.image.URLImageSource, []);
48248 this.url = u;
48249 }, "java.net.URL");
48250 Clazz_makeConstructor (c$, 
48251 function (href) {
48252 this.construct ( new java.net.URL (null, href));
48253 }, "~S");
48254 Clazz_makeConstructor (c$, 
48255 function (u, uc) {
48256 this.construct (u);
48257 this.conn = uc;
48258 }, "java.net.URL,java.net.URLConnection");
48259 Clazz_makeConstructor (c$, 
48260 function (uc) {
48261 this.construct (uc.getURL (), uc);
48262 }, "java.net.URLConnection");
48263 Clazz_overrideMethod (c$, "checkSecurity", 
48264 function (context, quiet) {
48265 if (this.actualHost != null) {
48266 try {
48267 var security = System.getSecurityManager ();
48268 if (security != null) {
48269 security.checkConnect (this.actualHost, this.actualPort, context);
48270 }} catch (e) {
48271 if (Clazz_exceptionOf (e, SecurityException)) {
48272 if (!quiet) {
48273 throw e;
48274 }return false;
48275 } else {
48276 throw e;
48277 }
48278 }
48279 }return true;
48280 }, "~O,~B");
48281 Clazz_defineMethod (c$, "getDecoder", 
48282 function () {
48283 return null;
48284 });
48285 });
48286 Clazz_declarePackage ("jssun.awt.image");
48287 Clazz_load (["java.awt.image.ImageProducer", "jssun.awt.image.ImageFetchable"], "jssun.awt.image.InputStreamImageSource", ["java.lang.SecurityException", "$.Thread", "jssun.awt.image.ImageConsumerQueue", "$.ImageFetcher"], function () {
48288 c$ = Clazz_decorateAsClass (function () {
48289 this.consumers = null;
48290 this.decoder = null;
48291 this.decoders = null;
48292 this.awaitingFetch = false;
48293 Clazz_instantialize (this, arguments);
48294 }, jssun.awt.image, "InputStreamImageSource", null, [java.awt.image.ImageProducer, jssun.awt.image.ImageFetchable]);
48295 Clazz_defineMethod (c$, "countConsumers", 
48296 function (cq) {
48297 var i = 0;
48298 while (cq != null) {
48299 i++;
48300 cq = cq.next;
48301 }
48302 return i;
48303 }, "jssun.awt.image.ImageConsumerQueue");
48304 Clazz_defineMethod (c$, "countConsumers", 
48305 function () {
48306 var id = this.decoders;
48307 var i = this.countConsumers (this.consumers);
48308 while (id != null) {
48309 i += this.countConsumers (id.queue);
48310 id = id.next;
48311 }
48312 return i;
48313 });
48314 Clazz_defineMethod (c$, "addConsumer", 
48315 function (ic) {
48316 this.addConsumer (ic, false);
48317 }, "java.awt.image.ImageConsumer");
48318 Clazz_defineMethod (c$, "printQueue", 
48319 function (cq, prefix) {
48320 while (cq != null) {
48321 System.out.println (prefix + cq);
48322 cq = cq.next;
48323 }
48324 }, "jssun.awt.image.ImageConsumerQueue,~S");
48325 Clazz_defineMethod (c$, "printQueues", 
48326 function (title) {
48327 System.out.println (title + "[ -----------");
48328 this.printQueue (this.consumers, "  ");
48329 for (var id = this.decoders; id != null; id = id.next) {
48330 System.out.println ("    " + id);
48331 this.printQueue (id.queue, "      ");
48332 }
48333 System.out.println ("----------- ]" + title);
48334 }, "~S");
48335 Clazz_defineMethod (c$, "addConsumer", 
48336 function (ic, produce) {
48337 for (var id = this.decoders; id != null; id = id.next) {
48338 if (id.isConsumer (ic)) {
48339 return;
48340 }}
48341 var cq = this.consumers;
48342 while (cq != null && cq.consumer !== ic) {
48343 cq = cq.next;
48344 }
48345 if (cq == null) {
48346 cq =  new jssun.awt.image.ImageConsumerQueue (this, ic);
48347 cq.next = this.consumers;
48348 this.consumers = cq;
48349 } else {
48350 if (!cq.secure) {
48351 var context = null;
48352 var security = System.getSecurityManager ();
48353 if (security != null) {
48354 context = security.getSecurityContext ();
48355 }if (cq.securityContext == null) {
48356 cq.securityContext = context;
48357 } else if (!cq.securityContext.equals (context)) {
48358 this.errorConsumer (cq, false);
48359 throw  new SecurityException ("Applets are trading image data!");
48360 }}cq.interested = true;
48361 }if (produce && this.decoder == null) {
48362 this.startProduction ();
48363 }}, "java.awt.image.ImageConsumer,~B");
48364 Clazz_overrideMethod (c$, "isConsumer", 
48365 function (ic) {
48366 for (var id = this.decoders; id != null; id = id.next) {
48367 if (id.isConsumer (ic)) {
48368 return true;
48369 }}
48370 return jssun.awt.image.ImageConsumerQueue.isConsumer (this.consumers, ic);
48371 }, "java.awt.image.ImageConsumer");
48372 Clazz_defineMethod (c$, "errorAllConsumers", 
48373  function (cq, needReload) {
48374 while (cq != null) {
48375 if (cq.interested) {
48376 this.errorConsumer (cq, needReload);
48377 }cq = cq.next;
48378 }
48379 }, "jssun.awt.image.ImageConsumerQueue,~B");
48380 Clazz_defineMethod (c$, "errorConsumer", 
48381  function (cq, needReload) {
48382 cq.consumer.imageComplete (1);
48383 this.removeConsumer (cq.consumer);
48384 }, "jssun.awt.image.ImageConsumerQueue,~B");
48385 Clazz_overrideMethod (c$, "removeConsumer", 
48386 function (ic) {
48387 for (var id = this.decoders; id != null; id = id.next) {
48388 id.removeConsumer (ic);
48389 }
48390 this.consumers = jssun.awt.image.ImageConsumerQueue.removeConsumer (this.consumers, ic, false);
48391 }, "java.awt.image.ImageConsumer");
48392 Clazz_defineMethod (c$, "startProduction", 
48393 function (ic) {
48394 this.addConsumer (ic, true);
48395 }, "java.awt.image.ImageConsumer");
48396 Clazz_defineMethod (c$, "startProduction", 
48397  function () {
48398 if (!this.awaitingFetch) {
48399 jssun.awt.image.ImageFetcher.add (this);
48400 this.awaitingFetch = true;
48401 }});
48402 Clazz_overrideMethod (c$, "requestTopDownLeftRightResend", 
48403 function (ic) {
48404 }, "java.awt.image.ImageConsumer");
48405 Clazz_defineMethod (c$, "decoderForType", 
48406 function (is, content_type) {
48407 return null;
48408 }, "java.io.InputStream,~S");
48409 Clazz_defineMethod (c$, "getDecoder", 
48410 function (is) {
48411 return null;
48412 }, "java.io.InputStream");
48413 Clazz_overrideMethod (c$, "doFetch", 
48414 function () {
48415 {
48416 if (this.consumers == null) {
48417 this.awaitingFetch = false;
48418 return;
48419 }}var imgd = this.getDecoder ();
48420 if (imgd == null) {
48421 this.badDecoder ();
48422 } else {
48423 this.setDecoder (imgd);
48424 try {
48425 imgd.produceImage ();
48426 } catch (e$$) {
48427 if (Clazz_exceptionOf (e$$, java.io.IOException)) {
48428 var e = e$$;
48429 {
48430 e.printStackTrace ();
48431 }
48432 } else if (Clazz_exceptionOf (e$$, jssun.awt.image.ImageFormatException)) {
48433 var e = e$$;
48434 {
48435 e.printStackTrace ();
48436 }
48437 } else {
48438 throw e$$;
48439 }
48440 } finally {
48441 this.removeDecoder (imgd);
48442 if (Thread.currentThread ().isInterrupted () || !Thread.currentThread ().isAlive ()) {
48443 this.errorAllConsumers (imgd.queue, true);
48444 } else {
48445 this.errorAllConsumers (imgd.queue, false);
48446 }}
48447 }});
48448 Clazz_defineMethod (c$, "badDecoder", 
48449  function () {
48450 var cq;
48451 {
48452 cq = this.consumers;
48453 this.consumers = null;
48454 this.awaitingFetch = false;
48455 }this.errorAllConsumers (cq, false);
48456 });
48457 Clazz_defineMethod (c$, "setDecoder", 
48458  function (mydecoder) {
48459 var cq;
48460 {
48461 mydecoder.next = this.decoders;
48462 this.decoders = mydecoder;
48463 this.decoder = mydecoder;
48464 cq = this.consumers;
48465 mydecoder.queue = cq;
48466 this.consumers = null;
48467 this.awaitingFetch = false;
48468 }}, "jssun.awt.image.ImageDecoder");
48469 Clazz_defineMethod (c$, "removeDecoder", 
48470  function (mydecoder) {
48471 this.doneDecoding (mydecoder);
48472 var idprev = null;
48473 for (var id = this.decoders; id != null; id = id.next) {
48474 if (id === mydecoder) {
48475 if (idprev == null) {
48476 this.decoders = id.next;
48477 } else {
48478 idprev.next = id.next;
48479 }break;
48480 }idprev = id;
48481 }
48482 }, "jssun.awt.image.ImageDecoder");
48483 Clazz_defineMethod (c$, "doneDecoding", 
48484 function (mydecoder) {
48485 if (this.decoder === mydecoder) {
48486 this.decoder = null;
48487 if (this.consumers != null) {
48488 this.startProduction ();
48489 }}}, "jssun.awt.image.ImageDecoder");
48490 Clazz_defineMethod (c$, "latchConsumers", 
48491 function (id) {
48492 this.doneDecoding (id);
48493 }, "jssun.awt.image.ImageDecoder");
48494 Clazz_defineMethod (c$, "flush", 
48495 function () {
48496 this.decoder = null;
48497 });
48498 });
48499 Clazz_declarePackage ("java.awt.image");
48500 Clazz_declareInterface (java.awt.image, "ImageProducer");
48501 Clazz_declarePackage ("jssun.awt.image");
48502 Clazz_declareInterface (jssun.awt.image, "ImageFetchable");
48503 Clazz_declarePackage ("jssun.awt.image");
48504 c$ = Clazz_decorateAsClass (function () {
48505 this.next = null;
48506 this.consumer = null;
48507 this.interested = false;
48508 this.securityContext = null;
48509 this.secure = false;
48510 Clazz_instantialize (this, arguments);
48511 }, jssun.awt.image, "ImageConsumerQueue");
48512 c$.removeConsumer = Clazz_defineMethod (c$, "removeConsumer", 
48513 function (cqbase, ic, stillinterested) {
48514 var cqprev = null;
48515 for (var cq = cqbase; cq != null; cq = cq.next) {
48516 if (cq.consumer === ic) {
48517 if (cqprev == null) {
48518 cqbase = cq.next;
48519 } else {
48520 cqprev.next = cq.next;
48521 }cq.interested = stillinterested;
48522 break;
48523 }cqprev = cq;
48524 }
48525 return cqbase;
48526 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer,~B");
48527 c$.isConsumer = Clazz_defineMethod (c$, "isConsumer", 
48528 function (cqbase, ic) {
48529 for (var cq = cqbase; cq != null; cq = cq.next) {
48530 if (cq.consumer === ic) {
48531 return true;
48532 }}
48533 return false;
48534 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer");
48535 Clazz_makeConstructor (c$, 
48536 function (src, ic) {
48537 this.consumer = ic;
48538 this.interested = true;
48539 this.secure = true;
48540 }, "jssun.awt.image.InputStreamImageSource,java.awt.image.ImageConsumer");
48541 Clazz_overrideMethod (c$, "toString", 
48542 function () {
48543 return ("[" + this.consumer + ", " + (this.interested ? "" : "not ") + "interested" + (this.securityContext != null ? ", " + this.securityContext : "") + "]");
48544 });
48545 Clazz_declarePackage ("jssun.awt.image");
48546 Clazz_load (["java.lang.Thread", "$.StringBuffer"], ["jssun.awt.image.FetcherInfo", "$.ImageFetcher"], ["java.util.Vector", "jssun.awt.AppContext"], function () {
48547 c$ = Clazz_declareType (jssun.awt.image, "ImageFetcher", Thread);
48548 Clazz_makeConstructor (c$, 
48549  function (threadGroup, index) {
48550 Clazz_superConstructor (this, jssun.awt.image.ImageFetcher, [threadGroup, "Image Fetcher " + index]);
48551 this.setDaemon (true);
48552 }, "ThreadGroup,~N");
48553 c$.add = Clazz_defineMethod (c$, "add", 
48554 function (src) {
48555 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48556 {
48557 if (!info.waitList.contains (src)) {
48558 info.waitList.addElement (src);
48559 if (info.numWaiting == 0 && info.numFetchers < info.fetchers.length) {
48560 jssun.awt.image.ImageFetcher.createFetchers (info);
48561 }info.waitList.notify ();
48562 }}}, "jssun.awt.image.ImageFetchable");
48563 c$.remove = Clazz_defineMethod (c$, "remove", 
48564 function (src) {
48565 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48566 {
48567 if (info.waitList.contains (src)) {
48568 info.waitList.removeElement (src);
48569 }}}, "jssun.awt.image.ImageFetchable");
48570 c$.isFetcher = Clazz_defineMethod (c$, "isFetcher", 
48571 function (t) {
48572 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48573 {
48574 for (var i = 0; i < info.fetchers.length; i++) {
48575 if (info.fetchers[i] === t) {
48576 return true;
48577 }}
48578 }return false;
48579 }, "Thread");
48580 c$.amFetcher = Clazz_defineMethod (c$, "amFetcher", 
48581 function () {
48582 return jssun.awt.image.ImageFetcher.isFetcher (Thread.currentThread ());
48583 });
48584 c$.nextImage = Clazz_defineMethod (c$, "nextImage", 
48585  function () {
48586 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48587 {
48588 var src = null;
48589 var end = System.currentTimeMillis () + 5000;
48590 while (src == null) {
48591 while (info.waitList.size () == 0) {
48592 var now = System.currentTimeMillis ();
48593 if (now >= end) {
48594 return null;
48595 }try {
48596 info.numWaiting++;
48597 info.waitList.wait (end - now);
48598 } catch (e) {
48599 if (Clazz_exceptionOf (e, InterruptedException)) {
48600 return null;
48601 } else {
48602 throw e;
48603 }
48604 } finally {
48605 info.numWaiting--;
48606 }
48607 }
48608 src = info.waitList.elementAt (0);
48609 info.waitList.removeElement (src);
48610 }
48611 return src;
48612 }});
48613 Clazz_overrideMethod (c$, "run", 
48614 function () {
48615 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48616 try {
48617 this.fetchloop ();
48618 } catch (e) {
48619 if (Clazz_exceptionOf (e, Exception)) {
48620 e.printStackTrace ();
48621 } else {
48622 throw e;
48623 }
48624 } finally {
48625 {
48626 var me = Thread.currentThread ();
48627 for (var i = 0; i < info.fetchers.length; i++) {
48628 if (info.fetchers[i] === me) {
48629 info.fetchers[i] = null;
48630 info.numFetchers--;
48631 }}
48632 }}
48633 });
48634 Clazz_defineMethod (c$, "fetchloop", 
48635  function () {
48636 var me = Thread.currentThread ();
48637 while (jssun.awt.image.ImageFetcher.isFetcher (me)) {
48638 Thread.interrupted ();
48639 me.setPriority (8);
48640 var src = jssun.awt.image.ImageFetcher.nextImage ();
48641 if (src == null) {
48642 return;
48643 }try {
48644 src.doFetch ();
48645 } catch (e) {
48646 if (Clazz_exceptionOf (e, Exception)) {
48647 System.err.println ("Uncaught error fetching image:");
48648 e.printStackTrace ();
48649 } else {
48650 throw e;
48651 }
48652 }
48653 jssun.awt.image.ImageFetcher.stoppingAnimation (me);
48654 }
48655 });
48656 c$.startingAnimation = Clazz_defineMethod (c$, "startingAnimation", 
48657 function () {
48658 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48659 var me = Thread.currentThread ();
48660 {
48661 for (var i = 0; i < info.fetchers.length; i++) {
48662 if (info.fetchers[i] === me) {
48663 info.fetchers[i] = null;
48664 info.numFetchers--;
48665 me.setName ("Image Animator " + i);
48666 if (info.waitList.size () > info.numWaiting) {
48667 jssun.awt.image.ImageFetcher.createFetchers (info);
48668 }return;
48669 }}
48670 }me.setPriority (2);
48671 me.setName ("Image Animator");
48672 });
48673 c$.stoppingAnimation = Clazz_defineMethod (c$, "stoppingAnimation", 
48674  function (me) {
48675 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48676 {
48677 var index = -1;
48678 for (var i = 0; i < info.fetchers.length; i++) {
48679 if (info.fetchers[i] === me) {
48680 return;
48681 }if (info.fetchers[i] == null) {
48682 index = i;
48683 }}
48684 if (index >= 0) {
48685 info.fetchers[index] = me;
48686 info.numFetchers++;
48687 me.setName ("Image Fetcher " + index);
48688 return;
48689 }}}, "Thread");
48690 c$.createFetchers = Clazz_defineMethod (c$, "createFetchers", 
48691  function (info) {
48692 var appContext = jssun.awt.AppContext.getAppContext ();
48693 var threadGroup = appContext.getThreadGroup ();
48694 var fetcherThreadGroup;
48695 try {
48696 if (threadGroup.getParent () != null) {
48697 fetcherThreadGroup = threadGroup;
48698 } else {
48699 threadGroup = Thread.currentThread ().getThreadGroup ();
48700 var parent = threadGroup.getParent ();
48701 while ((parent != null) && (parent.getParent () != null)) {
48702 threadGroup = parent;
48703 parent = threadGroup.getParent ();
48704 }
48705 fetcherThreadGroup = threadGroup;
48706 }} catch (e) {
48707 if (Clazz_exceptionOf (e, SecurityException)) {
48708 fetcherThreadGroup = appContext.getThreadGroup ();
48709 } else {
48710 throw e;
48711 }
48712 }
48713 var fetcherGroup = fetcherThreadGroup;
48714 for (var i = 0; i < info.fetchers.length; i++) {
48715 if (info.fetchers[i] == null) {
48716 info.fetchers[i] =  new jssun.awt.image.ImageFetcher (fetcherGroup, i);
48717 info.fetchers[i].start ();
48718 info.numFetchers++;
48719 break;
48720 }}
48721 return;
48722 }, "jssun.awt.image.FetcherInfo");
48723 Clazz_defineStatics (c$,
48724 "HIGH_PRIORITY", 8,
48725 "LOW_PRIORITY", 3,
48726 "ANIM_PRIORITY", 2,
48727 "TIMEOUT", 5000);
48728 c$ = Clazz_decorateAsClass (function () {
48729 this.fetchers = null;
48730 this.numFetchers = 0;
48731 this.numWaiting = 0;
48732 this.waitList = null;
48733 Clazz_instantialize (this, arguments);
48734 }, jssun.awt.image, "FetcherInfo");
48735 Clazz_makeConstructor (c$, 
48736  function () {
48737 this.fetchers =  new Array (4);
48738 this.numFetchers = 0;
48739 this.numWaiting = 0;
48740 this.waitList =  new java.util.Vector ();
48741 });
48742 c$.getFetcherInfo = Clazz_defineMethod (c$, "getFetcherInfo", 
48743 function () {
48744 var appContext = jssun.awt.AppContext.getAppContext ();
48745 {
48746 var info = appContext.get (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY);
48747 if (info == null) {
48748 info =  new jssun.awt.image.FetcherInfo ();
48749 appContext.put (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY, info);
48750 }return info;
48751 }});
48752 Clazz_defineStatics (c$,
48753 "MAX_NUM_FETCHERS_PER_APPCONTEXT", 4);
48754 c$.FETCHER_INFO_KEY = c$.prototype.FETCHER_INFO_KEY =  new StringBuffer ("FetcherInfo");
48755 });
48756 Clazz_declarePackage ("java.awt.event");
48757 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.FocusEvent", ["jssun.awt.AppContext", "$.SunToolkit"], function () {
48758 c$ = Clazz_decorateAsClass (function () {
48759 this.temporary = false;
48760 this.opposite = null;
48761 Clazz_instantialize (this, arguments);
48762 }, java.awt.event, "FocusEvent", java.awt.event.ComponentEvent);
48763 Clazz_makeConstructor (c$, 
48764 function (source, id, temporary, opposite) {
48765 Clazz_superConstructor (this, java.awt.event.FocusEvent, [source, id]);
48766 this.temporary = temporary;
48767 this.opposite = opposite;
48768 }, "java.awt.Component,~N,~B,java.awt.Component");
48769 Clazz_makeConstructor (c$, 
48770 function (source, id, temporary) {
48771 this.construct (source, id, temporary, null);
48772 }, "java.awt.Component,~N,~B");
48773 Clazz_makeConstructor (c$, 
48774 function (source, id) {
48775 this.construct (source, id, false);
48776 }, "java.awt.Component,~N");
48777 Clazz_defineMethod (c$, "isTemporary", 
48778 function () {
48779 return this.temporary;
48780 });
48781 Clazz_defineMethod (c$, "getOppositeComponent", 
48782 function () {
48783 if (this.opposite == null) {
48784 return null;
48785 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
48786 });
48787 Clazz_overrideMethod (c$, "paramString", 
48788 function () {
48789 var typeStr;
48790 switch (this.id) {
48791 case 1004:
48792 typeStr = "FOCUS_GAINED";
48793 break;
48794 case 1005:
48795 typeStr = "FOCUS_LOST";
48796 break;
48797 default:
48798 typeStr = "unknown type";
48799 }
48800 return typeStr + (this.temporary ? ",temporary" : ",permanent") + ",opposite=" + this.getOppositeComponent ();
48801 });
48802 Clazz_defineStatics (c$,
48803 "FOCUS_FIRST", 1004,
48804 "FOCUS_LAST", 1005,
48805 "FOCUS_GAINED", 1004,
48806 "FOCUS_LOST", 1005);
48807 });
48808 Clazz_declarePackage ("java.awt.event");
48809 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.HierarchyEvent", ["java.awt.Component"], function () {
48810 c$ = Clazz_decorateAsClass (function () {
48811 this.changed = null;
48812 this.changedParent = null;
48813 this.changeFlags = 0;
48814 Clazz_instantialize (this, arguments);
48815 }, java.awt.event, "HierarchyEvent", java.awt.AWTEvent);
48816 Clazz_makeConstructor (c$, 
48817 function (source, id, changed, changedParent) {
48818 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
48819 this.changed = changed;
48820 this.changedParent = changedParent;
48821 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container");
48822 Clazz_makeConstructor (c$, 
48823 function (source, id, changed, changedParent, changeFlags) {
48824 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
48825 this.changed = changed;
48826 this.changedParent = changedParent;
48827 this.changeFlags = changeFlags;
48828 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container,~N");
48829 Clazz_defineMethod (c$, "getComponent", 
48830 function () {
48831 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
48832 });
48833 Clazz_defineMethod (c$, "getChanged", 
48834 function () {
48835 return this.changed;
48836 });
48837 Clazz_defineMethod (c$, "getChangedParent", 
48838 function () {
48839 return this.changedParent;
48840 });
48841 Clazz_defineMethod (c$, "getChangeFlags", 
48842 function () {
48843 return this.changeFlags;
48844 });
48845 Clazz_overrideMethod (c$, "paramString", 
48846 function () {
48847 var typeStr;
48848 switch (this.id) {
48849 case 1401:
48850 typeStr = "ANCESTOR_MOVED (" + this.changed + "," + this.changedParent + ")";
48851 break;
48852 case 1402:
48853 typeStr = "ANCESTOR_RESIZED (" + this.changed + "," + this.changedParent + ")";
48854 break;
48855 case 1400:
48856 {
48857 typeStr = "HIERARCHY_CHANGED (";
48858 var first = true;
48859 if ((this.changeFlags & 1) != 0) {
48860 first = false;
48861 typeStr += "PARENT_CHANGED";
48862 }if ((this.changeFlags & 2) != 0) {
48863 if (first) {
48864 first = false;
48865 } else {
48866 typeStr += ",";
48867 }typeStr += "DISPLAYABILITY_CHANGED";
48868 }if ((this.changeFlags & 4) != 0) {
48869 if (first) {
48870 first = false;
48871 } else {
48872 typeStr += ",";
48873 }typeStr += "SHOWING_CHANGED";
48874 }if (!first) {
48875 typeStr += ",";
48876 }typeStr += this.changed + "," + this.changedParent + ")";
48877 break;
48878 }default:
48879 typeStr = "unknown type";
48880 }
48881 return typeStr;
48882 });
48883 Clazz_defineStatics (c$,
48884 "HIERARCHY_FIRST", 1400,
48885 "HIERARCHY_CHANGED", 1400,
48886 "ANCESTOR_MOVED", 1401,
48887 "ANCESTOR_RESIZED", 1402,
48888 "HIERARCHY_LAST", 1402,
48889 "PARENT_CHANGED", 0x1,
48890 "DISPLAYABILITY_CHANGED", 0x2,
48891 "SHOWING_CHANGED", 0x4);
48892 });
48893 Clazz_declarePackage ("jssun.awt");
48894 Clazz_declareInterface (jssun.awt, "ConstrainableGraphics");
48895 Clazz_declarePackage ("jssun.awt");
48896 Clazz_declareInterface (jssun.awt, "Graphics2Delegate");
48897 Clazz_declarePackage ("java.awt.event");
48898 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.ContainerEvent", ["java.awt.Container"], function () {
48899 c$ = Clazz_decorateAsClass (function () {
48900 this.child = null;
48901 Clazz_instantialize (this, arguments);
48902 }, java.awt.event, "ContainerEvent", java.awt.event.ComponentEvent);
48903 Clazz_makeConstructor (c$, 
48904 function (source, id, child) {
48905 Clazz_superConstructor (this, java.awt.event.ContainerEvent, [source, id]);
48906 this.child = child;
48907 }, "java.awt.Component,~N,java.awt.Component");
48908 Clazz_defineMethod (c$, "getContainer", 
48909 function () {
48910 return (Clazz_instanceOf (this.source, java.awt.Container)) ? this.source : null;
48911 });
48912 Clazz_defineMethod (c$, "getChild", 
48913 function () {
48914 return this.child;
48915 });
48916 Clazz_overrideMethod (c$, "paramString", 
48917 function () {
48918 var typeStr;
48919 switch (this.id) {
48920 case 300:
48921 typeStr = "COMPONENT_ADDED";
48922 break;
48923 case 301:
48924 typeStr = "COMPONENT_REMOVED";
48925 break;
48926 default:
48927 typeStr = "unknown type";
48928 }
48929 return typeStr + ",child=" + this.child.getName ();
48930 });
48931 Clazz_defineStatics (c$,
48932 "CONTAINER_FIRST", 300,
48933 "CONTAINER_LAST", 301,
48934 "COMPONENT_ADDED", 300,
48935 "COMPONENT_REMOVED", 301);
48936 });
48937 Clazz_declarePackage ("jssun.applet");
48938 Clazz_load (["java.util.EventObject"], "jssun.applet.AppletEvent", null, function () {
48939 c$ = Clazz_decorateAsClass (function () {
48940 this.arg = null;
48941 this.id = 0;
48942 Clazz_instantialize (this, arguments);
48943 }, jssun.applet, "AppletEvent", java.util.EventObject);
48944 Clazz_makeConstructor (c$, 
48945 function (source, id, argument) {
48946 Clazz_superConstructor (this, jssun.applet.AppletEvent, [source]);
48947 this.arg = argument;
48948 this.id = id;
48949 }, "~O,~N,~O");
48950 Clazz_defineMethod (c$, "getID", 
48951 function () {
48952 return this.id;
48953 });
48954 Clazz_defineMethod (c$, "getArgument", 
48955 function () {
48956 return this.arg;
48957 });
48958 Clazz_overrideMethod (c$, "toString", 
48959 function () {
48960 var str = this.getClass ().getName () + "[source=" + this.source + " + id=" + this.id;
48961 if (this.arg != null) {
48962 str += " + arg=" + this.arg;
48963 }str += " ]";
48964 return str;
48965 });
48966 });
48967 Clazz_declarePackage ("jssun.applet");
48968 Clazz_load (["jssun.applet.AppletListener"], "jssun.applet.AppletEventMulticaster", null, function () {
48969 c$ = Clazz_decorateAsClass (function () {
48970 this.a = null;
48971 this.b = null;
48972 Clazz_instantialize (this, arguments);
48973 }, jssun.applet, "AppletEventMulticaster", null, jssun.applet.AppletListener);
48974 Clazz_makeConstructor (c$, 
48975 function (a, b) {
48976 this.a = a;
48977 this.b = b;
48978 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
48979 Clazz_defineMethod (c$, "appletStateChanged", 
48980 function (e) {
48981 this.a.appletStateChanged (e);
48982 this.b.appletStateChanged (e);
48983 }, "jssun.applet.AppletEvent");
48984 c$.add = Clazz_defineMethod (c$, "add", 
48985 function (a, b) {
48986 return jssun.applet.AppletEventMulticaster.addInternal (a, b);
48987 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
48988 c$.remove = Clazz_defineMethod (c$, "remove", 
48989 function (l, oldl) {
48990 return jssun.applet.AppletEventMulticaster.removeInternal (l, oldl);
48991 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
48992 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
48993  function (a, b) {
48994 if (a == null) return b;
48995 if (b == null) return a;
48996 return  new jssun.applet.AppletEventMulticaster (a, b);
48997 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
48998 Clazz_defineMethod (c$, "remove", 
48999 function (oldl) {
49000 if (oldl === this.a) return this.b;
49001 if (oldl === this.b) return this.a;
49002 var a2 = jssun.applet.AppletEventMulticaster.removeInternal (this.a, oldl);
49003 var b2 = jssun.applet.AppletEventMulticaster.removeInternal (this.b, oldl);
49004 if (a2 === this.a && b2 === this.b) {
49005 return this;
49006 }return jssun.applet.AppletEventMulticaster.addInternal (a2, b2);
49007 }, "jssun.applet.AppletListener");
49008 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
49009  function (l, oldl) {
49010 if (l === oldl || l == null) {
49011 return null;
49012 } else if (Clazz_instanceOf (l, jssun.applet.AppletEventMulticaster)) {
49013 return (l).remove (oldl);
49014 } else {
49015 return l;
49016 }}, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49017 });
49018 Clazz_declarePackage ("jssun.applet");
49019 Clazz_load (["java.util.EventListener"], "jssun.applet.AppletListener", null, function () {
49020 Clazz_declareInterface (jssun.applet, "AppletListener", java.util.EventListener);
49021 });
49022 Clazz_declarePackage ("jssun.misc");
49023 Clazz_load (["java.util.Enumeration"], ["jssun.misc.Queue", "$.LIFOQueueEnumerator", "$.FIFOQueueEnumerator", "$.QueueElement"], ["java.util.NoSuchElementException", "swingjs.JSToolkit"], function () {
49024 c$ = Clazz_decorateAsClass (function () {
49025 this.length = 0;
49026 this.head = null;
49027 this.tail = null;
49028 Clazz_instantialize (this, arguments);
49029 }, jssun.misc, "Queue");
49030 Clazz_makeConstructor (c$, 
49031 function () {
49032 });
49033 Clazz_defineMethod (c$, "enqueue", 
49034 function (obj) {
49035 var newElt =  new jssun.misc.QueueElement (obj);
49036 if (this.head == null) {
49037 this.head = newElt;
49038 this.tail = newElt;
49039 this.length = 1;
49040 } else {
49041 newElt.next = this.head;
49042 this.head.prev = newElt;
49043 this.head = newElt;
49044 this.length++;
49045 }this.notify ();
49046 }, "~O");
49047 Clazz_defineMethod (c$, "dequeue", 
49048 function () {
49049 return this.dequeue (0);
49050 });
49051 Clazz_defineMethod (c$, "dequeue", 
49052 function (timeOut) {
49053 while (this.tail == null) {
49054 swingjs.JSToolkit.warn ("Cannot wait in Queue.java");
49055 this.wait (timeOut);
49056 }
49057 var elt = this.tail;
49058 this.tail = elt.prev;
49059 if (this.tail == null) {
49060 this.head = null;
49061 } else {
49062 this.tail.next = null;
49063 }this.length--;
49064 return elt.obj;
49065 }, "~N");
49066 Clazz_defineMethod (c$, "isEmpty", 
49067 function () {
49068 return (this.tail == null);
49069 });
49070 Clazz_defineMethod (c$, "elements", 
49071 function () {
49072 return  new jssun.misc.LIFOQueueEnumerator (this);
49073 });
49074 Clazz_defineMethod (c$, "reverseElements", 
49075 function () {
49076 return  new jssun.misc.FIFOQueueEnumerator (this);
49077 });
49078 Clazz_defineMethod (c$, "dump", 
49079 function (msg) {
49080 System.err.println (">> " + msg);
49081 System.err.println ("[" + this.length + " elt(s); head = " + (this.head == null ? "null" : (this.head.obj) + "") + " tail = " + (this.tail == null ? "null" : (this.tail.obj) + ""));
49082 var cursor = this.head;
49083 var last = null;
49084 while (cursor != null) {
49085 System.err.println ("  " + cursor);
49086 last = cursor;
49087 cursor = cursor.next;
49088 }
49089 if (last !== this.tail) {
49090 System.err.println ("  tail != last: " + this.tail + ", " + last);
49091 }System.err.println ("]");
49092 }, "~S");
49093 c$ = Clazz_decorateAsClass (function () {
49094 this.queue = null;
49095 this.cursor = null;
49096 Clazz_instantialize (this, arguments);
49097 }, jssun.misc, "FIFOQueueEnumerator", null, java.util.Enumeration);
49098 Clazz_makeConstructor (c$, 
49099 function (q) {
49100 this.queue = q;
49101 this.cursor = q.tail;
49102 }, "jssun.misc.Queue");
49103 Clazz_overrideMethod (c$, "hasMoreElements", 
49104 function () {
49105 return (this.cursor != null);
49106 });
49107 Clazz_overrideMethod (c$, "nextElement", 
49108 function () {
49109 {
49110 if (this.cursor != null) {
49111 var result = this.cursor;
49112 this.cursor = this.cursor.prev;
49113 return result.obj;
49114 }}throw  new java.util.NoSuchElementException ("FIFOQueueEnumerator");
49115 });
49116 c$ = Clazz_decorateAsClass (function () {
49117 this.queue = null;
49118 this.cursor = null;
49119 Clazz_instantialize (this, arguments);
49120 }, jssun.misc, "LIFOQueueEnumerator", null, java.util.Enumeration);
49121 Clazz_makeConstructor (c$, 
49122 function (q) {
49123 this.queue = q;
49124 this.cursor = q.head;
49125 }, "jssun.misc.Queue");
49126 Clazz_overrideMethod (c$, "hasMoreElements", 
49127 function () {
49128 return (this.cursor != null);
49129 });
49130 Clazz_overrideMethod (c$, "nextElement", 
49131 function () {
49132 {
49133 if (this.cursor != null) {
49134 var result = this.cursor;
49135 this.cursor = this.cursor.next;
49136 return result.obj;
49137 }}throw  new java.util.NoSuchElementException ("LIFOQueueEnumerator");
49138 });
49139 c$ = Clazz_decorateAsClass (function () {
49140 this.next = null;
49141 this.prev = null;
49142 this.obj = null;
49143 Clazz_instantialize (this, arguments);
49144 }, jssun.misc, "QueueElement");
49145 Clazz_makeConstructor (c$, 
49146 function (obj) {
49147 this.obj = obj;
49148 }, "~O");
49149 Clazz_overrideMethod (c$, "toString", 
49150 function () {
49151 return "QueueElement[obj=" + this.obj + (this.prev == null ? " null" : " prev") + (this.next == null ? " null" : " next") + "]";
49152 });
49153 });
49154 Clazz_declarePackage ("javax.swing.plaf");
49155 Clazz_declareInterface (javax.swing.plaf, "UIResource");
49156 Clazz_declarePackage ("javax.swing.plaf");
49157 Clazz_load (["javax.swing.InputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.InputMapUIResource", null, function () {
49158 c$ = Clazz_declareType (javax.swing.plaf, "InputMapUIResource", javax.swing.InputMap, javax.swing.plaf.UIResource);
49159 Clazz_makeConstructor (c$, 
49160 function () {
49161 Clazz_superConstructor (this, javax.swing.plaf.InputMapUIResource, []);
49162 });
49163 });
49164 Clazz_declarePackage ("javax.swing.plaf");
49165 Clazz_load (["javax.swing.ActionMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ActionMapUIResource", null, function () {
49166 c$ = Clazz_declareType (javax.swing.plaf, "ActionMapUIResource", javax.swing.ActionMap, javax.swing.plaf.UIResource);
49167 Clazz_makeConstructor (c$, 
49168 function () {
49169 Clazz_superConstructor (this, javax.swing.plaf.ActionMapUIResource, []);
49170 });
49171 });
49172 Clazz_declarePackage ("javax.swing.plaf");
49173 Clazz_load (null, "javax.swing.plaf.ComponentUI", ["java.lang.Error", "java.awt.Component"], function () {
49174 c$ = Clazz_declareType (javax.swing.plaf, "ComponentUI");
49175 Clazz_makeConstructor (c$, 
49176 function () {
49177 });
49178 Clazz_defineMethod (c$, "installUI", 
49179 function (c) {
49180 }, "javax.swing.JComponent");
49181 Clazz_defineMethod (c$, "uninstallUI", 
49182 function (c) {
49183 }, "javax.swing.JComponent");
49184 Clazz_defineMethod (c$, "paint", 
49185 function (g, c) {
49186 }, "java.awt.Graphics,javax.swing.JComponent");
49187 Clazz_defineMethod (c$, "update", 
49188 function (g, c) {
49189 }, "java.awt.Graphics,javax.swing.JComponent");
49190 Clazz_defineMethod (c$, "getPreferredSize", 
49191 function (c) {
49192 return null;
49193 }, "javax.swing.JComponent");
49194 Clazz_defineMethod (c$, "getMinimumSize", 
49195 function (c) {
49196 return this.getPreferredSize (c);
49197 }, "javax.swing.JComponent");
49198 Clazz_defineMethod (c$, "getMaximumSize", 
49199 function (c) {
49200 return null;
49201 }, "javax.swing.JComponent");
49202 Clazz_defineMethod (c$, "contains", 
49203 function (c, x, y) {
49204 return c.inside (x, y);
49205 }, "javax.swing.JComponent,~N,~N");
49206 c$.createUI = Clazz_defineMethod (c$, "createUI", 
49207 function (c) {
49208 throw  new Error ("ComponentUI.createUI not implemented.");
49209 }, "javax.swing.JComponent");
49210 Clazz_defineMethod (c$, "getBaseline", 
49211 function (c, width, height) {
49212 return -1;
49213 }, "javax.swing.JComponent,~N,~N");
49214 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
49215 function (c) {
49216 return java.awt.Component.BaselineResizeBehavior.OTHER;
49217 }, "javax.swing.JComponent");
49218 });
49219 Clazz_declarePackage ("javax.swing.plaf");
49220 Clazz_load (["java.awt.Font", "javax.swing.plaf.UIResource"], "javax.swing.plaf.FontUIResource", null, function () {
49221 c$ = Clazz_declareType (javax.swing.plaf, "FontUIResource", java.awt.Font, javax.swing.plaf.UIResource);
49222 });
49223 Clazz_declarePackage ("javax.swing.plaf");
49224 Clazz_load (["java.awt.Color", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ColorUIResource", null, function () {
49225 c$ = Clazz_declareType (javax.swing.plaf, "ColorUIResource", java.awt.Color, javax.swing.plaf.UIResource);
49226 });
49227 Clazz_declarePackage ("javax.swing.plaf");
49228 Clazz_load (["javax.swing.ComponentInputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ComponentInputMapUIResource", null, function () {
49229 c$ = Clazz_declareType (javax.swing.plaf, "ComponentInputMapUIResource", javax.swing.ComponentInputMap, javax.swing.plaf.UIResource);
49230 });
49231 Clazz_declarePackage ("swingjs.api");
49232 Clazz_declareInterface (swingjs.api, "JSFunction");
49233 Clazz_declarePackage ("swingjs.api");
49234 Clazz_declareInterface (swingjs.api, "JSInterface");
49235 Clazz_declarePackage ("swingjs.api");
49236 c$ = Clazz_declareType (swingjs.api, "Interface");
49237 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49238 function (name, isQuiet) {
49239 try {
49240 {
49241 Clazz._isQuiet = isQuiet;
49242 }System.out.println ("swingjs.api.Interface creating instance of " + name);
49243 var x = Clazz._4Name (name);
49244 {
49245 Clazz._isQuiet = false;
49246 }return (x == null ? null : x.newInstance ());
49247 } catch (e) {
49248 if (Clazz_exceptionOf (e, Exception)) {
49249 System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e);
49250 return null;
49251 } else {
49252 throw e;
49253 }
49254 }
49255 }, "~S,~B");
49256 Clazz_declarePackage ("swingjs.api");
49257 c$ = Clazz_declareType (swingjs.api, "DOMNode");
49258 c$.createElement = Clazz_defineMethod (c$, "createElement", 
49259 function (key, id) {
49260 var obj = null;
49261 {
49262 obj = document.createElement(key);
49263 obj.id = id;
49264 }return obj;
49265 }, "~S,~S");
49266 c$.getParent = Clazz_defineMethod (c$, "getParent", 
49267 function (obj) {
49268 {
49269 return obj.parentNode;
49270 }}, "swingjs.api.DOMNode");
49271 c$.remove = Clazz_defineMethod (c$, "remove", 
49272 function (obj) {
49273 {
49274 try {
49275 var p = obj.parentNode;
49276 p.removeNode(obj);
49277 } catch(e) {};
49278 return p;
49279 }}, "swingjs.api.DOMNode");
49280 c$.add = Clazz_defineMethod (c$, "add", 
49281 function (parent, child) {
49282 {
49283 parent && parent.appendChild(child);
49284 }}, "swingjs.api.DOMNode,swingjs.api.DOMNode");
49285 c$.getAttr = Clazz_defineMethod (c$, "getAttr", 
49286 function (obj, attr) {
49287 {
49288 if (obj)return obj[attr];
49289 }}, "swingjs.api.DOMNode,~S");
49290 Clazz_defineMethod (c$, "getStyle", 
49291 function (style) {
49292 {
49293 if (obj)return obj.style[style];
49294 }}, "~S");
49295 c$.setAttr = Clazz_defineMethod (c$, "setAttr", 
49296 function (obj, attr, val) {
49297 {
49298 obj[attr] = (val == "TRUE" ? true : val);
49299 }return obj;
49300 }, "swingjs.api.DOMNode,~S,~O");
49301 c$.setStyles = Clazz_defineMethod (c$, "setStyles", 
49302 function (obj, attr) {
49303 {
49304 for (var i = 0; i < attr.length;) {
49305 //System.out.println(["DOMNode.setStyles ",attr[i],attr[i+1]])
49306 ;
49307 obj.style[attr[i++]] = attr[i++]; }
49308 }return obj;
49309 }, "swingjs.api.DOMNode,~A");
49310 c$.setSize = Clazz_defineMethod (c$, "setSize", 
49311 function (obj, width, height) {
49312 return swingjs.api.DOMNode.setStyles (obj, ["width", width + "px", "height", height + "px"]);
49313 }, "swingjs.api.DOMNode,~N,~N");
49314 Clazz_declarePackage ("swingjs");
49315 c$ = Clazz_declareType (swingjs, "JSUtil");
49316 c$.split = Clazz_defineMethod (c$, "split", 
49317 function (text, run) {
49318 if (text.length == 0) return  new Array (0);
49319 var n = 1;
49320 var i = text.indexOf (run);
49321 var lines;
49322 var runLen = run.length;
49323 if (i < 0 || runLen == 0) {
49324 lines =  new Array (1);
49325 lines[0] = text;
49326 return lines;
49327 }var len = text.length - runLen;
49328 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
49329
49330 lines =  new Array (n);
49331 i = 0;
49332 var ipt = 0;
49333 var pt = 0;
49334 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
49335 lines[pt++] = text.substring (i, ipt);
49336 i = ipt + runLen;
49337 }
49338 if (text.indexOf (run, len) != len) len += runLen;
49339 lines[pt] = text.substring (i, len);
49340 return lines;
49341 }, "~S,~S");
49342 Clazz_declarePackage ("swingjs");
49343 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.JComponent", "$.UIManager", "jssun.awt.AppContext", "swingjs.JSComponentPeer", "swingjs.api.Interface"], function () {
49344 c$ = Clazz_decorateAsClass (function () {
49345 this.imageKit = null;
49346 Clazz_instantialize (this, arguments);
49347 }, swingjs, "JSToolkit", jssun.awt.SunToolkit);
49348 Clazz_makeConstructor (c$, 
49349 function () {
49350 Clazz_superConstructor (this, swingjs.JSToolkit);
49351 System.out.println ("JSToolkit initialized");
49352 });
49353 c$.warn = Clazz_defineMethod (c$, "warn", 
49354 function (msg) {
49355 swingjs.JSToolkit.alert (msg);
49356 }, "~S");
49357 c$.alert = Clazz_defineMethod (c$, "alert", 
49358 function (object) {
49359 {
49360 console.log("[JSToolkit] " + object);
49361 alert("[JSToolkit] " + object);
49362 }}, "~O");
49363 c$.log = Clazz_defineMethod (c$, "log", 
49364 function (msg) {
49365 {
49366 System.out.println(msg);
49367 console.log(msg);
49368 }}, "~S");
49369 c$.confirm = Clazz_defineMethod (c$, "confirm", 
49370 function (msg) {
49371 {
49372 return confirm(msg);
49373 }}, "~S");
49374 c$.prompt = Clazz_defineMethod (c$, "prompt", 
49375 function (msg, defaultRet) {
49376 {
49377 return confirm(msg, defaultRet);
49378 }}, "~S,~S");
49379 c$.getPostEventQueue = Clazz_defineMethod (c$, "getPostEventQueue", 
49380 function (isPost) {
49381 return (isPost ? jssun.awt.AppContext.getAppContext ().get ("PostEventQueue") : jssun.awt.AppContext.getAppContext ().get (jssun.awt.AppContext.EVENT_QUEUE_KEY));
49382 }, "~B");
49383 Clazz_overrideMethod (c$, "getScreenSize", 
49384 function () {
49385 var d =  new java.awt.Dimension (0, 0);
49386 var jq = swingjs.JSToolkit.getJQuery ();
49387 {
49388 d.setSize(jq.$(window).width(), jq.$(window).height()); return
49389 d;
49390 }});
49391 Clazz_overrideMethod (c$, "getScreenResolution", 
49392 function () {
49393 return 0;
49394 });
49395 Clazz_overrideMethod (c$, "getColorModel", 
49396 function () {
49397 return java.awt.image.ColorModel.getRGBdefault ();
49398 });
49399 Clazz_overrideMethod (c$, "getFontList", 
49400 function () {
49401 var hardwiredFontList =  Clazz_newArray (-1, ["SansSerif", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
49402 return hardwiredFontList;
49403 });
49404 Clazz_overrideMethod (c$, "sync", 
49405 function () {
49406 });
49407 Clazz_overrideMethod (c$, "isModalExclusionTypeSupported", 
49408 function (modalExclusionType) {
49409 return true;
49410 }, "java.awt.Dialog.ModalExclusionType");
49411 Clazz_overrideMethod (c$, "isModalityTypeSupported", 
49412 function (modalityType) {
49413 return false;
49414 }, "java.awt.Dialog.ModalityType");
49415 Clazz_overrideMethod (c$, "isTraySupported", 
49416 function () {
49417 return false;
49418 });
49419 Clazz_overrideMethod (c$, "getScreenWidth", 
49420 function () {
49421 return 0;
49422 });
49423 Clazz_overrideMethod (c$, "getScreenHeight", 
49424 function () {
49425 return 0;
49426 });
49427 Clazz_overrideMethod (c$, "grab", 
49428 function (w) {
49429 }, "java.awt.Window");
49430 Clazz_overrideMethod (c$, "ungrab", 
49431 function (w) {
49432 }, "java.awt.Window");
49433 c$.getPropertyObject = Clazz_defineMethod (c$, "getPropertyObject", 
49434 function (t, key, def) {
49435 return def;
49436 }, "~O,~S,~O");
49437 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49438 function (className) {
49439 return swingjs.api.Interface.getInstance (className, false);
49440 }, "~S");
49441 c$.getGraphicsConfiguration = Clazz_defineMethod (c$, "getGraphicsConfiguration", 
49442 function () {
49443 return (swingjs.JSToolkit.gc == null ? swingjs.JSToolkit.gc = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsConfiguration") : swingjs.JSToolkit.gc);
49444 });
49445 c$.isFocused = Clazz_defineMethod (c$, "isFocused", 
49446 function (window) {
49447 return false;
49448 }, "java.awt.Window");
49449 c$.getCSSFont = Clazz_defineMethod (c$, "getCSSFont", 
49450 function (font) {
49451 var css = "";
49452 if (font.isItalic ()) css += "font-style:italic;";
49453 if (font.isBold ()) css += "font-weight:bold;";
49454 css += "font-size:" + font.getSize () + "px;";
49455 css += "font-family:" + font.getFamily () + ";";
49456 return css;
49457 }, "java.awt.Font");
49458 c$.getStringWidth = Clazz_defineMethod (c$, "getStringWidth", 
49459 function (context, font, text) {
49460 var fontInfo = swingjs.JSToolkit.getCanvasFont (font);
49461 if (context == null) context = swingjs.JSToolkit.getDefaultCanvasContext2d ();
49462 var w = 0;
49463 {
49464 context.font = fontInfo;
49465 w = Math.ceil(context.measureText(text).width);
49466 }return w;
49467 }, "swingjs.api.HTML5CanvasContext2D,java.awt.Font,~S");
49468 c$.getDefaultCanvasContext2d = Clazz_defineMethod (c$, "getDefaultCanvasContext2d", 
49469 function () {
49470 {
49471 if (this.defaultContext == null) this.defaultContext =
49472 document.createElement( 'canvas' ).getContext('2d');
49473 }return swingjs.JSToolkit.defaultContext;
49474 });
49475 c$.getCanvasFont = Clazz_defineMethod (c$, "getCanvasFont", 
49476 function (font) {
49477 var strStyle = "";
49478 if (font.isItalic ()) strStyle += "italic ";
49479 if (font.isBold ()) strStyle += "bold ";
49480 return strStyle + font.getSize () + "px " + font.getFamily ();
49481 }, "java.awt.Font");
49482 c$.getFontFamily = Clazz_defineMethod (c$, "getFontFamily", 
49483 function (font) {
49484 return font.getName ();
49485 }, "java.awt.Font");
49486 Clazz_overrideMethod (c$, "getFontMetrics", 
49487 function (font) {
49488 var fm = swingjs.JSToolkit.getInstance ("swingjs.JSFontMetrics");
49489 fm.setFont (font);
49490 return fm;
49491 }, "java.awt.Font");
49492 c$.getCSSColor = Clazz_defineMethod (c$, "getCSSColor", 
49493 function (c) {
49494 var s = "000000" + Integer.toHexString (c.getRGB () & 0xFFFFFF);
49495 return "#" + s.substring (s.length - 6);
49496 }, "java.awt.Color");
49497 c$.notImplemented = Clazz_defineMethod (c$, "notImplemented", 
49498 function (msg) {
49499 var s = null;
49500 if (swingjs.JSToolkit.mapNotImpl == null) swingjs.JSToolkit.mapNotImpl =  new java.util.Hashtable ();
49501 {
49502 s = arguments.callee.caller; s = s.__CLASS_NAME__ ||
49503 s.claxxOwner.__CLASS_NAME__; s += "." +
49504 arguments.callee.caller.exName;
49505 }if (swingjs.JSToolkit.mapNotImpl.containsKey (s)) return;
49506 swingjs.JSToolkit.mapNotImpl.put (s, Boolean.TRUE);
49507 System.out.println (s + " has not been implemented in SwingJS. " + (msg === "" ? "" : (msg == null ? "" : msg) + swingjs.JSToolkit.getStackTrace (-5)));
49508 }, "~S");
49509 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49510 function () {
49511 {
49512 return Clazz_getStackTrace();
49513 }});
49514 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49515 function (n) {
49516 {
49517 return Clazz_getStackTrace(n);
49518 }}, "~N");
49519 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
49520 function () {
49521 if (swingjs.JSToolkit.uid == null) swingjs.JSToolkit.uid = javax.swing.UIManager.getLookAndFeel ().getDefaults ();
49522 return swingjs.JSToolkit.uid;
49523 });
49524 c$.getComponentUI = Clazz_defineMethod (c$, "getComponentUI", 
49525 function (target) {
49526 var c = swingjs.api.Interface.getInstance ("swingjs.plaf.JS" + target.getUIClassID (), true);
49527 if (c != null) c.set (target);
49528 return c;
49529 }, "javax.swing.JComponent");
49530 c$.getSwingDivId = Clazz_defineMethod (c$, "getSwingDivId", 
49531 function () {
49532 return Thread.currentThread ().getName () + "_swingdiv";
49533 });
49534 c$.getJQuery = Clazz_defineMethod (c$, "getJQuery", 
49535 function () {
49536 {
49537 if (!window.jQuery) alert(
49538 "jQuery is required for SwingJS, but window.jQuery is not defined."
49539 ); jQuery.$ || (jQuery.$ = jQuery); return(jQuery);
49540 }});
49541 c$.getJavaResource = Clazz_defineMethod (c$, "getJavaResource", 
49542 function (resourceName) {
49543 System.out.println ("JSToolkit getting Java resource " + resourceName);
49544 {
49545 return SwingJS.getJavaResource(resourceName);
49546 }}, "~S");
49547 c$.dispatchSystemEvent = Clazz_defineMethod (c$, "dispatchSystemEvent", 
49548 function (runnable) {
49549 var f = null;
49550 {
49551 System.out.println("JST dispatchSystemEvent " +
49552 runnable.run.toString()); f =
49553 function(_JSToolkit_dispatchSystemEvent) {
49554 System.out.println("JST running " +
49555 runnable.run.toString());runnable.run()};
49556 }swingjs.JSToolkit.setTimeout (f, 0, 0);
49557 }, "Runnable");
49558 c$.dispatchEvent = Clazz_defineMethod (c$, "dispatchEvent", 
49559 function (event, src, andWait) {
49560 var f = null;
49561 var id = ++swingjs.JSToolkit.dispatchID;
49562 {
49563 f = function()
49564 {
49565 if
49566 (src == null) event.dispatch(); else src.dispatchEvent(event);
49567 };
49568 }if (andWait) swingjs.JSToolkit.invokeAndWait (f, id);
49569  else swingjs.JSToolkit.setTimeout (f, 0, id);
49570 }, "java.awt.AWTEvent,~O,~B");
49571 c$.setTimeout = Clazz_defineMethod (c$, "setTimeout", 
49572 function (f, msDelay, id) {
49573 {
49574 var thread = java.lang.Thread.thisThread;
49575 var thread0 = thread;
49576 var id0 = SwingJS.eventID || 0;
49577 setTimeout(function(_JSToolkit_setTimeout) {
49578 SwingJS.eventID = id;
49579 java.lang.Thread.thisThread = thread;
49580 try {
49581 if (f.run)
49582 f.run();
49583 else
49584 f();
49585 } catch (e) {
49586 var s = "JSToolkit.setTimeout(" + id +"): " + e;
49587 System.out.println(s);
49588 alert(s)}
49589 SwingJS.eventID = id0;
49590 java.lang.Thread.thisThread = thread0;
49591 }, msDelay);
49592 }}, "~O,~N,~N");
49593 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
49594  function (f, id) {
49595 {
49596 var thread = java.lang.Thread.thisThread;
49597 var thread0 = thread;
49598 (function(_JSToolkit_setTimeout) {
49599 var id0 = SwingJS.eventID || 0;
49600 System.out.println("runNow " + id); SwingJS.eventID = id;
49601 java.lang.Thread.thisThread = thread;
49602 if (f.run)
49603 f.run();
49604 else
49605 f();
49606 SwingJS.eventID = id0;
49607 java.lang.Thread.thisThread = thread0;
49608 })();
49609 }}, "swingjs.api.JSFunction,~N");
49610 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
49611 function () {
49612 {
49613 return (!!SwingJS.eventID);
49614 }});
49615 c$.checkClassMethod = Clazz_defineMethod (c$, "checkClassMethod", 
49616 function (component, fname, signature) {
49617 {
49618 return component[fname] && component[fname][signature];
49619 }}, "java.awt.Component,~S,~S");
49620 c$.readyCallback = Clazz_defineMethod (c$, "readyCallback", 
49621 function (aname, fname, a, me) {
49622 {
49623 Jmol._readyCallback(aname, fname, true,a, me);
49624 }}, "~S,~S,~O,~O");
49625 c$.forceRepaint = Clazz_defineMethod (c$, "forceRepaint", 
49626 function (c) {
49627 }, "java.awt.Component");
49628 c$.getHTML5Applet = Clazz_defineMethod (c$, "getHTML5Applet", 
49629 function (c) {
49630 return (c.getAppContext ().getThreadGroup ()).getHtmlApplet ();
49631 }, "javax.swing.JComponent");
49632 c$.taintUI = Clazz_defineMethod (c$, "taintUI", 
49633 function (c) {
49634 {
49635 c.getUI && c.getUI() && c.getUI().setTainted();
49636 }}, "java.awt.Component");
49637 Clazz_overrideMethod (c$, "createComponent", 
49638 function (target) {
49639 System.out.println ("JSToolkit creating peer for " + target);
49640 var peer = (Clazz_instanceOf (target, javax.swing.JComponent) ? (target).getUI () : null);
49641 return (peer == null ?  new swingjs.JSComponentPeer (target) : peer);
49642 }, "java.awt.Component");
49643 c$.getPlainDocument = Clazz_defineMethod (c$, "getPlainDocument", 
49644 function (c) {
49645 return swingjs.JSToolkit.getInstance ("swingjs.JSPlainDocument");
49646 }, "javax.swing.JComponent");
49647 c$.getClassName = Clazz_defineMethod (c$, "getClassName", 
49648 function (c) {
49649 {
49650 return c.__CLASS_NAME__;
49651 }}, "~O");
49652 c$.getSignedStreamBytes = Clazz_defineMethod (c$, "getSignedStreamBytes", 
49653 function (bis) {
49654 try {
49655 return JU.AU.ensureSignedBytes (JU.Rdr.getStreamAsBytes (bis, null));
49656 } catch (e) {
49657 if (Clazz_exceptionOf (e, java.io.IOException)) {
49658 return null;
49659 } else {
49660 throw e;
49661 }
49662 }
49663 }, "java.io.BufferedInputStream");
49664 c$.getFileContents = Clazz_defineMethod (c$, "getFileContents", 
49665 function (uri) {
49666 {
49667 return Jmol._getFileData(uri);
49668 }}, "~S");
49669 Clazz_defineMethod (c$, "getFileAsBytes", 
49670 function (filename) {
49671 var data = swingjs.JSToolkit.getFileContents (filename);
49672 var b = null;
49673 if (JU.AU.isAB (data)) b = data;
49674  else if (Clazz_instanceOf (data, String)) b = (data).getBytes ();
49675  else if (Clazz_instanceOf (data, JU.SB)) b = JU.Rdr.getBytesFromSB (data);
49676  else if (Clazz_instanceOf (data, java.io.InputStream)) try {
49677 b = JU.Rdr.getLimitedStreamBytes (data, -1);
49678 } catch (e) {
49679 if (Clazz_exceptionOf (e, java.io.IOException)) {
49680 } else {
49681 throw e;
49682 }
49683 }
49684 return JU.AU.ensureSignedBytes (b);
49685 }, "~S");
49686 Clazz_defineMethod (c$, "getImagekit", 
49687  function () {
49688 return (this.imageKit == null ? this.imageKit = swingjs.api.Interface.getInstance ("swingjs.JSImagekit", false) : this.imageKit);
49689 });
49690 Clazz_defineMethod (c$, "createImage", 
49691 function (producer) {
49692 producer.startProduction (null);
49693 return null;
49694 }, "java.awt.image.ImageProducer");
49695 Clazz_defineMethod (c$, "createImage", 
49696 function (filename) {
49697 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (this.getFileAsBytes (filename)))), 0, -1);
49698 }, "~S");
49699 Clazz_defineMethod (c$, "createImage", 
49700 function (url) {
49701 try {
49702 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream (url.openStream ())), 0, -1);
49703 } catch (e) {
49704 if (Clazz_exceptionOf (e, java.io.IOException)) {
49705 return null;
49706 } else {
49707 throw e;
49708 }
49709 }
49710 }, "java.net.URL");
49711 Clazz_defineMethod (c$, "createImage", 
49712 function (data, imageoffset, imagelength) {
49713 return this.getImagekit ().createImageFromBytes (data, imageoffset, imagelength);
49714 }, "~A,~N,~N");
49715 Clazz_overrideMethod (c$, "checkImage", 
49716 function (image, width, height, observer) {
49717 return 63;
49718 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49719 Clazz_overrideMethod (c$, "prepareImage", 
49720 function (image, width, height, observer) {
49721 return true;
49722 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49723 c$.hasFocus = Clazz_defineMethod (c$, "hasFocus", 
49724 function (c) {
49725 return ((c).getUI ()).hasFocus ();
49726 }, "java.awt.Component");
49727 c$.requestFocus = Clazz_defineMethod (c$, "requestFocus", 
49728 function (c) {
49729 var ui = ((c).getUI ());
49730 if (!ui.isFocusable ()) return false;
49731 var r = ((Clazz_isClassDefined ("swingjs.JSToolkit$1") ? 0 : swingjs.JSToolkit.$JSToolkit$1$ ()), Clazz_innerTypeInstance (swingjs.JSToolkit$1, this, Clazz_cloneFinals ("ui", ui)));
49732 swingjs.JSToolkit.setTimeout (r, 50, 0);
49733 return true;
49734 }, "java.awt.Component");
49735 c$.getCompositor = Clazz_defineMethod (c$, "getCompositor", 
49736 function () {
49737 return (swingjs.JSToolkit.compositor == null ? swingjs.JSToolkit.compositor = swingjs.api.Interface.getInstance ("swingjs.JSGraphicsCompositor", false) : swingjs.JSToolkit.compositor);
49738 });
49739 c$.setGraphicsCompositeAlpha = Clazz_defineMethod (c$, "setGraphicsCompositeAlpha", 
49740 function (g, rule) {
49741 return swingjs.JSToolkit.getCompositor ().setGraphicsCompositeAlpha (g, rule);
49742 }, "swingjs.JSGraphics2D,~N");
49743 c$.drawImageOp = Clazz_defineMethod (c$, "drawImageOp", 
49744 function (g, img, op, x, y) {
49745 return swingjs.JSToolkit.getCompositor ().drawImageOp (g, img, op, x, y);
49746 }, "swingjs.JSGraphics2D,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
49747 c$.filterRaster = Clazz_defineMethod (c$, "filterRaster", 
49748 function (src, dst, op) {
49749 return swingjs.JSToolkit.getCompositor ().filterRaster (src, dst, op);
49750 }, "java.awt.image.Raster,java.awt.image.WritableRaster,java.awt.image.RasterOp");
49751 c$.filterImage = Clazz_defineMethod (c$, "filterImage", 
49752 function (src, dst, op) {
49753 return swingjs.JSToolkit.getCompositor ().filterImage (src, dst, op);
49754 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp");
49755 c$.getZIndex = Clazz_defineMethod (c$, "getZIndex", 
49756 function (ui, what) {
49757 {
49758 if (what) return getHTML5Applet(ui.c)._z[what];
49759 var c = ui.domNode; var z;
49760 while (c && !(z = c.style["z-index"])) {
49761 c = c.parentNode;
49762 }
49763 return z || 100000;
49764 }}, "swingjs.plaf.JSComponentUI,~S");
49765 c$.$JSToolkit$1$ = function () {
49766 Clazz_pu$h(self.c$);
49767 c$ = Clazz_declareAnonymous (swingjs, "JSToolkit$1", null, Runnable);
49768 Clazz_overrideMethod (c$, "run", 
49769 function () {
49770 this.f$.ui.requestFocus (null, false, false, 0, null);
49771 });
49772 c$ = Clazz_p0p ();
49773 };
49774 Clazz_defineStatics (c$,
49775 "gc", null,
49776 "defaultContext", null,
49777 "mapNotImpl", null,
49778 "uid", null,
49779 "dispatchID", 0,
49780 "compositor", null);
49781 });
49782 Clazz_declarePackage ("swingjs");
49783 Clazz_load (["java.awt.event.InvocationEvent"], "swingjs.JSEvent", null, function () {
49784 c$ = Clazz_declareType (swingjs, "JSEvent", java.awt.event.InvocationEvent);
49785 Clazz_makeConstructor (c$, 
49786 function (t, r) {
49787 Clazz_superConstructor (this, swingjs.JSEvent, [t, 1201, r, null, false]);
49788 }, "swingjs.JSThread,Runnable");
49789 });
49790 Clazz_declarePackage ("swingjs");
49791 Clazz_load (["java.lang.Thread", "swingjs.api.JSFunction"], "swingjs.JSThread", ["java.awt.EventQueue", "$.Toolkit", "swingjs.JSEvent", "$.JSToolkit"], function () {
49792 c$ = Clazz_decorateAsClass (function () {
49793 this.isJS = false;
49794 this.doDispatch = true;
49795 this.msDelay = 0;
49796 Clazz_instantialize (this, arguments);
49797 }, swingjs, "JSThread", Thread, swingjs.api.JSFunction);
49798 Clazz_makeConstructor (c$, 
49799 function (group, name) {
49800 Clazz_superConstructor (this, swingjs.JSThread, [group, name]);
49801 {
49802 this.isJS = true;
49803 }}, "ThreadGroup,~S");
49804 Clazz_overrideMethod (c$, "run", 
49805 function () {
49806 this.run1 (0);
49807 });
49808 Clazz_defineMethod (c$, "start", 
49809 function () {
49810 if (!this.isJS) {
49811 Clazz_superCall (this, swingjs.JSThread, "start", []);
49812 return;
49813 }swingjs.JSToolkit.setTimeout (this, this.msDelay, 0);
49814 });
49815 Clazz_defineMethod (c$, "setDelayMillis", 
49816 function (ms) {
49817 this.msDelay = ms;
49818 }, "~N");
49819 Clazz_defineMethod (c$, "dispatchAndReturn", 
49820 function (r, mode) {
49821 if (!this.isJS) {
49822 if (r != null) r.run ();
49823 try {
49824 Thread.sleep (this.msDelay);
49825 } catch (e) {
49826 if (Clazz_exceptionOf (e, InterruptedException)) {
49827 } else {
49828 throw e;
49829 }
49830 }
49831 return;
49832 }if (r != null) {
49833 java.awt.EventQueue.invokeLater (r);
49834 }var f = null;
49835 var me = this;
49836 {
49837 f = function() {me.run1(mode)};
49838 }r = ((Clazz_isClassDefined ("swingjs.JSThread$1") ? 0 : swingjs.JSThread.$JSThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSThread$1, this, Clazz_cloneFinals ("f", f)));
49839 java.awt.Toolkit.getEventQueue ().postEvent ( new swingjs.JSEvent (this, r));
49840 }, "Runnable,~N");
49841 c$.$JSThread$1$ = function () {
49842 Clazz_pu$h(self.c$);
49843 c$ = Clazz_declareAnonymous (swingjs, "JSThread$1", null, Runnable);
49844 Clazz_defineMethod (c$, "run", 
49845 function () {
49846 this.notifyMe (this.f$.f);
49847 });
49848 Clazz_defineMethod (c$, "notifyMe", 
49849  function (f) {
49850 {
49851 f();
49852 }}, "swingjs.api.JSFunction");
49853 c$ = Clazz_p0p ();
49854 };
49855 Clazz_defineStatics (c$,
49856 "INIT", 0,
49857 "LOOP", 1,
49858 "DONE", 2);
49859 });
49860 Clazz_declarePackage ("swingjs");
49861 Clazz_load (["java.lang.ThreadGroup"], "swingjs.JSThreadGroup", null, function () {
49862 c$ = Clazz_decorateAsClass (function () {
49863 this.html5Applet = null;
49864 Clazz_instantialize (this, arguments);
49865 }, swingjs, "JSThreadGroup", ThreadGroup);
49866 Clazz_defineMethod (c$, "setHtmlApplet", 
49867 function (html5Applet) {
49868 this.html5Applet = html5Applet;
49869 }, "swingjs.api.HTML5Applet");
49870 Clazz_defineMethod (c$, "getHtmlApplet", 
49871 function () {
49872 return this.html5Applet;
49873 });
49874 });
49875 Clazz_declarePackage ("swingjs");
49876 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 () {
49877 c$ = Clazz_decorateAsClass (function () {
49878 this.params = null;
49879 this.html5Applet = null;
49880 this.fullName = null;
49881 this.appletCodeBase = null;
49882 this.appletIdiomaBase = null;
49883 this.appletDocumentBase = null;
49884 this.maximumSize = 2147483647;
49885 this.appletName = null;
49886 this.syncId = null;
49887 this.testAsync = false;
49888 this.async = false;
49889 this.strJavaVersion = null;
49890 this.strJavaVendor = null;
49891 this.display = null;
49892 this.canvas = null;
49893 this.jsgraphics = null;
49894 this.applet = null;
49895 this.defaultAppletSize = null;
49896 this.currentAppletSize = null;
49897 this.nextStatus = 0;
49898 this.status = 0;
49899 this.listeners = null;
49900 this.mouse = null;
49901 Clazz_instantialize (this, arguments);
49902 }, swingjs, "JSAppletPanel", java.awt.Panel, [java.applet.AppletStub, java.applet.AppletContext, swingjs.api.JSInterface]);
49903 Clazz_prepareFields (c$, function () {
49904 this.defaultAppletSize =  new java.awt.Dimension (10, 10);
49905 this.currentAppletSize =  new java.awt.Dimension (10, 10);
49906 });
49907 Clazz_makeConstructor (c$, 
49908 function (params) {
49909 Clazz_superConstructor (this, swingjs.JSAppletPanel, []);
49910 this.setPanel ();
49911 this.set (params);
49912 }, "java.util.Hashtable");
49913 Clazz_defineMethod (c$, "set", 
49914  function (params) {
49915 System.out.println ("JSAppletPanel initializing");
49916 this.params = params;
49917 this.htmlName = swingjs.JSUtil.split ("" + this.getParameter ("name"), "_object")[0];
49918 this.appletName = swingjs.JSUtil.split (this.htmlName + "_", "_")[0];
49919 this.syncId = this.getParameter ("syncId");
49920 this.fullName = this.htmlName + "__" + this.syncId + "__";
49921 params.put ("fullName", this.fullName);
49922 var o = params.get ("codePath");
49923 if (o == null) o = "../java/";
49924 this.appletCodeBase = o.toString ();
49925 this.appletIdiomaBase = this.appletCodeBase.substring (0, this.appletCodeBase.lastIndexOf ("/", this.appletCodeBase.length - 2) + 1) + "idioma";
49926 o = params.get ("documentBase");
49927 this.appletDocumentBase = (o == null ? "" : o.toString ());
49928 if (params.containsKey ("maximumSize")) Math.max ((params.get ("maximumSize")).intValue (), 100);
49929 this.async = (this.testAsync || params.containsKey ("async"));
49930 var applet = null;
49931 var javaver = "?";
49932 {
49933 if(self.Jmol) { applet =
49934 Jmol._applets[this.htmlName.split("_object")[0]]; javaver =
49935 Jmol._version; }
49936 }this.html5Applet = applet;
49937 this.strJavaVersion = javaver;
49938 this.strJavaVendor = "Java2Script/Java 1.6 (HTML5)";
49939 this.display = params.get ("display");
49940 this.threadGroup =  new swingjs.JSThreadGroup (this.appletName);
49941 this.myThread =  new swingjs.JSAppletThread (this, this.threadGroup, this.appletName);
49942 (this.threadGroup).setHtmlApplet (this.html5Applet);
49943 {
49944 Jmol._applets[this.appletName + "_thread"] =
49945 java.lang.Thread.thisThread = this.myThread;
49946 }this.appContext = swingjs.JSToolkit.createNewAppContext ();
49947 java.awt.Toolkit.getDefaultToolkit ();
49948 try {
49949 java.net.URL.setURLStreamHandlerFactory (swingjs.api.Interface.getInstance ("JU.AjaxURLStreamHandlerFactory", false));
49950 } catch (e) {
49951 }
49952 System.out.println ("JSAppletPanel initialized");
49953 }, "java.util.Hashtable");
49954 Clazz_defineMethod (c$, "start", 
49955 function () {
49956 if (this.status == 0) this.myThread.start ();
49957  else this.showStatus ("already started");
49958 });
49959 Clazz_defineMethod (c$, "addAppletListener", 
49960 function (l) {
49961 this.listeners = jssun.applet.AppletEventMulticaster.add (this.listeners, l);
49962 }, "jssun.applet.AppletListener");
49963 Clazz_defineMethod (c$, "removeAppletListener", 
49964 function (l) {
49965 this.listeners = jssun.applet.AppletEventMulticaster.remove (this.listeners, l);
49966 }, "jssun.applet.AppletListener");
49967 Clazz_defineMethod (c$, "dispatchAppletEvent", 
49968 function (id, argument) {
49969 if (this.listeners != null) {
49970 var evt =  new jssun.applet.AppletEvent (this, id, argument);
49971 this.listeners.appletStateChanged (evt);
49972 }}, "~N,~O");
49973 Clazz_defineMethod (c$, "getCode", 
49974  function () {
49975 return this.getParameter ("code");
49976 });
49977 Clazz_defineMethod (c$, "getCanvas", 
49978  function () {
49979 if (this.canvas == null) this.canvas = this.html5Applet._getHtml5Canvas ();
49980 return this.canvas;
49981 });
49982 Clazz_overrideMethod (c$, "isActive", 
49983 function () {
49984 return true;
49985 });
49986 Clazz_overrideMethod (c$, "appletResize", 
49987 function (width, height) {
49988 var currentSize =  new java.awt.Dimension (this.currentAppletSize.width, this.currentAppletSize.height);
49989 this.currentAppletSize.width = width;
49990 this.currentAppletSize.height = height;
49991 this.applet.setBounds (0, 0, this.getWidth (), this.getHeight ());
49992 this.applet.getRootPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
49993 this.applet.getContentPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
49994 (this.applet.getContentPane ()).revalidate ();
49995 this.dispatchAppletEvent (51234, currentSize);
49996 }, "~N,~N");
49997 Clazz_overrideMethod (c$, "getDocumentBase", 
49998 function () {
49999 try {
50000 return  new java.net.URL (this.params.get ("documentBase"));
50001 } catch (e) {
50002 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50003 return null;
50004 } else {
50005 throw e;
50006 }
50007 }
50008 });
50009 Clazz_overrideMethod (c$, "getCodeBase", 
50010 function () {
50011 try {
50012 return  new java.net.URL (this.params.get ("codePath"));
50013 } catch (e) {
50014 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50015 return null;
50016 } else {
50017 throw e;
50018 }
50019 }
50020 });
50021 Clazz_overrideMethod (c$, "getParameter", 
50022 function (name) {
50023 var s = this.params.get (name);
50024 System.out.println ("get parameter: " + name + " = " + s);
50025 return s;
50026 }, "~S");
50027 Clazz_overrideMethod (c$, "getAppletContext", 
50028 function () {
50029 return this;
50030 });
50031 Clazz_defineMethod (c$, "getHeight", 
50032 function () {
50033 return this.html5Applet._getHeight ();
50034 });
50035 Clazz_defineMethod (c$, "getWidth", 
50036 function () {
50037 return this.html5Applet._getWidth ();
50038 });
50039 Clazz_defineMethod (c$, "setBounds", 
50040 function (x, y, width, height) {
50041 this.reshape (x, y, width, height);
50042 this.currentAppletSize.width = width;
50043 this.currentAppletSize.height = height;
50044 }, "~N,~N,~N,~N");
50045 Clazz_overrideMethod (c$, "getImage", 
50046 function (url) {
50047 return null;
50048 }, "java.net.URL");
50049 Clazz_overrideMethod (c$, "getApplet", 
50050 function (name) {
50051 var applet = null;
50052 {
50053 applet = Jmol._applets[name]; applet && (applet =
50054 applet._applet);
50055 }return applet;
50056 }, "~S");
50057 Clazz_overrideMethod (c$, "getApplets", 
50058 function () {
50059 return null;
50060 });
50061 Clazz_defineMethod (c$, "showDocument", 
50062 function (url) {
50063 {
50064 window.open(url.toString());
50065 }}, "java.net.URL");
50066 Clazz_defineMethod (c$, "showDocument", 
50067 function (url, target) {
50068 {
50069 window.open(url.toString(), target);
50070 }}, "java.net.URL,~S");
50071 Clazz_defineMethod (c$, "showStatus", 
50072 function (status) {
50073 swingjs.JSToolkit.log (status);
50074 {
50075 Clazz._LoaderProgressMonitor.showStatus(status, true);
50076 }}, "~S");
50077 Clazz_overrideMethod (c$, "cacheFileByName", 
50078 function (fileName, isAdd) {
50079 return 0;
50080 }, "~S,~B");
50081 Clazz_overrideMethod (c$, "cachePut", 
50082 function (key, data) {
50083 }, "~S,~O");
50084 Clazz_overrideMethod (c$, "destroy", 
50085 function () {
50086 });
50087 Clazz_overrideMethod (c$, "getFullName", 
50088 function () {
50089 return this.fullName;
50090 });
50091 Clazz_overrideMethod (c$, "openFileAsyncSpecial", 
50092 function (fileName, flags) {
50093 }, "~S,~N");
50094 Clazz_defineMethod (c$, "processMouseEvent", 
50095 function (id, x, y, modifiers, time) {
50096 this.getMouse ().processEvent (id, x, y, modifiers, time);
50097 return false;
50098 }, "~N,~N,~N,~N,~N");
50099 Clazz_defineMethod (c$, "getMouse", 
50100  function () {
50101 return (this.mouse == null ? this.mouse =  new swingjs.JSMouse (this) : this.mouse);
50102 });
50103 Clazz_overrideMethod (c$, "processTwoPointGesture", 
50104 function (touches) {
50105 this.getMouse ().processTwoPointGesture (touches);
50106 }, "~A");
50107 Clazz_overrideMethod (c$, "setDisplay", 
50108 function (canvas) {
50109 this.canvas = canvas;
50110 }, "swingjs.api.HTML5Canvas");
50111 Clazz_overrideMethod (c$, "setScreenDimension", 
50112 function (width, height) {
50113 this.setGraphics (this.jsgraphics = null);
50114 if (this.applet != null) this.applet.resize (width, height);
50115 }, "~N,~N");
50116 Clazz_overrideMethod (c$, "setStatusDragDropped", 
50117 function (mode, x, y, fileName) {
50118 return false;
50119 }, "~N,~N,~N,~S");
50120 Clazz_overrideMethod (c$, "startHoverWatcher", 
50121 function (enable) {
50122 }, "~B");
50123 Clazz_overrideMethod (c$, "paint", 
50124 function (g) {
50125 this.applet.paint (this.setGraphics (g));
50126 }, "java.awt.Graphics");
50127 Clazz_defineMethod (c$, "setGraphics", 
50128  function (g) {
50129 return (g == null ? this.getGraphics () : g);
50130 }, "java.awt.Graphics");
50131 Clazz_overrideMethod (c$, "getGraphics", 
50132 function () {
50133 if (this.jsgraphics == null) {
50134 this.jsgraphics =  new swingjs.JSGraphics2D (this.getCanvas ());
50135 this.jsgraphics.setWindowParameters (this.getWidth (), this.getHeight ());
50136 }return this.jsgraphics;
50137 });
50138 Clazz_defineMethod (c$, "showAppletStatus", 
50139  function (status) {
50140 this.getAppletContext ().showStatus (this.htmlName + " " + status);
50141 }, "~S");
50142 Clazz_defineMethod (c$, "showAppletException", 
50143  function (t) {
50144 {
50145 this.showAppletStatus("error " + (t.getMessage ?
50146 t.getMessage() : t)); t.printStackTrace &&
50147 t.printStackTrace();
50148 }this.repaint ();
50149 }, "Throwable");
50150 Clazz_defineMethod (c$, "run1", 
50151 function (mode) {
50152 var ok = false;
50153 switch (mode) {
50154 case 0:
50155 this.currentAppletSize.width = this.defaultAppletSize.width = this.getWidth ();
50156 this.currentAppletSize.height = this.defaultAppletSize.height = this.getHeight ();
50157 this.setLayout ( new java.awt.BorderLayout ());
50158 this.nextStatus = 1;
50159 ok = true;
50160 break;
50161 case 1:
50162 switch (this.nextStatus) {
50163 case 1:
50164 if (this.status != 0) {
50165 this.showAppletStatus ("notdisposed");
50166 this.status = 7;
50167 break;
50168 }System.out.println ("JSAppletPanel runloader");
50169 this.runLoader ();
50170 this.nextStatus = 2;
50171 ok = true;
50172 break;
50173 case 2:
50174 if (this.status != 1 && this.status != 5) {
50175 this.showAppletStatus ("notloaded");
50176 break;
50177 }System.out.println ("JSAppletPanel init");
50178 this.setFont ( new java.awt.Font ("Dialog", 0, 12));
50179 this.applet.resize (this.defaultAppletSize);
50180 this.applet.init ();
50181 this.validate ();
50182 this.status = 2;
50183 this.showAppletStatus ("initialized");
50184 this.nextStatus = 3;
50185 ok = true;
50186 break;
50187 case 3:
50188 if (this.status != 2 && this.status != 4) {
50189 this.showAppletStatus ("notstarted");
50190 this.status = 7;
50191 break;
50192 }this.applet.getRootPane ().addNotify ();
50193 System.out.println ("JSAppletPanel start" + this.currentAppletSize);
50194 this.applet.resize (this.currentAppletSize);
50195 this.applet.start ();
50196 this.status = 3;
50197 this.showAppletStatus ("started");
50198 this.nextStatus = 35;
50199 ok = true;
50200 break;
50201 case 35:
50202 swingjs.JSToolkit.readyCallback (this.appletName, this.fullName, this.applet, this);
50203 break;
50204 case 4:
50205 if (this.status == 3) {
50206 this.status = 4;
50207 this.applet.setVisible (false);
50208 this.applet.stop ();
50209 this.showAppletStatus ("stopped");
50210 } else {
50211 this.showAppletStatus ("notstopped");
50212 this.status = 7;
50213 }break;
50214 case 5:
50215 if (this.status == 4 || this.status == 2) {
50216 this.status = 5;
50217 this.applet.destroy ();
50218 this.showAppletStatus ("destroyed");
50219 } else {
50220 this.showAppletStatus ("notdestroyed");
50221 this.status = 7;
50222 }break;
50223 case 75:
50224 if (this.status == 5 || this.status == 1) {
50225 this.showAppletStatus ("notdisposed");
50226 this.status = 7;
50227 } else {
50228 this.status = 0;
50229 this.removeChild (this.applet);
50230 this.applet = null;
50231 this.showAppletStatus ("disposed");
50232 }break;
50233 case 6:
50234 break;
50235 default:
50236 System.out.println ("unrecognized JSAppletPanel status: " + this.nextStatus);
50237 break;
50238 }
50239 break;
50240 default:
50241 System.out.println ("unrecognized JSAppletThread mode: " + mode);
50242 break;
50243 }
50244 return (ok ? 1 : 2);
50245 }, "~N");
50246 Clazz_defineMethod (c$, "runLoader", 
50247  function () {
50248 this.dispatchAppletEvent (51235, null);
50249 this.status = 1;
50250 var code = this.getCode ();
50251 try {
50252 if (code == null) {
50253 System.err.println ("runloader.err-- \"code\" must be specified.");
50254 throw  new InstantiationException ("\"code\" must be specified.");
50255 }this.applet = swingjs.JSToolkit.getInstance (code);
50256 if (this.applet == null) {
50257 System.out.println (code + " could not be launched");
50258 this.status = 7;
50259 } else if (!(Clazz_instanceOf (this.applet, javax.swing.JApplet))) {
50260 System.out.println (code + " is not a JApplet!?");
50261 this.status = 7;
50262 }} catch (e$$) {
50263 if (Clazz_exceptionOf (e$$, InstantiationException)) {
50264 var e = e$$;
50265 {
50266 this.status = 7;
50267 this.showAppletException (e);
50268 return;
50269 }
50270 } else if (Clazz_exceptionOf (e$$, Exception)) {
50271 var e = e$$;
50272 {
50273 this.status = 7;
50274 this.showAppletException (e);
50275 return;
50276 }
50277 } else if (Clazz_exceptionOf (e$$, ThreadDeath)) {
50278 var e = e$$;
50279 {
50280 this.status = 7;
50281 this.showAppletStatus ("death");
50282 return;
50283 }
50284 } else if (Clazz_exceptionOf (e$$, Error)) {
50285 var e = e$$;
50286 {
50287 this.status = 7;
50288 this.showAppletException (e);
50289 return;
50290 }
50291 } else {
50292 throw e$$;
50293 }
50294 } finally {
50295 this.dispatchAppletEvent (51236, null);
50296 }
50297 if (this.applet != null) {
50298 this.applet.setStub (this);
50299 this.applet.setVisible (false);
50300 this.add ("Center", this.applet);
50301 this.applet.setDispatcher ();
50302 this.applet.addNotify ();
50303 this.showAppletStatus ("loaded");
50304 this.validate ();
50305 }});
50306 Clazz_defineMethod (c$, "getUI", 
50307 function () {
50308 return null;
50309 });
50310 Clazz_overrideMethod (c$, "repaintImpl", 
50311 function (tm, x, y, width, height) {
50312 if (this.applet.isVisible () && this.applet.getWidth () > 0 && this.applet.getHeight () > 0) {
50313 this.applet.getContentPane ().repaint (tm, x, y, width, height);
50314 }}, "~N,~N,~N,~N,~N");
50315 Clazz_defineStatics (c$,
50316 "APPLET_UNINITIALIZED", 0,
50317 "APPLET_LOAD", 1,
50318 "APPLET_INIT", 2,
50319 "APPLET_START", 3,
50320 "APPLET_READY", 35,
50321 "APPLET_STOP", 4,
50322 "APPLET_DESTROY", 5,
50323 "APPLET_QUIT", 6,
50324 "APPLET_ERROR", 7,
50325 "APPLET_DISPOSE", 75,
50326 "APPLET_RESIZE", 51234,
50327 "APPLET_LOADING", 51235,
50328 "APPLET_LOADING_COMPLETED", 51236);
50329 });
50330 Clazz_declarePackage ("swingjs");
50331 Clazz_load (["jssun.java2d.SunGraphics2D"], "swingjs.JSGraphics2D", ["java.util.HashMap", "java.awt.BasicStroke", "$.RenderingHints", "$.Toolkit", "java.awt.geom.AffineTransform", "swingjs.JSToolkit", "swingjs.api.HTML5CanvasContext2D"], function () {
50332 c$ = Clazz_decorateAsClass (function () {
50333 this.constrainX = 0;
50334 this.constrainY = 0;
50335 this.windowWidth = 0;
50336 this.windowHeight = 0;
50337 this.canvas = null;
50338 this.ctx = null;
50339 this.gc = null;
50340 this.paintState = 0;
50341 this.compositeState = -2147483648;
50342 this.strokeState = 0;
50343 this.$transformState = 0;
50344 this.clipState = 0;
50345 this.isShifted = false;
50346 this.font = null;
50347 this.inPath = false;
50348 Clazz_instantialize (this, arguments);
50349 }, swingjs, "JSGraphics2D", jssun.java2d.SunGraphics2D, Cloneable);
50350 Clazz_makeConstructor (c$, 
50351 function (canvas) {
50352 Clazz_superConstructor (this, swingjs.JSGraphics2D, []);
50353 this.hints =  new java.awt.RenderingHints ( new java.util.HashMap ());
50354 this.canvas = canvas;
50355 this.$transform =  new java.awt.geom.AffineTransform ();
50356 this.ctx = this.canvas.getContext ("2d");
50357 {
50358 this.gc = SwingJS;
50359 }}, "~O");
50360 Clazz_overrideMethod (c$, "getDeviceConfiguration", 
50361 function () {
50362 return this.gc;
50363 });
50364 Clazz_overrideMethod (c$, "drawLine", 
50365 function (x0, y0, x1, y1) {
50366 var inPath = this.inPath;
50367 if (!inPath) this.ctx.beginPath ();
50368 this.ctx.moveTo (x0, y0);
50369 this.ctx.lineTo (x1, y1);
50370 if (!inPath) this.ctx.stroke ();
50371 }, "~N,~N,~N,~N");
50372 Clazz_defineMethod (c$, "drawCircle", 
50373 function (x, y, diameter) {
50374 this.drawArc (x, y, diameter, diameter, 0, 360);
50375 }, "~N,~N,~N");
50376 Clazz_overrideMethod (c$, "fillArc", 
50377 function (x, y, width, height, startAngle, arcAngle) {
50378 this.doArc (x, y, width, height, startAngle, arcAngle, true);
50379 }, "~N,~N,~N,~N,~N,~N");
50380 Clazz_overrideMethod (c$, "drawArc", 
50381 function (x, y, width, height, startAngle, arcAngle) {
50382 this.doArc (x, y, width, height, startAngle, arcAngle, false);
50383 }, "~N,~N,~N,~N,~N,~N");
50384 Clazz_defineMethod (c$, "save", 
50385  function () {
50386 this.ctx.save ();
50387 });
50388 Clazz_defineMethod (c$, "restore", 
50389  function () {
50390 this.ctx.restore ();
50391 });
50392 Clazz_defineMethod (c$, "doArc", 
50393  function (x, y, width, height, startAngle, arcAngle, fill) {
50394 var isCircle = (arcAngle - startAngle == 360);
50395 this.save ();
50396 this.ctx.translate (x, y);
50397 this.ctx.scale (Clazz_doubleToInt (width / height), height);
50398 this.ctx.beginPath ();
50399 if (fill) {
50400 }this.ctx.arc (0.5, 0.5, 0.5, this.toRad (startAngle), this.toRad (arcAngle), false);
50401 if (isCircle) this.ctx.closePath ();
50402 this.ctx.stroke ();
50403 this.restore ();
50404 }, "~N,~N,~N,~N,~N,~N,~B");
50405 Clazz_defineMethod (c$, "toRad", 
50406  function (a) {
50407 return a * 3.141592653589793 / 180;
50408 }, "~N");
50409 Clazz_defineMethod (c$, "drawPolygon", 
50410 function (ayPoints, axPoints, nPoints) {
50411 this.doPoly (ayPoints, axPoints, nPoints, false);
50412 }, "~A,~A,~N");
50413 Clazz_defineMethod (c$, "doPoly", 
50414  function (axPoints, ayPoints, nPoints, doFill) {
50415 this.ctx.beginPath ();
50416 this.ctx.moveTo (axPoints[0], ayPoints[0]);
50417 for (var i = 1; i < nPoints; i++) this.ctx.lineTo (axPoints[i], ayPoints[i]);
50418
50419 if (doFill) this.ctx.fill ();
50420  else this.ctx.stroke ();
50421 }, "~A,~A,~N,~B");
50422 Clazz_overrideMethod (c$, "drawRect", 
50423 function (x, y, width, height) {
50424 this.ctx.beginPath ();
50425 this.ctx.rect (x, y, width, height);
50426 this.ctx.stroke ();
50427 }, "~N,~N,~N,~N");
50428 Clazz_defineMethod (c$, "drawString", 
50429 function (s, x, y) {
50430 this.ctx.fillText (s, x, y);
50431 }, "~S,~N,~N");
50432 Clazz_defineMethod (c$, "background", 
50433 function (bgcolor) {
50434 this.backgroundColor = bgcolor;
50435 if (bgcolor == null) {
50436 if (!this.isShifted) this.ctx.translate (-0.5, -0.5);
50437 this.isShifted = true;
50438 return;
50439 }this.ctx.clearRect (0, 0, this.windowWidth, this.windowHeight);
50440 this.setGraphicsColor (bgcolor);
50441 this.fillRect (0, 0, this.windowWidth, this.windowHeight);
50442 }, "java.awt.Color");
50443 Clazz_defineMethod (c$, "fillCircle", 
50444 function (x, y, diameter) {
50445 var r = diameter / 2;
50446 this.ctx.beginPath ();
50447 this.ctx.arc (x + r, y + r, r, 0, 6.283185307179586, false);
50448 this.ctx.fill ();
50449 }, "~N,~N,~N");
50450 Clazz_defineMethod (c$, "fillPolygon", 
50451 function (ayPoints, axPoints, nPoints) {
50452 this.doPoly (ayPoints, axPoints, nPoints, true);
50453 }, "~A,~A,~N");
50454 Clazz_overrideMethod (c$, "fillRect", 
50455 function (x, y, width, height) {
50456 this.ctx.fillRect (x, y, width, height);
50457 }, "~N,~N,~N,~N");
50458 Clazz_defineMethod (c$, "setGraphicsColor", 
50459 function (c) {
50460 var s = swingjs.JSToolkit.getCSSColor (c);
50461 {
50462 this.ctx.fillStyle = s; this.ctx.strokeStyle = s;
50463 }}, "java.awt.Color");
50464 Clazz_overrideMethod (c$, "setFont", 
50465 function (font) {
50466 this.font = font;
50467 var s = swingjs.JSToolkit.getCanvasFont (font);
50468 {
50469 this.ctx.font = s;
50470 }}, "java.awt.Font");
50471 Clazz_defineMethod (c$, "setStrokeBold", 
50472 function (tf) {
50473 this.setLineWidth (tf ? 2. : 1.);
50474 }, "~B");
50475 Clazz_defineMethod (c$, "setLineWidth", 
50476  function (d) {
50477 {
50478 this.ctx.lineWidth = d;
50479 }}, "~N");
50480 Clazz_defineMethod (c$, "setWindowParameters", 
50481 function (width, height) {
50482 this.windowWidth = width;
50483 this.windowHeight = height;
50484 }, "~N,~N");
50485 Clazz_defineMethod (c$, "canDoLineTo", 
50486 function () {
50487 return true;
50488 });
50489 Clazz_defineMethod (c$, "doStroke", 
50490 function (isBegin) {
50491 this.inPath = isBegin;
50492 if (isBegin) {
50493 this.ctx.beginPath ();
50494 } else {
50495 this.ctx.stroke ();
50496 }}, "~B");
50497 Clazz_defineMethod (c$, "lineTo", 
50498 function (x2, y2) {
50499 this.ctx.lineTo (x2, y2);
50500 }, "~N,~N");
50501 Clazz_overrideMethod (c$, "clip", 
50502 function (s) {
50503 this.doShape (s);
50504 this.ctx.clip ();
50505 }, "java.awt.Shape");
50506 Clazz_overrideMethod (c$, "draw", 
50507 function (s) {
50508 this.doShape (s);
50509 this.ctx.stroke ();
50510 }, "java.awt.Shape");
50511 Clazz_defineMethod (c$, "doShape", 
50512  function (s) {
50513 this.ctx.beginPath ();
50514 var pts =  Clazz_newDoubleArray (6, 0);
50515 var pi = s.getPathIterator (null);
50516 while (!pi.isDone ()) {
50517 switch (pi.currentSegment (pts)) {
50518 case 0:
50519 this.ctx.moveTo (pts[0], pts[1]);
50520 break;
50521 case 1:
50522 this.ctx.lineTo (pts[0], pts[1]);
50523 break;
50524 case 2:
50525 this.ctx.quadraticCurveTo (pts[0], pts[1], pts[2], pts[3]);
50526 break;
50527 case 3:
50528 this.ctx.bezeierCurveTo (pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
50529 break;
50530 case 4:
50531 this.ctx.closePath ();
50532 break;
50533 }
50534 pi.next ();
50535 }
50536 return pi.getWindingRule ();
50537 }, "java.awt.Shape");
50538 Clazz_overrideMethod (c$, "fill", 
50539 function (s) {
50540 if (this.doShape (s) == 0) {
50541 this.ctx.fill("evenodd");
50542 } else this.ctx.fill ();
50543 }, "java.awt.Shape");
50544 Clazz_defineMethod (c$, "drawImage", 
50545 function (img, x, y, observer) {
50546 if (img != null) {
50547 var imgNode = this.getImageNode (img);
50548 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, img.getWidth (observer), img.getHeight (observer));
50549 if (observer != null) this.observe (img, observer, imgNode != null);
50550 }return true;
50551 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
50552 Clazz_defineMethod (c$, "observe", 
50553  function (img, observer, isOK) {
50554 observer.imageUpdate (img, (isOK ? 0 : 192), -1, -1, -1, -1);
50555 }, "java.awt.Image,java.awt.image.ImageObserver,~B");
50556 Clazz_defineMethod (c$, "drawImage", 
50557 function (img, x, y, width, height, observer) {
50558 if (img != null) {
50559 var imgNode = this.getImageNode (img);
50560 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, width, height);
50561 if (observer != null) this.observe (img, observer, imgNode != null);
50562 }return true;
50563 }, "java.awt.Image,~N,~N,~N,~N,java.awt.image.ImageObserver");
50564 Clazz_defineMethod (c$, "drawImage", 
50565 function (img, x, y, bgcolor, observer) {
50566 swingjs.JSToolkit.notImplemented (null);
50567 return this.drawImage (img, x, y, null);
50568 }, "java.awt.Image,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50569 Clazz_defineMethod (c$, "drawImage", 
50570 function (img, x, y, width, height, bgcolor, observer) {
50571 swingjs.JSToolkit.notImplemented (null);
50572 return this.drawImage (img, x, y, width, height, null);
50573 }, "java.awt.Image,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50574 Clazz_defineMethod (c$, "drawImage", 
50575 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer) {
50576 if (img != null) {
50577 var imgNode = this.getImageNode (img);
50578 if (imgNode != null) swingjs.api.HTML5CanvasContext2D.stretchImage (this.ctx, imgNode, sx1, sy1, sx2 - sx1, sy2 - sy1, dx1, dy1, dx2 - dx1, dy2 - dy1);
50579 if (observer != null) this.observe (img, observer, imgNode != null);
50580 }return true;
50581 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.image.ImageObserver");
50582 Clazz_defineMethod (c$, "getImageNode", 
50583  function (img) {
50584 var imgNode = null;
50585 {
50586 imgNode = img._imgNode;
50587 }if (imgNode == null) imgNode = swingjs.JSToolkit.getCompositor ().createImageNode (img);
50588 return imgNode;
50589 }, "java.awt.Image");
50590 Clazz_defineMethod (c$, "drawImage", 
50591 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgcolor, observer) {
50592 swingjs.JSToolkit.notImplemented (null);
50593 return this.drawImage (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer);
50594 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50595 Clazz_defineMethod (c$, "drawImage", 
50596 function (img, xform, obs) {
50597 swingjs.JSToolkit.notImplemented (null);
50598 return false;
50599 }, "java.awt.Image,java.awt.geom.AffineTransform,java.awt.image.ImageObserver");
50600 Clazz_overrideMethod (c$, "drawRenderedImage", 
50601 function (img, xform) {
50602 swingjs.JSToolkit.notImplemented (null);
50603 }, "java.awt.image.RenderedImage,java.awt.geom.AffineTransform");
50604 Clazz_overrideMethod (c$, "drawRenderableImage", 
50605 function (img, xform) {
50606 swingjs.JSToolkit.notImplemented (null);
50607 }, "java.awt.image.renderable.RenderableImage,java.awt.geom.AffineTransform");
50608 Clazz_overrideMethod (c$, "hit", 
50609 function (rect, s, onStroke) {
50610 swingjs.JSToolkit.notImplemented (null);
50611 return false;
50612 }, "java.awt.Rectangle,java.awt.Shape,~B");
50613 Clazz_overrideMethod (c$, "setPaint", 
50614 function (paint) {
50615 swingjs.JSToolkit.notImplemented (null);
50616 }, "java.awt.Paint");
50617 Clazz_overrideMethod (c$, "setStroke", 
50618 function (s) {
50619 if (!(Clazz_instanceOf (s, java.awt.BasicStroke))) return;
50620 var b = s;
50621 var dash = b.getDashArray ();
50622 var idash =  Clazz_newIntArray (dash == null ? 0 : dash.length, 0);
50623 for (var i = idash.length; --i >= 0; ) idash[i] = Clazz_floatToInt (dash[i]);
50624
50625 this.ctx.setLineDash (idash);
50626 this.setLineWidth (b.getLineWidth ());
50627 var lineCap;
50628 var lineJoin;
50629 var miterLimit = -1;
50630 switch (b.getEndCap ()) {
50631 case 0:
50632 lineCap = "butt";
50633 break;
50634 case 2:
50635 lineCap = "square";
50636 break;
50637 case 1:
50638 default:
50639 lineCap = "round";
50640 }
50641 switch (b.getLineJoin ()) {
50642 case 2:
50643 lineJoin = "bevel";
50644 break;
50645 case 0:
50646 lineJoin = "miter";
50647 miterLimit = b.getMiterLimit ();
50648 break;
50649 case 1:
50650 lineJoin = "round";
50651 }
50652 {
50653 this.ctx.lineCap = lineCap; this.ctx.lineJoin = lineJoin; if
50654 (miterLimit >= 0) this.ctx.miterLimit = miterLimit;
50655 }}, "java.awt.Stroke");
50656 Clazz_overrideMethod (c$, "setRenderingHint", 
50657 function (hintKey, hintValue) {
50658 this.hints.put (hintKey, hintValue);
50659 }, "java.awt.RenderingHints.Key,~O");
50660 Clazz_overrideMethod (c$, "getRenderingHint", 
50661 function (hintKey) {
50662 return this.hints.get (hintKey);
50663 }, "java.awt.RenderingHints.Key");
50664 Clazz_overrideMethod (c$, "setRenderingHints", 
50665 function (hints) {
50666 this.hints =  new java.awt.RenderingHints (hints);
50667 }, "java.util.Map");
50668 Clazz_overrideMethod (c$, "addRenderingHints", 
50669 function (hints) {
50670 for (var e, $e = hints.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) this.hints.put (e.getKey (), e.getValue ());
50671
50672 }, "java.util.Map");
50673 Clazz_overrideMethod (c$, "getRenderingHints", 
50674 function () {
50675 return this.hints;
50676 });
50677 Clazz_defineMethod (c$, "translate", 
50678 function (x, y) {
50679 this.ctx.translate (x, y);
50680 }, "~N,~N");
50681 Clazz_overrideMethod (c$, "scale", 
50682 function (sx, sy) {
50683 this.ctx.scale (sx, sy);
50684 }, "~N,~N");
50685 Clazz_overrideMethod (c$, "setBackground", 
50686 function (color) {
50687 this.background (color);
50688 }, "java.awt.Color");
50689 Clazz_overrideMethod (c$, "getBackground", 
50690 function () {
50691 return this.backgroundColor;
50692 });
50693 Clazz_overrideMethod (c$, "createSwingJS", 
50694 function () {
50695 return this.clone ();
50696 });
50697 Clazz_overrideMethod (c$, "clone", 
50698 function () {
50699 this.save ();
50700 return this.clone0 ();
50701 });
50702 Clazz_overrideMethod (c$, "dispose", 
50703 function () {
50704 if (this.compositeState >= 0) this.setComposite (null);
50705 this.restore ();
50706 });
50707 Clazz_overrideMethod (c$, "getColor", 
50708 function () {
50709 return this.foregroundColor;
50710 });
50711 Clazz_overrideMethod (c$, "setColor", 
50712 function (c) {
50713 this.foregroundColor = c;
50714 this.setGraphicsColor (c);
50715 }, "java.awt.Color");
50716 Clazz_overrideMethod (c$, "getFont", 
50717 function () {
50718 return this.font;
50719 });
50720 Clazz_defineMethod (c$, "getFontMetrics", 
50721 function (f) {
50722 return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f);
50723 }, "java.awt.Font");
50724 Clazz_overrideMethod (c$, "clipRect", 
50725 function (x, y, width, height) {
50726 this.ctx.beginPath ();
50727 this.ctx.rect (x, y, width, height);
50728 this.ctx.clip ();
50729 }, "~N,~N,~N,~N");
50730 Clazz_defineMethod (c$, "setClip", 
50731 function (x, y, width, height) {
50732 {
50733 if (arguments.length == 1) { setClip1(x); return; }
50734 }this.ctx.beginPath ();
50735 this.ctx.rect (x, y, width, height);
50736 this.ctx.clip ();
50737 }, "~N,~N,~N,~N");
50738 Clazz_defineMethod (c$, "setClip1", 
50739 function (clip) {
50740 this.ctx.beginPath ();
50741 this.doShape (clip);
50742 this.ctx.clip ();
50743 }, "java.awt.Shape");
50744 Clazz_overrideMethod (c$, "clearRect", 
50745 function (x, y, width, height) {
50746 this.ctx.clearRect (x, y, width, height);
50747 }, "~N,~N,~N,~N");
50748 Clazz_overrideMethod (c$, "drawPolyline", 
50749 function (xPoints, yPoints, nPoints) {
50750 if (nPoints < 2) return;
50751 this.ctx.moveTo (xPoints[0], yPoints[0]);
50752 for (var i = 1; i < nPoints; i++) {
50753 this.ctx.lineTo (xPoints[i], yPoints[i]);
50754 }
50755 }, "~A,~A,~N");
50756 Clazz_overrideMethod (c$, "copyArea", 
50757 function (x, y, width, height, dx, dy) {
50758 swingjs.JSToolkit.notImplemented (null);
50759 }, "~N,~N,~N,~N,~N,~N");
50760 Clazz_overrideMethod (c$, "drawRoundRect", 
50761 function (x, y, width, height, arcWidth, arcHeight) {
50762 swingjs.JSToolkit.notImplemented (null);
50763 this.drawRect (x, y, width, height);
50764 }, "~N,~N,~N,~N,~N,~N");
50765 Clazz_overrideMethod (c$, "fillRoundRect", 
50766 function (x, y, width, height, arcWidth, arcHeight) {
50767 swingjs.JSToolkit.notImplemented (null);
50768 this.fillRect (x, y, width, height);
50769 }, "~N,~N,~N,~N,~N,~N");
50770 Clazz_overrideMethod (c$, "drawOval", 
50771 function (x, y, width, height) {
50772 swingjs.JSToolkit.notImplemented (null);
50773 }, "~N,~N,~N,~N");
50774 Clazz_overrideMethod (c$, "fillOval", 
50775 function (x, y, width, height) {
50776 swingjs.JSToolkit.notImplemented (null);
50777 }, "~N,~N,~N,~N");
50778 Clazz_overrideMethod (c$, "getClip", 
50779 function () {
50780 swingjs.JSToolkit.notImplemented (null);
50781 return null;
50782 });
50783 Clazz_overrideMethod (c$, "drawStringTrans", 
50784 function (str, x, y) {
50785 swingjs.JSToolkit.notImplemented (null);
50786 }, "~S,~N,~N");
50787 Clazz_defineMethod (c$, "drawString", 
50788 function (iterator, x, y) {
50789 swingjs.JSToolkit.notImplemented (null);
50790 }, "java.text.AttributedCharacterIterator,~N,~N");
50791 Clazz_overrideMethod (c$, "drawStringAttrTrans", 
50792 function (iterator, x, y) {
50793 swingjs.JSToolkit.notImplemented (null);
50794 }, "java.text.AttributedCharacterIterator,~N,~N");
50795 Clazz_overrideMethod (c$, "translateTrans", 
50796 function (tx, ty) {
50797 swingjs.JSToolkit.notImplemented (null);
50798 }, "~N,~N");
50799 Clazz_defineMethod (c$, "rotate", 
50800 function (theta) {
50801 swingjs.JSToolkit.notImplemented (null);
50802 }, "~N");
50803 Clazz_defineMethod (c$, "rotate", 
50804 function (theta, x, y) {
50805 swingjs.JSToolkit.notImplemented (null);
50806 }, "~N,~N,~N");
50807 Clazz_overrideMethod (c$, "shear", 
50808 function (shx, shy) {
50809 swingjs.JSToolkit.notImplemented (null);
50810 }, "~N,~N");
50811 Clazz_overrideMethod (c$, "transform", 
50812 function (xform) {
50813 swingjs.JSToolkit.notImplemented (null);
50814 }, "java.awt.geom.AffineTransform");
50815 Clazz_overrideMethod (c$, "setTransform", 
50816 function (Tx) {
50817 swingjs.JSToolkit.notImplemented (null);
50818 }, "java.awt.geom.AffineTransform");
50819 Clazz_overrideMethod (c$, "getTransform", 
50820 function () {
50821 swingjs.JSToolkit.notImplemented (null);
50822 return null;
50823 });
50824 Clazz_defineMethod (c$, "cloneTransform", 
50825 function () {
50826 swingjs.JSToolkit.notImplemented (null);
50827 return null;
50828 });
50829 Clazz_overrideMethod (c$, "getPaint", 
50830 function () {
50831 swingjs.JSToolkit.notImplemented (null);
50832 return null;
50833 });
50834 Clazz_overrideMethod (c$, "getStroke", 
50835 function () {
50836 swingjs.JSToolkit.notImplemented (null);
50837 return null;
50838 });
50839 Clazz_overrideMethod (c$, "getFontRenderContext", 
50840 function () {
50841 swingjs.JSToolkit.notImplemented (null);
50842 return null;
50843 });
50844 Clazz_overrideMethod (c$, "setPaintMode", 
50845 function () {
50846 swingjs.JSToolkit.notImplemented (null);
50847 });
50848 Clazz_overrideMethod (c$, "setXORMode", 
50849 function (c1) {
50850 swingjs.JSToolkit.notImplemented (null);
50851 }, "java.awt.Color");
50852 Clazz_defineMethod (c$, "getClipBounds", 
50853 function () {
50854 var r = null;
50855 {
50856 if (arguments.length == 1) r = arguments[0];
50857 }if (r != null) {
50858 var clipRect = this.getClipBoundsImpl ();
50859 if (clipRect != null) {
50860 r.x = clipRect.x;
50861 r.y = clipRect.y;
50862 r.width = clipRect.width;
50863 r.height = clipRect.height;
50864 }return r;
50865 }return this.getClipBoundsImpl ();
50866 });
50867 Clazz_defineMethod (c$, "getClipBoundsImpl", 
50868  function () {
50869 swingjs.JSToolkit.notImplemented (null);
50870 return null;
50871 });
50872 Clazz_overrideMethod (c$, "setComposite", 
50873 function (comp) {
50874 var newRule = 0;
50875 var isValid = (comp == null || (Clazz_instanceOf (comp, java.awt.AlphaComposite)) && (newRule = (comp).getRule ()) != this.compositeState);
50876 if (!isValid) return;
50877 if (swingjs.JSToolkit.setGraphicsCompositeAlpha (this, newRule)) this.compositeState = newRule;
50878 }, "java.awt.Composite");
50879 Clazz_defineMethod (c$, "drawImage", 
50880 function (img, op, x, y) {
50881 swingjs.JSToolkit.drawImageOp (this, img, op, x, y);
50882 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
50883 Clazz_defineMethod (c$, "setAlpha", 
50884 function (f) {
50885 {
50886 this.ctx.globalAlpha = f;
50887 }}, "~N");
50888 Clazz_defineStatics (c$,
50889 "saveLevel", 0);
50890 });
50891 Clazz_declarePackage ("swingjs");
50892 Clazz_load (["swingjs.JSThread"], "swingjs.JSAppletThread", ["javax.swing.SwingUtilities"], function () {
50893 c$ = Clazz_decorateAsClass (function () {
50894 this.ap = null;
50895 Clazz_instantialize (this, arguments);
50896 }, swingjs, "JSAppletThread", swingjs.JSThread);
50897 Clazz_makeConstructor (c$, 
50898 function (ap, group, name) {
50899 Clazz_superConstructor (this, swingjs.JSAppletThread, [group, name]);
50900 this.ap = ap;
50901 }, "swingjs.JSAppletPanel,ThreadGroup,~S");
50902 Clazz_overrideMethod (c$, "run1", 
50903 function (mode) {
50904 mode = this.ap.run1 (mode);
50905 if (mode != 2) this.dispatchAndReturn (null, mode);
50906 }, "~N");
50907 Clazz_overrideMethod (c$, "dispatchAndReturn", 
50908 function (r, mode) {
50909 var m = mode;
50910 javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("swingjs.JSAppletThread$1") ? 0 : swingjs.JSAppletThread.$JSAppletThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSAppletThread$1, this, Clazz_cloneFinals ("m", m))));
50911 }, "Runnable,~N");
50912 c$.$JSAppletThread$1$ = function () {
50913 Clazz_pu$h(self.c$);
50914 c$ = Clazz_declareAnonymous (swingjs, "JSAppletThread$1", null, Runnable);
50915 Clazz_overrideMethod (c$, "run", 
50916 function () {
50917 this.b$["swingjs.JSAppletThread"].run1 (this.f$.m);
50918 });
50919 c$ = Clazz_p0p ();
50920 };
50921 });
50922 Clazz_declarePackage ("swingjs");
50923 Clazz_load (null, "swingjs.JSMouse", ["JU.V3", "java.awt.Toolkit", "java.awt.event.MouseEvent"], function () {
50924 c$ = Clazz_decorateAsClass (function () {
50925 this.ap = null;
50926 this.isMouseDown = false;
50927 this.wheeling = false;
50928 this.xWhenPressed = 0;
50929 this.yWhenPressed = 0;
50930 this.modifiersWhenPressed10 = 0;
50931 Clazz_instantialize (this, arguments);
50932 }, swingjs, "JSMouse");
50933 Clazz_makeConstructor (c$, 
50934 function (ap) {
50935 this.ap = ap;
50936 }, "swingjs.JSAppletPanel");
50937 Clazz_defineMethod (c$, "processEvent", 
50938 function (id, x, y, modifiers, time) {
50939 if (id != -1) modifiers = swingjs.JSMouse.applyLeftMouse (modifiers);
50940 switch (id) {
50941 case -1:
50942 this.wheeled (time, x, modifiers);
50943 break;
50944 case 501:
50945 this.xWhenPressed = x;
50946 this.yWhenPressed = y;
50947 this.modifiersWhenPressed10 = modifiers;
50948 this.pressed (time, x, y, modifiers, false);
50949 break;
50950 case 506:
50951 this.dragged (time, x, y, modifiers);
50952 break;
50953 case 504:
50954 this.entry (time, x, y, false);
50955 break;
50956 case 505:
50957 this.entry (time, x, y, true);
50958 break;
50959 case 503:
50960 this.moved (time, x, y, modifiers);
50961 break;
50962 case 502:
50963 this.released (time, x, y, modifiers);
50964 if (x == this.xWhenPressed && y == this.yWhenPressed && modifiers == this.modifiersWhenPressed10) {
50965 this.clicked (time, x, y, modifiers, 1);
50966 }break;
50967 default:
50968 return false;
50969 }
50970 return true;
50971 }, "~N,~N,~N,~N,~N");
50972 Clazz_defineMethod (c$, "processTwoPointGesture", 
50973 function (touches) {
50974 if (touches[0].length < 2) return;
50975 var t1 = touches[0];
50976 var t2 = touches[1];
50977 var t1first = t1[0];
50978 var t1last = t1[t2.length - 1];
50979 var x1first = t1first[0];
50980 var x1last = t1last[0];
50981 var dx1 = x1last - x1first;
50982 var y1first = t1first[1];
50983 var y1last = t1last[1];
50984 var dy1 = y1last - y1first;
50985 var v1 = JU.V3.new3 (dx1, dy1, 0);
50986 var d1 = v1.length ();
50987 var t2first = t2[0];
50988 var t2last = t2[t2.length - 1];
50989 var x2first = t2first[0];
50990 var x2last = t2last[0];
50991 var dx2 = x2last - x2first;
50992 var y2first = t2first[1];
50993 var y2last = t2last[1];
50994 var dy2 = y2last - y2first;
50995 var v2 = JU.V3.new3 (dx2, dy2, 0);
50996 var d2 = v2.length ();
50997 if (d1 < 1 || d2 < 1) return;
50998 v1.normalize ();
50999 v2.normalize ();
51000 var cos12 = (v1.dot (v2));
51001 if (cos12 > 0.8) {
51002 var deltaX = Clazz_floatToInt (x1last - t1[t1.length - 2][0]);
51003 var deltaY = Clazz_floatToInt (y1last - t1[t1.length - 2][1]);
51004 this.translateXYBy (deltaX, deltaY);
51005 } else if (cos12 < -0.8) {
51006 v1 = JU.V3.new3 (x2first - x1first, y2first - y1first, 0);
51007 v2 = JU.V3.new3 (x2last - x1last, y2last - y1last, 0);
51008 var dx = v2.length () - v1.length ();
51009 this.wheeled (System.currentTimeMillis (), dx < 0 ? -1 : 1, 32);
51010 }}, "~A");
51011 Clazz_defineMethod (c$, "translateXYBy", 
51012  function (deltaX, deltaY) {
51013 }, "~N,~N");
51014 Clazz_defineMethod (c$, "mouseClicked", 
51015 function (e) {
51016 this.clicked (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.getClickCount ());
51017 }, "java.awt.event.MouseEvent");
51018 Clazz_defineMethod (c$, "mouseEntered", 
51019 function (e) {
51020 this.entry (e.getWhen (), e.getX (), e.getY (), false);
51021 }, "java.awt.event.MouseEvent");
51022 Clazz_defineMethod (c$, "mouseExited", 
51023 function (e) {
51024 this.entry (e.getWhen (), e.getX (), e.getY (), true);
51025 }, "java.awt.event.MouseEvent");
51026 Clazz_defineMethod (c$, "mousePressed", 
51027 function (e) {
51028 this.pressed (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.isPopupTrigger ());
51029 }, "java.awt.event.MouseEvent");
51030 Clazz_defineMethod (c$, "mouseReleased", 
51031 function (e) {
51032 this.released (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51033 }, "java.awt.event.MouseEvent");
51034 Clazz_defineMethod (c$, "mouseDragged", 
51035 function (e) {
51036 var modifiers = e.getModifiers ();
51037 if ((modifiers & 28) == 0) modifiers |= 16;
51038 this.dragged (e.getWhen (), e.getX (), e.getY (), modifiers);
51039 }, "java.awt.event.MouseEvent");
51040 Clazz_defineMethod (c$, "mouseMoved", 
51041 function (e) {
51042 this.moved (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51043 }, "java.awt.event.MouseEvent");
51044 Clazz_defineMethod (c$, "mouseWheelMoved", 
51045 function (e) {
51046 e.consume ();
51047 this.wheeled (e.getWhen (), e.getWheelRotation (), e.getModifiers ());
51048 }, "java.awt.event.MouseWheelEvent");
51049 Clazz_defineMethod (c$, "entry", 
51050  function (time, x, y, isExit) {
51051 this.wheeling = false;
51052 this.mouseEnterExit (time, x, y, isExit);
51053 }, "~N,~N,~N,~B");
51054 Clazz_defineMethod (c$, "clicked", 
51055  function (time, x, y, modifiers, clickCount) {
51056 this.mouseAction (500, time, x, y, 1, modifiers);
51057 }, "~N,~N,~N,~N,~N");
51058 Clazz_defineMethod (c$, "moved", 
51059  function (time, x, y, modifiers) {
51060 if (this.isMouseDown) this.mouseAction (506, time, x, y, 0, swingjs.JSMouse.applyLeftMouse (modifiers));
51061  else this.mouseAction (503, time, x, y, 0, modifiers);
51062 }, "~N,~N,~N,~N");
51063 Clazz_defineMethod (c$, "wheeled", 
51064  function (time, rotation, modifiers) {
51065 this.wheeling = true;
51066 this.mouseAction (507, time, 0, rotation, 0, modifiers & -29 | 32);
51067 }, "~N,~N,~N");
51068 Clazz_defineMethod (c$, "pressed", 
51069  function (time, x, y, modifiers, isPopupTrigger) {
51070 this.isMouseDown = true;
51071 this.wheeling = false;
51072 this.mouseAction (501, time, x, y, 0, modifiers);
51073 }, "~N,~N,~N,~N,~B");
51074 Clazz_defineMethod (c$, "released", 
51075  function (time, x, y, modifiers) {
51076 this.isMouseDown = false;
51077 this.wheeling = false;
51078 this.mouseAction (502, time, x, y, 0, modifiers);
51079 }, "~N,~N,~N,~N");
51080 Clazz_defineMethod (c$, "dragged", 
51081  function (time, x, y, modifiers) {
51082 if (this.wheeling) return;
51083 if ((modifiers & 20) == 20) modifiers = modifiers & -5 | 2;
51084 this.mouseAction (506, time, x, y, 0, modifiers);
51085 }, "~N,~N,~N,~N");
51086 c$.applyLeftMouse = Clazz_defineMethod (c$, "applyLeftMouse", 
51087  function (modifiers) {
51088 return ((modifiers & 28) == 0) ? (modifiers | 16) : modifiers;
51089 }, "~N");
51090 Clazz_defineMethod (c$, "getButton", 
51091  function (modifiers) {
51092 switch (modifiers & 28) {
51093 case 16:
51094 return 1;
51095 case 8:
51096 return 2;
51097 case 4:
51098 return 3;
51099 default:
51100 return 0;
51101 }
51102 }, "~N");
51103 Clazz_defineMethod (c$, "mouseEnterExit", 
51104  function (time, x, y, isExit) {
51105 }, "~N,~N,~N,~B");
51106 Clazz_defineMethod (c$, "mouseAction", 
51107  function (id, time, x, y, count, modifiers) {
51108 var popupTrigger = false;
51109 var button = this.getButton (modifiers);
51110 var source = this.ap.applet;
51111 var e =  new java.awt.event.MouseEvent (source, id, time, modifiers, x, y, x, y, count, popupTrigger, button);
51112 java.awt.Toolkit.getEventQueue ().postEvent (e);
51113 }, "~N,~N,~N,~N,~N,~N");
51114 Clazz_defineStatics (c$,
51115 "MOUSE_LEFT", 16,
51116 "MOUSE_MIDDLE", 8,
51117 "MOUSE_RIGHT", 4,
51118 "MOUSE_WHEEL", 32,
51119 "MAC_COMMAND", 20,
51120 "BUTTON_MASK", 28);
51121 });
51122 Clazz_declarePackage ("swingjs");
51123 Clazz_load (["java.awt.peer.LightweightPeer"], "swingjs.JSComponentPeer", ["javax.swing.JComponent"], function () {
51124 c$ = Clazz_decorateAsClass (function () {
51125 this.target = null;
51126 this.ui = null;
51127 Clazz_instantialize (this, arguments);
51128 }, swingjs, "JSComponentPeer", null, java.awt.peer.LightweightPeer);
51129 Clazz_makeConstructor (c$, 
51130 function (target) {
51131 this.target = target;
51132 this.ui = (Clazz_instanceOf (target, javax.swing.JComponent) ? (target).getUI () : null);
51133 }, "java.awt.Component");
51134 Clazz_overrideMethod (c$, "isObscured", 
51135 function () {
51136 return false;
51137 });
51138 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51139 function () {
51140 return false;
51141 });
51142 Clazz_overrideMethod (c$, "setVisible", 
51143 function (b) {
51144 }, "~B");
51145 Clazz_overrideMethod (c$, "setEnabled", 
51146 function (b) {
51147 }, "~B");
51148 Clazz_overrideMethod (c$, "paint", 
51149 function (g) {
51150 }, "java.awt.Graphics");
51151 Clazz_overrideMethod (c$, "repaint", 
51152 function (tm, x, y, width, height) {
51153 }, "~N,~N,~N,~N,~N");
51154 Clazz_overrideMethod (c$, "print", 
51155 function (g) {
51156 }, "java.awt.Graphics");
51157 Clazz_overrideMethod (c$, "setBounds", 
51158 function (x, y, width, height, op) {
51159 }, "~N,~N,~N,~N,~N");
51160 Clazz_overrideMethod (c$, "handleEvent", 
51161 function (e) {
51162 }, "java.awt.AWTEvent");
51163 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51164 function (e) {
51165 }, "java.awt.event.PaintEvent");
51166 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51167 function () {
51168 return null;
51169 });
51170 Clazz_overrideMethod (c$, "getPreferredSize", 
51171 function () {
51172 return null;
51173 });
51174 Clazz_overrideMethod (c$, "getMinimumSize", 
51175 function () {
51176 return null;
51177 });
51178 Clazz_overrideMethod (c$, "getColorModel", 
51179 function () {
51180 return null;
51181 });
51182 Clazz_overrideMethod (c$, "getToolkit", 
51183 function () {
51184 return null;
51185 });
51186 Clazz_overrideMethod (c$, "getGraphics", 
51187 function () {
51188 return null;
51189 });
51190 Clazz_overrideMethod (c$, "getFontMetrics", 
51191 function (font) {
51192 return null;
51193 }, "java.awt.Font");
51194 Clazz_overrideMethod (c$, "dispose", 
51195 function () {
51196 });
51197 Clazz_overrideMethod (c$, "setForeground", 
51198 function (c) {
51199 }, "java.awt.Color");
51200 Clazz_overrideMethod (c$, "setBackground", 
51201 function (c) {
51202 }, "java.awt.Color");
51203 Clazz_overrideMethod (c$, "setFont", 
51204 function (f) {
51205 }, "java.awt.Font");
51206 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51207 function () {
51208 });
51209 Clazz_overrideMethod (c$, "requestFocus", 
51210 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51211 return false;
51212 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51213 Clazz_overrideMethod (c$, "isFocusable", 
51214 function () {
51215 return false;
51216 });
51217 Clazz_defineMethod (c$, "createImage", 
51218 function (producer) {
51219 return null;
51220 }, "java.awt.image.ImageProducer");
51221 Clazz_defineMethod (c$, "createImage", 
51222 function (width, height) {
51223 return null;
51224 }, "~N,~N");
51225 Clazz_overrideMethod (c$, "createVolatileImage", 
51226 function (width, height) {
51227 return null;
51228 }, "~N,~N");
51229 Clazz_overrideMethod (c$, "prepareImage", 
51230 function (img, w, h, o) {
51231 return false;
51232 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51233 Clazz_overrideMethod (c$, "checkImage", 
51234 function (img, w, h, o) {
51235 return 0;
51236 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51237 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51238 function () {
51239 return null;
51240 });
51241 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51242 function () {
51243 return false;
51244 });
51245 Clazz_overrideMethod (c$, "getBackBuffer", 
51246 function () {
51247 return null;
51248 });
51249 Clazz_overrideMethod (c$, "destroyBuffers", 
51250 function () {
51251 });
51252 Clazz_overrideMethod (c$, "reparent", 
51253 function (newContainer) {
51254 }, "java.awt.peer.ContainerPeer");
51255 Clazz_overrideMethod (c$, "isReparentSupported", 
51256 function () {
51257 return false;
51258 });
51259 Clazz_overrideMethod (c$, "layout", 
51260 function () {
51261 });
51262 Clazz_overrideMethod (c$, "getBounds", 
51263 function () {
51264 return null;
51265 });
51266 });
51267 Clazz_declarePackage ("swingjs.plaf");
51268 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 () {
51269 c$ = Clazz_declareType (swingjs.plaf, "HTML5LookAndFeel", javax.swing.LookAndFeel);
51270 Clazz_overrideMethod (c$, "getDefaults", 
51271 function () {
51272 var table =  new javax.swing.UIDefaults (610, 0.75);
51273 this.initClassDefaults (table);
51274 this.initSystemColorDefaults (table);
51275 this.initComponentDefaults (table);
51276 return table;
51277 });
51278 Clazz_overrideMethod (c$, "initialize", 
51279 function () {
51280 });
51281 Clazz_defineMethod (c$, "installAWTEventListener", 
51282 function () {
51283 });
51284 Clazz_overrideMethod (c$, "uninitialize", 
51285 function () {
51286 });
51287 Clazz_defineMethod (c$, "initClassDefaults", 
51288 function (table) {
51289 var packageName = "swingjs.plaf.";
51290 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"]);
51291 table.putDefaults (uiDefaults);
51292 }, "javax.swing.UIDefaults");
51293 Clazz_defineMethod (c$, "initSystemColorDefaults", 
51294 function (table) {
51295 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"]);
51296 this.loadSystemColors (table, defaultSystemColors, this.isNativeLookAndFeel ());
51297 }, "javax.swing.UIDefaults");
51298 Clazz_defineMethod (c$, "loadSystemColors", 
51299 function (table, systemColors, useNative) {
51300 for (var i = 0; i < systemColors.length; i += 2) {
51301 var color = java.awt.Color.black;
51302 try {
51303 color = java.awt.Color.decode (systemColors[i + 1]);
51304 } catch (e) {
51305 if (Clazz_exceptionOf (e, NumberFormatException)) {
51306 e.printStackTrace ();
51307 } else {
51308 throw e;
51309 }
51310 }
51311 table.put (systemColors[i],  new javax.swing.plaf.ColorUIResource (color));
51312 }
51313 }, "javax.swing.UIDefaults,~A,~B");
51314 Clazz_defineMethod (c$, "initResourceBundle", 
51315  function (table) {
51316 }, "javax.swing.UIDefaults");
51317 Clazz_defineMethod (c$, "initComponentDefaults", 
51318 function (table) {
51319 this.initResourceBundle (table);
51320 var oneThousand =  new Long (1000);
51321 var twelve =  new Integer (12);
51322 var fontPlain =  new Integer (0);
51323 var serifPlain12 =  new javax.swing.plaf.FontUIResource ("Serif", 0, 12);
51324 var sansSerifPlain12 =  new javax.swing.plaf.FontUIResource ("SansSerif", 0, 12);
51325 var dialogPlain12 =  new javax.swing.plaf.FontUIResource ("Dialog", 0, 12);
51326 var monospacedPlain12 =  new javax.swing.plaf.FontUIResource ("Monospaced", 0, 12);
51327 var black =  new javax.swing.plaf.ColorUIResource (java.awt.Color.black);
51328 var white =  new javax.swing.plaf.ColorUIResource (java.awt.Color.white);
51329 var gray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.gray);
51330 var darkGray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.darkGray);
51331 var control = table.getColor ("control");
51332 var controlText = table.getColor ("controlText");
51333 var menu = table.getColor ("menu");
51334 var menuText = table.getColor ("menuText");
51335 var textText = table.getColor ("textText");
51336 var window = table.getColor ("window");
51337 var zeroInsets =  new javax.swing.plaf.InsetsUIResource (0, 0, 0, 0);
51338 var twoInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 2);
51339 var threeInsets =  new javax.swing.plaf.InsetsUIResource (3, 3, 3, 3);
51340 var listCellRendererActiveValue = ((Clazz_isClassDefined ("swingjs.plaf.HTML5LookAndFeel$1") ? 0 : swingjs.plaf.HTML5LookAndFeel.$HTML5LookAndFeel$1$ ()), Clazz_innerTypeInstance (swingjs.plaf.HTML5LookAndFeel$1, this, null));
51341 var zero =  new Integer (0);
51342 var tabbedPaneTabInsets =  new javax.swing.plaf.InsetsUIResource (0, 4, 1, 4);
51343 var tabbedPaneTabPadInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 1);
51344 var tabbedPaneTabAreaInsets =  new javax.swing.plaf.InsetsUIResource (3, 2, 0, 2);
51345 var tabbedPaneContentBorderInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 3, 3);
51346 var editorMargin = threeInsets;
51347 var four =  new Integer (4);
51348 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.background", menu, "MenuBar.foreground", menuText, "MenuItem.background", menu, "MenuItem.foreground", menuText, "MenuItem.margin", twoInsets, "RadioButtonMenuItem.background", menu, "RadioButtonMenuItem.foreground", menuText, "RadioButtonMenuItem.margin", twoInsets, "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.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]);
51349 table.putDefaults (defaults);
51350 }, "javax.swing.UIDefaults");
51351 Clazz_overrideMethod (c$, "getName", 
51352 function () {
51353 return "SwingJS";
51354 });
51355 Clazz_overrideMethod (c$, "getID", 
51356 function () {
51357 return "SwingJS";
51358 });
51359 Clazz_overrideMethod (c$, "getDescription", 
51360 function () {
51361 return "SwingJS L&F";
51362 });
51363 Clazz_overrideMethod (c$, "isNativeLookAndFeel", 
51364 function () {
51365 return true;
51366 });
51367 Clazz_overrideMethod (c$, "isSupportedLookAndFeel", 
51368 function () {
51369 return true;
51370 });
51371 c$.$HTML5LookAndFeel$1$ = function () {
51372 Clazz_pu$h(self.c$);
51373 c$ = Clazz_declareAnonymous (swingjs.plaf, "HTML5LookAndFeel$1", null, javax.swing.UIDefaults.ActiveValue);
51374 Clazz_overrideMethod (c$, "createValue", 
51375 function (table) {
51376 return  new javax.swing.DefaultListCellRenderer.UIResource ();
51377 }, "javax.swing.UIDefaults");
51378 c$ = Clazz_p0p ();
51379 };
51380 });
51381 Clazz_declarePackage ("swingjs.plaf");
51382 Clazz_load (["java.awt.peer.LightweightPeer", "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 () {
51383 c$ = Clazz_decorateAsClass (function () {
51384 this.id = null;
51385 this.c = null;
51386 this.outerNode = null;
51387 this.domNode = null;
51388 this.enableNode = null;
51389 this.textNode = null;
51390 this.valueNode = null;
51391 this.scrollNode = null;
51392 this.focusNode = null;
51393 this.components = null;
51394 this.num = 0;
51395 this.isTainted = true;
51396 this.x = 0;
51397 this.y = 0;
51398 this.preferredSize = null;
51399 this.isContainer = false;
51400 this.parent = null;
51401 this.currentText = null;
51402 this.scrollerNode = null;
51403 this.classID = null;
51404 this.document = null;
51405 this.body = null;
51406 this.needPreferred = false;
51407 Clazz_instantialize (this, arguments);
51408 }, swingjs.plaf, "JSComponentUI", javax.swing.plaf.ComponentUI, [java.awt.peer.LightweightPeer, swingjs.plaf.JSEventHandler]);
51409 Clazz_makeConstructor (c$, 
51410 function () {
51411 Clazz_superConstructor (this, swingjs.plaf.JSComponentUI, []);
51412 this.setDoc ();
51413 });
51414 Clazz_defineMethod (c$, "setDoc", 
51415 function () {
51416 {
51417 this.document = document;
51418 this.body = document.body;
51419 }});
51420 Clazz_overrideMethod (c$, "installUI", 
51421 function (c) {
51422 }, "javax.swing.JComponent");
51423 Clazz_overrideMethod (c$, "uninstallUI", 
51424 function (c) {
51425 this.uninstallJSUI ();
51426 }, "javax.swing.JComponent");
51427 Clazz_defineMethod (c$, "$", 
51428 function (node) {
51429 return swingjs.JSToolkit.getJQuery ().$ (node);
51430 }, "swingjs.api.DOMNode");
51431 Clazz_defineMethod (c$, "setTainted", 
51432 function () {
51433 this.isTainted = true;
51434 });
51435 Clazz_defineMethod (c$, "set", 
51436 function (target) {
51437 this.c = target;
51438 this.newID ();
51439 if (this.needPreferred) this.getPreferredSize (this.c);
51440 this.installJSUI ();
51441 return this;
51442 }, "javax.swing.JComponent");
51443 Clazz_defineMethod (c$, "newID", 
51444 function () {
51445 this.classID = this.c.getUIClassID ();
51446 if (this.id == null) {
51447 this.num = ++swingjs.plaf.JSComponentUI.incr;
51448 this.id = this.c.getHTMLName (this.classID) + "_" + this.num;
51449 }});
51450 Clazz_defineMethod (c$, "setCssFont", 
51451 function (obj, font) {
51452 if (font != null) {
51453 var istyle = font.getStyle ();
51454 var name = font.getFamily ();
51455 if (name === "Dialog") name = "Arial";
51456 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")]);
51457 }if (this.c.isBackgroundSet ()) this.setBackground (this.c.getBackground ());
51458 this.setForeground (this.c.getForeground ());
51459 return obj;
51460 }, "swingjs.api.DOMNode,java.awt.Font");
51461 Clazz_defineMethod (c$, "createDOMObject", 
51462 function (key, id, attr) {
51463 var obj = swingjs.api.DOMNode.createElement (key, id);
51464 for (var i = 0; i < attr.length; ) swingjs.api.DOMNode.setAttr (obj, attr[i++], attr[i++]);
51465
51466 if (!this.c.isEnabled ()) this.setEnabled (false);
51467 return obj;
51468 }, "~S,~S,~A");
51469 Clazz_defineMethod (c$, "bindMouse", 
51470 function (node) {
51471 swingjs.api.DOMNode.setAttr (node, "data-UI", this);
51472 }, "swingjs.api.DOMNode");
51473 Clazz_overrideMethod (c$, "handleJSEvent", 
51474 function (target, eventType, jQueryEvent) {
51475 return false;
51476 }, "~O,~N,~O");
51477 Clazz_defineMethod (c$, "wrap", 
51478 function (type, id, elements) {
51479 return this.append (this.createDOMObject (type, id + type, []), elements);
51480 }, "~S,~S,~A");
51481 Clazz_defineMethod (c$, "append", 
51482 function (obj, elements) {
51483 for (var i = 0; i < elements.length; i++) {
51484 obj.appendChild (elements[i]);
51485 }
51486 return obj;
51487 }, "swingjs.api.DOMNode,~A");
51488 Clazz_defineMethod (c$, "debugDump", 
51489 function (d) {
51490 System.out.println (swingjs.api.DOMNode.getAttr (d, "outerHTML"));
51491 }, "swingjs.api.DOMNode");
51492 c$.vCenter = Clazz_defineMethod (c$, "vCenter", 
51493 function (obj, offset) {
51494 swingjs.api.DOMNode.setStyles (obj, ["top", "50%", "transform", "translateY(" + offset + "%)"]);
51495 }, "swingjs.api.DOMNode,~N");
51496 Clazz_defineMethod (c$, "setHTMLSize", 
51497 function (obj, addCSS) {
51498 return this.setHTMLSize1 (obj, addCSS, true);
51499 }, "swingjs.api.DOMNode,~B");
51500 Clazz_defineMethod (c$, "setHTMLSize1", 
51501 function (node, addCSS, usePreferred) {
51502 if (node == null) return null;
51503 var h;
51504 var w;
51505 var w0 = null;
51506 var h0 = null;
51507 var parentNode = null;
51508 if (this.scrollerNode != null) {
51509 w = this.scrollerNode.c.getWidth ();
51510 h = this.scrollerNode.c.getHeight ();
51511 } else if (usePreferred && this.preferredSize != null) {
51512 w = this.preferredSize.width;
51513 h = this.preferredSize.height;
51514 } else {
51515 parentNode = swingjs.api.DOMNode.remove (node);
51516 {
51517 w0 = node.style.width;
51518 h0 = node.style.height;
51519 }swingjs.api.DOMNode.setStyles (node, ["position", null, "width", null, "height", null]);
51520 var div;
51521 if (swingjs.api.DOMNode.getAttr (node, "tagName") === "DIV") div = node;
51522  else div = this.wrap ("div", this.id + "_temp", [node]);
51523 swingjs.api.DOMNode.setStyles (div, ["position", "absolute"]);
51524 this.body.appendChild (div);
51525 w = Clazz_doubleToInt (Math.ceil (this.$ (div).width () + 0.5));
51526 h = Clazz_doubleToInt (Math.ceil (this.$ (div).height () + 0.5));
51527 this.body.removeChild (div);
51528 }var size = this.getCSSDimension (w, h);
51529 if (addCSS) {
51530 swingjs.api.DOMNode.setStyles (node, ["position", "absolute"]);
51531 swingjs.api.DOMNode.setSize (node, size.width, size.height);
51532 } else {
51533 swingjs.api.DOMNode.setStyles (node, ["position", null]);
51534 if (w0 != null) swingjs.api.DOMNode.setStyles (node, ["width", w0, "height", h0]);
51535 }if (parentNode != null) parentNode.appendChild (node);
51536 return size;
51537 }, "swingjs.api.DOMNode,~B,~B");
51538 Clazz_defineMethod (c$, "getCSSDimension", 
51539 function (w, h) {
51540 return  new java.awt.Dimension (w, h);
51541 }, "~N,~N");
51542 Clazz_defineMethod (c$, "setHTMLElement", 
51543 function () {
51544 if (!this.isTainted) return this.outerNode;
51545 var root = (this.isContainer ? this.c.getRootPane () : null);
51546 if (this.c === root) {
51547 this.isTainted = false;
51548 return this.outerNode;
51549 }this.domNode = this.getDOMObject ();
51550 if (this.outerNode == null) {
51551 this.outerNode = this.wrap ("div", this.id, [this.domNode]);
51552 if (root != null && root.getContentPane () === this.c) swingjs.JSToolkit.getHTML5Applet (this.c)._getContentLayer ().appendChild (this.outerNode);
51553 }swingjs.api.DOMNode.setStyles (this.outerNode, ["position", "absolute", "left", (this.x = this.c.getX ()) + "px", "top", (this.y = this.c.getY ()) + "px"]);
51554 if (this.isContainer) {
51555 System.out.println ("JSComponentUI container " + this.id + " " + this.c.getBounds ());
51556 swingjs.api.DOMNode.setSize (this.outerNode, this.c.getWidth (), this.c.getHeight ());
51557 var children = (this.components == null ? this.c.getComponents () : this.components);
51558 for (var i = children.length; --i >= 0; ) {
51559 var ui = ((children[i]).getUI ());
51560 if (ui == null) {
51561 continue;
51562 }if (ui.outerNode == null) ui.setHTMLElement ();
51563 if (ui.outerNode == null) {
51564 System.out.println ("JSCUI could not add " + ui.c.getName () + " to " + this.c.getName ());
51565 } else {
51566 this.outerNode.appendChild (ui.outerNode);
51567 }ui.parent = this;
51568 }
51569 }this.isTainted = false;
51570 return this.outerNode;
51571 });
51572 Clazz_defineMethod (c$, "getPreferredSize", 
51573 function (c) {
51574 var d = this.setHTMLSize (this.getDOMObject (), false);
51575 return d;
51576 }, "javax.swing.JComponent");
51577 Clazz_defineMethod (c$, "paint", 
51578 function (g, c) {
51579 if (c.isOpaque ()) {
51580 g.setColor (c.getBackground ());
51581 g.fillRect (0, 0, c.getWidth (), c.getHeight ());
51582 }}, "java.awt.Graphics,javax.swing.JComponent");
51583 Clazz_overrideMethod (c$, "update", 
51584 function (g, c) {
51585 var testing = false;
51586 if (testing) {
51587 g.setColor (java.awt.Color.red);
51588 g.drawRect (0, 0, c.getWidth (), c.getHeight ());
51589 System.out.println ("drawing " + c.getWidth () + " " + c.getHeight ());
51590 }this.setHTMLElement ();
51591 this.paint (g, c);
51592 }, "java.awt.Graphics,javax.swing.JComponent");
51593 Clazz_defineMethod (c$, "getMinimumSize", 
51594 function (c) {
51595 return this.getPreferredSize (c);
51596 }, "javax.swing.JComponent");
51597 Clazz_overrideMethod (c$, "getMaximumSize", 
51598 function (c) {
51599 return null;
51600 }, "javax.swing.JComponent");
51601 Clazz_overrideMethod (c$, "contains", 
51602 function (c, x, y) {
51603 return c.inside (x, y);
51604 }, "javax.swing.JComponent,~N,~N");
51605 c$.createUI = Clazz_overrideMethod (c$, "createUI", 
51606 function (c) {
51607 return null;
51608 }, "javax.swing.JComponent");
51609 Clazz_overrideMethod (c$, "getBaseline", 
51610 function (c, width, height) {
51611 if (c == null) {
51612 throw  new NullPointerException ("Component must be non-null");
51613 }if (width < 0 || height < 0) {
51614 throw  new IllegalArgumentException ("Width and height must be >= 0");
51615 }return -1;
51616 }, "javax.swing.JComponent,~N,~N");
51617 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
51618 function (c) {
51619 if (c == null) {
51620 throw  new NullPointerException ("Component must be non-null");
51621 }return java.awt.Component.BaselineResizeBehavior.OTHER;
51622 }, "javax.swing.JComponent");
51623 Clazz_defineMethod (c$, "getJSTextValue", 
51624 function () {
51625 return swingjs.api.DOMNode.getAttr (this.domNode, this.valueNode == null ? "innerHTML" : "value");
51626 });
51627 Clazz_defineMethod (c$, "notifyPropertyChanged", 
51628 function (prop) {
51629 var obj = null;
51630 var val = null;
51631 if (prop === "text") {
51632 val = (this.c).getText ();
51633 if (val.equals (this.currentText)) return;
51634 this.currentText = val;
51635 if (this.textNode != null) {
51636 prop = "innerHTML";
51637 obj = this.textNode;
51638 } else if (this.valueNode != null) {
51639 prop = "value";
51640 obj = this.valueNode;
51641 }} else if (prop === "preferredSize") {
51642 this.preferredSize = this.c.getPreferredSize ();
51643 this.getPreferredSize ();
51644 return;
51645 }if (obj == null) {
51646 System.out.println ("JSComponentUI: unrecognized prop: " + prop);
51647 } else {
51648 System.out.println ("JSComponentUI: setting " + this.id + " " + prop);
51649 this.setProp (obj, prop, val);
51650 }}, "~S");
51651 Clazz_defineMethod (c$, "setProp", 
51652 function (obj, prop, val) {
51653 return swingjs.api.DOMNode.setAttr (obj, prop, val);
51654 }, "swingjs.api.DOMNode,~S,~S");
51655 Clazz_overrideMethod (c$, "isObscured", 
51656 function () {
51657 swingjs.JSToolkit.notImplemented ("");
51658 return false;
51659 });
51660 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51661 function () {
51662 swingjs.JSToolkit.notImplemented ("");
51663 return false;
51664 });
51665 Clazz_overrideMethod (c$, "setVisible", 
51666 function (b) {
51667 swingjs.api.DOMNode.setStyles (this.outerNode, ["display", b ? "block" : "none"]);
51668 }, "~B");
51669 Clazz_overrideMethod (c$, "setEnabled", 
51670 function (b) {
51671 if (this.enableNode != null) swingjs.api.DOMNode.setAttr (this.enableNode, "disabled", (b ? null : "TRUE"));
51672 }, "~B");
51673 Clazz_defineMethod (c$, "paint", 
51674 function (g) {
51675 }, "java.awt.Graphics");
51676 Clazz_overrideMethod (c$, "repaint", 
51677 function (tm, x, y, width, height) {
51678 }, "~N,~N,~N,~N,~N");
51679 Clazz_overrideMethod (c$, "print", 
51680 function (g) {
51681 swingjs.JSToolkit.notImplemented ("");
51682 }, "java.awt.Graphics");
51683 Clazz_overrideMethod (c$, "setBounds", 
51684 function (x, y, width, height, op) {
51685 switch (op) {
51686 case 2:
51687 case 3:
51688 case 4:
51689 if (this.scrollerNode != null) {
51690 width = Math.min (width, this.scrollerNode.c.getWidth ());
51691 height = Math.min (height, this.scrollerNode.c.getHeight ());
51692 }System.out.println (this.id + " setBounds " + x + " " + y + " " + width + " " + height + " op=" + op);
51693 if (this.domNode != null) swingjs.api.DOMNode.setSize (this.domNode, width, height);
51694 break;
51695 }
51696 }, "~N,~N,~N,~N,~N");
51697 Clazz_overrideMethod (c$, "handleEvent", 
51698 function (e) {
51699 swingjs.JSToolkit.notImplemented ("");
51700 }, "java.awt.AWTEvent");
51701 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51702 function (e) {
51703 swingjs.JSToolkit.notImplemented ("");
51704 }, "java.awt.event.PaintEvent");
51705 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51706 function () {
51707 var offset = this.$ (this.outerNode).offset ();
51708 return  new java.awt.Point (offset.left, offset.top);
51709 });
51710 Clazz_defineMethod (c$, "getPreferredSize", 
51711 function () {
51712 return this.getPreferredSize (this.c);
51713 });
51714 Clazz_defineMethod (c$, "getMinimumSize", 
51715 function () {
51716 swingjs.JSToolkit.notImplemented ("");
51717 return this.getPreferredSize (this.c);
51718 });
51719 Clazz_overrideMethod (c$, "getColorModel", 
51720 function () {
51721 return java.awt.Toolkit.getDefaultToolkit ().getColorModel ();
51722 });
51723 Clazz_overrideMethod (c$, "getToolkit", 
51724 function () {
51725 return java.awt.Toolkit.getDefaultToolkit ();
51726 });
51727 Clazz_overrideMethod (c$, "getGraphics", 
51728 function () {
51729 return null;
51730 });
51731 Clazz_overrideMethod (c$, "getFontMetrics", 
51732 function (font) {
51733 return this.c.getFontMetrics (font);
51734 }, "java.awt.Font");
51735 Clazz_overrideMethod (c$, "dispose", 
51736 function () {
51737 swingjs.JSToolkit.notImplemented ("");
51738 });
51739 Clazz_overrideMethod (c$, "setForeground", 
51740 function (color) {
51741 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.black : color)]);
51742 }, "java.awt.Color");
51743 Clazz_overrideMethod (c$, "setBackground", 
51744 function (color) {
51745 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["background-color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.white : color)]);
51746 }, "java.awt.Color");
51747 Clazz_overrideMethod (c$, "setFont", 
51748 function (f) {
51749 if (this.domNode != null) this.setCssFont (this.domNode, f);
51750 }, "java.awt.Font");
51751 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51752 function () {
51753 swingjs.JSToolkit.notImplemented ("");
51754 });
51755 Clazz_overrideMethod (c$, "requestFocus", 
51756 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51757 if (this.focusNode == null) return false;
51758 this.$ (this.focusNode).focus ();
51759 if (this.textNode != null) this.$ (this.textNode).select ();
51760 return true;
51761 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51762 Clazz_overrideMethod (c$, "isFocusable", 
51763 function () {
51764 return (this.focusNode != null);
51765 });
51766 Clazz_defineMethod (c$, "createImage", 
51767 function (producer) {
51768 swingjs.JSToolkit.notImplemented ("");
51769 return null;
51770 }, "java.awt.image.ImageProducer");
51771 Clazz_defineMethod (c$, "createImage", 
51772 function (width, height) {
51773 swingjs.JSToolkit.notImplemented ("");
51774 return null;
51775 }, "~N,~N");
51776 Clazz_overrideMethod (c$, "createVolatileImage", 
51777 function (width, height) {
51778 swingjs.JSToolkit.notImplemented ("");
51779 return null;
51780 }, "~N,~N");
51781 Clazz_overrideMethod (c$, "prepareImage", 
51782 function (img, w, h, o) {
51783 swingjs.JSToolkit.notImplemented ("");
51784 return false;
51785 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51786 Clazz_overrideMethod (c$, "checkImage", 
51787 function (img, w, h, o) {
51788 swingjs.JSToolkit.notImplemented ("");
51789 return 0;
51790 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51791 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51792 function () {
51793 swingjs.JSToolkit.notImplemented ("");
51794 return null;
51795 });
51796 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51797 function () {
51798 swingjs.JSToolkit.notImplemented ("");
51799 return false;
51800 });
51801 Clazz_overrideMethod (c$, "getBackBuffer", 
51802 function () {
51803 swingjs.JSToolkit.notImplemented ("");
51804 return null;
51805 });
51806 Clazz_overrideMethod (c$, "destroyBuffers", 
51807 function () {
51808 swingjs.JSToolkit.notImplemented ("");
51809 });
51810 Clazz_overrideMethod (c$, "reparent", 
51811 function (newContainer) {
51812 swingjs.JSToolkit.notImplemented ("");
51813 }, "java.awt.peer.ContainerPeer");
51814 Clazz_overrideMethod (c$, "isReparentSupported", 
51815 function () {
51816 swingjs.JSToolkit.notImplemented ("");
51817 return false;
51818 });
51819 Clazz_overrideMethod (c$, "layout", 
51820 function () {
51821 swingjs.JSToolkit.notImplemented ("");
51822 });
51823 Clazz_overrideMethod (c$, "getBounds", 
51824 function () {
51825 swingjs.JSToolkit.notImplemented ("");
51826 return null;
51827 });
51828 Clazz_defineMethod (c$, "hasFocus", 
51829 function () {
51830 return this.focusNode != null && this.focusNode === swingjs.api.DOMNode.getAttr (this.document, "activeElement");
51831 });
51832 Clazz_defineMethod (c$, "notifyFocus", 
51833 function (focusGained) {
51834 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.FocusEvent (this.c, focusGained ? 1004 : 1005));
51835 }, "~B");
51836 Clazz_defineStatics (c$,
51837 "incr", 0);
51838 });
51839 Clazz_declarePackage ("swingjs.plaf");
51840 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSPanelUI", ["java.awt.Dimension", "javax.swing.LookAndFeel"], function () {
51841 c$ = Clazz_declareType (swingjs.plaf, "JSPanelUI", swingjs.plaf.JSComponentUI);
51842 Clazz_makeConstructor (c$, 
51843 function () {
51844 Clazz_superConstructor (this, swingjs.plaf.JSPanelUI, []);
51845 this.isContainer = true;
51846 this.setDoc ();
51847 });
51848 Clazz_overrideMethod (c$, "getDOMObject", 
51849 function () {
51850 if (this.domNode == null) this.domNode = this.createDOMObject ("label", this.id, []);
51851 return this.domNode;
51852 });
51853 Clazz_overrideMethod (c$, "setHTMLSize", 
51854 function (obj, addCSS) {
51855 return  new java.awt.Dimension (this.c.getWidth (), this.c.getHeight ());
51856 }, "swingjs.api.DOMNode,~B");
51857 Clazz_defineMethod (c$, "getPreferredSize", 
51858 function (c) {
51859 return null;
51860 }, "javax.swing.JComponent");
51861 Clazz_overrideMethod (c$, "installJSUI", 
51862 function () {
51863 javax.swing.LookAndFeel.installColorsAndFont (this.c, "Panel.background", "Panel.foreground", "Panel.font");
51864 });
51865 Clazz_overrideMethod (c$, "uninstallJSUI", 
51866 function () {
51867 });
51868 });
51869 Clazz_declarePackage ("swingjs.plaf");
51870 Clazz_load (["swingjs.plaf.JSToggleButtonUI"], "swingjs.plaf.JSRadioButtonUI", ["java.util.HashMap", "javax.swing.DefaultButtonModel", "swingjs.api.DOMNode"], function () {
51871 c$ = Clazz_decorateAsClass (function () {
51872 this.label = null;
51873 Clazz_instantialize (this, arguments);
51874 }, swingjs.plaf, "JSRadioButtonUI", swingjs.plaf.JSToggleButtonUI);
51875 Clazz_overrideMethod (c$, "getDOMObject", 
51876 function () {
51877 return this.getButtonObject ("radio");
51878 });
51879 Clazz_overrideMethod (c$, "getPropertyPrefix", 
51880 function () {
51881 return "RadioButton.";
51882 });
51883 Clazz_overrideMethod (c$, "setHTMLSize", 
51884 function (obj, addCSS) {
51885 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", null]);
51886 swingjs.api.DOMNode.setStyles (this.label, ["position", null]);
51887 var d = this.setHTMLSize1 (obj, addCSS, false);
51888 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
51889 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute"]);
51890 return d;
51891 }, "swingjs.api.DOMNode,~B");
51892 Clazz_defineMethod (c$, "getButtonObject", 
51893 function (myType) {
51894 var b = this.c;
51895 var isNew = false;
51896 var doAll = false;
51897 if (this.domNode == null) {
51898 doAll = true;
51899 if (swingjs.plaf.JSRadioButtonUI.groupNames == null) swingjs.plaf.JSRadioButtonUI.groupNames =  new java.util.HashMap ();
51900 var bg = null;
51901 var name = this.id;
51902 isNew = true;
51903 if (Clazz_instanceOf (b.getModel (), javax.swing.DefaultButtonModel)) {
51904 bg = (b.getModel ()).getGroup ();
51905 name = swingjs.plaf.JSRadioButtonUI.groupNames.get (bg);
51906 if (name == null) swingjs.plaf.JSRadioButtonUI.groupNames.put (bg, name = this.id);
51907  else isNew = false;
51908 }this.domBtn = this.enableNode = this.createDOMObject ("input", this.id, ["type", myType, "name", name]);
51909 this.label = this.textNode = this.createDOMObject ("label", this.id + "l", ["htmlFor", this.id]);
51910 }if (b.isSelected () || isNew) swingjs.api.DOMNode.setAttr (this.domBtn, "checked", "true");
51911 this.setCssFont (swingjs.api.DOMNode.setAttr (this.label, "innerHTML", (this.c).getText ()), this.c.getFont ());
51912 var drad = this.setHTMLSize1 (this.domBtn, false, false);
51913 this.setHTMLSize1 (this.label, false, false);
51914 var obj = this.wrap ("div", "", [this.domBtn, this.label]);
51915 var dobj = this.setHTMLSize1 (obj, true, true);
51916 swingjs.plaf.JSComponentUI.vCenter (this.domBtn, -75);
51917 swingjs.plaf.JSComponentUI.vCenter (this.label, -50);
51918 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute", "left", drad.width + "px"]);
51919 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
51920 if (doAll) {
51921 obj = this.wrap ("div", this.id + "_0", [this.domBtn, this.label]);
51922 swingjs.api.DOMNode.setStyles (obj, ["position", "absolute"]);
51923 } else {
51924 obj = this.domNode;
51925 obj.appendChild (this.domBtn);
51926 obj.appendChild (this.label);
51927 }return swingjs.api.DOMNode.setSize (obj, dobj.width, dobj.height);
51928 }, "~S");
51929 Clazz_defineStatics (c$,
51930 "groupNames", null);
51931 });
51932 Clazz_declarePackage ("swingjs.plaf");
51933 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSRootPaneUI", null, function () {
51934 c$ = Clazz_declareType (swingjs.plaf, "JSRootPaneUI", swingjs.plaf.JSComponentUI);
51935 Clazz_makeConstructor (c$, 
51936 function () {
51937 Clazz_superConstructor (this, swingjs.plaf.JSRootPaneUI, []);
51938 this.isContainer = true;
51939 this.setDoc ();
51940 });
51941 Clazz_overrideMethod (c$, "getDOMObject", 
51942 function () {
51943 return null;
51944 });
51945 Clazz_overrideMethod (c$, "installJSUI", 
51946 function () {
51947 });
51948 Clazz_overrideMethod (c$, "uninstallJSUI", 
51949 function () {
51950 });
51951 });
51952 Clazz_declarePackage ("swingjs.plaf");
51953 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 () {
51954 c$ = Clazz_decorateAsClass (function () {
51955 this.lastPressedTimestamp = -1;
51956 this.shouldDiscardRelease = false;
51957 this.btn = null;
51958 Clazz_instantialize (this, arguments);
51959 }, swingjs.plaf, "JSButtonListener", null, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener, java.beans.PropertyChangeListener]);
51960 c$.loadActionMap = Clazz_defineMethod (c$, "loadActionMap", 
51961 function (map) {
51962 map.put ( new swingjs.plaf.JSButtonListener.Actions ("pressed"));
51963 map.put ( new swingjs.plaf.JSButtonListener.Actions ("released"));
51964 }, "swingjs.plaf.LazyActionMap");
51965 Clazz_makeConstructor (c$, 
51966 function (b) {
51967 this.btn = b;
51968 }, "javax.swing.AbstractButton");
51969 Clazz_overrideMethod (c$, "propertyChange", 
51970 function (e) {
51971 var prop = e.getPropertyName ();
51972 if (prop === "mnemonic") {
51973 this.updateMnemonicBinding (e.getSource ());
51974 } else if (prop === "contentAreaFilled") {
51975 this.checkOpacity (e.getSource ());
51976 } else if (prop === "text" || "font" === prop || "foreground" === prop) {
51977 var b = e.getSource ();
51978 (b.getUI ()).notifyPropertyChanged (prop);
51979 }}, "java.beans.PropertyChangeEvent");
51980 Clazz_defineMethod (c$, "checkOpacity", 
51981 function (b) {
51982 b.setOpaque (b.isContentAreaFilled ());
51983 }, "javax.swing.AbstractButton");
51984 Clazz_defineMethod (c$, "installKeyboardActions", 
51985 function (c) {
51986 var b = c;
51987 this.updateMnemonicBinding (b);
51988 swingjs.plaf.LazyActionMap.installLazyActionMap (c, swingjs.plaf.JSButtonListener, "Button.actionMap");
51989 var km = this.getInputMap (0, c);
51990 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, km);
51991 }, "javax.swing.JComponent");
51992 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
51993 function (c) {
51994 javax.swing.SwingUtilities.replaceUIInputMap (c, 2, null);
51995 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, null);
51996 javax.swing.SwingUtilities.replaceUIActionMap (c, null);
51997 }, "javax.swing.JComponent");
51998 Clazz_defineMethod (c$, "getInputMap", 
51999 function (condition, c) {
52000 return null;
52001 }, "~N,javax.swing.JComponent");
52002 Clazz_defineMethod (c$, "updateMnemonicBinding", 
52003 function (b) {
52004 var m = b.getMnemonic ();
52005 if (m != 0) {
52006 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52007 if (map == null) {
52008 map =  new javax.swing.plaf.ComponentInputMapUIResource (b);
52009 javax.swing.SwingUtilities.replaceUIInputMap (b, 2, map);
52010 }map.clear ();
52011 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, false), "pressed");
52012 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, true), "released");
52013 map.put (javax.swing.KeyStroke.getKeyStroke (m, 0, true), "released");
52014 } else {
52015 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52016 if (map != null) {
52017 map.clear ();
52018 }}}, "javax.swing.AbstractButton");
52019 Clazz_overrideMethod (c$, "stateChanged", 
52020 function (e) {
52021 var b = e.getSource ();
52022 b.repaint ();
52023 }, "javax.swing.event.ChangeEvent");
52024 Clazz_overrideMethod (c$, "focusGained", 
52025 function (e) {
52026 }, "java.awt.event.FocusEvent");
52027 Clazz_overrideMethod (c$, "focusLost", 
52028 function (e) {
52029 var b = e.getSource ();
52030 var model = b.getModel ();
52031 model.setArmed (false);
52032 model.setPressed (false);
52033 }, "java.awt.event.FocusEvent");
52034 Clazz_overrideMethod (c$, "mouseMoved", 
52035 function (e) {
52036 }, "java.awt.event.MouseEvent");
52037 Clazz_overrideMethod (c$, "mouseDragged", 
52038 function (e) {
52039 }, "java.awt.event.MouseEvent");
52040 Clazz_overrideMethod (c$, "mouseClicked", 
52041 function (e) {
52042 }, "java.awt.event.MouseEvent");
52043 Clazz_overrideMethod (c$, "mousePressed", 
52044 function (e) {
52045 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52046 var b = e.getSource ();
52047 if (!b.contains (e.getX (), e.getY ())) return;
52048 (b.getUI ()).verifyButtonClick (false);
52049 var multiClickThreshhold = b.getMultiClickThreshhold ();
52050 var lastTime = this.lastPressedTimestamp;
52051 var currentTime = this.lastPressedTimestamp = e.getWhen ();
52052 if (lastTime != -1 && currentTime - lastTime < multiClickThreshhold) {
52053 this.shouldDiscardRelease = true;
52054 return;
52055 }var model = b.getModel ();
52056 if (!model.isEnabled ()) {
52057 return;
52058 }if (!model.isArmed ()) {
52059 model.setArmed (true);
52060 }model.setPressed (true);
52061 if (!b.hasFocus () && b.isRequestFocusEnabled ()) {
52062 b.requestFocus ();
52063 }}}, "java.awt.event.MouseEvent");
52064 Clazz_overrideMethod (c$, "mouseReleased", 
52065 function (e) {
52066 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52067 if (this.shouldDiscardRelease) {
52068 this.shouldDiscardRelease = false;
52069 return;
52070 }var b = e.getSource ();
52071 if (!(b.getUI ()).verifyButtonClick (true)) return;
52072 var model = b.getModel ();
52073 model.setPressed (false);
52074 model.setArmed (false);
52075 }}, "java.awt.event.MouseEvent");
52076 Clazz_overrideMethod (c$, "mouseEntered", 
52077 function (e) {
52078 var b = e.getSource ();
52079 var model = b.getModel ();
52080 if (b.isRolloverEnabled () && !javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52081 model.setRollover (true);
52082 }if (model.isPressed ()) model.setArmed (true);
52083 }, "java.awt.event.MouseEvent");
52084 Clazz_overrideMethod (c$, "mouseExited", 
52085 function (e) {
52086 var b = e.getSource ();
52087 var model = b.getModel ();
52088 if (b.isRolloverEnabled ()) {
52089 model.setRollover (false);
52090 }model.setArmed (false);
52091 }, "java.awt.event.MouseEvent");
52092 Clazz_pu$h(self.c$);
52093 c$ = Clazz_declareType (swingjs.plaf.JSButtonListener, "Actions", jssun.swing.UIAction);
52094 Clazz_overrideMethod (c$, "actionPerformed", 
52095 function (a) {
52096 var b = a.getSource ();
52097 var c = this.getName ();
52098 if (c === "pressed") {
52099 var d = b.getModel ();
52100 d.setArmed (true);
52101 d.setPressed (true);
52102 if (!b.hasFocus ()) {
52103 b.requestFocus ();
52104 }} else if (c === "released") {
52105 var d = b.getModel ();
52106 d.setPressed (false);
52107 d.setArmed (false);
52108 }}, "java.awt.event.ActionEvent");
52109 Clazz_defineMethod (c$, "isEnabled", 
52110 function (a) {
52111 if (a != null && (Clazz_instanceOf (a, javax.swing.AbstractButton)) && !(a).getModel ().isEnabled ()) {
52112 return false;
52113 } else {
52114 return true;
52115 }}, "~O");
52116 Clazz_defineStatics (c$,
52117 "PRESS", "pressed",
52118 "RELEASE", "released");
52119 c$ = Clazz_p0p ();
52120 });
52121 Clazz_declarePackage ("swingjs.plaf");
52122 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSButtonUI", ["javax.swing.LookAndFeel", "$.UIManager", "javax.swing.plaf.UIResource", "swingjs.api.DOMNode", "swingjs.plaf.JSButtonListener"], function () {
52123 c$ = Clazz_decorateAsClass (function () {
52124 this.domBtn = null;
52125 this.shiftOffset = 0;
52126 this.defaultTextShiftOffset = 0;
52127 Clazz_instantialize (this, arguments);
52128 }, swingjs.plaf, "JSButtonUI", swingjs.plaf.JSComponentUI);
52129 Clazz_overrideMethod (c$, "getDOMObject", 
52130 function () {
52131 if (this.domNode == null) this.domBtn = this.enableNode = this.valueNode = this.domNode = this.createDOMObject ("input", this.id, ["type", "button"]);
52132 this.setCssFont (swingjs.api.DOMNode.setAttr (this.domNode, "value", (this.c).getText ()), this.c.getFont ());
52133 return this.domNode;
52134 });
52135 Clazz_defineMethod (c$, "verifyButtonClick", 
52136 function (isRelease) {
52137 return true;
52138 }, "~B");
52139 Clazz_overrideMethod (c$, "installJSUI", 
52140 function () {
52141 this.installDefaults (this.c);
52142 this.installListeners (this.c);
52143 this.installKeyboardActions (this.c);
52144 });
52145 Clazz_overrideMethod (c$, "uninstallJSUI", 
52146 function () {
52147 this.uninstallKeyboardActions (this.c);
52148 this.uninstallListeners (this.c);
52149 });
52150 Clazz_defineMethod (c$, "installListeners", 
52151 function (b) {
52152 var listener =  new swingjs.plaf.JSButtonListener (b);
52153 if (listener != null) {
52154 b.addMouseListener (listener);
52155 b.addMouseMotionListener (listener);
52156 b.addFocusListener (listener);
52157 b.addPropertyChangeListener (listener);
52158 b.addChangeListener (listener);
52159 }}, "javax.swing.AbstractButton");
52160 Clazz_defineMethod (c$, "uninstallListeners", 
52161 function (b) {
52162 var listener = this.getButtonListener (b);
52163 if (listener != null) {
52164 b.removeMouseListener (listener);
52165 b.removeMouseMotionListener (listener);
52166 b.removeFocusListener (listener);
52167 b.removeChangeListener (listener);
52168 b.removePropertyChangeListener (listener);
52169 }}, "javax.swing.AbstractButton");
52170 Clazz_defineMethod (c$, "installKeyboardActions", 
52171 function (b) {
52172 var listener = this.getButtonListener (b);
52173 if (listener != null) {
52174 listener.installKeyboardActions (b);
52175 }}, "javax.swing.AbstractButton");
52176 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
52177 function (b) {
52178 var listener = this.getButtonListener (b);
52179 if (listener != null) {
52180 listener.uninstallKeyboardActions (b);
52181 }}, "javax.swing.AbstractButton");
52182 Clazz_defineMethod (c$, "getButtonListener", 
52183  function (b) {
52184 var listeners = b.getMouseMotionListeners ();
52185 if (listeners != null) {
52186 for (var counter = 0; counter < listeners.length; counter++) {
52187 if (Clazz_instanceOf (listeners[counter], swingjs.plaf.JSButtonListener)) {
52188 return listeners[counter];
52189 }}
52190 }return null;
52191 }, "javax.swing.AbstractButton");
52192 Clazz_defineMethod (c$, "getPropertyPrefix", 
52193 function () {
52194 return "Button.";
52195 });
52196 Clazz_defineMethod (c$, "installDefaults", 
52197 function (b) {
52198 var pp = this.getPropertyPrefix ();
52199 this.defaultTextShiftOffset = javax.swing.UIManager.getInt (pp + "textShiftOffset");
52200 if (b.getMargin () == null || (Clazz_instanceOf (b.getMargin (), javax.swing.plaf.UIResource))) {
52201 b.setMargin (javax.swing.UIManager.getInsets (pp + "margin"));
52202 }javax.swing.LookAndFeel.installColorsAndFont (b, pp + "background", pp + "foreground", pp + "font");
52203 javax.swing.LookAndFeel.installProperty (b, "iconTextGap",  new Integer (4));
52204 }, "javax.swing.AbstractButton");
52205 });
52206 Clazz_declarePackage ("swingjs.plaf");
52207 Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSToggleButtonUI", ["swingjs.api.DOMNode"], function () {
52208 c$ = Clazz_decorateAsClass (function () {
52209 this.isDomChecked = false;
52210 Clazz_instantialize (this, arguments);
52211 }, swingjs.plaf, "JSToggleButtonUI", swingjs.plaf.JSButtonUI);
52212 Clazz_overrideMethod (c$, "verifyButtonClick", 
52213 function (isRelease) {
52214 var checked = ((swingjs.api.DOMNode.getAttr (this.domBtn, "checked")).booleanValue () === true);
52215 if (isRelease && this.isDomChecked == checked) return false;
52216 this.isDomChecked = checked;
52217 return true;
52218 }, "~B");
52219 Clazz_overrideMethod (c$, "getPropertyPrefix", 
52220 function () {
52221 return "ToggleButton.";
52222 });
52223 });
52224 Clazz_declarePackage ("swingjs.plaf");
52225 Clazz_load (["javax.swing.plaf.ActionMapUIResource"], "swingjs.plaf.LazyActionMap", ["javax.swing.SwingUtilities", "$.UIManager"], function () {
52226 c$ = Clazz_decorateAsClass (function () {
52227 this._loader = null;
52228 Clazz_instantialize (this, arguments);
52229 }, swingjs.plaf, "LazyActionMap", javax.swing.plaf.ActionMapUIResource);
52230 c$.installLazyActionMap = Clazz_defineMethod (c$, "installLazyActionMap", 
52231 function (c, loaderClass, defaultsKey) {
52232 var map = javax.swing.UIManager.get (defaultsKey);
52233 if (map == null) {
52234 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52235 }javax.swing.SwingUtilities.replaceUIActionMap (c, map);
52236 }, "javax.swing.JComponent,Class,~S");
52237 c$.getActionMap = Clazz_defineMethod (c$, "getActionMap", 
52238 function (loaderClass, defaultsKey) {
52239 var map = javax.swing.UIManager.get (defaultsKey);
52240 if (map == null) {
52241 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52242 }return map;
52243 }, "Class,~S");
52244 Clazz_makeConstructor (c$, 
52245  function (loader) {
52246 Clazz_superConstructor (this, swingjs.plaf.LazyActionMap, []);
52247 this._loader = loader;
52248 }, "Class");
52249 Clazz_defineMethod (c$, "put", 
52250 function (action) {
52251 this.put (action.getValue ("Name"), action);
52252 }, "javax.swing.Action");
52253 Clazz_defineMethod (c$, "put", 
52254 function (key, action) {
52255 this.loadIfNecessary ();
52256 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "put", [key, action]);
52257 }, "~O,javax.swing.Action");
52258 Clazz_defineMethod (c$, "get", 
52259 function (key) {
52260 this.loadIfNecessary ();
52261 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "get", [key]);
52262 }, "~O");
52263 Clazz_defineMethod (c$, "remove", 
52264 function (key) {
52265 this.loadIfNecessary ();
52266 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "remove", [key]);
52267 }, "~O");
52268 Clazz_defineMethod (c$, "clear", 
52269 function () {
52270 this.loadIfNecessary ();
52271 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "clear", []);
52272 });
52273 Clazz_defineMethod (c$, "keys", 
52274 function () {
52275 this.loadIfNecessary ();
52276 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "keys", []);
52277 });
52278 Clazz_defineMethod (c$, "size", 
52279 function () {
52280 this.loadIfNecessary ();
52281 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "size", []);
52282 });
52283 Clazz_defineMethod (c$, "allKeys", 
52284 function () {
52285 this.loadIfNecessary ();
52286 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "allKeys", []);
52287 });
52288 Clazz_defineMethod (c$, "setParent", 
52289 function (map) {
52290 this.loadIfNecessary ();
52291 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "setParent", [map]);
52292 }, "javax.swing.ActionMap");
52293 Clazz_defineMethod (c$, "loadIfNecessary", 
52294  function () {
52295 if (this._loader != null) {
52296 {
52297 this._loader.loadActionMap(this);
52298 this._loader = null;
52299 }}});
52300 });