JAL-1807 update
[jalviewjs.git] / site / swingjs / js / coreswingjs.js
1 (function(Clazz
2 ,Clazz_getClassName
3 ,Clazz_newLongArray
4 ,Clazz_doubleToByte
5 ,Clazz_doubleToInt
6 ,Clazz_doubleToLong
7 ,Clazz_declarePackage
8 ,Clazz_instanceOf
9 ,Clazz_load
10 ,Clazz_instantialize
11 ,Clazz_decorateAsClass
12 ,Clazz_floatToInt
13 ,Clazz_floatToLong
14 ,Clazz_makeConstructor
15 ,Clazz_defineEnumConstant
16 ,Clazz_exceptionOf
17 ,Clazz_newIntArray
18 ,Clazz_defineStatics
19 ,Clazz_newFloatArray
20 ,Clazz_declareType
21 ,Clazz_prepareFields
22 ,Clazz_superConstructor
23 ,Clazz_newByteArray
24 ,Clazz_declareInterface
25 ,Clazz_p0p
26 ,Clazz_pu$h
27 ,Clazz_newShortArray
28 ,Clazz_innerTypeInstance
29 ,Clazz_isClassDefined
30 ,Clazz_prepareCallback
31 ,Clazz_newArray
32 ,Clazz_castNullAs
33 ,Clazz_floatToShort
34 ,Clazz_superCall
35 ,Clazz_decorateAsType
36 ,Clazz_newBooleanArray
37 ,Clazz_newCharArray
38 ,Clazz_implementOf
39 ,Clazz_newDoubleArray
40 ,Clazz_overrideConstructor
41 ,Clazz_clone
42 ,Clazz_doubleToShort
43 ,Clazz_getInheritedLevel
44 ,Clazz_getParamsType
45 ,Clazz_isAF
46 ,Clazz_isAI
47 ,Clazz_isAS
48 ,Clazz_isASS
49 ,Clazz_isAP
50 ,Clazz_isAFloat
51 ,Clazz_isAII
52 ,Clazz_isAFF
53 ,Clazz_isAFFF
54 ,Clazz_tryToSearchAndExecute
55 ,Clazz_getStackTrace
56 ,Clazz_inheritArgs
57 ,Clazz_alert
58 ,Clazz_defineMethod
59 ,Clazz_overrideMethod
60 ,Clazz_declareAnonymous
61 ,Clazz_checkPrivateMethod
62 ,Clazz_cloneFinals
63 ){
64 var $t$;
65 //var c$;
66 // JSmolJavaExt.js
67  
68
69 // This library will be wrapped by an additional anonymous function using ANT in 
70 // build_03_tojs.xml. This task will also modify variable names. References 
71 // to Clazz._ will not be changed, but other Clazz_xxx will be changed to 
72 // (local scope) Clazz_xxx, allowing them to be further compressed using
73 // Google Closure Compiler in that same ANT task.
74
75 // BH 5/31/2015 5:53:04 PM Number.compareTo added
76 // BH 5/21/2015 5:46:30 PM Number("0xFFFFFFFF") is not -1
77 // BH 4/23/2015 9:08:59 AM xx.getComponentType() is nonfunctional. Array.newInstance now defines a wrapper for .getClass().getComponentType() that works  
78 // BH 4/12/2015 1:37:44 PM adding Math.rint = Math.round
79 // BH 1/16/2015 10:09:38 AM Chrome failure jqGrig due to new String("x").toString() not being a simple string
80 // BH 8/14/2014 6:49:22 PM Character class efficiencies
81 // BH 7/24/2014 9:02:18 AM most browsers do not support String.codePointAt()
82 // BH 7/11/2014 4:17:22 PM fix for Boolean.valueOf("false") not being false 
83 // BH 5/27/2014 6:29:59 AM ensure floats and doubles have decimal point in toString
84 // BH 4/1/2014 12:23:41 PM Encoding moved to Clazz._Encoding; 
85 // BH 4/1/2014 7:51:46 AM removing java.lang.B00lean
86 // BH 3/7/2014 9:17:10 AM removing Array.toString; moving that code here from j2sJmol.js
87 // BH 1/30/2014 9:04:25 AM adding Throwable.getStackTrace() as a STRING
88 // BH 12/4/2013 9:20:44 PM fix for reassigning Date.prototype.toString()
89 // BH 12/3/2013 11:43:10 AM bizarre Safari bug in reassigning Boolean (OK, I admit, we shouldn't have done that...) 
90 // BH 12/1/2013 6:50:16 AM evit Number.prototype.toString assignment removed!
91 // BH 11/30/2013 1:46:31 PM fixing Byte, Short, Long, Integer, Float, Double to reflect proper bounds and error conditions
92 // BH 11/29/2013 8:58:49 PM removing Boolean.toString(boolean)
93 // BH 11/4/2013 7:34:26 AM changing "var nativeClazz" to "var nativeClass" to avoid ANT replacement of "nativeClazz_" to "nativeClazz_"
94 // BH 10/19/2013 1:29:27 PM fixed String.$replace()
95 // BH 10/18/2013 6:09:23 PM fixed (Double|Float).valueOf(NaN).valueOf(), which should return NaN, not throw an error
96 // BH 10/12/2013 11:18:44 AM fixed bug in Double(String) and Float(String) that was returning typeof "string"
97 // BH 10/10/2013 2:40:20 PM  added Math.log10   
98 // BH 7/23/2013 7:24:01 AM fixing Number.shortValue() and Number.byteValue() for negative values
99 // BH 6/16/2013 1:31:30 PM adding /| in String.replace -- thank you David Koes
100 // BH 3/13/2013 12:49:23 PM setting Boolean.valueOf() "@" 
101 // BH 3/2/2013 10:46:45 PM removed Double.valueOf(String)
102 // BH 11/6/2012 8:26:33 PM added instanceof Int32Array in String.instantialize
103 // BH 10/13/2012 11:38:07 PM corrected Integer.parseInt to allow only +-0123456789; created Integer.parseIntRadix
104 // BH 11/1/2012 added Short
105 // BH 9/10/2012 6:27:21 AM added java.net.URL... classes
106 // BH 1/7/2013 7:40:06 AM added Clazz_dateToString
107
108 ;(function(Clazz) {
109
110 // moved here from package.js
111 // these classes will be created as objects prior to any others
112 // and are then available immediately
113
114         Clazz._Loader.registerPackages("java", [ "io", "lang", "lang.reflect", "util" ]);
115
116   var sJU = "java.util";
117
118   //var sJU = "JU";  
119         //Clazz._Loader.registerPackages (sJU, ["regex", "zip"]);
120         //var javautil = JU;
121
122   var javautil = java.util;
123
124         Clazz._Loader.ignore([
125                 "net.sf.j2s.ajax.HttpRequest",
126                 sJU + ".MapEntry.Type",
127                 //"java.net.UnknownServiceException",
128                 "java.lang.Runtime",
129                 "java.security.AccessController",
130                 "java.security.PrivilegedExceptionAction",
131                 "java.io.File",
132                 "java.io.FileInputStream",
133                 "java.io.FileWriter",
134                 "java.io.OutputStreamWriter",
135 //              sJU + ".Calendar", // bypassed in ModelCollection
136 //              "java.text.SimpleDateFormat", // not used
137 //              "java.text.DateFormat", // not used
138                 sJU + ".concurrent.Executors"
139         ])
140
141 Math.rint = Math.round;
142
143 Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});
144
145 if(Clazz._supportsNativeObject){
146         // Number and Array are special -- do not override prototype.toString -- "length - 2" here
147         for(var i=0;i<Clazz._extendedObjectMethods.length - 2;i++){
148                 var p=Clazz._extendedObjectMethods[i];
149                 Array.prototype[p] = Clazz._O.prototype[p];
150                 Number.prototype[p] = Clazz._O.prototype[p];
151         }
152 }
153
154 java.lang.Number=Number;
155 Number.__CLASS_NAME__="Number";
156 Clazz_implementOf(Number,java.io.Serializable);
157 Number.equals=Clazz._innerFunctions.equals;
158 Number.getName=Clazz._innerFunctions.getName;
159 Number.prototype.compareTo = function(x) { var a = this.value, b = x.value; return (a < b ? -1 : a == b ? 0 : 1) };
160
161 Clazz_defineMethod(Number,"shortValue",
162 function(){
163 var x = Math.round(this)&0xffff;
164 return (this < 0 && x > 0 ? x - 0x10000 : x);
165 });
166
167 Clazz_defineMethod(Number,"byteValue",
168 function(){
169 var x = Math.round(this)&0xff;
170 return (this < 0 && x > 0 ? x - 0x100 : x);
171 });
172
173 Clazz_defineMethod(Number,"intValue",
174 function(){
175 return Math.round(this)&0xffffffff;
176 });
177
178 Clazz_defineMethod(Number,"longValue",
179 function(){
180 return Math.round(this);
181 });
182
183 Clazz_defineMethod(Number,"floatValue",
184 function(){
185 return this.valueOf();
186 });
187 Clazz_defineMethod(Number,"doubleValue",
188 function(){
189 return parseFloat(this.valueOf());
190 });
191
192 Clazz_overrideMethod(Number,"hashCode",
193 function(){
194 return this.valueOf();
195 });
196
197 java.lang.Integer=Integer=function(){
198 Clazz_instantialize(this,arguments);
199 };
200 Clazz_decorateAsType(Integer,"Integer",Number,Comparable,null,true);
201 Integer.prototype.valueOf=function(){return 0;};
202 Integer.toString=Integer.prototype.toString=function(){
203 if(arguments.length!=0){
204 return""+arguments[0];
205 } else if(this===Integer){
206 return"class java.lang.Integer";
207 }
208 return""+this.valueOf();
209 };
210
211 /*
212
213 Clazz_makeConstructor(Integer,
214 function(){
215 this.valueOf=function(){
216 return 0;
217 };
218 });
219 */
220
221
222 Clazz_overrideConstructor(Integer, function(v){
223  v == null && (v = 0);
224  if (typeof v != "number")
225         v = Integer.parseIntRadix(v, 10);
226  this.valueOf=function(){return v;};
227 }); //BH
228 /*
229 Clazz_makeConstructor(Integer,
230 function(s){
231 var value=Integer.parseInt(s,10);
232 this.valueOf=function(){
233 return value;
234 };
235 },"String");
236 */
237 Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-0x80000000;
238 Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=0x7fffffff;
239 Integer.TYPE=Integer.prototype.TYPE=Integer;
240
241
242 Clazz_defineMethod(Integer,"bitCount",
243 function(i) {
244         i = i - ((i >>> 1) & 0x55555555);
245         i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
246         i = (i + (i >>> 4)) & 0x0f0f0f0f;
247         i = i + (i >>> 8);
248         i = i + (i >>> 16);
249         return i & 0x3f;
250 },"Number");
251 Integer.bitCount=Integer.prototype.bitCount;
252
253 Clazz_defineMethod(Integer,"numberOfLeadingZeros",
254 function(i) {
255  if (i == 0) return 32;
256  var n = 1;
257  if (i >>> 16 == 0) { n += 16; i <<= 16; }
258  if (i >>> 24 == 0) { n +=  8; i <<=  8; }
259  if (i >>> 28 == 0) { n +=  4; i <<=  4; }
260  if (i >>> 30 == 0) { n +=  2; i <<=  2; }
261  n -= i >>> 31;
262  return n;
263 },"Number");
264 Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;
265
266 Clazz_defineMethod(Integer,"numberOfTrailingZeros",
267 function(i) {
268         if (i == 0) return 32;
269         var n = 31;
270         var y = i <<16; if (y != 0) { n = n -16; i = y; }
271         y = i << 8; if (y != 0) { n = n - 8; i = y; }
272         y = i << 4; if (y != 0) { n = n - 4; i = y; }
273         y = i << 2; if (y != 0) { n = n - 2; i = y; }
274         return n - ((i << 1) >>> 31);
275 },"Number");
276 Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;
277
278 Clazz_defineMethod(Integer,"parseIntRadix",
279 function(s,radix){
280 if(s==null){
281 throw new NumberFormatException("null");
282 }if(radix<2){
283 throw new NumberFormatException("radix "+radix+" less than Character.MIN_RADIX");
284 }if(radix>36){
285 throw new NumberFormatException("radix "+radix+" greater than Character.MAX_RADIX");
286 }
287 if (radix == 10) {
288         for (var i = s.length; --i >= 0;) {
289                 var c = s.charCodeAt(i);
290                 if (c >= 48 && c <= 57) continue;
291                 if (i > 0 || c != 43 && c != 45)
292                         throw new NumberFormatException("Not a Number : "+s);
293
294         }
295 }
296 var i=parseInt(s,radix);
297 if(isNaN(i)){
298 throw new NumberFormatException("Not a Number : "+s);
299 }
300 return i;
301 },"String, Number");
302 Integer.parseIntRadix=Integer.prototype.parseIntRadix;
303
304 Clazz_defineMethod(Integer,"parseInt",
305 function(s){
306 return Integer.parseIntRadix(s,10);
307 },"String");
308 Integer.parseInt=Integer.prototype.parseInt;
309
310 /*
311 Clazz_defineMethod(Integer,"$valueOf",
312 function(s){
313 return new Integer(Integer.parseIntRadix(s,10));
314 },"String");
315 */
316
317 Clazz_overrideMethod(Integer,"$valueOf",
318 function(s){
319 return new Integer(s);
320 });
321
322 /*
323 Clazz_defineMethod(Integer,"$valueOf",
324 function(s,r){
325 return new Integer(Integer.parseIntRadix(s,r));
326 },"String, Number");
327 */
328
329 Integer.$valueOf=Integer.prototype.$valueOf;
330
331
332 Clazz_overrideMethod(Integer,"equals",
333 function(s){
334 if(s==null||!Clazz_instanceOf(s,Integer)){
335 return false;
336 }
337 return s.valueOf()==this.valueOf();
338 },"Object");
339 Integer.toHexString=Integer.prototype.toHexString=function(d){
340 if(d.valueOf)d=d.valueOf();
341 if (d < 0) {
342 var b = d & 0xFFFFFF;
343 var c = ((d>>24)&0xFF);
344 return c._numberToString(16) + (b = "000000" + b._numberToString(16)).substring(b.length - 6);
345 }
346 return d._numberToString(16);};
347 Integer.toOctalString=Integer.prototype.toOctalString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(8);};
348 Integer.toBinaryString=Integer.prototype.toBinaryString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(2);};
349
350 Integer.decodeRaw=Clazz_defineMethod(Integer,"decodeRaw", function(n){
351 if (n.indexOf(".") >= 0)n = "";
352 var i = (n.startsWith("-") ? 1 : 0);
353 n = n.replace(/\#/, "0x").toLowerCase();
354 var radix=(n.startsWith("0x", i) ? 16 : n.startsWith("0", i) ? 8 : 10);
355 // The general problem with parseInt is that is not strict -- ParseInt("10whatever") == 10.
356 // Number is strict, but Number("055") does not work, though ParseInt("055", 8) does.
357 // need to make sure negative numbers are negative
358 n = Number(n) & 0xFFFFFFFF;
359 return (radix == 8 ? parseInt(n, 8) : n);
360 },"~S");
361
362 Integer.decode=Clazz_defineMethod(Integer,"decode", function(n){
363         n = Integer.decodeRaw(n);
364         if (isNaN(n) || n < Integer.MIN_VALUE|| n > Integer.MAX_VALUE)
365         throw new NumberFormatException("Invalid Integer");
366         return new Integer(n);
367 },"~S");
368
369 Clazz_overrideMethod(Integer,"hashCode",
370 function(){
371 return this.valueOf();
372 });
373
374 // Note that Long is problematic in JavaScript 
375
376 java.lang.Long=Long=function(){
377 Clazz_instantialize(this,arguments);
378 };
379 Clazz_decorateAsType(Long,"Long",Number,Comparable,null,true);
380 Long.prototype.valueOf=function(){return 0;};
381 Long.toString=Long.prototype.toString=function(){
382 if(arguments.length!=0){
383 return""+arguments[0];
384 }else if(this===Long){
385 return"class java.lang.Long";
386 }
387 return""+this.valueOf();
388 };
389
390 Clazz_overrideConstructor(Long, function(v){
391  v == null && (v = 0);
392  v = (typeof v == "number" ? Math.round(v) : Integer.parseIntRadix(v, 10));
393 this.valueOf=function(){return v;};
394 });
395
396 //Long.MIN_VALUE=Long.prototype.MIN_VALUE=-0x8000000000000000;
397 //Long.MAX_VALUE=Long.prototype.MAX_VALUE=0x7fffffffffffffff;
398 Long.TYPE=Long.prototype.TYPE=Long;
399
400 Clazz_defineMethod(Long,"parseLong",
401 function(s,radix){
402  return Integer.parseInt(s, radix || 10);
403 });
404
405 Long.parseLong=Long.prototype.parseLong;
406
407 Clazz_overrideMethod(Long,"$valueOf",
408 function(s){
409 return new Long(s);
410 });
411 /*
412 Clazz_defineMethod(Long,"$valueOf",
413 function(s){
414 return new Long(s);
415 },"Number");
416
417 Clazz_defineMethod(Long,"$valueOf",
418 function(s,r){
419 return new Long(Long.parseLong(s,r));
420 },"String, Number");
421 */
422 Long.$valueOf=Long.prototype.$valueOf;
423 Clazz_overrideMethod(Long,"equals",
424 function(s){
425 if(s==null||!Clazz_instanceOf(s,Long)){
426 return false;
427 }
428 return s.valueOf()==this.valueOf();
429 },"Object");
430 Long.toHexString=Long.prototype.toHexString=function(i){
431 return i.toString(16);
432 };
433 Long.toOctalString=Long.prototype.toOctalString=function(i){
434 return i.toString(8);
435 };
436 Long.toBinaryString=Long.prototype.toBinaryString=function(i){
437 return i.toString(2);
438 };
439
440
441 Long.decode=Clazz_defineMethod(Long,"decode",
442 function(n){
443         n = Integer.decodeRaw(n);
444         if (isNaN(n))
445                 throw new NumberFormatException("Invalid Long");
446         return new Long(n);
447 },"~S");
448
449 java.lang.Short = Short = function () {
450 Clazz_instantialize (this, arguments);
451 };
452 Clazz_decorateAsType (Short, "Short", Number, Comparable, null, true);
453 Short.prototype.valueOf = function () { return 0; };
454 Short.toString = Short.prototype.toString = function () {
455         if (arguments.length != 0) {
456                 return "" + arguments[0];
457         } else if (this === Short) {
458                 return "class java.lang.Short"; // Short.class.toString
459         }
460         return "" + this.valueOf ();
461 };
462
463 Clazz_overrideConstructor(Short,
464 function (v) {
465  v == null && (v = 0);
466  if (typeof v != "number")
467         v = Integer.parseIntRadix(v, 10);
468  v = v.shortValue();
469  this.valueOf = function () {return v;};
470 });
471
472
473 Short.MIN_VALUE = Short.prototype.MIN_VALUE = -32768;
474 Short.MAX_VALUE = Short.prototype.MAX_VALUE = 32767;
475 Short.TYPE = Short.prototype.TYPE = Short;
476
477 Clazz_defineMethod(Short, "parseShortRadix",
478 function (s, radix) {
479 return Integer.parseIntRadix(s, radix).shortValue();
480 }, "String, Number");
481 Short.parseShortRadix = Short.prototype.parseShortRadix;
482
483 Clazz_defineMethod(Short, "parseShort",
484 function (s) {
485 return Short.parseShortRadix (s, 10);
486 }, "String");
487
488 Short.parseShort = Short.prototype.parseShort;
489
490 /*
491 Clazz_defineMethod(Short, "$valueOf",
492 function (s) {
493 return new Short(Short.parseShort (s, 10));
494 }, "String");
495         */
496
497 Clazz_overrideMethod(Short, "$valueOf",
498 function (s) {
499 return new Short(s);
500 });
501
502 /*
503 Clazz_defineMethod(Short, "$valueOf",
504 function (s, r) {
505 return new Short(Short.parseShort (s, r));
506 }, "String, Number");
507         */
508
509 Short.$valueOf = Short.prototype.$valueOf;
510 Clazz_overrideMethod(Short, "equals",
511 function (s) {
512 if(s == null || !Clazz_instanceOf(s, Short) ){
513         return false;
514 }
515 return s.valueOf()  == this.valueOf();
516 }, "Object");
517 Short.toHexString = Short.prototype.toHexString = function (i) {
518         return i.toString (16);
519 };
520 Short.toOctalString = Short.prototype.toOctalString = function (i) {
521         return i.toString (8);
522 };
523 Short.toBinaryString = Short.prototype.toBinaryString = function (i) {
524         return i.toString (2);
525 };
526 Short.decode = Clazz_defineMethod(Short, "decode",
527 function(n){
528         n = Integer.decodeRaw(n);
529         if (isNaN(n) || n < -32768|| n > 32767)
530                 throw new NumberFormatException("Invalid Short");
531         return new Short(n);
532 }, "~S");
533
534 java.lang.Byte=Byte=function(){
535 Clazz_instantialize(this,arguments);
536 };
537 Clazz_decorateAsType(Byte,"Byte",Number,Comparable,null,true);
538 Byte.prototype.valueOf=function(){return 0;};
539 Byte.toString=Byte.prototype.toString=function(){
540 if(arguments.length!=0){
541 return""+arguments[0];
542 }else if(this===Byte){
543 return"class java.lang.Byte";
544 }
545 return""+this.valueOf();
546 };
547 Clazz_makeConstructor(Byte,
548 function(v){
549  if (typeof v != "number")
550          v = Integer.parseIntRadix(v, 10);
551  v = v.byteValue();
552 this.valueOf=function(){
553 return v;
554 };
555 });
556
557 Byte.serialVersionUID=Byte.prototype.serialVersionUID=-7183698231559129828;
558 Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128;
559 Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127;
560 Byte.SIZE=Byte.prototype.SIZE=8;
561 Byte.TYPE=Byte.prototype.TYPE=Byte;
562
563 Clazz_defineMethod(Byte,"parseByteRadix",
564 function(s,radix){
565  return Integer.parseIntRadix(s, radix).byteValue();
566 },"String, Number");
567 Byte.parseByteRadix=Byte.prototype.parseByteRadix;
568
569 Clazz_defineMethod(Byte,"parseByte",
570 function(s){
571 return Byte.parseByte(s,10);
572 },"String");
573
574 Byte.parseByte=Byte.prototype.parseByte;
575
576 Clazz_overrideMethod(Byte, "$valueOf",
577 function (s) {
578 return new Byte(s);
579 });
580
581 Byte.$valueOf=Byte.prototype.$valueOf;
582 Clazz_overrideMethod(Byte,"equals",
583 function(s){
584 if(s==null||!Clazz_instanceOf(s,Byte)){
585 return false;
586 }
587 return s.valueOf()==this.valueOf();
588 },"Object");
589 Byte.toHexString=Byte.prototype.toHexString=function(i){
590 return i.toString(16);
591 };
592 Byte.toOctalString=Byte.prototype.toOctalString=function(i){
593 return i.toString(8);
594 };
595 Byte.toBinaryString=Byte.prototype.toBinaryString=function(i){
596 return i.toString(2);
597 };
598 Byte.decode=Clazz_defineMethod(Byte,"decode",
599 function(n){
600         n = Integer.decodeRaw(n);
601         if (isNaN(n) || n < -128|| n > 127)
602                 throw new NumberFormatException("Invalid Byte");
603 return new Byte(n);
604 },"~S");
605
606 Clazz._floatToString = function(f) {
607  var s = ""+f
608  if (s.indexOf(".") < 0 && s.indexOf("e") < 0)
609          s += ".0";
610  return s;
611 }
612
613 java.lang.Float=Float=function(){
614 Clazz_instantialize(this,arguments);
615 };
616 Clazz_decorateAsType(Float,"Float",Number,Comparable,null,true);
617 Float.prototype.valueOf=function(){return 0;};
618 Float.toString=Float.prototype.toString=function(){
619 if(arguments.length!=0){
620 return Clazz._floatToString(arguments[0]);
621 }else if(this===Float){
622 return"class java.lang.Float";
623 }
624 return Clazz._floatToString(this.valueOf());
625 };
626
627 Clazz_overrideConstructor(Float, function(v){
628  v == null && (v = 0);
629  if (typeof v != "number") 
630         v = Number(v);
631  this.valueOf=function(){return v;}
632 });
633
634 Float.serialVersionUID=Float.prototype.serialVersionUID=-2671257302660747028;
635 Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235e+38;
636 Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4e-45;
637 Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;
638 Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;
639 Float.NaN=Number.NaN;
640 Float.TYPE=Float.prototype.TYPE=Float;
641
642 Clazz_defineMethod(Float,"parseFloat",
643 function(s){
644 if(s==null){
645 throw new NumberFormatException("null");
646 }
647 if (typeof s == "number")return s;  // important -- typeof NaN is "number" and is OK here
648 var floatVal=Number(s);
649 if(isNaN(floatVal)){
650 throw new NumberFormatException("Not a Number : "+s);
651 }
652 return floatVal;
653 },"String");
654 Float.parseFloat=Float.prototype.parseFloat;
655
656 Clazz_overrideMethod(Float,"$valueOf",
657 function(s){
658 return new Float(s);
659 });
660
661 Float.$valueOf=Float.prototype.$valueOf;
662
663 Clazz_defineMethod(Float,"isNaN",
664 function(num){
665 return isNaN(num);
666 },"Number");
667 Float.isNaN=Float.prototype.isNaN;
668 Clazz_defineMethod(Float,"isInfinite",
669 function(num){
670 return!isFinite(num);
671 },"Number");
672 Float.isInfinite=Float.prototype.isInfinite;
673
674 Clazz_overrideMethod(Float,"equals",
675 function(s){
676 if(s==null||!Clazz_instanceOf(s,Float)){
677 return false;
678 }
679 return s.valueOf()==this.valueOf();
680 },"Object");
681
682 java.lang.Double=Double=function(){
683 Clazz_instantialize(this,arguments);
684 };
685 Clazz_decorateAsType(Double,"Double",Number,Comparable,null,true);
686 Double.prototype.valueOf=function(){return 0;};
687 Double.toString=Double.prototype.toString=function(){
688 if(arguments.length!=0){
689 return Clazz._floatToString(arguments[0]);
690 }else if(this===Double){
691 return"class java.lang.Double";
692 }
693 return Clazz._floatToString(this.valueOf());
694 };
695
696 Clazz_overrideConstructor(Double, function(v){
697  v == null && (v = 0);
698  if (typeof v != "number") 
699         v = Double.parseDouble(v);
700  this.valueOf=function(){return v;};
701 }); // BH
702
703 Double.serialVersionUID=Double.prototype.serialVersionUID=-9172774392245257468;
704 Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9e-324;
705 Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157e+308;
706 Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;
707 Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;
708 Double.NaN=Number.NaN;
709 Double.TYPE=Double.prototype.TYPE=Double;
710
711 Clazz_defineMethod(Double,"isNaN",
712 function(num){
713 return isNaN(num);
714 },"Number");
715 Double.isNaN=Double.prototype.isNaN;
716 Clazz_defineMethod(Double,"isInfinite",
717 function(num){
718 return!isFinite(num);
719 },"Number");
720 Double.isInfinite=Double.prototype.isInfinite;
721
722 Clazz_defineMethod(Double,"parseDouble",
723 function(s){
724 if(s==null){
725 throw new NumberFormatException("null");
726 }
727 if (typeof s == "number")return s;  // important -- typeof NaN is "number" and is OK here
728 var doubleVal=Number(s);
729 if(isNaN(doubleVal)){
730 throw new NumberFormatException("Not a Number : "+s);
731 }
732 return doubleVal;
733 },"String");
734 Double.parseDouble=Double.prototype.parseDouble;
735
736 /*
737 Clazz_defineMethod(Double,"$valueOf",
738 function(s){
739 return new Double(this.parseDouble(s));
740 },"String");
741 */
742
743 Clazz_defineMethod(Double,"$valueOf",
744 function(v){
745 return new Double(v);
746 },"Number");
747
748 Double.$valueOf=Double.prototype.$valueOf;
749
750 Clazz_overrideMethod(Double,"equals",
751 function(s){
752 if(s==null||!Clazz_instanceOf(s,Double)){
753 return false;
754 }
755 return s.valueOf()==this.valueOf();
756 },"Object");
757
758
759 //java.lang.B00lean = Boolean; ?? BH why this?
760 Boolean = java.lang.Boolean = Boolean || function () {Clazz_instantialize (this, arguments);};
761 if (Clazz._supportsNativeObject) {
762         for (var i = 0; i < Clazz._extendedObjectMethods.length; i++) {
763                 var p = Clazz._extendedObjectMethods[i];
764                 Boolean.prototype[p] = Clazz._O.prototype[p];
765         }
766 }
767 Boolean.__CLASS_NAME__="Boolean";
768 Clazz_implementOf(Boolean,[java.io.Serializable,java.lang.Comparable]);
769 Boolean.equals=Clazz._innerFunctions.equals;
770 Boolean.getName=Clazz._innerFunctions.getName;
771 Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-3665804199014368530;
772
773 //Clazz_makeConstructor(Boolean,
774 //function(value){
775 //this.valueOf=function(){
776 //return value;
777 //};
778 //},"~B");
779
780 Clazz_overrideConstructor(Boolean,
781 function(s){
782         var b = ((typeof s == "string" ? Boolean.toBoolean(s) : s) ? true : false);
783         this.valueOf=function(){return b;};
784 },"~O");
785
786 Boolean.parseBoolean=Clazz_defineMethod(Boolean,"parseBoolean",
787 function(s){
788 return Boolean.toBoolean(s);
789 },"~S");
790 Clazz_defineMethod(Boolean,"booleanValue",
791 function(){
792 return this.valueOf();
793 });
794 Boolean.$valueOf=Clazz_overrideMethod(Boolean,"$valueOf",
795 function(b){
796 return((typeof b == "string"? "true".equalsIgnoreCase(b) : b)?Boolean.TRUE:Boolean.FALSE);
797 });
798
799 /*
800 Boolean.toString=Clazz_defineMethod(Boolean,"toString",
801 function(b){
802 return b?"true":"false";
803 },"~B");
804 */
805
806 Clazz_overrideMethod(Boolean,"toString",
807 function(){
808 return this.valueOf()?"true":"false";
809 });
810 Clazz_overrideMethod(Boolean,"hashCode",
811 function(){
812 return this.valueOf()?1231:1237;
813 });
814 Clazz_overrideMethod(Boolean,"equals",
815 function(obj){
816 if(Clazz_instanceOf(obj,Boolean)){
817 return this.booleanValue()==obj.booleanValue();
818 }return false;
819 },"~O");
820 Boolean.getBoolean=Clazz_defineMethod(Boolean,"getBoolean",
821 function(name){
822 var result=false;
823 try{
824 result=Boolean.toBoolean(System.getProperty(name));
825 }catch(e){
826 if(Clazz_instanceOf(e,IllegalArgumentException)){
827 }else if(Clazz_instanceOf(e,NullPointerException)){
828 }else{
829 throw e;
830 }
831 }
832 return result;
833 },"~S");
834 Clazz_overrideMethod(Boolean,"compareTo",
835 function(b){
836 return(b.value==this.value?0:(this.value?1:-1));
837 },"Boolean");
838 Boolean.toBoolean=Clazz_defineMethod(Boolean,"toBoolean",
839 ($fz=function(name){
840 return((name!=null)&&name.equalsIgnoreCase("true"));
841 },$fz.isPrivate=true,$fz),"~S");
842 Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(true);
843 Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(false);
844 Boolean.TYPE=Boolean.prototype.TYPE=Boolean;
845
846
847 Clazz._Encoding=new Object();
848
849 (function(Encoding) {
850
851 Encoding.UTF8="utf-8";
852 Encoding.UTF16="utf-16";
853 Encoding.ASCII="ascii";
854
855
856 Encoding.guessEncoding=function(str){
857 if(str.charCodeAt(0)==0xEF&&str.charCodeAt(1)==0xBB&&str.charCodeAt(2)==0xBF){
858 return Encoding.UTF8;
859 }else if(str.charCodeAt(0)==0xFF&&str.charCodeAt(1)==0xFE){
860 return Encoding.UTF16;
861 }else{
862 return Encoding.ASCII;
863 }
864 };
865
866 Encoding.readUTF8=function(str){
867 var encoding=this.guessEncoding(str);
868 var startIdx=0;
869 if(encoding==Encoding.UTF8){
870 startIdx=3;
871 }else if(encoding==Encoding.UTF16){
872 startIdx=2;
873 }
874 var arrs=new Array();
875 for(var i=startIdx;i<str.length;i++){
876 var charCode=str.charCodeAt(i);
877 if(charCode<0x80){
878 arrs[arrs.length]=str.charAt(i);
879 }else if(charCode>0xc0&&charCode<0xe0){
880 var c1=charCode&0x1f;
881 i++;
882 var c2=str.charCodeAt(i)&0x3f;
883 var c=(c1<<6)+c2;
884 arrs[arrs.length]=String.fromCharCode(c);
885 }else if(charCode>=0xe0){
886 var c1=charCode&0x0f;
887 i++;
888 var c2=str.charCodeAt(i)&0x3f;
889 i++;
890 var c3=str.charCodeAt(i)&0x3f;
891 var c=(c1<<12)+(c2<<6)+c3;
892 arrs[arrs.length]=String.fromCharCode(c);
893 }
894 }
895 return arrs.join('');
896 };
897
898 Encoding.convert2UTF8=function(str){
899 var encoding=this.guessEncoding(str);
900 var startIdx=0;
901 if(encoding==Encoding.UTF8){
902 return str;
903 }else if(encoding==Encoding.UTF16){
904 startIdx=2;
905 }
906
907 var offset=0;
908 var arrs=new Array(offset+str.length-startIdx);
909
910 for(var i=startIdx;i<str.length;i++){
911 var charCode=str.charCodeAt(i);
912 if(charCode<0x80){
913 arrs[offset+i-startIdx]=str.charAt(i);
914 }else if(charCode<=0x07ff){
915 var c1=0xc0+((charCode&0x07c0)>>6);
916 var c2=0x80+(charCode&0x003f);
917 arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2);
918 }else{
919 var c1=0xe0+((charCode&0xf000)>>12);
920 var c2=0x80+((charCode&0x0fc0)>>6);
921 var c3=0x80+(charCode&0x003f);
922 arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2)+String.fromCharCode(c3);
923 }
924 }
925 return arrs.join('');
926 };
927 Encoding.base64Chars=new Array(
928 'A','B','C','D','E','F','G','H',
929 'I','J','K','L','M','N','O','P',
930 'Q','R','S','T','U','V','W','X',
931 'Y','Z','a','b','c','d','e','f',
932 'g','h','i','j','k','l','m','n',
933 'o','p','q','r','s','t','u','v',
934 'w','x','y','z','0','1','2','3',
935 '4','5','6','7','8','9','+','/'
936 );
937 Encoding.encodeBase64=function(str){
938 if(str==null||str.length==0)return str;
939 var b64=Encoding.base64Chars;
940 var length=str.length;
941 var index=0;
942 var buf=[];
943 var c0,c1,c2;
944 while(index<length){
945 c0=str.charCodeAt(index++);
946 buf[buf.length]=b64[c0>>2];
947 if(index<length){
948 c1=str.charCodeAt(index++);
949 buf[buf.length]=b64[((c0<<4)&0x30)|(c1>>4)];
950 if(index<length){
951 c2=str.charCodeAt(index++);
952 buf[buf.length]=b64[((c1<<2)&0x3c)|(c2>>6)];
953 buf[buf.length]=b64[c2&0x3F];
954 }else{
955 buf[buf.length]=b64[((c1<<2)&0x3c)];
956 buf[buf.length]='=';
957 }
958 }else{
959 buf[buf.length]=b64[(c0<<4)&0x30];
960 buf[buf.length]='=';
961 buf[buf.length]='=';
962 }
963 }
964 return buf.join('');
965 };
966 Encoding.decodeBase64=function(str){
967 if(str==null||str.length==0)return str;
968 var b64=Encoding.base64Chars;
969 var xb64=Encoding.xBase64Chars;
970 if(Encoding.xBase64Chars==null){
971 xb64=new Object();
972 for(var i=0;i<b64.length;i++){
973 xb64[b64[i]]=i;
974 }
975 Encoding.xBase64Chars=xb64;
976 }
977 var length=str.length;
978 var index=0;
979 var buf=[];
980 var c0,c1,c2,c3;
981 var c=0;
982 while(index<length&&c++<60000){
983 c0=xb64[str.charAt(index++)];
984 c1=xb64[str.charAt(index++)];
985 c2=xb64[str.charAt(index++)];
986 c3=xb64[str.charAt(index++)];
987 buf[buf.length]=String.fromCharCode(((c0<<2)&0xff)|c1>>4);
988 if(c2!=null){
989 buf[buf.length]=String.fromCharCode(((c1<<4)&0xff)|c2>>2);
990 if(c3!=null){
991 buf[buf.length]=String.fromCharCode(((c2<<6)&0xff)|c3);
992 }
993 }
994 }
995 return buf.join('');
996 };
997
998 if(String.prototype.$replace==null){
999 java.lang.String=String;
1000 if(Clazz._supportsNativeObject){
1001 for(var i=0;i<Clazz._extendedObjectMethods.length;i++){
1002 var p=Clazz._extendedObjectMethods[i];
1003 if("to$tring"==p||"toString"==p||"equals"==p||"hashCode"==p){
1004 continue;
1005 }
1006 String.prototype[p]=Clazz._O.prototype[p];
1007 }
1008 }
1009
1010 Clazz_implementOf(String,[java.io.Serializable,CharSequence,Comparable]);
1011
1012 String.getName=Clazz._innerFunctions.getName;
1013
1014 String.serialVersionUID=String.prototype.serialVersionUID=-6849794470754667710;
1015
1016
1017 ;(function(sp) {
1018
1019 sp.$replace=function(c1,c2){
1020         if (c1 == c2 || this.indexOf (c1) < 0) return "" + this;
1021         if (c1.length == 1) {
1022                 if ("\\$.*+|?^{}()[]".indexOf(c1) >= 0)         c1 = "\\" + c1;
1023         } else {    
1024                 c1=c1.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function($0,$1){return"\\"+$1;});
1025         }
1026         return this.replace(new RegExp(c1,"gm"),c2);
1027 };
1028 sp.$generateExpFunction=function(str){
1029 var arr=[];
1030 var orders=[];
1031 var idx=0;
1032 arr[0]="";
1033 var i=0;
1034 for(;i<str.length;i++){
1035 var ch=str.charAt(i);
1036 if(i!=str.length-1&&ch=='\\'){
1037 i++;
1038 var c=str.charAt(i);
1039 if(c=='\\'){
1040 arr[idx]+='\\';
1041 }
1042 arr[idx]+=c;
1043 }else if(i!=str.length-1&&ch=='$'){
1044 i++;
1045 orders[idx]=parseInt(str.charAt(i));
1046 idx++;
1047 arr[idx]="";
1048 }else if(ch=='\r'){
1049 arr[idx]+="\\r";
1050 }else if(ch=='\n'){
1051 arr[idx]+="\\n";
1052 }else if(ch=='\t'){
1053 arr[idx]+="\\t";
1054 }else if(ch=='\"'){
1055 arr[idx]+="\\\"";
1056 }else{
1057 arr[idx]+=ch;
1058 }
1059 }
1060 var funStr="f = function (";
1061 var max=Math.max.apply({},orders);
1062 for(i=0;i<=max;i++){
1063 funStr+="$"+i;
1064 if(i!=max){
1065 funStr+=", ";
1066 }
1067 }
1068 funStr+=") { return ";
1069 for(i=0;i<arr.length-1;i++){
1070 funStr+="\""+arr[i]+"\" + $"+orders[i]+" + ";
1071 }
1072 funStr+="\""+arr[i]+"\"; }";
1073 var f=null;
1074 eval(funStr)
1075 return f;
1076 };
1077
1078 sp.replaceAll=function(exp,str){
1079 var regExp=new RegExp(exp,"gm");
1080 return this.replace(regExp,this.$generateExpFunction(str));
1081 };
1082 sp.replaceFirst=function(exp,str){
1083 var regExp=new RegExp(exp,"m");
1084 return this.replace(regExp,this.$generateExpFunction(str));
1085 };
1086 sp.matches=function(exp){
1087 if(exp!=null){
1088 exp="^("+exp+")$";
1089 }
1090 var regExp=new RegExp(exp,"gm");
1091 var m=this.match(regExp);
1092 return m!=null&&m.length!=0;
1093 };
1094 sp.regionMatches=function(ignoreCase,toffset,
1095 other,ooffset,len){
1096
1097 if(typeof ignoreCase=="number"
1098 ||(ignoreCase!=true&&ignoreCase!=false)){
1099 len=ooffset;
1100 ooffset=other;
1101 other=toffset;
1102 toffset=ignoreCase;
1103 ignoreCase=false;
1104 }
1105 var to=toffset;
1106 var po=ooffset;
1107
1108 if((ooffset<0)||(toffset<0)||(toffset>this.length-len)||
1109 (ooffset>other.length-len)){
1110 return false;
1111 }
1112 var s1=this.substring(toffset,toffset+len);
1113 var s2=other.substring(ooffset,ooffset+len);
1114 if(ignoreCase){
1115 s1=s1.toLowerCase();
1116 s2=s2.toLowerCase();
1117 }
1118 return s1==s2;
1119 };
1120
1121
1122
1123 sp.$plit=function(regex,limit){
1124 if (!limit && regex == " ")
1125         return this.split(regex);
1126
1127 if(limit!=null&&limit>0){
1128 if(limit==1){
1129 return this;
1130 }
1131 var regExp=new RegExp("("+regex+")","gm");
1132 var count=1;
1133 var s=this.replace(regExp,function($0,$1){
1134 count++;
1135 if(count==limit){
1136 return"@@_@@";
1137 }else if(count>limit){
1138 return $0;
1139 }else{
1140 return $0;
1141 }
1142 });
1143 regExp=new RegExp(regex,"gm");
1144 var arr=this.split(regExp);
1145 if(arr.length>limit){
1146 arr[limit-1]=s.substring(s.indexOf("@@_@@")+5);
1147 arr.length=limit;
1148 }
1149 return arr;
1150 }else{
1151 var regExp=new RegExp(regex,"gm");
1152 return this.split(regExp);
1153 }
1154 };
1155 /*
1156 sp.trim=function(){
1157 var len=this.length;
1158 var st=0;
1159
1160 while((st<len)&&(this.charAt(st)<=' ')){
1161 st++;
1162 }
1163 while((st<len)&&(this.charAt(len-1)<=' ')){
1164 len--;
1165 }
1166 return((st>0)||(len<len))?this.substring(st,len):this;
1167 };
1168
1169
1170 */
1171
1172 if (!sp.trim)
1173 sp.trim=function(){
1174 return this.replace(/^\s+/g,'').replace(/\s+$/g,'');
1175 };
1176
1177 if (!sp.startsWith || !sp.endsWith) {
1178 var sn=function(s, prefix,toffset){
1179 var to=toffset;
1180 var po=0;
1181 var pc=prefix.length;
1182
1183 if((toffset<0)||(toffset>s.length-pc)){
1184 return false;
1185 }
1186 while(--pc>=0){
1187 if(s.charAt(to++)!=prefix.charAt(po++)){
1188 return false;
1189 }
1190 }
1191 return true;
1192 };
1193
1194 sp.startsWith=function(prefix){
1195 if(arguments.length==1){
1196 return sn(this,arguments[0],0);
1197 }else if(arguments.length==2){
1198 return sn(this,arguments[0],arguments[1]);
1199 }else{
1200 return false;
1201 }
1202 };
1203
1204 sp.endsWith=function(suffix){
1205 return sn(this, suffix,this.length-suffix.length);
1206 };
1207
1208 }
1209
1210 sp.equals=function(anObject){
1211 return this.valueOf()==anObject;
1212 };
1213
1214 sp.equalsIgnoreCase=function(anotherString){
1215 return(anotherString==null)?false:(this==anotherString
1216 ||this.toLowerCase()==anotherString.toLowerCase());
1217 };
1218
1219
1220 sp.hash=0;
1221
1222 sp.hashCode=function(){
1223 var h=this.hash;
1224 if(h==0){
1225 var off=0;
1226 var len=this.length;
1227 for(var i=0;i<len;i++){
1228 h=31*h+this.charCodeAt(off++);
1229 h&=0xffffffff;
1230 }
1231 this.hash=h;
1232 }
1233 return h;
1234 };
1235
1236 sp.getBytes=function(){
1237 if(arguments.length==4){
1238 return this.getChars(arguments[0],arguments[1],arguments[2],arguments[3]);
1239 }
1240 var s=this;
1241 if(arguments.length==1){
1242 var cs=arguments[0].toString().toLowerCase();
1243 var charset=[
1244 "utf-8","UTF8","us-ascii","iso-8859-1","8859_1","gb2312","gb18030","gbk"
1245 ];
1246 var existed=false;
1247 for(var i=0;i<charset.length;i++){
1248 if(charset[i]==cs){
1249 existed=true;
1250 break;
1251 }
1252 }
1253 if(!existed){
1254 throw new java.io.UnsupportedEncodingException();
1255 }
1256 if(cs=="utf-8"||cs=="utf8"){
1257 s=Encoding.convert2UTF8(this);
1258 }
1259 }
1260 var arrs=new Array(s.length);
1261 var c=0,ii=0;
1262 for(var i=0;i<s.length;i++){
1263 c=s.charCodeAt(i);
1264 if(c>255){
1265 arrs[ii]=0x1a;
1266 arrs[ii+1]=c&0xff;
1267 arrs[ii+2]=(c&0xff00)>>8;
1268 ii+=2;
1269 }else{
1270 arrs[ii]=c;
1271 }
1272 ii++;
1273 }
1274 return arrs;
1275 };
1276
1277 /*
1278 sp.compareTo=function(anotherString){
1279 if(anotherString==null){
1280 throw new java.lang.NullPointerException();
1281 }
1282 var len1=this.length;
1283 var len2=anotherString.length;
1284 var n=Math.min(len1,len2);
1285 var k=0;
1286 while(k<n){
1287 var c1=this.charCodeAt(k);
1288 var c2=anotherString.charCodeAt(k);
1289 if(c1!=c2){
1290 return c1-c2;
1291 }
1292 k++;
1293 }
1294 return len1-len2;
1295 };
1296
1297 */
1298
1299 sp.contains = function(a) {return this.indexOf(a) >= 0}  // bh added
1300 sp.compareTo = function(a){return this > a ? 1 : this < a ? -1 : 0} // bh added
1301
1302
1303
1304 sp.toCharArray=function(){
1305 var result=new Array(this.length);
1306 for(var i=0;i<this.length;i++){
1307 result[i]=this.charAt(i);
1308 }
1309 return result;
1310 };
1311 String.value0f=String.valueOf;
1312 String.valueOf=function(o){
1313 if(o=="undefined"){
1314 return String.value0f();
1315 }
1316 if(o instanceof Array){
1317 if(arguments.length==1){
1318 return o.join('');
1319 }else{
1320 var off=arguments[1];
1321 var len=arguments[2];
1322 var oo=new Array(len);
1323 for(var i=0;i<len;i++){
1324 oo[i]=o[off+i];
1325 }
1326 return oo.join('');
1327 }
1328 }
1329 return""+o;
1330 };
1331
1332 sp.subSequence=function(beginIndex,endIndex){
1333 return this.substring(beginIndex,endIndex);
1334 };
1335
1336 sp.compareToIgnoreCase=function(str){
1337 if(str==null){
1338 throw new NullPointerException();
1339 }
1340 var s1=this.toUpperCase();
1341 var s2=str.toUpperCase();
1342 if(s1==s2){
1343 return 0;
1344 }else{
1345 var s1=this.toLowerCase();
1346 var s2=str.toLowerCase();
1347 if(s1==s2){
1348 return 0;
1349 }else if(s1>s2){
1350 return 1;
1351 }else{
1352 return-1;
1353 }
1354 }
1355 };
1356
1357 sp.contentEquals=function(sb){
1358 if(this.length!=sb.length()){
1359 return false;
1360 }
1361 var v=sb.getValue();
1362 var i=0;
1363 var j=0;
1364 var n=this.length;
1365 while(n--!=0){
1366 if(this.charCodeAt(i++)!=v[j++]){
1367 return false;
1368 }
1369 }
1370 return true;
1371 };
1372
1373 sp.getChars=function(srcBegin,srcEnd,dst,dstBegin){
1374 if(srcBegin<0){
1375 throw new StringIndexOutOfBoundsException(srcBegin);
1376 }
1377 if(srcEnd>this.length){
1378 throw new StringIndexOutOfBoundsException(srcEnd);
1379 }
1380 if(srcBegin>srcEnd){
1381 throw new StringIndexOutOfBoundsException(srcEnd-srcBegin);
1382 }
1383 if(dst==null){
1384 throw new NullPointerException();
1385 }
1386 for(var i=0;i<srcEnd-srcBegin;i++){
1387 dst[dstBegin+i]=this.charAt(srcBegin+i);
1388 }
1389 };
1390 sp.$concat=sp.concat;
1391 sp.concat=function(s){
1392 if(s==null){
1393 throw new NullPointerException();
1394 }
1395 return this.$concat(s);
1396 };
1397
1398 sp.$lastIndexOf=sp.lastIndexOf;
1399 sp.lastIndexOf=function(s,last){
1400 if(last!=null&&last+this.length<=0){
1401 return-1;
1402 }
1403 if(last!=null){
1404 return this.$lastIndexOf(s,last);
1405 }else{
1406 return this.$lastIndexOf(s);
1407 }
1408 };
1409
1410 sp.intern=function(){
1411 return this.valueOf();
1412 };
1413 String.copyValueOf=sp.copyValueOf=function(){
1414 if(arguments.length==1){
1415 return String.instantialize(arguments[0]);
1416 }else{
1417 return String.instantialize(arguments[0],arguments[1],arguments[2]);
1418 }
1419 };
1420
1421 sp.codePointAt || (sp.codePointAt = sp.charCodeAt); // Firefox only
1422
1423
1424 })(String.prototype);
1425
1426 /*
1427
1428 String.indexOf=function(source,sourceOffset,sourceCount,
1429 target,targetOffset,targetCount,fromIndex){
1430 if(fromIndex>=sourceCount){
1431 return(targetCount==0?sourceCount:-1);
1432 }
1433 if(fromIndex<0){
1434 fromIndex=0;
1435 }
1436 if(targetCount==0){
1437 return fromIndex;
1438 }
1439
1440 var first=target[targetOffset];
1441 var i=sourceOffset+fromIndex;
1442 var max=sourceOffset+(sourceCount-targetCount);
1443
1444 startSearchForFirstChar:
1445 while(true){
1446
1447 while(i<=max&&source[i]!=first){
1448 i++;
1449 }
1450 if(i>max){
1451 return-1;
1452 }
1453
1454
1455 var j=i+1;
1456 var end=j+targetCount-1;
1457 var k=targetOffset+1;
1458 while(j<end){
1459 if(source[j++]!=target[k++]){
1460 i++;
1461
1462 continue startSearchForFirstChar;
1463 }
1464 }
1465 return i-sourceOffset;
1466 }
1467 };
1468
1469
1470
1471 String.instantialize=function(){
1472 if(arguments.length==0){
1473 return new String();
1474 }else if(arguments.length==1){
1475 var x=arguments[0];
1476 if(typeof x=="string"||x instanceof String){
1477 return new String(x);
1478 }else if(x instanceof Array){
1479 if(x.length>0&&typeof x[0]=="number"){
1480 var arr=new Array(x.length);
1481 for(var i=0;i<x.length;i++){
1482 arr[i]=String.fromCharCode(x[i]&0xff);
1483 }
1484 return Encoding.readUTF8(arr.join(''));
1485 }
1486 return x.join('');
1487 }else if(x.__CLASS_NAME__=="StringBuffer"
1488 ||x.__CLASS_NAME__=="java.lang.StringBuffer"){
1489 var value=x.shareValue();
1490 var length=x.length();
1491 var valueCopy=new Array(length);
1492 for(var i=0;i<length;i++){
1493 valueCopy[i]=value[i];
1494 }
1495 return valueCopy.join('')
1496
1497 }else{
1498 return""+x;
1499 }
1500 }else if(arguments.length==2){
1501 var x=arguments[0];
1502 var hibyte=arguments[1];
1503 if(typeof hibyte=="string"){
1504 return String.instantialize(x,0,x.length,hibyte);
1505 }else{
1506 return String.instantialize(x,hibyte,0,x.length);
1507 }
1508 }else if(arguments.length==3){
1509 var bytes=arguments[0];
1510 var offset=arguments[1];
1511 var length=arguments[2];
1512 if(arguments[2]instanceof Array){
1513 bytes=arguments[2];
1514 offset=arguments[0];
1515 length=arguments[1];
1516 }
1517 var arr=new Array(length);
1518 if(offset<0||length+offset>bytes.length){
1519 throw new IndexOutOfBoundsException();
1520 }
1521 if(length>0){
1522 var isChar=(bytes[offset].length!=null);
1523 if(isChar){
1524 for(var i=0;i<length;i++){
1525 arr[i]=bytes[offset+i];
1526 }
1527 }else{
1528 for(var i=0;i<length;i++){
1529 arr[i]=String.fromCharCode(bytes[offset+i]);
1530 }
1531 }
1532 }
1533 return arr.join('');
1534 }else if(arguments.length==4){
1535 var bytes=arguments[0];
1536 var y=arguments[3];
1537 if(typeof y=="string"||y instanceof String){
1538 var offset=arguments[1];
1539 var length=arguments[2];
1540 var arr=new Array(length);
1541 for(var i=0;i<length;i++){
1542 arr[i]=bytes[offset+i];
1543 if(typeof arr[i]=="number"){
1544 arr[i]=String.fromCharCode(arr[i]&0xff);
1545 }
1546 }
1547 var cs=y.toLowerCase();
1548 if(cs=="utf-8"||cs=="utf8"){
1549 return Encoding.readUTF8(arr.join(''));
1550 }else{
1551 return arr.join('');
1552 }
1553 }else{
1554 var count=arguments[3];
1555 var offset=arguments[2];
1556 var hibyte=arguments[1];
1557 var value=new Array(count);
1558 if(hibyte==0){
1559 for(var i=count;i-->0;){
1560 value[i]=String.fromCharCode(bytes[i+offset]&0xff);
1561 }
1562 }else{
1563 hibyte<<=8;
1564 for(var i=count;i-->0;){
1565 value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff));
1566 }
1567 }
1568 return value.join('');
1569 }
1570 }else{
1571 var s="";
1572 for(var i=0;i<arguments.length;i++){
1573 s+=arguments[i];
1574 }
1575 return s;
1576 }
1577 };
1578
1579
1580 */
1581
1582
1583 String.instantialize=function(){
1584 switch (arguments.length) {
1585 case 0:
1586         return new String();
1587 case 1:
1588         var x=arguments[0];
1589         if(typeof x=="string"||x instanceof String){
1590                 return new String(x);
1591         }
1592         if(x instanceof Array || x instanceof Int32Array){
1593                 if(x.length == 0)
1594                         return "";
1595                 if(typeof x[0]!="number")
1596                         return x.join('');
1597                 var arr=new Array(x.length);
1598                 for(var i=0;i<x.length;i++)
1599                         arr[i]=String.fromCharCode(x[i]&0xff);
1600                 return Encoding.readUTF8(arr.join(''));
1601         }
1602         if(x.__CLASS_NAME__=="StringBuffer"||x.__CLASS_NAME__=="java.lang.StringBuffer"){
1603                 var value=x.shareValue();
1604                 var length=x.length();
1605                 var valueCopy=new Array(length);
1606                 for(var i=0;i<length;i++){
1607                         valueCopy[i]=value[i];
1608                 }
1609                 return valueCopy.join('')
1610         }
1611         return""+x;
1612 case 2: 
1613         var x=arguments[0];
1614         var hibyte=arguments[1];
1615         if(typeof hibyte=="string"){
1616                 return String.instantialize(x,0,x.length,hibyte);
1617         }
1618         return String.instantialize(x,hibyte,0,x.length);
1619 case 3:
1620         var bytes=arguments[0];
1621         var offset=arguments[1];
1622         var length=arguments[2];
1623         if(arguments[2]instanceof Array){
1624                 bytes=arguments[2];
1625                 offset=arguments[0];
1626                 length=arguments[1];
1627         }
1628         var arr=new Array(length);
1629         if(offset<0||length+offset>bytes.length){
1630                 throw new IndexOutOfBoundsException();
1631         }
1632         if(length>0){
1633                 var isChar=(bytes[offset].length!=null);
1634                 if(isChar){
1635                         for(var i=0;i<length;i++){
1636                                 arr[i]=bytes[offset+i];
1637                         }
1638                 }else{
1639                         for(var i=0;i<length;i++){
1640                                 arr[i]=String.fromCharCode(bytes[offset+i]);
1641                         }
1642                 }
1643         }
1644         return arr.join('');
1645 case 4:
1646         var bytes=arguments[0];
1647         var y=arguments[3];
1648         if(typeof y=="string"||y instanceof String){
1649                 var offset=arguments[1];
1650                 var length=arguments[2];
1651                 var arr=new Array(length);
1652                 for(var i=0;i<length;i++){
1653                         arr[i]=bytes[offset+i];
1654                         if(typeof arr[i]=="number"){
1655                                 arr[i]=String.fromCharCode(arr[i]&0xff);
1656                         }
1657                 }
1658                 var cs=y.toLowerCase();
1659                 if(cs=="utf-8"||cs=="utf8"){
1660                         return Encoding.readUTF8(arr.join(''));
1661                 }
1662                 return arr.join('');
1663         }
1664         var count=arguments[3];
1665         var offset=arguments[2];
1666         var hibyte=arguments[1];
1667         var value=new Array(count);
1668         if(hibyte==0){
1669                 for(var i=count;i-->0;){
1670                         value[i]=String.fromCharCode(bytes[i+offset]&0xff);
1671                 }
1672         }else{
1673                 hibyte<<=8;
1674                 for(var i=count;i-->0;){
1675                         value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff));
1676                 }
1677         }
1678         return value.join('');
1679 default:
1680         var s="";
1681         for(var i=0;i<arguments.length;i++){
1682                 s+=arguments[i];
1683         }
1684         return s;
1685 }
1686 };
1687
1688 if(navigator.userAgent.toLowerCase().indexOf("chrome")!=-1){
1689         String.prototype.toString=function(){return this.valueOf();};
1690 }
1691
1692 }
1693
1694 })(Clazz._Encoding);
1695
1696
1697
1698 c$=Clazz_decorateAsClass(function(){
1699 this.value=0;
1700 Clazz_instantialize(this,arguments);
1701 },java.lang,"Character",null,[java.io.Serializable,Comparable]);
1702 Clazz_makeConstructor(c$,
1703 function(value){
1704 this.value=value;
1705 },"~N");
1706 Clazz_defineMethod(c$,"charValue",
1707 function(){
1708 return this.value;
1709 });
1710 Clazz_overrideMethod(c$,"hashCode",
1711 function(){
1712 return(this.value).charCodeAt(0);
1713 });
1714 Clazz_overrideMethod(c$,"equals",
1715 function(obj){
1716 if(Clazz_instanceOf(obj,Character)){
1717 return(this.value).charCodeAt(0)==((obj).charValue()).charCodeAt(0);
1718 }return false;
1719 },"~O");
1720 Clazz_overrideMethod(c$,"compareTo",
1721 function(c){
1722 return(this.value).charCodeAt(0)-(c.value).charCodeAt(0);
1723 },"Character");
1724 c$.toLowerCase=Clazz_defineMethod(c$,"toLowerCase",
1725 function(c){
1726 return(""+c).toLowerCase().charAt(0);
1727 },"~N");
1728 c$.toUpperCase=Clazz_defineMethod(c$,"toUpperCase",
1729 function(c){
1730 return(""+c).toUpperCase().charAt(0);
1731 },"~N");
1732 c$.isDigit=Clazz_defineMethod(c$,"isDigit",
1733 function(c){
1734 c = c.charCodeAt(0);
1735 return (48 <= c && c <= 57);
1736 },"~N");
1737 c$.isUpperCase=Clazz_defineMethod(c$,"isUpperCase",
1738 function(c){
1739 c = c.charCodeAt(0);
1740 return (65 <= c && c <= 90);
1741 },"~N");
1742 c$.isLowerCase=Clazz_defineMethod(c$,"isLowerCase",
1743 function(c){
1744 c = c.charCodeAt(0);
1745 return (97 <= c && c <= 122);
1746 },"~N");
1747 c$.isWhitespace=Clazz_defineMethod(c$,"isWhitespace",
1748 function(c){
1749 c = (c).charCodeAt(0);
1750 return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd || c == 0x1680
1751         || c >= 0x2000 && c != 0x2007 && (c <= 0x200b || c == 0x2028 || c == 0x2029 || c == 0x3000));
1752 },"~N");
1753 c$.isLetter=Clazz_defineMethod(c$,"isLetter",
1754 function(c){
1755 c = c.charCodeAt(0);
1756 return (65 <= c && c <= 90 || 97 <= c && c <= 122);
1757 },"~N");
1758 c$.isLetterOrDigit=Clazz_defineMethod(c$,"isLetterOrDigit",
1759 function(c){
1760 c = c.charCodeAt(0);
1761 return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57);
1762 },"~N");
1763 c$.isSpaceChar=Clazz_defineMethod(c$,"isSpaceChar",
1764 function(c){
1765  var i = c.charCodeAt(0);
1766 if(i==0x20||i==0xa0||i==0x1680)return true;
1767 if(i<0x2000)return false;
1768 return i<=0x200b||i==0x2028||i==0x2029||i==0x202f||i==0x3000;
1769 },"~N");
1770 c$.digit=Clazz_defineMethod(c$,"digit",
1771 function(c,radix){
1772 var i = c.charCodeAt(0);
1773 if(radix >= 2 && radix <= 36){
1774         if(i < 128){
1775                 var result = -1;
1776                 if(48 <= i && i <= 57){
1777                 result = i - 48;
1778                 }else if(97 <= i && i <= 122){
1779                 result = i - 87;
1780                 }else if(65 <= i && i <= 90){
1781                 result=i-(55);
1782                 }
1783                 return (result < radix ? result : -1);
1784         }
1785 }
1786 return -1;
1787 },"~N,~N");
1788 Clazz_overrideMethod(c$,"toString",
1789 function(){
1790 var buf=[this.value];
1791 return String.valueOf(buf);
1792 });
1793 c$.toString=Clazz_overrideMethod(c$,"toString",
1794 function(c){
1795 {
1796 if(this===Character){
1797 return"class java.lang.Character";
1798 }
1799 }return String.valueOf(c);
1800 },"~N");
1801 Clazz_defineStatics(c$,
1802 "MIN_VALUE",'\u0000',
1803 "MAX_VALUE",'\uffff',
1804 "MIN_RADIX",2,
1805 "MAX_RADIX",36,
1806 "TYPE",null);
1807
1808 java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character;
1809
1810
1811
1812 Clazz._ArrayWrapper = function(a, type) {
1813  return {
1814    a: a,
1815    __CLASS_NAME__:"Array",
1816    superClazz: Array,
1817    getComponentType: function() {return type},
1818    instanceOf: function(o) { return  Clazz_instanceOf(type, o) },
1819    getName: function() { return this.__CLASS_NAME__ }
1820  };
1821 }
1822 c$=Clazz_declareType(java.lang.reflect,"Array");
1823 c$.newInstance=Clazz_defineMethod(c$,"newInstance",
1824 function(componentType,size){
1825 var a = Clazz_newArray(size);
1826  a.getClass = function() { return new Clazz._ArrayWrapper(this, componentType);};
1827 return a;
1828 },"Class,~N");
1829
1830 javautil.Date=Date;
1831 Date.TYPE="javautil.Date";
1832 Date.__CLASS_NAME__="Date";
1833 Clazz_implementOf(Date,[java.io.Serializable,java.lang.Comparable]);
1834
1835 Clazz_defineMethod(javautil.Date,"clone",
1836 function(){
1837 return new Date(this.getTime());
1838 });
1839
1840 Clazz_defineMethod(javautil.Date,"before",
1841 function(when){
1842 return this.getTime()<when.getTime();
1843 },"javautil.Date");
1844 Clazz_defineMethod(javautil.Date,"after",
1845 function(when){
1846 return this.getTime()>when.getTime();
1847 },"javautil.Date");
1848 Clazz_defineMethod(javautil.Date,"equals",
1849 function(obj){
1850 return Clazz_instanceOf(obj,javautil.Date)&&this.getTime()==(obj).getTime();
1851 },"Object");
1852 Clazz_defineMethod(javautil.Date,"compareTo",
1853 function(anotherDate){
1854 var thisTime=this.getTime();
1855 var anotherTime=anotherDate.getTime();
1856 return(thisTime<anotherTime?-1:(thisTime==anotherTime?0:1));
1857 },"javautil.Date");
1858 Clazz_defineMethod(javautil.Date,"compareTo",
1859 function(o){
1860 return this.compareTo(o);
1861 },"Object");
1862 Clazz_overrideMethod(javautil.Date,"hashCode",
1863 function(){
1864 var ht=this.getTime();
1865 return parseInt(ht)^parseInt((ht>>32));
1866 });
1867
1868 c$=Clazz_decorateAsClass(function(){
1869 this.source=null;
1870 Clazz_instantialize(this,arguments);
1871 },javautil,"EventObject",null,java.io.Serializable);
1872 Clazz_makeConstructor(c$,
1873 function(source){
1874 if(source!=null)this.source=source;
1875 else throw new IllegalArgumentException();
1876 },"~O");
1877 Clazz_defineMethod(c$,"getSource",
1878 function(){
1879 return this.source;
1880 });
1881 Clazz_overrideMethod(c$,"toString",
1882 function(){
1883 return this.getClass().getName()+"[source="+String.valueOf(this.source)+']';
1884 });
1885 Clazz_declareInterface(javautil,"EventListener");
1886
1887 c$=Clazz_decorateAsClass(function(){
1888 this.listener=null;
1889 Clazz_instantialize(this,arguments);
1890 },javautil,"EventListenerProxy",null,javautil.EventListener);
1891 Clazz_makeConstructor(c$,
1892 function(listener){
1893 this.listener=listener;
1894 },"javautil.EventListener");
1895 Clazz_defineMethod(c$,"getListener",
1896 function(){
1897 return this.listener;
1898 });
1899 Clazz_declareInterface(javautil,"Iterator");
1900
1901 Clazz_declareInterface(javautil,"ListIterator",javautil.Iterator);
1902 Clazz_declareInterface(javautil,"Enumeration");
1903 Clazz_declareInterface(javautil,"Collection",Iterable);
1904
1905 Clazz_declareInterface(javautil,"Set",javautil.Collection);
1906 Clazz_declareInterface(javautil,"Map");
1907 Clazz_declareInterface(javautil.Map,"Entry");
1908
1909 Clazz_declareInterface(javautil,"List",javautil.Collection);
1910
1911 Clazz_declareInterface(javautil,"Queue",javautil.Collection);
1912 Clazz_declareInterface(javautil,"RandomAccess");
1913 c$=Clazz_decorateAsClass(function(){
1914 this.detailMessage=null;
1915 this.cause=null;
1916 this.stackTrace=null;
1917 Clazz_instantialize(this,arguments);
1918 },java.lang,"Throwable",null,java.io.Serializable);
1919 Clazz_prepareFields(c$,function(){
1920 this.cause=this;
1921 //alert("e0 "+ arguments.callee.caller.caller.caller.caller.caller)
1922 });
1923 Clazz_makeConstructor(c$,
1924 function(){
1925 this.fillInStackTrace();
1926 });
1927 Clazz_makeConstructor(c$,
1928 function(message){
1929 this.fillInStackTrace();
1930 this.detailMessage=message;
1931 },"~S");
1932 Clazz_makeConstructor(c$,
1933 function(message,cause){
1934 this.fillInStackTrace();
1935 this.detailMessage=message;
1936 this.cause=cause;
1937 },"~S,Throwable");
1938 Clazz_makeConstructor(c$,
1939 function(cause){
1940 this.fillInStackTrace();
1941 this.detailMessage=(cause==null?null:cause.toString());
1942 this.cause=cause;
1943 },"Throwable");
1944 Clazz_defineMethod(c$,"getMessage",
1945 function(){
1946 return (this.message || this.detailMessage || this.toString());
1947 });
1948 Clazz_defineMethod(c$,"getLocalizedMessage",
1949 function(){
1950 return this.getMessage();
1951 });
1952 Clazz_defineMethod(c$,"getCause",
1953 function(){
1954 return(this.cause===this?null:this.cause);
1955 });
1956 Clazz_defineMethod(c$,"initCause",
1957 function(cause){
1958 if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");
1959 if(cause===this)throw new IllegalArgumentException("Self-causation not permitted");
1960 this.cause=cause;
1961 return this;
1962 },"Throwable");
1963 Clazz_overrideMethod(c$,"toString",
1964 function(){
1965 var s=this.getClass().getName();
1966 var message=this.message || this.detailMessage;
1967 return(message ? s+": "+message : s);
1968 });
1969 Clazz_defineMethod(c$,"printStackTrace",
1970 function(){
1971 System.err.println(this.getStackTrace ? this.getStackTrace() : this.message + " " + Clazz_getStackTrace());
1972 });
1973
1974 Clazz_defineMethod(c$,"getStackTrace",
1975 function(){
1976 var s = "" + this + "\n";
1977 for(var i=0;i<this.stackTrace.length;i++){
1978  var t=this.stackTrace[i];
1979         var x=t.methodName.indexOf("(");
1980         var n=t.methodName.substring(0,x).replace(/\s+/g,"");
1981         if(n!="construct"||t.nativeClazz==null
1982                  ||Clazz_getInheritedLevel(t.nativeClazz,Throwable)<0){
1983                                 s += t + "\n";
1984         }
1985 }
1986 return s;
1987 });
1988
1989
1990 Clazz_defineMethod(c$,"printStackTrace",
1991 function(s){
1992 this.printStackTrace();
1993 },"java.io.PrintStream");
1994 Clazz_defineMethod(c$,"printStackTrace",
1995 function(s){
1996 this.printStackTrace();
1997 },"java.io.PrintWriter");
1998 Clazz_defineMethod(c$,"fillInStackTrace",
1999 function(){
2000 this.stackTrace=new Array();
2001 var caller=arguments.callee.caller;
2002 var superCaller=null;
2003 var callerList=new Array();
2004 var index=Clazz._callingStackTraces.length-1;
2005 var noLooping=true;
2006 while(index>-1||caller!=null){
2007 var clazzName=null;
2008 var nativeClass=null;
2009 if(!noLooping||caller==Clazz_tryToSearchAndExecute||caller==Clazz_superCall||caller==null){
2010 if(index<0){
2011 break;
2012 }
2013 noLooping=true;
2014 superCaller=Clazz._callingStackTraces[index].caller;
2015 nativeClass=Clazz._callingStackTraces[index].owner;
2016 index--;
2017 }else{
2018 superCaller=caller;
2019 if(superCaller.claxxOwner!=null){
2020 nativeClass=superCaller.claxxOwner;
2021 }else if(superCaller.exClazz!=null){
2022 nativeClass=superCaller.exClazz;
2023 }
2024 }
2025 var st=new StackTraceElement(
2026 ((nativeClass!=null&&nativeClass.__CLASS_NAME__.length!=0)?
2027 nativeClass.__CLASS_NAME__:"anonymous"),
2028 ((superCaller.exName==null)?"anonymous":superCaller.exName)
2029 +" ("+Clazz_getParamsType(superCaller.arguments)+")",
2030 null,-1);
2031 st.nativeClazz=nativeClass;
2032 this.stackTrace[this.stackTrace.length]=st;
2033 for(var i=0;i<callerList.length;i++){
2034 if(callerList[i]==superCaller){
2035
2036 var st=new StackTraceElement("lost","missing",null,-3);
2037 st.nativeClazz=null;
2038 this.stackTrace[this.stackTrace.length]=st;
2039 noLooping=false;
2040
2041 }
2042 }
2043 if(superCaller!=null){
2044 callerList[callerList.length]=superCaller;
2045 }
2046 caller=superCaller.arguments.callee.caller;
2047 }
2048 Clazz._initializingException=false;
2049 return this;
2050 });
2051 Clazz_defineMethod(c$,"setStackTrace",
2052 function(stackTrace){
2053 var defensiveCopy=stackTrace.clone();
2054 for(var i=0;i<defensiveCopy.length;i++)if(defensiveCopy[i]==null)throw new NullPointerException("stackTrace["+i+"]");
2055
2056 this.stackTrace=defensiveCopy;
2057 },"~A");
2058
2059 c$=Clazz_decorateAsClass(function(){
2060 this.declaringClass=null;
2061 this.methodName=null;
2062 this.fileName=null;
2063 this.lineNumber=0;
2064 Clazz_instantialize(this,arguments);
2065 },java.lang,"StackTraceElement",null,java.io.Serializable);
2066 Clazz_makeConstructor(c$,
2067 function(cls,method,file,line){
2068 if(cls==null||method==null){
2069 throw new NullPointerException();
2070 }this.declaringClass=cls;
2071 this.methodName=method;
2072 this.fileName=file;
2073 this.lineNumber=line;
2074 },"~S,~S,~S,~N");
2075 Clazz_overrideMethod(c$,"equals",
2076 function(obj){
2077 if(!(Clazz_instanceOf(obj,StackTraceElement))){
2078 return false;
2079 }var castObj=obj;
2080 if((this.methodName==null)||(castObj.methodName==null)){
2081 return false;
2082 }if(!this.getMethodName().equals(castObj.getMethodName())){
2083 return false;
2084 }if(!this.getClassName().equals(castObj.getClassName())){
2085 return false;
2086 }var localFileName=this.getFileName();
2087 if(localFileName==null){
2088 if(castObj.getFileName()!=null){
2089 return false;
2090 }}else{
2091 if(!localFileName.equals(castObj.getFileName())){
2092 return false;
2093 }}if(this.getLineNumber()!=castObj.getLineNumber()){
2094 return false;
2095 }return true;
2096 },"~O");
2097 Clazz_defineMethod(c$,"getClassName",
2098 function(){
2099 return(this.declaringClass==null)?"<unknown class>":this.declaringClass;
2100 });
2101 Clazz_defineMethod(c$,"getFileName",
2102 function(){
2103 return this.fileName;
2104 });
2105 Clazz_defineMethod(c$,"getLineNumber",
2106 function(){
2107 return this.lineNumber;
2108 });
2109 Clazz_defineMethod(c$,"getMethodName",
2110 function(){
2111 return(this.methodName==null)?"<unknown method>":this.methodName;
2112 });
2113 Clazz_overrideMethod(c$,"hashCode",
2114 function(){
2115 if(this.methodName==null){
2116 return 0;
2117 }return this.methodName.hashCode()^this.declaringClass.hashCode();
2118 });
2119 Clazz_defineMethod(c$,"isNativeMethod",
2120 function(){
2121 return this.lineNumber==-2;
2122 });
2123 Clazz_overrideMethod(c$,"toString",
2124 function(){
2125 var buf=new StringBuilder(80);
2126 buf.append(this.getClassName());
2127 buf.append('.');
2128 buf.append(this.getMethodName());
2129 if(this.isNativeMethod()){
2130 buf.append("(Native Method)");
2131 }else{
2132 var fName=this.getFileName();
2133 if(fName==null){
2134 buf.append("(Unknown Source)");
2135 }else{
2136 var lineNum=this.getLineNumber();
2137 buf.append('(');
2138 buf.append(fName);
2139 if(lineNum>=0){
2140 buf.append(':');
2141 buf.append(lineNum);
2142 }buf.append(')');
2143 }}return buf.toString();
2144 });
2145 TypeError.prototype.getMessage || (TypeError.prototype.getMessage = function(){ return (this.message || this.toString()) + (this.getStackTrace ? this.getStackTrace() : Clazz_getStackTrace())});
2146 c$=Clazz_declareType(java.lang,"Error",Throwable);
2147
2148 c$=Clazz_declareType(java.lang,"LinkageError",Error);
2149
2150 c$=Clazz_declareType(java.lang,"IncompatibleClassChangeError",LinkageError);
2151
2152 c$=Clazz_declareType(java.lang,"AbstractMethodError",IncompatibleClassChangeError);
2153
2154 c$=Clazz_declareType(java.lang,"AssertionError",Error);
2155 Clazz_makeConstructor(c$,
2156 function(detailMessage){
2157 Clazz_superConstructor(this,AssertionError,[String.valueOf(detailMessage),(Clazz_instanceOf(detailMessage,Throwable)?detailMessage:null)]);
2158 },"~O");
2159 Clazz_makeConstructor(c$,
2160 function(detailMessage){
2161 this.construct("" + detailMessage);
2162 },"~B");
2163 Clazz_makeConstructor(c$,
2164 function(detailMessage){
2165 this.construct("" + detailMessage);
2166 },"~N");
2167
2168 c$=Clazz_declareType(java.lang,"ClassCircularityError",LinkageError);
2169
2170 c$=Clazz_declareType(java.lang,"ClassFormatError",LinkageError);
2171
2172 c$=Clazz_decorateAsClass(function(){
2173 this.exception=null;
2174 Clazz_instantialize(this,arguments);
2175 },java.lang,"ExceptionInInitializerError",LinkageError);
2176 Clazz_makeConstructor(c$,
2177 function(){
2178 Clazz_superConstructor(this,ExceptionInInitializerError);
2179 this.initCause(null);
2180 });
2181 Clazz_makeConstructor(c$,
2182 function(detailMessage){
2183 Clazz_superConstructor(this,ExceptionInInitializerError,[detailMessage]);
2184 this.initCause(null);
2185 },"~S");
2186 Clazz_makeConstructor(c$,
2187 function(exception){
2188 Clazz_superConstructor(this,ExceptionInInitializerError);
2189 this.exception=exception;
2190 this.initCause(exception);
2191 },"Throwable");
2192 Clazz_defineMethod(c$,"getException",
2193 function(){
2194 return this.exception;
2195 });
2196 Clazz_overrideMethod(c$,"getCause",
2197 function(){
2198 return this.exception;
2199 });
2200
2201 c$=Clazz_declareType(java.lang,"IllegalAccessError",IncompatibleClassChangeError);
2202
2203 c$=Clazz_declareType(java.lang,"InstantiationError",IncompatibleClassChangeError);
2204
2205 c$=Clazz_declareType(java.lang,"VirtualMachineError",Error);
2206
2207 c$=Clazz_declareType(java.lang,"InternalError",VirtualMachineError);
2208
2209 c$=Clazz_declareType(java.lang,"NoClassDefFoundError",LinkageError);
2210
2211 c$=Clazz_declareType(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);
2212
2213 c$=Clazz_declareType(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);
2214
2215 c$=Clazz_declareType(java.lang,"OutOfMemoryError",VirtualMachineError);
2216
2217 c$=Clazz_declareType(java.lang,"StackOverflowError",VirtualMachineError);
2218
2219 c$=Clazz_declareType(java.lang,"UnknownError",VirtualMachineError);
2220
2221 c$=Clazz_declareType(java.lang,"UnsatisfiedLinkError",LinkageError);
2222
2223 c$=Clazz_declareType(java.lang,"UnsupportedClassVersionError",ClassFormatError);
2224
2225 c$=Clazz_declareType(java.lang,"VerifyError",LinkageError);
2226
2227 c$=Clazz_declareType(java.lang,"ThreadDeath",Error);
2228 Clazz_makeConstructor(c$,
2229 function(){
2230 Clazz_superConstructor(this,ThreadDeath,[]);
2231 });
2232
2233 c$=Clazz_declareType(java.lang,"Exception",Throwable);
2234
2235 c$=Clazz_declareType(java.lang,"RuntimeException",Exception);
2236
2237 c$=Clazz_declareType(java.lang,"ArithmeticException",RuntimeException);
2238
2239 c$=Clazz_declareType(java.lang,"IndexOutOfBoundsException",RuntimeException);
2240
2241 c$=Clazz_declareType(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);
2242 Clazz_makeConstructor(c$,
2243 function(index){
2244 Clazz_superConstructor(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+index]);
2245 },"~N");
2246
2247 c$=Clazz_declareType(java.lang,"ArrayStoreException",RuntimeException);
2248
2249 c$=Clazz_declareType(java.lang,"ClassCastException",RuntimeException);
2250
2251 c$=Clazz_decorateAsClass(function(){
2252 this.ex=null;
2253 Clazz_instantialize(this,arguments);
2254 },java.lang,"ClassNotFoundException",Exception);
2255 Clazz_makeConstructor(c$,
2256 function(){
2257 Clazz_superConstructor(this,ClassNotFoundException,[Clazz_castNullAs("Throwable")]);
2258 });
2259 Clazz_makeConstructor(c$,
2260 function(detailMessage){
2261 Clazz_superConstructor(this,ClassNotFoundException,[detailMessage,null]);
2262 },"~S");
2263 Clazz_makeConstructor(c$,
2264 function(detailMessage,exception){
2265 Clazz_superConstructor(this,ClassNotFoundException,[detailMessage]);
2266 this.ex=exception;
2267 },"~S,Throwable");
2268 Clazz_defineMethod(c$,"getException",
2269 function(){
2270 return this.ex;
2271 });
2272 Clazz_overrideMethod(c$,"getCause",
2273 function(){
2274 return this.ex;
2275 });
2276
2277 c$=Clazz_declareType(java.lang,"CloneNotSupportedException",Exception);
2278
2279 c$=Clazz_declareType(java.lang,"IllegalAccessException",Exception);
2280
2281 c$=Clazz_declareType(java.lang,"IllegalArgumentException",RuntimeException);
2282 Clazz_makeConstructor(c$,
2283 function(cause){
2284 Clazz_superConstructor(this,IllegalArgumentException,[(cause==null?null:cause.toString()),cause]);
2285 },"Throwable");
2286
2287 c$=Clazz_declareType(java.lang,"IllegalMonitorStateException",RuntimeException);
2288
2289 c$=Clazz_declareType(java.lang,"IllegalStateException",RuntimeException);
2290 Clazz_makeConstructor(c$,
2291 function(cause){
2292 Clazz_superConstructor(this,IllegalStateException,[(cause==null?null:cause.toString()),cause]);
2293 },"Throwable");
2294
2295 c$=Clazz_declareType(java.lang,"IllegalThreadStateException",IllegalArgumentException);
2296
2297 c$=Clazz_declareType(java.lang,"InstantiationException",Exception);
2298
2299 c$=Clazz_declareType(java.lang,"InterruptedException",Exception);
2300
2301 c$=Clazz_declareType(java.lang,"NegativeArraySizeException",RuntimeException);
2302
2303 c$=Clazz_declareType(java.lang,"NoSuchFieldException",Exception);
2304
2305 c$=Clazz_declareType(java.lang,"NoSuchMethodException",Exception);
2306
2307 c$=Clazz_declareType(java.lang,"NullPointerException",RuntimeException);
2308
2309 c$=Clazz_declareType(java.lang,"NumberFormatException",IllegalArgumentException);
2310
2311 c$=Clazz_declareType(java.lang,"SecurityException",RuntimeException);
2312 Clazz_makeConstructor(c$,
2313 function(cause){
2314 Clazz_superConstructor(this,SecurityException,[(cause==null?null:cause.toString()),cause]);
2315 },"Throwable");
2316
2317 c$=Clazz_declareType(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);
2318 Clazz_makeConstructor(c$,
2319 function(index){
2320 Clazz_superConstructor(this,StringIndexOutOfBoundsException,["String index out of range: "+index]);
2321 },"~N");
2322
2323 c$=Clazz_declareType(java.lang,"UnsupportedOperationException",RuntimeException);
2324 Clazz_makeConstructor(c$,
2325 function(){
2326 Clazz_superConstructor(this,UnsupportedOperationException,[]);
2327 });
2328 Clazz_makeConstructor(c$,
2329 function(cause){
2330 Clazz_superConstructor(this,UnsupportedOperationException,[(cause==null?null:cause.toString()),cause]);
2331 },"Throwable");
2332
2333 c$=Clazz_decorateAsClass(function(){
2334 this.target=null;
2335 Clazz_instantialize(this,arguments);
2336 },java.lang.reflect,"InvocationTargetException",Exception);
2337 Clazz_makeConstructor(c$,
2338 function(){
2339 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[Clazz_castNullAs("Throwable")]);
2340 });
2341 Clazz_makeConstructor(c$,
2342 function(exception){
2343 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[null,exception]);
2344 this.target=exception;
2345 },"Throwable");
2346 Clazz_makeConstructor(c$,
2347 function(exception,detailMessage){
2348 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[detailMessage,exception]);
2349 this.target=exception;
2350 },"Throwable,~S");
2351 Clazz_defineMethod(c$,"getTargetException",
2352 function(){
2353 return this.target;
2354 });
2355 Clazz_overrideMethod(c$,"getCause",
2356 function(){
2357 return this.target;
2358 });
2359
2360 c$=Clazz_decorateAsClass(function(){
2361 this.undeclaredThrowable=null;
2362 Clazz_instantialize(this,arguments);
2363 },java.lang.reflect,"UndeclaredThrowableException",RuntimeException);
2364 Clazz_makeConstructor(c$,
2365 function(exception){
2366 Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException);
2367 this.undeclaredThrowable=exception;
2368 this.initCause(exception);
2369 },"Throwable");
2370 Clazz_makeConstructor(c$,
2371 function(exception,detailMessage){
2372 Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException,[detailMessage]);
2373 this.undeclaredThrowable=exception;
2374 this.initCause(exception);
2375 },"Throwable,~S");
2376 Clazz_defineMethod(c$,"getUndeclaredThrowable",
2377 function(){
2378 return this.undeclaredThrowable;
2379 });
2380 Clazz_overrideMethod(c$,"getCause",
2381 function(){
2382 return this.undeclaredThrowable;
2383 });
2384
2385 c$=Clazz_declareType(java.io,"IOException",Exception);
2386
2387
2388 c$=Clazz_declareType(java.io,"CharConversionException",java.io.IOException);
2389
2390 c$=Clazz_declareType(java.io,"EOFException",java.io.IOException);
2391
2392 c$=Clazz_declareType(java.io,"FileNotFoundException",java.io.IOException);
2393
2394 c$=Clazz_decorateAsClass(function(){
2395 this.bytesTransferred=0;
2396 Clazz_instantialize(this,arguments);
2397 },java.io,"InterruptedIOException",java.io.IOException);
2398
2399 c$=Clazz_declareType(java.io,"ObjectStreamException",java.io.IOException);
2400
2401 c$=Clazz_decorateAsClass(function(){
2402 this.classname=null;
2403 Clazz_instantialize(this,arguments);
2404 },java.io,"InvalidClassException",java.io.ObjectStreamException);
2405 Clazz_makeConstructor(c$,
2406 function(className,detailMessage){
2407 Clazz_superConstructor(this,java.io.InvalidClassException,[detailMessage]);
2408 this.classname=className;
2409 },"~S,~S");
2410 Clazz_defineMethod(c$,"getMessage",
2411 function(){
2412 var msg=Clazz_superCall(this,java.io.InvalidClassException,"getMessage",[]);
2413 if(this.classname!=null){
2414 msg=this.classname+';' + ' '+msg;
2415 }return msg;
2416 });
2417
2418 c$=Clazz_declareType(java.io,"InvalidObjectException",java.io.ObjectStreamException);
2419
2420 c$=Clazz_declareType(java.io,"NotActiveException",java.io.ObjectStreamException);
2421
2422 c$=Clazz_declareType(java.io,"NotSerializableException",java.io.ObjectStreamException);
2423
2424 c$=Clazz_decorateAsClass(function(){
2425 this.eof=false;
2426 this.length=0;
2427 Clazz_instantialize(this,arguments);
2428 },java.io,"OptionalDataException",java.io.ObjectStreamException);
2429
2430 c$=Clazz_declareType(java.io,"StreamCorruptedException",java.io.ObjectStreamException);
2431
2432 c$=Clazz_declareType(java.io,"SyncFailedException",java.io.IOException);
2433
2434 c$=Clazz_declareType(java.io,"UnsupportedEncodingException",java.io.IOException);
2435
2436 c$=Clazz_declareType(java.io,"UTFDataFormatException",java.io.IOException);
2437
2438 c$=Clazz_decorateAsClass(function(){
2439 this.detail=null;
2440 Clazz_instantialize(this,arguments);
2441 },java.io,"WriteAbortedException",java.io.ObjectStreamException);
2442 Clazz_makeConstructor(c$,
2443 function(detailMessage,rootCause){
2444 Clazz_superConstructor(this,java.io.WriteAbortedException,[detailMessage]);
2445 this.detail=rootCause;
2446 this.initCause(rootCause);
2447 },"~S,Exception");
2448 Clazz_defineMethod(c$,"getMessage",
2449 function(){
2450 var msg=Clazz_superCall(this,java.io.WriteAbortedException,"getMessage",[]);
2451 return (this.detail ? msg + "; "+this.detail.toString() : msg);
2452 });
2453 Clazz_overrideMethod(c$,"getCause",
2454 function(){
2455 return this.detail;
2456 });
2457
2458 c$=Clazz_declareType(javautil,"ConcurrentModificationException",RuntimeException);
2459 Clazz_makeConstructor(c$,
2460 function(){
2461 Clazz_superConstructor(this,javautil.ConcurrentModificationException,[]);
2462 });
2463
2464 c$=Clazz_declareType(javautil,"EmptyStackException",RuntimeException);
2465
2466 c$=Clazz_decorateAsClass(function(){
2467 this.className=null;
2468 this.key=null;
2469 Clazz_instantialize(this,arguments);
2470 },javautil,"MissingResourceException",RuntimeException);
2471 Clazz_makeConstructor(c$,
2472 function(detailMessage,className,resourceName){
2473 Clazz_superConstructor(this,javautil.MissingResourceException,[detailMessage]);
2474 this.className=className;
2475 this.key=resourceName;
2476 },"~S,~S,~S");
2477 Clazz_defineMethod(c$,"getClassName",
2478 function(){
2479 return this.className;
2480 });
2481 Clazz_defineMethod(c$,"getKey",
2482 function(){
2483 return this.key;
2484 });
2485
2486 c$=Clazz_declareType(javautil,"NoSuchElementException",RuntimeException);
2487
2488 c$=Clazz_declareType(javautil,"TooManyListenersException",Exception);
2489
2490 c$=Clazz_declareType(java.lang,"Void");
2491 Clazz_defineStatics(c$,
2492 "TYPE",null);
2493 {
2494 java.lang.Void.TYPE=java.lang.Void;
2495 }Clazz_declareInterface(java.lang.reflect,"GenericDeclaration");
2496 Clazz_declareInterface(java.lang.reflect,"AnnotatedElement");
2497
2498 c$=Clazz_declareType(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);
2499 Clazz_makeConstructor(c$,
2500 function(){
2501 });
2502 Clazz_defineMethod(c$,"isAccessible",
2503 function(){
2504 return false;
2505 });
2506 c$.setAccessible=Clazz_defineMethod(c$,"setAccessible",
2507 function(objects,flag){
2508 return;
2509 },"~A,~B");
2510 Clazz_defineMethod(c$,"setAccessible",
2511 function(flag){
2512 return;
2513 },"~B");
2514 Clazz_overrideMethod(c$,"isAnnotationPresent",
2515 function(annotationType){
2516 return false;
2517 },"Class");
2518 Clazz_overrideMethod(c$,"getDeclaredAnnotations",
2519 function(){
2520 return new Array(0);
2521 });
2522 Clazz_overrideMethod(c$,"getAnnotations",
2523 function(){
2524 return new Array(0);
2525 });
2526 Clazz_overrideMethod(c$,"getAnnotation",
2527 function(annotationType){
2528 return null;
2529 },"Class");
2530 c$.marshallArguments=Clazz_defineMethod(c$,"marshallArguments",
2531 function(parameterTypes,args){
2532 return null;
2533 },"~A,~A");
2534 Clazz_defineMethod(c$,"invokeV",
2535 function(receiver,args){
2536 return;
2537 },"~O,~A");
2538 Clazz_defineMethod(c$,"invokeL",
2539 function(receiver,args){
2540 return null;
2541 },"~O,~A");
2542 Clazz_defineMethod(c$,"invokeI",
2543 function(receiver,args){
2544 return 0;
2545 },"~O,~A");
2546 Clazz_defineMethod(c$,"invokeJ",
2547 function(receiver,args){
2548 return 0;
2549 },"~O,~A");
2550 Clazz_defineMethod(c$,"invokeF",
2551 function(receiver,args){
2552 return 0.0;
2553 },"~O,~A");
2554 Clazz_defineMethod(c$,"invokeD",
2555 function(receiver,args){
2556 return 0.0;
2557 },"~O,~A");
2558 c$.emptyArgs=c$.prototype.emptyArgs=new Array(0);
2559 Clazz_declareInterface(java.lang.reflect,"InvocationHandler");
2560 c$=Clazz_declareInterface(java.lang.reflect,"Member");
2561 Clazz_defineStatics(c$,
2562 "PUBLIC",0,
2563 "DECLARED",1);
2564
2565 c$=Clazz_declareType(java.lang.reflect,"Modifier");
2566 Clazz_makeConstructor(c$,
2567 function(){
2568 });
2569 c$.isAbstract=Clazz_defineMethod(c$,"isAbstract",
2570 function(modifiers){
2571 return((modifiers&1024)!=0);
2572 },"~N");
2573 c$.isFinal=Clazz_defineMethod(c$,"isFinal",
2574 function(modifiers){
2575 return((modifiers&16)!=0);
2576 },"~N");
2577 c$.isInterface=Clazz_defineMethod(c$,"isInterface",
2578 function(modifiers){
2579 return((modifiers&512)!=0);
2580 },"~N");
2581 c$.isNative=Clazz_defineMethod(c$,"isNative",
2582 function(modifiers){
2583 return((modifiers&256)!=0);
2584 },"~N");
2585 c$.isPrivate=Clazz_defineMethod(c$,"isPrivate",
2586 function(modifiers){
2587 return((modifiers&2)!=0);
2588 },"~N");
2589 c$.isProtected=Clazz_defineMethod(c$,"isProtected",
2590 function(modifiers){
2591 return((modifiers&4)!=0);
2592 },"~N");
2593 c$.isPublic=Clazz_defineMethod(c$,"isPublic",
2594 function(modifiers){
2595 return((modifiers&1)!=0);
2596 },"~N");
2597 c$.isStatic=Clazz_defineMethod(c$,"isStatic",
2598 function(modifiers){
2599 return((modifiers&8)!=0);
2600 },"~N");
2601 c$.isStrict=Clazz_defineMethod(c$,"isStrict",
2602 function(modifiers){
2603 return((modifiers&2048)!=0);
2604 },"~N");
2605 c$.isSynchronized=Clazz_defineMethod(c$,"isSynchronized",
2606 function(modifiers){
2607 return((modifiers&32)!=0);
2608 },"~N");
2609 c$.isTransient=Clazz_defineMethod(c$,"isTransient",
2610 function(modifiers){
2611 return((modifiers&128)!=0);
2612 },"~N");
2613 c$.isVolatile=Clazz_defineMethod(c$,"isVolatile",
2614 function(modifiers){
2615 return((modifiers&64)!=0);
2616 },"~N");
2617 c$.toString=Clazz_defineMethod(c$,"toString",
2618 function(modifiers){
2619 var sb=new Array(0);
2620 if(java.lang.reflect.Modifier.isPublic(modifiers))sb[sb.length]="public";
2621 if(java.lang.reflect.Modifier.isProtected(modifiers))sb[sb.length]="protected";
2622 if(java.lang.reflect.Modifier.isPrivate(modifiers))sb[sb.length]="private";
2623 if(java.lang.reflect.Modifier.isAbstract(modifiers))sb[sb.length]="abstract";
2624 if(java.lang.reflect.Modifier.isStatic(modifiers))sb[sb.length]="static";
2625 if(java.lang.reflect.Modifier.isFinal(modifiers))sb[sb.length]="final";
2626 if(java.lang.reflect.Modifier.isTransient(modifiers))sb[sb.length]="transient";
2627 if(java.lang.reflect.Modifier.isVolatile(modifiers))sb[sb.length]="volatile";
2628 if(java.lang.reflect.Modifier.isSynchronized(modifiers))sb[sb.length]="synchronized";
2629 if(java.lang.reflect.Modifier.isNative(modifiers))sb[sb.length]="native";
2630 if(java.lang.reflect.Modifier.isStrict(modifiers))sb[sb.length]="strictfp";
2631 if(java.lang.reflect.Modifier.isInterface(modifiers))sb[sb.length]="interface";
2632 if(sb.length>0){
2633 return sb.join(" ");
2634 }return"";
2635 },"~N");
2636 Clazz_defineStatics(c$,
2637 "PUBLIC",0x1,
2638 "PRIVATE",0x2,
2639 "PROTECTED",0x4,
2640 "STATIC",0x8,
2641 "FINAL",0x10,
2642 "SYNCHRONIZED",0x20,
2643 "VOLATILE",0x40,
2644 "TRANSIENT",0x80,
2645 "NATIVE",0x100,
2646 "INTERFACE",0x200,
2647 "ABSTRACT",0x400,
2648 "STRICT",0x800,
2649 "BRIDGE",0x40,
2650 "VARARGS",0x80,
2651 "SYNTHETIC",0x1000,
2652 "ANNOTATION",0x2000,
2653 "ENUM",0x4000);
2654
2655 c$=Clazz_decorateAsClass(function(){
2656 this.clazz=null;
2657 this.parameterTypes=null;
2658 this.exceptionTypes=null;
2659 this.modifiers=0;
2660 Clazz_instantialize(this,arguments);
2661 },java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
2662 Clazz_makeConstructor(c$,
2663 function(declaringClass,parameterTypes,checkedExceptions,modifiers){
2664 Clazz_superConstructor(this,java.lang.reflect.Constructor,[]);
2665 this.clazz=declaringClass;
2666 this.parameterTypes=parameterTypes;
2667 this.exceptionTypes=checkedExceptions;
2668 this.modifiers=modifiers;
2669 },"Class,~A,~A,~N");
2670 Clazz_overrideMethod(c$,"getTypeParameters",
2671 function(){
2672 return null;
2673 });
2674 Clazz_defineMethod(c$,"toGenericString",
2675 function(){
2676 return null;
2677 });
2678 Clazz_defineMethod(c$,"getGenericParameterTypes",
2679 function(){
2680 return null;
2681 });
2682 Clazz_defineMethod(c$,"getGenericExceptionTypes",
2683 function(){
2684 return null;
2685 });
2686 Clazz_defineMethod(c$,"getParameterAnnotations",
2687 function(){
2688 return null;
2689 });
2690 Clazz_defineMethod(c$,"isVarArgs",
2691 function(){
2692 return false;
2693 });
2694 Clazz_overrideMethod(c$,"isSynthetic",
2695 function(){
2696 return false;
2697 });
2698 Clazz_overrideMethod(c$,"equals",
2699 function(object){
2700 if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Constructor)){
2701 var other=object;
2702 if(this.getDeclaringClass()===other.getDeclaringClass()){
2703 var params1=this.parameterTypes;
2704 var params2=other.parameterTypes;
2705 if(params1.length==params2.length){
2706 for(var i=0;i<params1.length;i++){
2707 if(params1[i]!==params2[i])return false;
2708 }
2709 return true;
2710 }}}return false;
2711 },"~O");
2712 Clazz_overrideMethod(c$,"getDeclaringClass",
2713 function(){
2714 return this.clazz;
2715 });
2716 Clazz_defineMethod(c$,"getExceptionTypes",
2717 function(){
2718 return this.exceptionTypes;
2719 });
2720 Clazz_overrideMethod(c$,"getModifiers",
2721 function(){
2722 return this.modifiers;
2723 });
2724 Clazz_overrideMethod(c$,"getName",
2725 function(){
2726 return this.getDeclaringClass().getName();
2727 });
2728 Clazz_defineMethod(c$,"getParameterTypes",
2729 function(){
2730 return this.parameterTypes;
2731 });
2732 Clazz_overrideMethod(c$,"hashCode",
2733 function(){
2734 return this.getDeclaringClass().getName().hashCode();
2735 });
2736 Clazz_defineMethod(c$,"newInstance",
2737 function(args){
2738 var instance=new this.clazz(Clazz_inheritArgs);
2739 Clazz_instantialize(instance,args);
2740 return instance;
2741 },"~A");
2742 Clazz_overrideMethod(c$,"toString",
2743 function(){
2744 return null;
2745 });
2746
2747 c$=Clazz_declareType(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);
2748 Clazz_overrideMethod(c$,"isSynthetic",
2749 function(){
2750 return false;
2751 });
2752 Clazz_defineMethod(c$,"toGenericString",
2753 function(){
2754 return null;
2755 });
2756 Clazz_defineMethod(c$,"isEnumConstant",
2757 function(){
2758 return false;
2759 });
2760 Clazz_defineMethod(c$,"getGenericType",
2761 function(){
2762 return null;
2763 });
2764 Clazz_overrideMethod(c$,"equals",
2765 function(object){
2766 return false;
2767 },"~O");
2768 Clazz_overrideMethod(c$,"getDeclaringClass",
2769 function(){
2770 return null;
2771 });
2772 Clazz_overrideMethod(c$,"getName",
2773 function(){
2774 return null;
2775 });
2776 Clazz_defineMethod(c$,"getType",
2777 function(){
2778 return null;
2779 });
2780 Clazz_overrideMethod(c$,"hashCode",
2781 function(){
2782 return 0;
2783 });
2784 Clazz_overrideMethod(c$,"toString",
2785 function(){
2786 return null;
2787 });
2788
2789 c$=Clazz_decorateAsClass(function(){
2790 this.clazz=null;
2791 this.name=null;
2792 this.returnType=null;
2793 this.parameterTypes=null;
2794 this.exceptionTypes=null;
2795 this.modifiers=0;
2796 Clazz_instantialize(this,arguments);
2797 },java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
2798 Clazz_makeConstructor(c$,
2799 function(declaringClass,name,parameterTypes,returnType,checkedExceptions,modifiers){
2800 Clazz_superConstructor(this,java.lang.reflect.Method,[]);
2801 this.clazz=declaringClass;
2802 this.name=name;
2803 this.parameterTypes=parameterTypes;
2804 this.returnType=returnType;
2805 this.exceptionTypes=checkedExceptions;
2806 this.modifiers=modifiers;
2807 },"Class,~S,~A,Class,~A,~N");
2808 Clazz_overrideMethod(c$,"getTypeParameters",
2809 function(){
2810 return null;
2811 });
2812 Clazz_defineMethod(c$,"toGenericString",
2813 function(){
2814 return null;
2815 });
2816 Clazz_defineMethod(c$,"getGenericParameterTypes",
2817 function(){
2818 return null;
2819 });
2820 Clazz_defineMethod(c$,"getGenericExceptionTypes",
2821 function(){
2822 return null;
2823 });
2824 Clazz_defineMethod(c$,"getGenericReturnType",
2825 function(){
2826 return null;
2827 });
2828 Clazz_defineMethod(c$,"getParameterAnnotations",
2829 function(){
2830 return null;
2831 });
2832 Clazz_defineMethod(c$,"isVarArgs",
2833 function(){
2834 return false;
2835 });
2836 Clazz_defineMethod(c$,"isBridge",
2837 function(){
2838 return false;
2839 });
2840 Clazz_overrideMethod(c$,"isSynthetic",
2841 function(){
2842 return false;
2843 });
2844 Clazz_defineMethod(c$,"getDefaultValue",
2845 function(){
2846 return null;
2847 });
2848 Clazz_overrideMethod(c$,"equals",
2849 function(object){
2850 if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Method)){
2851 var other=object;
2852 if((this.getDeclaringClass()===other.getDeclaringClass())&&(this.getName()===other.getName())){
2853 var params1=this.parameterTypes;
2854 var params2=other.parameterTypes;
2855 if(params1.length==params2.length){
2856 for(var i=0;i<params1.length;i++){
2857 if(params1[i]!==params2[i])return false;
2858 }
2859 return true;
2860 }}}return false;
2861 },"~O");
2862 Clazz_overrideMethod(c$,"getDeclaringClass",
2863 function(){
2864 return this.clazz;
2865 });
2866 Clazz_defineMethod(c$,"getExceptionTypes",
2867 function(){
2868 return this.exceptionTypes;
2869 });
2870 Clazz_overrideMethod(c$,"getModifiers",
2871 function(){
2872 return this.modifiers;
2873 });
2874 Clazz_overrideMethod(c$,"getName",
2875 function(){
2876 return this.name;
2877 });
2878 Clazz_defineMethod(c$,"getParameterTypes",
2879 function(){
2880 return this.parameterTypes; 
2881 });
2882 Clazz_defineMethod(c$,"getReturnType",
2883 function(){
2884 return this.returnType;
2885 });
2886 Clazz_overrideMethod(c$,"hashCode",
2887 function(){
2888 return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode();
2889 });
2890 Clazz_defineMethod(c$,"invoke",
2891 function(receiver,args){
2892 var m=this.clazz.prototype[this.getName()];
2893 if(m==null){
2894 m=this.clazz[this.getName()];
2895 }
2896 if(m!=null){
2897 m.apply(receiver,args);
2898 }else{
2899
2900 }
2901 },"~O,~A");
2902 Clazz_overrideMethod(c$,"toString",
2903 function(){
2904 return null;
2905 });
2906
2907 })(Clazz);
2908 Clazz_declarePackage ("java.awt");
2909 Clazz_load (["java.awt.Stroke"], "java.awt.BasicStroke", ["java.lang.Float", "$.IllegalArgumentException", "java.util.Arrays"], function () {
2910 c$ = Clazz_decorateAsClass (function () {
2911 this.width = 0;
2912 this.join = 0;
2913 this.cap = 0;
2914 this.miterlimit = 0;
2915 this.dash = null;
2916 this.dash_phase = 0;
2917 Clazz_instantialize (this, arguments);
2918 }, java.awt, "BasicStroke", null, java.awt.Stroke);
2919 Clazz_makeConstructor (c$, 
2920 function (width, cap, join, miterlimit, dash, dash_phase) {
2921 if (width < 0.0) {
2922 throw  new IllegalArgumentException ("negative width");
2923 }if (cap != 0 && cap != 1 && cap != 2) {
2924 throw  new IllegalArgumentException ("illegal end cap value");
2925 }if (join == 0) {
2926 if (miterlimit < 1.0) {
2927 throw  new IllegalArgumentException ("miter limit < 1");
2928 }} else if (join != 1 && join != 2) {
2929 throw  new IllegalArgumentException ("illegal line join value");
2930 }if (dash != null) {
2931 if (dash_phase < 0.0) {
2932 throw  new IllegalArgumentException ("negative dash phase");
2933 }var allzero = true;
2934 for (var i = 0; i < dash.length; i++) {
2935 var d = dash[i];
2936 if (d > 0.0) {
2937 allzero = false;
2938 } else if (d < 0.0) {
2939 throw  new IllegalArgumentException ("negative dash length");
2940 }}
2941 if (allzero) {
2942 throw  new IllegalArgumentException ("dash lengths all zero");
2943 }}this.width = width;
2944 this.cap = cap;
2945 this.join = join;
2946 this.miterlimit = miterlimit;
2947 if (dash != null) {
2948 this.dash = dash.clone ();
2949 }this.dash_phase = dash_phase;
2950 }, "~N,~N,~N,~N,~A,~N");
2951 Clazz_makeConstructor (c$, 
2952 function (width, cap, join, miterlimit) {
2953 this.construct (width, cap, join, miterlimit, null, 0.0);
2954 }, "~N,~N,~N,~N");
2955 Clazz_makeConstructor (c$, 
2956 function (width, cap, join) {
2957 this.construct (width, cap, join, 10.0, null, 0.0);
2958 }, "~N,~N,~N");
2959 Clazz_makeConstructor (c$, 
2960 function (width) {
2961 this.construct (width, 2, 0, 10.0, null, 0.0);
2962 }, "~N");
2963 Clazz_makeConstructor (c$, 
2964 function () {
2965 this.construct (1.0, 2, 0, 10.0, null, 0.0);
2966 });
2967 Clazz_overrideMethod (c$, "createStrokedShape", 
2968 function (s) {
2969 return s;
2970 }, "java.awt.Shape");
2971 Clazz_defineMethod (c$, "getLineWidth", 
2972 function () {
2973 return this.width;
2974 });
2975 Clazz_defineMethod (c$, "getEndCap", 
2976 function () {
2977 return this.cap;
2978 });
2979 Clazz_defineMethod (c$, "getLineJoin", 
2980 function () {
2981 return this.join;
2982 });
2983 Clazz_defineMethod (c$, "getMiterLimit", 
2984 function () {
2985 return this.miterlimit;
2986 });
2987 Clazz_defineMethod (c$, "getDashArray", 
2988 function () {
2989 if (this.dash == null) {
2990 return null;
2991 }return this.dash.clone ();
2992 });
2993 Clazz_defineMethod (c$, "getDashPhase", 
2994 function () {
2995 return this.dash_phase;
2996 });
2997 Clazz_overrideMethod (c$, "hashCode", 
2998 function () {
2999 var hash = Float.floatToIntBits (this.width);
3000 hash = hash * 31 + this.join;
3001 hash = hash * 31 + this.cap;
3002 hash = hash * 31 + Float.floatToIntBits (this.miterlimit);
3003 if (this.dash != null) {
3004 hash = hash * 31 + Float.floatToIntBits (this.dash_phase);
3005 for (var i = 0; i < this.dash.length; i++) {
3006 hash = hash * 31 + Float.floatToIntBits (this.dash[i]);
3007 }
3008 }return hash;
3009 });
3010 Clazz_overrideMethod (c$, "equals", 
3011 function (obj) {
3012 if (!(Clazz_instanceOf (obj, java.awt.BasicStroke))) {
3013 return false;
3014 }var bs = obj;
3015 if (this.width != bs.width) {
3016 return false;
3017 }if (this.join != bs.join) {
3018 return false;
3019 }if (this.cap != bs.cap) {
3020 return false;
3021 }if (this.miterlimit != bs.miterlimit) {
3022 return false;
3023 }if (this.dash != null) {
3024 if (this.dash_phase != bs.dash_phase) {
3025 return false;
3026 }if (!java.util.Arrays.equals (this.dash, bs.dash)) {
3027 return false;
3028 }} else if (bs.dash != null) {
3029 return false;
3030 }return true;
3031 }, "~O");
3032 Clazz_defineStatics (c$,
3033 "JOIN_MITER", 0,
3034 "JOIN_ROUND", 1,
3035 "JOIN_BEVEL", 2,
3036 "CAP_BUTT", 0,
3037 "CAP_ROUND", 1,
3038 "CAP_SQUARE", 2);
3039 });
3040 Clazz_declarePackage ("java.awt");
3041 Clazz_declareInterface (java.awt, "Stroke");
3042 Clazz_declarePackage ("java.util");
3043 Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () {
3044 c$ = Clazz_decorateAsClass (function () {
3045 this.language = null;
3046 this.country = null;
3047 this.variant = null;
3048 this.hashCodeValue = 0;
3049 Clazz_instantialize (this, arguments);
3050 }, java.util, "Locale", null, [Cloneable, java.io.Serializable]);
3051 Clazz_makeConstructor (c$, 
3052 function (language, country, variant) {
3053 this.language = language.intern ();
3054 this.country = country.intern ();
3055 this.variant = variant.intern ();
3056 }, "~S,~S,~S");
3057 Clazz_makeConstructor (c$, 
3058 function (language, country) {
3059 this.construct (language, country, "");
3060 }, "~S,~S");
3061 Clazz_makeConstructor (c$, 
3062 function (language) {
3063 this.construct (language, "", "");
3064 }, "~S");
3065 Clazz_makeConstructor (c$, 
3066  function (language, country, flag) {
3067 this.language = language;
3068 this.country = country;
3069 this.variant = "";
3070 }, "~S,~S,~B");
3071 c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", 
3072  function (key, language, country) {
3073 var locale =  new java.util.Locale (language, country, false);
3074 java.util.Locale.cache.put (key, locale);
3075 return locale;
3076 }, "~S,~S,~S");
3077 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
3078 function (language, country, variant) {
3079 if (language == null || country == null || variant == null) {
3080 throw  new NullPointerException ();
3081 }var sb =  new StringBuilder ();
3082 sb.append (language).append ('_').append (country).append ('_').append (variant);
3083 var key = sb.toString ();
3084 var locale = java.util.Locale.cache.get (key);
3085 if (locale == null) {
3086 locale =  new java.util.Locale (language, country, variant);
3087 var l = java.util.Locale.cache.put (key, locale);
3088 if (l != null) {
3089 locale = l;
3090 }}return locale;
3091 }, "~S,~S,~S");
3092 c$.getDefault = Clazz_defineMethod (c$, "getDefault", 
3093 function () {
3094 if (java.util.Locale.defaultLocale == null) {
3095 var language;
3096 var country;
3097 var variant;
3098 language = "en";
3099 country = "";
3100 variant = "";
3101 java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant);
3102 }return java.util.Locale.defaultLocale;
3103 });
3104 c$.setDefault = Clazz_defineMethod (c$, "setDefault", 
3105 function (newLocale) {
3106 if (newLocale == null) throw  new NullPointerException ("Can't set default locale to NULL");
3107 java.util.Locale.defaultLocale = newLocale;
3108 }, "java.util.Locale");
3109 Clazz_defineMethod (c$, "getLanguage", 
3110 function () {
3111 return this.language;
3112 });
3113 Clazz_defineMethod (c$, "getCountry", 
3114 function () {
3115 return this.country;
3116 });
3117 Clazz_defineMethod (c$, "getVariant", 
3118 function () {
3119 return this.variant;
3120 });
3121 Clazz_overrideMethod (c$, "toString", 
3122 function () {
3123 var l = this.language.length != 0;
3124 var c = this.country.length != 0;
3125 var v = this.variant.length != 0;
3126 var result =  new StringBuilder (this.language);
3127 if (c || (l && v)) {
3128 result.append ('_').append (this.country);
3129 }if (v && (l || c)) {
3130 result.append ('_').append (this.variant);
3131 }return result.toString ();
3132 });
3133 Clazz_defineMethod (c$, "getDisplayLanguage", 
3134 function () {
3135 return this.getDisplayLanguage (java.util.Locale.getDefault ());
3136 });
3137 Clazz_defineMethod (c$, "getDisplayLanguage", 
3138 function (inLocale) {
3139 return this.getDisplayString (this.language, inLocale, 0);
3140 }, "java.util.Locale");
3141 Clazz_defineMethod (c$, "getDisplayCountry", 
3142 function () {
3143 return this.getDisplayCountry (java.util.Locale.getDefault ());
3144 });
3145 Clazz_defineMethod (c$, "getDisplayCountry", 
3146 function (inLocale) {
3147 return this.getDisplayString (this.country, inLocale, 1);
3148 }, "java.util.Locale");
3149 Clazz_defineMethod (c$, "getDisplayString", 
3150  function (code, inLocale, type) {
3151 if (code.length == 0) {
3152 return "";
3153 }if (inLocale == null) {
3154 throw  new NullPointerException ();
3155 }return inLocale.toString ();
3156 }, "~S,java.util.Locale,~N");
3157 Clazz_defineMethod (c$, "getDisplayVariant", 
3158 function () {
3159 return this.getDisplayVariant (java.util.Locale.getDefault ());
3160 });
3161 Clazz_defineMethod (c$, "getDisplayVariant", 
3162 function (inLocale) {
3163 if (this.variant.length == 0) return "";
3164 return this.variant;
3165 }, "java.util.Locale");
3166 Clazz_defineMethod (c$, "getDisplayName", 
3167 function () {
3168 return this.getDisplayName (java.util.Locale.getDefault ());
3169 });
3170 Clazz_defineMethod (c$, "getDisplayName", 
3171 function (inLocale) {
3172 return inLocale.toString ();
3173 }, "java.util.Locale");
3174 Clazz_defineMethod (c$, "clone", 
3175 function () {
3176 try {
3177 var that = Clazz_superCall (this, java.util.Locale, "clone", []);
3178 return that;
3179 } catch (e) {
3180 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
3181 throw  new InternalError ();
3182 } else {
3183 throw e;
3184 }
3185 }
3186 });
3187 Clazz_overrideMethod (c$, "hashCode", 
3188 function () {
3189 var hc = this.hashCodeValue;
3190 if (hc == 0) {
3191 hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4);
3192 this.hashCodeValue = hc;
3193 }return hc;
3194 });
3195 Clazz_overrideMethod (c$, "equals", 
3196 function (obj) {
3197 if (this === obj) return true;
3198 if (!(Clazz_instanceOf (obj, java.util.Locale))) return false;
3199 var other = obj;
3200 return this.language === other.language && this.country === other.country && this.variant === other.variant;
3201 }, "~O");
3202 c$.cache = c$.prototype.cache =  new java.util.HashMap (32);
3203 c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", "");
3204 c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", "");
3205 Clazz_defineStatics (c$,
3206 "DISPLAY_LANGUAGE", 0,
3207 "DISPLAY_COUNTRY", 1,
3208 "defaultLocale", null);
3209 });
3210 Clazz_declarePackage ("java.util");
3211 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 () {
3212 c$ = Clazz_decorateAsClass (function () {
3213 this.parent = null;
3214 this.locale = null;
3215 this.expired = false;
3216 this.$keySet = null;
3217 Clazz_instantialize (this, arguments);
3218 }, java.util, "ResourceBundle");
3219 Clazz_makeConstructor (c$, 
3220 function () {
3221 });
3222 Clazz_defineMethod (c$, "getString", 
3223 function (key) {
3224 return this.getObject (key);
3225 }, "~S");
3226 Clazz_defineMethod (c$, "getStringArray", 
3227 function (key) {
3228 return this.getObject (key);
3229 }, "~S");
3230 Clazz_defineMethod (c$, "getObject", 
3231 function (key) {
3232 var obj = this.handleGetObject (key);
3233 if (obj == null) {
3234 if (this.parent != null) {
3235 obj = this.parent.getObject (key);
3236 }if (obj == null) throw  new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key);
3237 }return obj;
3238 }, "~S");
3239 Clazz_defineMethod (c$, "getLocale", 
3240 function () {
3241 return this.locale;
3242 });
3243 Clazz_defineMethod (c$, "setParent", 
3244 function (parent) {
3245 this.parent = parent;
3246 }, "java.util.ResourceBundle");
3247 c$.getBundle = Clazz_defineMethod (c$, "getBundle", 
3248 function (baseName, targetLocale, loader, control) {
3249 var n = 4;
3250 {
3251 n = arguments.length;
3252 }switch (n) {
3253 case 2:
3254 if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) {
3255 control = targetLocale;
3256 targetLocale = null;
3257 }break;
3258 case 3:
3259 if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) {
3260 control = loader;
3261 loader = null;
3262 }break;
3263 }
3264 if (targetLocale == null) targetLocale = java.util.Locale.getDefault ();
3265 if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3266 return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control);
3267 }, "~S,~O,~O,java.util.ResourceBundle.Control");
3268 c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", 
3269  function (baseName, locale, loader, control) {
3270 if (control == null) {
3271 throw  new NullPointerException ("ResourceBundle locale or control is null");
3272 }var cacheKey =  new java.util.ResourceBundle.CacheKey (baseName, locale, loader);
3273 var bundle = null;
3274 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3275 if (bundleRef != null) {
3276 bundle = bundleRef;
3277 bundleRef = null;
3278 }if (java.util.ResourceBundle.isValidBundle (bundle)) {
3279 return bundle;
3280 }var formats = control.getFormats (baseName);
3281 var baseBundle = null;
3282 for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) {
3283 var candidateLocales = control.getCandidateLocales (baseName, targetLocale);
3284 bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle);
3285 if (java.util.ResourceBundle.isValidBundle (bundle)) {
3286 var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale);
3287 if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) {
3288 break;
3289 }if (isBaseBundle && baseBundle == null) {
3290 baseBundle = bundle;
3291 }}}
3292 if (bundle == null) {
3293 if (baseBundle == null) {
3294 java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ());
3295 }bundle = baseBundle;
3296 }return bundle;
3297 }, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control");
3298 c$.findBundle = Clazz_defineMethod (c$, "findBundle", 
3299  function (cacheKey, candidateLocales, formats, index, control, baseBundle) {
3300 var targetLocale = candidateLocales.get (index);
3301 var parent = null;
3302 if (index != candidateLocales.size () - 1) {
3303 parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle);
3304 } else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) {
3305 return baseBundle;
3306 }var expiredBundle = false;
3307 cacheKey.setLocale (targetLocale);
3308 var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control);
3309 if (java.util.ResourceBundle.isValidBundle (bundle)) {
3310 expiredBundle = bundle.expired;
3311 if (!expiredBundle) {
3312 if (bundle.parent === parent) {
3313 return bundle;
3314 }var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3315 if (bundleRef != null && bundleRef === bundle) {
3316 java.util.ResourceBundle.cacheList.remove (cacheKey);
3317 }}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) {
3318 var constKey = cacheKey.clone ();
3319 try {
3320 try {
3321 bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle);
3322 if (bundle != null) {
3323 if (bundle.parent == null) {
3324 bundle.setParent (parent);
3325 }bundle.locale = targetLocale;
3326 bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control);
3327 return bundle;
3328 }java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control);
3329 } finally {
3330 }
3331 } finally {
3332 if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) {
3333 Thread.currentThread ().interrupt ();
3334 }}
3335 }return parent;
3336 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");
3337 c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", 
3338  function (cacheKey, formats, control, reload) {
3339 var targetLocale = cacheKey.getLocale ();
3340 var bundle = null;
3341 var size = formats.size ();
3342 for (var i = 0; i < size; i++) {
3343 var format = formats.get (i);
3344 try {
3345 bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload);
3346 } catch (e$$) {
3347 if (Clazz_exceptionOf (e$$, LinkageError)) {
3348 var error = e$$;
3349 {
3350 cacheKey.setCause (error);
3351 }
3352 } else if (Clazz_exceptionOf (e$$, Exception)) {
3353 var cause = e$$;
3354 {
3355 cacheKey.setCause (cause);
3356 }
3357 } else {
3358 throw e$$;
3359 }
3360 }
3361 if (bundle != null) {
3362 cacheKey.setFormat (format);
3363 bundle.locale = targetLocale;
3364 bundle.expired = false;
3365 break;
3366 }}
3367 return bundle;
3368 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B");
3369 c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", 
3370  function (bundle) {
3371 return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE;
3372 }, "java.util.ResourceBundle");
3373 c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", 
3374  function (baseName, locale, cause) {
3375 if (Clazz_instanceOf (cause, java.util.MissingResourceException)) {
3376 cause = null;
3377 }throw  new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause);
3378 }, "~S,java.util.Locale,Throwable");
3379 c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", 
3380  function (cacheKey, control) {
3381 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3382 if (bundleRef == null) {
3383 return null;
3384 }var bundle = bundleRef;
3385 return bundle;
3386 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control");
3387 c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", 
3388  function (cacheKey, bundle, control) {
3389 var key = cacheKey.clone ();
3390 java.util.ResourceBundle.cacheList.put (key, bundle);
3391 return bundle;
3392 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control");
3393 c$.clearCache = Clazz_defineMethod (c$, "clearCache", 
3394 function () {
3395 java.util.ResourceBundle.cacheList.clear ();
3396 });
3397 Clazz_defineMethod (c$, "containsKey", 
3398 function (key) {
3399 if (key == null) {
3400 throw  new NullPointerException ();
3401 }for (var rb = this; rb != null; rb = rb.parent) {
3402 if (rb.handleKeySet ().contains (key)) {
3403 return true;
3404 }}
3405 return false;
3406 }, "~S");
3407 Clazz_defineMethod (c$, "keySet", 
3408 function () {
3409 var keys =  new java.util.HashSet ();
3410 for (var rb = this; rb != null; rb = rb.parent) {
3411 keys.addAll (rb.handleKeySet ());
3412 }
3413 return keys;
3414 });
3415 Clazz_defineMethod (c$, "handleKeySet", 
3416 function () {
3417 if (this.$keySet == null) {
3418 {
3419 if (this.$keySet == null) {
3420 var keys =  new java.util.HashSet ();
3421 var enumKeys = this.getKeys ();
3422 while (enumKeys.hasMoreElements ()) {
3423 var key = enumKeys.nextElement ();
3424 if (this.handleGetObject (key) != null) {
3425 keys.add (key);
3426 }}
3427 this.$keySet = keys;
3428 }}}return this.$keySet;
3429 });
3430 c$.$ResourceBundle$1$ = function () {
3431 Clazz_pu$h(self.c$);
3432 c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle);
3433 Clazz_defineMethod (c$, "getKeys", 
3434 function () {
3435 return null;
3436 });
3437 Clazz_defineMethod (c$, "handleGetObject", 
3438 function (key) {
3439 return null;
3440 }, "~S");
3441 Clazz_overrideMethod (c$, "toString", 
3442 function () {
3443 return "NONEXISTENT_BUNDLE";
3444 });
3445 c$ = Clazz_p0p ();
3446 };
3447 Clazz_pu$h(self.c$);
3448 c$ = Clazz_decorateAsClass (function () {
3449 this.name = null;
3450 this.locale = null;
3451 this.format = null;
3452 this.cause = null;
3453 this.hashCodeCache = 0;
3454 Clazz_instantialize (this, arguments);
3455 }, java.util.ResourceBundle, "CacheKey", null, Cloneable);
3456 Clazz_makeConstructor (c$, 
3457 function (a, b, c) {
3458 this.name = a;
3459 this.locale = b;
3460 if (this.name != null) this.calculateHashCode ();
3461 }, "~S,java.util.Locale,~O");
3462 Clazz_defineMethod (c$, "getName", 
3463 function () {
3464 return this.name;
3465 });
3466 Clazz_defineMethod (c$, "getLocale", 
3467 function () {
3468 return this.locale;
3469 });
3470 Clazz_defineMethod (c$, "setLocale", 
3471 function (a) {
3472 if (!this.locale.equals (a)) {
3473 this.locale = a;
3474 this.calculateHashCode ();
3475 }return this;
3476 }, "java.util.Locale");
3477 Clazz_overrideMethod (c$, "equals", 
3478 function (a) {
3479 if (this === a) {
3480 return true;
3481 }try {
3482 var b = a;
3483 if (this.hashCodeCache != b.hashCodeCache) {
3484 return false;
3485 }if (!this.name.equals (b.name)) {
3486 return false;
3487 }if (!this.locale.equals (b.locale)) {
3488 return false;
3489 }return true;
3490 } catch (e$$) {
3491 if (Clazz_exceptionOf (e$$, NullPointerException)) {
3492 var e = e$$;
3493 {
3494 }
3495 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
3496 var e = e$$;
3497 {
3498 }
3499 } else {
3500 throw e$$;
3501 }
3502 }
3503 return false;
3504 }, "~O");
3505 Clazz_overrideMethod (c$, "hashCode", 
3506 function () {
3507 return this.hashCodeCache;
3508 });
3509 Clazz_defineMethod (c$, "calculateHashCode", 
3510  function () {
3511 this.hashCodeCache = this.name.hashCode () << 3;
3512 this.hashCodeCache ^= this.locale.hashCode ();
3513 });
3514 Clazz_defineMethod (c$, "clone", 
3515 function () {
3516 try {
3517 var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []);
3518 a.cause = null;
3519 return a;
3520 } catch (e) {
3521 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
3522 throw  new InternalError ();
3523 } else {
3524 throw e;
3525 }
3526 }
3527 });
3528 Clazz_defineMethod (c$, "setFormat", 
3529 function (a) {
3530 this.format = a;
3531 }, "~S");
3532 Clazz_defineMethod (c$, "setCause", 
3533  function (a) {
3534 if (this.cause == null) {
3535 this.cause = a;
3536 } else {
3537 if (Clazz_instanceOf (this.cause, ClassNotFoundException)) {
3538 this.cause = a;
3539 }}}, "Throwable");
3540 Clazz_defineMethod (c$, "getCause", 
3541  function () {
3542 return this.cause;
3543 });
3544 Clazz_overrideMethod (c$, "toString", 
3545 function () {
3546 var a = this.locale.toString ();
3547 if (a.length == 0) {
3548 if (this.locale.getVariant ().length != 0) {
3549 a = "__" + this.locale.getVariant ();
3550 } else {
3551 a = "\"\"";
3552 }}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]";
3553 });
3554 c$ = Clazz_p0p ();
3555 Clazz_pu$h(self.c$);
3556 c$ = Clazz_declareType (java.util.ResourceBundle, "Control");
3557 Clazz_makeConstructor (c$, 
3558 function () {
3559 });
3560 c$.getControl = Clazz_defineMethod (c$, "getControl", 
3561 function (a) {
3562 if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
3563 return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY;
3564 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
3565 return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY;
3566 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
3567 return java.util.ResourceBundle.Control.INSTANCE;
3568 }throw  new IllegalArgumentException ();
3569 }, "java.util.List");
3570 c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", 
3571 function (a) {
3572 if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
3573 return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK;
3574 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
3575 return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK;
3576 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
3577 return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK;
3578 }throw  new IllegalArgumentException ();
3579 }, "java.util.List");
3580 Clazz_defineMethod (c$, "getFormats", 
3581 function (a) {
3582 if (a == null) {
3583 throw  new NullPointerException ();
3584 }return java.util.ResourceBundle.Control.FORMAT_DEFAULT;
3585 }, "~S");
3586 Clazz_defineMethod (c$, "getCandidateLocales", 
3587 function (a, b) {
3588 if (a == null) {
3589 throw  new NullPointerException ();
3590 }var c = b.getLanguage ();
3591 var d = b.getCountry ();
3592 var e = b.getVariant ();
3593 var f =  new java.util.ArrayList (4);
3594 if (e.length > 0) {
3595 f.add (b);
3596 }if (d.length > 0) {
3597 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, ""));
3598 }if (c.length > 0) {
3599 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", ""));
3600 }f.add (java.util.Locale.ROOT);
3601 return f;
3602 }, "~S,java.util.Locale");
3603 Clazz_defineMethod (c$, "getFallbackLocale", 
3604 function (a, b) {
3605 if (a == null) {
3606 throw  new NullPointerException ();
3607 }var c = java.util.Locale.getDefault ();
3608 return b.equals (c) ? null : c;
3609 }, "~S,java.util.Locale");
3610 Clazz_defineMethod (c$, "newBundle", 
3611 function (a, b, c, d, e) {
3612 var f = this.toBundleName (a, b);
3613 var g = null;
3614 if (c.equals ("java.class")) {
3615 g = swingjs.api.Interface.getInstance (f, false);
3616 } else if (c.equals ("java.properties")) {
3617 var h = this.toResourceName0 (f, "properties");
3618 if (h == null) {
3619 return null;
3620 }var i = swingjs.JSToolkit.getJavaResource (h);
3621 var j = null;
3622 j = (i == null ? null :  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ())));
3623 if (j != null) {
3624 try {
3625 g = this.newPropertyBundle (j);
3626 } finally {
3627 j.close ();
3628 }
3629 }} else {
3630 throw  new IllegalArgumentException ("unknown format: " + c);
3631 }return g;
3632 }, "~S,java.util.Locale,~S,~O,~B");
3633 Clazz_defineMethod (c$, "newPropertyBundle", 
3634  function (a) {
3635 return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a);
3636 }, "java.io.InputStream");
3637 Clazz_defineMethod (c$, "getTimeToLive", 
3638 function (a, b) {
3639 if (a == null || b == null) {
3640 throw  new NullPointerException ();
3641 }return -2;
3642 }, "~S,java.util.Locale");
3643 Clazz_defineMethod (c$, "toBundleName", 
3644 function (a, b) {
3645 if (b === java.util.Locale.ROOT) {
3646 return a;
3647 }var c = b.getLanguage ();
3648 var d = b.getCountry ();
3649 var e = b.getVariant ();
3650 if (c === "" && d === "" && e === "") {
3651 return a;
3652 }var f =  new StringBuilder (a);
3653 f.append ('_');
3654 if (e !== "") {
3655 f.append (c).append ('_').append (d).append ('_').append (e);
3656 } else if (d !== "") {
3657 f.append (c).append ('_').append (d);
3658 } else {
3659 f.append (c);
3660 }return f.toString ();
3661 }, "~S,java.util.Locale");
3662 Clazz_defineMethod (c$, "toResourceName", 
3663 function (a, b) {
3664 var c =  new StringBuilder (a.length + 1 + b.length);
3665 c.append (a.$replace ('.', '/')).append ('.').append (b);
3666 return c.toString ();
3667 }, "~S,~S");
3668 Clazz_defineMethod (c$, "toResourceName0", 
3669  function (a, b) {
3670 if (a.contains ("://")) {
3671 return null;
3672 } else {
3673 return this.toResourceName (a, b);
3674 }}, "~S,~S");
3675 c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"]));
3676 c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"]));
3677 c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"]));
3678 Clazz_defineStatics (c$,
3679 "TTL_DONT_CACHE", -1,
3680 "TTL_NO_EXPIRATION_CONTROL", -2);
3681 c$.INSTANCE = c$.prototype.INSTANCE =  new java.util.ResourceBundle.Control ();
3682 c$ = Clazz_p0p ();
3683 Clazz_pu$h(self.c$);
3684 c$ = Clazz_decorateAsClass (function () {
3685 this.formats = null;
3686 Clazz_instantialize (this, arguments);
3687 }, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control);
3688 Clazz_makeConstructor (c$, 
3689 function (a) {
3690 Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []);
3691 this.formats = a;
3692 }, "java.util.List");
3693 Clazz_overrideMethod (c$, "getFormats", 
3694 function (a) {
3695 if (a == null) {
3696 throw  new NullPointerException ();
3697 }return this.formats;
3698 }, "~S");
3699 c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3700 c$.CLASS_ONLY = c$.prototype.CLASS_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
3701 c$ = Clazz_p0p ();
3702 Clazz_pu$h(self.c$);
3703 c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl);
3704 Clazz_overrideMethod (c$, "getFallbackLocale", 
3705 function (a, b) {
3706 if (a == null || b == null) {
3707 throw  new NullPointerException ();
3708 }return null;
3709 }, "~S,java.util.Locale");
3710 c$.NO_FALLBACK = c$.prototype.NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT);
3711 c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3712 c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
3713 c$ = Clazz_p0p ();
3714 Clazz_defineStatics (c$,
3715 "INITIAL_CACHE_SIZE", 32);
3716 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));
3717 c$.cacheList = c$.prototype.cacheList =  new java.util.HashMap (32);
3718 });
3719 Clazz_declarePackage ("JU");
3720 Clazz_load (["javajs.api.GenericLineReader"], "JU.Rdr", ["java.io.BufferedInputStream", "$.BufferedReader", "$.ByteArrayInputStream", "$.InputStreamReader", "$.StringReader", "JU.AU", "$.Base64", "$.Encoding", "$.SB"], function () {
3721 c$ = Clazz_decorateAsClass (function () {
3722 this.reader = null;
3723 Clazz_instantialize (this, arguments);
3724 }, JU, "Rdr", null, javajs.api.GenericLineReader);
3725 Clazz_makeConstructor (c$, 
3726 function (reader) {
3727 this.reader = reader;
3728 }, "java.io.BufferedReader");
3729 Clazz_overrideMethod (c$, "readNextLine", 
3730 function () {
3731 return this.reader.readLine ();
3732 });
3733 c$.readCifData = Clazz_defineMethod (c$, "readCifData", 
3734 function (parser, br) {
3735 return parser.set (null, br).getAllCifData ();
3736 }, "javajs.api.GenericCifDataParser,java.io.BufferedReader");
3737 c$.fixUTF = Clazz_defineMethod (c$, "fixUTF", 
3738 function (bytes) {
3739 var encoding = JU.Rdr.getUTFEncoding (bytes);
3740 if (encoding !== JU.Encoding.NONE) try {
3741 var s =  String.instantialize (bytes, encoding.name ().$replace ('_', '-'));
3742 switch (encoding) {
3743 case JU.Encoding.UTF8:
3744 case JU.Encoding.UTF_16BE:
3745 case JU.Encoding.UTF_16LE:
3746 s = s.substring (1);
3747 break;
3748 default:
3749 break;
3750 }
3751 return s;
3752 } catch (e) {
3753 if (Clazz_exceptionOf (e, java.io.UnsupportedEncodingException)) {
3754 System.out.println (e);
3755 } else {
3756 throw e;
3757 }
3758 }
3759 return  String.instantialize (bytes);
3760 }, "~A");
3761 c$.getUTFEncoding = Clazz_defineMethod (c$, "getUTFEncoding", 
3762  function (bytes) {
3763 if (bytes.length >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) return JU.Encoding.UTF8;
3764 if (bytes.length >= 4 && bytes[0] == 0 && bytes[1] == 0 && bytes[2] == 0xFE && bytes[3] == 0xFF) return JU.Encoding.UTF_32BE;
3765 if (bytes.length >= 4 && bytes[0] == 0xFF && bytes[1] == 0xFE && bytes[2] == 0 && bytes[3] == 0) return JU.Encoding.UTF_32LE;
3766 if (bytes.length >= 2 && bytes[0] == 0xFF && bytes[1] == 0xFE) return JU.Encoding.UTF_16LE;
3767 if (bytes.length >= 2 && bytes[0] == 0xFE && bytes[1] == 0xFF) return JU.Encoding.UTF_16BE;
3768 return JU.Encoding.NONE;
3769 }, "~A");
3770 c$.getUTFEncodingForStream = Clazz_defineMethod (c$, "getUTFEncodingForStream", 
3771  function (is) {
3772 {
3773 is.resetStream();
3774 }var abMagic =  Clazz_newByteArray (4, 0);
3775 abMagic[3] = 1;
3776 try {
3777 is.mark (5);
3778 } catch (e) {
3779 if (Clazz_exceptionOf (e, Exception)) {
3780 return JU.Encoding.NONE;
3781 } else {
3782 throw e;
3783 }
3784 }
3785 is.read (abMagic, 0, 4);
3786 is.reset ();
3787 return JU.Rdr.getUTFEncoding (abMagic);
3788 }, "java.io.BufferedInputStream");
3789 c$.isBase64 = Clazz_defineMethod (c$, "isBase64", 
3790 function (sb) {
3791 return (sb.indexOf (";base64,") == 0);
3792 }, "JU.SB");
3793 c$.isCompoundDocumentS = Clazz_defineMethod (c$, "isCompoundDocumentS", 
3794 function (is) {
3795 return JU.Rdr.isCompoundDocumentB (JU.Rdr.getMagic (is, 8));
3796 }, "java.io.InputStream");
3797 c$.isCompoundDocumentB = Clazz_defineMethod (c$, "isCompoundDocumentB", 
3798 function (bytes) {
3799 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);
3800 }, "~A");
3801 c$.isGzipS = Clazz_defineMethod (c$, "isGzipS", 
3802 function (is) {
3803 return JU.Rdr.isGzipB (JU.Rdr.getMagic (is, 2));
3804 }, "java.io.InputStream");
3805 c$.isGzipB = Clazz_defineMethod (c$, "isGzipB", 
3806 function (bytes) {
3807 return (bytes != null && bytes.length >= 2 && bytes[0] == 0x1F && bytes[1] == 0x8B);
3808 }, "~A");
3809 c$.isPickleS = Clazz_defineMethod (c$, "isPickleS", 
3810 function (is) {
3811 return JU.Rdr.isPickleB (JU.Rdr.getMagic (is, 2));
3812 }, "java.io.InputStream");
3813 c$.isPickleB = Clazz_defineMethod (c$, "isPickleB", 
3814 function (bytes) {
3815 return (bytes != null && bytes.length >= 2 && bytes[0] == 0x7D && bytes[1] == 0x71);
3816 }, "~A");
3817 c$.isPngZipStream = Clazz_defineMethod (c$, "isPngZipStream", 
3818 function (is) {
3819 return JU.Rdr.isPngZipB (JU.Rdr.getMagic (is, 55));
3820 }, "java.io.InputStream");
3821 c$.isPngZipB = Clazz_defineMethod (c$, "isPngZipB", 
3822 function (bytes) {
3823 return (bytes[50] == 0 && bytes[51] == 0x50 && bytes[52] == 0x4E && bytes[53] == 0x47 && bytes[54] == 0x4A);
3824 }, "~A");
3825 c$.isZipS = Clazz_defineMethod (c$, "isZipS", 
3826 function (is) {
3827 return JU.Rdr.isZipB (JU.Rdr.getMagic (is, 4));
3828 }, "java.io.InputStream");
3829 c$.isZipB = Clazz_defineMethod (c$, "isZipB", 
3830 function (bytes) {
3831 return (bytes.length >= 4 && bytes[0] == 0x50 && bytes[1] == 0x4B && bytes[2] == 0x03 && bytes[3] == 0x04);
3832 }, "~A");
3833 c$.getMagic = Clazz_defineMethod (c$, "getMagic", 
3834  function (is, n) {
3835 var abMagic =  Clazz_newByteArray (n, 0);
3836 {
3837 is.resetStream();
3838 }try {
3839 is.mark (n + 1);
3840 is.read (abMagic, 0, n);
3841 } catch (e) {
3842 if (Clazz_exceptionOf (e, java.io.IOException)) {
3843 } else {
3844 throw e;
3845 }
3846 }
3847 try {
3848 is.reset ();
3849 } catch (e) {
3850 if (Clazz_exceptionOf (e, java.io.IOException)) {
3851 } else {
3852 throw e;
3853 }
3854 }
3855 return abMagic;
3856 }, "java.io.InputStream,~N");
3857 c$.getBIS = Clazz_defineMethod (c$, "getBIS", 
3858 function (bytes) {
3859 return  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (bytes));
3860 }, "~A");
3861 c$.getBR = Clazz_defineMethod (c$, "getBR", 
3862 function (string) {
3863 return  new java.io.BufferedReader ( new java.io.StringReader (string));
3864 }, "~S");
3865 c$.getUnzippedInputStream = Clazz_defineMethod (c$, "getUnzippedInputStream", 
3866 function (jzt, bis) {
3867 while (JU.Rdr.isGzipS (bis)) bis =  new java.io.BufferedInputStream (JU.Rdr.newGZIPInputStream (jzt, bis));
3868
3869 return bis;
3870 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
3871 c$.getBytesFromSB = Clazz_defineMethod (c$, "getBytesFromSB", 
3872 function (sb) {
3873 return (JU.Rdr.isBase64 (sb) ? JU.Base64.decodeBase64 (sb.substring (8)) : sb.toBytes (0, -1));
3874 }, "JU.SB");
3875 c$.getStreamAsBytes = Clazz_defineMethod (c$, "getStreamAsBytes", 
3876 function (bis, out) {
3877 var buf =  Clazz_newByteArray (1024, 0);
3878 var bytes = (out == null ?  Clazz_newByteArray (4096, 0) : null);
3879 var len = 0;
3880 var totalLen = 0;
3881 while ((len = bis.read (buf, 0, 1024)) > 0) {
3882 totalLen += len;
3883 if (out == null) {
3884 if (totalLen >= bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2);
3885 System.arraycopy (buf, 0, bytes, totalLen - len, len);
3886 } else {
3887 out.write (buf, 0, len);
3888 }}
3889 bis.close ();
3890 if (out == null) {
3891 return JU.AU.arrayCopyByte (bytes, totalLen);
3892 }return totalLen + " bytes";
3893 }, "java.io.BufferedInputStream,JU.OC");
3894 c$.getBufferedReader = Clazz_defineMethod (c$, "getBufferedReader", 
3895 function (bis, charSet) {
3896 if (JU.Rdr.getUTFEncodingForStream (bis) === JU.Encoding.NONE) return  new java.io.BufferedReader ( new java.io.InputStreamReader (bis, (charSet == null ? "UTF-8" : charSet)));
3897 var bytes = JU.Rdr.getLimitedStreamBytes (bis, -1);
3898 bis.close ();
3899 return JU.Rdr.getBR (charSet == null ? JU.Rdr.fixUTF (bytes) :  String.instantialize (bytes, charSet));
3900 }, "java.io.BufferedInputStream,~S");
3901 c$.getLimitedStreamBytes = Clazz_defineMethod (c$, "getLimitedStreamBytes", 
3902 function (is, n) {
3903 var buflen = (n > 0 && n < 1024 ? n : 1024);
3904 var buf =  Clazz_newByteArray (buflen, 0);
3905 var bytes =  Clazz_newByteArray (n < 0 ? 4096 : n, 0);
3906 var len = 0;
3907 var totalLen = 0;
3908 if (n < 0) n = 2147483647;
3909 while (totalLen < n && (len = is.read (buf, 0, buflen)) > 0) {
3910 totalLen += len;
3911 if (totalLen > bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2);
3912 System.arraycopy (buf, 0, bytes, totalLen - len, len);
3913 if (n != 2147483647 && totalLen + buflen > bytes.length) buflen = bytes.length - totalLen;
3914 }
3915 if (totalLen == bytes.length) return bytes;
3916 buf =  Clazz_newByteArray (totalLen, 0);
3917 System.arraycopy (bytes, 0, buf, 0, totalLen);
3918 return buf;
3919 }, "java.io.InputStream,~N");
3920 c$.StreamToUTF8String = Clazz_defineMethod (c$, "StreamToUTF8String", 
3921 function (bis) {
3922 var data =  new Array (1);
3923 try {
3924 JU.Rdr.readAllAsString (JU.Rdr.getBufferedReader (bis, "UTF-8"), -1, true, data, 0);
3925 } catch (e) {
3926 if (Clazz_exceptionOf (e, java.io.IOException)) {
3927 } else {
3928 throw e;
3929 }
3930 }
3931 return data[0];
3932 }, "java.io.BufferedInputStream");
3933 c$.readAllAsString = Clazz_defineMethod (c$, "readAllAsString", 
3934 function (br, nBytesMax, allowBinary, data, i) {
3935 try {
3936 var sb = JU.SB.newN (8192);
3937 var line;
3938 if (nBytesMax < 0) {
3939 line = br.readLine ();
3940 if (allowBinary || line != null && line.indexOf ('\0') < 0 && (line.length != 4 || line.charCodeAt (0) != 65533 || line.indexOf ("PNG") != 1)) {
3941 sb.append (line).appendC ('\n');
3942 while ((line = br.readLine ()) != null) sb.append (line).appendC ('\n');
3943
3944 }} else {
3945 var n = 0;
3946 var len;
3947 while (n < nBytesMax && (line = br.readLine ()) != null) {
3948 if (nBytesMax - n < (len = line.length) + 1) line = line.substring (0, nBytesMax - n - 1);
3949 sb.append (line).appendC ('\n');
3950 n += len + 1;
3951 }
3952 }br.close ();
3953 data[i] = sb.toString ();
3954 return true;
3955 } catch (ioe) {
3956 if (Clazz_exceptionOf (ioe, Exception)) {
3957 data[i] = ioe.toString ();
3958 return false;
3959 } else {
3960 throw ioe;
3961 }
3962 }
3963 }, "java.io.BufferedReader,~N,~B,~A,~N");
3964 c$.getPngZipPointAndCount = Clazz_defineMethod (c$, "getPngZipPointAndCount", 
3965 function (bis, pt_count) {
3966 bis.mark (75);
3967 try {
3968 var data = JU.Rdr.getLimitedStreamBytes (bis, 74);
3969 bis.reset ();
3970 var pt = 0;
3971 for (var i = 64, f = 1; --i > 54; f *= 10) pt += (data[i] - 48) * f;
3972
3973 var n = 0;
3974 for (var i = 74, f = 1; --i > 64; f *= 10) n += (data[i] - 48) * f;
3975
3976 pt_count[0] = pt;
3977 pt_count[1] = n;
3978 } catch (e) {
3979 pt_count[1] = 0;
3980 }
3981 }, "java.io.BufferedInputStream,~A");
3982 c$.getPngZipStream = Clazz_defineMethod (c$, "getPngZipStream", 
3983 function (bis, asNewStream) {
3984 if (!JU.Rdr.isPngZipStream (bis)) return bis;
3985 var data =  Clazz_newByteArray (0, 0);
3986 bis.mark (75);
3987 try {
3988 var pt_count =  Clazz_newIntArray (2, 0);
3989 JU.Rdr.getPngZipPointAndCount (bis, pt_count);
3990 if (pt_count[1] != 0) {
3991 var pt = pt_count[0];
3992 while (pt > 0) pt -= bis.skip (pt);
3993
3994 if (!asNewStream) return bis;
3995 data = JU.Rdr.getLimitedStreamBytes (bis, pt_count[1]);
3996 }} catch (e) {
3997 } finally {
3998 try {
3999 if (asNewStream) bis.close ();
4000 } catch (e) {
4001 if (Clazz_exceptionOf (e, Exception)) {
4002 } else {
4003 throw e;
4004 }
4005 }
4006 }
4007 return JU.Rdr.getBIS (data);
4008 }, "java.io.BufferedInputStream,~B");
4009 c$.readFileAsMap = Clazz_defineMethod (c$, "readFileAsMap", 
4010 function (jzt, is, bdata, name) {
4011 jzt.readFileAsMap (is, bdata, name);
4012 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,java.util.Map,~S");
4013 c$.getZipDirectoryAsStringAndClose = Clazz_defineMethod (c$, "getZipDirectoryAsStringAndClose", 
4014 function (jzt, t) {
4015 return jzt.getZipDirectoryAsStringAndClose (t);
4016 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
4017 c$.newGZIPInputStream = Clazz_defineMethod (c$, "newGZIPInputStream", 
4018 function (jzt, bis) {
4019 return jzt.newGZIPInputStream (bis);
4020 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
4021 c$.newZipInputStream = Clazz_defineMethod (c$, "newZipInputStream", 
4022 function (jzt, $in) {
4023 return jzt.newZipInputStream ($in);
4024 }, "javajs.api.GenericZipTools,java.io.InputStream");
4025 c$.getZipFileDirectory = Clazz_defineMethod (c$, "getZipFileDirectory", 
4026 function (jzt, bis, subFileList, listPtr, asBufferedInputStream) {
4027 return jzt.getZipFileDirectory (jzt, bis, subFileList, listPtr, asBufferedInputStream);
4028 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N,~B");
4029 c$.getZipDirectoryAndClose = Clazz_defineMethod (c$, "getZipDirectoryAndClose", 
4030 function (jzt, t, manifestID) {
4031 return jzt.getZipDirectoryAndClose (t, manifestID);
4032 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~S");
4033 c$.getAllZipData = Clazz_defineMethod (c$, "getAllZipData", 
4034 function (jzt, bis, subFileList, replace, string, fileData) {
4035 jzt.getAllZipData (bis, subFileList, replace, string, fileData);
4036 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~S,~S,java.util.Map");
4037 c$.getZipFileContentsAsBytes = Clazz_defineMethod (c$, "getZipFileContentsAsBytes", 
4038 function (jzt, bis, subFileList, i) {
4039 return jzt.getZipFileContentsAsBytes (bis, subFileList, i);
4040 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N");
4041 c$.addZipEntry = Clazz_defineMethod (c$, "addZipEntry", 
4042 function (jzt, zos, fileName) {
4043 jzt.addZipEntry (zos, fileName);
4044 }, "javajs.api.GenericZipTools,~O,~S");
4045 c$.closeZipEntry = Clazz_defineMethod (c$, "closeZipEntry", 
4046 function (jzt, zos) {
4047 jzt.closeZipEntry (zos);
4048 }, "javajs.api.GenericZipTools,~O");
4049 c$.getZipOutputStream = Clazz_defineMethod (c$, "getZipOutputStream", 
4050 function (jzt, bos) {
4051 return jzt.getZipOutputStream (bos);
4052 }, "javajs.api.GenericZipTools,~O");
4053 c$.getCrcValue = Clazz_defineMethod (c$, "getCrcValue", 
4054 function (jzt, bytes) {
4055 return jzt.getCrcValue (bytes);
4056 }, "javajs.api.GenericZipTools,~A");
4057 c$.getZipRoot = Clazz_defineMethod (c$, "getZipRoot", 
4058 function (fileName) {
4059 var pt = fileName.indexOf ("|");
4060 return (pt < 0 ? fileName : fileName.substring (0, pt));
4061 }, "~S");
4062 });
4063 Clazz_declarePackage ("javajs.api");
4064 Clazz_declareInterface (javajs.api, "GenericLineReader");
4065 Clazz_load (["java.io.FilterInputStream"], "java.io.BufferedInputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException"], function () {
4066 c$ = Clazz_decorateAsClass (function () {
4067 this.buf = null;
4068 this.count = 0;
4069 this.pos = 0;
4070 this.markpos = -1;
4071 this.marklimit = 0;
4072 Clazz_instantialize (this, arguments);
4073 }, java.io, "BufferedInputStream", java.io.FilterInputStream);
4074 Clazz_defineMethod (c$, "getInIfOpen", 
4075  function () {
4076 var input = this.$in;
4077 if (input == null) throw  new java.io.IOException ("Stream closed");
4078 return input;
4079 });
4080 Clazz_defineMethod (c$, "getBufIfOpen", 
4081  function () {
4082 var buffer = this.buf;
4083 if (buffer == null) throw  new java.io.IOException ("Stream closed");
4084 return buffer;
4085 });
4086 Clazz_overrideMethod (c$, "resetStream", 
4087 function () {
4088 });
4089 Clazz_makeConstructor (c$, 
4090 function ($in) {
4091 Clazz_superConstructor (this, java.io.BufferedInputStream, [$in]);
4092 this.buf =  Clazz_newByteArray (8192, 0);
4093 }, "java.io.InputStream");
4094 Clazz_defineMethod (c$, "fill", 
4095  function () {
4096 var buffer = this.getBufIfOpen ();
4097 if (this.markpos < 0) this.pos = 0;
4098  else if (this.pos >= buffer.length) if (this.markpos > 0) {
4099 var sz = this.pos - this.markpos;
4100 System.arraycopy (buffer, this.markpos, buffer, 0, sz);
4101 this.pos = sz;
4102 this.markpos = 0;
4103 } else if (buffer.length >= this.marklimit) {
4104 this.markpos = -1;
4105 this.pos = 0;
4106 } else {
4107 var nsz = this.pos * 2;
4108 if (nsz > this.marklimit) nsz = this.marklimit;
4109 var nbuf =  Clazz_newByteArray (nsz, 0);
4110 System.arraycopy (buffer, 0, nbuf, 0, this.pos);
4111 buffer = this.buf = nbuf;
4112 }this.count = this.pos;
4113 var n = this.getInIfOpen ().read (buffer, this.pos, buffer.length - this.pos);
4114 if (n > 0) this.count = n + this.pos;
4115 });
4116 Clazz_overrideMethod (c$, "readByteAsInt", 
4117 function () {
4118 if (this.pos >= this.count) {
4119 this.fill ();
4120 if (this.pos >= this.count) return -1;
4121 }return this.getBufIfOpen ()[this.pos++] & 0xff;
4122 });
4123 Clazz_defineMethod (c$, "read1", 
4124  function (b, off, len) {
4125 var avail = this.count - this.pos;
4126 if (avail <= 0) {
4127 if (len >= this.getBufIfOpen ().length && this.markpos < 0) {
4128 return this.getInIfOpen ().read (b, off, len);
4129 }this.fill ();
4130 avail = this.count - this.pos;
4131 if (avail <= 0) return -1;
4132 }var cnt = (avail < len) ? avail : len;
4133 System.arraycopy (this.getBufIfOpen (), this.pos, b, off, cnt);
4134 this.pos += cnt;
4135 return cnt;
4136 }, "~A,~N,~N");
4137 Clazz_overrideMethod (c$, "read", 
4138 function (b, off, len) {
4139 if (arguments.length == 1) {
4140   off = 0;
4141   len  = b.length;
4142 }
4143 this.getBufIfOpen ();
4144 if ((off | len | (off + len) | (b.length - (off + len))) < 0) {
4145 throw  new IndexOutOfBoundsException ();
4146 } else if (len == 0) {
4147 return 0;
4148 }var n = 0;
4149 for (; ; ) {
4150 var nread = this.read1 (b, off + n, len - n);
4151 if (nread <= 0) return (n == 0) ? nread : n;
4152 n += nread;
4153 if (n >= len) return n;
4154 var input = this.$in;
4155 if (input != null && input.available () <= 0) return n;
4156 }
4157 }, "~A,~N,~N");
4158 Clazz_overrideMethod (c$, "skip", 
4159 function (n) {
4160 this.getBufIfOpen ();
4161 if (n <= 0) {
4162 return 0;
4163 }var avail = this.count - this.pos;
4164 if (avail <= 0) {
4165 if (this.markpos < 0) return this.getInIfOpen ().skip (n);
4166 this.fill ();
4167 avail = this.count - this.pos;
4168 if (avail <= 0) return 0;
4169 }var skipped = (avail < n) ? avail : n;
4170 this.pos += skipped;
4171 return skipped;
4172 }, "~N");
4173 Clazz_overrideMethod (c$, "available", 
4174 function () {
4175 var n = this.count - this.pos;
4176 var avail = this.getInIfOpen ().available ();
4177 return n > (2147483647 - avail) ? 2147483647 : n + avail;
4178 });
4179 Clazz_overrideMethod (c$, "mark", 
4180 function (readlimit) {
4181 this.marklimit = readlimit;
4182 this.markpos = this.pos;
4183 }, "~N");
4184 Clazz_overrideMethod (c$, "reset", 
4185 function () {
4186 this.getBufIfOpen ();
4187 if (this.markpos < 0) throw  new java.io.IOException ("Resetting to invalid mark");
4188 this.pos = this.markpos;
4189 });
4190 Clazz_overrideMethod (c$, "markSupported", 
4191 function () {
4192 return true;
4193 });
4194 Clazz_overrideMethod (c$, "close", 
4195 function () {
4196 var input = this.$in;
4197 this.$in = null;
4198 if (input != null) input.close ();
4199 return;
4200 });
4201 Clazz_defineStatics (c$,
4202 "DEFAULT_BUFFER_SIZE", 8192);
4203 });
4204 Clazz_load (["java.io.InputStream"], "java.io.FilterInputStream", null, function () {
4205 c$ = Clazz_decorateAsClass (function () {
4206 this.$in = null;
4207 Clazz_instantialize (this, arguments);
4208 }, java.io, "FilterInputStream", java.io.InputStream);
4209 Clazz_makeConstructor (c$, 
4210 function ($in) {
4211 Clazz_superConstructor (this, java.io.FilterInputStream, []);
4212 this.$in = $in;
4213 }, "java.io.InputStream");
4214 Clazz_defineMethod (c$, "readByteAsInt", 
4215 function () {
4216 return this.$in.readByteAsInt ();
4217 });
4218 Clazz_defineMethod (c$, "read", 
4219 function (b, off, len) {
4220     if (arguments.length == 1) { off = 0; len = b.length; }
4221 return this.$in.read (b, off, len);
4222 }, "~A,~N,~N");
4223 Clazz_defineMethod (c$, "skip", 
4224 function (n) {
4225 return this.$in.skip (n);
4226 }, "~N");
4227 Clazz_defineMethod (c$, "available", 
4228 function () {
4229 return this.$in.available ();
4230 });
4231 Clazz_defineMethod (c$, "close", 
4232 function () {
4233 this.$in.close ();
4234 });
4235 Clazz_defineMethod (c$, "mark", 
4236 function (readlimit) {
4237 this.$in.mark (readlimit);
4238 }, "~N");
4239 Clazz_defineMethod (c$, "reset", 
4240 function () {
4241 this.$in.reset ();
4242 });
4243 Clazz_defineMethod (c$, "markSupported", 
4244 function () {
4245 return this.$in.markSupported ();
4246 });
4247 });
4248 Clazz_load (null, "java.io.InputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4249 c$ = Clazz_declareType (java.io, "InputStream");
4250 Clazz_defineMethod (c$, "read", 
4251 function (b, off, len) {
4252 if (b == null) {
4253 throw  new NullPointerException ();
4254
4255     if (arguments.length == 1) { off = 0; len = b.length; }
4256
4257 if (off < 0 || len < 0 || len > b.length - off) {
4258 throw  new IndexOutOfBoundsException ();
4259 } else if (len == 0) {
4260 return 0;
4261 }var c = this.readByteAsInt ();
4262 if (c == -1) {
4263 return -1;
4264 }b[off] = c;
4265 var i = 1;
4266 try {
4267 for (; i < len; i++) {
4268 c = this.readByteAsInt ();
4269 if (c == -1) {
4270 break;
4271 }b[off + i] = c;
4272 }
4273 } catch (ee) {
4274 if (Clazz_exceptionOf (ee, java.io.IOException)) {
4275 } else {
4276 throw ee;
4277 }
4278 }
4279 return i;
4280 }, "~A,~N,~N");
4281 Clazz_defineMethod (c$, "skip", 
4282 function (n) {
4283 var remaining = n;
4284 var nr;
4285 if (java.io.InputStream.skipBuffer == null) java.io.InputStream.skipBuffer =  Clazz_newByteArray (2048, 0);
4286 var localSkipBuffer = java.io.InputStream.skipBuffer;
4287 if (n <= 0) {
4288 return 0;
4289 }while (remaining > 0) {
4290 nr = this.read (localSkipBuffer, 0, Math.min (2048, remaining));
4291 if (nr < 0) {
4292 break;
4293 }remaining -= nr;
4294 }
4295 return n - remaining;
4296 }, "~N");
4297 Clazz_defineMethod (c$, "available", 
4298 function () {
4299 return 0;
4300 });
4301 Clazz_defineMethod (c$, "close", 
4302 function () {
4303 });
4304 Clazz_defineMethod (c$, "mark", 
4305 function (readlimit) {
4306 }, "~N");
4307 Clazz_defineMethod (c$, "reset", 
4308 function () {
4309 throw  new java.io.IOException ("mark/reset not supported");
4310 });
4311 Clazz_defineMethod (c$, "markSupported", 
4312 function () {
4313 return false;
4314 });
4315 Clazz_defineMethod (c$, "resetStream", 
4316 function () {
4317 });
4318 Clazz_defineStatics (c$,
4319 "SKIP_BUFFER_SIZE", 2048,
4320 "skipBuffer", null);
4321 });
4322 Clazz_load (["java.io.Reader"], "java.io.BufferedReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException", "JU.SB"], function () {
4323 c$ = Clazz_decorateAsClass (function () {
4324 this.$in = null;
4325 this.cb = null;
4326 this.nChars = 0;
4327 this.nextChar = 0;
4328 this.markedChar = -1;
4329 this.readAheadLimit = 0;
4330 this.skipLF = false;
4331 this.markedSkipLF = false;
4332 Clazz_instantialize (this, arguments);
4333 }, java.io, "BufferedReader", java.io.Reader);
4334 Clazz_defineMethod (c$, "setSize", 
4335  function (sz) {
4336 if (sz <= 0) throw  new IllegalArgumentException ("Buffer size <= 0");
4337 this.cb =  Clazz_newCharArray (sz, '\0');
4338 this.nextChar = this.nChars = 0;
4339 }, "~N");
4340 Clazz_makeConstructor (c$, 
4341 function ($in) {
4342 Clazz_superConstructor (this, java.io.BufferedReader, [$in]);
4343 this.$in = $in;
4344 this.setSize (8192);
4345 }, "java.io.Reader");
4346 Clazz_defineMethod (c$, "ensureOpen", 
4347  function () {
4348 if (this.$in == null) throw  new java.io.IOException ("Stream closed");
4349 });
4350 Clazz_defineMethod (c$, "fill", 
4351  function () {
4352 var dst;
4353 if (this.markedChar <= -1) {
4354 dst = 0;
4355 } else {
4356 var delta = this.nextChar - this.markedChar;
4357 if (delta >= this.readAheadLimit) {
4358 this.markedChar = -2;
4359 this.readAheadLimit = 0;
4360 dst = 0;
4361 } else {
4362 if (this.readAheadLimit <= this.cb.length) {
4363 System.arraycopy (this.cb, this.markedChar, this.cb, 0, delta);
4364 this.markedChar = 0;
4365 dst = delta;
4366 } else {
4367 var ncb =  Clazz_newCharArray (this.readAheadLimit, '\0');
4368 System.arraycopy (this.cb, this.markedChar, ncb, 0, delta);
4369 this.cb = ncb;
4370 this.markedChar = 0;
4371 dst = delta;
4372 }this.nextChar = this.nChars = delta;
4373 }}var n;
4374 do {
4375 n = this.$in.read (this.cb, dst, this.cb.length - dst);
4376 } while (n == 0);
4377 if (n > 0) {
4378 this.nChars = dst + n;
4379 this.nextChar = dst;
4380 }});
4381 Clazz_defineMethod (c$, "read1", 
4382  function (cbuf, off, len) {
4383 if (this.nextChar >= this.nChars) {
4384 if (len >= this.cb.length && this.markedChar <= -1 && !this.skipLF) {
4385 return this.$in.read (cbuf, off, len);
4386 }this.fill ();
4387 }if (this.nextChar >= this.nChars) return -1;
4388 if (this.skipLF) {
4389 this.skipLF = false;
4390 if (this.cb[this.nextChar] == '\n') {
4391 this.nextChar++;
4392 if (this.nextChar >= this.nChars) this.fill ();
4393 if (this.nextChar >= this.nChars) return -1;
4394 }}var n = Math.min (len, this.nChars - this.nextChar);
4395 System.arraycopy (this.cb, this.nextChar, cbuf, off, n);
4396 this.nextChar += n;
4397 return n;
4398 }, "~A,~N,~N");
4399 Clazz_defineMethod (c$, "read", 
4400 function (cbuf, off, len) {
4401 {
4402 this.ensureOpen ();
4403 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4404 throw  new IndexOutOfBoundsException ();
4405 } else if (len == 0) {
4406 return 0;
4407 }var n = this.read1 (cbuf, off, len);
4408 if (n <= 0) return n;
4409 while ((n < len) && this.$in.ready ()) {
4410 var n1 = this.read1 (cbuf, off + n, len - n);
4411 if (n1 <= 0) break;
4412 n += n1;
4413 }
4414 return n;
4415 }}, "~A,~N,~N");
4416 Clazz_defineMethod (c$, "readLine1", 
4417  function (ignoreLF) {
4418 var s = null;
4419 var startChar;
4420 {
4421 this.ensureOpen ();
4422 var omitLF = ignoreLF || this.skipLF;
4423 for (; ; ) {
4424 if (this.nextChar >= this.nChars) this.fill ();
4425 if (this.nextChar >= this.nChars) {
4426 if (s != null && s.length () > 0) return s.toString ();
4427 return null;
4428 }var eol = false;
4429 var c = String.fromCharCode (0);
4430 var i;
4431 if (omitLF && (this.cb[this.nextChar] == '\n')) this.nextChar++;
4432 this.skipLF = false;
4433 omitLF = false;
4434 charLoop : for (i = this.nextChar; i < this.nChars; i++) {
4435 c = this.cb[i];
4436 if ((c == '\n') || (c == '\r')) {
4437 eol = true;
4438 break charLoop;
4439 }}
4440 startChar = this.nextChar;
4441 this.nextChar = i;
4442 if (eol) {
4443 var str;
4444 if (s == null) {
4445 str =  String.instantialize (this.cb, startChar, i - startChar);
4446 } else {
4447 s.appendCB (this.cb, startChar, i - startChar);
4448 str = s.toString ();
4449 }this.nextChar++;
4450 if (c == '\r') {
4451 this.skipLF = true;
4452 }return str;
4453 }if (s == null) s = JU.SB.newN (80);
4454 s.appendCB (this.cb, startChar, i - startChar);
4455 }
4456 }}, "~B");
4457 Clazz_defineMethod (c$, "readLine", 
4458 function () {
4459 return this.readLine1 (false);
4460 });
4461 Clazz_overrideMethod (c$, "skip", 
4462 function (n) {
4463 if (n < 0) {
4464 throw  new IllegalArgumentException ("skip value is negative");
4465 }{
4466 this.ensureOpen ();
4467 var r = n;
4468 while (r > 0) {
4469 if (this.nextChar >= this.nChars) this.fill ();
4470 if (this.nextChar >= this.nChars) break;
4471 if (this.skipLF) {
4472 this.skipLF = false;
4473 if (this.cb[this.nextChar] == '\n') {
4474 this.nextChar++;
4475 }}var d = this.nChars - this.nextChar;
4476 if (r <= d) {
4477 this.nextChar += r;
4478 r = 0;
4479 break;
4480 }r -= d;
4481 this.nextChar = this.nChars;
4482 }
4483 return n - r;
4484 }}, "~N");
4485 Clazz_defineMethod (c$, "ready", 
4486 function () {
4487 {
4488 this.ensureOpen ();
4489 if (this.skipLF) {
4490 if (this.nextChar >= this.nChars && this.$in.ready ()) {
4491 this.fill ();
4492 }if (this.nextChar < this.nChars) {
4493 if (this.cb[this.nextChar] == '\n') this.nextChar++;
4494 this.skipLF = false;
4495 }}return (this.nextChar < this.nChars) || this.$in.ready ();
4496 }});
4497 Clazz_overrideMethod (c$, "markSupported", 
4498 function () {
4499 return true;
4500 });
4501 Clazz_overrideMethod (c$, "mark", 
4502 function (readAheadLimit) {
4503 if (readAheadLimit < 0) {
4504 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4505 }{
4506 this.ensureOpen ();
4507 this.readAheadLimit = readAheadLimit;
4508 this.markedChar = this.nextChar;
4509 this.markedSkipLF = this.skipLF;
4510 }}, "~N");
4511 Clazz_overrideMethod (c$, "reset", 
4512 function () {
4513 {
4514 this.ensureOpen ();
4515 if (this.markedChar < 0) throw  new java.io.IOException ((this.markedChar == -2) ? "Mark invalid" : "Stream not marked");
4516 this.nextChar = this.markedChar;
4517 this.skipLF = this.markedSkipLF;
4518 }});
4519 Clazz_defineMethod (c$, "close", 
4520 function () {
4521 {
4522 if (this.$in == null) return;
4523 this.$in.close ();
4524 this.$in = null;
4525 this.cb = null;
4526 }});
4527 Clazz_defineStatics (c$,
4528 "INVALIDATED", -2,
4529 "UNMARKED", -1,
4530 "DEFAULT_CHAR_BUFFER_SIZE", 8192,
4531 "DEFAULT_EXPECTED_LINE_LENGTH", 80);
4532 });
4533 Clazz_load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4534 c$ = Clazz_decorateAsClass (function () {
4535 this.buf = null;
4536 this.pos = 0;
4537 this.$mark = 0;
4538 this.count = 0;
4539 Clazz_instantialize (this, arguments);
4540 }, java.io, "ByteArrayInputStream", java.io.InputStream);
4541 Clazz_makeConstructor (c$, 
4542 function (buf) {
4543 Clazz_superConstructor (this, java.io.ByteArrayInputStream, []);
4544 this.buf = buf;
4545 this.pos = 0;
4546 this.count = buf.length;
4547 }, "~A");
4548 Clazz_overrideMethod (c$, "readByteAsInt", 
4549 function () {
4550 return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1;
4551 });
4552 Clazz_overrideMethod (c$, "read", 
4553 function (b, off, len) {
4554 if (b == null) {
4555 throw  new NullPointerException ();
4556 }
4557     if (arguments.length == 1) { off = 0; len = b.length; }
4558
4559 if (off < 0 || len < 0 || len > b.length - off) {
4560 throw  new IndexOutOfBoundsException ();
4561 }if (this.pos >= this.count) {
4562 return -1;
4563 }var avail = this.count - this.pos;
4564 if (len > avail) {
4565 len = avail;
4566 }if (len <= 0) {
4567 return 0;
4568 }System.arraycopy (this.buf, this.pos, b, off, len);
4569 this.pos += len;
4570 return len;
4571 }, "~A,~N,~N");
4572 Clazz_overrideMethod (c$, "skip", 
4573 function (n) {
4574 var k = this.count - this.pos;
4575 if (n < k) {
4576 k = n < 0 ? 0 : n;
4577 }this.pos += k;
4578 return k;
4579 }, "~N");
4580 Clazz_overrideMethod (c$, "available", 
4581 function () {
4582 return this.count - this.pos;
4583 });
4584 Clazz_overrideMethod (c$, "markSupported", 
4585 function () {
4586 return true;
4587 });
4588 Clazz_overrideMethod (c$, "mark", 
4589 function (readAheadLimit) {
4590 this.$mark = this.pos;
4591 }, "~N");
4592 Clazz_overrideMethod (c$, "resetStream", 
4593 function () {
4594 });
4595 Clazz_overrideMethod (c$, "reset", 
4596 function () {
4597 this.pos = this.$mark;
4598 });
4599 Clazz_overrideMethod (c$, "close", 
4600 function () {
4601 });
4602 });
4603 Clazz_load (["java.io.Closeable"], "java.io.Reader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.NullPointerException"], function () {
4604 c$ = Clazz_decorateAsClass (function () {
4605 this.lock = null;
4606 this.skipBuffer = null;
4607 Clazz_instantialize (this, arguments);
4608 }, java.io, "Reader", null, java.io.Closeable);
4609 Clazz_makeConstructor (c$, 
4610 function (lock) {
4611 if (lock == null) {
4612 throw  new NullPointerException ();
4613 }this.lock = lock;
4614 }, "~O");
4615 Clazz_defineMethod (c$, "skip", 
4616 function (n) {
4617 if (n < 0) throw  new IllegalArgumentException ("skip value is negative");
4618 var nn = Math.min (n, 8192);
4619 {
4620 if ((this.skipBuffer == null) || (this.skipBuffer.length < nn)) this.skipBuffer =  Clazz_newCharArray (nn, '\0');
4621 var r = n;
4622 while (r > 0) {
4623 var nc = this.read (this.skipBuffer, 0, Math.min (r, nn));
4624 if (nc == -1) break;
4625 r -= nc;
4626 }
4627 return n - r;
4628 }}, "~N");
4629 Clazz_defineMethod (c$, "ready", 
4630 function () {
4631 return false;
4632 });
4633 Clazz_defineMethod (c$, "markSupported", 
4634 function () {
4635 return false;
4636 });
4637 Clazz_defineMethod (c$, "mark", 
4638 function (readAheadLimit) {
4639 throw  new java.io.IOException ("mark() not supported");
4640 }, "~N");
4641 Clazz_defineMethod (c$, "reset", 
4642 function () {
4643 throw  new java.io.IOException ("reset() not supported");
4644 });
4645 Clazz_defineStatics (c$,
4646 "MAX_SKIP_BUFFE_SIZE", 8192);
4647 });
4648 Clazz_load (["java.io.Reader"], "java.io.StringReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException"], function () {
4649 c$ = Clazz_decorateAsClass (function () {
4650 this.str = null;
4651 this.length = 0;
4652 this.next = 0;
4653 this.$mark = 0;
4654 Clazz_instantialize (this, arguments);
4655 }, java.io, "StringReader", java.io.Reader);
4656 Clazz_makeConstructor (c$, 
4657 function (s) {
4658 Clazz_superConstructor (this, java.io.StringReader, [s]);
4659 this.str = s;
4660 this.length = s.length;
4661 }, "~S");
4662 Clazz_defineMethod (c$, "ensureOpen", 
4663  function () {
4664 if (this.str == null) throw  new java.io.IOException ("Stream closed");
4665 });
4666 Clazz_overrideMethod (c$, "read", 
4667 function (cbuf, off, len) {
4668 {
4669 this.ensureOpen ();
4670 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4671 throw  new IndexOutOfBoundsException ();
4672 } else if (len == 0) {
4673 return 0;
4674 }if (this.next >= this.length) return -1;
4675 var n = Math.min (this.length - this.next, len);
4676 this.str.getChars (this.next, this.next + n, cbuf, off);
4677 this.next += n;
4678 return n;
4679 }}, "~A,~N,~N");
4680 Clazz_overrideMethod (c$, "skip", 
4681 function (ns) {
4682 {
4683 this.ensureOpen ();
4684 if (this.next >= this.length) return 0;
4685 var n = Math.min (this.length - this.next, ns);
4686 n = Math.max (-this.next, n);
4687 this.next += n;
4688 return n;
4689 }}, "~N");
4690 Clazz_overrideMethod (c$, "ready", 
4691 function () {
4692 {
4693 this.ensureOpen ();
4694 return true;
4695 }});
4696 Clazz_overrideMethod (c$, "markSupported", 
4697 function () {
4698 return true;
4699 });
4700 Clazz_overrideMethod (c$, "mark", 
4701 function (readAheadLimit) {
4702 if (readAheadLimit < 0) {
4703 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4704 }{
4705 this.ensureOpen ();
4706 this.$mark = this.next;
4707 }}, "~N");
4708 Clazz_overrideMethod (c$, "reset", 
4709 function () {
4710 {
4711 this.ensureOpen ();
4712 this.next = this.$mark;
4713 }});
4714 Clazz_overrideMethod (c$, "close", 
4715 function () {
4716 this.str = null;
4717 });
4718 });
4719 Clazz_declarePackage ("JU");
4720 Clazz_load (null, "JU.Base64", ["JU.SB"], function () {
4721 c$ = Clazz_declareType (JU, "Base64");
4722 c$.getBytes64 = Clazz_defineMethod (c$, "getBytes64", 
4723 function (bytes) {
4724 return JU.Base64.getBase64 (bytes).toBytes (0, -1);
4725 }, "~A");
4726 c$.getBase64 = Clazz_defineMethod (c$, "getBase64", 
4727 function (bytes) {
4728 var nBytes = bytes.length;
4729 var sout =  new JU.SB ();
4730 if (nBytes == 0) return sout;
4731 for (var i = 0, nPad = 0; i < nBytes && nPad == 0; ) {
4732 if (i % 75 == 0 && i != 0) sout.append ("\r\n");
4733 nPad = (i + 2 == nBytes ? 1 : i + 1 == nBytes ? 2 : 0);
4734 var outbytes = ((bytes[i++] << 16) & 0xFF0000) | ((nPad == 2 ? 0 : bytes[i++] << 8) & 0x00FF00) | ((nPad >= 1 ? 0 : bytes[i++]) & 0x0000FF);
4735 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 18) & 0x3F));
4736 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 12) & 0x3F));
4737 sout.appendC (nPad == 2 ? '=' : JU.Base64.base64.charAt ((outbytes >> 6) & 0x3F));
4738 sout.appendC (nPad >= 1 ? '=' : JU.Base64.base64.charAt (outbytes & 0x3F));
4739 }
4740 return sout;
4741 }, "~A");
4742 c$.decodeBase64 = Clazz_defineMethod (c$, "decodeBase64", 
4743 function (strBase64) {
4744 var nBytes = 0;
4745 var ch;
4746 var pt0 = strBase64.indexOf (";base64,") + 1;
4747 if (pt0 > 0) pt0 += 7;
4748 var chars64 = strBase64.toCharArray ();
4749 var len64 = chars64.length;
4750 if (len64 == 0) return  Clazz_newByteArray (0, 0);
4751 for (var i = len64; --i >= pt0; ) nBytes += ((ch = (chars64[i]).charCodeAt (0) & 0x7F) == 65 || JU.Base64.decode64[ch] > 0 ? 3 : 0);
4752
4753 nBytes = nBytes >> 2;
4754 var bytes =  Clazz_newByteArray (nBytes, 0);
4755 var offset = 18;
4756 for (var i = pt0, pt = 0, b = 0; i < len64; i++) {
4757 if (JU.Base64.decode64[ch = (chars64[i]).charCodeAt (0) & 0x7F] > 0 || ch == 65 || ch == 61) {
4758 b |= JU.Base64.decode64[ch] << offset;
4759 offset -= 6;
4760 if (offset < 0) {
4761 bytes[pt++] = ((b & 0xFF0000) >> 16);
4762 if (pt < nBytes) bytes[pt++] = ((b & 0xFF00) >> 8);
4763 if (pt < nBytes) bytes[pt++] = (b & 0xFF);
4764 offset = 18;
4765 b = 0;
4766 }}}
4767 return bytes;
4768 }, "~S");
4769 Clazz_defineStatics (c$,
4770 "base64", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
4771 "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]));
4772 });
4773 Clazz_declarePackage ("JU");
4774 Clazz_load (["java.lang.Enum"], "JU.Encoding", null, function () {
4775 c$ = Clazz_declareType (JU, "Encoding", Enum);
4776 Clazz_defineEnumConstant (c$, "NONE", 0, []);
4777 Clazz_defineEnumConstant (c$, "UTF8", 1, []);
4778 Clazz_defineEnumConstant (c$, "UTF_16BE", 2, []);
4779 Clazz_defineEnumConstant (c$, "UTF_16LE", 3, []);
4780 Clazz_defineEnumConstant (c$, "UTF_32BE", 4, []);
4781 Clazz_defineEnumConstant (c$, "UTF_32LE", 5, []);
4782 });
4783 Clazz_declarePackage ("java.util");
4784 Clazz_load (["java.lang.RuntimeException"], "java.util.MissingResourceException", null, function () {
4785 c$ = Clazz_decorateAsClass (function () {
4786 this.className = null;
4787 this.key = null;
4788 Clazz_instantialize (this, arguments);
4789 }, java.util, "MissingResourceException", RuntimeException);
4790 Clazz_makeConstructor (c$, 
4791 function (s, className, key) {
4792 Clazz_superConstructor (this, java.util.MissingResourceException, [s]);
4793 this.className = className;
4794 this.key = key;
4795 }, "~S,~S,~S");
4796 Clazz_makeConstructor (c$, 
4797 function (message, className, key, cause) {
4798 Clazz_superConstructor (this, java.util.MissingResourceException, [message, cause]);
4799 this.className = className;
4800 this.key = key;
4801 }, "~S,~S,~S,Throwable");
4802 Clazz_defineMethod (c$, "getClassName", 
4803 function () {
4804 return this.className;
4805 });
4806 Clazz_defineMethod (c$, "getKey", 
4807 function () {
4808 return this.key;
4809 });
4810 });
4811 Clazz_declarePackage ("jssun.misc");
4812 Clazz_load (null, "jssun.misc.MessageUtils", ["java.lang.Character", "$.StringBuffer"], function () {
4813 c$ = Clazz_declareType (jssun.misc, "MessageUtils");
4814 Clazz_makeConstructor (c$, 
4815 function () {
4816 });
4817 c$.subst = Clazz_defineMethod (c$, "subst", 
4818 function (patt, arg) {
4819 var args =  Clazz_newArray (-1, [arg]);
4820 return jssun.misc.MessageUtils.subst (patt, args);
4821 }, "~S,~S");
4822 c$.subst = Clazz_defineMethod (c$, "subst", 
4823 function (patt, arg1, arg2) {
4824 var args =  Clazz_newArray (-1, [arg1, arg2]);
4825 return jssun.misc.MessageUtils.subst (patt, args);
4826 }, "~S,~S,~S");
4827 c$.subst = Clazz_defineMethod (c$, "subst", 
4828 function (patt, arg1, arg2, arg3) {
4829 var args =  Clazz_newArray (-1, [arg1, arg2, arg3]);
4830 return jssun.misc.MessageUtils.subst (patt, args);
4831 }, "~S,~S,~S,~S");
4832 c$.subst = Clazz_defineMethod (c$, "subst", 
4833 function (patt, args) {
4834 var result =  new StringBuffer ();
4835 var len = patt.length;
4836 for (var i = 0; i >= 0 && i < len; i++) {
4837 var ch = patt.charAt (i);
4838 if (ch == '%') {
4839 if (i != len) {
4840 var index = Character.digit (patt.charAt (i + 1), 10);
4841 if (index == -1) {
4842 result.append (patt.charAt (i + 1));
4843 i++;
4844 } else if (index < args.length) {
4845 result.append (args[index]);
4846 i++;
4847 }}} else {
4848 result.append (ch);
4849 }}
4850 return result.toString ();
4851 }, "~S,~A");
4852 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4853 function (propName, arg) {
4854 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg);
4855 }, "~S,~S");
4856 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4857 function (propName, arg1, arg2) {
4858 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2);
4859 }, "~S,~S,~S");
4860 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4861 function (propName, arg1, arg2, arg3) {
4862 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2, arg3);
4863 }, "~S,~S,~S,~S");
4864 c$.toStderr = Clazz_defineMethod (c$, "toStderr", 
4865 function (msg) {
4866 {
4867 System.out.println(msg);
4868 }}, "~S");
4869 c$.toStdout = Clazz_defineMethod (c$, "toStdout", 
4870 function (msg) {
4871 {
4872 System.out.println(msg);
4873 }}, "~S");
4874 c$.err = Clazz_defineMethod (c$, "err", 
4875 function (s) {
4876 jssun.misc.MessageUtils.toStderr (s + "\n");
4877 }, "~S");
4878 c$.out = Clazz_defineMethod (c$, "out", 
4879 function (s) {
4880 jssun.misc.MessageUtils.toStdout (s + "\n");
4881 }, "~S");
4882 c$.where = Clazz_defineMethod (c$, "where", 
4883 function () {
4884 {
4885 System.out.println(Clazz_getStackTrace());
4886 }});
4887 });
4888 Clazz_declarePackage ("java.awt");
4889 Clazz_load (["java.awt.geom.Dimension2D"], "java.awt.Dimension", null, function () {
4890 c$ = Clazz_decorateAsClass (function () {
4891 this.width = 0;
4892 this.height = 0;
4893 Clazz_instantialize (this, arguments);
4894 }, java.awt, "Dimension", java.awt.geom.Dimension2D);
4895 Clazz_makeConstructor (c$, 
4896 function () {
4897 this.construct (0, 0);
4898 });
4899 Clazz_makeConstructor (c$, 
4900 function (d) {
4901 this.construct (d.width, d.height);
4902 }, "java.awt.Dimension");
4903 Clazz_makeConstructor (c$, 
4904 function (width, height) {
4905 Clazz_superConstructor (this, java.awt.Dimension, []);
4906 this.width = width;
4907 this.height = height;
4908 }, "~N,~N");
4909 Clazz_overrideMethod (c$, "getWidth", 
4910 function () {
4911 return this.width;
4912 });
4913 Clazz_overrideMethod (c$, "getHeight", 
4914 function () {
4915 return this.height;
4916 });
4917 Clazz_defineMethod (c$, "setSize", 
4918 function (width, height) {
4919 this.width = Clazz_doubleToInt (Math.ceil (width));
4920 this.height = Clazz_doubleToInt (Math.ceil (height));
4921 }, "~N,~N");
4922 Clazz_defineMethod (c$, "getSize", 
4923 function () {
4924 return  new java.awt.Dimension (this.width, this.height);
4925 });
4926 Clazz_defineMethod (c$, "setSize", 
4927 function (d) {
4928 this.setSize (d.width, d.height);
4929 }, "java.awt.Dimension");
4930 Clazz_defineMethod (c$, "setSize", 
4931 function (width, height) {
4932 this.width = width;
4933 this.height = height;
4934 }, "~N,~N");
4935 Clazz_overrideMethod (c$, "equals", 
4936 function (obj) {
4937 if (Clazz_instanceOf (obj, java.awt.Dimension)) {
4938 var d = obj;
4939 return (this.width == d.width) && (this.height == d.height);
4940 }return false;
4941 }, "~O");
4942 Clazz_overrideMethod (c$, "hashCode", 
4943 function () {
4944 var sum = this.width + this.height;
4945 return Clazz_doubleToInt (sum * (sum + 1) / 2) + this.width;
4946 });
4947 Clazz_overrideMethod (c$, "toString", 
4948 function () {
4949 return this.getClass ().getName () + "[width=" + this.width + ",height=" + this.height + "]";
4950 });
4951 });
4952 Clazz_declarePackage ("java.awt.geom");
4953 Clazz_load (null, "java.awt.geom.Dimension2D", ["java.lang.InternalError"], function () {
4954 c$ = Clazz_declareType (java.awt.geom, "Dimension2D", null, Cloneable);
4955 Clazz_makeConstructor (c$, 
4956 function () {
4957 });
4958 Clazz_defineMethod (c$, "setSize", 
4959 function (d) {
4960 this.setSize (d.getWidth (), d.getHeight ());
4961 }, "java.awt.geom.Dimension2D");
4962 Clazz_defineMethod (c$, "clone", 
4963 function () {
4964 try {
4965 return Clazz_superCall (this, java.awt.geom.Dimension2D, "clone", []);
4966 } catch (e) {
4967 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
4968 throw  new InternalError ();
4969 } else {
4970 throw e;
4971 }
4972 }
4973 });
4974 });
4975 Clazz_declarePackage ("java.awt");
4976 Clazz_load (["java.awt.Container"], "java.awt.Panel", ["java.awt.FlowLayout"], function () {
4977 c$ = Clazz_declareType (java.awt, "Panel", java.awt.Container);
4978 Clazz_makeConstructor (c$, 
4979 function () {
4980 Clazz_superConstructor (this, java.awt.Panel, []);
4981 this.setPanel ();
4982 });
4983 Clazz_defineMethod (c$, "setPanel", 
4984 function () {
4985 this.setAppContext ();
4986 this.setLayout ( new java.awt.FlowLayout ());
4987 });
4988 Clazz_makeConstructor (c$, 
4989 function (layout) {
4990 Clazz_superConstructor (this, java.awt.Panel, []);
4991 if (layout == null) layout =  new java.awt.FlowLayout ();
4992 this.setAppContext ();
4993 this.setLayout (layout);
4994 }, "java.awt.LayoutManager");
4995 Clazz_overrideMethod (c$, "constructComponentName", 
4996 function () {
4997 {
4998 return "panel" + java.awt.Panel.nameCounter++;
4999 }});
5000 Clazz_defineMethod (c$, "addNotify", 
5001 function () {
5002 if (this.peer == null) this.peer = this.getToolkit ().createPanel (this);
5003 Clazz_superCall (this, java.awt.Panel, "addNotify", []);
5004 });
5005 Clazz_defineStatics (c$,
5006 "base", "panel",
5007 "nameCounter", 0);
5008 });
5009 Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){
5010 c$=Clazz_decorateAsClass(function(){
5011 this.firstIndex=0;
5012 this.lastIndex=0;
5013 this.array=null;
5014 Clazz_instantialize(this,arguments);
5015 },java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);
5016
5017 Clazz_overrideConstructor(c$,
5018 function(){
5019 this.setup(0);
5020 });
5021
5022 Clazz_defineMethod(c$, "setup",
5023 function(capacity){
5024 //Clazz_superConstructor(this,java.util.ArrayList,[]);
5025 this.firstIndex=this.lastIndex=0;
5026 try{
5027 this.array=this.newElementArray(capacity);
5028 }catch(e){
5029 if(Clazz_instanceOf(e,NegativeArraySizeException)){
5030 throw new IllegalArgumentException();
5031 }else{
5032 throw e;
5033 }
5034 }
5035 },"~N");
5036 /*
5037 Clazz_makeConstructor(c$,
5038 function(collection){
5039 Clazz_superConstructor(this,java.util.ArrayList,[]);
5040 var size=collection.size();
5041 this.firstIndex=this.lastIndex=0;
5042 this.array=this.newElementArray(size+(Math.floor(size/10)));
5043 this.addAll(collection);
5044 },"java.util.Collection");
5045
5046 */
5047
5048 Clazz_defineMethod(c$,"newElementArray",
5049 ($fz=function(size){
5050 return new Array(size);
5051 },$fz.isPrivate=true,$fz),"~N");
5052
5053 Clazz_overrideMethod(c$,"add",
5054 function(location,object){
5055
5056 if (arguments.length == 1) {
5057         // coming from Java methods, e.g. Collections.list()
5058         // location is actually the object
5059         return this.add1(location);
5060 }
5061 var size=this.size();
5062 if(0<location&&location<size){
5063 if(this.firstIndex==0&&this.lastIndex==this.array.length){
5064 this.growForInsert(location,1);
5065 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex==this.array.length){
5066 System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,location);
5067 }else{
5068 var index=location+this.firstIndex;
5069 System.arraycopy(this.array,index,this.array,index+1,size-location);
5070 this.lastIndex++;
5071 }this.array[location+this.firstIndex]=object;
5072 }else if(location==0){
5073 if(this.firstIndex==0){
5074 this.growAtFront(1);
5075 }this.array[--this.firstIndex]=object;
5076 }else if(location==size){
5077 if(this.lastIndex==this.array.length){
5078 this.growAtEnd(1);
5079 }this.array[this.lastIndex++]=object;
5080 }else{
5081 throw new IndexOutOfBoundsException();
5082 }this.modCount++;
5083 },"~N,~O");
5084
5085 Clazz_overrideMethod(c$,"add1",
5086 function(object){
5087 if(this.lastIndex==this.array.length){
5088 this.growAtEnd(1);
5089 }this.array[this.lastIndex++]=object;
5090 this.modCount++;
5091 return true;
5092 },"~O");
5093
5094 /* BH disallow addAll(int,List)
5095  * 
5096 Clazz_defineMethod(c$,"addAll",
5097 function(location,collection){
5098 var size=this.size();
5099 if(location<0||location>size){
5100 throw new IndexOutOfBoundsException();
5101 }var growSize=collection.size();
5102 if(0<location&&location<size){
5103 if(this.array.length-size<growSize){
5104 this.growForInsert(location,growSize);
5105 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex>this.array.length-growSize){
5106 var newFirst=this.firstIndex-growSize;
5107 if(newFirst<0){
5108 var index=location+this.firstIndex;
5109 System.arraycopy(this.array,index,this.array,index-newFirst,size-location);
5110 this.lastIndex-=newFirst;
5111 newFirst=0;
5112 }System.arraycopy(this.array,this.firstIndex,this.array,newFirst,location);
5113 this.firstIndex=newFirst;
5114 }else{
5115 var index=location+this.firstIndex;
5116 System.arraycopy(this.array,index,this.array,index+growSize,size-location);
5117 this.lastIndex+=growSize;
5118 }}else if(location==0){
5119 this.growAtFront(growSize);
5120 this.firstIndex-=growSize;
5121 }else if(location==size){
5122 if(this.lastIndex>this.array.length-growSize){
5123 this.growAtEnd(growSize);
5124 }this.lastIndex+=growSize;
5125 }if(growSize>0){
5126 var it=collection.iterator();
5127 var index=location+this.firstIndex;
5128 var end=index+growSize;
5129 while(index<end){
5130 this.array[index++]=it.next();
5131 }
5132 this.modCount++;
5133 return true;
5134 }return false;
5135 },"~N,java.util.Collection");
5136
5137  */
5138
5139 Clazz_overrideMethod(c$,"addAll",
5140 function(collection){
5141 var growSize=collection.size();
5142 if(growSize>0){
5143         if(this.lastIndex>this.array.length-growSize){
5144                 this.growAtEnd(growSize);
5145 }
5146 var it=collection.iterator();
5147 var end=this.lastIndex+growSize;
5148 while(this.lastIndex<end){
5149         this.array[this.lastIndex++]=it.next();
5150 }
5151 this.modCount++;
5152 return true;
5153 }return false;
5154 },"java.util.Collection");
5155
5156 Clazz_overrideMethod(c$,"clear",
5157 function(){
5158 if(this.firstIndex!=this.lastIndex){
5159 this.fill(this.firstIndex,this.lastIndex);
5160 this.firstIndex=this.lastIndex=0;
5161 this.modCount++;
5162 }});
5163
5164 Clazz_defineMethod(c$,"fill", function(i1, i2) { // BH
5165 for (var i = i2; --i >= i1;)
5166 this.array[i] = null;
5167 },"~N,~N");
5168
5169 Clazz_defineMethod(c$,"clone",
5170 function(){
5171 try{
5172 var newList=Clazz_superCall(this,java.util.ArrayList,"clone",[]);
5173 newList.array=this.array.clone();
5174 return newList;
5175 }catch(e){
5176 if(Clazz_instanceOf(e,CloneNotSupportedException)){
5177 return null;
5178 }else{
5179 throw e;
5180 }
5181 }
5182 });
5183 Clazz_overrideMethod(c$,"contains",
5184 function(object){
5185 if(object!=null){
5186 for(var i=this.firstIndex;i<this.lastIndex;i++){
5187 if(object.equals(this.array[i])){
5188 return true;
5189 }}
5190 }else{
5191 for(var i=this.firstIndex;i<this.lastIndex;i++){
5192 if(this.array[i]==null){
5193 return true;
5194 }}
5195 }return false;
5196 },"~O");
5197 Clazz_defineMethod(c$,"ensureCapacity",
5198 function(minimumCapacity){
5199 if(this.array.length<minimumCapacity){
5200 if(this.firstIndex>0){
5201 this.growAtFront(minimumCapacity-this.array.length);
5202 }else{
5203 this.growAtEnd(minimumCapacity-this.array.length);
5204 }}},"~N");
5205 Clazz_overrideMethod(c$,"get",
5206 function(location){
5207 if(0<=location&&location<this.size()){
5208 return this.array[this.firstIndex+location];
5209 }throw new IndexOutOfBoundsException();
5210 },"~N");
5211
5212
5213 Clazz_defineMethod(c$,"growAtEnd",
5214 ($fz=function(required){
5215 var size=this.size();
5216 if(this.firstIndex>=required-(this.array.length-this.lastIndex)){
5217         var newLast=this.lastIndex-this.firstIndex;
5218         if(size>0){
5219                 System.arraycopy(this.array,this.firstIndex,this.array,0,size);
5220                 var start=newLast<this.firstIndex?this.firstIndex:newLast;
5221                 this.fill(start,this.array.length);
5222         }
5223         this.firstIndex=0;
5224         this.lastIndex=newLast;
5225 }else{
5226         var increment=Math.floor(size/2);
5227         if(required>increment){
5228                 increment=required;
5229         }
5230         if(increment<12){
5231                 increment=12;
5232         }
5233         var newArray=this.newElementArray(size+increment);
5234         if(size>0){
5235                 System.arraycopy(this.array,this.firstIndex,newArray,this.firstIndex,size);
5236         }
5237         this.array=newArray;
5238 }
5239
5240 },$fz.isPrivate=true,$fz),"~N");
5241 Clazz_defineMethod(c$,"growAtFront",
5242 ($fz=function(required){
5243 var size=this.size();
5244 if(this.array.length-this.lastIndex>=required){
5245 var newFirst=this.array.length-size;
5246 if(size>0){
5247 System.arraycopy(this.array,this.firstIndex,this.array,newFirst,size);
5248 var length=this.firstIndex+size>newFirst?newFirst:this.firstIndex+size;
5249 this.fill(this.firstIndex,length);
5250 }this.firstIndex=newFirst;
5251 this.lastIndex=this.array.length;
5252 }else{
5253 var increment=Math.floor(size/2);
5254 if(required>increment){
5255 increment=required;
5256 }if(increment<12){
5257 increment=12;
5258 }var newArray=this.newElementArray(size+increment);
5259 if(size>0){
5260 System.arraycopy(this.array,this.firstIndex,newArray,newArray.length-size,size);
5261 }this.firstIndex=newArray.length-size;
5262 this.lastIndex=newArray.length;
5263 this.array=newArray;
5264 }},$fz.isPrivate=true,$fz),"~N");
5265 Clazz_defineMethod(c$,"growForInsert",
5266 ($fz=function(location,required){
5267 var size=this.size();
5268 var increment=Math.floor(size/2);
5269 if(required>increment){
5270 increment=required;
5271 }if(increment<12){
5272 increment=12;
5273 }var newArray=this.newElementArray(size+increment);
5274 if(location<Math.floor(size/2)){
5275 var newFirst=newArray.length-(size+required);
5276 System.arraycopy(this.array,location,newArray,location+increment,size-location);
5277 System.arraycopy(this.array,this.firstIndex,newArray,newFirst,location);
5278 this.firstIndex=newFirst;
5279 this.lastIndex=newArray.length;
5280 }else{
5281 System.arraycopy(this.array,this.firstIndex,newArray,0,location);
5282 System.arraycopy(this.array,location,newArray,location+required,size-location);
5283 this.firstIndex=0;
5284 this.lastIndex+=required;
5285 }this.array=newArray;
5286 },$fz.isPrivate=true,$fz),"~N,~N");
5287 Clazz_overrideMethod(c$,"indexOf",
5288 function(object){
5289 if(object!=null){
5290 for(var i=this.firstIndex;i<this.lastIndex;i++){
5291 if(object.equals(this.array[i])){
5292 return i-this.firstIndex;
5293 }}
5294 }else{
5295 for(var i=this.firstIndex;i<this.lastIndex;i++){
5296 if(this.array[i]==null){
5297 return i-this.firstIndex;
5298 }}
5299 }return-1;
5300 },"~O");
5301 Clazz_overrideMethod(c$,"isEmpty",
5302 function(){
5303 return this.lastIndex==this.firstIndex;
5304 });
5305 Clazz_overrideMethod(c$,"lastIndexOf",
5306 function(object){
5307 if(object!=null){
5308 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5309 if(object.equals(this.array[i])){
5310 return i-this.firstIndex;
5311 }}
5312 }else{
5313 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5314 if(this.array[i]==null){
5315 return i-this.firstIndex;
5316 }}
5317 }return-1;
5318 },"~O");
5319 Clazz_overrideMethod(c$,"remove",
5320 function(location){
5321 var result;
5322 var size=this.size();
5323 if(0<=location&&location<size){
5324 if(location==size-1){
5325 result=this.array[--this.lastIndex];
5326 this.array[this.lastIndex]=null;
5327 }else if(location==0){
5328 result=this.array[this.firstIndex];
5329 this.array[this.firstIndex++]=null;
5330 }else{
5331 var elementIndex=this.firstIndex+location;
5332 result=this.array[elementIndex];
5333 if(location<Math.floor(size/2)){
5334 System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,location);
5335 this.array[this.firstIndex++]=null;
5336 }else{
5337 System.arraycopy(this.array,elementIndex+1,this.array,elementIndex,size-location-1);
5338 this.array[--this.lastIndex]=null;
5339 }}}else{
5340 throw new IndexOutOfBoundsException();
5341 }this.modCount++;
5342 return result;
5343 },"~N"); 
5344
5345 Clazz_defineMethod(c$, "removeObject", function(o) {
5346         var i = this.indexOf(o);
5347         if (i < 0)return null;
5348         return this.remove(i);
5349 }, "~O");
5350
5351 Clazz_overrideMethod(c$,"removeRange",
5352 function(start,end){
5353 if(start>=0&&start<=end&&end<=this.size()){
5354 if(start==end){
5355 return;
5356 }var size=this.size();
5357 if(end==size){
5358         this.fill(this.firstIndex+start,this.lastIndex);
5359 this.lastIndex=this.firstIndex+start;
5360 }else if(start==0){
5361         this.fill(this.firstIndex,this.firstIndex+end);
5362 this.firstIndex+=end;
5363 }else{
5364 System.arraycopy(this.array,this.firstIndex+end,this.array,this.firstIndex+start,size-end);
5365 var newLast=this.lastIndex+start-end;
5366 this.fill(newLast,this.lastIndex);
5367 this.lastIndex=newLast;
5368 }this.modCount++;
5369 }else{
5370 throw new IndexOutOfBoundsException();
5371 }},"~N,~N");
5372 Clazz_overrideMethod(c$,"set",
5373 function(location,object){
5374 if(0<=location&&location<this.size()){
5375 var result=this.array[this.firstIndex+location];
5376 this.array[this.firstIndex+location]=object;
5377 return result;
5378 }throw new IndexOutOfBoundsException();
5379 },"~N,~O");
5380 Clazz_overrideMethod(c$,"size",
5381 function(){
5382 return this.lastIndex-this.firstIndex;
5383 });
5384 /*
5385 Clazz_defineMethod(c$,"toArray",
5386 function(){
5387 var size=this.size();
5388 var result=new Array(size);
5389 System.arraycopy(this.array,this.firstIndex,result,0,size);
5390 return result;
5391 });
5392 */
5393
5394 Clazz_overrideMethod(c$,"toArray",
5395 function(contents){
5396 var size=this.size();
5397 if(!contents || size>contents.length)
5398         contents= new Array(size);
5399 System.arraycopy(this.array,this.firstIndex,contents,0,size);
5400 if(size<contents.length){
5401 contents[size]=null;
5402 }return contents;
5403 },"~O");
5404 Clazz_defineMethod(c$,"trimToSize",
5405 function(){
5406 var size=this.size();
5407 var newArray=this.newElementArray(size);
5408 System.arraycopy(this.array,this.firstIndex,newArray,0,size);
5409 this.array=newArray;
5410 this.firstIndex=0;
5411 this.lastIndex=this.array.length;
5412 });
5413 });
5414 // BH 8/25/2014 1:10:59 AM  - removed indirect access/inner class business.
5415
5416 Clazz_load(["java.util.AbstractCollection","$.Iterator","$.List","$.ListIterator","$.RandomAccess","$.NoSuchElementException"],"java.util.AbstractList",["java.lang.IllegalArgumentException","$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){
5417 c$=Clazz_decorateAsClass(function(){
5418 this.modCount=0;
5419
5420
5421
5422 //if(!Clazz_isClassDefined("java.util.AbstractList.SimpleListIterator")){
5423 //java.util.AbstractList.$AbstractList$SimpleListIterator$();
5424 //}
5425 //if(!Clazz_isClassDefined("java.util.AbstractList.FullListIterator")){
5426 //java.util.AbstractList.$AbstractList$FullListIterator$();
5427 //}
5428
5429
5430
5431 Clazz_instantialize(this,arguments);
5432 },java.util,"AbstractList",java.util.AbstractCollection,java.util.List);
5433 Clazz_defineMethod(c$,"add",
5434 function(location,object){
5435 throw new UnsupportedOperationException();
5436 },"~N,~O");
5437 Clazz_defineMethod(c$,"add",
5438 function(object){
5439 this.add(this.size(),object);
5440 return true;
5441 },"~O");
5442 Clazz_defineMethod(c$,"addAll",
5443 function(location,collection){
5444 var it=collection.iterator();
5445 while(it.hasNext()){
5446 this.add(location++,it.next());
5447 }
5448 return!collection.isEmpty();
5449 },"~N,java.util.Collection");
5450 Clazz_overrideMethod(c$,"clear",
5451 function(){
5452 this.removeRange(0,this.size());
5453 });
5454 Clazz_overrideMethod(c$,"equals",
5455 function(object){
5456 if(this===object){
5457 return true;
5458 }if(Clazz_instanceOf(object,java.util.List)){
5459 var list=object;
5460 if(list.size()!=this.size()){
5461 return false;
5462 }var it1=this.iterator();
5463 var it2=list.iterator();
5464 while(it1.hasNext()){
5465 var e1=it1.next();
5466 var e2=it2.next();
5467 if(!(e1==null?e2==null:e1.equals(e2))){
5468 return false;
5469 }}
5470 return true;
5471 }return false;
5472 },"~O");
5473 Clazz_overrideMethod(c$,"hashCode",
5474 function(){
5475 var result=1;
5476 var it=this.iterator();
5477 while(it.hasNext()){
5478 var object=it.next();
5479 result=(31*result)+(object==null?0:object.hashCode());
5480 }
5481 return result;
5482 });
5483 Clazz_overrideMethod(c$,"indexOf",
5484 function(object){
5485 var it=this.listIterator();
5486 if(object!=null){
5487 while(it.hasNext()){
5488 if(object.equals(it.next())){
5489 return it.previousIndex();
5490 }}
5491 }else{
5492 while(it.hasNext()){
5493 if(it.next()==null){
5494 return it.previousIndex();
5495 }}
5496 }return-1;
5497 },"~O");
5498 Clazz_overrideMethod(c$,"iterator",
5499 function(){
5500 return new java.util.AbstractListSimpleListIterator(this); // Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null);
5501 });
5502 Clazz_overrideMethod(c$,"lastIndexOf",
5503 function(object){
5504 var it=this.listIterator(this.size());
5505 if(object!=null){
5506 while(it.hasPrevious()){
5507 if(object.equals(it.previous())){
5508 return it.nextIndex();
5509 }}
5510 }else{
5511 while(it.hasPrevious()){
5512 if(it.previous()==null){
5513 return it.nextIndex();
5514 }}
5515 }return-1;
5516 },"~O");
5517 //Clazz_defineMethod(c$,"listIterator",
5518 //function(){
5519 //return this.listIterator(0);
5520 //});
5521 Clazz_defineMethod(c$,"listIterator",
5522 function(location){
5523 location || (location = 0);
5524 return new java.util.AbstractListFullListIterator(this, location);//Clazz_innerTypeInstance(java.util.AbstractList.FullListIterator,this,null,location);
5525 },"~N");
5526 Clazz_defineMethod(c$,"remove",
5527 function(location){
5528 throw new UnsupportedOperationException();
5529 },"~N");
5530 Clazz_defineMethod(c$,"removeRange",
5531 function(start,end){
5532 var it=this.listIterator(start);
5533 for(var i=start;i<end;i++){
5534 it.next();
5535 it.remove();
5536 }
5537 },"~N,~N");
5538 Clazz_overrideMethod(c$,"set",
5539 function(location,object){
5540 throw new UnsupportedOperationException();
5541 },"~N,~O");
5542 Clazz_overrideMethod(c$,"subList",
5543 function(start,end){
5544 if(0<=start&&end<=this.size()){
5545 if(start<=end){
5546 if(Clazz_instanceOf(this,java.util.RandomAccess)){
5547 return new java.util.AbstractList.SubAbstractListRandomAccess(this,start,end);
5548 }return new java.util.AbstractList.SubAbstractList(this,start,end);
5549 }throw new IllegalArgumentException();
5550 }throw new IndexOutOfBoundsException();
5551 },"~N,~N");
5552
5553
5554
5555 //c$.$AbstractList$SimpleListIterator$=function(){
5556
5557 Clazz_pu$h(self.c$);
5558
5559 c$=Clazz_decorateAsClass(function(){
5560 //Clazz_prepareCallback(this,arguments);
5561 this.pos=-1;
5562 this.expectedModCount=0;
5563 this.lastPosition=-1;
5564 Clazz_instantialize(this,arguments);
5565 },java.util,"AbstractListSimpleListIterator",null,java.util.Iterator);
5566
5567
5568 Clazz_makeConstructor(c$,
5569 function(a){
5570 this._list = a;
5571 this.expectedModCount=a.modCount;
5572 }, "java.util.AbstractList");
5573
5574 Clazz_overrideMethod(c$,"hasNext",
5575 function(){
5576 return this.pos+1<this._list.size();
5577 });
5578 Clazz_overrideMethod(c$,"next",
5579 function(){
5580 if(this.expectedModCount==this._list.modCount){
5581 try{
5582 var a=this._list.get(this.pos+1);
5583 this.lastPosition=++this.pos;
5584 return a;
5585 }catch(e){
5586 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5587 throw new java.util.NoSuchElementException();
5588 }else{
5589 throw e;
5590 }
5591 }
5592 }throw new java.util.ConcurrentModificationException();
5593 });
5594 Clazz_overrideMethod(c$,"remove",
5595 function(){
5596 if(this.expectedModCount==this._list.modCount){
5597 try{
5598 this._list.remove(this.lastPosition);
5599 }catch(e){
5600 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5601 throw new IllegalStateException();
5602 }else{
5603 throw e;
5604 }
5605 }
5606 if(this._list.modCount!=this.expectedModCount){
5607 this.expectedModCount++;
5608 }if(this.pos==this.lastPosition){
5609 this.pos--;
5610 }this.lastPosition=-1;
5611 }else{
5612 throw new java.util.ConcurrentModificationException();
5613 }});
5614
5615 c$=Clazz_p0p();
5616 //};
5617
5618
5619 //c$.$AbstractList$FullListIterator$=function(){
5620 Clazz_pu$h(self.c$);
5621 c$=Clazz_decorateAsClass(function(){
5622 //Clazz_prepareCallback(this,arguments);
5623 Clazz_instantialize(this,arguments);
5624 },java.util,"AbstractListFullListIterator",java.util.AbstractListSimpleListIterator,java.util.ListIterator);
5625
5626 //,Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null,Clazz_inheritArgs));
5627
5628 Clazz_makeConstructor(c$,
5629 function(a,b){
5630 Clazz_superConstructor(this,java.util.AbstractListFullListIterator,[a]);
5631 if(0<=b&&b<=this._list.size()){
5632 this.pos=b-1;
5633 }else{
5634 throw new IndexOutOfBoundsException();
5635 }},"java.util.AbstractList,~N");
5636 Clazz_overrideMethod(c$,"add",
5637 function(a){
5638 if(this.expectedModCount==this._list.modCount){
5639 try{
5640 this._list.add(this.pos+1,a);
5641 }catch(e){
5642 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5643 throw new java.util.NoSuchElementException();
5644 }else{
5645 throw e;
5646 }
5647 }
5648 this.pos++;
5649 this.lastPosition=-1;
5650 if(this._list.modCount!=this.expectedModCount){
5651 this.expectedModCount++;
5652 }}else{
5653 throw new java.util.ConcurrentModificationException();
5654 }},"~O");
5655 Clazz_overrideMethod(c$,"hasPrevious",
5656 function(){
5657 return this.pos>=0;
5658 });
5659 Clazz_overrideMethod(c$,"nextIndex",
5660 function(){
5661 return this.pos+1;
5662 });
5663 Clazz_overrideMethod(c$,"previous",
5664 function(){
5665 if(this.expectedModCount==this._list.modCount){
5666 try{
5667 var a=this._list.get(this.pos);
5668 this.lastPosition=this.pos;
5669 this.pos--;
5670 return a;
5671 }catch(e){
5672 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5673 throw new java.util.NoSuchElementException();
5674 }else{
5675 throw e;
5676 }
5677 }
5678 }throw new java.util.ConcurrentModificationException();
5679 });
5680 Clazz_overrideMethod(c$,"previousIndex",
5681 function(){
5682 return this.pos;
5683 });
5684 Clazz_overrideMethod(c$,"set",
5685 function(a){
5686 if(this.expectedModCount==this._list.modCount){
5687 try{
5688 this._list.set(this.lastPosition,a);
5689 }catch(e){
5690 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5691 throw new IllegalStateException();
5692 }else{
5693 throw e;
5694 }
5695 }
5696 }else{
5697 throw new java.util.ConcurrentModificationException();
5698 }},"~O");
5699 c$=Clazz_p0p();
5700 //};
5701
5702
5703
5704
5705 Clazz_pu$h(self.c$);
5706 c$=Clazz_declareType(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);
5707 c$=Clazz_p0p();
5708
5709
5710
5711
5712 Clazz_pu$h(self.c$);
5713 c$=Clazz_decorateAsClass(function(){
5714 this.fullList=null;
5715 this.offset=0;
5716 this.$size=0;
5717 Clazz_instantialize(this,arguments);
5718 },java.util.AbstractList,"SubAbstractList",java.util.AbstractList);
5719 Clazz_makeConstructor(c$,
5720 function(a,b,c){
5721 Clazz_superConstructor(this,java.util.AbstractList.SubAbstractList);
5722 this.fullList=a;
5723 this.modCount=this.fullList.modCount;
5724 this.offset=b;
5725 this.$size=c-b;
5726 },"java.util.AbstractList,~N,~N");
5727 Clazz_defineMethod(c$,"add",
5728 function(a,b){
5729 if(this.modCount==this.fullList.modCount){
5730 if(0<=a&&a<=this.$size){
5731 this.fullList.add(a+this.offset,b);
5732 this.$size++;
5733 this.modCount=this.fullList.modCount;
5734 }else{
5735 throw new IndexOutOfBoundsException();
5736 }}else{
5737 throw new java.util.ConcurrentModificationException();
5738 }},"~N,~O");
5739 Clazz_defineMethod(c$,"addAll",
5740 function(a,b){
5741 if(this.modCount==this.fullList.modCount){
5742 if(0<=a&&a<=this.$size){
5743 var c=this.fullList.addAll(a+this.offset,b);
5744 if(c){
5745 this.$size+=b.size();
5746 this.modCount=this.fullList.modCount;
5747 }return c;
5748 }throw new IndexOutOfBoundsException();
5749 }throw new java.util.ConcurrentModificationException();
5750 },"~N,java.util.Collection");
5751 Clazz_defineMethod(c$,"addAll",
5752 function(a){
5753 if(this.modCount==this.fullList.modCount){
5754 var b=this.fullList.addAll(this.offset+this.$size,a);
5755 if(b){
5756 this.$size+=a.size();
5757 this.modCount=this.fullList.modCount;
5758 }return b;
5759 }throw new java.util.ConcurrentModificationException();
5760 },"java.util.Collection");
5761 Clazz_defineMethod(c$,"get",
5762 function(a){
5763 if(this.modCount==this.fullList.modCount){
5764 if(0<=a&&a<this.$size){
5765 return this.fullList.get(a+this.offset);
5766 }throw new IndexOutOfBoundsException();
5767 }throw new java.util.ConcurrentModificationException();
5768 },"~N");
5769 Clazz_overrideMethod(c$,"iterator",
5770 function(){
5771 return this.listIterator(0);
5772 });
5773 Clazz_defineMethod(c$,"listIterator",
5774 function(a){
5775 if(this.modCount==this.fullList.modCount){
5776 if(0<=a&&a<=this.$size){
5777 return new java.util.AbstractList.SubAbstractList.SubAbstractListIterator(this.fullList.listIterator(a+this.offset),this,this.offset,this.$size);
5778 }throw new IndexOutOfBoundsException();
5779 }throw new java.util.ConcurrentModificationException();
5780 },"~N");
5781 Clazz_defineMethod(c$,"remove",
5782 function(a){
5783 if(this.modCount==this.fullList.modCount){
5784 if(0<=a&&a<this.$size){
5785 var b=this.fullList.remove(a+this.offset);
5786 this.$size--;
5787 this.modCount=this.fullList.modCount;
5788 return b;
5789 }throw new IndexOutOfBoundsException();
5790 }throw new java.util.ConcurrentModificationException();
5791 },"~N");
5792 Clazz_defineMethod(c$,"removeRange",
5793 function(a,b){
5794 if(a!=b){
5795 if(this.modCount==this.fullList.modCount){
5796 this.fullList.removeRange(a+this.offset,b+this.offset);
5797 this.$size-=b-a;
5798 this.modCount=this.fullList.modCount;
5799 }else{
5800 throw new java.util.ConcurrentModificationException();
5801 }}},"~N,~N");
5802 Clazz_defineMethod(c$,"set",
5803 function(a,b){
5804 if(this.modCount==this.fullList.modCount){
5805 if(0<=a&&a<this.$size){
5806 return this.fullList.set(a+this.offset,b);
5807 }throw new IndexOutOfBoundsException();
5808 }throw new java.util.ConcurrentModificationException();
5809 },"~N,~O");
5810 Clazz_overrideMethod(c$,"size",
5811 function(){
5812 return this.$size;
5813 });
5814 Clazz_defineMethod(c$,"sizeChanged",
5815 function(a){
5816 if(a){
5817 this.$size++;
5818 }else{
5819 this.$size--;
5820 }this.modCount=this.fullList.modCount;
5821 },"~B");
5822 Clazz_pu$h(self.c$);
5823 c$=Clazz_decorateAsClass(function(){
5824 this.subList=null;
5825 this.iterator=null;
5826 this.start=0;
5827 this.end=0;
5828 Clazz_instantialize(this,arguments);
5829 },java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);
5830 Clazz_makeConstructor(c$,
5831 function(a,b,c,d){
5832 this.iterator=a;
5833 this.subList=b;
5834 this.start=c;
5835 this.end=this.start+d;
5836 },"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");
5837 Clazz_defineMethod(c$,"add",
5838 function(a){
5839 this.iterator.add(a);
5840 this.subList.sizeChanged(true);
5841 this.end++;
5842 },"~O");
5843 Clazz_overrideMethod(c$,"hasNext",
5844 function(){
5845 return this.iterator.nextIndex()<this.end;
5846 });
5847 Clazz_overrideMethod(c$,"hasPrevious",
5848 function(){
5849 return this.iterator.previousIndex()>=this.start;
5850 });
5851 Clazz_defineMethod(c$,"next",
5852 function(){
5853 if(this.iterator.nextIndex()<this.end){
5854 return this.iterator.next();
5855 }throw new java.util.NoSuchElementException();
5856 });
5857 Clazz_defineMethod(c$,"nextIndex",
5858 function(){
5859 return this.iterator.nextIndex()-this.start;
5860 });
5861 Clazz_defineMethod(c$,"previous",
5862 function(){
5863 if(this.iterator.previousIndex()>=this.start){
5864 return this.iterator.previous();
5865 }throw new java.util.NoSuchElementException();
5866 });
5867 Clazz_defineMethod(c$,"previousIndex",
5868 function(){
5869 var a=this.iterator.previousIndex();
5870 if(a>=this.start){
5871 return a-this.start;
5872 }return-1;
5873 });
5874 Clazz_defineMethod(c$,"remove",
5875 function(){
5876 this.iterator.remove();
5877 this.subList.sizeChanged(false);
5878 this.end--;
5879 });
5880 Clazz_defineMethod(c$,"set",
5881 function(a){
5882 this.iterator.set(a);
5883 },"~O");
5884 c$=Clazz_p0p();
5885 c$=Clazz_p0p();
5886 });
5887 // 4/23/2015 1:20:24 PM BH removing need for array.getClass().getComponentType()
5888
5889 Clazz_load(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){
5890 c$=Clazz_declareType(java.util,"AbstractCollection",null,java.util.Collection);
5891 Clazz_makeConstructor(c$,
5892 function(){
5893 });
5894 Clazz_overrideMethod(c$,"add",
5895 function(object){
5896 throw new UnsupportedOperationException();
5897 },"~O");
5898 Clazz_overrideMethod(c$,"addAll",
5899 function(collection){
5900 var result=false;
5901 var it=collection.iterator();
5902 while(it.hasNext()){
5903 if(this.add(it.next())){
5904 result=true;
5905 }}
5906 return result;
5907 },"java.util.Collection");
5908 Clazz_overrideMethod(c$,"clear",
5909 function(){
5910 var it=this.iterator();
5911 while(it.hasNext()){
5912 it.next();
5913 it.remove();
5914 }
5915 });
5916 Clazz_overrideMethod(c$,"contains",
5917 function(object){
5918 var it=this.iterator();
5919 if(object!=null){
5920 while(it.hasNext()){
5921 if(object.equals(it.next())){
5922 return true;
5923 }}
5924 }else{
5925 while(it.hasNext()){
5926 if(it.next()==null){
5927 return true;
5928 }}
5929 }return false;
5930 },"~O");
5931 Clazz_overrideMethod(c$,"containsAll",
5932 function(collection){
5933 var it=collection.iterator();
5934 while(it.hasNext()){
5935 if(!this.contains(it.next())){
5936 return false;
5937 }}
5938 return true;
5939 },"java.util.Collection");
5940 Clazz_overrideMethod(c$,"isEmpty",
5941 function(){
5942 return this.size()==0;
5943 });
5944 Clazz_overrideMethod(c$,"remove",
5945 function(object){
5946 var it=this.iterator();
5947 if(object!=null){
5948 while(it.hasNext()){
5949 if(object.equals(it.next())){
5950 it.remove();
5951 return true;
5952 }}
5953 }else{
5954 while(it.hasNext()){
5955 if(it.next()==null){
5956 it.remove();
5957 return true;
5958 }}
5959 }return false;
5960 },"~O");
5961 Clazz_overrideMethod(c$,"removeAll",
5962 function(collection){
5963 var result=false;
5964 var it=this.iterator();
5965 while(it.hasNext()){
5966 if(collection.contains(it.next())){
5967 it.remove();
5968 result=true;
5969 }}
5970 return result;
5971 },"java.util.Collection");
5972 Clazz_overrideMethod(c$,"retainAll",
5973 function(collection){
5974 var result=false;
5975 var it=this.iterator();
5976 while(it.hasNext()){
5977 if(!collection.contains(it.next())){
5978 it.remove();
5979 result=true;
5980 }}
5981 return result;
5982 },"java.util.Collection");
5983 Clazz_defineMethod(c$,"toArray",
5984 function(){
5985 var size=this.size();
5986 var index=0;
5987 var it=this.iterator();
5988 var array=new Array(size);
5989 while(index<size){
5990 array[index++]=it.next();
5991 }
5992 return array;
5993 });
5994 Clazz_defineMethod(c$,"toArray",
5995 function(contents){
5996 var size=this.size();
5997 var index=0;
5998 // if(size>contents.length){  // BH unnec
5999 //var ct=contents.getClass().getComponentType();
6000 //contents=java.lang.reflect.Array.newInstance(ct,size);
6001 //}
6002 for(var entry,$entry=this.iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
6003 contents[index++]=entry;
6004 }
6005 if(index<contents.length){
6006 contents[index]=null;
6007 }return contents;
6008 },"~A");
6009 Clazz_overrideMethod(c$,"toString",
6010 function(){
6011 if(this.isEmpty()){
6012 return"[]";
6013 }var buffer=new StringBuilder(this.size()*16);
6014 buffer.append('[');
6015 var it=this.iterator();
6016 while(it.hasNext()){
6017 var next=it.next();
6018 if(next!==this){
6019 buffer.append(next);
6020 }else{
6021 buffer.append("(this Collection)");
6022 }if(it.hasNext()){
6023 buffer.append(", ");
6024 }}
6025 buffer.append(']');
6026 return buffer.toString();
6027 });
6028 });
6029 Clazz_declarePackage ("java.awt");
6030 Clazz_load (null, "java.awt.ComponentOrientation", ["java.util.Locale"], function () {
6031 c$ = Clazz_decorateAsClass (function () {
6032 this.orientation = 0;
6033 Clazz_instantialize (this, arguments);
6034 }, java.awt, "ComponentOrientation");
6035 Clazz_defineMethod (c$, "isHorizontal", 
6036 function () {
6037 return (this.orientation & 2) != 0;
6038 });
6039 Clazz_defineMethod (c$, "isLeftToRight", 
6040 function () {
6041 return (this.orientation & 4) != 0;
6042 });
6043 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
6044 function (locale) {
6045 var lang = locale.getLanguage ();
6046 if ("iw".equals (lang) || "ar".equals (lang) || "fa".equals (lang) || "ur".equals (lang)) {
6047 return java.awt.ComponentOrientation.RIGHT_TO_LEFT;
6048 } else {
6049 return java.awt.ComponentOrientation.LEFT_TO_RIGHT;
6050 }}, "java.util.Locale");
6051 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
6052 function (bdl) {
6053 var result = null;
6054 try {
6055 result = bdl.getObject ("Orientation");
6056 } catch (e) {
6057 if (Clazz_exceptionOf (e, Exception)) {
6058 } else {
6059 throw e;
6060 }
6061 }
6062 if (result == null) {
6063 result = java.awt.ComponentOrientation.getOrientation (bdl.getLocale ());
6064 }if (result == null) {
6065 result = java.awt.ComponentOrientation.getOrientation (java.util.Locale.getDefault ());
6066 }return result;
6067 }, "java.util.ResourceBundle");
6068 Clazz_makeConstructor (c$, 
6069  function (value) {
6070 this.orientation = value;
6071 }, "~N");
6072 Clazz_defineStatics (c$,
6073 "UNK_BIT", 1,
6074 "HORIZ_BIT", 2,
6075 "LTR_BIT", 4);
6076 c$.LEFT_TO_RIGHT = c$.prototype.LEFT_TO_RIGHT =  new java.awt.ComponentOrientation (6);
6077 c$.RIGHT_TO_LEFT = c$.prototype.RIGHT_TO_LEFT =  new java.awt.ComponentOrientation (2);
6078 c$.UNKNOWN = c$.prototype.UNKNOWN =  new java.awt.ComponentOrientation (7);
6079 });
6080 Clazz_declarePackage ("java.security");
6081 Clazz_load (["java.security.AccessControlContext"], "java.security.AccessController", null, function () {
6082 c$ = Clazz_declareType (java.security, "AccessController", null, java.security.AccessControlContext);
6083 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6084 function (action) {
6085 return action.run ();
6086 }, "java.security.PrivilegedAction");
6087 c$.getContext = Clazz_defineMethod (c$, "getContext", 
6088 function () {
6089 return  new java.security.AccessController ();
6090 });
6091 Clazz_overrideMethod (c$, "checkPermission", 
6092 function (perm) {
6093 return true;
6094 }, "~O");
6095 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6096 function (action, context) {
6097 return action.run ();
6098 }, "java.security.PrivilegedAction,java.security.AccessControlContext");
6099 });
6100 Clazz_declarePackage ("java.security");
6101 Clazz_declareInterface (java.security, "AccessControlContext");
6102 // BH minor efficiencies only
6103
6104 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(){
6105 c$=Clazz_decorateAsClass(function(){
6106 this.elementCount=0;
6107 this.elementData=null;
6108 this.loadFactor=0;
6109 this.threshold=0;
6110 this.modCount=0;
6111 Clazz_instantialize(this,arguments);
6112 },java.util,"HashMap",java.util.AbstractMap,[java.util.Map,Cloneable,java.io.Serializable]);
6113 Clazz_defineMethod(c$,"newElementArray",
6114 function(s){
6115 return new Array(s);
6116 },"~N");
6117 //Clazz_makeConstructor(c$,
6118 //function(){
6119 //this.construct(16);
6120 //});
6121 //Clazz_makeConstructor(c$,
6122 //function(capacity){
6123 //Clazz_superConstructor(this,java.util.HashMap,[]);
6124 //if(capacity>=0){
6125 //this.elementCount=0;
6126 //this.elementData=this.newElementArray(capacity==0?1:capacity);
6127 //this.loadFactor=0.75;
6128 //this.computeMaxSize();
6129 //}else{
6130 //throw new IllegalArgumentException();
6131 //}},"~N");
6132 Clazz_makeConstructor(c$,
6133 function(){
6134 this.construct(16);
6135 });
6136 Clazz_makeConstructor(c$,
6137 function(capacity){
6138 Clazz_superConstructor(this,java.util.HashMap,[]);
6139 if(capacity>=0){
6140 this.elementCount=0;
6141 this.elementData=this.newElementArray(capacity==0?1:capacity);
6142 this.loadFactor=0.75;
6143 this.computeMaxSize();
6144 }else{
6145 throw new IllegalArgumentException();
6146 }},"~N");
6147 Clazz_makeConstructor(c$,
6148 function(capacity,loadFactor){
6149 Clazz_superConstructor(this,java.util.HashMap,[]);
6150 if(capacity>=0&&loadFactor>0){
6151 this.elementCount=0;
6152 this.elementData=this.newElementArray(capacity==0?1:capacity);
6153 this.loadFactor=loadFactor;
6154 this.computeMaxSize();
6155 }else{
6156 throw new IllegalArgumentException();
6157 }},"~N,~N");
6158 Clazz_makeConstructor(c$,
6159 function(map){
6160 this.construct(map.size()<6?11:map.size()*2);
6161 Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6162 },"java.util.Map");
6163
6164
6165 /*
6166 Clazz_makeConstructor(c$,
6167 function(capacity,loadFactor){
6168 this.doConstruct(capacity,loadFactor);
6169 },"~N,~N");
6170
6171 Clazz_defineMethod(c$, "doConstruct",
6172 function(capacity,loadFactor) {
6173 capacity || (capacity = 16);
6174 loadFactor || (loadFactor = 0.75);
6175 if (typeof capacity != "number") {
6176  var map = capacity;
6177  this.loadFactor=loadFactor;
6178  this.elementData=this.newElementArray(map.size()<6?11:map.size()*2);
6179  this.computeMaxSize();
6180  this.putAllHM(map);
6181  return;
6182 }
6183
6184 //Clazz_superConstructor(this,java.util.HashMap,[]);
6185 if(capacity>=0&&loadFactor>0){
6186 this.elementData=this.newElementArray(capacity==0?1:capacity);
6187 this.loadFactor=loadFactor;
6188 this.computeMaxSize();
6189 }else{
6190 throw new IllegalArgumentException();
6191 }
6192 },"~N,~N");
6193
6194 //Clazz_makeConstructor(c$,
6195 //function(map){
6196 //this.construct(map.size()<6?11:map.size()*2);
6197 //Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6198 //},"java.util.Map");
6199
6200 */
6201 Clazz_overrideMethod(c$,"clear",
6202 function(){
6203 if(this.elementCount>0){
6204 this.elementCount=0;
6205 java.util.Arrays.fill(this.elementData,null);
6206 this.modCount++;
6207 }});
6208 Clazz_defineMethod(c$,"clone",
6209 function(){
6210   return this.cloneHM();
6211 });
6212
6213 Clazz_defineMethod(c$,"cloneHM",
6214 function(){
6215 try{
6216 var map=this.cloneAM();//Clazz_superCall(this,java.util.HashMap,"clone",[]);
6217 map.elementData=this.newElementArray(this.elementData.length);
6218 var entry;
6219 for(var i=0;i<this.elementData.length;i++){
6220 if((entry=this.elementData[i])!=null){
6221 map.elementData[i]=entry.clone();
6222 }}
6223 return map;
6224 }catch(e){
6225 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6226 return null;
6227 }else{
6228 throw e;
6229 }
6230 }
6231 });
6232
6233 Clazz_defineMethod(c$,"computeMaxSize",
6234 ($fz=function(){
6235 this.threshold=Math.round((this.elementData.length*this.loadFactor));
6236 },$fz.isPrivate=true,$fz));
6237 Clazz_overrideMethod(c$,"containsKey",
6238 function(key){
6239 return this.getEntry(key)!=null;
6240 },"~O");
6241 Clazz_defineMethod(c$,"keysEqual",
6242 function(k1,entry){
6243 var k1Hash=k1==null?0:k1.hashCode();
6244 if(k1Hash!=entry.origKeyHash){
6245 return false;
6246 }if(k1==null&&entry.key==null){
6247 return true;
6248 }return k1.equals(entry.key);
6249 },"~O,java.util.HashMap.Entry");
6250 Clazz_overrideMethod(c$,"containsValue",
6251 function(value){
6252 if(value!=null){
6253 for(var i=this.elementData.length;--i>=0;){
6254 var entry=this.elementData[i];
6255 while(entry!=null){
6256 if(value.equals(entry.value)){
6257 return true;
6258 }entry=entry.next;
6259 }
6260 }
6261 }else{
6262 for(var i=this.elementData.length;--i>=0;){
6263 var entry=this.elementData[i];
6264 while(entry!=null){
6265 if(entry.value==null){
6266 return true;
6267 }entry=entry.next;
6268 }
6269 }
6270 }return false;
6271 },"~O");
6272 Clazz_overrideMethod(c$,"entrySet",
6273 function(){
6274 return new java.util.HashMap.HashMapEntrySet(this);
6275 });
6276 Clazz_overrideMethod(c$,"get",
6277 function(key){
6278 var m=this.getEntry(key);
6279 if(m!=null){
6280 return m.value;
6281 }return null;
6282 },"~O");
6283 Clazz_defineMethod(c$,"getEntry",
6284 function(key){
6285 var index=this.getModuloHash(key);
6286 return this.findEntry(key,index);
6287 },"~O");
6288 Clazz_defineMethod(c$,"getModuloHash",
6289 function(key){
6290 if(key==null){
6291 return 0;
6292 }return(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6293 },"~O");
6294 Clazz_defineMethod(c$,"findEntry",
6295 function(key,index){
6296 var m;
6297 m=this.elementData[index];
6298 if(key!=null){
6299 while(m!=null&&!this.keysEqual(key,m)){
6300 m=m.next;
6301 }
6302 }else{
6303 while(m!=null&&m.key!=null){
6304 m=m.next;
6305 }
6306 }return m;
6307 },"~O,~N");
6308 Clazz_overrideMethod(c$,"isEmpty",
6309 function(){
6310 return this.elementCount==0;
6311 });
6312 Clazz_overrideMethod(c$,"keySet",
6313 function(){
6314 if(this.$keySet==null){
6315 this.$keySet=((Clazz_isClassDefined("java.util.HashMap$1")?0:java.util.HashMap.$HashMap$1$()),Clazz_innerTypeInstance(java.util.HashMap$1,this,null));
6316 }return this.$keySet;
6317 });
6318 Clazz_overrideMethod(c$,"put",
6319 function(key,value){
6320 var index=this.getModuloHash(key);
6321 var entry=this.findEntry(key,index);
6322 if(entry==null){
6323 this.modCount++;
6324 if(++this.elementCount>this.threshold){
6325 this.rehash();
6326 index=key==null?0:(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6327 }entry=this.createEntry(key,index,value);
6328 return null;
6329 }var result=entry.value;
6330 entry.value=value;
6331 return result;
6332 },"~O,~O");
6333 Clazz_defineMethod(c$,"createEntry",
6334 function(key,index,value){
6335 var entry=new java.util.HashMap.Entry(key,value);
6336 entry.next=this.elementData[index];
6337 this.elementData[index]=entry;
6338 return entry;
6339 },"~O,~N,~O");
6340 Clazz_defineMethod(c$,"putAll",
6341 function(map){
6342 if(!map.isEmpty()){
6343 var capacity=this.elementCount+map.size();
6344 if(capacity>this.threshold){
6345 this.rehash(capacity);
6346 }
6347 this.putAllHM(map);
6348
6349 }},"java.util.Map");
6350 Clazz_defineMethod(c$,"rehash",
6351 function(capacity){
6352 var length=(capacity==0?1:capacity<<1);
6353 var newData=this.newElementArray(length);
6354 for(var i=0;i<this.elementData.length;i++){
6355 var entry=this.elementData[i];
6356 while(entry!=null){
6357 var key=entry.key;
6358 var index=key==null?0:(key.hashCode()&0x7FFFFFFF)%length;
6359 var next=entry.next;
6360 entry.next=newData[index];
6361 newData[index]=entry;
6362 entry=next;
6363 }
6364 }
6365 this.elementData=newData;
6366 this.computeMaxSize();
6367 },"~N");
6368 Clazz_defineMethod(c$,"rehash",
6369 function(){
6370 this.rehash(this.elementData.length);
6371 });
6372 Clazz_overrideMethod(c$,"remove",
6373 function(key){
6374 var entry=this.removeEntry(key);
6375 if(entry!=null){
6376 return entry.value;
6377 }return null;
6378 },"~O");
6379 Clazz_defineMethod(c$,"removeEntry",
6380 function(key){
6381 var index=0;
6382 var entry;
6383 var last=null;
6384 if(key!=null){
6385 index=(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6386 entry=this.elementData[index];
6387 while(entry!=null&&!this.keysEqual(key,entry)){
6388 last=entry;
6389 entry=entry.next;
6390 }
6391 }else{
6392 entry=this.elementData[0];
6393 while(entry!=null&&entry.key!=null){
6394 last=entry;
6395 entry=entry.next;
6396 }
6397 }if(entry==null){
6398 return null;
6399 }if(last==null){
6400 this.elementData[index]=entry.next;
6401 }else{
6402 last.next=entry.next;
6403 }this.modCount++;
6404 this.elementCount--;
6405 return entry;
6406 },"~O");
6407 Clazz_overrideMethod(c$,"size",
6408 function(){
6409 return this.elementCount;
6410 });
6411 Clazz_overrideMethod(c$,"values",
6412 function(){
6413 if(this.valuesCollection==null){
6414 this.valuesCollection=((Clazz_isClassDefined("java.util.HashMap$2")?0:java.util.HashMap.$HashMap$2$()),Clazz_innerTypeInstance(java.util.HashMap$2,this,null));
6415 }return this.valuesCollection;
6416 });
6417 c$.$HashMap$1$=function(){
6418 Clazz_pu$h(self.c$);
6419 c$=Clazz_declareAnonymous(java.util,"HashMap$1",java.util.AbstractSet);
6420 Clazz_overrideMethod(c$,"contains",
6421 function(object){
6422 return this.b$["java.util.HashMap"].containsKey(object);
6423 },"~O");
6424 Clazz_overrideMethod(c$,"size",
6425 function(){
6426 return this.b$["java.util.HashMap"].size();
6427 });
6428 Clazz_overrideMethod(c$,"clear",
6429 function(){
6430 this.b$["java.util.HashMap"].clear();
6431 });
6432 Clazz_overrideMethod(c$,"remove",
6433 function(key){
6434 if(this.b$["java.util.HashMap"].containsKey(key)){
6435 this.b$["java.util.HashMap"].remove(key);
6436 return true;
6437 }return false;
6438 },"~O");
6439 Clazz_overrideMethod(c$,"iterator",
6440 function(){
6441 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"]);
6442 });
6443 c$=Clazz_p0p();
6444 };
6445 c$.$HashMap$1$1$=function(){
6446 Clazz_pu$h(self.c$);
6447 c$=Clazz_declareAnonymous(java.util,"HashMap$1$1",null,java.util.MapEntry.Type);
6448 Clazz_overrideMethod(c$,"get",
6449 function(entry){
6450 return entry.key;
6451 },"java.util.MapEntry");
6452 c$=Clazz_p0p();
6453 };
6454 c$.$HashMap$2$=function(){
6455 Clazz_pu$h(self.c$);
6456 c$=Clazz_declareAnonymous(java.util,"HashMap$2",java.util.AbstractCollection);
6457 Clazz_overrideMethod(c$,"contains",
6458 function(object){
6459 return this.b$["java.util.HashMap"].containsValue(object);
6460 },"~O");
6461 Clazz_overrideMethod(c$,"size",
6462 function(){
6463 return this.b$["java.util.HashMap"].size();
6464 });
6465 Clazz_overrideMethod(c$,"clear",
6466 function(){
6467 this.b$["java.util.HashMap"].clear();
6468 });
6469 Clazz_overrideMethod(c$,"iterator",
6470 function(){
6471 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"]);
6472 });
6473 c$=Clazz_p0p();
6474 };
6475 c$.$HashMap$2$1$=function(){
6476 Clazz_pu$h(self.c$);
6477 c$=Clazz_declareAnonymous(java.util,"HashMap$2$1",null,java.util.MapEntry.Type);
6478 Clazz_overrideMethod(c$,"get",
6479 function(entry){
6480 return entry.value;
6481 },"java.util.MapEntry");
6482 c$=Clazz_p0p();
6483 };
6484 Clazz_pu$h(self.c$);
6485 c$=Clazz_decorateAsClass(function(){
6486 this.origKeyHash=0;
6487 this.next=null;
6488 Clazz_instantialize(this,arguments);
6489 },java.util.HashMap,"Entry",java.util.MapEntry);
6490 Clazz_makeConstructor(c$,
6491 function(a,b){
6492 Clazz_superConstructor(this,java.util.HashMap.Entry,[a,b]);
6493 this.origKeyHash=(a==null?0:a.hashCode());
6494 },"~O,~O");
6495 Clazz_defineMethod(c$,"clone",
6496 function(){
6497 var a=Clazz_superCall(this,java.util.HashMap.Entry,"clone",[]);
6498 if(this.next!=null){
6499 a.next=this.next.clone();
6500 }return a;
6501 });
6502 c$=Clazz_p0p();
6503 Clazz_pu$h(self.c$);
6504 c$=Clazz_decorateAsClass(function(){
6505 this.position=0;
6506 this.expectedModCount=0;
6507 this.type=null;
6508 this.canRemove=false;
6509 this.entry=null;
6510 this.lastEntry=null;
6511 this.associatedMap=null;
6512 Clazz_instantialize(this,arguments);
6513 },java.util.HashMap,"HashMapIterator",null,java.util.Iterator);
6514 Clazz_makeConstructor(c$,
6515 function(a,b){
6516 this.associatedMap=b;
6517 this.type=a;
6518 this.expectedModCount=b.modCount;
6519 },"java.util.MapEntry.Type,java.util.HashMap");
6520 Clazz_overrideMethod(c$,"hasNext",
6521 function(){
6522 if(this.entry!=null){
6523 return true;
6524 }while(this.position<this.associatedMap.elementData.length){
6525 if(this.associatedMap.elementData[this.position]==null){
6526 this.position++;
6527 }else{
6528 return true;
6529 }}
6530 return false;
6531 });
6532 Clazz_defineMethod(c$,"checkConcurrentMod",
6533 function(){
6534 if(this.expectedModCount!=this.associatedMap.modCount){
6535 throw new java.util.ConcurrentModificationException();
6536 }});
6537 Clazz_overrideMethod(c$,"next",
6538 function(){
6539 this.checkConcurrentMod();
6540 if(!this.hasNext()){
6541 throw new java.util.NoSuchElementException();
6542 }var a;
6543 if(this.entry==null){
6544 a=this.lastEntry=this.associatedMap.elementData[this.position++];
6545 this.entry=this.lastEntry.next;
6546 }else{
6547 if(this.lastEntry.next!==this.entry){
6548 this.lastEntry=this.lastEntry.next;
6549 }a=this.entry;
6550 this.entry=this.entry.next;
6551 }this.canRemove=true;
6552 return this.type.get(a);
6553 });
6554 Clazz_overrideMethod(c$,"remove",
6555 function(){
6556 this.checkConcurrentMod();
6557 if(!this.canRemove){
6558 throw new IllegalStateException();
6559 }this.canRemove=false;
6560 this.associatedMap.modCount++;
6561 if(this.lastEntry.next===this.entry){
6562 while(this.associatedMap.elementData[--this.position]==null){
6563 ;}
6564 this.associatedMap.elementData[this.position]=this.associatedMap.elementData[this.position].next;
6565 this.entry=null;
6566 }else{
6567 this.lastEntry.next=this.entry;
6568 }this.associatedMap.elementCount--;
6569 this.expectedModCount++;
6570 });
6571 c$=Clazz_p0p();
6572 Clazz_pu$h(self.c$);
6573 c$=Clazz_decorateAsClass(function(){
6574 this.associatedMap=null;
6575 Clazz_instantialize(this,arguments);
6576 },java.util.HashMap,"HashMapEntrySet",java.util.AbstractSet);
6577 Clazz_makeConstructor(c$,
6578 function(a){
6579 Clazz_superConstructor(this,java.util.HashMap.HashMapEntrySet,[]);
6580 this.associatedMap=a;
6581 },"java.util.HashMap");
6582 Clazz_defineMethod(c$,"hashMap",
6583 function(){
6584 return this.associatedMap;
6585 });
6586 Clazz_overrideMethod(c$,"size",
6587 function(){
6588 return this.associatedMap.elementCount;
6589 });
6590 Clazz_overrideMethod(c$,"clear",
6591 function(){
6592 this.associatedMap.clear();
6593 });
6594 Clazz_overrideMethod(c$,"remove",
6595 function(a){
6596 if(this.contains(a)){
6597 this.associatedMap.remove((a).getKey());
6598 return true;
6599 }return false;
6600 },"~O");
6601 Clazz_overrideMethod(c$,"contains",
6602 function(a){
6603 if(Clazz_instanceOf(a,java.util.Map.Entry)){
6604 var b=this.associatedMap.getEntry((a).getKey());
6605 return a.equals(b);
6606 }return false;
6607 },"~O");
6608 Clazz_overrideMethod(c$,"iterator",
6609 function(){
6610 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);
6611 });
6612 c$.$HashMap$HashMapEntrySet$1$=function(){
6613 Clazz_pu$h(self.c$);
6614 c$=Clazz_declareAnonymous(java.util,"HashMap$HashMapEntrySet$1",null,java.util.MapEntry.Type);
6615 Clazz_overrideMethod(c$,"get",
6616 function(a){
6617 return a;
6618 },"java.util.MapEntry");
6619 c$=Clazz_p0p();
6620 };
6621 c$=Clazz_p0p();
6622 Clazz_defineStatics(c$,
6623 "DEFAULT_SIZE",16);
6624 });
6625 Clazz_load(["java.util.Map"],"java.util.MapEntry",null,function(){
6626 c$=Clazz_decorateAsClass(function(){
6627 this.key=null;
6628 this.value=null;
6629 Clazz_instantialize(this,arguments);
6630 },java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);
6631 Clazz_makeConstructor(c$,
6632 function(theKey){
6633 this.key=theKey;
6634 },"~O");
6635 Clazz_makeConstructor(c$,
6636 function(theKey,theValue){
6637 this.key=theKey;
6638 this.value=theValue;
6639 },"~O,~O");
6640 Clazz_defineMethod(c$,"clone",
6641 function(){
6642 try{
6643 return Clazz_superCall(this,java.util.MapEntry,"clone",[]);
6644 }catch(e){
6645 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6646 return null;
6647 }else{
6648 throw e;
6649 }
6650 }
6651 });
6652 Clazz_overrideMethod(c$,"equals",
6653 function(object){
6654 if(this===object){
6655 return true;
6656 }if(Clazz_instanceOf(object,java.util.Map.Entry)){
6657 var entry=object;
6658 return(this.key==null?entry.getKey()==null:this.key.equals(entry.getKey()))&&(this.value==null?entry.getValue()==null:this.value.equals(entry.getValue()));
6659 }return false;
6660 },"~O");
6661 Clazz_overrideMethod(c$,"getKey",
6662 function(){
6663 return this.key;
6664 });
6665 Clazz_overrideMethod(c$,"getValue",
6666 function(){
6667 return this.value;
6668 });
6669 Clazz_overrideMethod(c$,"hashCode",
6670 function(){
6671 return(this.key==null?0:this.key.hashCode())^(this.value==null?0:this.value.hashCode());
6672 });
6673 Clazz_overrideMethod(c$,"setValue",
6674 function(object){
6675 var result=this.value;
6676 this.value=object;
6677 return result;
6678 },"~O");
6679 Clazz_overrideMethod(c$,"toString",
6680 function(){
6681 return this.key+"="+this.value;
6682 });
6683 Clazz_declareInterface(java.util.MapEntry,"Type");
6684 });
6685 Clazz_load(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){
6686 c$=Clazz_declareType(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);
6687 Clazz_overrideMethod(c$,"equals",
6688 function(object){
6689 if(this===object){
6690 return true;
6691 }if(Clazz_instanceOf(object,java.util.Set)){
6692 var s=object;
6693 return this.size()==s.size()&&this.containsAll(s);
6694 }return false;
6695 },"~O");
6696 Clazz_overrideMethod(c$,"hashCode",
6697 function(){
6698 var result=0;
6699 var it=this.iterator();
6700 while(it.hasNext()){
6701 var next=it.next();
6702 result+=next==null?0:next.hashCode();
6703 }
6704 return result;
6705 });
6706 Clazz_overrideMethod(c$,"removeAll",
6707 function(collection){
6708 var result=false;
6709 if(this.size()<=collection.size()){
6710 var it=this.iterator();
6711 while(it.hasNext()){
6712 if(collection.contains(it.next())){
6713 it.remove();
6714 result=true;
6715 }}
6716 }else{
6717 var it=collection.iterator();
6718 while(it.hasNext()){
6719 result=this.remove(it.next())||result;
6720 }
6721 }return result;
6722 },"java.util.Collection");
6723 });
6724 Clazz_load(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){
6725 c$=Clazz_decorateAsClass(function(){
6726 this.$keySet=null;
6727 this.valuesCollection=null;
6728 Clazz_instantialize(this,arguments);
6729 },java.util,"AbstractMap",null,java.util.Map);
6730 Clazz_makeConstructor(c$,
6731 function(){
6732 });
6733 Clazz_overrideMethod(c$,"clear",
6734 function(){
6735 this.entrySet().clear();
6736 });
6737 Clazz_overrideMethod(c$,"containsKey",
6738 function(key){
6739 var it=this.entrySet().iterator();
6740 if(key!=null){
6741 while(it.hasNext()){
6742 if(key.equals(it.next().getKey())){
6743 return true;
6744 }}
6745 }else{
6746 while(it.hasNext()){
6747 if(it.next().getKey()==null){
6748 return true;
6749 }}
6750 }return false;
6751 },"~O");
6752 Clazz_overrideMethod(c$,"containsValue",
6753 function(value){
6754 var it=this.entrySet().iterator();
6755 if(value!=null){
6756 while(it.hasNext()){
6757 if(value.equals(it.next().getValue())){
6758 return true;
6759 }}
6760 }else{
6761 while(it.hasNext()){
6762 if(it.next().getValue()==null){
6763 return true;
6764 }}
6765 }return false;
6766 },"~O");
6767 Clazz_overrideMethod(c$,"equals",
6768 function(object){
6769 if(this===object){
6770 return true;
6771 }if(Clazz_instanceOf(object,java.util.Map)){
6772 var map=object;
6773 if(this.size()!=map.size()){
6774 return false;
6775 }var objectSet=map.entrySet();
6776 var it=this.entrySet().iterator();
6777 while(it.hasNext()){
6778 if(!objectSet.contains(it.next())){
6779 return false;
6780 }}
6781 return true;
6782 }return false;
6783 },"~O");
6784 Clazz_overrideMethod(c$,"get",
6785 function(key){
6786 var it=this.entrySet().iterator();
6787 if(key!=null){
6788 while(it.hasNext()){
6789 var entry=it.next();
6790 if(key.equals(entry.getKey())){
6791 return entry.getValue();
6792 }}
6793 }else{
6794 while(it.hasNext()){
6795 var entry=it.next();
6796 if(entry.getKey()==null){
6797 return entry.getValue();
6798 }}
6799 }return null;
6800 },"~O");
6801 Clazz_overrideMethod(c$,"hashCode",
6802 function(){
6803 var result=0;
6804 var it=this.entrySet().iterator();
6805 while(it.hasNext()){
6806 result+=it.next().hashCode();
6807 }
6808 return result;
6809 });
6810 Clazz_overrideMethod(c$,"isEmpty",
6811 function(){
6812 return this.size()==0;
6813 });
6814 Clazz_overrideMethod(c$,"keySet",
6815 function(){
6816 if(this.$keySet==null){
6817 this.$keySet=((Clazz_isClassDefined("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1,this,null));
6818 }return this.$keySet;
6819 });
6820 Clazz_overrideMethod(c$,"put",
6821 function(key,value){
6822 throw new UnsupportedOperationException();
6823 },"~O,~O");
6824 Clazz_overrideMethod(c$,"putAll",
6825 function(map){
6826   this.putAllAM(map);
6827 },"java.util.Map");
6828
6829 Clazz_overrideMethod(c$,"putAllAM",
6830 function(map){
6831 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
6832 this.put(entry.getKey(),entry.getValue());
6833 }
6834 },"java.util.Map");
6835
6836 Clazz_overrideMethod(c$,"remove",
6837 function(key){
6838 var it=this.entrySet().iterator();
6839 if(key!=null){
6840 while(it.hasNext()){
6841 var entry=it.next();
6842 if(key.equals(entry.getKey())){
6843 it.remove();
6844 return entry.getValue();
6845 }}
6846 }else{
6847 while(it.hasNext()){
6848 var entry=it.next();
6849 if(entry.getKey()==null){
6850 it.remove();
6851 return entry.getValue();
6852 }}
6853 }return null;
6854 },"~O");
6855 Clazz_overrideMethod(c$,"size",
6856 function(){
6857 return this.entrySet().size();
6858 });
6859 Clazz_overrideMethod(c$,"toString",
6860 function(){
6861 if(this.isEmpty()){
6862 return"{}";
6863 }var buffer=new StringBuilder(this.size()*28);
6864 buffer.append('{');
6865 var it=this.entrySet().iterator();
6866 while(it.hasNext()){
6867 var entry=it.next();
6868 var key=entry.getKey();
6869 if(key!==this){
6870 buffer.append(key);
6871 }else{
6872 buffer.append("(this Map)");
6873 }buffer.append('=');
6874 var value=entry.getValue();
6875 if(value!==this){
6876 buffer.append(value);
6877 }else{
6878 buffer.append("(this Map)");
6879 }if(it.hasNext()){
6880 buffer.append(", ");
6881 }}
6882 buffer.append('}');
6883 return buffer.toString();
6884 });
6885 Clazz_overrideMethod(c$,"values",
6886 function(){
6887 if(this.valuesCollection==null){
6888 this.valuesCollection=((Clazz_isClassDefined("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$()),Clazz_innerTypeInstance(java.util.AbstractMap$2,this,null));
6889 }return this.valuesCollection;
6890 });
6891 Clazz_defineMethod(c$,"clone",
6892 function(){
6893 return  this.cloneAM();
6894 });
6895
6896 Clazz_defineMethod(c$,"cloneAM",
6897 function(){
6898 var result = Clazz_clone(this);
6899 //var result=Clazz_superCall(this,java.util.AbstractMap,"clone",[]);
6900 result.$keySet=null;
6901 result.valuesCollection=null;
6902 return result;
6903 });
6904
6905 c$.$AbstractMap$1$=function(){
6906 Clazz_pu$h(self.c$);
6907 c$=Clazz_declareAnonymous(java.util,"AbstractMap$1",java.util.AbstractSet);
6908 Clazz_overrideMethod(c$,"contains",
6909 function(object){
6910 return this.b$["java.util.AbstractMap"].containsKey(object);
6911 },"~O");
6912 Clazz_overrideMethod(c$,"size",
6913 function(){
6914 return this.b$["java.util.AbstractMap"].size();
6915 });
6916 Clazz_overrideMethod(c$,"iterator",
6917 function(){
6918 return((Clazz_isClassDefined("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1$1,this,null));
6919 });
6920 c$=Clazz_p0p();
6921 };
6922 c$.$AbstractMap$1$1$=function(){
6923 Clazz_pu$h(self.c$);
6924 c$=Clazz_decorateAsClass(function(){
6925 Clazz_prepareCallback(this,arguments);
6926 this.setIterator=null;
6927 Clazz_instantialize(this,arguments);
6928 },java.util,"AbstractMap$1$1",null,java.util.Iterator);
6929 Clazz_prepareFields(c$,function(){
6930 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6931 });
6932 Clazz_overrideMethod(c$,"hasNext",
6933 function(){
6934 return this.setIterator.hasNext();
6935 });
6936 Clazz_overrideMethod(c$,"next",
6937 function(){
6938 return this.setIterator.next().getKey();
6939 });
6940 Clazz_overrideMethod(c$,"remove",
6941 function(){
6942 this.setIterator.remove();
6943 });
6944 c$=Clazz_p0p();
6945 };
6946 c$.$AbstractMap$2$=function(){
6947 Clazz_pu$h(self.c$);
6948 c$=Clazz_declareAnonymous(java.util,"AbstractMap$2",java.util.AbstractCollection);
6949 Clazz_overrideMethod(c$,"size",
6950 function(){
6951 return this.b$["java.util.AbstractMap"].size();
6952 });
6953 Clazz_overrideMethod(c$,"contains",
6954 function(object){
6955 return this.b$["java.util.AbstractMap"].containsValue(object);
6956 },"~O");
6957 Clazz_overrideMethod(c$,"iterator",
6958 function(){
6959 return((Clazz_isClassDefined("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$2$1,this,null));
6960 });
6961 c$=Clazz_p0p();
6962 };
6963 c$.$AbstractMap$2$1$=function(){
6964 Clazz_pu$h(self.c$);
6965 c$=Clazz_decorateAsClass(function(){
6966 Clazz_prepareCallback(this,arguments);
6967 this.setIterator=null;
6968 Clazz_instantialize(this,arguments);
6969 },java.util,"AbstractMap$2$1",null,java.util.Iterator);
6970 Clazz_prepareFields(c$,function(){
6971 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6972 });
6973 Clazz_overrideMethod(c$,"hasNext",
6974 function(){
6975 return this.setIterator.hasNext();
6976 });
6977 Clazz_overrideMethod(c$,"next",
6978 function(){
6979 return this.setIterator.next().getValue();
6980 });
6981 Clazz_overrideMethod(c$,"remove",
6982 function(){
6983 this.setIterator.remove();
6984 });
6985 c$=Clazz_p0p();
6986 };
6987 });
6988 Clazz_declarePackage ("java.awt.image");
6989 c$ = Clazz_declareInterface (java.awt.image, "ImageObserver");
6990 Clazz_defineStatics (c$,
6991 "WIDTH", 1,
6992 "HEIGHT", 2,
6993 "PROPERTIES", 4,
6994 "SOMEBITS", 8,
6995 "FRAMEBITS", 16,
6996 "ALLBITS", 32,
6997 "ERROR", 64,
6998 "ABORT", 128);
6999 // BH removed inner class 
7000 Clazz_load(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException"],function(){
7001 c$=Clazz_decorateAsClass(function(){
7002 this.$name=null;
7003 this.$ordinal=0;
7004 Clazz_instantialize(this,arguments);
7005 },java.lang,"Enum",null,[java.io.Serializable,Comparable]);
7006 Clazz_makeConstructor(c$,
7007 function(name,ordinal){
7008 this.$name=name;
7009 this.$ordinal=ordinal;
7010 },"~S,~N");
7011 Clazz_defineMethod(c$,"name",
7012 function(){
7013 return this.$name;
7014 });
7015 Clazz_defineMethod(c$,"ordinal",
7016 function(){
7017 return this.$ordinal;
7018 });
7019 Clazz_overrideMethod(c$,"toString",
7020 function(){
7021 return this.$name;
7022 });
7023 Clazz_overrideMethod(c$,"equals",
7024 function(other){
7025 return this===other;
7026 },"~O");
7027 Clazz_overrideMethod(c$,"hashCode",
7028 function(){
7029 return this.$ordinal+(this.$name==null?0:this.$name.hashCode());
7030 });
7031 Clazz_overrideMethod(c$,"clone",
7032 function(){
7033 throw new CloneNotSupportedException(("KA004"));
7034 });
7035 Clazz_overrideMethod(c$,"compareTo",
7036 function(o){
7037 return this.$ordinal-o.$ordinal;
7038 },"~O");
7039 Clazz_defineMethod(c$,"getDeclaringClass",
7040 function(){
7041 var myClass=this.getClass();
7042 var mySuperClass=myClass.getSuperclass();
7043 if(Enum===mySuperClass){
7044 return myClass;
7045 }return mySuperClass;
7046 });
7047 c$.$valueOf=Clazz_defineMethod(c$,"$valueOf",
7048 function(enumType,name){
7049 if((enumType==null)||(name==null)){
7050 throw new NullPointerException(("KA001"));
7051 }var values=Enum.getValues(enumType);
7052 if(values==null){
7053 throw new IllegalArgumentException(("KA005"));
7054 }for(var enumConst,$enumConst=0,$$enumConst=values;$enumConst<$$enumConst.length&&((enumConst=$$enumConst[$enumConst])||true);$enumConst++){
7055 if(enumConst.$name.equals(name)){
7056 return enumConst;
7057 }}
7058 throw new IllegalArgumentException(("KA006"));
7059 },"Class,~S");
7060 c$.getValues=Clazz_defineMethod(c$,"getValues",
7061 function(enumType){
7062 return enumType.values();
7063 },"Class");
7064
7065 //c$.$Enum$1$=function(){
7066 //Clazz_pu$h(self.c$);
7067
7068 //c$=Clazz_declareAnonymous(null,"Enum$1",null,java.security.PrivilegedExceptionAction);
7069 //Clazz_overrideMethod(c$,"run",
7070 //function(){
7071 //var valsMethod=this.f$.enumType.getMethod("values",null);
7072 //valsMethod.setAccessible(true);
7073 //return valsMethod;
7074 //});
7075 //c$=Clazz_p0p();
7076 //};
7077
7078
7079 });
7080 Clazz_declarePackage ("java.applet");
7081 Clazz_declareInterface (java.applet, "AppletStub");
7082 Clazz_declarePackage ("java.applet");
7083 Clazz_declareInterface (java.applet, "AppletContext");
7084 Clazz_declarePackage ("javajs.api");
7085 Clazz_declareInterface (javajs.api, "JSInterface");
7086 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){
7087 c$=Clazz_declareType(java.lang,"StringBuilder",AbstractStringBuilder,[Appendable,CharSequence,java.io.Serializable]);
7088 Clazz_makeConstructor(c$,
7089 function(seq){
7090 Clazz_superConstructor(this,StringBuilder,[seq.toString()]);
7091 },"CharSequence");
7092 Clazz_defineMethod(c$,"append",
7093 function(b){
7094 this.append0(b?"true":"false");
7095 return this;
7096 },"~B");
7097 Clazz_defineMethod(c$,"append",
7098 function(c){
7099 this.append0(c);
7100 return this;
7101 },"~N");
7102 Clazz_defineMethod(c$,"append",
7103 function(i){
7104 this.append0(Integer.toString(i));
7105 return this;
7106 },"~N");
7107 Clazz_defineMethod(c$,"append",
7108 function(lng){
7109 this.append0(Long.toString(lng));
7110 return this;
7111 },"~N");
7112 Clazz_defineMethod(c$,"append",
7113 function(f){
7114 this.append0(Float.toString(f));
7115 return this;
7116 },"~N");
7117 Clazz_defineMethod(c$,"append",
7118 function(d){
7119 this.append0(Double.toString(d));
7120 return this;
7121 },"~N");
7122 Clazz_defineMethod(c$,"append",
7123 function(obj){
7124 if(obj==null){
7125 this.appendNull();
7126 }else{
7127 this.append0(obj.toString());
7128 }return this;
7129 },"~O");
7130 Clazz_defineMethod(c$,"append",
7131 function(str){
7132 this.append0(str);
7133 return this;
7134 },"~S");
7135 Clazz_defineMethod(c$,"append",
7136 function(sb){
7137 if(sb==null){
7138 this.appendNull();
7139 }else{
7140 this.append0(sb.getValue(),0,sb.length());
7141 }return this;
7142 },"StringBuffer");
7143 Clazz_defineMethod(c$,"append",
7144 function(ch){
7145 this.append0(ch);
7146 return this;
7147 },"~A");
7148 Clazz_defineMethod(c$,"append",
7149 function(str,offset,len){
7150 this.append0(str,offset,len);
7151 return this;
7152 },"~A,~N,~N");
7153 Clazz_defineMethod(c$,"append",
7154 function(csq){
7155 if(csq==null){
7156 this.appendNull();
7157 }else{
7158 this.append0(csq.toString());
7159 }return this;
7160 },"CharSequence");
7161 Clazz_defineMethod(c$,"append",
7162 function(csq,start,end){
7163 this.append0(csq,start,end);
7164 return this;
7165 },"CharSequence,~N,~N");
7166 Clazz_defineMethod(c$,"$delete",
7167 function(start,end){
7168 this.delete0(start,end);
7169 return this;
7170 },"~N,~N");
7171 Clazz_defineMethod(c$,"deleteCharAt",
7172 function(index){
7173 this.deleteCharAt0(index);
7174 return this;
7175 },"~N");
7176 Clazz_defineMethod(c$,"insert",
7177 function(offset,b){
7178 this.insert0(offset,b?"true":"false");
7179 return this;
7180 },"~N,~B");
7181 Clazz_defineMethod(c$,"insert",
7182 function(offset,c){
7183 this.insert0(offset,c);
7184 return this;
7185 },"~N,~N");
7186 Clazz_defineMethod(c$,"insert",
7187 function(offset,i){
7188 this.insert0(offset,Integer.toString(i));
7189 return this;
7190 },"~N,~N");
7191 Clazz_defineMethod(c$,"insert",
7192 function(offset,l){
7193 this.insert0(offset,Long.toString(l));
7194 return this;
7195 },"~N,~N");
7196 Clazz_defineMethod(c$,"insert",
7197 function(offset,f){
7198 this.insert0(offset,Float.toString(f));
7199 return this;
7200 },"~N,~N");
7201 Clazz_defineMethod(c$,"insert",
7202 function(offset,d){
7203 this.insert0(offset,Double.toString(d));
7204 return this;
7205 },"~N,~N");
7206 Clazz_defineMethod(c$,"insert",
7207 function(offset,obj){
7208 this.insert0(offset,obj==null?"null":obj.toString());
7209 return this;
7210 },"~N,~O");
7211 Clazz_defineMethod(c$,"insert",
7212 function(offset,str){
7213 this.insert0(offset,str);
7214 return this;
7215 },"~N,~S");
7216 Clazz_defineMethod(c$,"insert",
7217 function(offset,ch){
7218 this.insert0(offset,ch);
7219 return this;
7220 },"~N,~A");
7221 Clazz_defineMethod(c$,"insert",
7222 function(offset,str,strOffset,strLen){
7223 this.insert0(offset,str,strOffset,strLen);
7224 return this;
7225 },"~N,~A,~N,~N");
7226 Clazz_defineMethod(c$,"insert",
7227 function(offset,s){
7228 this.insert0(offset,s==null?"null":s.toString());
7229 return this;
7230 },"~N,CharSequence");
7231 Clazz_defineMethod(c$,"insert",
7232 function(offset,s,start,end){
7233 this.insert0(offset,s,start,end);
7234 return this;
7235 },"~N,CharSequence,~N,~N");
7236 Clazz_defineMethod(c$,"replace",
7237 function(start,end,str){
7238 this.replace0(start,end,str);
7239 return this;
7240 },"~N,~N,~S");
7241 Clazz_defineMethod(c$,"reverse",
7242 function(){
7243 this.reverse0();
7244 return this;
7245 });
7246 });
7247 Clazz_load(null,"java.lang.AbstractStringBuilder",["java.io.InvalidObjectException","java.lang.ArrayIndexOutOfBoundsException","$.IndexOutOfBoundsException","$.NegativeArraySizeException","$.NullPointerException","$.StringIndexOutOfBoundsException"],function(){
7248 c$=Clazz_decorateAsClass(function(){
7249 this.value=null;
7250 this.count=0;
7251 this.shared=false;
7252 Clazz_instantialize(this,arguments);
7253 },java.lang,"AbstractStringBuilder");
7254 Clazz_defineMethod(c$,"getValue",
7255 function(){
7256 return this.value;
7257 });
7258 Clazz_defineMethod(c$,"shareValue",
7259 function(){
7260 this.shared=true;
7261 return this.value;
7262 });
7263 Clazz_defineMethod(c$,"set",
7264 function(val,len){
7265 if(val==null)val=Clazz_newArray(0,'\0');
7266 if(val.length<len)throw new java.io.InvalidObjectException(("K0199"));
7267 this.shared=false;
7268 this.value=val;
7269 this.count=len;
7270 },"~A,~N");
7271 Clazz_makeConstructor(c$,
7272 function(){
7273 this.value=Clazz_newArray(16,'\0');
7274 });
7275 Clazz_makeConstructor(c$,
7276 function(capacity){
7277 if(capacity<0)throw new NegativeArraySizeException();
7278 this.value=Clazz_newArray(capacity,'\0');
7279 },"~N");
7280 Clazz_makeConstructor(c$,
7281 function(string){
7282 this.count=string.length;
7283 this.shared=false;
7284 this.value=Clazz_newArray(this.count+16,'\0');
7285 string.getChars(0,this.count,this.value,0);
7286 },"~S");
7287 Clazz_defineMethod(c$,"enlargeBuffer",
7288 ($fz=function(min){
7289 var twice=(this.value.length<<1)+2;
7290 var newData=Clazz_newArray(min>twice?min:twice,'\0');
7291 System.arraycopy(this.value,0,newData,0,this.count);
7292 this.value=newData;
7293 this.shared=false;
7294 },$fz.isPrivate=true,$fz),"~N");
7295 Clazz_defineMethod(c$,"appendNull",
7296 function(){
7297 var newSize=this.count+4;
7298 if(newSize>this.value.length){
7299 this.enlargeBuffer(newSize);
7300 }else if(this.shared){
7301 this.value=this.value.clone();
7302 this.shared=false;
7303 }this.value[this.count++]='n';
7304 this.value[this.count++]='u';
7305 this.value[this.count++]='l';
7306 this.value[this.count++]='l';
7307 });
7308 Clazz_defineMethod(c$,"append0",
7309 function(chars){
7310 var newSize=this.count+chars.length;
7311 if(newSize>this.value.length){
7312 this.enlargeBuffer(newSize);
7313 }else if(this.shared){
7314 this.value=this.value.clone();
7315 this.shared=false;
7316 }System.arraycopy(chars,0,this.value,this.count,chars.length);
7317 this.count=newSize;
7318 },"~A");
7319 Clazz_defineMethod(c$,"append0",
7320 function(chars,start,length){
7321 if(chars==null){
7322 throw new NullPointerException();
7323 }if(start>=0&&0<=length&&length<=chars.length-start){
7324 var newSize=this.count+length;
7325 if(newSize>this.value.length){
7326 this.enlargeBuffer(newSize);
7327 }else if(this.shared){
7328 this.value=this.value.clone();
7329 this.shared=false;
7330 }System.arraycopy(chars,start,this.value,this.count,length);
7331 this.count=newSize;
7332 }else{
7333 throw new ArrayIndexOutOfBoundsException();
7334 }},"~A,~N,~N");
7335 Clazz_defineMethod(c$,"append0",
7336 function(ch){
7337 if(this.count==this.value.length){
7338 this.enlargeBuffer(this.count+1);
7339 }if(this.shared){
7340 this.value=this.value.clone();
7341 this.shared=false;
7342 }this.value[this.count++]=ch;
7343 },"~N");
7344 Clazz_defineMethod(c$,"append0",
7345 function(string){
7346 if(string==null){
7347 this.appendNull();
7348 return;
7349 }var adding=string.length;
7350 var newSize=this.count+adding;
7351 if(newSize>this.value.length){
7352 this.enlargeBuffer(newSize);
7353 }else if(this.shared){
7354 this.value=this.value.clone();
7355 this.shared=false;
7356 }string.getChars(0,adding,this.value,this.count);
7357 this.count=newSize;
7358 },"~S");
7359 Clazz_defineMethod(c$,"append0",
7360 function(s,start,end){
7361 if(s==null)s="null";
7362 if(start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7363 this.append0(s.subSequence(start,end).toString());
7364 },"CharSequence,~N,~N");
7365 Clazz_defineMethod(c$,"capacity",
7366 function(){
7367 return this.value.length;
7368 });
7369 Clazz_defineMethod(c$,"charAt",
7370 function(index){
7371 if(index<0||index>=this.count)throw new StringIndexOutOfBoundsException(index);
7372 return this.value[index];
7373 },"~N");
7374 Clazz_defineMethod(c$,"delete0",
7375 function(start,end){
7376 if(start>=0){
7377 if(end>this.count){
7378 end=this.count;
7379 }if(end==start){
7380 return;
7381 }if(end>start){
7382 var length=this.count-end;
7383 if(length>0){
7384 if(!this.shared){
7385 System.arraycopy(this.value,end,this.value,start,length);
7386 }else{
7387 var newData=Clazz_newArray(this.value.length,'\0');
7388 System.arraycopy(this.value,0,newData,0,start);
7389 System.arraycopy(this.value,end,newData,start,length);
7390 this.value=newData;
7391 this.shared=false;
7392 }}this.count-=end-start;
7393 return;
7394 }}throw new StringIndexOutOfBoundsException();
7395 },"~N,~N");
7396 Clazz_defineMethod(c$,"deleteCharAt0",
7397 function(location){
7398 if(0>location||location>=this.count)throw new StringIndexOutOfBoundsException(location);
7399 var length=this.count-location-1;
7400 if(length>0){
7401 if(!this.shared){
7402 System.arraycopy(this.value,location+1,this.value,location,length);
7403 }else{
7404 var newData=Clazz_newArray(this.value.length,'\0');
7405 System.arraycopy(this.value,0,newData,0,location);
7406 System.arraycopy(this.value,location+1,newData,location,length);
7407 this.value=newData;
7408 this.shared=false;
7409 }}this.count--;
7410 },"~N");
7411 Clazz_defineMethod(c$,"ensureCapacity",
7412 function(min){
7413 if(min>this.value.length){
7414 this.enlargeBuffer(min);
7415 }},"~N");
7416 Clazz_defineMethod(c$,"getChars",
7417 function(start,end,dest,destStart){
7418 if(start>this.count||end>this.count||start>end){
7419 throw new StringIndexOutOfBoundsException();
7420 }System.arraycopy(this.value,start,dest,destStart,end-start);
7421 },"~N,~N,~A,~N");
7422 Clazz_defineMethod(c$,"insert0",
7423 function(index,chars){
7424 if(0>index||index>this.count){
7425 throw new StringIndexOutOfBoundsException(index);
7426 }if(chars.length!=0){
7427 this.move(chars.length,index);
7428 System.arraycopy(chars,0,this.value,index,chars.length);
7429 this.count+=chars.length;
7430 }},"~N,~A");
7431 Clazz_defineMethod(c$,"insert0",
7432 function(index,chars,start,length){
7433 if(0<=index&&index<=this.count){
7434 if(start>=0&&0<=length&&length<=chars.length-start){
7435 if(length!=0){
7436 this.move(length,index);
7437 System.arraycopy(chars,start,this.value,index,length);
7438 this.count+=length;
7439 }return;
7440 }throw new StringIndexOutOfBoundsException("offset "+start+", len "+length+", array.length "+chars.length);
7441 }throw new StringIndexOutOfBoundsException(index);
7442 },"~N,~A,~N,~N");
7443 Clazz_defineMethod(c$,"insert0",
7444 function(index,ch){
7445 if(0>index||index>this.count){
7446 throw new ArrayIndexOutOfBoundsException(index);
7447 }this.move(1,index);
7448 this.value[index]=ch;
7449 this.count++;
7450 },"~N,~N");
7451 Clazz_defineMethod(c$,"insert0",
7452 function(index,string){
7453 if(0<=index&&index<=this.count){
7454 if(string==null)string="null";
7455 var min=string.length;
7456 if(min!=0){
7457 this.move(min,index);
7458 string.getChars(0,min,this.value,index);
7459 this.count+=min;
7460 }}else{
7461 throw new StringIndexOutOfBoundsException(index);
7462 }},"~N,~S");
7463 Clazz_defineMethod(c$,"insert0",
7464 function(index,s,start,end){
7465 if(s==null)s="null";
7466 if(index<0||index>this.count||start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7467 this.insert0(index,s.subSequence(start,end).toString());
7468 },"~N,CharSequence,~N,~N");
7469 Clazz_defineMethod(c$,"length",
7470 function(){
7471 return this.count;
7472 });
7473 Clazz_defineMethod(c$,"move",
7474 ($fz=function(size,index){
7475 var newSize;
7476 if(this.value.length-this.count>=size){
7477 if(!this.shared){
7478 System.arraycopy(this.value,index,this.value,index+size,this.count-index);
7479 return;
7480 }newSize=this.value.length;
7481 }else{
7482 var a=this.count+size;
7483 var b=(this.value.length<<1)+2;
7484 newSize=a>b?a:b;
7485 }var newData=Clazz_newArray(newSize,'\0');
7486 System.arraycopy(this.value,0,newData,0,index);
7487 System.arraycopy(this.value,index,newData,index+size,this.count-index);
7488 this.value=newData;
7489 this.shared=false;
7490 },$fz.isPrivate=true,$fz),"~N,~N");
7491 Clazz_defineMethod(c$,"replace0",
7492 function(start,end,string){
7493 if(start>=0){
7494 if(end>this.count)end=this.count;
7495 if(end>start){
7496 var stringLength=string.length;
7497 var diff=end-start-stringLength;
7498 if(diff>0){
7499 if(!this.shared){
7500 System.arraycopy(this.value,end,this.value,start+stringLength,this.count-end);
7501 }else{
7502 var newData=Clazz_newArray(this.value.length,'\0');
7503 System.arraycopy(this.value,0,newData,0,start);
7504 System.arraycopy(this.value,end,newData,start+stringLength,this.count-end);
7505 this.value=newData;
7506 this.shared=false;
7507 }}else if(diff<0){
7508 this.move(-diff,end);
7509 }else if(this.shared){
7510 this.value=this.value.clone();
7511 this.shared=false;
7512 }string.getChars(0,stringLength,this.value,start);
7513 this.count-=diff;
7514 return;
7515 }if(start==end){
7516 if(string==null)throw new NullPointerException();
7517 this.insert0(start,string);
7518 return;
7519 }}throw new StringIndexOutOfBoundsException();
7520 },"~N,~N,~S");
7521 Clazz_defineMethod(c$,"reverse0",
7522 function(){
7523 if(this.count<2){
7524 return;
7525 }if(!this.shared){
7526 for(var i=0,end=this.count,mid=Math.floor(this.count/2);i<mid;i++){
7527 var temp=this.value[--end];
7528 this.value[end]=this.value[i];
7529 this.value[i]=temp;
7530 }
7531 }else{
7532 var newData=Clazz_newArray(this.value.length,'\0');
7533 for(var i=0,end=this.count;i<this.count;i++){
7534 newData[--end]=this.value[i];
7535 }
7536 this.value=newData;
7537 this.shared=false;
7538 }});
7539 Clazz_defineMethod(c$,"setCharAt",
7540 function(index,ch){
7541 if(0>index||index>=this.count){
7542 throw new StringIndexOutOfBoundsException(index);
7543 }if(this.shared){
7544 this.value=this.value.clone();
7545 this.shared=false;
7546 }this.value[index]=ch;
7547 },"~N,~N");
7548 Clazz_defineMethod(c$,"setLength",
7549 function(length){
7550 if(length<0)throw new StringIndexOutOfBoundsException(length);
7551 if(this.count<length){
7552 if(length>this.value.length){
7553 this.enlargeBuffer(length);
7554 }else{
7555 if(this.shared){
7556 var newData=Clazz_newArray(this.value.length,'\0');
7557 System.arraycopy(this.value,0,newData,0,this.count);
7558 this.value=newData;
7559 this.shared=false;
7560 }else{
7561 for(var i=this.count;i<length;i++){
7562 this.value[i]=String.fromCharCode(0);
7563 }
7564 }}}this.count=length;
7565 },"~N");
7566 Clazz_defineMethod(c$,"substring",
7567 function(start){
7568 if(0<=start&&start<=this.count){
7569 if(start==this.count)return"";
7570 this.shared=true;
7571 return String.instantialize(start,this.count-start,this.value);
7572 }throw new StringIndexOutOfBoundsException(start);
7573 },"~N");
7574 Clazz_defineMethod(c$,"substring",
7575 function(start,end){
7576 if(0<=start&&start<=end&&end<=this.count){
7577 if(start==end)return"";
7578 this.shared=true;
7579 return String.instantialize(this.value,start,end-start);
7580 }throw new StringIndexOutOfBoundsException();
7581 },"~N,~N");
7582 Clazz_overrideMethod(c$,"toString",
7583 function(){
7584 if(this.count==0)return"";
7585 if(this.count>=256&&this.count<=(this.value.length>>1))return String.instantialize(this.value,0,this.count);
7586 this.shared=true;
7587 return String.instantialize(0,this.count,this.value);
7588 });
7589 Clazz_defineMethod(c$,"subSequence",
7590 function(start,end){
7591 return this.substring(start,end);
7592 },"~N,~N");
7593 Clazz_defineMethod(c$,"indexOf",
7594 function(string){
7595 return this.indexOf(string,0);
7596 },"~S");
7597 Clazz_defineMethod(c$,"indexOf",
7598 function(subString,start){
7599 if(start<0)start=0;
7600 var subCount=subString.length;
7601 if(subCount>0){
7602 if(subCount+start>this.count)return-1;
7603 var firstChar=subString.charAt(0);
7604 while(true){
7605 var i=start;
7606 var found=false;
7607 for(;i<this.count;i++)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7608 found=true;
7609 break;
7610 }
7611 if(!found||subCount+i>this.count)return-1;
7612 var o1=i;
7613 var o2=0;
7614 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7615 }
7616 if(o2==subCount)return i;
7617 start=i+1;
7618 }
7619 }return(start<this.count||start==0)?start:this.count;
7620 },"~S,~N");
7621 Clazz_defineMethod(c$,"lastIndexOf",
7622 function(string){
7623 return this.lastIndexOf(string,this.count);
7624 },"~S");
7625 Clazz_defineMethod(c$,"lastIndexOf",
7626 function(subString,start){
7627 var subCount=subString.length;
7628 if(subCount<=this.count&&start>=0){
7629 if(subCount>0){
7630 if(start>this.count-subCount)start=this.count-subCount;
7631 var firstChar=subString.charAt(0);
7632 while(true){
7633 var i=start;
7634 var found=false;
7635 for(;i>=0;--i)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7636 found=true;
7637 break;
7638 }
7639 if(!found)return-1;
7640 var o1=i;
7641 var o2=0;
7642 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7643 }
7644 if(o2==subCount)return i;
7645 start=i-1;
7646 }
7647 }return start<this.count?start:this.count;
7648 }return-1;
7649 },"~S,~N");
7650 Clazz_defineMethod(c$,"trimToSize",
7651 function(){
7652 if(this.count<this.value.length){
7653 var newValue=Clazz_newArray(this.count,'\0');
7654 System.arraycopy(this.value,0,newValue,0,this.count);
7655 this.value=newValue;
7656 this.shared=false;
7657 }});
7658 Clazz_defineStatics(c$,
7659 "INITIAL_CAPACITY",16);
7660 });
7661 // BH adjusted to have only one sort method.
7662 // BH -- added Java 6  copyOfRange
7663
7664 Clazz_load(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){
7665 c$=Clazz_declareType(java.util,"Arrays");
7666
7667 c$.copyOfRange = Clazz_defineMethod (c$, "copyOfRange", 
7668 function (original, from, to) {
7669 to = Math.min(original.length, to);
7670 var newLength = to - from;
7671 if (newLength < 0) throw  new IllegalArgumentException (from + " > " + to);
7672 if (original.slice)
7673   return original.slice(from, to);
7674   // MSIE and Chrome do not have Int32Array.slice()
7675 var c = Clazz_newIntArray(newLength, 0);
7676 for (var i = 0; i < newLength; i++)
7677   c[i] = original[from++];
7678 return c;  
7679 }, "~A,~N,~N");
7680
7681 c$.sort=Clazz_overrideMethod(c$,"sort",
7682 function(a,c,d,e){
7683   switch (arguments.length) {
7684   case 1:
7685     var aux=a.sort(function(o1,o2){
7686       if(typeof o1=="string"||o1 instanceof Comparable){
7687         return o1.compareTo(o2);
7688       }
7689       return o1-o2;
7690       });
7691     for(var i=0;i<a.length;i++){
7692       a[i]=aux[i];
7693     }
7694     return;
7695   case 2:
7696     var aux=a.sort(function(o1,o2){
7697       if(c!=null){
7698         return c.compare(o1,o2);
7699       }else if(typeof o1=="string"||o1 instanceof Comparable){
7700         return o1.compareTo(o2);
7701       }
7702       return o1-o2;
7703       });
7704     for(var i=0;i<a.length;i++){
7705       a[i]=aux[i];
7706     }
7707     return;
7708   case 3:
7709     var fromIndex = c;
7710     var toIndex = d;
7711     this.rangeCheck(a.length,fromIndex,toIndex);
7712     var aux=new Array();
7713     for(var i=fromIndex;i<toIndex;i++){
7714       aux[i-fromIndex]=a[i];
7715     }
7716     aux=aux.sort(function(o1,o2){
7717       if(typeof o1=="string"||o1 instanceof Comparable){
7718         return o1.compareTo(o2);
7719       }
7720       return o1-o2;
7721       });
7722     for(var i=fromIndex;i<toIndex;i++){
7723       a[i]=aux[i-fromIndex];
7724     }
7725     return;
7726   case 4:  
7727     var fromIndex = c;
7728     var toIndex = d;
7729     c = e;
7730     this.rangeCheck(a.length,fromIndex,toIndex);
7731     var aux=new Array();
7732     for(var i=fromIndex;i<toIndex;i++){
7733       aux[i-fromIndex]=a[i];
7734     }
7735     aux=aux.sort(function(o1,o2){
7736       if(c!=null){
7737         return c.compare(o1,o2);
7738       }else if(typeof o1=="string"||o1 instanceof Comparable){
7739         return o1.compareTo(o2);
7740       }
7741       return o1-o2;
7742       });
7743     for(var i=fromIndex;i<toIndex;i++){
7744       a[i]=aux[i-fromIndex];
7745     }
7746   }
7747 });
7748
7749 c$.rangeCheck=Clazz_defineMethod(c$,"rangeCheck",
7750 ($fz=function(arrayLen,fromIndex,toIndex){
7751 if(fromIndex>toIndex)throw new IllegalArgumentException("fromIndex("+fromIndex+") > toIndex("+toIndex+")");
7752 if(fromIndex<0)throw new ArrayIndexOutOfBoundsException(fromIndex);
7753 if(toIndex>arrayLen)throw new ArrayIndexOutOfBoundsException(toIndex);
7754 },$fz.isPrivate=true,$fz),"~N,~N,~N");
7755 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7756 function(a,key){
7757 var low=0;
7758 var high=a.length-1;
7759 while(low<=high){
7760 var mid=(low+high)>>1;
7761 var midVal=a[mid];
7762 if(midVal<key)low=mid+1;
7763 else if(midVal>key)high=mid-1;
7764 else return mid;
7765 }
7766 return-(low+1);
7767 },"~A,~N");
7768 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7769 function(a,key){
7770 var low=0;
7771 var high=a.length-1;
7772 while(low<=high){
7773 var mid=(low+high)>>1;
7774 var midVal=a[mid];
7775 var cmp=(midVal).compareTo(key);
7776 if(cmp<0)low=mid+1;
7777 else if(cmp>0)high=mid-1;
7778 else return mid;
7779 }
7780 return-(low+1);
7781 },"~A,~O");
7782 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7783 function(a,key,c){
7784 if(c==null)return java.util.Arrays.binarySearch(a,key);
7785 var low=0;
7786 var high=a.length-1;
7787 while(low<=high){
7788 var mid=(low+high)>>1;
7789 var midVal=a[mid];
7790 var cmp=c.compare(midVal,key);
7791 if(cmp<0)low=mid+1;
7792 else if(cmp>0)high=mid-1;
7793 else return mid;
7794 }
7795 return-(low+1);
7796 },"~A,~O,java.util.Comparator");
7797 c$.equals=Clazz_defineMethod(c$,"equals",
7798 function(a,a2){
7799 if(a===a2)return true;
7800 if(a==null||a2==null)return false;
7801 var length=a.length;
7802 if(a2.length!=length)return false;
7803 for(var i=0;i<length;i++){
7804 var o1=a[i];
7805 var o2=a2[i];
7806 {
7807 if(!(o1==null?o2==null:(o1.equals==null?o1==o2:o1.equals(o2))))return false;
7808 }}
7809 return true;
7810 },"~A,~A");
7811
7812 c$.fill=Clazz_overrideMethod(c$,"fill",
7813 function(a,fromIndex,toIndex,val){
7814 if (arguments.length == 2) {
7815                 val = fromIndex;
7816                 fromIndex = 0;
7817                 toIndex = a.length;
7818         }       
7819         java.util.Arrays.rangeCheck(a.length,fromIndex,toIndex);
7820         for(var i=fromIndex;i<toIndex;i++)a[i]=val;
7821 });
7822
7823 c$.asList=Clazz_defineMethod(c$,"asList",
7824 function(a){
7825 return new java.util.Arrays.ArrayList(arguments.length == 1 && Clazz_getClassName(a) == "Array" ? a : arguments); // BH must be T...
7826 },"~A");
7827 Clazz_pu$h(self.c$);
7828 c$=Clazz_decorateAsClass(function(){
7829 this.a=null;
7830 Clazz_instantialize(this,arguments);
7831 },java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);
7832 Clazz_makeConstructor(c$,
7833 function(a){
7834 Clazz_superConstructor(this,java.util.Arrays.ArrayList,[]);
7835 if(a==null)throw new NullPointerException();
7836 this.a=a;
7837 },"~A");
7838 Clazz_overrideMethod(c$,"size",
7839 function(){
7840 return this.a.length;
7841 });
7842 Clazz_defineMethod(c$,"toArray",
7843 function(){
7844 return this.a.clone();
7845 });
7846 Clazz_overrideMethod(c$,"get",
7847 function(a){
7848 return this.a[a];
7849 },"~N");
7850 Clazz_overrideMethod(c$,"set",
7851 function(a,b){
7852 var c=this.a[a];
7853 this.a[a]=b;
7854 return c;
7855 },"~N,~O");
7856 Clazz_overrideMethod(c$,"indexOf",
7857 function(a){
7858 if(a==null){
7859 for(var b=0;b<this.a.length;b++)if(this.a[b]==null)return b;
7860
7861 }else{
7862 for(var b=0;b<this.a.length;b++)if(a.equals(this.a[b]))return b;
7863
7864 }return-1;
7865 },"~O");
7866 Clazz_overrideMethod(c$,"contains",
7867 function(a){
7868 return this.indexOf(a)!=-1;
7869 },"~O");
7870 c$=Clazz_p0p();
7871 Clazz_defineStatics(c$,
7872 "INSERTIONSORT_THRESHOLD",7);
7873 });
7874 Clazz_declarePackage ("java.util");
7875 Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () {
7876 c$ = Clazz_decorateAsClass (function () {
7877 this.language = null;
7878 this.country = null;
7879 this.variant = null;
7880 this.hashCodeValue = 0;
7881 Clazz_instantialize (this, arguments);
7882 }, java.util, "Locale", null, [Cloneable, java.io.Serializable]);
7883 Clazz_makeConstructor (c$, 
7884 function (language, country, variant) {
7885 this.language = language.intern ();
7886 this.country = country.intern ();
7887 this.variant = variant.intern ();
7888 }, "~S,~S,~S");
7889 Clazz_makeConstructor (c$, 
7890 function (language, country) {
7891 this.construct (language, country, "");
7892 }, "~S,~S");
7893 Clazz_makeConstructor (c$, 
7894 function (language) {
7895 this.construct (language, "", "");
7896 }, "~S");
7897 Clazz_makeConstructor (c$, 
7898  function (language, country, flag) {
7899 this.language = language;
7900 this.country = country;
7901 this.variant = "";
7902 }, "~S,~S,~B");
7903 c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", 
7904  function (key, language, country) {
7905 var locale =  new java.util.Locale (language, country, false);
7906 java.util.Locale.cache.put (key, locale);
7907 return locale;
7908 }, "~S,~S,~S");
7909 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
7910 function (language, country, variant) {
7911 if (language == null || country == null || variant == null) {
7912 throw  new NullPointerException ();
7913 }var sb =  new StringBuilder ();
7914 sb.append (language).append ('_').append (country).append ('_').append (variant);
7915 var key = sb.toString ();
7916 var locale = java.util.Locale.cache.get (key);
7917 if (locale == null) {
7918 locale =  new java.util.Locale (language, country, variant);
7919 var l = java.util.Locale.cache.put (key, locale);
7920 if (l != null) {
7921 locale = l;
7922 }}return locale;
7923 }, "~S,~S,~S");
7924 c$.getDefault = Clazz_defineMethod (c$, "getDefault", 
7925 function () {
7926 if (java.util.Locale.defaultLocale == null) {
7927 var language;
7928 var country;
7929 var variant;
7930 language = "en";
7931 country = "";
7932 variant = "";
7933 java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant);
7934 }return java.util.Locale.defaultLocale;
7935 });
7936 c$.setDefault = Clazz_defineMethod (c$, "setDefault", 
7937 function (newLocale) {
7938 if (newLocale == null) throw  new NullPointerException ("Can't set default locale to NULL");
7939 java.util.Locale.defaultLocale = newLocale;
7940 }, "java.util.Locale");
7941 Clazz_defineMethod (c$, "getLanguage", 
7942 function () {
7943 return this.language;
7944 });
7945 Clazz_defineMethod (c$, "getCountry", 
7946 function () {
7947 return this.country;
7948 });
7949 Clazz_defineMethod (c$, "getVariant", 
7950 function () {
7951 return this.variant;
7952 });
7953 Clazz_overrideMethod (c$, "toString", 
7954 function () {
7955 var l = this.language.length != 0;
7956 var c = this.country.length != 0;
7957 var v = this.variant.length != 0;
7958 var result =  new StringBuilder (this.language);
7959 if (c || (l && v)) {
7960 result.append ('_').append (this.country);
7961 }if (v && (l || c)) {
7962 result.append ('_').append (this.variant);
7963 }return result.toString ();
7964 });
7965 Clazz_defineMethod (c$, "getDisplayLanguage", 
7966 function () {
7967 return this.getDisplayLanguage (java.util.Locale.getDefault ());
7968 });
7969 Clazz_defineMethod (c$, "getDisplayLanguage", 
7970 function (inLocale) {
7971 return this.getDisplayString (this.language, inLocale, 0);
7972 }, "java.util.Locale");
7973 Clazz_defineMethod (c$, "getDisplayCountry", 
7974 function () {
7975 return this.getDisplayCountry (java.util.Locale.getDefault ());
7976 });
7977 Clazz_defineMethod (c$, "getDisplayCountry", 
7978 function (inLocale) {
7979 return this.getDisplayString (this.country, inLocale, 1);
7980 }, "java.util.Locale");
7981 Clazz_defineMethod (c$, "getDisplayString", 
7982  function (code, inLocale, type) {
7983 if (code.length == 0) {
7984 return "";
7985 }if (inLocale == null) {
7986 throw  new NullPointerException ();
7987 }return inLocale.toString ();
7988 }, "~S,java.util.Locale,~N");
7989 Clazz_defineMethod (c$, "getDisplayVariant", 
7990 function () {
7991 return this.getDisplayVariant (java.util.Locale.getDefault ());
7992 });
7993 Clazz_defineMethod (c$, "getDisplayVariant", 
7994 function (inLocale) {
7995 if (this.variant.length == 0) return "";
7996 return this.variant;
7997 }, "java.util.Locale");
7998 Clazz_defineMethod (c$, "getDisplayName", 
7999 function () {
8000 return this.getDisplayName (java.util.Locale.getDefault ());
8001 });
8002 Clazz_defineMethod (c$, "getDisplayName", 
8003 function (inLocale) {
8004 return inLocale.toString ();
8005 }, "java.util.Locale");
8006 Clazz_defineMethod (c$, "clone", 
8007 function () {
8008 try {
8009 var that = Clazz_superCall (this, java.util.Locale, "clone", []);
8010 return that;
8011 } catch (e) {
8012 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8013 throw  new InternalError ();
8014 } else {
8015 throw e;
8016 }
8017 }
8018 });
8019 Clazz_overrideMethod (c$, "hashCode", 
8020 function () {
8021 var hc = this.hashCodeValue;
8022 if (hc == 0) {
8023 hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4);
8024 this.hashCodeValue = hc;
8025 }return hc;
8026 });
8027 Clazz_overrideMethod (c$, "equals", 
8028 function (obj) {
8029 if (this === obj) return true;
8030 if (!(Clazz_instanceOf (obj, java.util.Locale))) return false;
8031 var other = obj;
8032 return this.language === other.language && this.country === other.country && this.variant === other.variant;
8033 }, "~O");
8034 c$.cache = c$.prototype.cache =  new java.util.HashMap (32);
8035 c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", "");
8036 c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", "");
8037 Clazz_defineStatics (c$,
8038 "DISPLAY_LANGUAGE", 0,
8039 "DISPLAY_COUNTRY", 1,
8040 "defaultLocale", null);
8041 });
8042 Clazz_declarePackage ("java.awt.event");
8043 Clazz_load (["java.util.EventListener"], "java.awt.event.ActionListener", null, function () {
8044 Clazz_declareInterface (java.awt.event, "ActionListener", java.util.EventListener);
8045 });
8046 Clazz_declarePackage ("java.awt.event");
8047 Clazz_load (["java.util.EventListener"], "java.awt.event.AdjustmentListener", null, function () {
8048 Clazz_declareInterface (java.awt.event, "AdjustmentListener", java.util.EventListener);
8049 });
8050 Clazz_declarePackage ("java.awt.event");
8051 Clazz_load (["java.util.EventListener"], "java.awt.event.ComponentListener", null, function () {
8052 Clazz_declareInterface (java.awt.event, "ComponentListener", java.util.EventListener);
8053 });
8054 Clazz_declarePackage ("java.awt.event");
8055 Clazz_load (["java.util.EventListener"], "java.awt.event.ContainerListener", null, function () {
8056 Clazz_declareInterface (java.awt.event, "ContainerListener", java.util.EventListener);
8057 });
8058 Clazz_declarePackage ("java.awt.event");
8059 Clazz_load (["java.util.EventListener"], "java.awt.event.FocusListener", null, function () {
8060 Clazz_declareInterface (java.awt.event, "FocusListener", java.util.EventListener);
8061 });
8062 Clazz_declarePackage ("java.awt.event");
8063 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyBoundsListener", null, function () {
8064 Clazz_declareInterface (java.awt.event, "HierarchyBoundsListener", java.util.EventListener);
8065 });
8066 Clazz_declarePackage ("java.awt.event");
8067 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyListener", null, function () {
8068 Clazz_declareInterface (java.awt.event, "HierarchyListener", java.util.EventListener);
8069 });
8070 Clazz_declarePackage ("java.awt.event");
8071 Clazz_load (["java.util.EventListener"], "java.awt.event.InputMethodListener", null, function () {
8072 Clazz_declareInterface (java.awt.event, "InputMethodListener", java.util.EventListener);
8073 });
8074 Clazz_declarePackage ("java.awt.event");
8075 Clazz_load (["java.util.EventListener"], "java.awt.event.ItemListener", null, function () {
8076 Clazz_declareInterface (java.awt.event, "ItemListener", java.util.EventListener);
8077 });
8078 Clazz_declarePackage ("java.awt.event");
8079 Clazz_load (["java.util.EventListener"], "java.awt.event.KeyListener", null, function () {
8080 Clazz_declareInterface (java.awt.event, "KeyListener", java.util.EventListener);
8081 });
8082 Clazz_declarePackage ("java.awt.event");
8083 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseListener", null, function () {
8084 Clazz_declareInterface (java.awt.event, "MouseListener", java.util.EventListener);
8085 });
8086 Clazz_declarePackage ("java.awt.event");
8087 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseMotionListener", null, function () {
8088 Clazz_declareInterface (java.awt.event, "MouseMotionListener", java.util.EventListener);
8089 });
8090 Clazz_declarePackage ("java.awt.event");
8091 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseWheelListener", null, function () {
8092 Clazz_declareInterface (java.awt.event, "MouseWheelListener", java.util.EventListener);
8093 });
8094 Clazz_declarePackage ("java.awt.event");
8095 Clazz_load (["java.util.EventListener"], "java.awt.event.TextListener", null, function () {
8096 Clazz_declareInterface (java.awt.event, "TextListener", java.util.EventListener);
8097 });
8098 Clazz_declarePackage ("java.awt.event");
8099 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowFocusListener", null, function () {
8100 Clazz_declareInterface (java.awt.event, "WindowFocusListener", java.util.EventListener);
8101 });
8102 Clazz_declarePackage ("java.awt.event");
8103 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowListener", null, function () {
8104 Clazz_declareInterface (java.awt.event, "WindowListener", java.util.EventListener);
8105 });
8106 Clazz_declarePackage ("java.awt.event");
8107 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowStateListener", null, function () {
8108 Clazz_declareInterface (java.awt.event, "WindowStateListener", java.util.EventListener);
8109 });
8110 Clazz_declarePackage ("java.awt");
8111 Clazz_load (null, "java.awt.Cursor", ["java.lang.IllegalArgumentException"], function () {
8112 c$ = Clazz_decorateAsClass (function () {
8113 this.type = 0;
8114 this.name = null;
8115 Clazz_instantialize (this, arguments);
8116 }, java.awt, "Cursor");
8117 c$.getPredefinedCursor = Clazz_defineMethod (c$, "getPredefinedCursor", 
8118 function (type) {
8119 if (type < 0 || type > 13) {
8120 throw  new IllegalArgumentException ("illegal cursor type");
8121 }var c = java.awt.Cursor.predefinedPrivate[type];
8122 if (c == null) {
8123 java.awt.Cursor.predefinedPrivate[type] = c =  new java.awt.Cursor (type);
8124 }if (java.awt.Cursor.predefined[type] == null) {
8125 java.awt.Cursor.predefined[type] = c;
8126 }return c;
8127 }, "~N");
8128 c$.getSystemCustomCursor = Clazz_defineMethod (c$, "getSystemCustomCursor", 
8129 function (name) {
8130 return null;
8131 }, "~S");
8132 c$.getDefaultCursor = Clazz_defineMethod (c$, "getDefaultCursor", 
8133 function () {
8134 return java.awt.Cursor.getPredefinedCursor (0);
8135 });
8136 Clazz_makeConstructor (c$, 
8137 function (type) {
8138 if (type < 0 || type > 13) {
8139 throw  new IllegalArgumentException ("illegal cursor type");
8140 }this.type = type;
8141 this.name = "TODO_CURSOR";
8142 }, "~N");
8143 Clazz_makeConstructor (c$, 
8144 function (name) {
8145 this.type = -1;
8146 this.name = name;
8147 }, "~S");
8148 Clazz_defineMethod (c$, "getType", 
8149 function () {
8150 return this.type;
8151 });
8152 Clazz_defineMethod (c$, "getName", 
8153 function () {
8154 return this.name;
8155 });
8156 Clazz_overrideMethod (c$, "toString", 
8157 function () {
8158 return this.getClass ().getName () + "[" + this.getName () + "]";
8159 });
8160 Clazz_defineStatics (c$,
8161 "DEFAULT_CURSOR", 0,
8162 "CROSSHAIR_CURSOR", 1,
8163 "TEXT_CURSOR", 2,
8164 "WAIT_CURSOR", 3,
8165 "SW_RESIZE_CURSOR", 4,
8166 "SE_RESIZE_CURSOR", 5,
8167 "NW_RESIZE_CURSOR", 6,
8168 "NE_RESIZE_CURSOR", 7,
8169 "N_RESIZE_CURSOR", 8,
8170 "S_RESIZE_CURSOR", 9,
8171 "W_RESIZE_CURSOR", 10,
8172 "E_RESIZE_CURSOR", 11,
8173 "HAND_CURSOR", 12,
8174 "MOVE_CURSOR", 13);
8175 c$.predefined = c$.prototype.predefined =  new Array (14);
8176 c$.predefinedPrivate = c$.prototype.predefinedPrivate =  new Array (14);
8177 Clazz_defineStatics (c$,
8178 "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"])]),
8179 "CUSTOM_CURSOR", -1);
8180 });
8181 Clazz_declarePackage ("java.awt");
8182 Clazz_load (["java.lang.Error"], "java.awt.AWTError", null, function () {
8183 c$ = Clazz_declareType (java.awt, "AWTError", Error);
8184 });
8185 Clazz_declarePackage ("java.awt");
8186 Clazz_load (null, "java.awt.Insets", ["java.lang.InternalError"], function () {
8187 c$ = Clazz_decorateAsClass (function () {
8188 this.top = 0;
8189 this.left = 0;
8190 this.bottom = 0;
8191 this.right = 0;
8192 Clazz_instantialize (this, arguments);
8193 }, java.awt, "Insets", null, [Cloneable, java.io.Serializable]);
8194 Clazz_makeConstructor (c$, 
8195 function (top, left, bottom, right) {
8196 this.top = top;
8197 this.left = left;
8198 this.bottom = bottom;
8199 this.right = right;
8200 }, "~N,~N,~N,~N");
8201 Clazz_defineMethod (c$, "set", 
8202 function (top, left, bottom, right) {
8203 this.top = top;
8204 this.left = left;
8205 this.bottom = bottom;
8206 this.right = right;
8207 }, "~N,~N,~N,~N");
8208 Clazz_overrideMethod (c$, "equals", 
8209 function (obj) {
8210 if (Clazz_instanceOf (obj, java.awt.Insets)) {
8211 var insets = obj;
8212 return ((this.top == insets.top) && (this.left == insets.left) && (this.bottom == insets.bottom) && (this.right == insets.right));
8213 }return false;
8214 }, "~O");
8215 Clazz_overrideMethod (c$, "hashCode", 
8216 function () {
8217 var sum1 = this.left + this.bottom;
8218 var sum2 = this.right + this.top;
8219 var val1 = Clazz_doubleToInt (sum1 * (sum1 + 1) / 2) + this.left;
8220 var val2 = Clazz_doubleToInt (sum2 * (sum2 + 1) / 2) + this.top;
8221 var sum3 = val1 + val2;
8222 return Clazz_doubleToInt (sum3 * (sum3 + 1) / 2) + val2;
8223 });
8224 Clazz_overrideMethod (c$, "toString", 
8225 function () {
8226 return this.getClass ().getName () + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]";
8227 });
8228 Clazz_defineMethod (c$, "clone", 
8229 function () {
8230 try {
8231 return Clazz_superCall (this, java.awt.Insets, "clone", []);
8232 } catch (e) {
8233 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8234 throw  new InternalError ();
8235 } else {
8236 throw e;
8237 }
8238 }
8239 });
8240 });
8241 Clazz_declarePackage ("java.awt");
8242 Clazz_load (["java.util.Map", "$.HashMap"], "java.awt.RenderingHints", ["java.lang.IllegalArgumentException", "$.InternalError", "java.util.Collections"], function () {
8243 c$ = Clazz_decorateAsClass (function () {
8244 this.hintmap = null;
8245 Clazz_instantialize (this, arguments);
8246 }, java.awt, "RenderingHints", null, [java.util.Map, Cloneable]);
8247 Clazz_prepareFields (c$, function () {
8248 this.hintmap =  new java.util.HashMap (7);
8249 });
8250 Clazz_overrideMethod (c$, "size", 
8251 function () {
8252 return this.hintmap.size ();
8253 });
8254 Clazz_overrideMethod (c$, "isEmpty", 
8255 function () {
8256 return this.hintmap.isEmpty ();
8257 });
8258 Clazz_overrideMethod (c$, "containsKey", 
8259 function (key) {
8260 return this.hintmap.containsKey (key);
8261 }, "~O");
8262 Clazz_overrideMethod (c$, "containsValue", 
8263 function (value) {
8264 return this.hintmap.containsValue (value);
8265 }, "~O");
8266 Clazz_overrideMethod (c$, "get", 
8267 function (key) {
8268 return this.hintmap.get (key);
8269 }, "~O");
8270 Clazz_overrideMethod (c$, "put", 
8271 function (key, value) {
8272 if (!(key).isCompatibleValue (value)) {
8273 throw  new IllegalArgumentException (value + " incompatible with " + key);
8274 }return this.hintmap.put (key, value);
8275 }, "~O,~O");
8276 Clazz_defineMethod (c$, "add", 
8277 function (hints) {
8278 this.hintmap.putAll (hints.hintmap);
8279 }, "java.awt.RenderingHints");
8280 Clazz_overrideMethod (c$, "clear", 
8281 function () {
8282 this.hintmap.clear ();
8283 });
8284 Clazz_overrideMethod (c$, "remove", 
8285 function (key) {
8286 return this.hintmap.remove (key);
8287 }, "~O");
8288 Clazz_overrideMethod (c$, "putAll", 
8289 function (m) {
8290 if (java.awt.RenderingHints.isInstance (m)) {
8291 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.hintmap.put (entry.getKey (), entry.getValue ());
8292
8293 } else {
8294 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.put (entry.getKey (), entry.getValue ());
8295
8296 }}, "java.util.Map");
8297 Clazz_overrideMethod (c$, "keySet", 
8298 function () {
8299 return this.hintmap.keySet ();
8300 });
8301 Clazz_overrideMethod (c$, "values", 
8302 function () {
8303 return this.hintmap.values ();
8304 });
8305 Clazz_overrideMethod (c$, "entrySet", 
8306 function () {
8307 return java.util.Collections.unmodifiableMap (this.hintmap).entrySet ();
8308 });
8309 Clazz_overrideMethod (c$, "equals", 
8310 function (o) {
8311 if (Clazz_instanceOf (o, java.awt.RenderingHints)) {
8312 return this.hintmap.equals ((o).hintmap);
8313 } else if (Clazz_instanceOf (o, java.util.Map)) {
8314 return this.hintmap.equals (o);
8315 }return false;
8316 }, "~O");
8317 Clazz_overrideMethod (c$, "hashCode", 
8318 function () {
8319 return this.hintmap.hashCode ();
8320 });
8321 Clazz_overrideMethod (c$, "clone", 
8322 function () {
8323 var rh;
8324 try {
8325 {
8326 rh = Clazz_clone(this);
8327 if (this.hintmap != null) { rh.hintmap =
8328 this.hintmap.cloneHM(); }
8329 }} catch (e) {
8330 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8331 throw  new InternalError ();
8332 } else {
8333 throw e;
8334 }
8335 }
8336 return rh;
8337 });
8338 Clazz_overrideMethod (c$, "toString", 
8339 function () {
8340 if (this.hintmap == null) {
8341 return this.getClass ().getName () + "@" + Integer.toHexString (this.hashCode ()) + " (0 hints)";
8342 }return this.hintmap.toString ();
8343 });
8344 Clazz_pu$h(self.c$);
8345 c$ = Clazz_decorateAsClass (function () {
8346 this.privatekey = 0;
8347 Clazz_instantialize (this, arguments);
8348 }, java.awt.RenderingHints, "Key");
8349 Clazz_defineMethod (c$, "getIdentity", 
8350  function () {
8351 return this.getClass ().getName () + "@" + Integer.toHexString (System.identityHashCode (this.getClass ())) + ":" + Integer.toHexString (this.privatekey);
8352 });
8353 Clazz_defineMethod (c$, "recordIdentity", 
8354  function (a) {
8355 var b = a.getIdentity ();
8356 var c = java.awt.RenderingHints.Key.identitymap.get (b);
8357 if (c != null) {
8358 var d = c;
8359 if (d != null && d.getClass () === a.getClass ()) {
8360 throw  new IllegalArgumentException (b + " already registered");
8361 }}java.awt.RenderingHints.Key.identitymap.put (b, a);
8362 }, "java.awt.RenderingHints.Key");
8363 Clazz_makeConstructor (c$, 
8364 function (a) {
8365 this.privatekey = a;
8366 this.recordIdentity (this);
8367 }, "~N");
8368 Clazz_defineMethod (c$, "intKey", 
8369 function () {
8370 return this.privatekey;
8371 });
8372 Clazz_overrideMethod (c$, "equals", 
8373 function (a) {
8374 return this === a;
8375 }, "~O");
8376 c$.identitymap = c$.prototype.identitymap =  new java.util.HashMap (17);
8377 c$ = Clazz_p0p ();
8378 Clazz_pu$h(self.c$);
8379 c$ = Clazz_decorateAsClass (function () {
8380 this.description = null;
8381 Clazz_instantialize (this, arguments);
8382 }, java.awt.RenderingHints, "SunKey", java.awt.RenderingHints.Key);
8383 Clazz_makeConstructor (c$, 
8384 function (a, b) {
8385 Clazz_superConstructor (this, java.awt.RenderingHints.SunKey, [a]);
8386 this.description = b;
8387 }, "~N,~S");
8388 Clazz_defineMethod (c$, "getIndex", 
8389 function () {
8390 return this.privatekey;
8391 });
8392 Clazz_overrideMethod (c$, "toString", 
8393 function () {
8394 return this.description;
8395 });
8396 Clazz_overrideMethod (c$, "isCompatibleValue", 
8397 function (a) {
8398 if (Clazz_instanceOf (a, java.awt.RenderingHints.Value)) {
8399 return (a).isCompatibleKey (this);
8400 }return false;
8401 }, "~O");
8402 c$ = Clazz_p0p ();
8403 Clazz_pu$h(self.c$);
8404 c$ = Clazz_decorateAsClass (function () {
8405 this.myKey = null;
8406 this.index = 0;
8407 this.description = null;
8408 Clazz_instantialize (this, arguments);
8409 }, java.awt.RenderingHints, "Value");
8410 c$.register = Clazz_defineMethod (c$, "register", 
8411  function (a, b) {
8412 var c = a.getIndex ();
8413 var d = b.getIndex ();
8414 if (java.awt.RenderingHints.Value.ValueObjects[c][d] != null) {
8415 throw  new InternalError ("duplicate index: " + d);
8416 }java.awt.RenderingHints.Value.ValueObjects[c][d] = b;
8417 }, "java.awt.RenderingHints.SunKey,java.awt.RenderingHints.Value");
8418 c$.get = Clazz_defineMethod (c$, "get", 
8419 function (a, b) {
8420 return java.awt.RenderingHints.Value.ValueObjects[a][b];
8421 }, "~N,~N");
8422 Clazz_makeConstructor (c$, 
8423 function (a, b, c) {
8424 this.myKey = a;
8425 this.index = b;
8426 this.description = c;
8427 java.awt.RenderingHints.Value.register (a, this);
8428 }, "java.awt.RenderingHints.SunKey,~N,~S");
8429 Clazz_defineMethod (c$, "getIndex", 
8430 function () {
8431 return this.index;
8432 });
8433 Clazz_overrideMethod (c$, "toString", 
8434 function () {
8435 return this.description;
8436 });
8437 Clazz_defineMethod (c$, "isCompatibleKey", 
8438 function (a) {
8439 return this.myKey === a;
8440 }, "java.awt.RenderingHints.SunKey");
8441 Clazz_overrideMethod (c$, "hashCode", 
8442 function () {
8443 return this.description.hashCode ();
8444 });
8445 Clazz_overrideMethod (c$, "equals", 
8446 function (a) {
8447 return this === a;
8448 }, "~O");
8449 c$.ValueObjects = c$.prototype.ValueObjects =  Clazz_newArray (9, 8, null);
8450 c$ = Clazz_p0p ();
8451 Clazz_pu$h(self.c$);
8452 c$ = Clazz_declareType (java.awt.RenderingHints, "LCDContrastKey", java.awt.RenderingHints.SunKey);
8453 Clazz_overrideMethod (c$, "isCompatibleValue", 
8454 function (a) {
8455 if (Clazz_instanceOf (a, Integer)) {
8456 var b = (a).intValue ();
8457 return b >= 100 && b <= 250;
8458 }return false;
8459 }, "~O");
8460 c$ = Clazz_p0p ();
8461 Clazz_defineStatics (c$,
8462 "NUM_KEYS", 9,
8463 "VALS_PER_KEY", 8,
8464 "INTKEY_RENDERING", 0,
8465 "INTVAL_RENDER_DEFAULT", 0,
8466 "INTVAL_RENDER_SPEED", 1,
8467 "INTVAL_RENDER_QUALITY", 2,
8468 "INTKEY_ANTIALIASING", 1,
8469 "INTVAL_ANTIALIAS_DEFAULT", 0,
8470 "INTVAL_ANTIALIAS_OFF", 1,
8471 "INTVAL_ANTIALIAS_ON", 2,
8472 "INTKEY_TEXT_ANTIALIASING", 2,
8473 "INTVAL_TEXT_ANTIALIAS_DEFAULT", 0,
8474 "INTVAL_TEXT_ANTIALIAS_OFF", 1,
8475 "INTVAL_TEXT_ANTIALIAS_ON", 2,
8476 "INTVAL_TEXT_ANTIALIAS_GASP", 3,
8477 "INTVAL_TEXT_ANTIALIAS_LCD_HRGB", 4,
8478 "INTVAL_TEXT_ANTIALIAS_LCD_HBGR", 5,
8479 "INTVAL_TEXT_ANTIALIAS_LCD_VRGB", 6,
8480 "INTVAL_TEXT_ANTIALIAS_LCD_VBGR", 7,
8481 "INTKEY_FRACTIONALMETRICS", 3,
8482 "INTVAL_FRACTIONALMETRICS_DEFAULT", 0,
8483 "INTVAL_FRACTIONALMETRICS_OFF", 1,
8484 "INTVAL_FRACTIONALMETRICS_ON", 2,
8485 "INTKEY_DITHERING", 4,
8486 "INTVAL_DITHER_DEFAULT", 0,
8487 "INTVAL_DITHER_DISABLE", 1,
8488 "INTVAL_DITHER_ENABLE", 2,
8489 "INTKEY_INTERPOLATION", 5,
8490 "INTVAL_INTERPOLATION_NEAREST_NEIGHBOR", 0,
8491 "INTVAL_INTERPOLATION_BILINEAR", 1,
8492 "INTVAL_INTERPOLATION_BICUBIC", 2,
8493 "INTKEY_ALPHA_INTERPOLATION", 6,
8494 "INTVAL_ALPHA_INTERPOLATION_DEFAULT", 0,
8495 "INTVAL_ALPHA_INTERPOLATION_SPEED", 1,
8496 "INTVAL_ALPHA_INTERPOLATION_QUALITY", 2,
8497 "INTKEY_COLOR_RENDERING", 7,
8498 "INTVAL_COLOR_RENDER_DEFAULT", 0,
8499 "INTVAL_COLOR_RENDER_SPEED", 1,
8500 "INTVAL_COLOR_RENDER_QUALITY", 2,
8501 "INTKEY_STROKE_CONTROL", 8,
8502 "INTVAL_STROKE_DEFAULT", 0,
8503 "INTVAL_STROKE_NORMALIZE", 1,
8504 "INTVAL_STROKE_PURE", 2,
8505 "INTKEY_AATEXT_LCD_CONTRAST", 100);
8506 c$.KEY_RENDERING = c$.prototype.KEY_RENDERING =  new java.awt.RenderingHints.SunKey (0, "Global rendering quality key");
8507 c$.VALUE_RENDER_SPEED = c$.prototype.VALUE_RENDER_SPEED =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 1, "Fastest rendering methods");
8508 c$.VALUE_RENDER_QUALITY = c$.prototype.VALUE_RENDER_QUALITY =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 2, "Highest quality rendering methods");
8509 c$.VALUE_RENDER_DEFAULT = c$.prototype.VALUE_RENDER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 0, "Default rendering methods");
8510 c$.KEY_ANTIALIASING = c$.prototype.KEY_ANTIALIASING =  new java.awt.RenderingHints.SunKey (1, "Global antialiasing enable key");
8511 c$.VALUE_ANTIALIAS_ON = c$.prototype.VALUE_ANTIALIAS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 2, "Antialiased rendering mode");
8512 c$.VALUE_ANTIALIAS_OFF = c$.prototype.VALUE_ANTIALIAS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 1, "Nonantialiased rendering mode");
8513 c$.VALUE_ANTIALIAS_DEFAULT = c$.prototype.VALUE_ANTIALIAS_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 0, "Default antialiasing rendering mode");
8514 c$.KEY_FRACTIONALMETRICS = c$.prototype.KEY_FRACTIONALMETRICS =  new java.awt.RenderingHints.SunKey (3, "Fractional metrics enable key");
8515 c$.VALUE_FRACTIONALMETRICS_ON = c$.prototype.VALUE_FRACTIONALMETRICS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 2, "Fractional text metrics mode");
8516 c$.VALUE_FRACTIONALMETRICS_OFF = c$.prototype.VALUE_FRACTIONALMETRICS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 1, "Integer text metrics mode");
8517 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");
8518 c$.KEY_DITHERING = c$.prototype.KEY_DITHERING =  new java.awt.RenderingHints.SunKey (4, "Dithering quality key");
8519 c$.VALUE_DITHER_ENABLE = c$.prototype.VALUE_DITHER_ENABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 2, "Dithered rendering mode");
8520 c$.VALUE_DITHER_DISABLE = c$.prototype.VALUE_DITHER_DISABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 1, "Nondithered rendering mode");
8521 c$.VALUE_DITHER_DEFAULT = c$.prototype.VALUE_DITHER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 0, "Default dithering mode");
8522 c$.KEY_INTERPOLATION = c$.prototype.KEY_INTERPOLATION =  new java.awt.RenderingHints.SunKey (5, "Image interpolation method key");
8523 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");
8524 c$.VALUE_INTERPOLATION_BILINEAR = c$.prototype.VALUE_INTERPOLATION_BILINEAR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 1, "Bilinear image interpolation mode");
8525 c$.VALUE_INTERPOLATION_BICUBIC = c$.prototype.VALUE_INTERPOLATION_BICUBIC =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 2, "Bicubic image interpolation mode");
8526 c$.KEY_ALPHA_INTERPOLATION = c$.prototype.KEY_ALPHA_INTERPOLATION =  new java.awt.RenderingHints.SunKey (6, "Alpha blending interpolation method key");
8527 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");
8528 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");
8529 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");
8530 c$.KEY_COLOR_RENDERING = c$.prototype.KEY_COLOR_RENDERING =  new java.awt.RenderingHints.SunKey (7, "Color rendering quality key");
8531 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");
8532 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");
8533 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");
8534 c$.KEY_STROKE_CONTROL = c$.prototype.KEY_STROKE_CONTROL =  new java.awt.RenderingHints.SunKey (8, "Stroke normalization control key");
8535 c$.VALUE_STROKE_DEFAULT = c$.prototype.VALUE_STROKE_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 0, "Default stroke normalization");
8536 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");
8537 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");
8538 c$.KEY_TEXT_ANTIALIASING = c$.prototype.KEY_TEXT_ANTIALIASING =  new java.awt.RenderingHints.SunKey (2, "Text-specific antialiasing enable key");
8539 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");
8540 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");
8541 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");
8542 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");
8543 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");
8544 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");
8545 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");
8546 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");
8547 c$.KEY_TEXT_ANTIALIAS_LCD_CONTRAST = c$.prototype.KEY_TEXT_ANTIALIAS_LCD_CONTRAST =  new java.awt.RenderingHints.LCDContrastKey (100, "Text-specific LCD contrast key");
8548 c$.KEY_TEXT_LCD_CONTRAST = c$.prototype.KEY_TEXT_LCD_CONTRAST = java.awt.RenderingHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST;
8549 });
8550 //BH note: a declared static superclass must come before a static class referencing it
8551
8552 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(){
8553 c$=Clazz_declareType(java.util,"Collections");
8554 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8555 function(list,object){
8556 if(list==null){
8557 throw new NullPointerException();
8558 }if(list.isEmpty()){
8559 return-1;
8560 }var key=object;
8561 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8562 var it=list.listIterator();
8563 while(it.hasNext()){
8564 var result;
8565 if((result=key.compareTo(it.next()))<=0){
8566 if(result==0){
8567 return it.previousIndex();
8568 }return-it.previousIndex()-1;
8569 }}
8570 return-list.size()-1;
8571 }var low=0;
8572 var mid=list.size();
8573 var high=mid-1;
8574 var result=-1;
8575 while(low<=high){
8576 mid=(low+high)>>1;
8577 if((result=key.compareTo(list.get(mid)))>0){
8578 low=mid+1;
8579 }else if(result==0){
8580 return mid;
8581 }else{
8582 high=mid-1;
8583 }}
8584 return-mid-(result<0?1:2);
8585 },"java.util.List,~O");
8586 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8587 function(list,object,comparator){
8588 if(comparator==null){
8589 return java.util.Collections.binarySearch(list,object);
8590 }if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8591 var it=list.listIterator();
8592 while(it.hasNext()){
8593 var result;
8594 if((result=comparator.compare(object,it.next()))<=0){
8595 if(result==0){
8596 return it.previousIndex();
8597 }return-it.previousIndex()-1;
8598 }}
8599 return-list.size()-1;
8600 }var low=0;
8601 var mid=list.size();
8602 var high=mid-1;
8603 var result=-1;
8604 while(low<=high){
8605 mid=(low+high)>>1;
8606 if((result=comparator.compare(object,list.get(mid)))>0){
8607 low=mid+1;
8608 }else if(result==0){
8609 return mid;
8610 }else{
8611 high=mid-1;
8612 }}
8613 return-mid-(result<0?1:2);
8614 },"java.util.List,~O,java.util.Comparator");
8615 c$.copy=Clazz_defineMethod(c$,"copy",
8616 function(destination,source){
8617 if(destination.size()<source.size()){
8618 throw new ArrayIndexOutOfBoundsException();
8619 }var srcIt=source.iterator();
8620 var destIt=destination.listIterator();
8621 while(srcIt.hasNext()){
8622 try{
8623 destIt.next();
8624 }catch(e){
8625 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
8626 throw new ArrayIndexOutOfBoundsException();
8627 }else{
8628 throw e;
8629 }
8630 }
8631 destIt.set(srcIt.next());
8632 }
8633 },"java.util.List,java.util.List");
8634 c$.enumeration=Clazz_defineMethod(c$,"enumeration",
8635 function(collection){
8636 var c=collection;
8637
8638 if (!Clazz_isClassDefined("java.util.Collections$1"))
8639         java.util.Collections.$Collections$1$(c);
8640
8641 var x = Clazz_innerTypeInstance(java.util.Collections$1,this,null);
8642
8643 return x;
8644 },"java.util.Collection");
8645
8646 c$.fill=Clazz_defineMethod(c$,"fill",
8647 function(list,object){
8648 var it=list.listIterator();
8649 while(it.hasNext()){
8650 it.next();
8651 it.set(object);
8652 }
8653 },"java.util.List,~O");
8654 c$.max=Clazz_defineMethod(c$,"max",
8655 function(collection){
8656 var it=collection.iterator();
8657 var max=it.next();
8658 while(it.hasNext()){
8659 var next=it.next();
8660 if(max.compareTo(next)<0){
8661 max=next;
8662 }}
8663 return max;
8664 },"java.util.Collection");
8665 c$.max=Clazz_defineMethod(c$,"max",
8666 function(collection,comparator){
8667 var it=collection.iterator();
8668 var max=it.next();
8669 while(it.hasNext()){
8670 var next=it.next();
8671 if(comparator.compare(max,next)<0){
8672 max=next;
8673 }}
8674 return max;
8675 },"java.util.Collection,java.util.Comparator");
8676 c$.min=Clazz_defineMethod(c$,"min",
8677 function(collection){
8678 var it=collection.iterator();
8679 var min=it.next();
8680 while(it.hasNext()){
8681 var next=it.next();
8682 if(min.compareTo(next)>0){
8683 min=next;
8684 }}
8685 return min;
8686 },"java.util.Collection");
8687 c$.min=Clazz_defineMethod(c$,"min",
8688 function(collection,comparator){
8689 var it=collection.iterator();
8690 var min=it.next();
8691 while(it.hasNext()){
8692 var next=it.next();
8693 if(comparator.compare(min,next)>0){
8694 min=next;
8695 }}
8696 return min;
8697 },"java.util.Collection,java.util.Comparator");
8698 c$.nCopies=Clazz_defineMethod(c$,"nCopies",
8699 function(length,object){
8700 return new java.util.Collections.CopiesList(length,object);
8701 },"~N,~O");
8702 c$.reverse=Clazz_defineMethod(c$,"reverse",
8703 function(list){
8704 var size=list.size();
8705 var front=list.listIterator();
8706 var back=list.listIterator(size);
8707 for(var i=0;i<Math.floor(size/2);i++){
8708 var frontNext=front.next();
8709 var backPrev=back.previous();
8710 front.set(backPrev);
8711 back.set(frontNext);
8712 }
8713 },"java.util.List");
8714 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8715 function(){
8716 return new java.util.Collections.ReverseComparator();
8717 });
8718 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8719 function(c){
8720 if(c==null){
8721 return java.util.Collections.reverseOrder();
8722 }return new java.util.Collections.ReverseComparatorWithComparator(c);
8723 },"java.util.Comparator");
8724 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8725 function(list){
8726 java.util.Collections.shuffle(list,new java.util.Random());
8727 },"java.util.List");
8728 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8729 function(list,random){
8730 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8731 var array=list.toArray();
8732 for(var i=array.length-1;i>0;i--){
8733 var index=random.nextInt()%(i+1);
8734 if(index<0){
8735 index=-index;
8736 }var temp=array[i];
8737 array[i]=array[index];
8738 array[index]=temp;
8739 }
8740 var i=0;
8741 var it=list.listIterator();
8742 while(it.hasNext()){
8743 it.next();
8744 it.set(array[i++]);
8745 }
8746 }else{
8747 var rawList=list;
8748 for(var i=rawList.size()-1;i>0;i--){
8749 var index=random.nextInt()%(i+1);
8750 if(index<0){
8751 index=-index;
8752 }rawList.set(index,rawList.set(i,rawList.get(index)));
8753 }
8754 }},"java.util.List,java.util.Random");
8755 c$.singleton=Clazz_defineMethod(c$,"singleton",
8756 function(object){
8757 return new java.util.Collections.SingletonSet(object);
8758 },"~O");
8759 c$.singletonList=Clazz_defineMethod(c$,"singletonList",
8760 function(object){
8761 return new java.util.Collections.SingletonList(object);
8762 },"~O");
8763 c$.singletonMap=Clazz_defineMethod(c$,"singletonMap",
8764 function(key,value){
8765 return new java.util.Collections.SingletonMap(key,value);
8766 },"~O,~O");
8767 c$.sort=Clazz_defineMethod(c$,"sort",
8768 function(list){
8769 var array=list.toArray();
8770 java.util.Arrays.sort(array);
8771 var i=0;
8772 var it=list.listIterator();
8773 while(it.hasNext()){
8774 it.next();
8775 it.set(array[i++]);
8776 }
8777 },"java.util.List");
8778 c$.sort=Clazz_defineMethod(c$,"sort",
8779 function(list,comparator){
8780 var array=list.toArray(new Array(list.size()));
8781 java.util.Arrays.sort(array,comparator);
8782 var i=0;
8783 var it=list.listIterator();
8784 while(it.hasNext()){
8785 it.next();
8786 it.set(array[i++]);
8787 }
8788 },"java.util.List,java.util.Comparator");
8789 c$.swap=Clazz_defineMethod(c$,"swap",
8790 function(list,index1,index2){
8791 if(list==null){
8792 throw new NullPointerException();
8793 }if(index1==index2){
8794 return;
8795 }var rawList=list;
8796 rawList.set(index2,rawList.set(index1,rawList.get(index2)));
8797 },"java.util.List,~N,~N");
8798 c$.replaceAll=Clazz_defineMethod(c$,"replaceAll",
8799 function(list,obj,obj2){
8800 var index;
8801 var found=false;
8802 while((index=list.indexOf(obj))>-1){
8803 found=true;
8804 list.set(index,obj2);
8805 }
8806 return found;
8807 },"java.util.List,~O,~O");
8808 c$.rotate=Clazz_defineMethod(c$,"rotate",
8809 function(lst,dist){
8810 var list=lst;
8811 var size=list.size();
8812 if(size==0){
8813 return;
8814 }var normdist;
8815 if(dist>0){
8816 normdist=dist%size;
8817 }else{
8818 normdist=size-((dist%size)*(-1));
8819 }if(normdist==0||normdist==size){
8820 return;
8821 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8822 var temp=list.get(0);
8823 var index=0;
8824 var beginIndex=0;
8825 for(var i=0;i<size;i++){
8826 index=(index+normdist)%size;
8827 temp=list.set(index,temp);
8828 if(index==beginIndex){
8829 index=++beginIndex;
8830 temp=list.get(beginIndex);
8831 }}
8832 }else{
8833 var divideIndex=(size-normdist)%size;
8834 var sublist1=list.subList(0,divideIndex);
8835 var sublist2=list.subList(divideIndex,size);
8836 java.util.Collections.reverse(sublist1);
8837 java.util.Collections.reverse(sublist2);
8838 java.util.Collections.reverse(list);
8839 }},"java.util.List,~N");
8840 c$.indexOfSubList=Clazz_defineMethod(c$,"indexOfSubList",
8841 function(list,sublist){
8842 var size=list.size();
8843 var sublistSize=sublist.size();
8844 if(sublistSize>size){
8845 return-1;
8846 }if(sublistSize==0){
8847 return 0;
8848 }var firstObj=sublist.get(0);
8849 var index=list.indexOf(firstObj);
8850 if(index==-1){
8851 return-1;
8852 }while(index<size&&(size-index>=sublistSize)){
8853 var listIt=list.listIterator(index);
8854 if((firstObj==null)?listIt.next()==null:firstObj.equals(listIt.next())){
8855 var sublistIt=sublist.listIterator(1);
8856 var difFound=false;
8857 while(sublistIt.hasNext()){
8858 var element=sublistIt.next();
8859 if(!listIt.hasNext()){
8860 return-1;
8861 }if((element==null)?listIt.next()!=null:!element.equals(listIt.next())){
8862 difFound=true;
8863 break;
8864 }}
8865 if(!difFound){
8866 return index;
8867 }}index++;
8868 }
8869 return-1;
8870 },"java.util.List,java.util.List");
8871 c$.lastIndexOfSubList=Clazz_defineMethod(c$,"lastIndexOfSubList",
8872 function(list,sublist){
8873 var sublistSize=sublist.size();
8874 var size=list.size();
8875 if(sublistSize>size){
8876 return-1;
8877 }if(sublistSize==0){
8878 return size;
8879 }var lastObj=sublist.get(sublistSize-1);
8880 var index=list.lastIndexOf(lastObj);
8881 while((index>-1)&&(index+1>=sublistSize)){
8882 var listIt=list.listIterator(index+1);
8883 if((lastObj==null)?listIt.previous()==null:lastObj.equals(listIt.previous())){
8884 var sublistIt=sublist.listIterator(sublistSize-1);
8885 var difFound=false;
8886 while(sublistIt.hasPrevious()){
8887 var element=sublistIt.previous();
8888 if(!listIt.hasPrevious()){
8889 return-1;
8890 }if((element==null)?listIt.previous()!=null:!element.equals(listIt.previous())){
8891 difFound=true;
8892 break;
8893 }}
8894 if(!difFound){
8895 return listIt.nextIndex();
8896 }}index--;
8897 }
8898 return-1;
8899 },"java.util.List,java.util.List");
8900 c$.list=Clazz_defineMethod(c$,"list",
8901 function(enumeration){
8902 var list=new java.util.ArrayList();
8903 while(enumeration.hasMoreElements()){
8904 list.add(enumeration.nextElement());
8905 }
8906 return list;
8907 },"java.util.Enumeration");
8908 c$.synchronizedCollection=Clazz_defineMethod(c$,"synchronizedCollection",
8909 function(collection){
8910 if(collection==null){
8911 throw new NullPointerException();
8912 }return new java.util.Collections.SynchronizedCollection(collection);
8913 },"java.util.Collection");
8914 c$.synchronizedList=Clazz_defineMethod(c$,"synchronizedList",
8915 function(list){
8916 if(list==null){
8917 throw new NullPointerException();
8918 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8919 return new java.util.Collections.SynchronizedRandomAccessList(list);
8920 }return new java.util.Collections.SynchronizedList(list);
8921 },"java.util.List");
8922 c$.synchronizedMap=Clazz_defineMethod(c$,"synchronizedMap",
8923 function(map){
8924 if(map==null){
8925 throw new NullPointerException();
8926 }return new java.util.Collections.SynchronizedMap(map);
8927 },"java.util.Map");
8928 c$.synchronizedSet=Clazz_defineMethod(c$,"synchronizedSet",
8929 function(set){
8930 if(set==null){
8931 throw new NullPointerException();
8932 }return new java.util.Collections.SynchronizedSet(set);
8933 },"java.util.Set");
8934 c$.synchronizedSortedMap=Clazz_defineMethod(c$,"synchronizedSortedMap",
8935 function(map){
8936 if(map==null){
8937 throw new NullPointerException();
8938 }return new java.util.Collections.SynchronizedSortedMap(map);
8939 },"java.util.SortedMap");
8940 c$.synchronizedSortedSet=Clazz_defineMethod(c$,"synchronizedSortedSet",
8941 function(set){
8942 if(set==null){
8943 throw new NullPointerException();
8944 }return new java.util.Collections.SynchronizedSortedSet(set);
8945 },"java.util.SortedSet");
8946 c$.unmodifiableCollection=Clazz_defineMethod(c$,"unmodifiableCollection",
8947 function(collection){
8948 if(collection==null){
8949 throw new NullPointerException();
8950 }return new java.util.Collections.UnmodifiableCollection(collection);
8951 },"java.util.Collection");
8952 c$.unmodifiableList=Clazz_defineMethod(c$,"unmodifiableList",
8953 function(list){
8954 if(list==null){
8955 throw new NullPointerException();
8956 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8957 return new java.util.Collections.UnmodifiableRandomAccessList(list);
8958 }return new java.util.Collections.UnmodifiableList(list);
8959 },"java.util.List");
8960 c$.unmodifiableMap=Clazz_defineMethod(c$,"unmodifiableMap",
8961 function(map){
8962 if(map==null){
8963 throw new NullPointerException();
8964 }return new java.util.Collections.UnmodifiableMap(map);
8965 },"java.util.Map");
8966 c$.unmodifiableSet=Clazz_defineMethod(c$,"unmodifiableSet",
8967 function(set){
8968 if(set==null){
8969 throw new NullPointerException();
8970 }return new java.util.Collections.UnmodifiableSet(set);
8971 },"java.util.Set");
8972 c$.unmodifiableSortedMap=Clazz_defineMethod(c$,"unmodifiableSortedMap",
8973 function(map){
8974 if(map==null){
8975 throw new NullPointerException();
8976 }return new java.util.Collections.UnmodifiableSortedMap(map);
8977 },"java.util.SortedMap");
8978 c$.unmodifiableSortedSet=Clazz_defineMethod(c$,"unmodifiableSortedSet",
8979 function(set){
8980 if(set==null){
8981 throw new NullPointerException();
8982 }return new java.util.Collections.UnmodifiableSortedSet(set);
8983 },"java.util.SortedSet");
8984 c$.frequency=Clazz_defineMethod(c$,"frequency",
8985 function(c,o){
8986 if(c==null){
8987 throw new NullPointerException();
8988 }if(c.isEmpty()){
8989 return 0;
8990 }
8991 var result=0;
8992 var itr=c.iterator();
8993 while(itr.hasNext()){
8994 var e=itr.next();
8995 if(o==null?e==null:o.equals(e)){
8996 result++;
8997 }}
8998 return result;
8999 },"java.util.Collection,~O");
9000
9001 c$.emptyList=Clazz_defineMethod(c$,"emptyList",
9002 function(){
9003 return java.util.Collections.EMPTY_LIST;
9004 });
9005 c$.emptySet=Clazz_defineMethod(c$,"emptySet",
9006 function(){
9007 return java.util.Collections.EMPTY_SET;
9008 });
9009 c$.emptyMap=Clazz_defineMethod(c$,"emptyMap",
9010 function(){
9011 return java.util.Collections.EMPTY_MAP;
9012 });
9013 c$.checkedCollection=Clazz_defineMethod(c$,"checkedCollection",
9014 function(c,type){
9015 return new java.util.Collections.CheckedCollection(c,type);
9016 },"java.util.Collection,Class");
9017 c$.checkedMap=Clazz_defineMethod(c$,"checkedMap",
9018 function(m,keyType,valueType){
9019 return new java.util.Collections.CheckedMap(m,keyType,valueType);
9020 },"java.util.Map,Class,Class");
9021 c$.checkedList=Clazz_defineMethod(c$,"checkedList",
9022 function(list,type){
9023 if(Clazz_instanceOf(list,java.util.RandomAccess)){
9024 return new java.util.Collections.CheckedRandomAccessList(list,type);
9025 }return new java.util.Collections.CheckedList(list,type);
9026 },"java.util.List,Class");
9027 c$.checkedSet=Clazz_defineMethod(c$,"checkedSet",
9028 function(s,type){
9029 return new java.util.Collections.CheckedSet(s,type);
9030 },"java.util.Set,Class");
9031 c$.checkedSortedMap=Clazz_defineMethod(c$,"checkedSortedMap",
9032 function(m,keyType,valueType){
9033 return new java.util.Collections.CheckedSortedMap(m,keyType,valueType);
9034 },"java.util.SortedMap,Class,Class");
9035 c$.checkedSortedSet=Clazz_defineMethod(c$,"checkedSortedSet",
9036 function(s,type){
9037 return new java.util.Collections.CheckedSortedSet(s,type);
9038 },"java.util.SortedSet,Class");
9039 c$.addAll=Clazz_defineMethod(c$,"addAll",
9040 function(c,a){
9041 var modified=false;
9042 for(var i=0;i<a.length;i++){
9043 modified=new Boolean(modified|c.add(a[i])).valueOf();
9044 }
9045 return modified;
9046 },"java.util.Collection,~A");
9047 c$.disjoint=Clazz_defineMethod(c$,"disjoint",
9048 function(c1,c2){
9049 if((Clazz_instanceOf(c1,java.util.Set))&&!(Clazz_instanceOf(c2,java.util.Set))||(c2.size())>c1.size()){
9050 var tmp=c1;
9051 c1=c2;
9052 c2=tmp;
9053 }var it=c1.iterator();
9054 while(it.hasNext()){
9055 if(c2.contains(it.next())){
9056 return false;
9057 }}
9058 return true;
9059 },"java.util.Collection,java.util.Collection");
9060 c$.checkType=Clazz_defineMethod(c$,"checkType",
9061 function(obj,type){
9062 if(!type.isInstance(obj)){
9063 throw new ClassCastException("Attempt to insert "+obj.getClass()+" element into collection with element type "+type);
9064 }return obj;
9065 },"~O,Class");
9066
9067 c$.$Collections$1$=function(c){
9068 Clazz_pu$h(self.c$);
9069 c$=Clazz_decorateAsClass(function(){
9070 Clazz_prepareCallback(this,arguments);
9071 this.it=null;
9072 Clazz_instantialize(this,arguments);
9073 },java.util,"Collections$1",null,java.util.Enumeration);
9074
9075 Clazz_prepareFields(c$,function(){
9076 this.it=c.iterator();
9077 });
9078
9079 Clazz_defineMethod(c$,"hasMoreElements",
9080 function(){
9081 return this.it.hasNext();
9082 });
9083 Clazz_defineMethod(c$,"nextElement",
9084 function(){
9085 return this.it.next();
9086 });
9087 c$=Clazz_p0p();
9088 };
9089
9090 Clazz_pu$h(self.c$);
9091 c$=Clazz_decorateAsClass(function(){
9092 this.n=0;
9093 this.element=null;
9094 Clazz_instantialize(this,arguments);
9095 },java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);
9096 Clazz_makeConstructor(c$,
9097 function(a,b){
9098 Clazz_superConstructor(this,java.util.Collections.CopiesList,[]);
9099 if(a<0){
9100 throw new IllegalArgumentException();
9101 }this.n=a;
9102 this.element=b;
9103 },"~N,~O");
9104 Clazz_overrideMethod(c$,"contains",
9105 function(a){
9106 return this.element==null?a==null:this.element.equals(a);
9107 },"~O");
9108 Clazz_overrideMethod(c$,"size",
9109 function(){
9110 return this.n;
9111 });
9112 Clazz_overrideMethod(c$,"get",
9113 function(a){
9114 if(0<=a&&a<this.n){
9115 return this.element;
9116 }throw new IndexOutOfBoundsException();
9117 },"~N");
9118 c$=Clazz_p0p();
9119 Clazz_pu$h(self.c$);
9120 c$=Clazz_declareType(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);
9121 Clazz_overrideMethod(c$,"contains",
9122 function(a){
9123 return false;
9124 },"~O");
9125 Clazz_overrideMethod(c$,"size",
9126 function(){
9127 return 0;
9128 });
9129 Clazz_overrideMethod(c$,"get",
9130 function(a){
9131 throw new IndexOutOfBoundsException();
9132 },"~N");
9133 c$=Clazz_p0p();
9134 Clazz_pu$h(self.c$);
9135 c$=Clazz_declareType(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);
9136 Clazz_overrideMethod(c$,"contains",
9137 function(a){
9138 return false;
9139 },"~O");
9140 Clazz_overrideMethod(c$,"size",
9141 function(){
9142 return 0;
9143 });
9144 Clazz_overrideMethod(c$,"iterator",
9145 function(){
9146 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));
9147 });
9148 c$.$Collections$EmptySet$1$=function(){
9149 Clazz_pu$h(self.c$);
9150 c$=Clazz_declareAnonymous(java.util,"Collections$EmptySet$1",null,java.util.Iterator);
9151 Clazz_overrideMethod(c$,"hasNext",
9152 function(){
9153 return false;
9154 });
9155 Clazz_overrideMethod(c$,"next",
9156 function(){
9157 throw new java.util.NoSuchElementException();
9158 });
9159 Clazz_overrideMethod(c$,"remove",
9160 function(){
9161 throw new UnsupportedOperationException();
9162 });
9163 c$=Clazz_p0p();
9164 };
9165 c$=Clazz_p0p();
9166 Clazz_pu$h(self.c$);
9167 c$=Clazz_declareType(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);
9168 Clazz_overrideMethod(c$,"containsKey",
9169 function(a){
9170 return false;
9171 },"~O");
9172 Clazz_overrideMethod(c$,"containsValue",
9173 function(a){
9174 return false;
9175 },"~O");
9176 Clazz_overrideMethod(c$,"entrySet",
9177 function(){
9178 return java.util.Collections.EMPTY_SET;
9179 });
9180 Clazz_overrideMethod(c$,"get",
9181 function(a){
9182 return null;
9183 },"~O");
9184 Clazz_overrideMethod(c$,"keySet",
9185 function(){
9186 return java.util.Collections.EMPTY_SET;
9187 });
9188 Clazz_overrideMethod(c$,"values",
9189 function(){
9190 return java.util.Collections.EMPTY_LIST;
9191 });
9192 c$=Clazz_p0p();
9193 Clazz_pu$h(self.c$);
9194 c$=Clazz_declareType(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);
9195 Clazz_overrideMethod(c$,"compare",
9196 function(a,b){
9197 var c=b;
9198 return c.compareTo(a);
9199 },"~O,~O");
9200 c$=Clazz_p0p();
9201 Clazz_pu$h(self.c$);
9202 c$=Clazz_decorateAsClass(function(){
9203 this.comparator=null;
9204 Clazz_instantialize(this,arguments);
9205 },java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);
9206 Clazz_makeConstructor(c$,
9207 function(a){
9208 this.comparator=a;
9209 },"java.util.Comparator");
9210 Clazz_defineMethod(c$,"compare",
9211 function(a,b){
9212 return this.comparator.compare(b,a);
9213 },"~O,~O");
9214 c$=Clazz_p0p();
9215 Clazz_pu$h(self.c$);
9216 c$=Clazz_decorateAsClass(function(){
9217 this.element=null;
9218 Clazz_instantialize(this,arguments);
9219 },java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);
9220 Clazz_makeConstructor(c$,
9221 function(a){
9222 Clazz_superConstructor(this,java.util.Collections.SingletonSet,[]);
9223 this.element=a;
9224 },"~O");
9225 Clazz_overrideMethod(c$,"contains",
9226 function(a){
9227 return this.element==null?a==null:this.element.equals(a);
9228 },"~O");
9229 Clazz_overrideMethod(c$,"size",
9230 function(){
9231 return 1;
9232 });
9233 Clazz_overrideMethod(c$,"iterator",
9234 function(){
9235 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));
9236 });
9237 c$.$Collections$SingletonSet$1$=function(){
9238 Clazz_pu$h(self.c$);
9239 c$=Clazz_decorateAsClass(function(){
9240 Clazz_prepareCallback(this,arguments);
9241 this.$hasNext=true;
9242 Clazz_instantialize(this,arguments);
9243 },java.util,"Collections$SingletonSet$1",null,java.util.Iterator);
9244 Clazz_overrideMethod(c$,"hasNext",
9245 function(){
9246 return this.$hasNext;
9247 });
9248 Clazz_overrideMethod(c$,"next",
9249 function(){
9250 if(this.$hasNext){
9251 this.$hasNext=false;
9252 return this.b$["java.util.Collections.SingletonSet"].element;
9253 }throw new java.util.NoSuchElementException();
9254 });
9255 Clazz_overrideMethod(c$,"remove",
9256 function(){
9257 throw new UnsupportedOperationException();
9258 });
9259 c$=Clazz_p0p();
9260 };
9261 c$=Clazz_p0p();
9262 Clazz_pu$h(self.c$);
9263 c$=Clazz_decorateAsClass(function(){
9264 this.element=null;
9265 Clazz_instantialize(this,arguments);
9266 },java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);
9267 Clazz_makeConstructor(c$,
9268 function(a){
9269 Clazz_superConstructor(this,java.util.Collections.SingletonList,[]);
9270 this.element=a;
9271 },"~O");
9272 Clazz_overrideMethod(c$,"contains",
9273 function(a){
9274 return this.element==null?a==null:this.element.equals(a);
9275 },"~O");
9276 Clazz_overrideMethod(c$,"get",
9277 function(a){
9278 if(a==0){
9279 return this.element;
9280 }throw new IndexOutOfBoundsException();
9281 },"~N");
9282 Clazz_overrideMethod(c$,"size",
9283 function(){
9284 return 1;
9285 });
9286 c$=Clazz_p0p();
9287 Clazz_pu$h(self.c$);
9288 c$=Clazz_decorateAsClass(function(){
9289 this.k=null;
9290 this.v=null;
9291 Clazz_instantialize(this,arguments);
9292 },java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);
9293 Clazz_makeConstructor(c$,
9294 function(a,b){
9295 Clazz_superConstructor(this,java.util.Collections.SingletonMap,[]);
9296 this.k=a;
9297 this.v=b;
9298 },"~O,~O");
9299 Clazz_overrideMethod(c$,"containsKey",
9300 function(a){
9301 return this.k==null?a==null:this.k.equals(a);
9302 },"~O");
9303 Clazz_overrideMethod(c$,"containsValue",
9304 function(a){
9305 return this.v==null?a==null:this.v.equals(a);
9306 },"~O");
9307 Clazz_overrideMethod(c$,"get",
9308 function(a){
9309 if(this.containsKey(a)){
9310 return this.v;
9311 }return null;
9312 },"~O");
9313 Clazz_overrideMethod(c$,"size",
9314 function(){
9315 return 1;
9316 });
9317 Clazz_overrideMethod(c$,"entrySet",
9318 function(){
9319 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));
9320 });
9321 c$.$Collections$SingletonMap$1$=function(){
9322 Clazz_pu$h(self.c$);
9323 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);
9324 Clazz_overrideMethod(c$,"contains",
9325 function(a){
9326 if(Clazz_instanceOf(a,java.util.Map.Entry)){
9327 var b=a;
9328 return this.b$["java.util.Collections.SingletonMap"].containsKey(b.getKey())&&this.b$["java.util.Collections.SingletonMap"].containsValue(b.getValue());
9329 }return false;
9330 },"~O");
9331 Clazz_overrideMethod(c$,"size",
9332 function(){
9333 return 1;
9334 });
9335 Clazz_overrideMethod(c$,"iterator",
9336 function(){
9337 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));
9338 });
9339 c$=Clazz_p0p();
9340 };
9341 c$.$Collections$SingletonMap$1$1$=function(){
9342 Clazz_pu$h(self.c$);
9343 c$=Clazz_decorateAsClass(function(){
9344 Clazz_prepareCallback(this,arguments);
9345 this.$hasNext=true;
9346 Clazz_instantialize(this,arguments);
9347 },java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);
9348 Clazz_overrideMethod(c$,"hasNext",
9349 function(){
9350 return this.$hasNext;
9351 });
9352 Clazz_overrideMethod(c$,"next",
9353 function(){
9354 if(this.$hasNext){
9355 this.$hasNext=false;
9356 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));
9357 }throw new java.util.NoSuchElementException();
9358 });
9359 Clazz_overrideMethod(c$,"remove",
9360 function(){
9361 throw new UnsupportedOperationException();
9362 });
9363 c$=Clazz_p0p();
9364 };
9365 c$.$Collections$SingletonMap$1$1$1$=function(){
9366 Clazz_pu$h(self.c$);
9367 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);
9368 Clazz_overrideMethod(c$,"equals",
9369 function(a){
9370 return this.b$["java.util.Collections$SingletonMap$1"].contains(a);
9371 },"~O");
9372 Clazz_overrideMethod(c$,"getKey",
9373 function(){
9374 return this.b$["java.util.Collections.SingletonMap"].k;
9375 });
9376 Clazz_overrideMethod(c$,"getValue",
9377 function(){
9378 return this.b$["java.util.Collections.SingletonMap"].v;
9379 });
9380 Clazz_overrideMethod(c$,"hashCode",
9381 function(){
9382 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());
9383 });
9384 Clazz_overrideMethod(c$,"setValue",
9385 function(a){
9386 throw new UnsupportedOperationException();
9387 },"~O");
9388 c$=Clazz_p0p();
9389 };
9390 c$=Clazz_p0p();
9391 Clazz_pu$h(self.c$);
9392 c$=Clazz_decorateAsClass(function(){
9393 this.c=null;
9394 this.mutex=null;
9395 Clazz_instantialize(this,arguments);
9396 },java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);
9397 Clazz_makeConstructor(c$,
9398 function(a){
9399 this.c=a;
9400 this.mutex=this;
9401 },"java.util.Collection");
9402 Clazz_makeConstructor(c$,
9403 function(a,b){
9404 this.c=a;
9405 this.mutex=b;
9406 },"java.util.Collection,~O");
9407 Clazz_defineMethod(c$,"add",
9408 function(a){
9409 {
9410 return this.c.add(a);
9411 }},"~O");
9412 Clazz_defineMethod(c$,"addAll",
9413 function(a){
9414 {
9415 return this.c.addAll(a);
9416 }},"java.util.Collection");
9417 Clazz_defineMethod(c$,"clear",
9418 function(){
9419 {
9420 this.c.clear();
9421 }});
9422 Clazz_defineMethod(c$,"contains",
9423 function(a){
9424 {
9425 return this.c.contains(a);
9426 }},"~O");
9427 Clazz_defineMethod(c$,"containsAll",
9428 function(a){
9429 {
9430 return this.c.containsAll(a);
9431 }},"java.util.Collection");
9432 Clazz_defineMethod(c$,"isEmpty",
9433 function(){
9434 {
9435 return this.c.isEmpty();
9436 }});
9437 Clazz_defineMethod(c$,"iterator",
9438 function(){
9439 {
9440 return this.c.iterator();
9441 }});
9442 Clazz_defineMethod(c$,"remove",
9443 function(a){
9444 {
9445 return this.c.remove(a);
9446 }},"~O");
9447 Clazz_defineMethod(c$,"removeAll",
9448 function(a){
9449 {
9450 return this.c.removeAll(a);
9451 }},"java.util.Collection");
9452 Clazz_defineMethod(c$,"retainAll",
9453 function(a){
9454 {
9455 return this.c.retainAll(a);
9456 }},"java.util.Collection");
9457 Clazz_defineMethod(c$,"size",
9458 function(){
9459 {
9460 return this.c.size();
9461 }});
9462 Clazz_defineMethod(c$,"toArray",
9463 function(){
9464 {
9465 return this.c.toArray();
9466 }});
9467 Clazz_defineMethod(c$,"toString",
9468 function(){
9469 {
9470 return this.c.toString();
9471 }});
9472 Clazz_defineMethod(c$,"toArray",
9473 function(a){
9474 {
9475 return this.c.toArray(a);
9476 }},"~A");
9477 c$=Clazz_p0p();
9478
9479
9480 Clazz_pu$h(self.c$);
9481 c$=Clazz_decorateAsClass(function(){
9482 this.list=null;
9483 Clazz_instantialize(this,arguments);
9484 },java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);
9485 Clazz_makeConstructor(c$,
9486 function(a){
9487 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a]);
9488 this.list=a;
9489 },"java.util.List");
9490 Clazz_makeConstructor(c$,
9491 function(a,b){
9492 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a,b]);
9493 this.list=a;
9494 },"java.util.List,~O");
9495 Clazz_defineMethod(c$,"add",
9496 function(a,b){
9497 {
9498 this.list.add(a,b);
9499 }},"~N,~O");
9500 Clazz_defineMethod(c$,"addAll",
9501 function(a,b){
9502 {
9503 return this.list.addAll(a,b);
9504 }},"~N,java.util.Collection");
9505 Clazz_overrideMethod(c$,"equals",
9506 function(a){
9507 {
9508 return this.list.equals(a);
9509 }},"~O");
9510 Clazz_defineMethod(c$,"get",
9511 function(a){
9512 {
9513 return this.list.get(a);
9514 }},"~N");
9515 Clazz_overrideMethod(c$,"hashCode",
9516 function(){
9517 {
9518 return this.list.hashCode();
9519 }});
9520 Clazz_defineMethod(c$,"indexOf",
9521 function(a){
9522 {
9523 return this.list.indexOf(a);
9524 }},"~O");
9525 Clazz_defineMethod(c$,"lastIndexOf",
9526 function(a){
9527 {
9528 return this.list.lastIndexOf(a);
9529 }},"~O");
9530 //Clazz_defineMethod(c$,"listIterator",
9531 //function(){
9532 //{
9533 //return this.list.listIterator();
9534 //}});
9535 Clazz_defineMethod(c$,"listIterator",
9536 function(a){
9537 {
9538 a || (a = 0);
9539 return this.list.listIterator(a);
9540 }},"~N");
9541 Clazz_defineMethod(c$,"remove",
9542 function(a){
9543 {
9544 return this.list.remove(a);
9545 }},"~N");
9546 Clazz_defineMethod(c$,"set",
9547 function(a,b){
9548 {
9549 return this.list.set(a,b);
9550 }},"~N,~O");
9551 Clazz_defineMethod(c$,"subList",
9552 function(a,b){
9553 {
9554 return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex);
9555 }},"~N,~N");
9556 c$=Clazz_p0p();
9557
9558
9559
9560 Clazz_pu$h(self.c$);
9561 c$=Clazz_declareType(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);
9562 Clazz_overrideMethod(c$,"subList",
9563 function(a,b){
9564 {
9565 return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex);
9566 }},"~N,~N");
9567 c$=Clazz_p0p();
9568
9569
9570
9571
9572 Clazz_pu$h(self.c$);
9573 c$=Clazz_decorateAsClass(function(){
9574 this.m=null;
9575 this.mutex=null;
9576 Clazz_instantialize(this,arguments);
9577 },java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);
9578 Clazz_makeConstructor(c$,
9579 function(a){
9580 this.m=a;
9581 this.mutex=this;
9582 },"java.util.Map");
9583 Clazz_makeConstructor(c$,
9584 function(a,b){
9585 this.m=a;
9586 this.mutex=b;
9587 },"java.util.Map,~O");
9588 Clazz_defineMethod(c$,"clear",
9589 function(){
9590 {
9591 this.m.clear();
9592 }});
9593 Clazz_defineMethod(c$,"containsKey",
9594 function(a){
9595 {
9596 return this.m.containsKey(a);
9597 }},"~O");
9598 Clazz_defineMethod(c$,"containsValue",
9599 function(a){
9600 {
9601 return this.m.containsValue(a);
9602 }},"~O");
9603 Clazz_defineMethod(c$,"entrySet",
9604 function(){
9605 {
9606 return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex);
9607 }});
9608 Clazz_overrideMethod(c$,"equals",
9609 function(a){
9610 {
9611 return this.m.equals(a);
9612 }},"~O");
9613 Clazz_defineMethod(c$,"get",
9614 function(a){
9615 {
9616 return this.m.get(a);
9617 }},"~O");
9618 Clazz_overrideMethod(c$,"hashCode",
9619 function(){
9620 {
9621 return this.m.hashCode();
9622 }});
9623 Clazz_defineMethod(c$,"isEmpty",
9624 function(){
9625 {
9626 return this.m.isEmpty();
9627 }});
9628 Clazz_defineMethod(c$,"keySet",
9629 function(){
9630 {
9631 return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex);
9632 }});
9633 Clazz_defineMethod(c$,"put",
9634 function(a,b){
9635 {
9636 return this.m.put(a,b);
9637 }},"~O,~O");
9638 Clazz_defineMethod(c$,"putAll",
9639 function(a){
9640 {
9641 this.m.putAll(a);
9642 }},"java.util.Map");
9643 Clazz_defineMethod(c$,"remove",
9644 function(a){
9645 {
9646 return this.m.remove(a);
9647 }},"~O");
9648 Clazz_defineMethod(c$,"size",
9649 function(){
9650 {
9651 return this.m.size();
9652 }});
9653 Clazz_defineMethod(c$,"values",
9654 function(){
9655 {
9656 return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex);
9657 }});
9658 Clazz_defineMethod(c$,"toString",
9659 function(){
9660 {
9661 return this.m.toString();
9662 }});
9663 c$=Clazz_p0p();
9664 Clazz_pu$h(self.c$);
9665 c$=Clazz_declareType(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);
9666 Clazz_overrideMethod(c$,"equals",
9667 function(a){
9668 {
9669 return this.c.equals(a);
9670 }},"~O");
9671 Clazz_overrideMethod(c$,"hashCode",
9672 function(){
9673 {
9674 return this.c.hashCode();
9675 }});
9676 c$=Clazz_p0p();
9677 Clazz_pu$h(self.c$);
9678 c$=Clazz_decorateAsClass(function(){
9679 this.sm=null;
9680 Clazz_instantialize(this,arguments);
9681 },java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);
9682 Clazz_makeConstructor(c$,
9683 function(a){
9684 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a]);
9685 this.sm=a;
9686 },"java.util.SortedMap");
9687 Clazz_makeConstructor(c$,
9688 function(a,b){
9689 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a,b]);
9690 this.sm=a;
9691 },"java.util.SortedMap,~O");
9692 Clazz_defineMethod(c$,"comparator",
9693 function(){
9694 {
9695 return this.sm.comparator();
9696 }});
9697 Clazz_defineMethod(c$,"firstKey",
9698 function(){
9699 {
9700 return this.sm.firstKey();
9701 }});
9702 Clazz_defineMethod(c$,"headMap",
9703 function(a){
9704 {
9705 return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex);
9706 }},"~O");
9707 Clazz_defineMethod(c$,"lastKey",
9708 function(){
9709 {
9710 return this.sm.lastKey();
9711 }});
9712 Clazz_defineMethod(c$,"subMap",
9713 function(a,b){
9714 {
9715 return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,b),this.mutex);
9716 }},"~O,~O");
9717 Clazz_defineMethod(c$,"tailMap",
9718 function(a){
9719 {
9720 return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex);
9721 }},"~O");
9722 c$=Clazz_p0p();
9723 Clazz_pu$h(self.c$);
9724 c$=Clazz_decorateAsClass(function(){
9725 this.ss=null;
9726 Clazz_instantialize(this,arguments);
9727 },java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);
9728 Clazz_makeConstructor(c$,
9729 function(a){
9730 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a]);
9731 this.ss=a;
9732 },"java.util.SortedSet");
9733 Clazz_makeConstructor(c$,
9734 function(a,b){
9735 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a,b]);
9736 this.ss=a;
9737 },"java.util.SortedSet,~O");
9738 Clazz_defineMethod(c$,"comparator",
9739 function(){
9740 {
9741 return this.ss.comparator();
9742 }});
9743 Clazz_defineMethod(c$,"first",
9744 function(){
9745 {
9746 return this.ss.first();
9747 }});
9748 Clazz_defineMethod(c$,"headSet",
9749 function(a){
9750 {
9751 return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex);
9752 }},"~O");
9753 Clazz_defineMethod(c$,"last",
9754 function(){
9755 {
9756 return this.ss.last();
9757 }});
9758 Clazz_defineMethod(c$,"subSet",
9759 function(a,b){
9760 {
9761 return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex);
9762 }},"~O,~O");
9763 Clazz_defineMethod(c$,"tailSet",
9764 function(a){
9765 {
9766 return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex);
9767 }},"~O");
9768 c$=Clazz_p0p();
9769 Clazz_pu$h(self.c$);
9770 c$=Clazz_decorateAsClass(function(){
9771 this.c=null;
9772 Clazz_instantialize(this,arguments);
9773 },java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);
9774 Clazz_makeConstructor(c$,
9775 function(a){
9776 this.c=a;
9777 },"java.util.Collection");
9778 Clazz_overrideMethod(c$,"add",
9779 function(a){
9780 throw new UnsupportedOperationException();
9781 },"~O");
9782 Clazz_overrideMethod(c$,"addAll",
9783 function(a){
9784 throw new UnsupportedOperationException();
9785 },"java.util.Collection");
9786 Clazz_overrideMethod(c$,"clear",
9787 function(){
9788 throw new UnsupportedOperationException();
9789 });
9790 Clazz_defineMethod(c$,"contains",
9791 function(a){
9792 return this.c.contains(a);
9793 },"~O");
9794 Clazz_defineMethod(c$,"containsAll",
9795 function(a){
9796 return this.c.containsAll(a);
9797 },"java.util.Collection");
9798 Clazz_defineMethod(c$,"isEmpty",
9799 function(){
9800 return this.c.isEmpty();
9801 });
9802 Clazz_defineMethod(c$,"iterator",
9803 function(){
9804 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));
9805 });
9806 Clazz_overrideMethod(c$,"remove",
9807 function(a){
9808 throw new UnsupportedOperationException();
9809 },"~O");
9810 Clazz_overrideMethod(c$,"removeAll",
9811 function(a){
9812 throw new UnsupportedOperationException();
9813 },"java.util.Collection");
9814 Clazz_overrideMethod(c$,"retainAll",
9815 function(a){
9816 throw new UnsupportedOperationException();
9817 },"java.util.Collection");
9818 Clazz_defineMethod(c$,"size",
9819 function(){
9820 return this.c.size();
9821 });
9822 Clazz_defineMethod(c$,"toArray",
9823 function(){
9824 return this.c.toArray();
9825 });
9826 Clazz_defineMethod(c$,"toArray",
9827 function(a){
9828 return this.c.toArray(a);
9829 },"~A");
9830 Clazz_defineMethod(c$,"toString",
9831 function(){
9832 return this.c.toString();
9833 });
9834 c$.$Collections$UnmodifiableCollection$1$=function(){
9835 Clazz_pu$h(self.c$);
9836 c$=Clazz_decorateAsClass(function(){
9837 Clazz_prepareCallback(this,arguments);
9838 this.iterator=null;
9839 Clazz_instantialize(this,arguments);
9840 },java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);
9841 Clazz_prepareFields(c$,function(){
9842 this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator();
9843 });
9844 Clazz_defineMethod(c$,"hasNext",
9845 function(){
9846 return this.iterator.hasNext();
9847 });
9848 Clazz_defineMethod(c$,"next",
9849 function(){
9850 return this.iterator.next();
9851 });
9852 Clazz_overrideMethod(c$,"remove",
9853 function(){
9854 throw new UnsupportedOperationException();
9855 });
9856 c$=Clazz_p0p();
9857 };
9858 c$=Clazz_p0p();
9859
9860 //BH note: a declared static superclass must come before a static class referencing it
9861
9862 Clazz_pu$h(self.c$);
9863 c$=Clazz_decorateAsClass(function(){
9864 this.list=null;
9865 Clazz_instantialize(this,arguments);
9866 },java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);
9867 Clazz_makeConstructor(c$,
9868 function(a){
9869 Clazz_superConstructor(this,java.util.Collections.UnmodifiableList,[a]);
9870 this.list=a;
9871 },"java.util.List");
9872 Clazz_defineMethod(c$,"add",
9873 function(a,b){
9874 throw new UnsupportedOperationException();
9875 },"~N,~O");
9876 Clazz_defineMethod(c$,"addAll",
9877 function(a,b){
9878 throw new UnsupportedOperationException();
9879 },"~N,java.util.Collection");
9880 Clazz_overrideMethod(c$,"equals",
9881 function(a){
9882 return this.list.equals(a);
9883 },"~O");
9884 Clazz_defineMethod(c$,"get",
9885 function(a){
9886 return this.list.get(a);
9887 },"~N");
9888 Clazz_overrideMethod(c$,"hashcode",
9889 function(){
9890 return this.list.hashCode();
9891 });
9892 Clazz_defineMethod(c$,"indexOf",
9893 function(a){
9894 return this.list.indexOf(a);
9895 },"~O");
9896 Clazz_defineMethod(c$,"lastIndexOf",
9897 function(a){
9898 return this.list.lastIndexOf(a);
9899 },"~O");
9900 //Clazz_defineMethod(c$,"listIterator",
9901 //function(){
9902 //return this.listIterator(0);
9903 //});
9904 Clazz_defineMethod(c$,"listIterator",
9905 function(a){
9906 a || (a = 0);
9907 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));
9908 },"~N");
9909 Clazz_defineMethod(c$,"remove",
9910 function(a){
9911 throw new UnsupportedOperationException();
9912 },"~N");
9913 Clazz_overrideMethod(c$,"set",
9914 function(a,b){
9915 throw new UnsupportedOperationException();
9916 },"~N,~O");
9917 Clazz_defineMethod(c$,"subList",
9918 function(a,b){
9919 return new java.util.Collections.UnmodifiableList(this.list.subList(a,b));
9920 },"~N,~N");
9921 c$.$Collections$UnmodifiableList$1$=function(){
9922 Clazz_pu$h(self.c$);
9923 c$=Clazz_decorateAsClass(function(){
9924 Clazz_prepareCallback(this,arguments);
9925 this.iterator=null;
9926 Clazz_instantialize(this,arguments);
9927 },java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);
9928 Clazz_prepareFields(c$,function(){
9929 this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location);
9930 });
9931 Clazz_overrideMethod(c$,"add",
9932 function(b){
9933 throw new UnsupportedOperationException();
9934 },"~O");
9935 Clazz_defineMethod(c$,"hasNext",
9936 function(){
9937 return this.iterator.hasNext();
9938 });
9939 Clazz_defineMethod(c$,"hasPrevious",
9940 function(){
9941 return this.iterator.hasPrevious();
9942 });
9943 Clazz_defineMethod(c$,"next",
9944 function(){
9945 return this.iterator.next();
9946 });
9947 Clazz_defineMethod(c$,"nextIndex",
9948 function(){
9949 return this.iterator.nextIndex();
9950 });
9951 Clazz_defineMethod(c$,"previous",
9952 function(){
9953 return this.iterator.previous();
9954 });
9955 Clazz_defineMethod(c$,"previousIndex",
9956 function(){
9957 return this.iterator.previousIndex();
9958 });
9959 Clazz_overrideMethod(c$,"remove",
9960 function(){
9961 throw new UnsupportedOperationException();
9962 });
9963 Clazz_overrideMethod(c$,"set",
9964 function(b){
9965 throw new UnsupportedOperationException();
9966 },"~O");
9967 c$=Clazz_p0p();
9968 };
9969 c$=Clazz_p0p();
9970
9971
9972
9973
9974 Clazz_pu$h(self.c$);
9975 c$=Clazz_declareType(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);
9976 Clazz_overrideMethod(c$,"subList",
9977 function(a,b){
9978 return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,b));
9979 },"~N,~N");
9980 c$=Clazz_p0p();
9981
9982
9983 Clazz_pu$h(self.c$);
9984 c$=Clazz_declareType(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);
9985 Clazz_overrideMethod(c$,"equals",
9986 function(a){
9987 return this.c.equals(a);
9988 },"~O");
9989 Clazz_overrideMethod(c$,"hashCode",
9990 function(){
9991 return this.c.hashCode();
9992 });
9993 c$=Clazz_p0p();
9994
9995
9996 Clazz_pu$h(self.c$);
9997 c$=Clazz_decorateAsClass(function(){
9998 this.m=null;
9999 Clazz_instantialize(this,arguments);
10000 },java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);
10001 Clazz_makeConstructor(c$,
10002 function(a){
10003 this.m=a;
10004 },"java.util.Map");
10005 Clazz_overrideMethod(c$,"clear",
10006 function(){
10007 throw new UnsupportedOperationException();
10008 });
10009 Clazz_defineMethod(c$,"containsKey",
10010 function(a){
10011 return this.m.containsKey(a);
10012 },"~O");
10013 Clazz_defineMethod(c$,"containsValue",
10014 function(a){
10015 return this.m.containsValue(a);
10016 },"~O");
10017 Clazz_defineMethod(c$,"entrySet",
10018 function(){
10019 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet());
10020 });
10021 Clazz_overrideMethod(c$,"equals",
10022 function(a){
10023 return this.m.equals(a);
10024 },"~O");
10025 Clazz_defineMethod(c$,"get",
10026 function(a){
10027 return this.m.get(a);
10028 },"~O");
10029 Clazz_overrideMethod(c$,"hashcode",
10030 function(){
10031 return this.m.hashCode();
10032 });
10033 Clazz_defineMethod(c$,"isEmpty",
10034 function(){
10035 return this.m.isEmpty();
10036 });
10037 Clazz_defineMethod(c$,"keySet",
10038 function(){
10039 return new java.util.Collections.UnmodifiableSet(this.m.keySet());
10040 });
10041 Clazz_overrideMethod(c$,"put",
10042 function(a,b){
10043 throw new UnsupportedOperationException();
10044 },"~O,~O");
10045 Clazz_overrideMethod(c$,"putAll",
10046 function(a){
10047 throw new UnsupportedOperationException();
10048 },"java.util.Map");
10049 Clazz_overrideMethod(c$,"remove",
10050 function(a){
10051 throw new UnsupportedOperationException();
10052 },"~O");
10053 Clazz_defineMethod(c$,"size",
10054 function(){
10055 return this.m.size();
10056 });
10057 Clazz_defineMethod(c$,"values",
10058 function(){
10059 return new java.util.Collections.UnmodifiableCollection(this.m.values());
10060 });
10061 Clazz_defineMethod(c$,"toString",
10062 function(){
10063 return this.m.toString();
10064 });
10065
10066
10067
10068
10069
10070
10071
10072 Clazz_pu$h(self.c$);
10073 c$=Clazz_declareType(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);
10074 Clazz_overrideMethod(c$,"iterator",
10075 function(){
10076 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));
10077 });
10078 Clazz_defineMethod(c$,"toArray",
10079 function(){
10080 var a=this.c.size();
10081 var b=new Array(a);
10082 var c=this.iterator();
10083 for(var d=a;--d>=0;){
10084 b[d]=c.next();
10085 }
10086 return b;
10087 });
10088 Clazz_defineMethod(c$,"toArray",
10089 function(a){
10090 var b=this.c.size();
10091 var c=0;
10092 var d=this.iterator();
10093 if(b>a.length){
10094 var e=a.getClass().getComponentType();
10095 a=java.lang.reflect.Array.newInstance(e,b);
10096 }while(c<b){
10097 a[c++]=d.next();
10098 }
10099 if(c<a.length){
10100 a[c]=null;
10101 }return a;
10102 },"~A");
10103 c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){
10104 Clazz_pu$h(self.c$);
10105 c$=Clazz_decorateAsClass(function(){
10106 Clazz_prepareCallback(this,arguments);
10107 this.iterator=null;
10108 Clazz_instantialize(this,arguments);
10109 },java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);
10110 Clazz_prepareFields(c$,function(){
10111 this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator();
10112 });
10113 Clazz_defineMethod(c$,"hasNext",
10114 function(){
10115 return this.iterator.hasNext();
10116 });
10117 Clazz_defineMethod(c$,"next",
10118 function(){
10119 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next());
10120 });
10121 Clazz_overrideMethod(c$,"remove",
10122 function(){
10123 throw new UnsupportedOperationException();
10124 });
10125 c$=Clazz_p0p();
10126 };
10127 Clazz_pu$h(self.c$);
10128 c$=Clazz_decorateAsClass(function(){
10129 this.mapEntry=null;
10130 Clazz_instantialize(this,arguments);
10131 },java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);
10132 Clazz_makeConstructor(c$,
10133 function(a){
10134 this.mapEntry=a;
10135 },"java.util.Map.Entry");
10136 Clazz_overrideMethod(c$,"equals",
10137 function(a){
10138 return this.mapEntry.equals(a);
10139 },"~O");
10140 Clazz_defineMethod(c$,"getKey",
10141 function(){
10142 return this.mapEntry.getKey();
10143 });
10144 Clazz_defineMethod(c$,"getValue",
10145 function(){
10146 return this.mapEntry.getValue();
10147 });
10148 Clazz_overrideMethod(c$,"hashcode",
10149 function(){
10150 return this.mapEntry.hashCode();
10151 });
10152 Clazz_overrideMethod(c$,"setValue",
10153 function(a){
10154 throw new UnsupportedOperationException();
10155 },"~O");
10156 Clazz_defineMethod(c$,"toString",
10157 function(){
10158 return this.mapEntry.toString();
10159 });
10160 c$=Clazz_p0p();
10161 c$=Clazz_p0p();
10162 c$=Clazz_p0p();
10163
10164
10165
10166 Clazz_pu$h(self.c$);
10167 c$=Clazz_decorateAsClass(function(){
10168 this.sm=null;
10169 Clazz_instantialize(this,arguments);
10170 },java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);
10171 Clazz_makeConstructor(c$,
10172 function(a){
10173 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedMap,[a]);
10174 this.sm=a;
10175 },"java.util.SortedMap");
10176 Clazz_defineMethod(c$,"comparator",
10177 function(){
10178 return this.sm.comparator();
10179 });
10180 Clazz_defineMethod(c$,"firstKey",
10181 function(){
10182 return this.sm.firstKey();
10183 });
10184 Clazz_defineMethod(c$,"headMap",
10185 function(a){
10186 return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a));
10187 },"~O");
10188 Clazz_defineMethod(c$,"lastKey",
10189 function(){
10190 return this.sm.lastKey();
10191 });
10192 Clazz_defineMethod(c$,"subMap",
10193 function(a,b){
10194 return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b));
10195 },"~O,~O");
10196 Clazz_defineMethod(c$,"tailMap",
10197 function(a){
10198 return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a));
10199 },"~O");
10200 c$=Clazz_p0p();
10201 Clazz_pu$h(self.c$);
10202 c$=Clazz_decorateAsClass(function(){
10203 this.ss=null;
10204 Clazz_instantialize(this,arguments);
10205 },java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);
10206 Clazz_makeConstructor(c$,
10207 function(a){
10208 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedSet,[a]);
10209 this.ss=a;
10210 },"java.util.SortedSet");
10211 Clazz_defineMethod(c$,"comparator",
10212 function(){
10213 return this.ss.comparator();
10214 });
10215 Clazz_defineMethod(c$,"first",
10216 function(){
10217 return this.ss.first();
10218 });
10219 Clazz_defineMethod(c$,"headSet",
10220 function(a){
10221 return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a));
10222 },"~O");
10223 Clazz_defineMethod(c$,"last",
10224 function(){
10225 return this.ss.last();
10226 });
10227 Clazz_defineMethod(c$,"subSet",
10228 function(a,b){
10229 return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b));
10230 },"~O,~O");
10231 Clazz_defineMethod(c$,"tailSet",
10232 function(a){
10233 return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a));
10234 },"~O");
10235 c$=Clazz_p0p();
10236 Clazz_pu$h(self.c$);
10237 c$=Clazz_decorateAsClass(function(){
10238 this.c=null;
10239 this.type=null;
10240 Clazz_instantialize(this,arguments);
10241 },java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);
10242 Clazz_makeConstructor(c$,
10243 function(a,b){
10244 if(a==null||b==null){
10245 throw new NullPointerException();
10246 }this.c=a;
10247 this.type=b;
10248 },"java.util.Collection,Class");
10249 Clazz_defineMethod(c$,"size",
10250 function(){
10251 return this.c.size();
10252 });
10253 Clazz_defineMethod(c$,"isEmpty",
10254 function(){
10255 return this.c.isEmpty();
10256 });
10257 Clazz_defineMethod(c$,"contains",
10258 function(a){
10259 return this.c.contains(a);
10260 },"~O");
10261 Clazz_defineMethod(c$,"iterator",
10262 function(){
10263 var a=this.c.iterator();
10264 if(Clazz_instanceOf(a,java.util.ListIterator)){
10265 a=new java.util.Collections.CheckedListIterator(a,this.type);
10266 }return a;
10267 });
10268 Clazz_defineMethod(c$,"toArray",
10269 function(){
10270 return this.c.toArray();
10271 });
10272 Clazz_defineMethod(c$,"toArray",
10273 function(a){
10274 return this.c.toArray(a);
10275 },"~A");
10276 Clazz_defineMethod(c$,"add",
10277 function(a){
10278 return this.c.add(java.util.Collections.checkType(a,this.type));
10279 },"~O");
10280 Clazz_defineMethod(c$,"remove",
10281 function(a){
10282 return this.c.remove(a);
10283 },"~O");
10284 Clazz_defineMethod(c$,"containsAll",
10285 function(a){
10286 return this.c.containsAll(a);
10287 },"java.util.Collection");
10288 Clazz_overrideMethod(c$,"addAll",
10289 function(a){
10290 var b=a.size();
10291 if(b==0){
10292 return false;
10293 }var c=new Array(b);
10294 var d=a.iterator();
10295 for(var e=0;e<b;e++){
10296 c[e]=java.util.Collections.checkType(d.next(),this.type);
10297 }
10298 var f=false;
10299 for(var g=0;g<b;g++){
10300 f=new Boolean(f|this.c.add(c[g])).valueOf();
10301 }
10302 return f;
10303 },"java.util.Collection");
10304 Clazz_defineMethod(c$,"removeAll",
10305 function(a){
10306 return this.c.removeAll(a);
10307 },"java.util.Collection");
10308 Clazz_defineMethod(c$,"retainAll",
10309 function(a){
10310 return this.c.retainAll(a);
10311 },"java.util.Collection");
10312 Clazz_defineMethod(c$,"clear",
10313 function(){
10314 this.c.clear();
10315 });
10316 Clazz_defineMethod(c$,"toString",
10317 function(){
10318 return this.c.toString();
10319 });
10320 c$=Clazz_p0p();
10321 Clazz_pu$h(self.c$);
10322 c$=Clazz_decorateAsClass(function(){
10323 this.i=null;
10324 this.type=null;
10325 Clazz_instantialize(this,arguments);
10326 },java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);
10327 Clazz_makeConstructor(c$,
10328 function(a,b){
10329 this.i=a;
10330 this.type=b;
10331 },"java.util.ListIterator,Class");
10332 Clazz_defineMethod(c$,"hasNext",
10333 function(){
10334 return this.i.hasNext();
10335 });
10336 Clazz_defineMethod(c$,"next",
10337 function(){
10338 return this.i.next();
10339 });
10340 Clazz_defineMethod(c$,"remove",
10341 function(){
10342 this.i.remove();
10343 });
10344 Clazz_defineMethod(c$,"hasPrevious",
10345 function(){
10346 return this.i.hasPrevious();
10347 });
10348 Clazz_defineMethod(c$,"previous",
10349 function(){
10350 return this.i.previous();
10351 });
10352 Clazz_defineMethod(c$,"nextIndex",
10353 function(){
10354 return this.i.nextIndex();
10355 });
10356 Clazz_defineMethod(c$,"previousIndex",
10357 function(){
10358 return this.i.previousIndex();
10359 });
10360 Clazz_defineMethod(c$,"set",
10361 function(a){
10362 this.i.set(java.util.Collections.checkType(a,this.type));
10363 },"~O");
10364 Clazz_defineMethod(c$,"add",
10365 function(a){
10366 this.i.add(java.util.Collections.checkType(a,this.type));
10367 },"~O");
10368 c$=Clazz_p0p();
10369 Clazz_pu$h(self.c$);
10370 c$=Clazz_decorateAsClass(function(){
10371 this.l=null;
10372 Clazz_instantialize(this,arguments);
10373 },java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);
10374 Clazz_makeConstructor(c$,
10375 function(a,b){
10376 Clazz_superConstructor(this,java.util.Collections.CheckedList,[a,b]);
10377 this.l=a;
10378 },"java.util.List,Class");
10379 Clazz_defineMethod(c$,"addAll",
10380 function(a,b){
10381 var c=b.size();
10382 if(c==0){
10383 return false;
10384 }var d=new Array(c);
10385 var e=b.iterator();
10386 for(var f=0;f<c;f++){
10387 d[f]=java.util.Collections.checkType(e.next(),this.type);
10388 }
10389 return this.l.addAll(a,java.util.Arrays.asList(d));
10390 },"~N,java.util.Collection");
10391 Clazz_defineMethod(c$,"get",
10392 function(a){
10393 return this.l.get(a);
10394 },"~N");
10395 Clazz_defineMethod(c$,"set",
10396 function(a,b){
10397 return this.l.set(a,java.util.Collections.checkType(b,this.type));
10398 },"~N,~O");
10399 Clazz_defineMethod(c$,"add",
10400 function(a,b){
10401 this.l.add(a,java.util.Collections.checkType(b,this.type));
10402 },"~N,~O");
10403 Clazz_defineMethod(c$,"remove",
10404 function(a){
10405 return this.l.remove(a);
10406 },"~N");
10407 Clazz_defineMethod(c$,"indexOf",
10408 function(a){
10409 return this.l.indexOf(a);
10410 },"~O");
10411 Clazz_defineMethod(c$,"lastIndexOf",
10412 function(a){
10413 return this.l.lastIndexOf(a);
10414 },"~O");
10415 //Clazz_defineMethod(c$,"listIterator",
10416 //function(){
10417 //return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type);
10418 //});
10419 Clazz_defineMethod(c$,"listIterator",
10420 function(a){
10421 a || (a = 0);
10422 return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type);
10423 },"~N");
10424 Clazz_defineMethod(c$,"subList",
10425 function(a,b){
10426 return java.util.Collections.checkedList(this.l.subList(a,b),this.type);
10427 },"~N,~N");
10428 Clazz_overrideMethod(c$,"equals",
10429 function(a){
10430 return this.l.equals(a);
10431 },"~O");
10432 Clazz_overrideMethod(c$,"hashcode",
10433 function(){
10434 return this.l.hashCode();
10435 });
10436 c$=Clazz_p0p();
10437 Clazz_pu$h(self.c$);
10438 c$=Clazz_declareType(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);
10439 c$=Clazz_p0p();
10440 Clazz_pu$h(self.c$);
10441 c$=Clazz_declareType(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);
10442 Clazz_overrideMethod(c$,"equals",
10443 function(a){
10444 return this.c.equals(a);
10445 },"~O");
10446 Clazz_overrideMethod(c$,"hashCode",
10447 function(){
10448 return this.c.hashCode();
10449 });
10450 c$=Clazz_p0p();
10451 Clazz_pu$h(self.c$);
10452 c$=Clazz_decorateAsClass(function(){
10453 this.m=null;
10454 this.keyType=null;
10455 this.valueType=null;
10456 Clazz_instantialize(this,arguments);
10457 },java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);
10458 Clazz_makeConstructor(c$,
10459 ($fz=function(a,b,c){
10460 if(a==null||b==null||c==null){
10461 throw new NullPointerException();
10462 }this.m=a;
10463 this.keyType=b;
10464 this.valueType=c;
10465 },$fz.isPrivate=true,$fz),"java.util.Map,Class,Class");
10466 Clazz_defineMethod(c$,"size",
10467 function(){
10468 return this.m.size();
10469 });
10470 Clazz_defineMethod(c$,"isEmpty",
10471 function(){
10472 return this.m.isEmpty();
10473 });
10474 Clazz_defineMethod(c$,"containsKey",
10475 function(a){
10476 return this.m.containsKey(a);
10477 },"~O");
10478 Clazz_defineMethod(c$,"containsValue",
10479 function(a){
10480 return this.m.containsValue(a);
10481 },"~O");
10482 Clazz_defineMethod(c$,"get",
10483 function(a){
10484 return this.m.get(a);
10485 },"~O");
10486 Clazz_defineMethod(c$,"put",
10487 function(a,b){
10488 return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,this.valueType));
10489 },"~O,~O");
10490 Clazz_defineMethod(c$,"remove",
10491 function(a){
10492 return this.m.remove(a);
10493 },"~O");
10494 Clazz_overrideMethod(c$,"putAll",
10495 function(a){
10496 var b=a.size();
10497 if(b==0){
10498 return;
10499 }var c=new Array(b);
10500 var d=a.entrySet().iterator();
10501 for(var e=0;e<b;e++){
10502 var f=d.next();
10503 java.util.Collections.checkType(f.getKey(),this.keyType);
10504 java.util.Collections.checkType(f.getValue(),this.valueType);
10505 c[e]=f;
10506 }
10507 for(var f=0;f<b;f++){
10508 this.m.put(c[f].getKey(),c[f].getValue());
10509 }
10510 },"java.util.Map");
10511 Clazz_defineMethod(c$,"clear",
10512 function(){
10513 this.m.clear();
10514 });
10515 Clazz_defineMethod(c$,"keySet",
10516 function(){
10517 return this.m.keySet();
10518 });
10519 Clazz_defineMethod(c$,"values",
10520 function(){
10521 return this.m.values();
10522 });
10523 Clazz_defineMethod(c$,"entrySet",
10524 function(){
10525 return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType);
10526 });
10527 Clazz_overrideMethod(c$,"equals",
10528 function(a){
10529 return this.m.equals(a);
10530 },"~O");
10531 Clazz_overrideMethod(c$,"hashcode",
10532 function(){
10533 return this.m.hashCode();
10534 });
10535 Clazz_defineMethod(c$,"toString",
10536 function(){
10537 return this.m.toString();
10538 });
10539 Clazz_pu$h(self.c$);
10540 c$=Clazz_decorateAsClass(function(){
10541 this.e=null;
10542 this.valueType=null;
10543 Clazz_instantialize(this,arguments);
10544 },java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);
10545 Clazz_makeConstructor(c$,
10546 function(a,b){
10547 if(a==null){
10548 throw new NullPointerException();
10549 }this.e=a;
10550 this.valueType=b;
10551 },"java.util.Map.Entry,Class");
10552 Clazz_defineMethod(c$,"getKey",
10553 function(){
10554 return this.e.getKey();
10555 });
10556 Clazz_defineMethod(c$,"getValue",
10557 function(){
10558 return this.e.getValue();
10559 });
10560 Clazz_defineMethod(c$,"setValue",
10561 function(a){
10562 return this.e.setValue(java.util.Collections.checkType(a,this.valueType));
10563 },"~O");
10564 Clazz_overrideMethod(c$,"equals",
10565 function(a){
10566 return this.e.equals(a);
10567 },"~O");
10568 Clazz_overrideMethod(c$,"hashcode",
10569 function(){
10570 return this.e.hashCode();
10571 });
10572 c$=Clazz_p0p();
10573 Clazz_pu$h(self.c$);
10574 c$=Clazz_decorateAsClass(function(){
10575 this.s=null;
10576 this.valueType=null;
10577 Clazz_instantialize(this,arguments);
10578 },java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);
10579 Clazz_makeConstructor(c$,
10580 function(a,b){
10581 this.s=a;
10582 this.valueType=b;
10583 },"java.util.Set,Class");
10584 Clazz_defineMethod(c$,"iterator",
10585 function(){
10586 return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType);
10587 });
10588 Clazz_defineMethod(c$,"toArray",
10589 function(){
10590 var a=this.size();
10591 var b=new Array(a);
10592 var c=this.iterator();
10593 for(var d=0;d<a;d++){
10594 b[d]=c.next();
10595 }
10596 return b;
10597 });
10598 Clazz_defineMethod(c$,"toArray",
10599 function(a){
10600 var b=this.size();
10601 if(a.length<b){
10602 var c=a.getClass().getComponentType();
10603 a=java.lang.reflect.Array.newInstance(c,b);
10604 }var c=this.iterator();
10605 for(var d=0;d<b;d++){
10606 a[d]=c.next();
10607 }
10608 if(b<a.length){
10609 a[b]=null;
10610 }return a;
10611 },"~A");
10612 Clazz_defineMethod(c$,"retainAll",
10613 function(a){
10614 return this.s.retainAll(a);
10615 },"java.util.Collection");
10616 Clazz_defineMethod(c$,"removeAll",
10617 function(a){
10618 return this.s.removeAll(a);
10619 },"java.util.Collection");
10620 Clazz_defineMethod(c$,"containsAll",
10621 function(a){
10622 return this.s.containsAll(a);
10623 },"java.util.Collection");
10624 Clazz_overrideMethod(c$,"addAll",
10625 function(a){
10626 throw new UnsupportedOperationException();
10627 },"java.util.Collection");
10628 Clazz_defineMethod(c$,"remove",
10629 function(a){
10630 return this.s.remove(a);
10631 },"~O");
10632 Clazz_defineMethod(c$,"contains",
10633 function(a){
10634 return this.s.contains(a);
10635 },"~O");
10636 Clazz_overrideMethod(c$,"add",
10637 function(a){
10638 throw new UnsupportedOperationException();
10639 },"java.util.Map.Entry");
10640 Clazz_defineMethod(c$,"isEmpty",
10641 function(){
10642 return this.s.isEmpty();
10643 });
10644 Clazz_defineMethod(c$,"clear",
10645 function(){
10646 this.s.clear();
10647 });
10648 Clazz_defineMethod(c$,"size",
10649 function(){
10650 return this.s.size();
10651 });
10652 Clazz_overrideMethod(c$,"hashcode",
10653 function(){
10654 return this.s.hashCode();
10655 });
10656 Clazz_overrideMethod(c$,"equals",
10657 function(a){
10658 return this.s.equals(a);
10659 },"~O");
10660 Clazz_pu$h(self.c$);
10661 c$=Clazz_decorateAsClass(function(){
10662 this.i=null;
10663 this.valueType=null;
10664 Clazz_instantialize(this,arguments);
10665 },java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);
10666 Clazz_makeConstructor(c$,
10667 function(a,b){
10668 this.i=a;
10669 this.valueType=b;
10670 },"java.util.Iterator,Class");
10671 Clazz_defineMethod(c$,"hasNext",
10672 function(){
10673 return this.i.hasNext();
10674 });
10675 Clazz_defineMethod(c$,"remove",
10676 function(){
10677 this.i.remove();
10678 });
10679 Clazz_defineMethod(c$,"next",
10680 function(){
10681 return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType);
10682 });
10683 c$=Clazz_p0p();
10684 c$=Clazz_p0p();
10685 c$=Clazz_p0p();
10686 Clazz_pu$h(self.c$);
10687 c$=Clazz_decorateAsClass(function(){
10688 this.ss=null;
10689 Clazz_instantialize(this,arguments);
10690 },java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);
10691 Clazz_makeConstructor(c$,
10692 function(a,b){
10693 Clazz_superConstructor(this,java.util.Collections.CheckedSortedSet,[a,b]);
10694 this.ss=a;
10695 },"java.util.SortedSet,Class");
10696 Clazz_defineMethod(c$,"comparator",
10697 function(){
10698 return this.ss.comparator();
10699 });
10700 Clazz_defineMethod(c$,"subSet",
10701 function(a,b){
10702 return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),this.type);
10703 },"~O,~O");
10704 Clazz_defineMethod(c$,"headSet",
10705 function(a){
10706 return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type);
10707 },"~O");
10708 Clazz_defineMethod(c$,"tailSet",
10709 function(a){
10710 return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type);
10711 },"~O");
10712 Clazz_defineMethod(c$,"first",
10713 function(){
10714 return this.ss.first();
10715 });
10716 Clazz_defineMethod(c$,"last",
10717 function(){
10718 return this.ss.last();
10719 });
10720 c$=Clazz_p0p();
10721 Clazz_pu$h(self.c$);
10722 c$=Clazz_decorateAsClass(function(){
10723 this.sm=null;
10724 Clazz_instantialize(this,arguments);
10725 },java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);
10726 Clazz_makeConstructor(c$,
10727 function(a,b,c){
10728 Clazz_superConstructor(this,java.util.Collections.CheckedSortedMap,[a,b,c]);
10729 this.sm=a;
10730 },"java.util.SortedMap,Class,Class");
10731 Clazz_defineMethod(c$,"comparator",
10732 function(){
10733 return this.sm.comparator();
10734 });
10735 Clazz_defineMethod(c$,"subMap",
10736 function(a,b){
10737 return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),this.keyType,this.valueType);
10738 },"~O,~O");
10739 Clazz_defineMethod(c$,"headMap",
10740 function(a){
10741 return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType);
10742 },"~O");
10743 Clazz_defineMethod(c$,"tailMap",
10744 function(a){
10745 return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType);
10746 },"~O");
10747 Clazz_defineMethod(c$,"firstKey",
10748 function(){
10749 return this.sm.firstKey();
10750 });
10751 Clazz_defineMethod(c$,"lastKey",
10752 function(){
10753 return this.sm.lastKey();
10754 });
10755 c$=Clazz_p0p();
10756 c$.EMPTY_LIST=c$.prototype.EMPTY_LIST=new java.util.Collections.EmptyList();
10757 c$.EMPTY_SET=c$.prototype.EMPTY_SET=new java.util.Collections.EmptySet();
10758 c$.EMPTY_MAP=c$.prototype.EMPTY_MAP=new java.util.Collections.EmptyMap();
10759 });
10760 Clazz_load(["java.util.Map"],"java.util.SortedMap",null,function(){
10761 Clazz_declareInterface(java.util,"SortedMap",java.util.Map);
10762 });
10763 Clazz_load(["java.util.Set"],"java.util.SortedSet",null,function(){
10764 Clazz_declareInterface(java.util,"SortedSet",java.util.Set);
10765 });
10766 Clazz_load(null,"java.util.Random",["java.lang.IllegalArgumentException"],function(){
10767 c$=Clazz_decorateAsClass(function(){
10768 this.haveNextNextGaussian=false;
10769 this.seed=0;
10770 this.nextNextGaussian=0;
10771 Clazz_instantialize(this,arguments);
10772 },java.util,"Random",null,java.io.Serializable);
10773 Clazz_makeConstructor(c$,
10774 function(){
10775 this.setSeed(System.currentTimeMillis());
10776 });
10777 Clazz_makeConstructor(c$,
10778 function(seed){
10779 this.setSeed(seed);
10780 },"~N");
10781 Clazz_defineMethod(c$,"next",
10782 function(bits){
10783 this.seed=(this.seed*25214903917+0xb)&(281474976710655);
10784 return(this.seed>>>(48-bits));
10785 },"~N");
10786 Clazz_defineMethod(c$,"nextBoolean",
10787 function(){
10788 return Math.random()>0.5;
10789 });
10790 Clazz_defineMethod(c$,"nextBytes",
10791 function(buf){
10792 for(var i=0;i<bytes.length;i++){
10793 bytes[i]=Math.round(0x100*Math.random());
10794 }
10795 },"~A");
10796 Clazz_defineMethod(c$,"nextDouble",
10797 function(){
10798 return Math.random();
10799 });
10800 Clazz_defineMethod(c$,"nextFloat",
10801 function(){
10802 return Math.random();
10803 });
10804 Clazz_defineMethod(c$,"nextGaussian",
10805 function(){
10806 if(this.haveNextNextGaussian){
10807 this.haveNextNextGaussian=false;
10808 return this.nextNextGaussian;
10809 }var v1;
10810 var v2;
10811 var s;
10812 do{
10813 v1=2*this.nextDouble()-1;
10814 v2=2*this.nextDouble()-1;
10815 s=v1*v1+v2*v2;
10816 }while(s>=1);
10817 var norm=Math.sqrt(-2*Math.log(s)/s);
10818 this.nextNextGaussian=v2*norm;
10819 this.haveNextNextGaussian=true;
10820 return v1*norm;
10821 });
10822 Clazz_defineMethod(c$,"nextInt",
10823 function(){
10824 return Math.ceil(0xffff*Math.random())-0x8000;
10825 });
10826 Clazz_defineMethod(c$,"nextInt",
10827 function(n){
10828 if(n>0){
10829 n = Math.min(n, 31);
10830 return Math.floor((2 << (n - 1)) * Math.random())
10831
10832 /*
10833 if((n&-n)==n){
10834 return((n*this.next(31))>>31);
10835 }var bits;
10836 var val;
10837 do{
10838 bits=this.next(31);
10839 val=bits%n;
10840 }while(bits-val+(n-1)<0);
10841
10842
10843 return val;
10844
10845 */
10846 }
10847 throw new IllegalArgumentException();
10848 },"~N");
10849 Clazz_defineMethod(c$,"nextLong",
10850 function(){
10851 return Math.ceil(0xffffffff*Math.random())-0x80000000;
10852 });
10853 Clazz_defineMethod(c$,"setSeed",
10854 function(seed){
10855 Math.seedrandom(seed);
10856 //this.seed=(seed^25214903917)&(281474976710655);
10857 //this.haveNextNextGaussian=false;
10858 },"~N");
10859 Clazz_defineStatics(c$,
10860 "multiplier",0x5deece66d);
10861 });
10862
10863 // seedrandom.js
10864 // Author: David Bau 3/11/2010
10865 //
10866 // Defines a method Math.seedrandom() that, when called, substitutes
10867 // an explicitly seeded RC4-based algorithm for Math.random().  Also
10868 // supports automatic seeding from local or network sources of entropy.
10869 //
10870 // Usage:
10871 //
10872 //   <script src=http://davidbau.com/encode/seedrandom-min.js></script>
10873 //
10874 //   Math.seedrandom('yipee'); Sets Math.random to a function that is
10875 //                             initialized using the given explicit seed.
10876 //
10877 //   Math.seedrandom();        Sets Math.random to a function that is
10878 //                             seeded using the current time, dom state,
10879 //                             and other accumulated local entropy.
10880 //                             The generated seed string is returned.
10881 //
10882 //   Math.seedrandom('yowza', true);
10883 //                             Seeds using the given explicit seed mixed
10884 //                             together with accumulated entropy.
10885 //
10886 //   <script src="http://bit.ly/srandom-512"></script>
10887 //                             Seeds using physical random bits downloaded
10888 //                             from random.org.
10889 //
10890 // Examples:
10891 //
10892 //   Math.seedrandom("hello");            // Use "hello" as the seed.
10893 //   document.write(Math.random());       // Always 0.5463663768140734
10894 //   document.write(Math.random());       // Always 0.43973793770592234
10895 //   var rng1 = Math.random;              // Remember the current prng.
10896 //
10897 //   var autoseed = Math.seedrandom();    // New prng with an automatic seed.
10898 //   document.write(Math.random());       // Pretty much unpredictable.
10899 //
10900 //   Math.random = rng1;                  // Continue "hello" prng sequence.
10901 //   document.write(Math.random());       // Always 0.554769432473455
10902 //
10903 //   Math.seedrandom(autoseed);           // Restart at the previous seed.
10904 //   document.write(Math.random());       // Repeat the 'unpredictable' value.
10905 //
10906 // Notes:
10907 //
10908 // Each time seedrandom('arg') is called, entropy from the passed seed
10909 // is accumulated in a pool to help generate future seeds for the
10910 // zero-argument form of Math.seedrandom, so entropy can be injected over
10911 // time by calling seedrandom with explicit data repeatedly.
10912 //
10913 // On speed - This javascript implementation of Math.random() is about
10914 // 3-10x slower than the built-in Math.random() because it is not native
10915 // code, but this is typically fast enough anyway.  Seeding is more expensive,
10916 // especially if you use auto-seeding.  Some details (timings on Chrome 4):
10917 //
10918 // Our Math.random()            - avg less than 0.002 milliseconds per call
10919 // seedrandom('explicit')       - avg less than 0.5 milliseconds per call
10920 // seedrandom('explicit', true) - avg less than 2 milliseconds per call
10921 // seedrandom()                 - avg about 38 milliseconds per call
10922 //
10923 // LICENSE (BSD):
10924 //
10925 // Copyright 2010 David Bau, all rights reserved.
10926 //
10927 // Redistribution and use in source and binary forms, with or without
10928 // modification, are permitted provided that the following conditions are met:
10929 //
10930 //   1. Redistributions of source code must retain the above copyright
10931 //      notice, this list of conditions and the following disclaimer.
10932 //
10933 //   2. Redistributions in binary form must reproduce the above copyright
10934 //      notice, this list of conditions and the following disclaimer in the
10935 //      documentation and/or other materials provided with the distribution.
10936 //
10937 //   3. Neither the name of this module nor the names of its contributors may
10938 //      be used to endorse or promote products derived from this software
10939 //      without specific prior written permission.
10940 //
10941 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10942 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10943 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10944 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10945 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10946 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10947 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10948 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10949 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10950 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10951 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10952 //
10953 /**
10954  * All code is in an anonymous closure to keep the global namespace clean.
10955  *
10956  * @param {number=} overflow
10957  * @param {number=} startdenom
10958  */
10959 (function (pool, math, width, chunks, significance, overflow, startdenom) {
10960
10961 var copyright = "Copyright 2010 David Bau, all rights reserved. (BSD)"
10962 //
10963 // seedrandom()
10964 // This is the seedrandom function described above.
10965 //
10966 math['seedrandom'] = function seedrandom(seed, use_entropy) {
10967   var key = [];
10968   var arc4;
10969
10970   // Flatten the seed string or build one from local entropy if needed.
10971   seed = mixkey(flatten(
10972     use_entropy ? [seed, pool] :
10973     arguments.length ? seed :
10974     [new Date().getTime(), pool, window], 3), key);
10975
10976   // Use the seed to initialize an ARC4 generator.
10977   arc4 = new ARC4(key);
10978
10979   // Mix the randomness into accumulated entropy.
10980   mixkey(arc4.S, pool);
10981
10982   // Override Math.random
10983
10984   // This function returns a random double in [0, 1) that contains
10985   // randomness in every bit of the mantissa of the IEEE 754 value.
10986
10987   math['random'] = function random() {  // Closure to return a random double:
10988     var n = arc4.g(chunks);             // Start with a numerator n < 2 ^ 48
10989     var d = startdenom;                 //   and denominator d = 2 ^ 48.
10990     var x = 0;                          //   and no 'extra last byte'.
10991     while (n < significance) {          // Fill up all significant digits by
10992       n = (n + x) * width;              //   shifting numerator and
10993       d *= width;                       //   denominator and generating a
10994       x = arc4.g(1);                    //   new least-significant-byte.
10995     }
10996     while (n >= overflow) {             // To avoid rounding up, before adding
10997       n /= 2;                           //   last byte, shift everything
10998       d /= 2;                           //   right using integer math until
10999       x >>>= 1;                         //   we have exactly the desired bits.
11000     }
11001     return (n + x) / d;                 // Form the number within [0, 1).
11002   };
11003
11004   // Return the seed that was used
11005   return seed;
11006 };
11007
11008 //
11009 // ARC4
11010 //
11011 // An ARC4 implementation.  The constructor takes a key in the form of
11012 // an array of at most (width) integers that should be 0 <= x < (width).
11013 //
11014 // The g(count) method returns a pseudorandom integer that concatenates
11015 // the next (count) outputs from ARC4.  Its return value is a number x
11016 // that is in the range 0 <= x < (width ^ count).
11017 //
11018 /** @constructor */
11019 function ARC4(key) {
11020   var t, u, me = this, keylen = key.length;
11021   var i = 0, j = me.i = me.j = me.m = 0;
11022   me.S = [];
11023   me.c = [];
11024
11025   // The empty key [] is treated as [0].
11026   if (!keylen) { key = [keylen++]; }
11027
11028   // Set up S using the standard key scheduling algorithm.
11029   while (i < width) { me.S[i] = i++; }
11030   for (i = 0; i < width; i++) {
11031     t = me.S[i];
11032     j = lowbits(j + t + key[i % keylen]);
11033     u = me.S[j];
11034     me.S[i] = u;
11035     me.S[j] = t;
11036   }
11037
11038   // The "g" method returns the next (count) outputs as one number.
11039   me.g = function getnext(count) {
11040     var s = me.S;
11041     var i = lowbits(me.i + 1); var t = s[i];
11042     var j = lowbits(me.j + t); var u = s[j];
11043     s[i] = u;
11044     s[j] = t;
11045     var r = s[lowbits(t + u)];
11046     while (--count) {
11047       i = lowbits(i + 1); t = s[i];
11048       j = lowbits(j + t); u = s[j];
11049       s[i] = u;
11050       s[j] = t;
11051       r = r * width + s[lowbits(t + u)];
11052     }
11053     me.i = i;
11054     me.j = j;
11055     return r;
11056   };
11057   // For robust unpredictability discard an initial batch of values.
11058   // See http://www.rsa.com/rsalabs/node.asp?id=2009
11059   me.g(width);
11060 }
11061
11062 //
11063 // flatten()
11064 // Converts an object tree to nested arrays of strings.
11065 //
11066 /** @param {Object=} result
11067   * @param {string=} prop */
11068 function flatten(obj, depth, result, prop) {
11069   result = [];
11070   if (depth && typeof(obj) == 'object') {
11071     for (prop in obj) {
11072       if (prop.indexOf('S') < 5) {    // Avoid FF3 bug (local/sessionStorage)
11073         try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
11074       }
11075     }
11076   }
11077   return result.length ? result : '' + obj;
11078 }
11079
11080 //
11081 // mixkey()
11082 // Mixes a string seed into a key that is an array of integers, and
11083 // returns a shortened string seed that is equivalent to the result key.
11084 //
11085 /** @param {number=} smear
11086   * @param {number=} j */
11087 function mixkey(seed, key, smear, j) {
11088   seed += '';                         // Ensure the seed is a string
11089   smear = 0;
11090   for (j = 0; j < seed.length; j++) {
11091     key[lowbits(j)] =
11092       lowbits((smear ^= key[lowbits(j)] * 19) + seed.charCodeAt(j));
11093   }
11094   seed = '';
11095   for (j in key) { seed += String.fromCharCode(key[j]); }
11096   return seed;
11097 }
11098
11099 //
11100 // lowbits()
11101 // A quick "n mod width" for width a power of 2.
11102 //
11103 function lowbits(n) { return n & (width - 1); }
11104
11105 //
11106 // The following constants are related to IEEE 754 limits.
11107 //
11108 startdenom = math.pow(width, chunks);
11109 significance = math.pow(2, significance);
11110 overflow = significance * 2;
11111
11112 //
11113 // When seedrandom.js is loaded, we immediately mix a few bits
11114 // from the built-in RNG into the entropy pool.  Because we do
11115 // not want to intefere with determinstic PRNG state later,
11116 // seedrandom will not call math.random on its own again after
11117 // initialization.
11118 //
11119 mixkey(math.random(), pool);
11120
11121 // End anonymous scope, and pass initial values.
11122 })(
11123   [],   // pool: entropy pool starts empty
11124   Math, // math: package containing random, pow, and seedrandom
11125   256,  // width: each RC4 output is 0 <= x < 256
11126   6,    // chunks: at least six RC4 outputs for each double
11127   52    // significance: there are 52 significant digits in a double
11128 );
11129
11130 Clazz_declarePackage ("java.awt.event");
11131 Clazz_load (["java.util.EventListenerProxy", "java.awt.event.AWTEventListener"], "java.awt.event.AWTEventListenerProxy", null, function () {
11132 c$ = Clazz_decorateAsClass (function () {
11133 this.eventMask = 0;
11134 Clazz_instantialize (this, arguments);
11135 }, java.awt.event, "AWTEventListenerProxy", java.util.EventListenerProxy, java.awt.event.AWTEventListener);
11136 Clazz_makeConstructor (c$, 
11137 function (eventMask, listener) {
11138 Clazz_superConstructor (this, java.awt.event.AWTEventListenerProxy, [listener]);
11139 this.eventMask = eventMask;
11140 }, "~N,java.awt.event.AWTEventListener");
11141 Clazz_defineMethod (c$, "eventDispatched", 
11142 function (evt) {
11143 (this.getListener ()).eventDispatched (evt);
11144 }, "java.awt.AWTEvent");
11145 Clazz_defineMethod (c$, "getEventMask", 
11146 function () {
11147 return this.eventMask;
11148 });
11149 });
11150 Clazz_declarePackage ("java.beans");
11151 Clazz_load (["java.beans.ChangeListenerMap"], "java.beans.PropertyChangeSupport", ["java.lang.Boolean", "$.NullPointerException", "java.beans.IndexedPropertyChangeEvent", "$.PropertyChangeEvent", "$.PropertyChangeListenerProxy"], function () {
11152 c$ = Clazz_decorateAsClass (function () {
11153 this.map = null;
11154 this.source = null;
11155 Clazz_instantialize (this, arguments);
11156 }, java.beans, "PropertyChangeSupport");
11157 Clazz_prepareFields (c$, function () {
11158 this.map =  new java.beans.PropertyChangeSupport.PropertyChangeListenerMap ();
11159 });
11160 Clazz_makeConstructor (c$, 
11161 function (sourceBean) {
11162 if (sourceBean == null) {
11163 throw  new NullPointerException ();
11164 }this.source = sourceBean;
11165 }, "~O");
11166 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11167 function (listener) {
11168 this.addPropertyChangeListener1 (listener);
11169 }, "java.beans.PropertyChangeListener");
11170 Clazz_defineMethod (c$, "addPropertyChangeListener1", 
11171 function (listener) {
11172 if (listener == null) {
11173 return;
11174 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11175 var proxy = listener;
11176 this.addPropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11177 } else {
11178 this.map.add (null, listener);
11179 }}, "java.beans.PropertyChangeListener");
11180 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11181 function (listener) {
11182 if (listener == null) {
11183 return;
11184 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11185 var proxy = listener;
11186 this.removePropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11187 } else {
11188 this.map.remove (null, listener);
11189 }}, "java.beans.PropertyChangeListener");
11190 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11191 function () {
11192 return this.map.getListeners ();
11193 });
11194 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11195 function (propertyName, listener) {
11196 {
11197 if (arguments.length == 1) {
11198 this.addPropertyChangeListener1(propertyName);
11199 return;
11200 }
11201 }this.addPropertyChangeListener2 (propertyName, listener);
11202 }, "~S,java.beans.PropertyChangeListener");
11203 Clazz_defineMethod (c$, "addPropertyChangeListener2", 
11204 function (propertyName, listener) {
11205 if (listener == null || propertyName == null) {
11206 return;
11207 }listener = this.map.extract (listener);
11208 if (listener != null) {
11209 this.map.add (propertyName, listener);
11210 }}, "~S,java.beans.PropertyChangeListener");
11211 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11212 function (propertyName, listener) {
11213 if (listener == null || propertyName == null) {
11214 return;
11215 }listener = this.map.extract (listener);
11216 if (listener != null) {
11217 this.map.remove (propertyName, listener);
11218 }}, "~S,java.beans.PropertyChangeListener");
11219 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11220 function (propertyName) {
11221 return this.map.getListeners (propertyName);
11222 }, "~S");
11223 Clazz_defineMethod (c$, "firePropertyChange", 
11224 function (propertyName, oldValue, newValue) {
11225 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11226 return;
11227 }this.firePropertyChangeEvt ( new java.beans.PropertyChangeEvent (this.source, propertyName, oldValue, newValue));
11228 }, "~S,~O,~O");
11229 Clazz_defineMethod (c$, "firePropertyChange", 
11230 function (propertyName, oldValue, newValue) {
11231 if (oldValue == newValue) {
11232 return;
11233 }this.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11234 }, "~S,~N,~N");
11235 Clazz_defineMethod (c$, "firePropertyChange", 
11236 function (propertyName, oldValue, newValue) {
11237 if (oldValue == newValue) {
11238 return;
11239 }this.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11240 }, "~S,~B,~B");
11241 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
11242 function (evt) {
11243 var oldValue = evt.getOldValue ();
11244 var newValue = evt.getNewValue ();
11245 var propertyName = evt.getPropertyName ();
11246 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11247 return;
11248 }var common = this.map.get (null);
11249 var named = (propertyName != null) ? this.map.get (propertyName) : null;
11250 this.fire (common, evt);
11251 this.fire (named, evt);
11252 }, "java.beans.PropertyChangeEvent");
11253 Clazz_defineMethod (c$, "fire", 
11254  function (listeners, event) {
11255 if (listeners != null) {
11256 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11257 listener.propertyChange (event);
11258 }
11259 }}, "~A,java.beans.PropertyChangeEvent");
11260 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11261 function (propertyName, index, oldValue, newValue) {
11262 this.firePropertyChangeEvt ( new java.beans.IndexedPropertyChangeEvent (this.source, propertyName, oldValue, newValue, index));
11263 }, "~S,~N,~O,~O");
11264 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11265 function (propertyName, index, oldValue, newValue) {
11266 if (oldValue == newValue) {
11267 return;
11268 }this.fireIndexedPropertyChange (propertyName, index, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11269 }, "~S,~N,~N,~N");
11270 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11271 function (propertyName, index, oldValue, newValue) {
11272 if (oldValue == newValue) {
11273 return;
11274 }this.fireIndexedPropertyChange (propertyName, index, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11275 }, "~S,~N,~B,~B");
11276 Clazz_defineMethod (c$, "hasListeners", 
11277 function (propertyName) {
11278 return this.map.hasListeners (propertyName);
11279 }, "~S");
11280 Clazz_pu$h(self.c$);
11281 c$ = Clazz_declareType (java.beans.PropertyChangeSupport, "PropertyChangeListenerMap", java.beans.ChangeListenerMap);
11282 Clazz_overrideMethod (c$, "newArray", 
11283 function (a) {
11284 return (0 < a) ?  new Array (a) : java.beans.PropertyChangeSupport.PropertyChangeListenerMap.EMPTY;
11285 }, "~N");
11286 Clazz_overrideMethod (c$, "newProxy", 
11287 function (a, b) {
11288 return  new java.beans.PropertyChangeListenerProxy (a, b);
11289 }, "~S,java.beans.PropertyChangeListener");
11290 Clazz_defineStatics (c$,
11291 "EMPTY",  Clazz_newArray (-1, []));
11292 c$ = Clazz_p0p ();
11293 });
11294 Clazz_declarePackage ("java.beans");
11295 Clazz_load (null, "java.beans.ChangeListenerMap", ["java.util.ArrayList", "$.Collections", "$.EventListenerProxy", "$.HashMap"], function () {
11296 c$ = Clazz_decorateAsClass (function () {
11297 this.map = null;
11298 Clazz_instantialize (this, arguments);
11299 }, java.beans, "ChangeListenerMap");
11300 Clazz_defineMethod (c$, "add", 
11301 function (name, listener) {
11302 if (this.map == null) {
11303 this.map =  new java.util.HashMap ();
11304 }var array = this.map.get (name);
11305 var size = (array != null) ? array.length : 0;
11306 var clone = this.newArray (size + 1);
11307 clone[size] = listener;
11308 if (array != null) {
11309 System.arraycopy (array, 0, clone, 0, size);
11310 }this.map.put (name, clone);
11311 }, "~S,~O");
11312 Clazz_defineMethod (c$, "remove", 
11313 function (name, listener) {
11314 if (this.map != null) {
11315 var array = this.map.get (name);
11316 if (array != null) {
11317 for (var i = 0; i < array.length; i++) {
11318 if (listener.equals (array[i])) {
11319 var size = array.length - 1;
11320 if (size > 0) {
11321 var clone = this.newArray (size);
11322 System.arraycopy (array, 0, clone, 0, i);
11323 System.arraycopy (array, i + 1, clone, i, size - i);
11324 this.map.put (name, clone);
11325 } else {
11326 this.map.remove (name);
11327 if (this.map.isEmpty ()) {
11328 this.map = null;
11329 }}break;
11330 }}
11331 }}}, "~S,~O");
11332 Clazz_defineMethod (c$, "get", 
11333 function (name) {
11334 return (this.map != null) ? this.map.get (name) : null;
11335 }, "~S");
11336 Clazz_defineMethod (c$, "set", 
11337 function (name, listeners) {
11338 if (listeners != null) {
11339 if (this.map == null) {
11340 this.map =  new java.util.HashMap ();
11341 }this.map.put (name, listeners);
11342 } else if (this.map != null) {
11343 this.map.remove (name);
11344 if (this.map.isEmpty ()) {
11345 this.map = null;
11346 }}}, "~S,~A");
11347 Clazz_defineMethod (c$, "getListeners", 
11348 function () {
11349 if (this.map == null) {
11350 return this.newArray (0);
11351 }var list =  new java.util.ArrayList ();
11352 var listeners = this.map.get (null);
11353 if (listeners != null) {
11354 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11355 list.add (listener);
11356 }
11357 }for (var entry, $entry = this.map.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) {
11358 var name = entry.getKey ();
11359 if (name != null) {
11360 for (var listener, $listener = 0, $$listener = entry.getValue (); $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11361 list.add (this.newProxy (name, listener));
11362 }
11363 }}
11364 return list.toArray (this.newArray (list.size ()));
11365 });
11366 Clazz_defineMethod (c$, "getListeners", 
11367 function (name) {
11368 if (name != null) {
11369 var listeners = this.get (name);
11370 if (listeners != null) {
11371 return listeners.clone ();
11372 }}return this.newArray (0);
11373 }, "~S");
11374 Clazz_defineMethod (c$, "hasListeners", 
11375 function (name) {
11376 if (this.map == null) {
11377 return false;
11378 }var array = this.map.get (null);
11379 return (array != null) || ((name != null) && (null != this.map.get (name)));
11380 }, "~S");
11381 Clazz_defineMethod (c$, "getEntries", 
11382 function () {
11383 return (this.map != null) ? this.map.entrySet () : java.util.Collections.emptySet ();
11384 });
11385 Clazz_defineMethod (c$, "extract", 
11386 function (listener) {
11387 while (Clazz_instanceOf (listener, java.util.EventListenerProxy)) {
11388 var proxy = listener;
11389 listener = proxy.getListener ();
11390 }
11391 return listener;
11392 }, "~O");
11393 });
11394 Clazz_declarePackage ("java.beans");
11395 Clazz_load (["java.beans.PropertyChangeEvent"], "java.beans.IndexedPropertyChangeEvent", null, function () {
11396 c$ = Clazz_decorateAsClass (function () {
11397 this.index = 0;
11398 Clazz_instantialize (this, arguments);
11399 }, java.beans, "IndexedPropertyChangeEvent", java.beans.PropertyChangeEvent);
11400 Clazz_makeConstructor (c$, 
11401 function (source, propertyName, oldValue, newValue, index) {
11402 Clazz_superConstructor (this, java.beans.IndexedPropertyChangeEvent, [source, propertyName, oldValue, newValue]);
11403 this.index = index;
11404 }, "~O,~S,~O,~O,~N");
11405 Clazz_defineMethod (c$, "getIndex", 
11406 function () {
11407 return this.index;
11408 });
11409 });
11410 Clazz_declarePackage ("java.beans");
11411 Clazz_load (["java.util.EventObject"], "java.beans.PropertyChangeEvent", null, function () {
11412 c$ = Clazz_decorateAsClass (function () {
11413 this.propertyName = null;
11414 this.newValue = null;
11415 this.oldValue = null;
11416 this.propagationId = null;
11417 Clazz_instantialize (this, arguments);
11418 }, java.beans, "PropertyChangeEvent", java.util.EventObject);
11419 Clazz_makeConstructor (c$, 
11420 function (source, propertyName, oldValue, newValue) {
11421 Clazz_superConstructor (this, java.beans.PropertyChangeEvent, [source]);
11422 this.propertyName = propertyName;
11423 this.newValue = newValue;
11424 this.oldValue = oldValue;
11425 }, "~O,~S,~O,~O");
11426 Clazz_defineMethod (c$, "getPropertyName", 
11427 function () {
11428 return this.propertyName;
11429 });
11430 Clazz_defineMethod (c$, "getNewValue", 
11431 function () {
11432 return this.newValue;
11433 });
11434 Clazz_defineMethod (c$, "getOldValue", 
11435 function () {
11436 return this.oldValue;
11437 });
11438 Clazz_defineMethod (c$, "setPropagationId", 
11439 function (propagationId) {
11440 this.propagationId = propagationId;
11441 }, "~O");
11442 Clazz_defineMethod (c$, "getPropagationId", 
11443 function () {
11444 return this.propagationId;
11445 });
11446 });
11447 Clazz_declarePackage ("java.beans");
11448 Clazz_load (["java.util.EventListenerProxy", "java.beans.PropertyChangeListener"], "java.beans.PropertyChangeListenerProxy", null, function () {
11449 c$ = Clazz_decorateAsClass (function () {
11450 this.propertyName = null;
11451 Clazz_instantialize (this, arguments);
11452 }, java.beans, "PropertyChangeListenerProxy", java.util.EventListenerProxy, java.beans.PropertyChangeListener);
11453 Clazz_makeConstructor (c$, 
11454 function (propertyName, listener) {
11455 Clazz_superConstructor (this, java.beans.PropertyChangeListenerProxy, [listener]);
11456 this.propertyName = propertyName;
11457 }, "~S,java.beans.PropertyChangeListener");
11458 Clazz_defineMethod (c$, "propertyChange", 
11459 function (evt) {
11460 (this.getListener ()).propertyChange (evt);
11461 }, "java.beans.PropertyChangeEvent");
11462 Clazz_defineMethod (c$, "getPropertyName", 
11463 function () {
11464 return this.propertyName;
11465 });
11466 });
11467 Clazz_declarePackage ("java.beans");
11468 Clazz_load (["java.util.EventListener"], "java.beans.PropertyChangeListener", null, function () {
11469 Clazz_declareInterface (java.beans, "PropertyChangeListener", java.util.EventListener);
11470 });
11471 Clazz_declarePackage ("java.security");
11472 Clazz_declareInterface (java.security, "PrivilegedAction");
11473 Clazz_declarePackage ("java.awt");
11474 Clazz_load (["java.awt.geom.Point2D"], "java.awt.Point", null, function () {
11475 c$ = Clazz_decorateAsClass (function () {
11476 this.x = 0;
11477 this.y = 0;
11478 Clazz_instantialize (this, arguments);
11479 }, java.awt, "Point", java.awt.geom.Point2D);
11480 Clazz_makeConstructor (c$, 
11481 function () {
11482 this.construct (0, 0);
11483 });
11484 Clazz_makeConstructor (c$, 
11485 function (p) {
11486 this.construct (p.x, p.y);
11487 }, "java.awt.Point");
11488 Clazz_makeConstructor (c$, 
11489 function (x, y) {
11490 Clazz_superConstructor (this, java.awt.Point, []);
11491 this.x = x;
11492 this.y = y;
11493 }, "~N,~N");
11494 Clazz_overrideMethod (c$, "getX", 
11495 function () {
11496 return this.x;
11497 });
11498 Clazz_overrideMethod (c$, "getY", 
11499 function () {
11500 return this.y;
11501 });
11502 Clazz_defineMethod (c$, "getLocation", 
11503 function () {
11504 return  new java.awt.Point (this.x, this.y);
11505 });
11506 Clazz_defineMethod (c$, "setLocation", 
11507 function (p) {
11508 this.setLocation (p.x, p.y);
11509 }, "java.awt.Point");
11510 Clazz_defineMethod (c$, "setLocation", 
11511 function (x, y) {
11512 this.x = Clazz_doubleToInt (Math.floor (x + 0.5));
11513 this.y = Clazz_doubleToInt (Math.floor (y + 0.5));
11514 }, "~N,~N");
11515 Clazz_defineMethod (c$, "move", 
11516 function (x, y) {
11517 this.x = x;
11518 this.y = y;
11519 }, "~N,~N");
11520 Clazz_defineMethod (c$, "translate", 
11521 function (dx, dy) {
11522 this.x += dx;
11523 this.y += dy;
11524 }, "~N,~N");
11525 Clazz_defineMethod (c$, "equals", 
11526 function (obj) {
11527 if (Clazz_instanceOf (obj, java.awt.Point)) {
11528 var pt = obj;
11529 return (this.x == pt.x) && (this.y == pt.y);
11530 }return Clazz_superCall (this, java.awt.Point, "equals", [obj]);
11531 }, "~O");
11532 Clazz_overrideMethod (c$, "toString", 
11533 function () {
11534 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + "]";
11535 });
11536 });
11537 Clazz_declarePackage ("jssun.awt");
11538 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 () {
11539 c$ = Clazz_decorateAsClass (function () {
11540 this.table = null;
11541 this.threadGroup = null;
11542 this.changeSupport = null;
11543 this.$isDisposed = false;
11544 this.mostRecentKeyValue = null;
11545 this.shadowMostRecentKeyValue = null;
11546 Clazz_instantialize (this, arguments);
11547 }, jssun.awt, "AppContext");
11548 Clazz_prepareFields (c$, function () {
11549 this.table =  new java.util.HashMap ();
11550 });
11551 c$.getAppContexts = Clazz_defineMethod (c$, "getAppContexts", 
11552 function () {
11553 return  new java.util.HashSet (jssun.awt.AppContext.threadGroup2appContext.values ());
11554 });
11555 Clazz_defineMethod (c$, "isDisposed", 
11556 function () {
11557 return this.$isDisposed;
11558 });
11559 Clazz_makeConstructor (c$, 
11560 function (threadGroup) {
11561 jssun.awt.AppContext.numAppContexts++;
11562 this.threadGroup = threadGroup;
11563 jssun.awt.AppContext.threadGroup2appContext.put (threadGroup, this);
11564 }, "ThreadGroup");
11565 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
11566 function () {
11567 var currentThread = Thread.currentThread ();
11568 var appContext = null;
11569 var recent = jssun.awt.AppContext.mostRecentThreadAppContext;
11570 if ((recent != null) && (recent.thread === currentThread)) {
11571 appContext = recent.appContext;
11572 } else {
11573 var currentThreadGroup = currentThread.getThreadGroup ();
11574 var threadGroup = currentThreadGroup;
11575 appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11576 while (appContext == null) {
11577 threadGroup = threadGroup.getParent ();
11578 if (threadGroup == null) {
11579 return null;
11580 }appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11581 }
11582 for (var tg = currentThreadGroup; tg !== threadGroup; tg = tg.getParent ()) {
11583 jssun.awt.AppContext.threadGroup2appContext.put (tg, appContext);
11584 }
11585 jssun.awt.AppContext.mostRecentThreadAppContext =  new jssun.awt.MostRecentThreadAppContext (currentThread, appContext);
11586 }return appContext;
11587 });
11588 c$.isMainContext = Clazz_defineMethod (c$, "isMainContext", 
11589 function (ctx) {
11590 return false;
11591 }, "jssun.awt.AppContext");
11592 Clazz_defineMethod (c$, "dispose", 
11593 function () {
11594 });
11595 Clazz_defineMethod (c$, "get", 
11596 function (key) {
11597 {
11598 var recent = this.mostRecentKeyValue;
11599 if ((recent != null) && (recent.key === key)) {
11600 return recent.value;
11601 }var value = this.table.get (key);
11602 if (this.mostRecentKeyValue == null) {
11603 this.mostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11604 this.shadowMostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11605 } else {
11606 var auxKeyValue = this.mostRecentKeyValue;
11607 this.shadowMostRecentKeyValue.setPair (key, value);
11608 this.mostRecentKeyValue = this.shadowMostRecentKeyValue;
11609 this.shadowMostRecentKeyValue = auxKeyValue;
11610 }return value;
11611 }}, "~O");
11612 Clazz_defineMethod (c$, "put", 
11613 function (key, value) {
11614 {
11615 var recent = this.mostRecentKeyValue;
11616 if ((recent != null) && (recent.key === key)) recent.value = value;
11617 return this.table.put (key, value);
11618 }}, "~O,~O");
11619 Clazz_defineMethod (c$, "remove", 
11620 function (key) {
11621 {
11622 var recent = this.mostRecentKeyValue;
11623 if ((recent != null) && (recent.key === key)) recent.value = null;
11624 return this.table.remove (key);
11625 }}, "~O");
11626 Clazz_defineMethod (c$, "getThreadGroup", 
11627 function () {
11628 return this.threadGroup;
11629 });
11630 Clazz_overrideMethod (c$, "toString", 
11631 function () {
11632 return this.getClass ().getName () + "[threadGroup=" + this.threadGroup.getName () + "]";
11633 });
11634 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11635 function () {
11636 if (this.changeSupport == null) {
11637 return  new Array (0);
11638 }return this.changeSupport.getPropertyChangeListeners ();
11639 });
11640 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11641 function (propertyName, listener) {
11642 if (listener == null) {
11643 return;
11644 }if (this.changeSupport == null) {
11645 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
11646 }this.changeSupport.addPropertyChangeListener (propertyName, listener);
11647 }, "~S,java.beans.PropertyChangeListener");
11648 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11649 function (propertyName, listener) {
11650 if (listener == null || this.changeSupport == null) {
11651 return;
11652 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
11653 }, "~S,java.beans.PropertyChangeListener");
11654 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11655 function (propertyName) {
11656 if (this.changeSupport == null) {
11657 return  new Array (0);
11658 }return this.changeSupport.getPropertyChangeListeners (propertyName);
11659 }, "~S");
11660 c$.EVENT_QUEUE_KEY = c$.prototype.EVENT_QUEUE_KEY =  new StringBuffer ("EventQueue");
11661 c$.threadGroup2appContext = c$.prototype.threadGroup2appContext = java.util.Collections.synchronizedMap ( new java.util.IdentityHashMap ());
11662 Clazz_defineStatics (c$,
11663 "DISPOSED_PROPERTY_NAME", "disposed",
11664 "GUI_DISPOSED", "guidisposed",
11665 "numAppContexts", 0,
11666 "mostRecentThreadAppContext", null);
11667 c$ = Clazz_decorateAsClass (function () {
11668 this.thread = null;
11669 this.appContext = null;
11670 Clazz_instantialize (this, arguments);
11671 }, jssun.awt, "MostRecentThreadAppContext");
11672 Clazz_makeConstructor (c$, 
11673 function (key, value) {
11674 this.thread = key;
11675 this.appContext = value;
11676 }, "Thread,jssun.awt.AppContext");
11677 c$ = Clazz_decorateAsClass (function () {
11678 this.key = null;
11679 this.value = null;
11680 Clazz_instantialize (this, arguments);
11681 }, jssun.awt, "MostRecentKeyValue");
11682 Clazz_makeConstructor (c$, 
11683 function (k, v) {
11684 this.key = k;
11685 this.value = v;
11686 }, "~O,~O");
11687 Clazz_defineMethod (c$, "setPair", 
11688 function (k, v) {
11689 this.key = k;
11690 this.value = v;
11691 }, "~O,~O");
11692 });
11693 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){
11694 c$=Clazz_declareType(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);
11695 Clazz_makeConstructor(c$,
11696 function(cs){
11697 if(cs==null){
11698 throw new NullPointerException();
11699 }
11700 Clazz_superConstructor(this,StringBuffer,[cs.toString()]);
11701 },"CharSequence");
11702 Clazz_defineMethod(c$,"append",
11703 function(b){
11704 return this.append(b?"true":"false");
11705 },"~B");
11706 Clazz_defineMethod(c$,"append",
11707 function(ch){
11708 this.append0(ch);
11709 return this;
11710 },"~N");
11711 Clazz_defineMethod(c$,"append",
11712 function(d){
11713 return this.append(Double.toString(d));
11714 },"~N");
11715 Clazz_defineMethod(c$,"append",
11716 function(obj){
11717 if(obj==null){
11718 this.appendNull();
11719 }else{
11720 this.append0(obj.toString());
11721 }return this;
11722 },"~O");
11723 Clazz_defineMethod(c$,"append",
11724 function(string){
11725 this.append0(string);
11726 return this;
11727 },"~S");
11728 Clazz_defineMethod(c$,"append",
11729 function(sb){
11730 if(sb==null){
11731 this.appendNull();
11732 }else{
11733 {
11734 this.append0(sb.getValue(),0,sb.length());
11735 }}return this;
11736 },"StringBuffer");
11737 Clazz_defineMethod(c$,"append",
11738 function(chars){
11739 this.append0(chars);
11740 return this;
11741 },"~A");
11742 Clazz_defineMethod(c$,"append",
11743 function(chars,start,length){
11744 this.append0(chars,start,length);
11745 return this;
11746 },"~A,~N,~N");
11747 Clazz_defineMethod(c$,"append",
11748 function(s){
11749 if(s==null){
11750 this.appendNull();
11751 }else{
11752 this.append0(s.toString());
11753 }return this;
11754 },"CharSequence");
11755 Clazz_defineMethod(c$,"append",
11756 function(s,start,end){
11757 this.append0(s,start,end);
11758 return this;
11759 },"CharSequence,~N,~N");
11760 Clazz_defineMethod(c$,"appendCodePoint",
11761 function(codePoint){
11762 return this.append(Character.toChars(codePoint));
11763 },"~N");
11764 Clazz_defineMethod(c$,"$delete",
11765 function(start,end){
11766 this.delete0(start,end);
11767 return this;
11768 },"~N,~N");
11769 Clazz_defineMethod(c$,"deleteCharAt",
11770 function(location){
11771 this.deleteCharAt0(location);
11772 return this;
11773 },"~N");
11774 Clazz_defineMethod(c$,"insert",
11775 function(index,ch){
11776 this.insert0(index,ch);
11777 return this;
11778 },"~N,~N");
11779 Clazz_defineMethod(c$,"insert",
11780 function(index,b){
11781 return this.insert(index,b?"true":"false");
11782 },"~N,~B");
11783 Clazz_defineMethod(c$,"insert",
11784 function(index,i){
11785 return this.insert(index,Integer.toString(i));
11786 },"~N,~N");
11787 Clazz_defineMethod(c$,"insert",
11788 function(index,l){
11789 return this.insert(index,Long.toString(l));
11790 },"~N,~N");
11791 Clazz_defineMethod(c$,"insert",
11792 function(index,d){
11793 return this.insert(index,Double.toString(d));
11794 },"~N,~N");
11795 Clazz_defineMethod(c$,"insert",
11796 function(index,f){
11797 return this.insert(index,Float.toString(f));
11798 },"~N,~N");
11799 Clazz_defineMethod(c$,"insert",
11800 function(index,obj){
11801 return this.insert(index,obj==null?"null":obj.toString());
11802 },"~N,~O");
11803 Clazz_defineMethod(c$,"insert",
11804 function(index,string){
11805 this.insert0(index,string);
11806 return this;
11807 },"~N,~S");
11808 Clazz_defineMethod(c$,"insert",
11809 function(index,chars){
11810 this.insert0(index,chars);
11811 return this;
11812 },"~N,~A");
11813 Clazz_defineMethod(c$,"insert",
11814 function(index,chars,start,length){
11815 this.insert0(index,chars,start,length);
11816 return this;
11817 },"~N,~A,~N,~N");
11818 Clazz_defineMethod(c$,"insert",
11819 function(index,s){
11820 this.insert0(index,s==null?"null":s.toString());
11821 return this;
11822 },"~N,CharSequence");
11823 Clazz_defineMethod(c$,"insert",
11824 function(index,s,start,end){
11825 this.insert0(index,s,start,end);
11826 return this;
11827 },"~N,CharSequence,~N,~N");
11828 Clazz_defineMethod(c$,"replace",
11829 function(start,end,string){
11830 this.replace0(start,end,string);
11831 return this;
11832 },"~N,~N,~S");
11833 Clazz_defineMethod(c$,"reverse",
11834 function(){
11835 this.reverse0();
11836 return this;
11837 });
11838 Clazz_overrideMethod(c$,"subSequence",
11839 function(start,end){
11840 return Clazz_superCall(this,StringBuffer,"substring",[start,end]);
11841 },"~N,~N");
11842 });
11843 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(){
11844 c$=Clazz_decorateAsClass(function(){
11845 this.elementData=null;
11846 this.$size=0;
11847 this.threshold=0;
11848 this.modCount=0;
11849 Clazz_instantialize(this,arguments);
11850 },java.util,"IdentityHashMap",java.util.AbstractMap,[java.util.Map,java.io.Serializable,Cloneable]);
11851 Clazz_makeConstructor(c$,
11852 function(){
11853 this.construct(21);
11854 });
11855 Clazz_makeConstructor(c$,
11856 function(maxSize){
11857 Clazz_superConstructor(this,java.util.IdentityHashMap,[]);
11858 if(maxSize>=0){
11859 this.$size=0;
11860 this.threshold=this.getThreshold(maxSize);
11861 this.elementData=this.newElementArray(this.computeElementArraySize());
11862 }else{
11863 throw new IllegalArgumentException();
11864 }},"~N");
11865 Clazz_defineMethod(c$,"getThreshold",
11866 ($fz=function(maxSize){
11867 return maxSize>3?maxSize:3;
11868 },$fz.isPrivate=true,$fz),"~N");
11869 Clazz_defineMethod(c$,"computeElementArraySize",
11870 ($fz=function(){
11871 return(Math.floor((this.threshold*10000)/7500))*2;
11872 },$fz.isPrivate=true,$fz));
11873 Clazz_defineMethod(c$,"newElementArray",
11874 ($fz=function(s){
11875 return new Array(s);
11876 },$fz.isPrivate=true,$fz),"~N");
11877 Clazz_makeConstructor(c$,
11878 function(map){
11879 this.construct(map.size()<6?11:map.size()*2);
11880 this.putAllImpl(map);
11881 },"java.util.Map");
11882 Clazz_defineMethod(c$,"massageValue",
11883 ($fz=function(value){
11884 return((value===java.util.IdentityHashMap.NULL_OBJECT)?null:value);
11885 },$fz.isPrivate=true,$fz),"~O");
11886 Clazz_overrideMethod(c$,"clear",
11887 function(){
11888 this.$size=0;
11889 for(var i=0;i<this.elementData.length;i++){
11890 this.elementData[i]=null;
11891 }
11892 this.modCount++;
11893 });
11894 Clazz_overrideMethod(c$,"containsKey",
11895 function(key){
11896 if(key==null){
11897 key=java.util.IdentityHashMap.NULL_OBJECT;
11898 }var index=this.findIndex(key,this.elementData);
11899 return this.elementData[index]===key;
11900 },"~O");
11901 Clazz_overrideMethod(c$,"containsValue",
11902 function(value){
11903 if(value==null){
11904 value=java.util.IdentityHashMap.NULL_OBJECT;
11905 }for(var i=1;i<this.elementData.length;i=i+2){
11906 if(this.elementData[i]===value){
11907 return true;
11908 }}
11909 return false;
11910 },"~O");
11911 Clazz_overrideMethod(c$,"get",
11912 function(key){
11913 if(key==null){
11914 key=java.util.IdentityHashMap.NULL_OBJECT;
11915 }var index=this.findIndex(key,this.elementData);
11916 if(this.elementData[index]===key){
11917 var result=this.elementData[index+1];
11918 return this.massageValue(result);
11919 }return null;
11920 },"~O");
11921 Clazz_defineMethod(c$,"getEntry",
11922 ($fz=function(key){
11923 if(key==null){
11924 key=java.util.IdentityHashMap.NULL_OBJECT;
11925 }var index=this.findIndex(key,this.elementData);
11926 if(this.elementData[index]===key){
11927 return this.getEntry(index);
11928 }return null;
11929 },$fz.isPrivate=true,$fz),"~O");
11930 Clazz_defineMethod(c$,"getEntry",
11931 ($fz=function(index){
11932 var key=this.elementData[index];
11933 var value=this.elementData[index+1];
11934 if(key===java.util.IdentityHashMap.NULL_OBJECT){
11935 key=null;
11936 }if(value===java.util.IdentityHashMap.NULL_OBJECT){
11937 value=null;
11938 }return new java.util.IdentityHashMap.IdentityHashMapEntry(key,value);
11939 },$fz.isPrivate=true,$fz),"~N");
11940 Clazz_defineMethod(c$,"findIndex",
11941 ($fz=function(key,array){
11942 var length=array.length;
11943 var index=this.getModuloHash(key,length);
11944 var last=(index+length-2)%length;
11945 while(index!=last){
11946 if(array[index]===key||(array[index]==null)){
11947 break;
11948 }index=(index+2)%length;
11949 }
11950 return index;
11951 },$fz.isPrivate=true,$fz),"~O,~A");
11952 Clazz_defineMethod(c$,"getModuloHash",
11953 ($fz=function(key,length){
11954 return((System.identityHashCode(key)&0x7FFFFFFF)%(Math.floor(length/2)))*2;
11955 },$fz.isPrivate=true,$fz),"~O,~N");
11956 Clazz_overrideMethod(c$,"put",
11957 function(key,value){
11958 var _key=key;
11959 var _value=value;
11960 if(_key==null){
11961 _key=java.util.IdentityHashMap.NULL_OBJECT;
11962 }if(_value==null){
11963 _value=java.util.IdentityHashMap.NULL_OBJECT;
11964 }var index=this.findIndex(_key,this.elementData);
11965 if(this.elementData[index]!==_key){
11966 this.modCount++;
11967 if(++this.$size>this.threshold){
11968 this.rehash();
11969 index=this.findIndex(_key,this.elementData);
11970 }this.elementData[index]=_key;
11971 this.elementData[index+1]=null;
11972 }var result=this.elementData[index+1];
11973 this.elementData[index+1]=_value;
11974 return this.massageValue(result);
11975 },"~O,~O");
11976 Clazz_overrideMethod(c$,"putAll",
11977 function(map){
11978 this.putAllImpl(map);
11979 },"java.util.Map");
11980 Clazz_defineMethod(c$,"rehash",
11981 ($fz=function(){
11982 var newlength=this.elementData.length<<1;
11983 if(newlength==0){
11984 newlength=1;
11985 }var newData=this.newElementArray(newlength);
11986 for(var i=0;i<this.elementData.length;i=i+2){
11987 var key=this.elementData[i];
11988 if(key!=null){
11989 var index=this.findIndex(key,newData);
11990 newData[index]=key;
11991 newData[index+1]=this.elementData[i+1];
11992 }}
11993 this.elementData=newData;
11994 this.computeMaxSize();
11995 },$fz.isPrivate=true,$fz));
11996 Clazz_defineMethod(c$,"computeMaxSize",
11997 ($fz=function(){
11998 this.threshold=(Math.floor((Math.floor(this.elementData.length/ 2)) * 7500 /10000));
11999 },$fz.isPrivate=true,$fz));
12000 Clazz_overrideMethod(c$,"remove",
12001 function(key){
12002 if(key==null){
12003 key=java.util.IdentityHashMap.NULL_OBJECT;
12004 }var hashedOk;
12005 var index;
12006 var next;
12007 var hash;
12008 var result;
12009 var object;
12010 index=next=this.findIndex(key,this.elementData);
12011 if(this.elementData[index]!==key){
12012 return null;
12013 }result=this.elementData[index+1];
12014 var length=this.elementData.length;
12015 while(true){
12016 next=(next+2)%length;
12017 object=this.elementData[next];
12018 if(object==null){
12019 break;
12020 }hash=this.getModuloHash(object,length);
12021 hashedOk=hash>index;
12022 if(next<index){
12023 hashedOk=hashedOk||(hash<=next);
12024 }else{
12025 hashedOk=hashedOk&&(hash<=next);
12026 }if(!hashedOk){
12027 this.elementData[index]=object;
12028 this.elementData[index+1]=this.elementData[next+1];
12029 index=next;
12030 }}
12031 this.$size--;
12032 this.modCount++;
12033 this.elementData[index]=null;
12034 this.elementData[index+1]=null;
12035 return this.massageValue(result);
12036 },"~O");
12037 Clazz_overrideMethod(c$,"entrySet",
12038 function(){
12039 return new java.util.IdentityHashMap.IdentityHashMapEntrySet(this);
12040 });
12041 Clazz_overrideMethod(c$,"keySet",
12042 function(){
12043 if(this.$keySet==null){
12044 this.$keySet=((Clazz_isClassDefined("java.util.IdentityHashMap$1")?0:java.util.IdentityHashMap.$IdentityHashMap$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$1,this,null));
12045 }return this.$keySet;
12046 });
12047 Clazz_overrideMethod(c$,"values",
12048 function(){
12049 if(this.valuesCollection==null){
12050 this.valuesCollection=((Clazz_isClassDefined("java.util.IdentityHashMap$2")?0:java.util.IdentityHashMap.$IdentityHashMap$2$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$2,this,null));
12051 }return this.valuesCollection;
12052 });
12053 Clazz_overrideMethod(c$,"equals",
12054 function(object){
12055 if(this===object){
12056 return true;
12057 }if(Clazz_instanceOf(object,java.util.Map)){
12058 var map=object;
12059 if(this.size()!=map.size()){
12060 return false;
12061 }var set=this.entrySet();
12062 return set.equals(map.entrySet());
12063 }return false;
12064 },"~O");
12065 Clazz_defineMethod(c$,"clone",
12066 function(){
12067 try{
12068 return Clazz_superCall(this,java.util.IdentityHashMap,"clone",[]);
12069 }catch(e){
12070 if(Clazz_instanceOf(e,CloneNotSupportedException)){
12071 return null;
12072 }else{
12073 throw e;
12074 }
12075 }
12076 });
12077 Clazz_overrideMethod(c$,"isEmpty",
12078 function(){
12079 return this.$size==0;
12080 });
12081 Clazz_overrideMethod(c$,"size",
12082 function(){
12083 return this.$size;
12084 });
12085 Clazz_defineMethod(c$,"putAllImpl",
12086 ($fz=function(map){
12087 if(map.entrySet()!=null){
12088 Clazz_superCall(this,java.util.IdentityHashMap,"putAll",[map]);
12089 }},$fz.isPrivate=true,$fz),"java.util.Map");
12090 c$.$IdentityHashMap$1$=function(){
12091 Clazz_pu$h(self.c$);
12092 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1",java.util.AbstractSet);
12093 Clazz_overrideMethod(c$,"contains",
12094 function(object){
12095 return this.b$["java.util.IdentityHashMap"].containsKey(object);
12096 },"~O");
12097 Clazz_overrideMethod(c$,"size",
12098 function(){
12099 return this.b$["java.util.IdentityHashMap"].size();
12100 });
12101 Clazz_overrideMethod(c$,"clear",
12102 function(){
12103 this.b$["java.util.IdentityHashMap"].clear();
12104 });
12105 Clazz_overrideMethod(c$,"remove",
12106 function(key){
12107 if(this.b$["java.util.IdentityHashMap"].containsKey(key)){
12108 this.b$["java.util.IdentityHashMap"].remove(key);
12109 return true;
12110 }return false;
12111 },"~O");
12112 Clazz_overrideMethod(c$,"iterator",
12113 function(){
12114 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"]);
12115 });
12116 c$=Clazz_p0p();
12117 };
12118 c$.$IdentityHashMap$1$1$=function(){
12119 Clazz_pu$h(self.c$);
12120 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1$1",null,java.util.MapEntry.Type);
12121 Clazz_overrideMethod(c$,"get",
12122 function(entry){
12123 return entry.key;
12124 },"java.util.MapEntry");
12125 c$=Clazz_p0p();
12126 };
12127 c$.$IdentityHashMap$2$=function(){
12128 Clazz_pu$h(self.c$);
12129 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2",java.util.AbstractCollection);
12130 Clazz_overrideMethod(c$,"contains",
12131 function(object){
12132 return this.b$["java.util.IdentityHashMap"].containsValue(object);
12133 },"~O");
12134 Clazz_overrideMethod(c$,"size",
12135 function(){
12136 return this.b$["java.util.IdentityHashMap"].size();
12137 });
12138 Clazz_overrideMethod(c$,"clear",
12139 function(){
12140 this.b$["java.util.IdentityHashMap"].clear();
12141 });
12142 Clazz_overrideMethod(c$,"iterator",
12143 function(){
12144 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"]);
12145 });
12146 Clazz_overrideMethod(c$,"remove",
12147 function(object){
12148 var it=this.iterator();
12149 while(it.hasNext()){
12150 if(object===it.next()){
12151 it.remove();
12152 return true;
12153 }}
12154 return false;
12155 },"~O");
12156 c$=Clazz_p0p();
12157 };
12158 c$.$IdentityHashMap$2$1$=function(){
12159 Clazz_pu$h(self.c$);
12160 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2$1",null,java.util.MapEntry.Type);
12161 Clazz_overrideMethod(c$,"get",
12162 function(entry){
12163 return entry.value;
12164 },"java.util.MapEntry");
12165 c$=Clazz_p0p();
12166 };
12167 Clazz_pu$h(self.c$);
12168 c$=Clazz_declareType(java.util.IdentityHashMap,"IdentityHashMapEntry",java.util.MapEntry);
12169 Clazz_overrideMethod(c$,"equals",
12170 function(a){
12171 if(this===a){
12172 return true;
12173 }if(Clazz_instanceOf(a,java.util.Map.Entry)){
12174 var b=a;
12175 return(this.key===b.getKey())&&(this.value===b.getValue());
12176 }return false;
12177 },"~O");
12178 Clazz_overrideMethod(c$,"hashCode",
12179 function(){
12180 return System.identityHashCode(this.key)^System.identityHashCode(this.value);
12181 });
12182 Clazz_overrideMethod(c$,"toString",
12183 function(){
12184 return this.key+"="+this.value;
12185 });
12186 c$=Clazz_p0p();
12187 Clazz_pu$h(self.c$);
12188 c$=Clazz_decorateAsClass(function(){
12189 this.position=0;
12190 this.lastPosition=0;
12191 this.associatedMap=null;
12192 this.expectedModCount=0;
12193 this.type=null;
12194 this.canRemove=false;
12195 Clazz_instantialize(this,arguments);
12196 },java.util.IdentityHashMap,"IdentityHashMapIterator",null,java.util.Iterator);
12197 Clazz_makeConstructor(c$,
12198 function(a,b){
12199 this.associatedMap=b;
12200 this.type=a;
12201 this.expectedModCount=b.modCount;
12202 },"java.util.MapEntry.Type,java.util.IdentityHashMap");
12203 Clazz_overrideMethod(c$,"hasNext",
12204 function(){
12205 while(this.position<this.associatedMap.elementData.length){
12206 if(this.associatedMap.elementData[this.position]==null){
12207 this.position+=2;
12208 }else{
12209 return true;
12210 }}
12211 return false;
12212 });
12213 Clazz_defineMethod(c$,"checkConcurrentMod",
12214 function(){
12215 if(this.expectedModCount!=this.associatedMap.modCount){
12216 throw new java.util.ConcurrentModificationException();
12217 }});
12218 Clazz_overrideMethod(c$,"next",
12219 function(){
12220 this.checkConcurrentMod();
12221 if(!this.hasNext()){
12222 throw new java.util.NoSuchElementException();
12223 }var a=this.associatedMap.getEntry(this.position);
12224 this.lastPosition=this.position;
12225 this.position+=2;
12226 this.canRemove=true;
12227 return this.type.get(a);
12228 });
12229 Clazz_overrideMethod(c$,"remove",
12230 function(){
12231 this.checkConcurrentMod();
12232 if(!this.canRemove){
12233 throw new IllegalStateException();
12234 }this.canRemove=false;
12235 this.associatedMap.remove(this.associatedMap.elementData[this.lastPosition]);
12236 this.position=this.lastPosition;
12237 this.expectedModCount++;
12238 });
12239 c$=Clazz_p0p();
12240 Clazz_pu$h(self.c$);
12241 c$=Clazz_decorateAsClass(function(){
12242 this.associatedMap=null;
12243 Clazz_instantialize(this,arguments);
12244 },java.util.IdentityHashMap,"IdentityHashMapEntrySet",java.util.AbstractSet);
12245 Clazz_makeConstructor(c$,
12246 function(a){
12247 Clazz_superConstructor(this,java.util.IdentityHashMap.IdentityHashMapEntrySet,[]);
12248 this.associatedMap=a;
12249 },"java.util.IdentityHashMap");
12250 Clazz_defineMethod(c$,"hashMap",
12251 function(){
12252 return this.associatedMap;
12253 });
12254 Clazz_overrideMethod(c$,"size",
12255 function(){
12256 return this.associatedMap.$size;
12257 });
12258 Clazz_overrideMethod(c$,"clear",
12259 function(){
12260 this.associatedMap.clear();
12261 });
12262 Clazz_overrideMethod(c$,"remove",
12263 function(a){
12264 if(this.contains(a)){
12265 this.associatedMap.remove((a).getKey());
12266 return true;
12267 }return false;
12268 },"~O");
12269 Clazz_overrideMethod(c$,"contains",
12270 function(a){
12271 if(Clazz_instanceOf(a,java.util.Map.Entry)){
12272 var b=this.associatedMap.getEntry((a).getKey());
12273 return b!=null&&b.equals(a);
12274 }return false;
12275 },"~O");
12276 Clazz_overrideMethod(c$,"iterator",
12277 function(){
12278 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);
12279 });
12280 c$.$IdentityHashMap$IdentityHashMapEntrySet$1$=function(){
12281 Clazz_pu$h(self.c$);
12282 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$IdentityHashMapEntrySet$1",null,java.util.MapEntry.Type);
12283 Clazz_overrideMethod(c$,"get",
12284 function(a){
12285 return a;
12286 },"java.util.MapEntry");
12287 c$=Clazz_p0p();
12288 };
12289 c$=Clazz_p0p();
12290 Clazz_defineStatics(c$,
12291 "DEFAULT_MAX_SIZE",21,
12292 "loadFactor",7500);
12293 c$.NULL_OBJECT=c$.prototype.NULL_OBJECT=new Clazz._O();
12294 });
12295 Clazz_load(["java.util.AbstractSet","$.Set"],"java.util.HashSet",["java.util.HashMap"],function(){
12296 c$=Clazz_decorateAsClass(function(){
12297 this.backingMap=null;
12298 Clazz_instantialize(this,arguments);
12299 },java.util,"HashSet",java.util.AbstractSet,[java.util.Set,Cloneable,java.io.Serializable]);
12300
12301
12302 Clazz_makeConstructor(c$,
12303 function(){
12304 this.construct(new java.util.HashMap());
12305 });
12306 Clazz_makeConstructor(c$,
12307 function(capacity){
12308 this.construct(new java.util.HashMap(capacity));
12309 },"~N");
12310 Clazz_makeConstructor(c$,
12311 function(capacity,loadFactor){
12312 this.construct(new java.util.HashMap(capacity,loadFactor));
12313 },"~N,~N");
12314 Clazz_makeConstructor(c$,
12315 function(collection){
12316 this.construct(new java.util.HashMap(collection.size()<6?11:collection.size()*2));
12317 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
12318 this.add(e);
12319 }
12320 },"java.util.Collection");
12321 Clazz_makeConstructor(c$,
12322 function(backingMap){
12323 Clazz_superConstructor(this,java.util.HashSet,[]);
12324 this.backingMap=backingMap;
12325 },"java.util.HashMap");
12326
12327 Clazz_overrideMethod(c$,"add",
12328 function(object){
12329 return this.backingMap.put(object,this)==null;
12330 },"~O");
12331 Clazz_overrideMethod(c$,"clear",
12332 function(){
12333 this.backingMap.clear();
12334 });
12335 Clazz_defineMethod(c$,"clone",
12336 function(){
12337 try{
12338 var clone=this.cloneHM();
12339 clone.backingMap=this.backingMap.clone();
12340 return clone;
12341 }catch(e){
12342 if(Clazz_instanceOf(e,CloneNotSupportedException)){
12343 return null;
12344 }else{
12345 throw e;
12346 }
12347 }
12348 });
12349 Clazz_overrideMethod(c$,"contains",
12350 function(object){
12351 return this.backingMap.containsKey(object);
12352 },"~O");
12353 Clazz_overrideMethod(c$,"isEmpty",
12354 function(){
12355 return this.backingMap.isEmpty();
12356 });
12357 Clazz_defineMethod(c$,"iterator",
12358 function(){
12359 return this.backingMap.keySet().iterator();
12360 });
12361 Clazz_overrideMethod(c$,"remove",
12362 function(object){
12363 return this.backingMap.remove(object)!=null;
12364 },"~O");
12365 Clazz_overrideMethod(c$,"size",
12366 function(){
12367 return this.backingMap.size();
12368 });
12369 Clazz_defineMethod(c$,"createBackingMap",
12370 function(capacity,loadFactor){
12371 return new java.util.HashMap(capacity,loadFactor);
12372 },"~N,~N");
12373 });
12374 Clazz_declarePackage ("jssun.awt");
12375 Clazz_declareInterface (jssun.awt, "ComponentFactory");
12376 Clazz_declarePackage ("jssun.awt");
12377 Clazz_declareInterface (jssun.awt, "WindowClosingListener");
12378 Clazz_declarePackage ("jssun.awt");
12379 Clazz_declareInterface (jssun.awt, "WindowClosingSupport");
12380 Clazz_declarePackage ("java.awt");
12381 Clazz_load (["java.awt.Container", "java.util.ArrayList", "$.Vector", "java.awt.Color"], ["java.awt.Window", "$.FocusManager"], ["java.lang.IllegalArgumentException", "java.util.Arrays", "java.applet.Applet", "java.awt.AWTEventMulticaster", "$.BorderLayout", "$.ComponentOrientation", "$.Cursor", "$.GraphicsEnvironment", "$.Point", "$.Toolkit", "java.awt.event.WindowEvent", "$.WindowFocusListener", "$.WindowListener", "$.WindowStateListener", "java.util.Locale", "$.ResourceBundle", "javax.swing.JComponent", "$.RootPaneContainer", "jssun.awt.AppContext", "swingjs.JSToolkit"], function () {
12382 c$ = Clazz_decorateAsClass (function () {
12383 this.warningString = null;
12384 this.icons = null;
12385 this.temporaryLostComponent = null;
12386 this.syncLWRequests = false;
12387 this.beforeFirstShow = true;
12388 this.state = 0;
12389 this.alwaysOnTop = false;
12390 this.ownedWindowList = null;
12391 this.showWithParent = false;
12392 this.modalBlocker = null;
12393 this.modalExclusionType = null;
12394 this.windowListener = null;
12395 this.windowStateListener = null;
12396 this.windowFocusListener = null;
12397 this.focusableWindowState = true;
12398 this.isInShow = false;
12399 this.opacity = 1.0;
12400 this.shape = null;
12401 this.isTrayIconWindow = false;
12402 this.opaque = true;
12403 Clazz_instantialize (this, arguments);
12404 }, java.awt, "Window", java.awt.Container);
12405 Clazz_prepareFields (c$, function () {
12406 this.ownedWindowList =  new java.util.Vector ();
12407 });
12408 Clazz_makeConstructor (c$, 
12409 function (gc) {
12410 Clazz_superConstructor (this, java.awt.Window, []);
12411 this.init (gc);
12412 }, "java.awt.GraphicsConfiguration");
12413 Clazz_defineMethod (c$, "init", 
12414  function (gc) {
12415 this.syncLWRequests = java.awt.Window.systemSyncLWRequests;
12416 this.addToWindowList ();
12417 this.cursor = java.awt.Cursor.getPredefinedCursor (0);
12418 this.visible = false;
12419 this.setLayout ( new java.awt.BorderLayout ());
12420 this.modalExclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12421 }, "java.awt.GraphicsConfiguration");
12422 Clazz_makeConstructor (c$, 
12423 function () {
12424 Clazz_superConstructor (this, java.awt.Window, []);
12425 this.init (null);
12426 });
12427 Clazz_makeConstructor (c$, 
12428 function (owner) {
12429 Clazz_superConstructor (this, java.awt.Window, []);
12430 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12431 this.ownedInit (owner);
12432 }, "java.awt.Frame");
12433 Clazz_makeConstructor (c$, 
12434 function (owner) {
12435 Clazz_superConstructor (this, java.awt.Window, []);
12436 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12437 this.ownedInit (owner);
12438 }, "java.awt.Window");
12439 Clazz_makeConstructor (c$, 
12440 function (owner, gc) {
12441 this.construct (gc);
12442 this.ownedInit (owner);
12443 }, "java.awt.Window,java.awt.GraphicsConfiguration");
12444 Clazz_defineMethod (c$, "ownedInit", 
12445  function (owner) {
12446 this.parent = owner;
12447 if (owner != null) {
12448 owner.addOwnedWindow (this);
12449 }}, "java.awt.Window");
12450 Clazz_overrideMethod (c$, "constructComponentName", 
12451 function () {
12452 {
12453 return "win" + java.awt.Window.nameCounter++;
12454 }});
12455 Clazz_defineMethod (c$, "getIconImages", 
12456 function () {
12457 var icons = this.icons;
12458 if (icons == null || icons.size () == 0) {
12459 return  new java.util.ArrayList ();
12460 }return  new java.util.ArrayList (icons);
12461 });
12462 Clazz_defineMethod (c$, "setIconImages", 
12463 function (icons) {
12464 this.icons = (icons == null) ?  new java.util.ArrayList () :  new java.util.ArrayList (icons);
12465 this.firePropertyChangeObject ("iconImage", null, null);
12466 }, "java.util.List");
12467 Clazz_defineMethod (c$, "setIconImage", 
12468 function (image) {
12469 var imageList =  new java.util.ArrayList ();
12470 if (image != null) {
12471 imageList.add (image);
12472 }this.setIconImages (imageList);
12473 }, "java.awt.Image");
12474 Clazz_defineMethod (c$, "addNotify", 
12475 function () {
12476 var parent = this.parent;
12477 if (parent != null && parent.getPeer () == null) {
12478 parent.addNotify ();
12479 }if (this.peer == null) {
12480 this.peer = this.getToolkit ().createWindow (this);
12481 }{
12482 java.awt.Window.allWindows.add (this);
12483 }Clazz_superCall (this, java.awt.Window, "addNotify", []);
12484 });
12485 Clazz_defineMethod (c$, "removeNotify", 
12486 function () {
12487 {
12488 java.awt.Window.allWindows.remove (this);
12489 }Clazz_superCall (this, java.awt.Window, "removeNotify", []);
12490 });
12491 Clazz_defineMethod (c$, "pack", 
12492 function () {
12493 var parent = this.parent;
12494 if (parent != null && parent.getPeer () == null) {
12495 parent.addNotify ();
12496 }if (this.peer == null) {
12497 this.addNotify ();
12498 }var newSize = this.getPreferredSize ();
12499 if (this.peer != null) {
12500 this.setClientSize (newSize.width, newSize.height);
12501 }if (this.beforeFirstShow) {
12502 this.isPacked = true;
12503 }this.validate ();
12504 });
12505 Clazz_defineMethod (c$, "setMinimumSize", 
12506 function (minimumSize) {
12507 {
12508 Clazz_superCall (this, java.awt.Window, "setMinimumSize", [minimumSize]);
12509 var size = this.getSize ();
12510 if (this.isMinimumSizeSet ()) {
12511 if (size.width < minimumSize.width || size.height < minimumSize.height) {
12512 var nw = Math.max (this.width, minimumSize.width);
12513 var nh = Math.max (this.height, minimumSize.height);
12514 this.setSize (nw, nh);
12515 }}}}, "java.awt.Dimension");
12516 Clazz_defineMethod (c$, "reshape", 
12517 function (x, y, width, height) {
12518 if (this.isMinimumSizeSet ()) {
12519 var minSize = this.getMinimumSize ();
12520 if (width < minSize.width) {
12521 width = minSize.width;
12522 }if (height < minSize.height) {
12523 height = minSize.height;
12524 }}Clazz_superCall (this, java.awt.Window, "reshape", [x, y, width, height]);
12525 }, "~N,~N,~N,~N");
12526 Clazz_defineMethod (c$, "setClientSize", 
12527 function (w, h) {
12528 {
12529 this.setBounds (this.x, this.y, w, h);
12530 }}, "~N,~N");
12531 c$.closeSplashScreen = Clazz_defineMethod (c$, "closeSplashScreen", 
12532 function () {
12533 });
12534 Clazz_defineMethod (c$, "show", 
12535 function () {
12536 this.validate ();
12537 this.isInShow = true;
12538 if (this.visible) {
12539 this.toFront ();
12540 } else {
12541 this.beforeFirstShow = false;
12542 java.awt.Window.closeSplashScreen ();
12543 Clazz_superCall (this, java.awt.Window, "show", []);
12544 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12545 var child = this.ownedWindowList.elementAt (i);
12546 if ((child != null) && child.showWithParent) {
12547 child.show ();
12548 child.showWithParent = false;
12549 }}
12550 if (!this.isModalBlocked ()) {
12551 this.updateChildrenBlocking ();
12552 } else {
12553 this.modalBlocker.toFront_NoClientCode ();
12554 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
12555 java.awt.Window.updateChildFocusableWindowState (this);
12556 }}this.isInShow = false;
12557 if ((this.state & 1) == 0) {
12558 this.postWindowEvent (200);
12559 this.state |= 1;
12560 }});
12561 c$.updateChildFocusableWindowState = Clazz_defineMethod (c$, "updateChildFocusableWindowState", 
12562 function (w) {
12563 for (var i = 0; i < w.ownedWindowList.size (); i++) {
12564 var child = w.ownedWindowList.elementAt (i);
12565 if (child != null) {
12566 java.awt.Window.updateChildFocusableWindowState (child);
12567 }}
12568 }, "java.awt.Window");
12569 Clazz_defineMethod (c$, "postWindowEvent", 
12570 function (id) {
12571 if (this.windowListener != null || (this.eventMask & 64) != 0 || java.awt.Toolkit.enabledOnToolkit (64)) {
12572 var e =  new java.awt.event.WindowEvent (this, id);
12573 java.awt.Toolkit.getEventQueue ().postEvent (e);
12574 }}, "~N");
12575 Clazz_defineMethod (c$, "hide", 
12576 function () {
12577 {
12578 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12579 var child = this.ownedWindowList.elementAt (i);
12580 if ((child != null) && child.visible) {
12581 child.hide ();
12582 child.showWithParent = true;
12583 }}
12584 }Clazz_superCall (this, java.awt.Window, "hide", []);
12585 });
12586 Clazz_overrideMethod (c$, "clearMostRecentFocusOwnerOnHide", 
12587 function () {
12588 });
12589 Clazz_defineMethod (c$, "dispose", 
12590 function () {
12591 this.doDispose ();
12592 });
12593 Clazz_defineMethod (c$, "disposeImpl", 
12594 function () {
12595 this.dispose ();
12596 });
12597 Clazz_defineMethod (c$, "doDispose", 
12598 function () {
12599 if (!Clazz_isClassDefined ("java.awt.Window$1DisposeAction")) {
12600 java.awt.Window.$Window$1DisposeAction$ ();
12601 }
12602 var action = Clazz_innerTypeInstance (java.awt.Window$1DisposeAction, this, null);
12603 action.run ();
12604 this.postWindowEvent (202);
12605 });
12606 Clazz_overrideMethod (c$, "adjustListeningChildrenOnParent", 
12607 function (mask, num) {
12608 }, "~N,~N");
12609 Clazz_overrideMethod (c$, "adjustDecendantsOnParent", 
12610 function (num) {
12611 }, "~N");
12612 Clazz_defineMethod (c$, "toFront", 
12613 function () {
12614 this.toFront_NoClientCode ();
12615 });
12616 Clazz_defineMethod (c$, "toFront_NoClientCode", 
12617 function () {
12618 if (this.visible) {
12619 }});
12620 Clazz_defineMethod (c$, "toBack", 
12621 function () {
12622 this.toBack_NoClientCode ();
12623 });
12624 Clazz_defineMethod (c$, "toBack_NoClientCode", 
12625 function () {
12626 if (this.isAlwaysOnTop ()) {
12627 try {
12628 this.setAlwaysOnTop (false);
12629 } catch (e) {
12630 if (Clazz_exceptionOf (e, SecurityException)) {
12631 } else {
12632 throw e;
12633 }
12634 }
12635 }if (this.visible) {
12636 }});
12637 Clazz_overrideMethod (c$, "getToolkit", 
12638 function () {
12639 return java.awt.Toolkit.getDefaultToolkit ();
12640 });
12641 Clazz_defineMethod (c$, "getWarningString", 
12642 function () {
12643 return this.warningString;
12644 });
12645 Clazz_overrideMethod (c$, "getLocale", 
12646 function () {
12647 if (this.locale == null) {
12648 return java.util.Locale.getDefault ();
12649 }return this.locale;
12650 });
12651 Clazz_defineMethod (c$, "setCursor", 
12652 function (cursor) {
12653 if (cursor == null) {
12654 cursor = java.awt.Cursor.getPredefinedCursor (0);
12655 }Clazz_superCall (this, java.awt.Window, "setCursor", [cursor]);
12656 }, "java.awt.Cursor");
12657 Clazz_defineMethod (c$, "getOwner", 
12658 function () {
12659 return this.getOwner_NoClientCode ();
12660 });
12661 Clazz_defineMethod (c$, "getOwner_NoClientCode", 
12662 function () {
12663 return this.parent;
12664 });
12665 Clazz_defineMethod (c$, "getOwnedWindows", 
12666 function () {
12667 return this.getOwnedWindows_NoClientCode ();
12668 });
12669 Clazz_defineMethod (c$, "getOwnedWindows_NoClientCode", 
12670 function () {
12671 var realCopy;
12672 {
12673 var fullSize = this.ownedWindowList.size ();
12674 var realSize = 0;
12675 var fullCopy =  new Array (fullSize);
12676 for (var i = 0; i < fullSize; i++) {
12677 fullCopy[realSize] = this.ownedWindowList.elementAt (i);
12678 if (fullCopy[realSize] != null) {
12679 realSize++;
12680 }}
12681 if (fullSize != realSize) {
12682 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12683 } else {
12684 realCopy = fullCopy;
12685 }}return realCopy;
12686 });
12687 Clazz_defineMethod (c$, "isModalBlocked", 
12688 function () {
12689 return this.modalBlocker != null;
12690 });
12691 Clazz_defineMethod (c$, "setModalBlocked", 
12692 function (blocker, blocked, peerCall) {
12693 }, "java.awt.Dialog,~B,~B");
12694 Clazz_defineMethod (c$, "getModalBlocker", 
12695 function () {
12696 return this.modalBlocker;
12697 });
12698 c$.getAllWindows = Clazz_defineMethod (c$, "getAllWindows", 
12699 function () {
12700 {
12701 var v =  new java.util.ArrayList ();
12702 v.addAll (java.awt.Window.allWindows);
12703 return v;
12704 }});
12705 c$.getAllUnblockedWindows = Clazz_defineMethod (c$, "getAllUnblockedWindows", 
12706 function () {
12707 {
12708 var unblocked =  new java.util.ArrayList ();
12709 for (var i = 0; i < java.awt.Window.allWindows.size (); i++) {
12710 var w = java.awt.Window.allWindows.get (i);
12711 if (!w.isModalBlocked ()) {
12712 unblocked.add (w);
12713 }}
12714 return unblocked;
12715 }});
12716 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12717  function (appContext) {
12718 {
12719 var realCopy;
12720 var windowList = appContext.get (java.awt.Window);
12721 if (windowList != null) {
12722 var fullSize = windowList.size ();
12723 var realSize = 0;
12724 var fullCopy =  new Array (fullSize);
12725 for (var i = 0; i < fullSize; i++) {
12726 var w = windowList.get (i);
12727 if (w != null) {
12728 fullCopy[realSize++] = w;
12729 }}
12730 if (fullSize != realSize) {
12731 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12732 } else {
12733 realCopy = fullCopy;
12734 }} else {
12735 realCopy =  new Array (0);
12736 }return realCopy;
12737 }}, "jssun.awt.AppContext");
12738 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12739 function () {
12740 return java.awt.Window.getWindows (jssun.awt.AppContext.getAppContext ());
12741 });
12742 c$.getOwnerlessWindows = Clazz_defineMethod (c$, "getOwnerlessWindows", 
12743 function () {
12744 var allWindows = java.awt.Window.getWindows ();
12745 var ownerlessCount = 0;
12746 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12747 if (w.getOwner () == null) {
12748 ownerlessCount++;
12749 }}
12750 var ownerless =  new Array (ownerlessCount);
12751 var c = 0;
12752 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12753 if (w.getOwner () == null) {
12754 ownerless[c++] = w;
12755 }}
12756 return ownerless;
12757 });
12758 Clazz_defineMethod (c$, "getDocumentRoot", 
12759 function () {
12760 {
12761 var w = this;
12762 while (w.getOwner () != null) {
12763 w = w.getOwner ();
12764 }
12765 return w;
12766 }});
12767 Clazz_defineMethod (c$, "setModalExclusionType", 
12768 function (exclusionType) {
12769 if (exclusionType == null) {
12770 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12771 }if (!java.awt.Toolkit.getDefaultToolkit ().isModalExclusionTypeSupported (exclusionType)) {
12772 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12773 }if (this.modalExclusionType === exclusionType) {
12774 return;
12775 }this.modalExclusionType = exclusionType;
12776 }, "java.awt.Dialog.ModalExclusionType");
12777 Clazz_defineMethod (c$, "getModalExclusionType", 
12778 function () {
12779 return this.modalExclusionType;
12780 });
12781 Clazz_defineMethod (c$, "isModalExcluded", 
12782 function (exclusionType) {
12783 if ((this.modalExclusionType != null) && this.modalExclusionType.compareTo (exclusionType) >= 0) {
12784 return true;
12785 }var owner = this.getOwner_NoClientCode ();
12786 return (owner != null) && owner.isModalExcluded (exclusionType);
12787 }, "java.awt.Dialog.ModalExclusionType");
12788 Clazz_defineMethod (c$, "updateChildrenBlocking", 
12789 function () {
12790 });
12791 Clazz_defineMethod (c$, "addWindowListener", 
12792 function (l) {
12793 if (l == null) {
12794 return;
12795 }this.newEventsOnly = true;
12796 this.windowListener = java.awt.AWTEventMulticaster.add (this.windowListener, l);
12797 }, "java.awt.event.WindowListener");
12798 Clazz_defineMethod (c$, "addWindowStateListener", 
12799 function (l) {
12800 if (l == null) {
12801 return;
12802 }this.windowStateListener = java.awt.AWTEventMulticaster.add (this.windowStateListener, l);
12803 this.newEventsOnly = true;
12804 }, "java.awt.event.WindowStateListener");
12805 Clazz_defineMethod (c$, "addWindowFocusListener", 
12806 function (l) {
12807 if (l == null) {
12808 return;
12809 }this.windowFocusListener = java.awt.AWTEventMulticaster.add (this.windowFocusListener, l);
12810 this.newEventsOnly = true;
12811 }, "java.awt.event.WindowFocusListener");
12812 Clazz_defineMethod (c$, "removeWindowListener", 
12813 function (l) {
12814 if (l == null) {
12815 return;
12816 }this.windowListener = java.awt.AWTEventMulticaster.remove (this.windowListener, l);
12817 }, "java.awt.event.WindowListener");
12818 Clazz_defineMethod (c$, "removeWindowStateListener", 
12819 function (l) {
12820 if (l == null) {
12821 return;
12822 }this.windowStateListener = java.awt.AWTEventMulticaster.remove (this.windowStateListener, l);
12823 }, "java.awt.event.WindowStateListener");
12824 Clazz_defineMethod (c$, "removeWindowFocusListener", 
12825 function (l) {
12826 if (l == null) {
12827 return;
12828 }this.windowFocusListener = java.awt.AWTEventMulticaster.remove (this.windowFocusListener, l);
12829 }, "java.awt.event.WindowFocusListener");
12830 Clazz_defineMethod (c$, "getWindowListeners", 
12831 function () {
12832 return (this.getListeners (java.awt.event.WindowListener));
12833 });
12834 Clazz_defineMethod (c$, "getWindowFocusListeners", 
12835 function () {
12836 return (this.getListeners (java.awt.event.WindowFocusListener));
12837 });
12838 Clazz_defineMethod (c$, "getWindowStateListeners", 
12839 function () {
12840 return (this.getListeners (java.awt.event.WindowStateListener));
12841 });
12842 Clazz_defineMethod (c$, "getListeners", 
12843 function (listenerType) {
12844 var l = null;
12845 if (listenerType === java.awt.event.WindowFocusListener) {
12846 l = this.windowFocusListener;
12847 } else if (listenerType === java.awt.event.WindowStateListener) {
12848 l = this.windowStateListener;
12849 } else if (listenerType === java.awt.event.WindowListener) {
12850 l = this.windowListener;
12851 } else {
12852 return Clazz_superCall (this, java.awt.Window, "getListeners", [listenerType]);
12853 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
12854 }, "Class");
12855 Clazz_defineMethod (c$, "eventEnabled", 
12856 function (e) {
12857 switch (e.id) {
12858 case 200:
12859 case 201:
12860 case 202:
12861 case 203:
12862 case 204:
12863 case 205:
12864 case 206:
12865 if ((this.eventMask & 64) != 0 || this.windowListener != null) {
12866 return true;
12867 }return false;
12868 case 207:
12869 case 208:
12870 if ((this.eventMask & 524288) != 0 || this.windowFocusListener != null) {
12871 return true;
12872 }return false;
12873 case 209:
12874 if ((this.eventMask & 262144) != 0 || this.windowStateListener != null) {
12875 return true;
12876 }return false;
12877 default:
12878 break;
12879 }
12880 return Clazz_superCall (this, java.awt.Window, "eventEnabled", [e]);
12881 }, "java.awt.AWTEvent");
12882 Clazz_overrideMethod (c$, "processEvent", 
12883 function (e) {
12884 if (Clazz_instanceOf (e, java.awt.event.WindowEvent)) {
12885 switch (e.getID ()) {
12886 case 200:
12887 case 201:
12888 case 202:
12889 case 203:
12890 case 204:
12891 case 205:
12892 case 206:
12893 this.processWindowEvent (e);
12894 break;
12895 case 207:
12896 case 208:
12897 this.processWindowFocusEvent (e);
12898 break;
12899 case 209:
12900 this.processWindowStateEvent (e);
12901 default:
12902 break;
12903 }
12904 return;
12905 }this.processEventCont (e);
12906 }, "java.awt.AWTEvent");
12907 Clazz_defineMethod (c$, "processWindowEvent", 
12908 function (e) {
12909 var listener = this.windowListener;
12910 if (listener != null) {
12911 switch (e.getID ()) {
12912 case 200:
12913 listener.windowOpened (e);
12914 break;
12915 case 201:
12916 listener.windowClosing (e);
12917 break;
12918 case 202:
12919 listener.windowClosed (e);
12920 break;
12921 case 203:
12922 listener.windowIconified (e);
12923 break;
12924 case 204:
12925 listener.windowDeiconified (e);
12926 break;
12927 case 205:
12928 listener.windowActivated (e);
12929 break;
12930 case 206:
12931 listener.windowDeactivated (e);
12932 break;
12933 default:
12934 break;
12935 }
12936 }}, "java.awt.event.WindowEvent");
12937 Clazz_defineMethod (c$, "processWindowFocusEvent", 
12938 function (e) {
12939 var listener = this.windowFocusListener;
12940 if (listener != null) {
12941 switch (e.getID ()) {
12942 case 207:
12943 listener.windowGainedFocus (e);
12944 break;
12945 case 208:
12946 listener.windowLostFocus (e);
12947 break;
12948 default:
12949 break;
12950 }
12951 }}, "java.awt.event.WindowEvent");
12952 Clazz_defineMethod (c$, "processWindowStateEvent", 
12953 function (e) {
12954 var listener = this.windowStateListener;
12955 if (listener != null) {
12956 switch (e.getID ()) {
12957 case 209:
12958 listener.windowStateChanged (e);
12959 break;
12960 default:
12961 break;
12962 }
12963 }}, "java.awt.event.WindowEvent");
12964 Clazz_overrideMethod (c$, "preProcessKeyEvent", 
12965 function (e) {
12966 }, "java.awt.event.KeyEvent");
12967 Clazz_overrideMethod (c$, "postProcessKeyEvent", 
12968 function (e) {
12969 }, "java.awt.event.KeyEvent");
12970 Clazz_defineMethod (c$, "setAlwaysOnTop", 
12971 function (alwaysOnTop) {
12972 var oldAlwaysOnTop;
12973 {
12974 oldAlwaysOnTop = this.alwaysOnTop;
12975 this.alwaysOnTop = alwaysOnTop;
12976 }if (oldAlwaysOnTop != alwaysOnTop) {
12977 if (this.isAlwaysOnTopSupported ()) {
12978 }this.firePropertyChangeBool ("alwaysOnTop", oldAlwaysOnTop, alwaysOnTop);
12979 }}, "~B");
12980 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
12981 function () {
12982 return java.awt.Toolkit.getDefaultToolkit ().isAlwaysOnTopSupported ();
12983 });
12984 Clazz_defineMethod (c$, "isAlwaysOnTop", 
12985 function () {
12986 return this.alwaysOnTop;
12987 });
12988 Clazz_defineMethod (c$, "isActive", 
12989 function () {
12990 return false;
12991 });
12992 Clazz_defineMethod (c$, "isFocused", 
12993 function () {
12994 return swingjs.JSToolkit.isFocused (this);
12995 });
12996 Clazz_overrideMethod (c$, "getFocusTraversalKeys", 
12997 function (id) {
12998 return null;
12999 }, "~N");
13000 Clazz_defineMethod (c$, "setFocusCycleRoot", 
13001 function (focusCycleRoot) {
13002 }, "~B");
13003 Clazz_defineMethod (c$, "isFocusCycleRoot", 
13004 function () {
13005 return true;
13006 });
13007 Clazz_overrideMethod (c$, "getFocusCycleRootAncestor", 
13008 function () {
13009 return null;
13010 });
13011 Clazz_defineMethod (c$, "isFocusableWindow", 
13012 function () {
13013 if (!this.getFocusableWindowState ()) {
13014 return false;
13015 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
13016 return true;
13017 }for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
13018 if (Clazz_instanceOf (owner, java.awt.Frame) || Clazz_instanceOf (owner, java.awt.Dialog)) {
13019 return owner.isShowing ();
13020 }}
13021 return false;
13022 });
13023 Clazz_defineMethod (c$, "getFocusableWindowState", 
13024 function () {
13025 return this.focusableWindowState;
13026 });
13027 Clazz_defineMethod (c$, "setFocusableWindowState", 
13028 function (focusableWindowState) {
13029 var oldFocusableWindowState;
13030 {
13031 oldFocusableWindowState = this.focusableWindowState;
13032 this.focusableWindowState = focusableWindowState;
13033 }this.firePropertyChangeBool ("focusableWindowState", oldFocusableWindowState, focusableWindowState);
13034 if (oldFocusableWindowState && !focusableWindowState && this.isFocused ()) {
13035 for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
13036 }
13037 }}, "~B");
13038 Clazz_defineMethod (c$, "dispatchEventImpl", 
13039 function (e) {
13040 if (e.getID () == 101) {
13041 this.invalidate ();
13042 this.validate ();
13043 }Clazz_superCall (this, java.awt.Window, "dispatchEventImpl", [e]);
13044 }, "java.awt.AWTEvent");
13045 Clazz_overrideMethod (c$, "postEvent", 
13046 function (e) {
13047 if (this.handleEvent (e)) {
13048 e.consume ();
13049 return true;
13050 }return false;
13051 }, "java.awt.Event");
13052 Clazz_defineMethod (c$, "isShowing", 
13053 function () {
13054 return this.visible;
13055 });
13056 Clazz_defineMethod (c$, "applyResourceBundle", 
13057 function (rb) {
13058 this.applyComponentOrientation (java.awt.ComponentOrientation.getOrientation (rb));
13059 }, "java.util.ResourceBundle");
13060 Clazz_defineMethod (c$, "applyResourceBundle", 
13061 function (rbName) {
13062 this.applyResourceBundle (java.util.ResourceBundle.getBundle (rbName));
13063 }, "~S");
13064 Clazz_defineMethod (c$, "addOwnedWindow", 
13065 function (weakWindow) {
13066 if (weakWindow != null) {
13067 {
13068 if (!this.ownedWindowList.contains (weakWindow)) {
13069 this.ownedWindowList.addElement (weakWindow);
13070 }}}}, "java.awt.Window");
13071 Clazz_defineMethod (c$, "removeOwnedWindow", 
13072 function (weakWindow) {
13073 if (weakWindow != null) {
13074 this.ownedWindowList.removeElement (weakWindow);
13075 }}, "java.awt.Window");
13076 Clazz_defineMethod (c$, "connectOwnedWindow", 
13077 function (child) {
13078 child.parent = this;
13079 this.addOwnedWindow (child);
13080 }, "java.awt.Window");
13081 Clazz_defineMethod (c$, "addToWindowList", 
13082  function () {
13083 var windowList = this.appContext.get (java.awt.Window);
13084 if (windowList == null) {
13085 windowList =  new java.util.Vector ();
13086 this.appContext.put (java.awt.Window, windowList);
13087 }windowList.add (this);
13088 });
13089 c$.removeFromWindowList = Clazz_defineMethod (c$, "removeFromWindowList", 
13090  function (context, w) {
13091 {
13092 var windowList = context.get (java.awt.Window);
13093 if (windowList != null) {
13094 windowList.remove (w);
13095 }}}, "jssun.awt.AppContext,java.awt.Window");
13096 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
13097 function () {
13098 if (this.graphicsConfig == null) this.graphicsConfig = swingjs.JSToolkit.getGraphicsConfiguration ();
13099 return this.graphicsConfig;
13100 });
13101 Clazz_overrideMethod (c$, "resetGC", 
13102 function () {
13103 });
13104 Clazz_defineMethod (c$, "setLocationRelativeTo", 
13105 function (c) {
13106 var root = null;
13107 if (c != null) {
13108 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) {
13109 root = c;
13110 } else {
13111 var parent;
13112 for (parent = c.getParent (); parent != null; parent = parent.getParent ()) {
13113 if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
13114 root = parent;
13115 break;
13116 }}
13117 }}if ((c != null && !c.isShowing ()) || root == null || !root.isShowing ()) {
13118 var paneSize = this.getSize ();
13119 var centerPoint = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getCenterPoint ();
13120 this.setLocation (centerPoint.x - Clazz_doubleToInt (paneSize.width / 2), centerPoint.y - Clazz_doubleToInt (paneSize.height / 2));
13121 } else {
13122 var invokerSize = c.getSize ();
13123 var invokerScreenLocation = c.getLocationOnScreen ();
13124 var windowBounds = this.getBounds ();
13125 var dx = invokerScreenLocation.x + ((invokerSize.width - windowBounds.width) >> 1);
13126 var dy = invokerScreenLocation.y + ((invokerSize.height - windowBounds.height) >> 1);
13127 var ss = root.getGraphicsConfiguration ().getBounds ();
13128 if (dy + windowBounds.height > ss.y + ss.height) {
13129 dy = ss.y + ss.height - windowBounds.height;
13130 if (invokerScreenLocation.x - ss.x + Clazz_doubleToInt (invokerSize.width / 2) < Clazz_doubleToInt (ss.width / 2)) {
13131 dx = invokerScreenLocation.x + invokerSize.width;
13132 } else {
13133 dx = invokerScreenLocation.x - windowBounds.width;
13134 }}if (dx + windowBounds.width > ss.x + ss.width) {
13135 dx = ss.x + ss.width - windowBounds.width;
13136 }if (dx < ss.x) dx = ss.x;
13137 if (dy < ss.y) dy = ss.y;
13138 this.setLocation (dx, dy);
13139 }}, "java.awt.Component");
13140 Clazz_defineMethod (c$, "deliverMouseWheelToAncestor", 
13141 function (e) {
13142 }, "java.awt.event.MouseWheelEvent");
13143 Clazz_overrideMethod (c$, "dispatchMouseWheelToAncestor", 
13144 function (e) {
13145 return false;
13146 }, "java.awt.event.MouseWheelEvent");
13147 Clazz_defineMethod (c$, "getTemporaryLostComponent", 
13148 function () {
13149 return this.temporaryLostComponent;
13150 });
13151 Clazz_defineMethod (c$, "setTemporaryLostComponent", 
13152 function (component) {
13153 var previousComp = this.temporaryLostComponent;
13154 if (component == null || component.canBeFocusOwner ()) {
13155 this.temporaryLostComponent = component;
13156 } else {
13157 this.temporaryLostComponent = null;
13158 }return previousComp;
13159 }, "java.awt.Component");
13160 Clazz_defineMethod (c$, "canContainFocusOwner", 
13161 function (focusOwnerCandidate) {
13162 return Clazz_superCall (this, java.awt.Window, "canContainFocusOwner", [focusOwnerCandidate]) && this.isFocusableWindow ();
13163 }, "java.awt.Component");
13164 Clazz_defineMethod (c$, "setBounds", 
13165 function (r) {
13166 this.setBounds (r.x, r.y, r.width, r.height);
13167 }, "java.awt.Rectangle");
13168 Clazz_overrideMethod (c$, "isRecursivelyVisible", 
13169 function () {
13170 return this.visible;
13171 });
13172 Clazz_defineMethod (c$, "getOpacity", 
13173 function () {
13174 {
13175 return this.opacity;
13176 }});
13177 Clazz_defineMethod (c$, "setOpacity", 
13178 function (opacity) {
13179 {
13180 if (opacity < 0.0 || opacity > 1.0) {
13181 throw  new IllegalArgumentException ("The value of opacity should be in the range [0.0f .. 1.0f].");
13182 }this.opacity = opacity;
13183 }}, "~N");
13184 Clazz_defineMethod (c$, "getShape", 
13185 function () {
13186 {
13187 return this.shape;
13188 }});
13189 Clazz_defineMethod (c$, "setShape", 
13190 function (shape) {
13191 {
13192 this.shape = shape;
13193 }}, "java.awt.Shape");
13194 Clazz_defineMethod (c$, "setOpaque", 
13195 function (opaque) {
13196 {
13197 java.awt.Window.setLayersOpaque (this, opaque);
13198 this.opaque = opaque;
13199 var peer = this.getPeer ();
13200 if (peer != null) {
13201 peer.setOpaque (opaque);
13202 }}}, "~B");
13203 c$.setLayersOpaque = Clazz_defineMethod (c$, "setLayersOpaque", 
13204  function (component, isOpaque) {
13205 if (Clazz_instanceOf (component, javax.swing.RootPaneContainer)) {
13206 var rpc = component;
13207 var root = rpc.getRootPane ();
13208 var lp = root.getLayeredPane ();
13209 var c = root.getContentPane ();
13210 var content = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
13211 lp.setOpaque (isOpaque);
13212 root.setOpaque (isOpaque);
13213 root.setDoubleBuffered (isOpaque);
13214 if (content != null) {
13215 content.setOpaque (isOpaque);
13216 content.setDoubleBuffered (isOpaque);
13217 var numChildren = content.getComponentCount ();
13218 if (numChildren > 0) {
13219 var child = content.getComponent (0);
13220 if (Clazz_instanceOf (child, javax.swing.RootPaneContainer)) {
13221 java.awt.Window.setLayersOpaque (child, isOpaque);
13222 }}}}var bg = component.getBackground ();
13223 var hasTransparentBg = java.awt.Window.TRANSPARENT_BACKGROUND_COLOR.equals (bg);
13224 var container = null;
13225 if (Clazz_instanceOf (component, java.awt.Container)) {
13226 container = component;
13227 }if (isOpaque) {
13228 if (hasTransparentBg) {
13229 var newColor = null;
13230 if (container != null && container.preserveBackgroundColor != null) {
13231 newColor = container.preserveBackgroundColor;
13232 } else {
13233 newColor =  new java.awt.Color (255, 255, 255);
13234 }component.setBackground (newColor);
13235 }} else {
13236 if (!hasTransparentBg && container != null) {
13237 container.preserveBackgroundColor = bg;
13238 }component.setBackground (java.awt.Window.TRANSPARENT_BACKGROUND_COLOR);
13239 }}, "java.awt.Component,~B");
13240 Clazz_overrideMethod (c$, "getContainer", 
13241 function () {
13242 return null;
13243 });
13244 Clazz_overrideMethod (c$, "mixOnReshaping", 
13245 function () {
13246 });
13247 Clazz_overrideMethod (c$, "getLocationOnWindow", 
13248 function () {
13249 return  new java.awt.Point (0, 0);
13250 });
13251 c$.$Window$1DisposeAction$ = function () {
13252 Clazz_pu$h(self.c$);
13253 c$ = Clazz_decorateAsClass (function () {
13254 Clazz_prepareCallback (this, arguments);
13255 Clazz_instantialize (this, arguments);
13256 }, java.awt, "Window$1DisposeAction", null, Runnable);
13257 Clazz_overrideMethod (c$, "run", 
13258 function () {
13259 var a;
13260 {
13261 a =  new Array (this.b$["java.awt.Window"].ownedWindowList.size ());
13262 this.b$["java.awt.Window"].ownedWindowList.copyInto (a);
13263 }for (var b = 0; b < a.length; b++) {
13264 var c = (((a[b])));
13265 if (c != null) {
13266 c.disposeImpl ();
13267 }}
13268 this.b$["java.awt.Window"].hide ();
13269 this.b$["java.awt.Window"].beforeFirstShow = true;
13270 this.b$["java.awt.Window"].removeNotify ();
13271 this.b$["java.awt.Window"].clearCurrentFocusCycleRootOnHide ();
13272 });
13273 c$ = Clazz_p0p ();
13274 };
13275 Clazz_defineStatics (c$,
13276 "systemSyncLWRequests", false,
13277 "OPENED", 0x01,
13278 "base", "win",
13279 "nameCounter", 0);
13280 c$.allWindows = c$.prototype.allWindows =  new java.util.ArrayList ();
13281 c$.TRANSPARENT_BACKGROUND_COLOR = c$.prototype.TRANSPARENT_BACKGROUND_COLOR =  new java.awt.Color (0, 0, 0, 0);
13282 c$ = Clazz_decorateAsClass (function () {
13283 this.focusRoot = null;
13284 this.focusOwner = null;
13285 Clazz_instantialize (this, arguments);
13286 }, java.awt, "FocusManager");
13287 });
13288 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(){
13289 c$=Clazz_decorateAsClass(function(){
13290 this.elementCount=0;
13291 this.elementData=null;
13292 this.capacityIncrement=0;
13293 Clazz_instantialize(this,arguments);
13294 },java.util,"Vector",java.util.AbstractList,[java.util.List,java.util.RandomAccess,Cloneable,java.io.Serializable]);
13295 Clazz_makeConstructor(c$,
13296 function(){
13297 this.construct(10,0);
13298 });
13299 Clazz_makeConstructor(c$,
13300 function(capacity){
13301 this.construct(capacity,0);
13302 },"~N");
13303 Clazz_makeConstructor(c$,
13304 function(capacity,capacityIncrement){
13305 Clazz_superConstructor(this,java.util.Vector,[]);
13306 this.elementCount=0;
13307 try{
13308 this.elementData=this.newElementArray(capacity);
13309 }catch(e){
13310 if(Clazz_instanceOf(e,NegativeArraySizeException)){
13311 throw new IllegalArgumentException();
13312 }else{
13313 throw e;
13314 }
13315 }
13316 this.capacityIncrement=capacityIncrement;
13317 },"~N,~N");
13318 Clazz_makeConstructor(c$,
13319 function(collection){
13320 this.construct(collection.size(),0);
13321 var it=collection.iterator();
13322 while(it.hasNext()){
13323 this.elementData[this.elementCount++]=it.next();
13324 }
13325 },"java.util.Collection");
13326 Clazz_defineMethod(c$,"newElementArray",
13327 ($fz=function(size){
13328 return new Array(size);
13329 },$fz.isPrivate=true,$fz),"~N");
13330 Clazz_defineMethod(c$,"add",
13331 function(location,object){
13332 this.insertElementAt(object,location);
13333 },"~N,~O");
13334 Clazz_defineMethod(c$,"add",
13335 function(object){
13336 this.addElement(object);
13337 return true;
13338 },"~O");
13339 Clazz_defineMethod(c$,"addAll",
13340 function(location,collection){
13341 if(0<=location&&location<=this.elementCount){
13342 var size=collection.size();
13343 if(size==0){
13344 return false;
13345 }var required=size-(this.elementData.length-this.elementCount);
13346 if(required>0){
13347 this.growBy(required);
13348 }var count=this.elementCount-location;
13349 if(count>0){
13350 System.arraycopy(this.elementData,location,this.elementData,location+size,count);
13351 }var it=collection.iterator();
13352 while(it.hasNext()){
13353 this.elementData[location++]=it.next();
13354 }
13355 this.elementCount+=size;
13356 this.modCount++;
13357 return true;
13358 }throw new ArrayIndexOutOfBoundsException(location);
13359 },"~N,java.util.Collection");
13360 Clazz_defineMethod(c$,"addAll",
13361 function(collection){
13362 return this.addAll(this.elementCount,collection);
13363 },"java.util.Collection");
13364 Clazz_defineMethod(c$,"addElement",
13365 function(object){
13366 if(this.elementCount==this.elementData.length){
13367 this.growByOne();
13368 }this.elementData[this.elementCount++]=object;
13369 this.modCount++;
13370 },"~O");
13371 Clazz_defineMethod(c$,"capacity",
13372 function(){
13373 return this.elementData.length;
13374 });
13375 Clazz_overrideMethod(c$,"clear",
13376 function(){
13377 this.removeAllElements();
13378 });
13379 Clazz_defineMethod(c$,"clone",
13380 function(){
13381 try{
13382 var vector=Clazz_superCall(this,java.util.Vector,"clone",[]);
13383 vector.elementData=this.elementData.clone();
13384 return vector;
13385 }catch(e){
13386 if(Clazz_instanceOf(e,CloneNotSupportedException)){
13387 return null;
13388 }else{
13389 throw e;
13390 }
13391 }
13392 });
13393 Clazz_overrideMethod(c$,"contains",
13394 function(object){
13395 return this.indexOf(object,0)!=-1;
13396 },"~O");
13397 Clazz_defineMethod(c$,"copyInto",
13398 function(elements){
13399 System.arraycopy(this.elementData,0,elements,0,this.elementCount);
13400 },"~A");
13401 Clazz_defineMethod(c$,"elementAt",
13402 function(location){
13403 if(location<this.elementCount){
13404 return this.elementData[location];
13405 }throw new ArrayIndexOutOfBoundsException(location);
13406 },"~N");
13407 Clazz_defineMethod(c$,"elements",
13408 function(){
13409 return((Clazz_isClassDefined("java.util.Vector$1")?0:java.util.Vector.$Vector$1$()),Clazz_innerTypeInstance(java.util.Vector$1,this,null));
13410 });
13411 Clazz_defineMethod(c$,"ensureCapacity",
13412 function(minimumCapacity){
13413 if(this.elementData.length<minimumCapacity){
13414 var next=(this.capacityIncrement<=0?this.elementData.length:this.capacityIncrement)+this.elementData.length;
13415 this.grow(minimumCapacity>next?minimumCapacity:next);
13416 }},"~N");
13417 Clazz_overrideMethod(c$,"equals",
13418 function(object){
13419 if(this===object){
13420 return true;
13421 }if(Clazz_instanceOf(object,java.util.List)){
13422 var list=object;
13423 if(list.size()!=this.size()){
13424 return false;
13425 }var index=0;
13426 var it=list.iterator();
13427 while(it.hasNext()){
13428 var e1=this.elementData[index++];
13429 var e2=it.next();
13430 if(!(e1==null?e2==null:e1.equals(e2))){
13431 return false;
13432 }}
13433 return true;
13434 }return false;
13435 },"~O");
13436 Clazz_defineMethod(c$,"firstElement",
13437 function(){
13438 if(this.elementCount>0){
13439 return this.elementData[0];
13440 }throw new java.util.NoSuchElementException();
13441 });
13442 Clazz_overrideMethod(c$,"get",
13443 function(location){
13444 return this.elementAt(location);
13445 },"~N");
13446 Clazz_defineMethod(c$,"grow",
13447 ($fz=function(newCapacity){
13448 var newData=this.newElementArray(newCapacity);
13449 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13450 this.elementData=newData;
13451 },$fz.isPrivate=true,$fz),"~N");
13452 Clazz_defineMethod(c$,"growByOne",
13453 ($fz=function(){
13454 var adding=0;
13455 if(this.capacityIncrement<=0){
13456 if((adding=this.elementData.length)==0){
13457 adding=1;
13458 }}else{
13459 adding=this.capacityIncrement;
13460 }var newData=this.newElementArray(this.elementData.length+adding);
13461 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13462 this.elementData=newData;
13463 },$fz.isPrivate=true,$fz));
13464 Clazz_defineMethod(c$,"growBy",
13465 ($fz=function(required){
13466 var adding=0;
13467 if(this.capacityIncrement<=0){
13468 if((adding=this.elementData.length)==0){
13469 adding=required;
13470 }while(adding<required){
13471 adding+=adding;
13472 }
13473 }else{
13474 adding=(Math.floor(required/this.capacityIncrement))*this.capacityIncrement;
13475 if(adding<required){
13476 adding+=this.capacityIncrement;
13477 }}var newData=this.newElementArray(this.elementData.length+adding);
13478 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13479 this.elementData=newData;
13480 },$fz.isPrivate=true,$fz),"~N");
13481 Clazz_overrideMethod(c$,"hashCode",
13482 function(){
13483 var result=1;
13484 for(var i=0;i<this.elementCount;i++){
13485 result=(31*result)+(this.elementData[i]==null?0:this.elementData[i].hashCode());
13486 }
13487 return result;
13488 });
13489 Clazz_defineMethod(c$,"indexOf",
13490 function(object){
13491 return this.indexOf(object,0);
13492 },"~O");
13493 Clazz_defineMethod(c$,"indexOf",
13494 function(object,location){
13495 if(object!=null){
13496 for(var i=location;i<this.elementCount;i++){
13497 if(object.equals(this.elementData[i])){
13498 return i;
13499 }}
13500 }else{
13501 for(var i=location;i<this.elementCount;i++){
13502 if(this.elementData[i]==null){
13503 return i;
13504 }}
13505 }return-1;
13506 },"~O,~N");
13507 Clazz_defineMethod(c$,"insertElementAt",
13508 function(object,location){
13509 if(0<=location&&location<=this.elementCount){
13510 if(this.elementCount==this.elementData.length){
13511 this.growByOne();
13512 }var count=this.elementCount-location;
13513 if(count>0){
13514 System.arraycopy(this.elementData,location,this.elementData,location+1,count);
13515 }this.elementData[location]=object;
13516 this.elementCount++;
13517 this.modCount++;
13518 }else{
13519 throw new ArrayIndexOutOfBoundsException(location);
13520 }},"~O,~N");
13521 Clazz_overrideMethod(c$,"isEmpty",
13522 function(){
13523 return this.elementCount==0;
13524 });
13525 Clazz_defineMethod(c$,"lastElement",
13526 function(){
13527 try{
13528 return this.elementData[this.elementCount-1];
13529 }catch(e){
13530 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
13531 throw new java.util.NoSuchElementException();
13532 }else{
13533 throw e;
13534 }
13535 }
13536 });
13537 Clazz_defineMethod(c$,"lastIndexOf",
13538 function(object){
13539 return this.lastIndexOf(object,this.elementCount-1);
13540 },"~O");
13541 Clazz_defineMethod(c$,"lastIndexOf",
13542 function(object,location){
13543 if(location<this.elementCount){
13544 if(object!=null){
13545 for(var i=location;i>=0;i--){
13546 if(object.equals(this.elementData[i])){
13547 return i;
13548 }}
13549 }else{
13550 for(var i=location;i>=0;i--){
13551 if(this.elementData[i]==null){
13552 return i;
13553 }}
13554 }return-1;
13555 }throw new ArrayIndexOutOfBoundsException(location);
13556 },"~O,~N");
13557 Clazz_defineMethod(c$,"remove",
13558 function(location){
13559 if(location<this.elementCount){
13560 var result=this.elementData[location];
13561 this.elementCount--;
13562 var size=this.elementCount-location;
13563 if(size>0){
13564 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13565 }this.elementData[this.elementCount]=null;
13566 this.modCount++;
13567 return result;
13568 }throw new ArrayIndexOutOfBoundsException(location);
13569 },"~N");
13570 Clazz_defineMethod(c$,"remove",
13571 function(object){
13572 return this.removeElement(object);
13573 },"~O");
13574 Clazz_defineMethod(c$,"removeAllElements",
13575 function(){
13576 java.util.Arrays.fill(this.elementData,0,this.elementCount,null);
13577 this.modCount++;
13578 this.elementCount=0;
13579 });
13580 Clazz_defineMethod(c$,"removeElement",
13581 function(object){
13582 var index;
13583 if((index=this.indexOf(object,0))==-1){
13584 return false;
13585 }this.removeElementAt(index);
13586 return true;
13587 },"~O");
13588 Clazz_defineMethod(c$,"removeElementAt",
13589 function(location){
13590 if(0<=location&&location<this.elementCount){
13591 this.elementCount--;
13592 var size=this.elementCount-location;
13593 if(size>0){
13594 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13595 }this.elementData[this.elementCount]=null;
13596 this.modCount++;
13597 }else{
13598 throw new ArrayIndexOutOfBoundsException(location);
13599 }},"~N");
13600 Clazz_overrideMethod(c$,"removeRange",
13601 function(start,end){
13602 if(start>=0&&start<=end&&end<=this.size()){
13603 if(start==end){
13604 return;
13605 }if(end!=this.elementCount){
13606 System.arraycopy(this.elementData,end,this.elementData,start,this.elementCount-end);
13607 var newCount=this.elementCount-(end-start);
13608 java.util.Arrays.fill(this.elementData,newCount,this.elementCount,null);
13609 this.elementCount=newCount;
13610 }else{
13611 java.util.Arrays.fill(this.elementData,start,this.elementCount,null);
13612 this.elementCount=start;
13613 }this.modCount++;
13614 }else{
13615 throw new IndexOutOfBoundsException();
13616 }},"~N,~N");
13617 Clazz_overrideMethod(c$,"set",
13618 function(location,object){
13619 if(location<this.elementCount){
13620 var result=this.elementData[location];
13621 this.elementData[location]=object;
13622 return result;
13623 }throw new ArrayIndexOutOfBoundsException(location);
13624 },"~N,~O");
13625 Clazz_defineMethod(c$,"setElementAt",
13626 function(object,location){
13627 if(location<this.elementCount){
13628 this.elementData[location]=object;
13629 }else{
13630 throw new ArrayIndexOutOfBoundsException(location);
13631 }},"~O,~N");
13632 Clazz_defineMethod(c$,"setSize",
13633 function(length){
13634 if(length==this.elementCount){
13635 return;
13636 }this.ensureCapacity(length);
13637 if(this.elementCount>length){
13638 java.util.Arrays.fill(this.elementData,length,this.elementCount,null);
13639 }this.elementCount=length;
13640 this.modCount++;
13641 },"~N");
13642 Clazz_overrideMethod(c$,"size",
13643 function(){
13644 return this.elementCount;
13645 });
13646 Clazz_overrideMethod(c$,"subList",
13647 function(start,end){
13648 return new java.util.Collections.SynchronizedRandomAccessList(Clazz_superCall(this,java.util.Vector,"subList",[start,end]),this);
13649 },"~N,~N");
13650 Clazz_defineMethod(c$,"toArray",
13651 function(){
13652 var result=new Array(this.elementCount);
13653 System.arraycopy(this.elementData,0,result,0,this.elementCount);
13654 return result;
13655 });
13656 Clazz_defineMethod(c$,"toArray",
13657 function(contents){
13658 if(this.elementCount>contents.length){
13659 var ct=contents.getClass().getComponentType();
13660 contents=java.lang.reflect.Array.newInstance(ct,this.elementCount);
13661 }System.arraycopy(this.elementData,0,contents,0,this.elementCount);
13662 if(this.elementCount<contents.length){
13663 contents[this.elementCount]=null;
13664 }return contents;
13665 },"~A");
13666 Clazz_overrideMethod(c$,"toString",
13667 function(){
13668 if(this.elementCount==0){
13669 return"[]";
13670 }var length=this.elementCount-1;
13671 var buffer=new StringBuffer(this.size()*16);
13672 buffer.append('[');
13673 for(var i=0;i<length;i++){
13674 if(this.elementData[i]===this){
13675 buffer.append("(this Collection)");
13676 }else{
13677 buffer.append(this.elementData[i]);
13678 }buffer.append(", ");
13679 }
13680 if(this.elementData[length]===this){
13681 buffer.append("(this Collection)");
13682 }else{
13683 buffer.append(this.elementData[length]);
13684 }buffer.append(']');
13685 return buffer.toString();
13686 });
13687 Clazz_defineMethod(c$,"trimToSize",
13688 function(){
13689 if(this.elementData.length!=this.elementCount){
13690 this.grow(this.elementCount);
13691 }});
13692 c$.$Vector$1$=function(){
13693 Clazz_pu$h(self.c$);
13694 c$=Clazz_decorateAsClass(function(){
13695 Clazz_prepareCallback(this,arguments);
13696 this.pos=0;
13697 Clazz_instantialize(this,arguments);
13698 },java.util,"Vector$1",null,java.util.Enumeration);
13699 Clazz_overrideMethod(c$,"hasMoreElements",
13700 function(){
13701 return this.pos<this.b$["java.util.Vector"].elementCount;
13702 });
13703 Clazz_overrideMethod(c$,"nextElement",
13704 function(){
13705 {
13706 if(this.pos<this.b$["java.util.Vector"].elementCount){
13707 return this.b$["java.util.Vector"].elementData[this.pos++];
13708 }}throw new java.util.NoSuchElementException();
13709 });
13710 c$=Clazz_p0p();
13711 };
13712 Clazz_defineStatics(c$,
13713 "DEFAULT_SIZE",10);
13714 });
13715 Clazz_declarePackage ("java.awt");
13716 Clazz_load (["java.awt.Paint"], "java.awt.Color", ["java.lang.IllegalArgumentException", "java.awt.ColorPaintContext"], function () {
13717 c$ = Clazz_decorateAsClass (function () {
13718 this.value = 0;
13719 this.frgbvalue = null;
13720 this.falpha = 0.0;
13721 this.context = null;
13722 Clazz_instantialize (this, arguments);
13723 }, java.awt, "Color", null, java.awt.Paint);
13724 c$.testColorValueRange = Clazz_defineMethod (c$, "testColorValueRange", 
13725  function (r, g, b, a) {
13726 var rangeError = false;
13727 var badComponentString = "";
13728 if (a < 0 || a > 255) {
13729 rangeError = true;
13730 badComponentString = badComponentString + " Alpha";
13731 }if (r < 0 || r > 255) {
13732 rangeError = true;
13733 badComponentString = badComponentString + " Red";
13734 }if (g < 0 || g > 255) {
13735 rangeError = true;
13736 badComponentString = badComponentString + " Green";
13737 }if (b < 0 || b > 255) {
13738 rangeError = true;
13739 badComponentString = badComponentString + " Blue";
13740 }if (rangeError == true) {
13741 throw  new IllegalArgumentException ("Color parameter outside of expected range:" + badComponentString);
13742 }}, "~N,~N,~N,~N");
13743 Clazz_makeConstructor (c$, 
13744 function () {
13745 {
13746 var a = arguments;
13747 switch(a.length) {
13748 case 0:
13749 break;
13750 case 1:
13751 this.value = (a[0].value ? a[0].value : 0xff000000 | a[0]);
13752 break;
13753 case 2:
13754 this.value = (a[1] ? a[0] : 0xff000000 | a[0]);
13755 break;
13756 case 3:
13757 this.setColor4(a[0], a[1], a[2], 255);
13758 break;
13759 case 4:
13760 this.setColor4(a[0], a[1], a[2], a[3]);
13761 break;
13762 }
13763 return this;
13764 }});
13765 Clazz_defineMethod (c$, "setColor4", 
13766  function (r, g, b, a) {
13767 this.value = ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0);
13768 java.awt.Color.testColorValueRange (r, g, b, a);
13769 }, "~N,~N,~N,~N");
13770 Clazz_defineMethod (c$, "setFloat", 
13771  function (r, g, b, f) {
13772 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));
13773 this.frgbvalue =  Clazz_newFloatArray (3, 0);
13774 this.frgbvalue[0] = r;
13775 this.frgbvalue[1] = g;
13776 this.frgbvalue[2] = b;
13777 this.falpha = f;
13778 }, "~N,~N,~N,~N");
13779 c$.getColorF4 = Clazz_defineMethod (c$, "getColorF4", 
13780 function (r, g, b, a) {
13781 var c =  new java.awt.Color ();
13782 c.setFloat (r, g, b, a);
13783 return c;
13784 }, "~N,~N,~N,~N");
13785 Clazz_defineMethod (c$, "getRed", 
13786 function () {
13787 return (this.getRGB () >> 16) & 0xFF;
13788 });
13789 Clazz_defineMethod (c$, "getGreen", 
13790 function () {
13791 return (this.getRGB () >> 8) & 0xFF;
13792 });
13793 Clazz_defineMethod (c$, "getBlue", 
13794 function () {
13795 return (this.getRGB () >> 0) & 0xFF;
13796 });
13797 Clazz_defineMethod (c$, "getAlpha", 
13798 function () {
13799 return (this.getRGB () >> 24) & 0xff;
13800 });
13801 Clazz_defineMethod (c$, "getRGB", 
13802 function () {
13803 return this.value;
13804 });
13805 Clazz_defineMethod (c$, "brighter", 
13806 function () {
13807 var r = this.getRed ();
13808 var g = this.getGreen ();
13809 var b = this.getBlue ();
13810 var i = Clazz_doubleToInt (3.333333333333333);
13811 if (r == 0 && g == 0 && b == 0) {
13812 return  new java.awt.Color (i, i, i);
13813 }if (r > 0 && r < i) r = i;
13814 if (g > 0 && g < i) g = i;
13815 if (b > 0 && b < i) b = i;
13816 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));
13817 });
13818 Clazz_defineMethod (c$, "darker", 
13819 function () {
13820 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));
13821 });
13822 Clazz_overrideMethod (c$, "hashCode", 
13823 function () {
13824 return this.value;
13825 });
13826 Clazz_overrideMethod (c$, "equals", 
13827 function (obj) {
13828 return Clazz_instanceOf (obj, java.awt.Color) && (obj).getRGB () == this.getRGB ();
13829 }, "~O");
13830 Clazz_overrideMethod (c$, "toString", 
13831 function () {
13832 return this.getClass ().getName () + "[r=" + this.getRed () + ",g=" + this.getGreen () + ",b=" + this.getBlue () + "]";
13833 });
13834 c$.decode = Clazz_defineMethod (c$, "decode", 
13835 function (nm) {
13836 var intval = Integer.decode (nm);
13837 var i = intval.intValue ();
13838 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13839 }, "~S");
13840 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13841 function (nm) {
13842 return java.awt.Color.getColor (nm, null);
13843 }, "~S");
13844 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13845 function (nm, v) {
13846 var intval = Integer.getInteger (nm);
13847 if (intval == null) {
13848 return v;
13849 }var i = intval.intValue ();
13850 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13851 }, "~S,java.awt.Color");
13852 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13853 function (nm, v) {
13854 var intval = Integer.getInteger (nm);
13855 var i = (intval != null) ? intval.intValue () : v;
13856 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, (i >> 0) & 0xFF);
13857 }, "~S,~N");
13858 c$.HSBtoRGB = Clazz_defineMethod (c$, "HSBtoRGB", 
13859 function (hue, saturation, brightness) {
13860 var r = 0;
13861 var g = 0;
13862 var b = 0;
13863 if (saturation == 0) {
13864 r = g = b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13865 } else {
13866 var h = (hue - Math.floor (hue)) * 6.0;
13867 var f = h - java.lang.Math.floor (h);
13868 var p = brightness * (1.0 - saturation);
13869 var q = brightness * (1.0 - saturation * f);
13870 var t = brightness * (1.0 - (saturation * (1.0 - f)));
13871 switch (Clazz_floatToInt (h)) {
13872 case 0:
13873 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13874 g = Clazz_floatToInt (t * 255.0 + 0.5);
13875 b = Clazz_floatToInt (p * 255.0 + 0.5);
13876 break;
13877 case 1:
13878 r = Clazz_floatToInt (q * 255.0 + 0.5);
13879 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13880 b = Clazz_floatToInt (p * 255.0 + 0.5);
13881 break;
13882 case 2:
13883 r = Clazz_floatToInt (p * 255.0 + 0.5);
13884 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13885 b = Clazz_floatToInt (t * 255.0 + 0.5);
13886 break;
13887 case 3:
13888 r = Clazz_floatToInt (p * 255.0 + 0.5);
13889 g = Clazz_floatToInt (q * 255.0 + 0.5);
13890 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13891 break;
13892 case 4:
13893 r = Clazz_floatToInt (t * 255.0 + 0.5);
13894 g = Clazz_floatToInt (p * 255.0 + 0.5);
13895 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13896 break;
13897 case 5:
13898 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13899 g = Clazz_floatToInt (p * 255.0 + 0.5);
13900 b = Clazz_floatToInt (q * 255.0 + 0.5);
13901 break;
13902 }
13903 }return 0xff000000 | (r << 16) | (g << 8) | (b << 0);
13904 }, "~N,~N,~N");
13905 c$.RGBtoHSB = Clazz_defineMethod (c$, "RGBtoHSB", 
13906 function (r, g, b, hsbvals) {
13907 var hue;
13908 var saturation;
13909 var brightness;
13910 if (hsbvals == null) {
13911 hsbvals =  Clazz_newFloatArray (3, 0);
13912 }var cmax = (r > g) ? r : g;
13913 if (b > cmax) cmax = b;
13914 var cmin = (r < g) ? r : g;
13915 if (b < cmin) cmin = b;
13916 brightness = (cmax) / 255.0;
13917 if (cmax != 0) saturation = ((cmax - cmin)) / (cmax);
13918  else saturation = 0;
13919 if (saturation == 0) hue = 0;
13920  else {
13921 var redc = ((cmax - r)) / ((cmax - cmin));
13922 var greenc = ((cmax - g)) / ((cmax - cmin));
13923 var bluec = ((cmax - b)) / ((cmax - cmin));
13924 if (r == cmax) hue = bluec - greenc;
13925  else if (g == cmax) hue = 2.0 + redc - bluec;
13926  else hue = 4.0 + greenc - redc;
13927 hue = hue / 6.0;
13928 if (hue < 0) hue = hue + 1.0;
13929 }hsbvals[0] = hue;
13930 hsbvals[1] = saturation;
13931 hsbvals[2] = brightness;
13932 return hsbvals;
13933 }, "~N,~N,~N,~A");
13934 c$.getHSBColor = Clazz_defineMethod (c$, "getHSBColor", 
13935 function (h, s, b) {
13936 return  new java.awt.Color (java.awt.Color.HSBtoRGB (h, s, b));
13937 }, "~N,~N,~N");
13938 Clazz_defineMethod (c$, "getRGBComponents", 
13939 function (compArray) {
13940 var f;
13941 if (compArray == null) {
13942 f =  Clazz_newFloatArray (4, 0);
13943 } else {
13944 f = compArray;
13945 }if (this.frgbvalue == null) {
13946 f[0] = (this.getRed ()) / 255;
13947 f[1] = (this.getGreen ()) / 255;
13948 f[2] = (this.getBlue ()) / 255;
13949 f[3] = (this.getAlpha ()) / 255;
13950 } else {
13951 f[0] = this.frgbvalue[0];
13952 f[1] = this.frgbvalue[1];
13953 f[2] = this.frgbvalue[2];
13954 f[3] = this.falpha;
13955 }return f;
13956 }, "~A");
13957 Clazz_defineMethod (c$, "getRGBColorComponents", 
13958 function (compArray) {
13959 var f;
13960 if (compArray == null) {
13961 f =  Clazz_newFloatArray (3, 0);
13962 } else {
13963 f = compArray;
13964 }if (this.frgbvalue == null) {
13965 f[0] = (this.getRed ()) / 255;
13966 f[1] = (this.getGreen ()) / 255;
13967 f[2] = (this.getBlue ()) / 255;
13968 } else {
13969 f[0] = this.frgbvalue[0];
13970 f[1] = this.frgbvalue[1];
13971 f[2] = this.frgbvalue[2];
13972 }return f;
13973 }, "~A");
13974 Clazz_overrideMethod (c$, "createContext", 
13975 function (cm, r, r2d, xform, hints) {
13976 if (this.context == null || this.context.getRGB () != this.getRGB ()) {
13977 this.context =  new java.awt.ColorPaintContext (this.getRGB (), cm);
13978 }return this.context;
13979 }, "java.awt.image.ColorModel,java.awt.Rectangle,java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform,java.awt.RenderingHints");
13980 Clazz_overrideMethod (c$, "getTransparency", 
13981 function () {
13982 var alpha = this.getAlpha ();
13983 if (alpha == 0xff) {
13984 return 1;
13985 } else if (alpha == 0) {
13986 return 2;
13987 } else {
13988 return 3;
13989 }});
13990 c$.white = c$.prototype.white =  new java.awt.Color (255, 255, 255);
13991 c$.WHITE = c$.prototype.WHITE = java.awt.Color.white;
13992 c$.lightGray = c$.prototype.lightGray =  new java.awt.Color (192, 192, 192);
13993 c$.LIGHT_GRAY = c$.prototype.LIGHT_GRAY = java.awt.Color.lightGray;
13994 c$.gray = c$.prototype.gray =  new java.awt.Color (128, 128, 128);
13995 c$.GRAY = c$.prototype.GRAY = java.awt.Color.gray;
13996 c$.darkGray = c$.prototype.darkGray =  new java.awt.Color (64, 64, 64);
13997 c$.DARK_GRAY = c$.prototype.DARK_GRAY = java.awt.Color.darkGray;
13998 c$.black = c$.prototype.black =  new java.awt.Color (0, 0, 0);
13999 c$.BLACK = c$.prototype.BLACK = java.awt.Color.black;
14000 c$.red = c$.prototype.red =  new java.awt.Color (255, 0, 0);
14001 c$.RED = c$.prototype.RED = java.awt.Color.red;
14002 c$.pink = c$.prototype.pink =  new java.awt.Color (255, 175, 175);
14003 c$.PINK = c$.prototype.PINK = java.awt.Color.pink;
14004 c$.orange = c$.prototype.orange =  new java.awt.Color (255, 200, 0);
14005 c$.ORANGE = c$.prototype.ORANGE = java.awt.Color.orange;
14006 c$.yellow = c$.prototype.yellow =  new java.awt.Color (255, 255, 0);
14007 c$.YELLOW = c$.prototype.YELLOW = java.awt.Color.yellow;
14008 c$.green = c$.prototype.green =  new java.awt.Color (0, 255, 0);
14009 c$.GREEN = c$.prototype.GREEN = java.awt.Color.green;
14010 c$.magenta = c$.prototype.magenta =  new java.awt.Color (255, 0, 255);
14011 c$.MAGENTA = c$.prototype.MAGENTA = java.awt.Color.magenta;
14012 c$.cyan = c$.prototype.cyan =  new java.awt.Color (0, 255, 255);
14013 c$.CYAN = c$.prototype.CYAN = java.awt.Color.cyan;
14014 c$.blue = c$.prototype.blue =  new java.awt.Color (0, 0, 255);
14015 c$.BLUE = c$.prototype.BLUE = java.awt.Color.blue;
14016 Clazz_defineStatics (c$,
14017 "FACTOR", 0.7);
14018 });
14019 Clazz_declarePackage ("java.awt");
14020 Clazz_load (["java.awt.Transparency"], "java.awt.Paint", null, function () {
14021 Clazz_declareInterface (java.awt, "Paint", java.awt.Transparency);
14022 });
14023 Clazz_declarePackage ("java.awt");
14024 c$ = Clazz_declareInterface (java.awt, "Transparency");
14025 Clazz_defineStatics (c$,
14026 "OPAQUE", 1,
14027 "BITMASK", 2,
14028 "TRANSLUCENT", 3);
14029 Clazz_declarePackage ("java.awt");
14030 Clazz_load (["java.awt.PaintContext"], "java.awt.ColorPaintContext", ["java.awt.image.ColorModel"], function () {
14031 c$ = Clazz_decorateAsClass (function () {
14032 this.color = 0;
14033 Clazz_instantialize (this, arguments);
14034 }, java.awt, "ColorPaintContext", null, java.awt.PaintContext);
14035 Clazz_makeConstructor (c$, 
14036 function (color, cm) {
14037 this.color = color;
14038 }, "~N,java.awt.image.ColorModel");
14039 Clazz_overrideMethod (c$, "dispose", 
14040 function () {
14041 });
14042 Clazz_defineMethod (c$, "getRGB", 
14043 function () {
14044 return this.color;
14045 });
14046 Clazz_overrideMethod (c$, "getColorModel", 
14047 function () {
14048 return java.awt.image.ColorModel.getRGBdefault ();
14049 });
14050 });
14051 Clazz_declarePackage ("java.awt");
14052 Clazz_declareInterface (java.awt, "PaintContext");
14053 Clazz_declarePackage ("java.awt.image");
14054 Clazz_load (["java.awt.Transparency", "java.awt.color.ColorSpace"], "java.awt.image.ColorModel", ["java.lang.IllegalArgumentException", "$.NullPointerException", "$.UnsupportedOperationException", "JU.AU"], function () {
14055 c$ = Clazz_decorateAsClass (function () {
14056 this.pixel_bits = 0;
14057 this.nBits = null;
14058 this.transparency = 3;
14059 this.supportsAlpha = true;
14060 this.$isAlphaPremultiplied = false;
14061 this.numComponents = -1;
14062 this.numColorComponents = -1;
14063 this.colorSpace = null;
14064 this.colorSpaceType = 5;
14065 this.maxBits = 0;
14066 this.is_sRGB = true;
14067 this.transferType = 0;
14068 Clazz_instantialize (this, arguments);
14069 }, java.awt.image, "ColorModel", null, java.awt.Transparency);
14070 Clazz_prepareFields (c$, function () {
14071 this.colorSpace = java.awt.color.ColorSpace.getInstance (1000);
14072 });
14073 c$.getRGBdefault = Clazz_defineMethod (c$, "getRGBdefault", 
14074 function () {
14075 if (java.awt.image.ColorModel.RGBdefault == null) {
14076 java.awt.image.ColorModel.RGBdefault =  new java.awt.image.DirectColorModel (32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
14077 }return java.awt.image.ColorModel.RGBdefault;
14078 });
14079 Clazz_makeConstructor (c$, 
14080 function (bits) {
14081 this.pixel_bits = bits;
14082 if (bits < 1) {
14083 throw  new IllegalArgumentException ("Number of bits must be > 0");
14084 }this.numComponents = 4;
14085 this.numColorComponents = 3;
14086 this.maxBits = bits;
14087 this.transferType = java.awt.image.ColorModel.getDefaultTransferType (bits);
14088 }, "~N");
14089 Clazz_makeConstructor (c$, 
14090 function (pixel_bits, bits, cspace, hasAlpha, isAlphaPremultiplied, transparency, transferType) {
14091 this.colorSpace = cspace;
14092 this.colorSpaceType = cspace.getType ();
14093 this.numColorComponents = cspace.getNumComponents ();
14094 this.numComponents = this.numColorComponents + (hasAlpha ? 1 : 0);
14095 this.supportsAlpha = hasAlpha;
14096 if (bits.length < this.numComponents) {
14097 throw  new IllegalArgumentException ("Number of color/alpha components should be " + this.numComponents + " but length of bits array is " + bits.length);
14098 }if (transparency < 1 || transparency > 3) {
14099 throw  new IllegalArgumentException ("Unknown transparency: " + transparency);
14100 }if (this.supportsAlpha == false) {
14101 this.$isAlphaPremultiplied = false;
14102 this.transparency = 1;
14103 } else {
14104 this.$isAlphaPremultiplied = isAlphaPremultiplied;
14105 this.transparency = transparency;
14106 }this.nBits = bits.clone ();
14107 this.pixel_bits = pixel_bits;
14108 if (pixel_bits <= 0) {
14109 throw  new IllegalArgumentException ("Number of pixel bits must be > 0");
14110 }this.maxBits = 0;
14111 for (var i = 0; i < bits.length; i++) {
14112 if (bits[i] < 0) {
14113 throw  new IllegalArgumentException ("Number of bits must be >= 0");
14114 }if (this.maxBits < bits[i]) {
14115 this.maxBits = bits[i];
14116 }}
14117 if (this.maxBits == 0) {
14118 throw  new IllegalArgumentException ("There must be at least one component with > 0 pixel bits.");
14119 }if (cspace !== java.awt.color.ColorSpace.getInstance (1000)) {
14120 this.is_sRGB = false;
14121 }this.transferType = transferType;
14122 }, "~N,~A,java.awt.color.ColorSpace,~B,~B,~N,~N");
14123 Clazz_defineMethod (c$, "hasAlpha", 
14124 function () {
14125 return this.supportsAlpha;
14126 });
14127 Clazz_defineMethod (c$, "isAlphaPremultiplied", 
14128 function () {
14129 return this.$isAlphaPremultiplied;
14130 });
14131 Clazz_defineMethod (c$, "getTransferType", 
14132 function () {
14133 return this.transferType;
14134 });
14135 Clazz_defineMethod (c$, "getPixelSize", 
14136 function () {
14137 return this.pixel_bits;
14138 });
14139 Clazz_defineMethod (c$, "getComponentSize", 
14140 function (componentIdx) {
14141 if (this.nBits == null) {
14142 throw  new NullPointerException ("Number of bits array is null.");
14143 }return this.nBits[componentIdx];
14144 }, "~N");
14145 Clazz_defineMethod (c$, "getComponentSize", 
14146 function () {
14147 if (this.nBits != null) {
14148 return this.nBits.clone ();
14149 }return null;
14150 });
14151 Clazz_overrideMethod (c$, "getTransparency", 
14152 function () {
14153 return this.transparency;
14154 });
14155 Clazz_defineMethod (c$, "getNumComponents", 
14156 function () {
14157 return this.numComponents;
14158 });
14159 Clazz_defineMethod (c$, "getNumColorComponents", 
14160 function () {
14161 return this.numColorComponents;
14162 });
14163 Clazz_defineMethod (c$, "getRGB", 
14164 function (pixel) {
14165 return (this.getAlpha (pixel) << 24) | (this.getRed (pixel) << 16) | (this.getGreen (pixel) << 8) | (this.getBlue (pixel) << 0);
14166 }, "~N");
14167 Clazz_defineMethod (c$, "getRed", 
14168 function (inData) {
14169 var pixel = 0;
14170 var length = 0;
14171 var idata = inData;
14172 pixel = idata[0];
14173 length = idata.length;
14174 if (length == 1) {
14175 return this.getRed (pixel);
14176 } else {
14177 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14178 }}, "~O");
14179 Clazz_defineMethod (c$, "getGreen", 
14180 function (inData) {
14181 var pixel = 0;
14182 var length = 0;
14183 var idata = inData;
14184 pixel = idata[0];
14185 length = idata.length;
14186 if (length == 1) {
14187 return this.getGreen (pixel);
14188 } else {
14189 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14190 }}, "~O");
14191 Clazz_defineMethod (c$, "getBlue", 
14192 function (inData) {
14193 var pixel = 0;
14194 var length = 0;
14195 var idata = inData;
14196 pixel = idata[0];
14197 length = idata.length;
14198 if (length == 1) {
14199 return this.getBlue (pixel);
14200 } else {
14201 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14202 }}, "~O");
14203 Clazz_defineMethod (c$, "getAlpha", 
14204 function (inData) {
14205 var pixel = 0;
14206 var length = 0;
14207 var idata = inData;
14208 pixel = idata[0];
14209 length = idata.length;
14210 if (length == 1) {
14211 return this.getAlpha (pixel);
14212 } else {
14213 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14214 }}, "~O");
14215 Clazz_defineMethod (c$, "getRGB", 
14216 function (inData) {
14217 return (this.getAlpha (inData) << 24) | (this.getRed (inData) << 16) | (this.getGreen (inData) << 8) | (this.getBlue (inData) << 0);
14218 }, "~O");
14219 Clazz_defineMethod (c$, "getDataElements", 
14220 function (rgb, pixel) {
14221 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14222 }, "~N,~O");
14223 Clazz_defineMethod (c$, "getComponents", 
14224 function (pixel, components, offset) {
14225 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14226 }, "~N,~A,~N");
14227 Clazz_defineMethod (c$, "getComponents", 
14228 function (pixel, components, offset) {
14229 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14230 }, "~O,~A,~N");
14231 Clazz_defineMethod (c$, "getUnnormalizedComponents", 
14232 function (normComponents, normOffset, components, offset) {
14233 if (this.colorSpace == null) {
14234 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14235 }if (this.nBits == null) {
14236 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14237 }if ((normComponents.length - normOffset) < this.numComponents) {
14238 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14239 }if (components == null) {
14240 components =  Clazz_newIntArray (offset + this.numComponents, 0);
14241 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14242 var normAlpha = normComponents[normOffset + this.numColorComponents];
14243 for (var i = 0; i < this.numColorComponents; i++) {
14244 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) * normAlpha + 0.5);
14245 }
14246 components[offset + this.numColorComponents] = Clazz_floatToInt (normAlpha * ((1 << this.nBits[this.numColorComponents]) - 1) + 0.5);
14247 } else {
14248 for (var i = 0; i < this.numComponents; i++) {
14249 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) + 0.5);
14250 }
14251 }return components;
14252 }, "~A,~N,~A,~N");
14253 Clazz_defineMethod (c$, "getNormalizedComponents", 
14254 function (components, offset, normComponents, normOffset) {
14255 if (this.colorSpace == null) {
14256 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14257 }if (this.nBits == null) {
14258 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14259 }if ((components.length - offset) < this.numComponents) {
14260 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14261 }if (normComponents == null) {
14262 normComponents =  Clazz_newFloatArray (this.numComponents + normOffset, 0);
14263 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14264 var normAlpha = components[offset + this.numColorComponents];
14265 normAlpha /= ((1 << this.nBits[this.numColorComponents]) - 1);
14266 if (normAlpha != 0.0) {
14267 for (var i = 0; i < this.numColorComponents; i++) {
14268 normComponents[normOffset + i] = (components[offset + i]) / (normAlpha * (((1 << this.nBits[i]) - 1)));
14269 }
14270 } else {
14271 for (var i = 0; i < this.numColorComponents; i++) {
14272 normComponents[normOffset + i] = 0.0;
14273 }
14274 }normComponents[normOffset + this.numColorComponents] = normAlpha;
14275 } else {
14276 for (var i = 0; i < this.numComponents; i++) {
14277 normComponents[normOffset + i] = (components[offset + i]) / (((1 << this.nBits[i]) - 1));
14278 }
14279 }return normComponents;
14280 }, "~A,~N,~A,~N");
14281 Clazz_defineMethod (c$, "getDataElement", 
14282 function (components, offset) {
14283 return this.getDataElementInt (components, offset);
14284 }, "~A,~N");
14285 Clazz_defineMethod (c$, "getDataElementInt", 
14286 function (components, offset) {
14287 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14288 }, "~A,~N");
14289 Clazz_defineMethod (c$, "getDataElement", 
14290 function (normComponents, normOffset) {
14291 if (JU.AU.isAI (normComponents)) {
14292 var ints = normComponents;
14293 return this.getDataElementInt (ints, normOffset);
14294 }var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14295 return this.getDataElement (components, 0);
14296 }, "~A,~N");
14297 Clazz_defineMethod (c$, "getDataElements", 
14298 function (normComponents, normOffset, obj) {
14299 var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14300 return this.getDataElements (components, 0, obj);
14301 }, "~A,~N,~O");
14302 Clazz_defineMethod (c$, "getNormalizedComponents", 
14303 function (pixel, normComponents, normOffset) {
14304 var components = this.getComponents (pixel, null, 0);
14305 return this.getNormalizedComponents (components, 0, normComponents, normOffset);
14306 }, "~O,~A,~N");
14307 Clazz_overrideMethod (c$, "equals", 
14308 function (obj) {
14309 if (!(Clazz_instanceOf (obj, java.awt.image.ColorModel))) {
14310 return false;
14311 }var cm = obj;
14312 if (this === cm) {
14313 return true;
14314 }if (this.supportsAlpha != cm.hasAlpha () || this.$isAlphaPremultiplied != cm.isAlphaPremultiplied () || this.pixel_bits != cm.getPixelSize () || this.transparency != cm.getTransparency () || this.numComponents != cm.getNumComponents ()) {
14315 return false;
14316 }var nb = cm.getComponentSize ();
14317 if ((this.nBits != null) && (nb != null)) {
14318 for (var i = 0; i < this.numComponents; i++) {
14319 if (this.nBits[i] != nb[i]) {
14320 return false;
14321 }}
14322 } else {
14323 return ((this.nBits == null) && (nb == null));
14324 }return true;
14325 }, "~O");
14326 Clazz_overrideMethod (c$, "hashCode", 
14327 function () {
14328 var result = 0;
14329 result = (this.supportsAlpha ? 2 : 3) + (this.$isAlphaPremultiplied ? 4 : 5) + this.pixel_bits * 6 + this.transparency * 7 + this.numComponents * 8;
14330 if (this.nBits != null) {
14331 for (var i = 0; i < this.numComponents; i++) {
14332 result = result + this.nBits[i] * (i + 9);
14333 }
14334 }return result;
14335 });
14336 Clazz_defineMethod (c$, "getColorSpace", 
14337 function () {
14338 return this.colorSpace;
14339 });
14340 Clazz_defineMethod (c$, "isCompatibleRaster", 
14341 function (raster) {
14342 throw  new UnsupportedOperationException ("This method has not been implemented for this ColorModel.");
14343 }, "java.awt.image.Raster");
14344 Clazz_defineMethod (c$, "createCompatibleWritableRaster", 
14345 function (w, h) {
14346 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14347 }, "~N,~N");
14348 Clazz_defineMethod (c$, "createCompatibleSampleModel", 
14349 function (w, h) {
14350 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14351 }, "~N,~N");
14352 Clazz_defineMethod (c$, "isCompatibleSampleModel", 
14353 function (sm) {
14354 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14355 }, "java.awt.image.SampleModel");
14356 Clazz_overrideMethod (c$, "finalize", 
14357 function () {
14358 });
14359 Clazz_defineMethod (c$, "getAlphaRaster", 
14360 function (raster) {
14361 return null;
14362 }, "java.awt.image.WritableRaster");
14363 Clazz_overrideMethod (c$, "toString", 
14364 function () {
14365 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);
14366 });
14367 c$.getDefaultTransferType = Clazz_defineMethod (c$, "getDefaultTransferType", 
14368 function (pixel_bits) {
14369 if (pixel_bits <= 8) {
14370 return 0;
14371 }return 3;
14372 }, "~N");
14373 c$.isLinearRGBspace = Clazz_defineMethod (c$, "isLinearRGBspace", 
14374 function (cs) {
14375 return false;
14376 }, "java.awt.color.ColorSpace");
14377 c$.isLinearGRAYspace = Clazz_defineMethod (c$, "isLinearGRAYspace", 
14378 function (cs) {
14379 return false;
14380 }, "java.awt.color.ColorSpace");
14381 Clazz_defineStatics (c$,
14382 "RGBdefault", null,
14383 "l8Tos8", null,
14384 "s8Tol8", null,
14385 "l16Tos8", null,
14386 "s8Tol16", null,
14387 "g8Tos8Map", null,
14388 "lg16Toog8Map", null,
14389 "g16Tos8Map", null,
14390 "lg16Toog16Map", null);
14391 });
14392 Clazz_declarePackage ("java.awt.color");
14393 Clazz_load (null, "java.awt.color.ColorSpace", ["java.lang.IllegalArgumentException"], function () {
14394 c$ = Clazz_decorateAsClass (function () {
14395 this.type = 0;
14396 this.numComponents = 0;
14397 this.compName = null;
14398 Clazz_instantialize (this, arguments);
14399 }, java.awt.color, "ColorSpace");
14400 Clazz_makeConstructor (c$, 
14401 function (type, numcomponents) {
14402 this.type = type;
14403 this.numComponents = numcomponents;
14404 }, "~N,~N");
14405 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
14406 function (colorspace) {
14407 var theColorSpace;
14408 switch (colorspace) {
14409 default:
14410 case 1000:
14411 if (java.awt.color.ColorSpace.sRGBspace == null) {
14412 java.awt.color.ColorSpace.sRGBspace =  new java.awt.color.ColorSpace (5, 3);
14413 }theColorSpace = java.awt.color.ColorSpace.sRGBspace;
14414 break;
14415 }
14416 return theColorSpace;
14417 }, "~N");
14418 Clazz_defineMethod (c$, "isCS_sRGB", 
14419 function () {
14420 return (this === java.awt.color.ColorSpace.sRGBspace);
14421 });
14422 Clazz_defineMethod (c$, "toRGB", 
14423 function (colorvalue) {
14424 return colorvalue;
14425 }, "~A");
14426 Clazz_defineMethod (c$, "fromRGB", 
14427 function (rgbvalue) {
14428 return rgbvalue;
14429 }, "~A");
14430 Clazz_defineMethod (c$, "getType", 
14431 function () {
14432 return this.type;
14433 });
14434 Clazz_defineMethod (c$, "getNumComponents", 
14435 function () {
14436 return this.numComponents;
14437 });
14438 Clazz_defineMethod (c$, "getName", 
14439 function (idx) {
14440 if ((idx < 0) || (idx > this.numComponents - 1)) {
14441 throw  new IllegalArgumentException ("Component index out of range: " + idx);
14442 }if (this.compName == null) {
14443 switch (this.type) {
14444 case 0:
14445 this.compName =  Clazz_newArray (-1, ["X", "Y", "Z"]);
14446 break;
14447 case 1:
14448 this.compName =  Clazz_newArray (-1, ["L", "a", "b"]);
14449 break;
14450 case 2:
14451 this.compName =  Clazz_newArray (-1, ["L", "u", "v"]);
14452 break;
14453 case 3:
14454 this.compName =  Clazz_newArray (-1, ["Y", "Cb", "Cr"]);
14455 break;
14456 case 4:
14457 this.compName =  Clazz_newArray (-1, ["Y", "x", "y"]);
14458 break;
14459 case 5:
14460 this.compName =  Clazz_newArray (-1, ["Red", "Green", "Blue"]);
14461 break;
14462 case 6:
14463 this.compName =  Clazz_newArray (-1, ["Gray"]);
14464 break;
14465 case 7:
14466 this.compName =  Clazz_newArray (-1, ["Hue", "Saturation", "Value"]);
14467 break;
14468 case 8:
14469 this.compName =  Clazz_newArray (-1, ["Hue", "Lightness", "Saturation"]);
14470 break;
14471 case 9:
14472 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow", "Black"]);
14473 break;
14474 case 11:
14475 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow"]);
14476 break;
14477 default:
14478 var tmp =  new Array (this.numComponents);
14479 for (var i = 0; i < tmp.length; i++) {
14480 tmp[i] = "Unnamed color component(" + i + ")";
14481 }
14482 this.compName = tmp;
14483 }
14484 }return this.compName[idx];
14485 }, "~N");
14486 Clazz_defineMethod (c$, "getMinValue", 
14487 function (component) {
14488 if ((component < 0) || (component > this.numComponents - 1)) {
14489 throw  new IllegalArgumentException ("Component index out of range: " + component);
14490 }return 0.0;
14491 }, "~N");
14492 Clazz_defineMethod (c$, "getMaxValue", 
14493 function (component) {
14494 if ((component < 0) || (component > this.numComponents - 1)) {
14495 throw  new IllegalArgumentException ("Component index out of range: " + component);
14496 }return 1.0;
14497 }, "~N");
14498 Clazz_defineStatics (c$,
14499 "sRGBspace", null,
14500 "TYPE_XYZ", 0,
14501 "TYPE_Lab", 1,
14502 "TYPE_Luv", 2,
14503 "TYPE_YCbCr", 3,
14504 "TYPE_Yxy", 4,
14505 "TYPE_RGB", 5,
14506 "TYPE_GRAY", 6,
14507 "TYPE_HSV", 7,
14508 "TYPE_HLS", 8,
14509 "TYPE_CMYK", 9,
14510 "TYPE_CMY", 11,
14511 "TYPE_2CLR", 12,
14512 "TYPE_3CLR", 13,
14513 "TYPE_4CLR", 14,
14514 "TYPE_5CLR", 15,
14515 "TYPE_6CLR", 16,
14516 "TYPE_7CLR", 17,
14517 "TYPE_8CLR", 18,
14518 "TYPE_9CLR", 19,
14519 "TYPE_ACLR", 20,
14520 "TYPE_BCLR", 21,
14521 "TYPE_CCLR", 22,
14522 "TYPE_DCLR", 23,
14523 "TYPE_ECLR", 24,
14524 "TYPE_FCLR", 25,
14525 "CS_sRGB", 1000,
14526 "CS_LINEAR_RGB", 1004,
14527 "CS_CIEXYZ", 1001,
14528 "CS_PYCC", 1002,
14529 "CS_GRAY", 1003);
14530 });
14531 Clazz_declarePackage ("java.util");
14532 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 () {
14533 c$ = Clazz_decorateAsClass (function () {
14534 this.parent = null;
14535 this.locale = null;
14536 this.expired = false;
14537 this.$keySet = null;
14538 Clazz_instantialize (this, arguments);
14539 }, java.util, "ResourceBundle");
14540 Clazz_makeConstructor (c$, 
14541 function () {
14542 });
14543 Clazz_defineMethod (c$, "getString", 
14544 function (key) {
14545 return this.getObject (key);
14546 }, "~S");
14547 Clazz_defineMethod (c$, "getStringArray", 
14548 function (key) {
14549 return this.getObject (key);
14550 }, "~S");
14551 Clazz_defineMethod (c$, "getObject", 
14552 function (key) {
14553 var obj = this.handleGetObject (key);
14554 if (obj == null) {
14555 if (this.parent != null) {
14556 obj = this.parent.getObject (key);
14557 }if (obj == null) throw  new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key);
14558 }return obj;
14559 }, "~S");
14560 Clazz_defineMethod (c$, "getLocale", 
14561 function () {
14562 return this.locale;
14563 });
14564 Clazz_defineMethod (c$, "setParent", 
14565 function (parent) {
14566 this.parent = parent;
14567 }, "java.util.ResourceBundle");
14568 c$.getBundle = Clazz_defineMethod (c$, "getBundle", 
14569 function (baseName, targetLocale, loader, control) {
14570 var n = 4;
14571 {
14572 n = arguments.length;
14573 }switch (n) {
14574 case 2:
14575 if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) {
14576 control = targetLocale;
14577 targetLocale = null;
14578 }break;
14579 case 3:
14580 if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) {
14581 control = loader;
14582 loader = null;
14583 }break;
14584 }
14585 if (targetLocale == null) targetLocale = java.util.Locale.getDefault ();
14586 if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
14587 return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control);
14588 }, "~S,~O,~O,java.util.ResourceBundle.Control");
14589 c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", 
14590  function (baseName, locale, loader, control) {
14591 if (control == null) {
14592 throw  new NullPointerException ("ResourceBundle locale or control is null");
14593 }var cacheKey =  new java.util.ResourceBundle.CacheKey (baseName, locale, loader);
14594 var bundle = null;
14595 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14596 if (bundleRef != null) {
14597 bundle = bundleRef;
14598 bundleRef = null;
14599 }if (java.util.ResourceBundle.isValidBundle (bundle)) {
14600 return bundle;
14601 }var formats = control.getFormats (baseName);
14602 var baseBundle = null;
14603 for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) {
14604 var candidateLocales = control.getCandidateLocales (baseName, targetLocale);
14605 bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle);
14606 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14607 var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale);
14608 if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) {
14609 break;
14610 }if (isBaseBundle && baseBundle == null) {
14611 baseBundle = bundle;
14612 }}}
14613 if (bundle == null) {
14614 if (baseBundle == null) {
14615 java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ());
14616 }bundle = baseBundle;
14617 }return bundle;
14618 }, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control");
14619 c$.findBundle = Clazz_defineMethod (c$, "findBundle", 
14620  function (cacheKey, candidateLocales, formats, index, control, baseBundle) {
14621 var targetLocale = candidateLocales.get (index);
14622 var parent = null;
14623 if (index != candidateLocales.size () - 1) {
14624 parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle);
14625 } else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) {
14626 return baseBundle;
14627 }var expiredBundle = false;
14628 cacheKey.setLocale (targetLocale);
14629 var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control);
14630 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14631 expiredBundle = bundle.expired;
14632 if (!expiredBundle) {
14633 if (bundle.parent === parent) {
14634 return bundle;
14635 }var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14636 if (bundleRef != null && bundleRef === bundle) {
14637 java.util.ResourceBundle.cacheList.remove (cacheKey);
14638 }}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) {
14639 var constKey = cacheKey.clone ();
14640 try {
14641 try {
14642 bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle);
14643 if (bundle != null) {
14644 if (bundle.parent == null) {
14645 bundle.setParent (parent);
14646 }bundle.locale = targetLocale;
14647 bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control);
14648 return bundle;
14649 }java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control);
14650 } finally {
14651 }
14652 } finally {
14653 if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) {
14654 Thread.currentThread ().interrupt ();
14655 }}
14656 }return parent;
14657 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");
14658 c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", 
14659  function (cacheKey, formats, control, reload) {
14660 var targetLocale = cacheKey.getLocale ();
14661 var bundle = null;
14662 var size = formats.size ();
14663 for (var i = 0; i < size; i++) {
14664 var format = formats.get (i);
14665 try {
14666 bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload);
14667 } catch (e$$) {
14668 if (Clazz_exceptionOf (e$$, LinkageError)) {
14669 var error = e$$;
14670 {
14671 cacheKey.setCause (error);
14672 }
14673 } else if (Clazz_exceptionOf (e$$, Exception)) {
14674 var cause = e$$;
14675 {
14676 cacheKey.setCause (cause);
14677 }
14678 } else {
14679 throw e$$;
14680 }
14681 }
14682 if (bundle != null) {
14683 cacheKey.setFormat (format);
14684 bundle.locale = targetLocale;
14685 bundle.expired = false;
14686 break;
14687 }}
14688 return bundle;
14689 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B");
14690 c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", 
14691  function (bundle) {
14692 return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE;
14693 }, "java.util.ResourceBundle");
14694 c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", 
14695  function (baseName, locale, cause) {
14696 if (Clazz_instanceOf (cause, java.util.MissingResourceException)) {
14697 cause = null;
14698 }throw  new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause);
14699 }, "~S,java.util.Locale,Throwable");
14700 c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", 
14701  function (cacheKey, control) {
14702 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14703 if (bundleRef == null) {
14704 return null;
14705 }var bundle = bundleRef;
14706 return bundle;
14707 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control");
14708 c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", 
14709  function (cacheKey, bundle, control) {
14710 var key = cacheKey.clone ();
14711 java.util.ResourceBundle.cacheList.put (key, bundle);
14712 return bundle;
14713 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control");
14714 c$.clearCache = Clazz_defineMethod (c$, "clearCache", 
14715 function () {
14716 java.util.ResourceBundle.cacheList.clear ();
14717 });
14718 Clazz_defineMethod (c$, "containsKey", 
14719 function (key) {
14720 if (key == null) {
14721 throw  new NullPointerException ();
14722 }for (var rb = this; rb != null; rb = rb.parent) {
14723 if (rb.handleKeySet ().contains (key)) {
14724 return true;
14725 }}
14726 return false;
14727 }, "~S");
14728 Clazz_defineMethod (c$, "keySet", 
14729 function () {
14730 var keys =  new java.util.HashSet ();
14731 for (var rb = this; rb != null; rb = rb.parent) {
14732 keys.addAll (rb.handleKeySet ());
14733 }
14734 return keys;
14735 });
14736 Clazz_defineMethod (c$, "handleKeySet", 
14737 function () {
14738 if (this.$keySet == null) {
14739 {
14740 if (this.$keySet == null) {
14741 var keys =  new java.util.HashSet ();
14742 var enumKeys = this.getKeys ();
14743 while (enumKeys.hasMoreElements ()) {
14744 var key = enumKeys.nextElement ();
14745 if (this.handleGetObject (key) != null) {
14746 keys.add (key);
14747 }}
14748 this.$keySet = keys;
14749 }}}return this.$keySet;
14750 });
14751 c$.$ResourceBundle$1$ = function () {
14752 Clazz_pu$h(self.c$);
14753 c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle);
14754 Clazz_defineMethod (c$, "getKeys", 
14755 function () {
14756 return null;
14757 });
14758 Clazz_defineMethod (c$, "handleGetObject", 
14759 function (key) {
14760 return null;
14761 }, "~S");
14762 Clazz_overrideMethod (c$, "toString", 
14763 function () {
14764 return "NONEXISTENT_BUNDLE";
14765 });
14766 c$ = Clazz_p0p ();
14767 };
14768 Clazz_pu$h(self.c$);
14769 c$ = Clazz_decorateAsClass (function () {
14770 this.name = null;
14771 this.locale = null;
14772 this.format = null;
14773 this.cause = null;
14774 this.hashCodeCache = 0;
14775 Clazz_instantialize (this, arguments);
14776 }, java.util.ResourceBundle, "CacheKey", null, Cloneable);
14777 Clazz_makeConstructor (c$, 
14778 function (a, b, c) {
14779 this.name = a;
14780 this.locale = b;
14781 if (this.name != null) this.calculateHashCode ();
14782 }, "~S,java.util.Locale,~O");
14783 Clazz_defineMethod (c$, "getName", 
14784 function () {
14785 return this.name;
14786 });
14787 Clazz_defineMethod (c$, "getLocale", 
14788 function () {
14789 return this.locale;
14790 });
14791 Clazz_defineMethod (c$, "setLocale", 
14792 function (a) {
14793 if (!this.locale.equals (a)) {
14794 this.locale = a;
14795 this.calculateHashCode ();
14796 }return this;
14797 }, "java.util.Locale");
14798 Clazz_overrideMethod (c$, "equals", 
14799 function (a) {
14800 if (this === a) {
14801 return true;
14802 }try {
14803 var b = a;
14804 if (this.hashCodeCache != b.hashCodeCache) {
14805 return false;
14806 }if (!this.name.equals (b.name)) {
14807 return false;
14808 }if (!this.locale.equals (b.locale)) {
14809 return false;
14810 }return true;
14811 } catch (e$$) {
14812 if (Clazz_exceptionOf (e$$, NullPointerException)) {
14813 var e = e$$;
14814 {
14815 }
14816 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
14817 var e = e$$;
14818 {
14819 }
14820 } else {
14821 throw e$$;
14822 }
14823 }
14824 return false;
14825 }, "~O");
14826 Clazz_overrideMethod (c$, "hashCode", 
14827 function () {
14828 return this.hashCodeCache;
14829 });
14830 Clazz_defineMethod (c$, "calculateHashCode", 
14831  function () {
14832 this.hashCodeCache = this.name.hashCode () << 3;
14833 this.hashCodeCache ^= this.locale.hashCode ();
14834 });
14835 Clazz_defineMethod (c$, "clone", 
14836 function () {
14837 try {
14838 var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []);
14839 a.cause = null;
14840 return a;
14841 } catch (e) {
14842 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
14843 throw  new InternalError ();
14844 } else {
14845 throw e;
14846 }
14847 }
14848 });
14849 Clazz_defineMethod (c$, "setFormat", 
14850 function (a) {
14851 this.format = a;
14852 }, "~S");
14853 Clazz_defineMethod (c$, "setCause", 
14854  function (a) {
14855 if (this.cause == null) {
14856 this.cause = a;
14857 } else {
14858 if (Clazz_instanceOf (this.cause, ClassNotFoundException)) {
14859 this.cause = a;
14860 }}}, "Throwable");
14861 Clazz_defineMethod (c$, "getCause", 
14862  function () {
14863 return this.cause;
14864 });
14865 Clazz_overrideMethod (c$, "toString", 
14866 function () {
14867 var a = this.locale.toString ();
14868 if (a.length == 0) {
14869 if (this.locale.getVariant ().length != 0) {
14870 a = "__" + this.locale.getVariant ();
14871 } else {
14872 a = "\"\"";
14873 }}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]";
14874 });
14875 c$ = Clazz_p0p ();
14876 Clazz_pu$h(self.c$);
14877 c$ = Clazz_declareType (java.util.ResourceBundle, "Control");
14878 Clazz_makeConstructor (c$, 
14879 function () {
14880 });
14881 c$.getControl = Clazz_defineMethod (c$, "getControl", 
14882 function (a) {
14883 if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14884 return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY;
14885 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14886 return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY;
14887 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14888 return java.util.ResourceBundle.Control.INSTANCE;
14889 }throw  new IllegalArgumentException ();
14890 }, "java.util.List");
14891 c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", 
14892 function (a) {
14893 if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14894 return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK;
14895 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14896 return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK;
14897 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14898 return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK;
14899 }throw  new IllegalArgumentException ();
14900 }, "java.util.List");
14901 Clazz_defineMethod (c$, "getFormats", 
14902 function (a) {
14903 if (a == null) {
14904 throw  new NullPointerException ();
14905 }return java.util.ResourceBundle.Control.FORMAT_DEFAULT;
14906 }, "~S");
14907 Clazz_defineMethod (c$, "getCandidateLocales", 
14908 function (a, b) {
14909 if (a == null) {
14910 throw  new NullPointerException ();
14911 }var c = b.getLanguage ();
14912 var d = b.getCountry ();
14913 var e = b.getVariant ();
14914 var f =  new java.util.ArrayList (4);
14915 if (e.length > 0) {
14916 f.add (b);
14917 }if (d.length > 0) {
14918 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, ""));
14919 }if (c.length > 0) {
14920 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", ""));
14921 }f.add (java.util.Locale.ROOT);
14922 return f;
14923 }, "~S,java.util.Locale");
14924 Clazz_defineMethod (c$, "getFallbackLocale", 
14925 function (a, b) {
14926 if (a == null) {
14927 throw  new NullPointerException ();
14928 }var c = java.util.Locale.getDefault ();
14929 return b.equals (c) ? null : c;
14930 }, "~S,java.util.Locale");
14931 Clazz_defineMethod (c$, "newBundle", 
14932 function (a, b, c, d, e) {
14933 var f = this.toBundleName (a, b);
14934 var g = null;
14935 if (c.equals ("java.class")) {
14936 g = swingjs.api.Interface.getInstance (f, false);
14937 } else if (c.equals ("java.properties")) {
14938 var h = this.toResourceName0 (f, "properties");
14939 if (h == null) {
14940 return null;
14941 }var i = swingjs.JSToolkit.getJavaResource (h);
14942 var j = null;
14943 j = (i == null ? null :  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ())));
14944 if (j != null) {
14945 try {
14946 g = this.newPropertyBundle (j);
14947 } finally {
14948 j.close ();
14949 }
14950 }} else {
14951 throw  new IllegalArgumentException ("unknown format: " + c);
14952 }return g;
14953 }, "~S,java.util.Locale,~S,~O,~B");
14954 Clazz_defineMethod (c$, "newPropertyBundle", 
14955  function (a) {
14956 return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a);
14957 }, "java.io.InputStream");
14958 Clazz_defineMethod (c$, "getTimeToLive", 
14959 function (a, b) {
14960 if (a == null || b == null) {
14961 throw  new NullPointerException ();
14962 }return -2;
14963 }, "~S,java.util.Locale");
14964 Clazz_defineMethod (c$, "toBundleName", 
14965 function (a, b) {
14966 if (b === java.util.Locale.ROOT) {
14967 return a;
14968 }var c = b.getLanguage ();
14969 var d = b.getCountry ();
14970 var e = b.getVariant ();
14971 if (c === "" && d === "" && e === "") {
14972 return a;
14973 }var f =  new StringBuilder (a);
14974 f.append ('_');
14975 if (e !== "") {
14976 f.append (c).append ('_').append (d).append ('_').append (e);
14977 } else if (d !== "") {
14978 f.append (c).append ('_').append (d);
14979 } else {
14980 f.append (c);
14981 }return f.toString ();
14982 }, "~S,java.util.Locale");
14983 Clazz_defineMethod (c$, "toResourceName", 
14984 function (a, b) {
14985 var c =  new StringBuilder (a.length + 1 + b.length);
14986 c.append (a.$replace ('.', '/')).append ('.').append (b);
14987 return c.toString ();
14988 }, "~S,~S");
14989 Clazz_defineMethod (c$, "toResourceName0", 
14990  function (a, b) {
14991 if (a.contains ("://")) {
14992 return null;
14993 } else {
14994 return this.toResourceName (a, b);
14995 }}, "~S,~S");
14996 c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"]));
14997 c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"]));
14998 c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"]));
14999 Clazz_defineStatics (c$,
15000 "TTL_DONT_CACHE", -1,
15001 "TTL_NO_EXPIRATION_CONTROL", -2);
15002 c$.INSTANCE = c$.prototype.INSTANCE =  new java.util.ResourceBundle.Control ();
15003 c$ = Clazz_p0p ();
15004 Clazz_pu$h(self.c$);
15005 c$ = Clazz_decorateAsClass (function () {
15006 this.formats = null;
15007 Clazz_instantialize (this, arguments);
15008 }, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control);
15009 Clazz_makeConstructor (c$, 
15010 function (a) {
15011 Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []);
15012 this.formats = a;
15013 }, "java.util.List");
15014 Clazz_overrideMethod (c$, "getFormats", 
15015 function (a) {
15016 if (a == null) {
15017 throw  new NullPointerException ();
15018 }return this.formats;
15019 }, "~S");
15020 c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
15021 c$.CLASS_ONLY = c$.prototype.CLASS_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
15022 c$ = Clazz_p0p ();
15023 Clazz_pu$h(self.c$);
15024 c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl);
15025 Clazz_overrideMethod (c$, "getFallbackLocale", 
15026 function (a, b) {
15027 if (a == null || b == null) {
15028 throw  new NullPointerException ();
15029 }return null;
15030 }, "~S,java.util.Locale");
15031 c$.NO_FALLBACK = c$.prototype.NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT);
15032 c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
15033 c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
15034 c$ = Clazz_p0p ();
15035 Clazz_defineStatics (c$,
15036 "INITIAL_CACHE_SIZE", 32);
15037 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));
15038 c$.cacheList = c$.prototype.cacheList =  new java.util.HashMap (32);
15039 });
15040 Clazz_declarePackage ("java.applet");
15041 Clazz_load (["java.awt.Panel"], "java.applet.Applet", ["java.net.URL", "java.util.Locale"], function () {
15042 c$ = Clazz_decorateAsClass (function () {
15043 this.stub = null;
15044 Clazz_instantialize (this, arguments);
15045 }, java.applet, "Applet", java.awt.Panel);
15046 Clazz_makeConstructor (c$, 
15047 function () {
15048 Clazz_superConstructor (this, java.applet.Applet, []);
15049 this.setPanel ();
15050 });
15051 Clazz_defineMethod (c$, "setStub", 
15052 function (stub) {
15053 this.stub = stub;
15054 }, "java.applet.AppletStub");
15055 Clazz_defineMethod (c$, "isActive", 
15056 function () {
15057 if (this.stub != null) {
15058 return this.stub.isActive ();
15059 } else {
15060 return false;
15061 }});
15062 Clazz_defineMethod (c$, "getDocumentBase", 
15063 function () {
15064 return this.stub.getDocumentBase ();
15065 });
15066 Clazz_defineMethod (c$, "getCodeBase", 
15067 function () {
15068 return this.stub.getCodeBase ();
15069 });
15070 Clazz_defineMethod (c$, "getParameter", 
15071 function (name) {
15072 return this.stub.getParameter (name);
15073 }, "~S");
15074 Clazz_defineMethod (c$, "getAppletContext", 
15075 function () {
15076 return this.stub.getAppletContext ();
15077 });
15078 Clazz_defineMethod (c$, "resize", 
15079 function (width, height) {
15080 var d = this.size ();
15081 if ((d.width != width) || (d.height != height)) {
15082 Clazz_superCall (this, java.applet.Applet, "resize", [width, height]);
15083 if (this.stub != null) {
15084 this.stub.appletResize (width, height);
15085 }}}, "~N,~N");
15086 Clazz_defineMethod (c$, "resize", 
15087 function (d) {
15088 this.resize (d.width, d.height);
15089 }, "java.awt.Dimension");
15090 Clazz_defineMethod (c$, "showStatus", 
15091 function (msg) {
15092 this.getAppletContext ().showStatus (msg);
15093 }, "~S");
15094 Clazz_defineMethod (c$, "getImage", 
15095 function (url) {
15096 return this.getAppletContext ().getImage (url);
15097 }, "java.net.URL");
15098 Clazz_defineMethod (c$, "getImage", 
15099 function (url, name) {
15100 try {
15101 return this.getImage ( new java.net.URL (url, name));
15102 } catch (e) {
15103 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
15104 return null;
15105 } else {
15106 throw e;
15107 }
15108 }
15109 }, "java.net.URL,~S");
15110 Clazz_defineMethod (c$, "getAppletInfo", 
15111 function () {
15112 return null;
15113 });
15114 Clazz_defineMethod (c$, "getLocale", 
15115 function () {
15116 var locale = Clazz_superCall (this, java.applet.Applet, "getLocale", []);
15117 if (locale == null) {
15118 return java.util.Locale.getDefault ();
15119 }return locale;
15120 });
15121 Clazz_defineMethod (c$, "getParameterInfo", 
15122 function () {
15123 return null;
15124 });
15125 Clazz_defineMethod (c$, "init", 
15126 function () {
15127 });
15128 Clazz_defineMethod (c$, "start", 
15129 function () {
15130 });
15131 Clazz_defineMethod (c$, "stop", 
15132 function () {
15133 });
15134 Clazz_defineMethod (c$, "destroy", 
15135 function () {
15136 });
15137 });
15138 Clazz_declarePackage ("java.net");
15139 Clazz_load (["java.util.Hashtable"], "java.net.URL", ["java.io.IOException", "java.lang.Character", "$.Error", "java.net.MalformedURLException"], function () {
15140 c$ = Clazz_decorateAsClass (function () {
15141 this.protocol = null;
15142 this.host = null;
15143 this.port = -1;
15144 this.file = null;
15145 this.query = null;
15146 this.authority = null;
15147 this.path = null;
15148 this.userInfo = null;
15149 this.ref = null;
15150 this.handler = null;
15151 this.$hashCode = -1;
15152 Clazz_instantialize (this, arguments);
15153 }, java.net, "URL", null, java.io.Serializable);
15154 Clazz_makeConstructor (c$, 
15155 function (context, spec, handler) {
15156 {
15157 switch (arguments.length) {
15158 case 1:
15159 spec = context;context = handler = null;
15160 break;
15161 case 2:
15162 handler = null;
15163 break;
15164 case 3:
15165 if (context == null || Clazz_instanceOf(context, java.net.URL))
15166 break;
15167 default:
15168 alert("java.net.URL constructor format not supported");
15169 break;
15170 }
15171 context && context.valueOf && context.valueOf() == null && (context = null);
15172 }var original = spec;
15173 var i;
15174 var limit;
15175 var c;
15176 var start = 0;
15177 var newProtocol = null;
15178 var aRef = false;
15179 var isRelative = false;
15180 try {
15181 limit = spec.length;
15182 while ((limit > 0) && (spec.charAt (limit - 1) <= ' ')) {
15183 limit--;
15184 }
15185 while ((start < limit) && (spec.charAt (start) <= ' ')) {
15186 start++;
15187 }
15188 if (spec.regionMatches (true, start, "url:", 0, 4)) {
15189 start += 4;
15190 }if (start < spec.length && spec.charAt (start) == '#') {
15191 aRef = true;
15192 }for (i = start; !aRef && (i < limit) && ((c = spec.charCodeAt (i)) != 47); i++) {
15193 if (c == 58) {
15194 var s = spec.substring (start, i).toLowerCase ();
15195 if (this.isValidProtocol (s)) {
15196 newProtocol = s;
15197 start = i + 1;
15198 }break;
15199 }}
15200 this.protocol = newProtocol;
15201 if ((context != null) && ((newProtocol == null) || newProtocol.equalsIgnoreCase (context.protocol))) {
15202 if (handler == null) {
15203 handler = context.handler;
15204 }if (context.path != null && context.path.startsWith ("/")) newProtocol = null;
15205 if (newProtocol == null) {
15206 this.protocol = context.protocol;
15207 this.authority = context.authority;
15208 this.userInfo = context.userInfo;
15209 this.host = context.host;
15210 this.port = context.port;
15211 this.file = context.file;
15212 this.path = context.path;
15213 isRelative = true;
15214 }}if (this.protocol == null) {
15215 throw  new java.net.MalformedURLException ("no protocol: " + original);
15216 }if (handler == null && (handler = java.net.URL.getURLStreamHandler (this.protocol)) == null) {
15217 throw  new java.net.MalformedURLException ("unknown protocol: " + this.protocol);
15218 }this.handler = handler;
15219 i = spec.indexOf ('#', start);
15220 if (i >= 0) {
15221 this.ref = spec.substring (i + 1, limit);
15222 limit = i;
15223 }if (isRelative && start == limit) {
15224 this.query = context.query;
15225 if (this.ref == null) {
15226 this.ref = context.ref;
15227 }}handler.parseURL (this, spec, start, limit);
15228 } catch (e$$) {
15229 if (Clazz_exceptionOf (e$$, java.net.MalformedURLException)) {
15230 var e = e$$;
15231 {
15232 throw e;
15233 }
15234 } else if (Clazz_exceptionOf (e$$, Exception)) {
15235 var e = e$$;
15236 {
15237 var exception =  new java.net.MalformedURLException (e.getMessage ());
15238 exception.initCause (e);
15239 throw exception;
15240 }
15241 } else {
15242 throw e$$;
15243 }
15244 }
15245 }, "java.net.URL,~S,java.net.URLStreamHandler");
15246 Clazz_defineMethod (c$, "isValidProtocol", 
15247  function (protocol) {
15248 var len = protocol.length;
15249 if (len < 1) return false;
15250 var c = protocol.charAt (0);
15251 if (!Character.isLetter (c)) return false;
15252 for (var i = 1; i < len; i++) {
15253 c = protocol.charAt (i);
15254 if (!Character.isLetterOrDigit (c) && c != '.' && c != '+' && c != '-') {
15255 return false;
15256 }}
15257 return true;
15258 }, "~S");
15259 Clazz_defineMethod (c$, "set5", 
15260 function (protocol, host, port, file, ref) {
15261 {
15262 this.protocol = protocol;
15263 this.host = host;
15264 this.authority = port == -1 ? host : host + ":" + port;
15265 this.port = port;
15266 this.file = file;
15267 this.ref = ref;
15268 this.$hashCode = -1;
15269 var q = file.lastIndexOf ('?');
15270 if (q != -1) {
15271 this.query = file.substring (q + 1);
15272 this.path = file.substring (0, q);
15273 } else this.path = file;
15274 }}, "~S,~S,~N,~S,~S");
15275 Clazz_defineMethod (c$, "set", 
15276 function (protocol, host, port, authority, userInfo, path, query, ref) {
15277 {
15278 this.protocol = protocol;
15279 this.host = host;
15280 this.port = port;
15281 this.file = query == null ? path : path + "?" + query;
15282 this.userInfo = userInfo;
15283 this.path = path;
15284 this.ref = ref;
15285 this.$hashCode = -1;
15286 this.query = query;
15287 this.authority = authority;
15288 }}, "~S,~S,~N,~S,~S,~S,~S,~S");
15289 Clazz_defineMethod (c$, "getQuery", 
15290 function () {
15291 return this.query;
15292 });
15293 Clazz_defineMethod (c$, "getPath", 
15294 function () {
15295 return this.path;
15296 });
15297 Clazz_defineMethod (c$, "getUserInfo", 
15298 function () {
15299 return this.userInfo;
15300 });
15301 Clazz_defineMethod (c$, "getAuthority", 
15302 function () {
15303 return this.authority;
15304 });
15305 Clazz_defineMethod (c$, "getPort", 
15306 function () {
15307 return this.port;
15308 });
15309 Clazz_defineMethod (c$, "getDefaultPort", 
15310 function () {
15311 return this.handler.getDefaultPort ();
15312 });
15313 Clazz_defineMethod (c$, "getProtocol", 
15314 function () {
15315 return this.protocol;
15316 });
15317 Clazz_defineMethod (c$, "getHost", 
15318 function () {
15319 return this.host;
15320 });
15321 Clazz_defineMethod (c$, "getFile", 
15322 function () {
15323 return this.file;
15324 });
15325 Clazz_defineMethod (c$, "getRef", 
15326 function () {
15327 return this.ref;
15328 });
15329 Clazz_overrideMethod (c$, "equals", 
15330 function (obj) {
15331 if (!(Clazz_instanceOf (obj, java.net.URL))) return false;
15332 var u2 = obj;
15333 return this.handler.equals2 (this, u2);
15334 }, "~O");
15335 Clazz_overrideMethod (c$, "hashCode", 
15336 function () {
15337 if (this.$hashCode != -1) return this.$hashCode;
15338 this.$hashCode = this.handler.hashCode (this);
15339 return this.$hashCode;
15340 });
15341 Clazz_defineMethod (c$, "sameFile", 
15342 function (other) {
15343 return this.handler.sameFile (this, other);
15344 }, "java.net.URL");
15345 Clazz_overrideMethod (c$, "toString", 
15346 function () {
15347 return this.toExternalForm ();
15348 });
15349 Clazz_defineMethod (c$, "toExternalForm", 
15350 function () {
15351 return this.handler.toExternalForm (this);
15352 });
15353 Clazz_defineMethod (c$, "openConnection", 
15354 function () {
15355 return this.handler.openConnection (this);
15356 });
15357 Clazz_defineMethod (c$, "openStream", 
15358 function () {
15359 return this.openConnection ().getInputStream ();
15360 });
15361 Clazz_defineMethod (c$, "getContent", 
15362 function () {
15363 return this.openConnection ().getInputStream ();
15364 });
15365 c$.setURLStreamHandlerFactory = Clazz_defineMethod (c$, "setURLStreamHandlerFactory", 
15366 function (fac) {
15367 {
15368 if (java.net.URL.factory != null) {
15369 throw  new Error ("factory already defined");
15370 }var security = System.getSecurityManager ();
15371 if (security != null) {
15372 security.checkSetFactory ();
15373 }java.net.URL.handlers.clear ();
15374 java.net.URL.factory = fac;
15375 }}, "java.net.URLStreamHandlerFactory");
15376 c$.getURLStreamHandler = Clazz_defineMethod (c$, "getURLStreamHandler", 
15377 function (protocol) {
15378 var handler = java.net.URL.handlers.get (protocol);
15379 if (handler == null) {
15380 if (java.net.URL.factory != null) {
15381 handler = java.net.URL.factory.createURLStreamHandler (protocol);
15382 }}return handler;
15383 }, "~S");
15384 Clazz_defineStatics (c$,
15385 "factory", null);
15386 c$.handlers = c$.prototype.handlers =  new java.util.Hashtable ();
15387 c$.streamHandlerLock = c$.prototype.streamHandlerLock =  new Clazz._O ();
15388 });
15389
15390 // modified by Bob Hanson 3/21/2014 6:44:21 AM  to reduce this.b$[....] phrases to simply this.h$
15391 // BH added ability to use a non-Java key for HTML elements, for example.
15392 // BH 8/24/2014 8:48:58 PM all synchronization and inner classes removed
15393
15394
15395 Clazz_load([],"java.util.HashtableIterator",[],function(){
15396 c$=Clazz_decorateAsClass(function(){
15397 this.position=0;
15398 this.expectedModCount=0;
15399 this.type=null;
15400 this.lastEntry=null;
15401 this.lastPosition=0;
15402 this.canRemove=false;
15403 Clazz_instantialize(this,arguments);
15404 },java.util,"HashtableIterator",null,java.util.Iterator);
15405 Clazz_makeConstructor(c$,
15406 function(a){
15407 this.type=a;
15408 this.h$ = a.h$;
15409 this.position=this.h$.lastSlot;
15410 this.expectedModCount=this.h$.modCount;
15411 },"java.util.AbstractSet");
15412 Clazz_overrideMethod(c$,"hasNext",
15413 function(){
15414 if(this.lastEntry&&this.lastEntry.next){
15415 return true;
15416 }while(this.position>=this.h$.firstSlot){
15417 if(this.h$.elementData[this.position]==null){
15418 this.position--;
15419 }else{
15420 return true;
15421 }}
15422 return false;
15423 });
15424 Clazz_overrideMethod(c$,"next",
15425 function(){
15426 if(this.expectedModCount==this.h$.modCount){
15427 if(this.lastEntry){
15428 this.lastEntry=this.lastEntry.next;
15429 }if(this.lastEntry==null){
15430 while(this.position>=this.h$.firstSlot&&(this.lastEntry=this.h$.elementData[this.position])==null){
15431 this.position--;
15432 }
15433 if(this.lastEntry){
15434 this.lastPosition=this.position;
15435 this.position--;
15436 }}if(this.lastEntry){
15437 this.canRemove=true;
15438 return this.type.get(this.lastEntry);
15439 }throw new java.util.NoSuchElementException();
15440 }throw new java.util.ConcurrentModificationException();
15441 });
15442 Clazz_overrideMethod(c$,"remove",
15443 function(){
15444 if(this.expectedModCount==this.h$.modCount){
15445 if(this.canRemove){
15446 this.canRemove=false;
15447 {
15448 var a=false;
15449 var b=this.h$.elementData[this.lastPosition];
15450 if(b===this.lastEntry){
15451 this.h$.elementData[this.lastPosition]=b.next;
15452 a=true;
15453 }else{
15454 while(b&&b.next!==this.lastEntry){
15455 b=b.next;
15456 }
15457 if(b){
15458 b.next=this.lastEntry.next;
15459 a=true;
15460 }}if(a){
15461 this.h$.modCount++;
15462 this.h$.elementCount--;
15463 this.expectedModCount++;
15464 return;
15465 }}}else{
15466 throw new IllegalStateException();
15467 }}throw new java.util.ConcurrentModificationException();
15468 });
15469 });
15470
15471
15472
15473 ////////////////////////////
15474
15475
15476 Clazz_load([],"java.util.HashtableEnumerator",[],function(){
15477 c$=Clazz_decorateAsClass(function(){
15478 this.key=false;
15479 this.start=0;
15480 this.entry=null;
15481 Clazz_instantialize(this,arguments);
15482 },java.util,"HashtableEnumerator",null,java.util.Enumeration);
15483
15484 Clazz_makeConstructor(c$,
15485 function(a, b){
15486 this.key = a;
15487 this.h$ = b;
15488 if (this.h$)this.start=this.h$.lastSlot+1;
15489 },"~B,java.util.Hashtable");
15490 Clazz_overrideMethod(c$,"hasMoreElements",
15491 function(){
15492 if (!this.h$)return false;
15493 if(this.entry)return true;
15494
15495 while(--this.start>=this.h$.firstSlot){
15496 if(this.h$.elementData[this.start]){
15497 this.entry=this.h$.elementData[this.start];
15498 return true;
15499 }}
15500 return false;
15501 });
15502 Clazz_overrideMethod(c$,"nextElement",
15503 function(){
15504 if(this.hasMoreElements()){
15505 var a=this.key?this.entry.key:this.entry.value;
15506 this.entry=this.entry.next;
15507 return a;
15508 }
15509 throw new java.util.NoSuchElementException();
15510 });
15511 });
15512
15513 ////////////////////////////
15514
15515 Clazz_load([],"java.util.HashtableEntrySet",[],function(){
15516 c$=Clazz_decorateAsClass(function(){
15517 Clazz_instantialize(this,arguments);
15518 },java.util,"HashtableEntrySet",java.util.AbstractSet);
15519
15520 Clazz_makeConstructor(c$,
15521 function(a){
15522 this.h$ = a;
15523 },"java.util.Hashtable");
15524 Clazz_overrideMethod(c$,"size",
15525 function(){
15526 return this.h$.elementCount;
15527 });
15528 Clazz_overrideMethod(c$,"clear",
15529 function(){
15530 this.h$.clear();
15531 });
15532 Clazz_overrideMethod(c$,"remove",
15533 function(object){
15534 if(this.contains(object)){
15535 this.h$.remove((object).getKey());
15536 return true;
15537 }return false;
15538 },"~O");
15539 Clazz_defineMethod(c$,"contains",
15540 function(object){
15541 var entry=this.h$.getEntry((object).getKey());
15542 return object.equals(entry);
15543 },"~O");
15544
15545 Clazz_overrideMethod(c$,"get",
15546 function(entry){
15547 return entry;
15548 },"java.util.MapEntry");
15549
15550 Clazz_defineMethod(c$,"iterator",
15551 function(){
15552 return new java.util.HashtableIterator(this);
15553 });
15554 });
15555
15556
15557 ////////////////////////////
15558
15559 Clazz_load([],"java.util.HashtableKeySet",[],function(){
15560 c$=Clazz_decorateAsClass(function(){
15561 Clazz_instantialize(this,arguments);
15562 },java.util,"HashtableKeySet",java.util.AbstractSet);
15563
15564 Clazz_makeConstructor(c$,
15565 function(a){
15566 this.h$ = a;
15567 },"java.util.Hashtable");
15568
15569 Clazz_overrideMethod(c$,"contains",
15570 function(object){
15571 return this.h$.containsKey(object);
15572 },"~O");
15573 Clazz_overrideMethod(c$,"size",
15574 function(){
15575 return this.h$.elementCount;
15576 });
15577 Clazz_overrideMethod(c$,"clear",
15578 function(){
15579 this.h$.clear();
15580 });
15581 Clazz_overrideMethod(c$,"remove",
15582 function(key){
15583 if(this.h$.containsKey(key)){
15584 this.h$.remove(key);
15585 return true;
15586 }return false;
15587 },"~O");
15588
15589 Clazz_overrideMethod(c$,"get",
15590 function(entry){
15591 return entry.key;
15592 },"java.util.MapEntry");
15593
15594 Clazz_overrideMethod(c$,"iterator",
15595 function(){
15596 return new java.util.HashtableIterator(this);
15597 });
15598 });
15599
15600 ////////////////////////////
15601
15602 Clazz_load([],"java.util.HashtableValueCollection",[],function(){
15603 c$=Clazz_decorateAsClass(function(){
15604 Clazz_instantialize(this,arguments);
15605 },java.util,"HashtableValueCollection",null,java.util.AbstractCollection);
15606
15607 Clazz_makeConstructor(c$,
15608 function(a){
15609 this.h$ = a;
15610 },"java.util.Hashtable");
15611 Clazz_overrideMethod(c$,"contains",
15612 function(object){
15613 return this.h$.contains(object);
15614 },"~O");
15615 Clazz_overrideMethod(c$,"size",
15616 function(){
15617 return this.h$.elementCount;
15618 });
15619 Clazz_overrideMethod(c$,"clear",
15620 function(){
15621 this.h$.clear();
15622 });
15623
15624 Clazz_overrideMethod(c$,"get",
15625 function(entry){
15626 return entry.value;
15627 },"java.util.MapEntry");
15628
15629 Clazz_overrideMethod(c$,"iterator",
15630 function(){
15631 return new java.util.HashtableIterator(this);
15632 });
15633 });
15634 ////////////////////////////
15635
15636
15637 Clazz_load(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){
15638 c$=Clazz_decorateAsClass(function(){
15639 this.next=null;
15640 this.hashcode=0;
15641 Clazz_instantialize(this,arguments);
15642 },java.util,"HashtableEntry",java.util.MapEntry);
15643 Clazz_overrideConstructor(c$,
15644 function(a,b){
15645 this.key = a;
15646 this.value = b;
15647 this.hashcode=a.hashCode();
15648 });
15649 Clazz_defineMethod(c$,"clone",
15650 function(){
15651 var a=Clazz_superCall(this,java.util.HashtableEntry,"clone",[]);
15652 if(this.next!=null){
15653 a.next=this.next.clone();
15654 }
15655 return a;
15656 });
15657 Clazz_overrideMethod(c$,"setValue",
15658 function(a){
15659 if(a==null){
15660 throw new NullPointerException();
15661 }var b=this.value;
15662 this.value=a;
15663 return b;
15664 },"~O");
15665 Clazz_defineMethod(c$,"getKeyHash",
15666 function(){
15667 return this.key.hashCode();
15668 });
15669 Clazz_defineMethod(c$,"equalsKey",
15670 function(a,b){
15671 return this.hashcode==(!a.hashCode || a.hashCode())&&this.key.equals(a);
15672 },"~O,~N");
15673 Clazz_overrideMethod(c$,"toString",
15674 function(){
15675 return this.key+"="+this.value;
15676 });
15677 });
15678
15679
15680
15681 ////////////////////////////
15682
15683
15684 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(){
15685 c$=Clazz_decorateAsClass(function(){
15686 this.elementCount=0;
15687 this.elementData=null;
15688 this.loadFactor=0;
15689 this.threshold=0;
15690 this.firstSlot=0;
15691 this.lastSlot=-1;
15692 this.modCount=0;
15693 Clazz_instantialize(this,arguments);
15694 },java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);   
15695 c$.newEntry=Clazz_defineMethod(c$,"newEntry",
15696 ($fz=function(key,value,hash){
15697 return new java.util.HashtableEntry(key,value);
15698 },$fz.isPrivate=true,$fz),"~O,~O,~N");
15699 Clazz_overrideConstructor(c$,
15700 function(){
15701 this.elementCount=0;
15702 this.elementData=this.newElementArray(11);
15703 this.firstSlot=this.elementData.length;
15704 this.loadFactor=0.75;
15705 this.computeMaxSize();
15706 });
15707 Clazz_defineMethod(c$,"newElementArray",
15708 ($fz=function(size){
15709 return new Array(size);
15710 },$fz.isPrivate=true,$fz),"~N");
15711 Clazz_overrideMethod(c$,"clear",
15712 function(){
15713 this.elementCount=0;
15714 for (var i = this.elementData.length; --i >= 0;)
15715           this.elementData[i] = null;
15716 this.modCount++;
15717 });
15718 Clazz_defineMethod(c$,"clone",
15719 function(){
15720 try{
15721 var hashtable=Clazz_superCall(this,java.util.Hashtable,"clone",[]);
15722 hashtable.elementData=this.elementData.clone();
15723 var entry;
15724 for(var i=this.elementData.length;--i>=0;){
15725 if((entry=this.elementData[i])){
15726 hashtable.elementData[i]=entry.clone();
15727 }}
15728 return hashtable;
15729 }catch(e){
15730 if(Clazz_instanceOf(e,CloneNotSupportedException)){
15731 return null;
15732 }else{
15733 throw e;
15734 }
15735 }
15736 });
15737 Clazz_defineMethod(c$,"computeMaxSize",
15738 ($fz=function(){
15739 this.threshold=Math.round((this.elementData.length*this.loadFactor));
15740 },$fz.isPrivate=true,$fz));
15741 Clazz_defineMethod(c$,"contains",
15742 function(value){
15743 if(value==null){
15744 throw new NullPointerException();
15745 }for(var i=this.elementData.length;--i>=0;){
15746 var entry=this.elementData[i];
15747 while(entry){
15748 if(value.equals(entry.value)){
15749 return true;
15750 }entry=entry.next;
15751 }
15752 }
15753 return false;
15754 },"~O");
15755 Clazz_overrideMethod(c$,"containsKey",
15756 function(key){
15757         if(!key.hashCode)  {
15758           key.hashCode = function(){return 1};
15759           if (!key.equals)
15760                 key.equals = function(a) {return this == a};
15761         }
15762 return this.getEntry(key)!=null ;
15763 },"~O");
15764 Clazz_overrideMethod(c$,"containsValue",
15765 function(value){
15766 return this.contains(value);
15767 },"~O");
15768 Clazz_overrideMethod(c$,"elements",
15769 function(){
15770 if(this.elementCount==0){
15771 return java.util.Hashtable.EMPTY_ENUMERATION;
15772 }
15773 return new java.util.HashtableEnumerator(false, this);
15774 });
15775 Clazz_overrideMethod(c$,"entrySet",
15776 function(){
15777 return new java.util.HashtableEntrySet(this);
15778 });
15779 Clazz_overrideMethod(c$,"equals",
15780 function(object){
15781 if(this===object){
15782 return true;
15783 }if(Clazz_instanceOf(object,java.util.Map)){
15784 var map=object;
15785 if(this.size()!=map.size()){
15786 return false;
15787 }var entries=this.entrySet();
15788 for(var e,$e=map.entrySet().iterator();$e.hasNext()&&((e=$e.next())||true);){
15789 if(!entries.contains(e)){
15790 return false;
15791 }}
15792 return true;
15793 }return false;
15794 },"~O");
15795 Clazz_overrideMethod(c$,"get",
15796 function(key){
15797         if(!key.hashCode) { 
15798           key.hashCode = function(){return 1};
15799         if (!key.equals)
15800                 key.equals = function(a) {return this == a};
15801         }
15802 var hash=key.hashCode();
15803 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15804 var entry=this.elementData[index];
15805 while(entry){
15806 if(entry.equalsKey(key,hash)){
15807 return entry.value;
15808 }entry=entry.next;
15809 }
15810 return null;
15811 },"~O");
15812 Clazz_defineMethod(c$,"getEntry",
15813 function(key){
15814 var hash=key.hashCode();
15815 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15816 var entry=this.elementData[index];
15817 while(entry){
15818 if(entry.equalsKey(key,hash)){
15819 return entry;
15820 }entry=entry.next;
15821 }
15822 return null;
15823 },"~O");
15824 Clazz_overrideMethod(c$,"hashCode",
15825 function(){
15826 var result=0;
15827 var it=this.entrySet().iterator();
15828 while(it.hasNext()){
15829 var entry=it.next();
15830 var key=entry.getKey();
15831 var value=entry.getValue();
15832 var hash=(key!==this?key.hashCode():0)^(value!==this?(value!=null?value.hashCode():0):0);
15833 result+=hash;
15834 }
15835 return result;
15836 });
15837 Clazz_overrideMethod(c$,"isEmpty",
15838 function(){
15839 return this.elementCount==0;
15840 });
15841 Clazz_overrideMethod(c$,"keys",
15842 function(){
15843 if(this.elementCount==0){
15844 return java.util.Hashtable.EMPTY_ENUMERATION;
15845 }
15846 return new java.util.HashtableEnumerator(true, this); 
15847 });
15848 Clazz_overrideMethod(c$,"keySet",
15849 function(){
15850 return new java.util.HashtableKeySet(this);
15851 });
15852 Clazz_overrideMethod(c$,"put",
15853 function(key,value){
15854 if(key!=null&&value!=null){
15855         if(!key.hashCode)  {
15856           key.hashCode = function(){return 1};
15857           if (!key.equals)
15858                 key.equals = function(a) {return this == a};
15859         }
15860         var hash=key.hashCode();
15861         var index=(hash&0x7FFFFFFF)%this.elementData.length;
15862         var entry=this.elementData[index];
15863         while(entry!=null&&!entry.equalsKey(key,hash)){
15864         entry=entry.next;
15865 }
15866 if(entry==null){
15867 this.modCount++;
15868 if(++this.elementCount>this.threshold){
15869 this.rehash();
15870 index=(hash&0x7FFFFFFF)%this.elementData.length;
15871 }if(index<this.firstSlot){
15872 this.firstSlot=index;
15873 }if(index>this.lastSlot){
15874 this.lastSlot=index;
15875 }
15876
15877 entry=java.util.Hashtable.newEntry(key,value,hash);
15878 entry.next=this.elementData[index];
15879 this.elementData[index]=entry;
15880 return null;
15881 }var result=entry.value;
15882 entry.value=value;
15883 return result;
15884 }throw new NullPointerException();
15885 },"~O,~O");
15886 Clazz_overrideMethod(c$,"putAll",
15887 function(map){
15888 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
15889 this.put(entry.getKey(),entry.getValue());
15890 }
15891 },"java.util.Map");
15892
15893 Clazz_defineMethod(c$,"rehash",
15894 function(){
15895 var length=(this.elementData.length<<1)+1;
15896 if(length==0){
15897 length=1;
15898 }var newFirst=length;
15899 var newLast=-1;
15900 var newData=this.newElementArray(length);
15901 for(var i=this.lastSlot+1;--i>=this.firstSlot;){
15902 var entry=this.elementData[i];
15903 while(entry!=null){
15904 var index=(entry.getKeyHash()&0x7FFFFFFF)%length;
15905 if(index<newFirst){
15906 newFirst=index;
15907 }if(index>newLast){
15908 newLast=index;
15909 }var next=entry.next;
15910 entry.next=newData[index];
15911 newData[index]=entry;
15912 entry=next;
15913 }
15914 }
15915 this.firstSlot=newFirst;
15916 this.lastSlot=newLast;
15917 this.elementData=newData;
15918 this.computeMaxSize();
15919 });
15920 Clazz_overrideMethod(c$,"remove",
15921 function(key){
15922 var hash=key.hashCode();
15923 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15924 var last=null;
15925 var entry=this.elementData[index];
15926 while(entry!=null&&!entry.equalsKey(key,hash)){
15927 last=entry;
15928 entry=entry.next;
15929 }
15930 if(entry!=null){
15931 this.modCount++;
15932 if(last==null){
15933 this.elementData[index]=entry.next;
15934 }else{
15935 last.next=entry.next;
15936 }this.elementCount--;
15937 var result=entry.value;
15938 entry.value=null;
15939 return result;
15940 }return null;
15941 },"~O");
15942 Clazz_overrideMethod(c$,"size",
15943 function(){
15944 return this.elementCount;
15945 });
15946 Clazz_overrideMethod(c$,"toString",
15947 function(){
15948 if(this.isEmpty()){
15949 return"{}";
15950 }var buffer=new StringBuilder(this.size()*28);
15951 buffer.append('{');
15952 for(var i=this.lastSlot;i>=this.firstSlot;i--){
15953 var entry=this.elementData[i];
15954 while(entry!=null){
15955 if(entry.key!==this){
15956 buffer.append(entry.key);
15957 }else{
15958 buffer.append("(this Map)");
15959 }buffer.append('=');
15960 if(entry.value!==this){
15961 buffer.append(entry.value);
15962 }else{
15963 buffer.append("(this Map)");
15964 }buffer.append(", ");
15965 entry=entry.next;
15966 }
15967 }
15968 if(this.elementCount>0){
15969 buffer.setLength(buffer.length()-2);
15970 }buffer.append('}');
15971 return buffer.toString();
15972 });
15973 Clazz_overrideMethod(c$,"values",
15974 function(){
15975 return new java.util.HashtableValueCollection(this);
15976 });
15977 java.util.Hashtable.EMPTY_ENUMERATION = new java.util.HashtableEnumerator();
15978 });
15979 c$=Clazz_declareType(java.util,"Dictionary");
15980 Clazz_makeConstructor(c$,
15981 function(){
15982 });
15983 Clazz_declarePackage ("java.net");
15984 Clazz_load (["java.io.IOException"], "java.net.MalformedURLException", null, function () {
15985 c$ = Clazz_declareType (java.net, "MalformedURLException", java.io.IOException);
15986 Clazz_makeConstructor (c$, 
15987 function () {
15988 Clazz_superConstructor (this, java.net.MalformedURLException, []);
15989 });
15990 });
15991 Clazz_declarePackage ("java.awt");
15992 Clazz_load (null, "java.awt.GraphicsEnvironment", ["swingjs.JSToolkit"], function () {
15993 c$ = Clazz_declareType (java.awt, "GraphicsEnvironment");
15994 Clazz_makeConstructor (c$, 
15995 function () {
15996 });
15997 c$.getLocalGraphicsEnvironment = Clazz_defineMethod (c$, "getLocalGraphicsEnvironment", 
15998 function () {
15999 if (java.awt.GraphicsEnvironment.localEnv == null) {
16000 java.awt.GraphicsEnvironment.localEnv = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsEnvironment");
16001 }return java.awt.GraphicsEnvironment.localEnv;
16002 });
16003 c$.isHeadless = Clazz_defineMethod (c$, "isHeadless", 
16004 function () {
16005 return false;
16006 });
16007 c$.getHeadlessProperty = Clazz_defineMethod (c$, "getHeadlessProperty", 
16008  function () {
16009 return false;
16010 });
16011 c$.checkHeadless = Clazz_defineMethod (c$, "checkHeadless", 
16012 function () {
16013 });
16014 Clazz_defineMethod (c$, "isHeadlessInstance", 
16015 function () {
16016 return java.awt.GraphicsEnvironment.getHeadlessProperty ();
16017 });
16018 Clazz_defineMethod (c$, "registerFont", 
16019 function (font) {
16020 return true;
16021 }, "java.awt.Font");
16022 Clazz_defineMethod (c$, "preferLocaleFonts", 
16023 function () {
16024 });
16025 Clazz_defineMethod (c$, "preferProportionalFonts", 
16026 function () {
16027 });
16028 Clazz_defineMethod (c$, "getCenterPoint", 
16029 function () {
16030 return null;
16031 });
16032 Clazz_defineStatics (c$,
16033 "localEnv", null);
16034 });
16035 Clazz_declarePackage ("java.awt.event");
16036 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.WindowEvent", ["java.awt.Window", "jssun.awt.AppContext", "$.SunToolkit"], function () {
16037 c$ = Clazz_decorateAsClass (function () {
16038 this.opposite = null;
16039 this.oldState = 0;
16040 this.newState = 0;
16041 Clazz_instantialize (this, arguments);
16042 }, java.awt.event, "WindowEvent", java.awt.event.ComponentEvent);
16043 Clazz_makeConstructor (c$, 
16044 function (source, id, opposite, oldState, newState) {
16045 Clazz_superConstructor (this, java.awt.event.WindowEvent, [source, id]);
16046 this.opposite = opposite;
16047 this.oldState = oldState;
16048 this.newState = newState;
16049 }, "java.awt.Window,~N,java.awt.Window,~N,~N");
16050 Clazz_makeConstructor (c$, 
16051 function (source, id, opposite) {
16052 this.construct (source, id, opposite, 0, 0);
16053 }, "java.awt.Window,~N,java.awt.Window");
16054 Clazz_makeConstructor (c$, 
16055 function (source, id, oldState, newState) {
16056 this.construct (source, id, null, oldState, newState);
16057 }, "java.awt.Window,~N,~N,~N");
16058 Clazz_makeConstructor (c$, 
16059 function (source, id) {
16060 this.construct (source, id, null, 0, 0);
16061 }, "java.awt.Window,~N");
16062 Clazz_defineMethod (c$, "getWindow", 
16063 function () {
16064 return (Clazz_instanceOf (this.source, java.awt.Window)) ? this.source : null;
16065 });
16066 Clazz_defineMethod (c$, "getOppositeWindow", 
16067 function () {
16068 if (this.opposite == null) {
16069 return null;
16070 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
16071 });
16072 Clazz_defineMethod (c$, "getOldState", 
16073 function () {
16074 return this.oldState;
16075 });
16076 Clazz_defineMethod (c$, "getNewState", 
16077 function () {
16078 return this.newState;
16079 });
16080 Clazz_overrideMethod (c$, "paramString", 
16081 function () {
16082 var typeStr;
16083 switch (this.id) {
16084 case 200:
16085 typeStr = "WINDOW_OPENED";
16086 break;
16087 case 201:
16088 typeStr = "WINDOW_CLOSING";
16089 break;
16090 case 202:
16091 typeStr = "WINDOW_CLOSED";
16092 break;
16093 case 203:
16094 typeStr = "WINDOW_ICONIFIED";
16095 break;
16096 case 204:
16097 typeStr = "WINDOW_DEICONIFIED";
16098 break;
16099 case 205:
16100 typeStr = "WINDOW_ACTIVATED";
16101 break;
16102 case 206:
16103 typeStr = "WINDOW_DEACTIVATED";
16104 break;
16105 case 207:
16106 typeStr = "WINDOW_GAINED_FOCUS";
16107 break;
16108 case 208:
16109 typeStr = "WINDOW_LOST_FOCUS";
16110 break;
16111 case 209:
16112 typeStr = "WINDOW_STATE_CHANGED";
16113 break;
16114 default:
16115 typeStr = "unknown type";
16116 }
16117 typeStr += ",opposite=" + this.getOppositeWindow () + ",oldState=" + this.oldState + ",newState=" + this.newState;
16118 return typeStr;
16119 });
16120 Clazz_defineStatics (c$,
16121 "WINDOW_FIRST", 200,
16122 "WINDOW_OPENED", 200,
16123 "WINDOW_CLOSING", 201,
16124 "WINDOW_CLOSED", 202,
16125 "WINDOW_ICONIFIED", 203,
16126 "WINDOW_DEICONIFIED", 204,
16127 "WINDOW_ACTIVATED", 205,
16128 "WINDOW_DEACTIVATED", 206,
16129 "WINDOW_GAINED_FOCUS", 207,
16130 "WINDOW_LOST_FOCUS", 208,
16131 "WINDOW_STATE_CHANGED", 209,
16132 "WINDOW_LAST", 209);
16133 });
16134 Clazz_declarePackage ("javax.swing");
16135 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 () {
16136 c$ = Clazz_decorateAsClass (function () {
16137 this.isAlignmentXSet = false;
16138 this.alignmentX = 0;
16139 this.isAlignmentYSet = false;
16140 this.alignmentY = 0;
16141 this.ui = null;
16142 this.listenerList = null;
16143 this.clientProperties = null;
16144 this.autoscrolls = false;
16145 this.border = null;
16146 this.flags = 0;
16147 this.verifyInputWhenFocusTarget = true;
16148 this.paintingChild = null;
16149 this.popupMenu = null;
16150 this.focusInputMap = null;
16151 this.ancestorInputMap = null;
16152 this.windowInputMap = null;
16153 this.actionMap = null;
16154 if (!Clazz_isClassDefined ("javax.swing.JComponent.ActionStandin")) {
16155 javax.swing.JComponent.$JComponent$ActionStandin$ ();
16156 }
16157 Clazz_instantialize (this, arguments);
16158 }, javax.swing, "JComponent", java.awt.Container);
16159 Clazz_prepareFields (c$, function () {
16160 this.listenerList =  new javax.swing.event.EventListenerList ();
16161 });
16162 c$.safelyGetGraphics = Clazz_defineMethod (c$, "safelyGetGraphics", 
16163 function (c, root) {
16164 {
16165 javax.swing.JComponent.componentObtainingGraphicsFrom = root;
16166 var g = c.getGraphics ();
16167 javax.swing.JComponent.componentObtainingGraphicsFrom = null;
16168 return g;
16169 }}, "java.awt.Component,java.awt.Component");
16170 c$.getGraphicsInvoked = Clazz_defineMethod (c$, "getGraphicsInvoked", 
16171 function (root) {
16172 if (!javax.swing.JComponent.isComponentObtainingGraphicsFrom (root)) {
16173 var rootPane = (root).getRootPane ();
16174 if (rootPane != null) {
16175 rootPane.disableTrueDoubleBuffering ();
16176 }}}, "java.awt.Component");
16177 c$.isComponentObtainingGraphicsFrom = Clazz_defineMethod (c$, "isComponentObtainingGraphicsFrom", 
16178  function (c) {
16179 {
16180 return (javax.swing.JComponent.componentObtainingGraphicsFrom === c);
16181 }}, "java.awt.Component");
16182 c$.getManagingFocusForwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusForwardTraversalKeys", 
16183 function () {
16184 {
16185 if (javax.swing.JComponent.managingFocusForwardTraversalKeys == null) {
16186 javax.swing.JComponent.managingFocusForwardTraversalKeys =  new java.util.HashSet (1);
16187 javax.swing.JComponent.managingFocusForwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 2));
16188 }}return javax.swing.JComponent.managingFocusForwardTraversalKeys;
16189 });
16190 c$.getManagingFocusBackwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusBackwardTraversalKeys", 
16191 function () {
16192 {
16193 if (javax.swing.JComponent.managingFocusBackwardTraversalKeys == null) {
16194 javax.swing.JComponent.managingFocusBackwardTraversalKeys =  new java.util.HashSet (1);
16195 javax.swing.JComponent.managingFocusBackwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 3));
16196 }}return javax.swing.JComponent.managingFocusBackwardTraversalKeys;
16197 });
16198 c$.fetchRectangle = Clazz_defineMethod (c$, "fetchRectangle", 
16199  function () {
16200 {
16201 var rect;
16202 var size = javax.swing.JComponent.tempRectangles.size ();
16203 if (size > 0) {
16204 rect = javax.swing.JComponent.tempRectangles.remove (size - 1);
16205 } else {
16206 rect =  new java.awt.Rectangle (0, 0, 0, 0);
16207 }return rect;
16208 }});
16209 c$.recycleRectangle = Clazz_defineMethod (c$, "recycleRectangle", 
16210  function (rect) {
16211 {
16212 javax.swing.JComponent.tempRectangles.add (rect);
16213 }}, "java.awt.Rectangle");
16214 Clazz_defineMethod (c$, "setInheritsPopupMenu", 
16215 function (value) {
16216 var oldValue = this.getFlag (23);
16217 this.setFlag (23, value);
16218 this.firePropertyChangeBool ("inheritsPopupMenu", oldValue, value);
16219 }, "~B");
16220 Clazz_defineMethod (c$, "getInheritsPopupMenu", 
16221 function () {
16222 return this.getFlag (23);
16223 });
16224 Clazz_defineMethod (c$, "setComponentPopupMenu", 
16225 function (popup) {
16226 if (popup != null) {
16227 this.enableEvents (16);
16228 }var oldPopup = this.popupMenu;
16229 this.popupMenu = popup;
16230 this.firePropertyChangeObject ("componentPopupMenu", oldPopup, popup);
16231 }, "javax.swing.JPopupMenu");
16232 Clazz_defineMethod (c$, "getComponentPopupMenu", 
16233 function () {
16234 if (!this.getInheritsPopupMenu ()) {
16235 return this.popupMenu;
16236 }if (this.popupMenu == null) {
16237 var parent = this.getParent ();
16238 while (parent != null) {
16239 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16240 return (parent).getComponentPopupMenu ();
16241 }if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
16242 break;
16243 }parent = parent.getParent ();
16244 }
16245 return null;
16246 }return this.popupMenu;
16247 });
16248 Clazz_makeConstructor (c$, 
16249 function () {
16250 Clazz_superConstructor (this, javax.swing.JComponent);
16251 this.enableEvents (8);
16252 Clazz_superCall (this, javax.swing.JComponent, "setLocale", [javax.swing.JComponent.getDefaultLocale ()]);
16253 });
16254 Clazz_defineMethod (c$, "updateUI", 
16255 function () {
16256 });
16257 Clazz_defineMethod (c$, "setUI", 
16258 function (newUI) {
16259 this.uninstallUIAndProperties ();
16260 this.ui = newUI;
16261 if (this.ui != null) {
16262 this.ui.installUI (this);
16263 }this.revalidate ();
16264 this.repaint ();
16265 }, "javax.swing.plaf.ComponentUI");
16266 Clazz_defineMethod (c$, "getUI", 
16267 function () {
16268 return this.ui;
16269 });
16270 Clazz_defineMethod (c$, "uninstallUIAndProperties", 
16271  function () {
16272 if (this.ui != null) {
16273 this.ui.uninstallUI (this);
16274 }});
16275 Clazz_defineMethod (c$, "getUIClassID", 
16276 function () {
16277 return "ComponentUI";
16278 });
16279 Clazz_defineMethod (c$, "getComponentGraphics", 
16280 function (g) {
16281 var componentGraphics = g;
16282 componentGraphics.setColor (this.getForeground ());
16283 componentGraphics.setFont (this.getFont ());
16284 return componentGraphics;
16285 }, "java.awt.Graphics");
16286 Clazz_defineMethod (c$, "paintComponent", 
16287 function (g) {
16288 if (this.ui != null) {
16289 var scratchGraphics = (g == null) ? null : g.createSwingJS ();
16290 try {
16291 this.ui.update (scratchGraphics, this);
16292 } finally {
16293 scratchGraphics.dispose ();
16294 }
16295 }}, "java.awt.Graphics");
16296 Clazz_defineMethod (c$, "paintChildren", 
16297 function (g) {
16298 var isJComponent;
16299 var sg = g;
16300 {
16301 var i = this.getComponentCount () - 1;
16302 if (i < 0) {
16303 return;
16304 }if (this.paintingChild != null && (Clazz_instanceOf (this.paintingChild, javax.swing.JComponent))) {
16305 for (; i >= 0; i--) {
16306 if (this.getComponent (i) === this.paintingChild) {
16307 break;
16308 }}
16309 }var tmpRect = javax.swing.JComponent.fetchRectangle ();
16310 for (; i >= 0; i--) {
16311 var comp = this.getComponent (i);
16312 isJComponent = (Clazz_instanceOf (comp, javax.swing.JComponent));
16313 if (comp != null && (isJComponent || javax.swing.JComponent.isLightweightComponent (comp)) && (comp.isVisible () == true)) {
16314 var cr = comp.getBounds (tmpRect);
16315 var cg = sg.create4 (cr.x, cr.y, cr.width, cr.height);
16316 cg.setColor (comp.getForeground ());
16317 cg.setFont (comp.getFont ());
16318 var shouldSetFlagBack = false;
16319 try {
16320 if (isJComponent) {
16321 (comp).paint (cg);
16322 } else {
16323 comp.paint (cg);
16324 }} finally {
16325 cg.dispose ();
16326 if (shouldSetFlagBack) {
16327 (comp).setFlag (1, false);
16328 (comp).setFlag (2, false);
16329 }}
16330 }}
16331 javax.swing.JComponent.recycleRectangle (tmpRect);
16332 }}, "java.awt.Graphics");
16333 Clazz_defineMethod (c$, "paintBorder", 
16334 function (g) {
16335 var border = this.getBorder ();
16336 if (border != null) {
16337 border.paintBorder (this, g, 0, 0, this.getWidth (), this.getHeight ());
16338 }}, "java.awt.Graphics");
16339 Clazz_overrideMethod (c$, "update", 
16340 function (g) {
16341 this.paint (g);
16342 }, "java.awt.Graphics");
16343 Clazz_overrideMethod (c$, "paint", 
16344 function (g) {
16345 var shouldClearPaintFlags = false;
16346 if ((this.getWidth () <= 0) || (this.getHeight () <= 0)) {
16347 return;
16348 }var componentGraphics = this.getComponentGraphics (g);
16349 var co = componentGraphics.createSwingJS ();
16350 try {
16351 if (this.getParent () != null && !(Clazz_instanceOf (this.getParent (), javax.swing.JComponent))) {
16352 this.adjustPaintFlags ();
16353 shouldClearPaintFlags = true;
16354 }this.paintComponent (co);
16355 this.paintBorder (co);
16356 this.paintChildren (co);
16357 } finally {
16358 co.dispose ();
16359 if (shouldClearPaintFlags) {
16360 this.setFlag (1, false);
16361 this.setFlag (2, false);
16362 this.setFlag (11, false);
16363 this.setFlag (12, false);
16364 }}
16365 }, "java.awt.Graphics");
16366 Clazz_defineMethod (c$, "paintForceDoubleBuffered", 
16367 function (g) {
16368 var rm = javax.swing.RepaintManager.currentManager (this);
16369 var clip = g.getClipBounds ();
16370 rm.beginPaint ();
16371 this.setFlag (13, true);
16372 try {
16373 rm.paint (this, this, g, clip.x, clip.y, clip.width, clip.height);
16374 } finally {
16375 rm.endPaint ();
16376 this.setFlag (13, false);
16377 }
16378 }, "java.awt.Graphics");
16379 Clazz_defineMethod (c$, "isPainting", 
16380 function () {
16381 var component = this;
16382 while (component != null) {
16383 if (Clazz_instanceOf (component, javax.swing.JComponent) && (component).getFlag (1)) {
16384 return true;
16385 }component = component.getParent ();
16386 }
16387 return false;
16388 });
16389 Clazz_defineMethod (c$, "adjustPaintFlags", 
16390  function () {
16391 var jparent = null;
16392 var parent;
16393 for (parent = this.getParent (); parent != null; parent = parent.getParent ()) {
16394 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16395 jparent = parent;
16396 if (jparent.getFlag (1)) this.setFlag (1, true);
16397 if (jparent.getFlag (2)) this.setFlag (2, true);
16398 if (jparent.getFlag (11)) this.setFlag (11, true);
16399 if (jparent.getFlag (12)) this.setFlag (12, true);
16400 break;
16401 }}
16402 });
16403 Clazz_overrideMethod (c$, "printAll", 
16404 function (g) {
16405 this.setFlag (12, true);
16406 try {
16407 this.print (g);
16408 } finally {
16409 this.setFlag (12, false);
16410 }
16411 }, "java.awt.Graphics");
16412 Clazz_overrideMethod (c$, "print", 
16413 function (g) {
16414 this.setFlag (11, true);
16415 this.firePropertyChangeBool ("paintingForPrint", false, true);
16416 try {
16417 this.paint (g);
16418 } finally {
16419 this.setFlag (11, false);
16420 this.firePropertyChangeBool ("paintingForPrint", true, false);
16421 }
16422 }, "java.awt.Graphics");
16423 Clazz_defineMethod (c$, "printComponent", 
16424 function (g) {
16425 this.paintComponent (g);
16426 }, "java.awt.Graphics");
16427 Clazz_defineMethod (c$, "printChildren", 
16428 function (g) {
16429 this.paintChildren (g);
16430 }, "java.awt.Graphics");
16431 Clazz_defineMethod (c$, "printBorder", 
16432 function (g) {
16433 this.paintBorder (g);
16434 }, "java.awt.Graphics");
16435 Clazz_defineMethod (c$, "isPaintingTile", 
16436 function () {
16437 return this.getFlag (2);
16438 });
16439 Clazz_defineMethod (c$, "isPaintingForPrint", 
16440 function () {
16441 return this.getFlag (11);
16442 });
16443 Clazz_defineMethod (c$, "isManagingFocus", 
16444 function () {
16445 return false;
16446 });
16447 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16448  function () {
16449 this.registerNextFocusableComponent (this.getNextFocusableComponent ());
16450 });
16451 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16452  function (nextFocusableComponent) {
16453 if (nextFocusableComponent == null) {
16454 return;
16455 }}, "java.awt.Component");
16456 Clazz_defineMethod (c$, "deregisterNextFocusableComponent", 
16457  function () {
16458 var nextFocusableComponent = this.getNextFocusableComponent ();
16459 if (nextFocusableComponent == null) {
16460 return;
16461 }var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16462 if (nearestRoot == null) {
16463 return;
16464 }});
16465 Clazz_defineMethod (c$, "setNextFocusableComponent", 
16466 function (aComponent) {
16467 var displayable = this.isDisplayable ();
16468 if (displayable) {
16469 this.deregisterNextFocusableComponent ();
16470 }this.putClientProperty ("nextFocus", aComponent);
16471 if (displayable) {
16472 this.registerNextFocusableComponent (aComponent);
16473 }}, "java.awt.Component");
16474 Clazz_defineMethod (c$, "getNextFocusableComponent", 
16475 function () {
16476 return this.getClientProperty ("nextFocus");
16477 });
16478 Clazz_defineMethod (c$, "setRequestFocusEnabled", 
16479 function (requestFocusEnabled) {
16480 this.setFlag (22, !requestFocusEnabled);
16481 }, "~B");
16482 Clazz_defineMethod (c$, "isRequestFocusEnabled", 
16483 function () {
16484 return !this.getFlag (22);
16485 });
16486 Clazz_defineMethod (c$, "requestFocus", 
16487 function (temporary) {
16488 Clazz_superCall (this, javax.swing.JComponent, "requestFocus", []);
16489 return true;
16490 }, "~B");
16491 Clazz_defineMethod (c$, "requestFocusInWindow", 
16492 function (temporary) {
16493 return Clazz_superCall (this, javax.swing.JComponent, "requestFocusInWindow", []);
16494 }, "~B");
16495 Clazz_defineMethod (c$, "grabFocus", 
16496 function () {
16497 this.requestFocus ();
16498 });
16499 Clazz_defineMethod (c$, "setVerifyInputWhenFocusTarget", 
16500 function (verifyInputWhenFocusTarget) {
16501 var oldVerifyInputWhenFocusTarget = this.verifyInputWhenFocusTarget;
16502 this.verifyInputWhenFocusTarget = verifyInputWhenFocusTarget;
16503 this.firePropertyChangeBool ("verifyInputWhenFocusTarget", oldVerifyInputWhenFocusTarget, verifyInputWhenFocusTarget);
16504 }, "~B");
16505 Clazz_defineMethod (c$, "getVerifyInputWhenFocusTarget", 
16506 function () {
16507 return this.verifyInputWhenFocusTarget;
16508 });
16509 Clazz_overrideMethod (c$, "getFontMetrics", 
16510 function (font) {
16511 return jssun.font.FontDesignMetrics.getMetrics (font);
16512 }, "java.awt.Font");
16513 Clazz_overrideMethod (c$, "getPreferredSize", 
16514 function () {
16515 return this.getPrefSizeJComp ();
16516 });
16517 Clazz_defineMethod (c$, "getPrefSizeJComp", 
16518 function () {
16519 var size = (this.isPreferredSizeSet () || this.ui == null ? null : this.ui.getPreferredSize (this));
16520 return (size == null ? this.preferredSize () : size);
16521 });
16522 Clazz_defineMethod (c$, "getMaximumSize", 
16523 function () {
16524 if (this.isMaximumSizeSet ()) {
16525 return Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16526 }var size = null;
16527 if (this.ui != null) {
16528 size = this.ui.getMaximumSize (this);
16529 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16530 });
16531 Clazz_defineMethod (c$, "getMinimumSize", 
16532 function () {
16533 if (this.isMinimumSizeSet ()) {
16534 return Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16535 }var size = null;
16536 if (this.ui != null) {
16537 size = this.ui.getMinimumSize (this);
16538 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16539 });
16540 Clazz_overrideMethod (c$, "contains", 
16541 function (x, y) {
16542 return (this.ui != null) ? this.ui.contains (this, x, y) : this.inside (x, y);
16543 }, "~N,~N");
16544 Clazz_defineMethod (c$, "setBorder", 
16545 function (border) {
16546 var oldBorder = this.border;
16547 this.border = border;
16548 this.firePropertyChangeObject ("border", oldBorder, border);
16549 if (border !== oldBorder) {
16550 if (border == null || oldBorder == null || !(border.getBorderInsets (this).equals (oldBorder.getBorderInsets (this)))) {
16551 this.revalidate ();
16552 }this.repaint ();
16553 }}, "javax.swing.border.Border");
16554 Clazz_defineMethod (c$, "getBorder", 
16555 function () {
16556 return this.border;
16557 });
16558 Clazz_defineMethod (c$, "getInsets", 
16559 function () {
16560 if (this.border != null) {
16561 return this.border.getBorderInsets (this);
16562 }return Clazz_superCall (this, javax.swing.JComponent, "getInsets", []);
16563 });
16564 Clazz_defineMethod (c$, "getInsets", 
16565 function (insets) {
16566 if (insets == null) {
16567 insets =  new java.awt.Insets (0, 0, 0, 0);
16568 }if (this.border != null) {
16569 if (Clazz_instanceOf (this.border, javax.swing.border.AbstractBorder)) {
16570 return (this.border).getBorderInsets (this, insets);
16571 } else {
16572 return this.border.getBorderInsets (this);
16573 }} else {
16574 insets.left = insets.top = insets.right = insets.bottom = 0;
16575 return insets;
16576 }}, "java.awt.Insets");
16577 Clazz_defineMethod (c$, "getAlignmentY", 
16578 function () {
16579 if (this.isAlignmentYSet) {
16580 return this.alignmentY;
16581 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentY", []);
16582 });
16583 Clazz_defineMethod (c$, "setAlignmentY", 
16584 function (alignmentY) {
16585 this.alignmentY = alignmentY > 1.0 ? 1.0 : alignmentY < 0.0 ? 0.0 : alignmentY;
16586 this.isAlignmentYSet = true;
16587 }, "~N");
16588 Clazz_defineMethod (c$, "getAlignmentX", 
16589 function () {
16590 if (this.isAlignmentXSet) {
16591 return this.alignmentX;
16592 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentX", []);
16593 });
16594 Clazz_defineMethod (c$, "setAlignmentX", 
16595 function (alignmentX) {
16596 this.alignmentX = alignmentX > 1.0 ? 1.0 : alignmentX < 0.0 ? 0.0 : alignmentX;
16597 this.isAlignmentXSet = true;
16598 }, "~N");
16599 Clazz_defineMethod (c$, "setInputVerifier", 
16600 function (inputVerifier) {
16601 var oldInputVerifier = this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16602 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER, inputVerifier);
16603 this.firePropertyChangeObject ("inputVerifier", oldInputVerifier, inputVerifier);
16604 }, "javax.swing.InputVerifier");
16605 Clazz_defineMethod (c$, "getInputVerifier", 
16606 function () {
16607 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16608 });
16609 Clazz_defineMethod (c$, "registerKeyboardAction", 
16610 function (anAction, aCommand, aKeyStroke, aCondition) {
16611 var inputMap = this.getInputMap (aCondition, true);
16612 if (inputMap != null) {
16613 var actionMap = this.getActionMap (true);
16614 var action = Clazz_innerTypeInstance (javax.swing.JComponent.ActionStandin, this, null, anAction, aCommand);
16615 inputMap.put (aKeyStroke, action);
16616 if (actionMap != null) {
16617 actionMap.put (action, action);
16618 }}}, "java.awt.event.ActionListener,~S,javax.swing.KeyStroke,~N");
16619 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16620  function (onlyIfNew) {
16621 var inputMap = this.getInputMap (2, false);
16622 var strokes;
16623 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16624 if (inputMap != null) {
16625 strokes = inputMap.allKeys ();
16626 if (strokes != null) {
16627 for (var counter = strokes.length - 1; counter >= 0; counter--) {
16628 if (!onlyIfNew || registered == null || registered.get (strokes[counter]) == null) {
16629 this.registerWithKeyboardManager (strokes[counter]);
16630 }if (registered != null) {
16631 registered.remove (strokes[counter]);
16632 }}
16633 }} else {
16634 strokes = null;
16635 }if (registered != null && registered.size () > 0) {
16636 var keys = registered.keys ();
16637 while (keys.hasMoreElements ()) {
16638 var ks = keys.nextElement ();
16639 this.unregisterWithKeyboardManager (ks);
16640 }
16641 registered.clear ();
16642 }if (strokes != null && strokes.length > 0) {
16643 if (registered == null) {
16644 registered =  new java.util.Hashtable (strokes.length);
16645 this.putClientProperty ("_WhenInFocusedWindow", registered);
16646 }for (var counter = strokes.length - 1; counter >= 0; counter--) {
16647 registered.put (strokes[counter], strokes[counter]);
16648 }
16649 } else {
16650 this.putClientProperty ("_WhenInFocusedWindow", null);
16651 }}, "~B");
16652 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16653  function () {
16654 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16655 if (registered != null && registered.size () > 0) {
16656 var keys = registered.keys ();
16657 while (keys.hasMoreElements ()) {
16658 var ks = keys.nextElement ();
16659 this.unregisterWithKeyboardManager (ks);
16660 }
16661 }this.putClientProperty ("_WhenInFocusedWindow", null);
16662 });
16663 Clazz_defineMethod (c$, "componentInputMapChanged", 
16664 function (inputMap) {
16665 var km = this.getInputMap (2, false);
16666 while (km !== inputMap && km != null) {
16667 km = km.getParent ();
16668 }
16669 if (km != null) {
16670 this.registerWithKeyboardManager (false);
16671 }}, "javax.swing.ComponentInputMap");
16672 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16673  function (aKeyStroke) {
16674 javax.swing.KeyboardManager.getCurrentManager ().registerKeyStroke (aKeyStroke, this);
16675 }, "javax.swing.KeyStroke");
16676 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16677  function (aKeyStroke) {
16678 javax.swing.KeyboardManager.getCurrentManager ().unregisterKeyStroke (aKeyStroke, this);
16679 }, "javax.swing.KeyStroke");
16680 Clazz_defineMethod (c$, "registerKeyboardAction", 
16681 function (anAction, aKeyStroke, aCondition) {
16682 this.registerKeyboardAction (anAction, null, aKeyStroke, aCondition);
16683 }, "java.awt.event.ActionListener,javax.swing.KeyStroke,~N");
16684 Clazz_defineMethod (c$, "unregisterKeyboardAction", 
16685 function (aKeyStroke) {
16686 var am = this.getActionMap (false);
16687 for (var counter = 0; counter < 3; counter++) {
16688 var km = this.getInputMap (counter, false);
16689 if (km != null) {
16690 var actionID = km.get (aKeyStroke);
16691 if (am != null && actionID != null) {
16692 am.remove (actionID);
16693 }km.remove (aKeyStroke);
16694 }}
16695 }, "javax.swing.KeyStroke");
16696 Clazz_defineMethod (c$, "getRegisteredKeyStrokes", 
16697 function () {
16698 var counts =  Clazz_newIntArray (3, 0);
16699 var strokes =  new Array (3);
16700 for (var counter = 0; counter < 3; counter++) {
16701 var km = this.getInputMap (counter, false);
16702 strokes[counter] = (km != null) ? km.allKeys () : null;
16703 counts[counter] = (strokes[counter] != null) ? strokes[counter].length : 0;
16704 }
16705 var retValue =  new Array (counts[0] + counts[1] + counts[2]);
16706 for (var counter = 0, last = 0; counter < 3; counter++) {
16707 if (counts[counter] > 0) {
16708 System.arraycopy (strokes[counter], 0, retValue, last, counts[counter]);
16709 last += counts[counter];
16710 }}
16711 return retValue;
16712 });
16713 Clazz_defineMethod (c$, "getConditionForKeyStroke", 
16714 function (aKeyStroke) {
16715 for (var counter = 0; counter < 3; counter++) {
16716 var inputMap = this.getInputMap (counter, false);
16717 if (inputMap != null && inputMap.get (aKeyStroke) != null) {
16718 return counter;
16719 }}
16720 return -1;
16721 }, "javax.swing.KeyStroke");
16722 Clazz_defineMethod (c$, "getActionForKeyStroke", 
16723 function (aKeyStroke) {
16724 var am = this.getActionMap (false);
16725 if (am == null) {
16726 return null;
16727 }for (var counter = 0; counter < 3; counter++) {
16728 var inputMap = this.getInputMap (counter, false);
16729 if (inputMap != null) {
16730 var actionBinding = inputMap.get (aKeyStroke);
16731 if (actionBinding != null) {
16732 var action = am.get (actionBinding);
16733 if (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin)) {
16734 return (action).actionListener;
16735 }return action;
16736 }}}
16737 return null;
16738 }, "javax.swing.KeyStroke");
16739 Clazz_defineMethod (c$, "resetKeyboardActions", 
16740 function () {
16741 for (var counter = 0; counter < 3; counter++) {
16742 var inputMap = this.getInputMap (counter, false);
16743 if (inputMap != null) {
16744 inputMap.clear ();
16745 }}
16746 var am = this.getActionMap (false);
16747 if (am != null) {
16748 am.clear ();
16749 }});
16750 Clazz_defineMethod (c$, "setInputMap", 
16751 function (condition, map) {
16752 switch (condition) {
16753 case 2:
16754 if (map != null && !(Clazz_instanceOf (map, javax.swing.ComponentInputMap))) {
16755 throw  new IllegalArgumentException ("WHEN_IN_FOCUSED_WINDOW InputMaps must be of type ComponentInputMap");
16756 }this.windowInputMap = map;
16757 this.setFlag (7, true);
16758 this.registerWithKeyboardManager (false);
16759 break;
16760 case 1:
16761 this.ancestorInputMap = map;
16762 this.setFlag (6, true);
16763 break;
16764 case 0:
16765 this.focusInputMap = map;
16766 this.setFlag (5, true);
16767 break;
16768 default:
16769 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16770 }
16771 }, "~N,javax.swing.InputMap");
16772 Clazz_defineMethod (c$, "getInputMap", 
16773 function (condition) {
16774 return this.getInputMap (condition, true);
16775 }, "~N");
16776 Clazz_defineMethod (c$, "getInputMap", 
16777 function () {
16778 return this.getInputMap (0, true);
16779 });
16780 Clazz_defineMethod (c$, "setActionMap", 
16781 function (am) {
16782 this.actionMap = am;
16783 this.setFlag (8, true);
16784 }, "javax.swing.ActionMap");
16785 Clazz_defineMethod (c$, "getActionMap", 
16786 function () {
16787 return this.getActionMap (true);
16788 });
16789 Clazz_defineMethod (c$, "getInputMap", 
16790 function (condition, create) {
16791 switch (condition) {
16792 case 0:
16793 if (this.getFlag (5)) {
16794 return this.focusInputMap;
16795 }if (create) {
16796 var km =  new javax.swing.InputMap ();
16797 this.setInputMap (condition, km);
16798 return km;
16799 }break;
16800 case 1:
16801 if (this.getFlag (6)) {
16802 return this.ancestorInputMap;
16803 }if (create) {
16804 var km =  new javax.swing.InputMap ();
16805 this.setInputMap (condition, km);
16806 return km;
16807 }break;
16808 case 2:
16809 if (this.getFlag (7)) {
16810 return this.windowInputMap;
16811 }if (create) {
16812 var km =  new javax.swing.ComponentInputMap (this);
16813 this.setInputMap (condition, km);
16814 return km;
16815 }break;
16816 default:
16817 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16818 }
16819 return null;
16820 }, "~N,~B");
16821 Clazz_defineMethod (c$, "getActionMap", 
16822 function (create) {
16823 {
16824 (arguments.length == 0) && (create = true);
16825 }if (this.getFlag (8)) {
16826 return this.actionMap;
16827 }if (create) {
16828 var am =  new javax.swing.ActionMap ();
16829 this.setActionMap (am);
16830 return am;
16831 }return null;
16832 }, "~B");
16833 Clazz_defineMethod (c$, "getBaseline", 
16834 function (width, height) {
16835 Clazz_superCall (this, javax.swing.JComponent, "getBaseline", [width, height]);
16836 if (this.ui != null) {
16837 return this.ui.getBaseline (this, width, height);
16838 }return -1;
16839 }, "~N,~N");
16840 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
16841 function () {
16842 if (this.ui != null) {
16843 return this.ui.getBaselineResizeBehavior (this);
16844 }return java.awt.Component.BaselineResizeBehavior.OTHER;
16845 });
16846 Clazz_defineMethod (c$, "requestDefaultFocus", 
16847 function () {
16848 var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16849 if (nearestRoot == null) {
16850 return false;
16851 }return false;
16852 });
16853 Clazz_defineMethod (c$, "setVisible", 
16854 function (aFlag) {
16855 if (aFlag != this.isVisible ()) {
16856 Clazz_superCall (this, javax.swing.JComponent, "setVisible", [aFlag]);
16857 var parent = this.getParent ();
16858 if (parent != null) {
16859 var r = this.getBounds ();
16860 parent.repaint (r.x, r.y, r.width, r.height);
16861 }this.revalidate ();
16862 }}, "~B");
16863 Clazz_defineMethod (c$, "setEnabled", 
16864 function (enabled) {
16865 var oldEnabled = this.isEnabled ();
16866 Clazz_superCall (this, javax.swing.JComponent, "setEnabled", [enabled]);
16867 this.firePropertyChangeBool ("enabled", oldEnabled, enabled);
16868 if (enabled != oldEnabled) {
16869 this.repaint ();
16870 }}, "~B");
16871 Clazz_defineMethod (c$, "setForeground", 
16872 function (fg) {
16873 var oldFg = this.getForeground ();
16874 Clazz_superCall (this, javax.swing.JComponent, "setForeground", [fg]);
16875 if ((oldFg != null) ? !oldFg.equals (fg) : ((fg != null) && !fg.equals (oldFg))) {
16876 this.repaint ();
16877 }}, "java.awt.Color");
16878 Clazz_defineMethod (c$, "setBackground", 
16879 function (bg) {
16880 var oldBg = this.getBackground ();
16881 Clazz_superCall (this, javax.swing.JComponent, "setBackground", [bg]);
16882 if ((oldBg != null) ? !oldBg.equals (bg) : ((bg != null) && !bg.equals (oldBg))) {
16883 this.repaint ();
16884 }}, "java.awt.Color");
16885 Clazz_defineMethod (c$, "setFont", 
16886 function (font) {
16887 var oldFont = this.getFont ();
16888 Clazz_superCall (this, javax.swing.JComponent, "setFont", [font]);
16889 if (font !== oldFont) {
16890 this.revalidate ();
16891 this.repaint ();
16892 }}, "java.awt.Font");
16893 c$.getDefaultLocale = Clazz_defineMethod (c$, "getDefaultLocale", 
16894 function () {
16895 var l = javax.swing.SwingUtilities.appContextGet ("JComponent.defaultLocale");
16896 if (l == null) {
16897 l = java.util.Locale.getDefault ();
16898 javax.swing.JComponent.setDefaultLocale (l);
16899 }return l;
16900 });
16901 c$.setDefaultLocale = Clazz_defineMethod (c$, "setDefaultLocale", 
16902 function (l) {
16903 javax.swing.SwingUtilities.appContextPut ("JComponent.defaultLocale", l);
16904 }, "java.util.Locale");
16905 Clazz_defineMethod (c$, "processComponentKeyEvent", 
16906 function (e) {
16907 }, "java.awt.event.KeyEvent");
16908 Clazz_defineMethod (c$, "processKeyEvent", 
16909 function (e) {
16910 var shouldProcessKey;
16911 Clazz_superCall (this, javax.swing.JComponent, "processKeyEvent", [e]);
16912 if (!e.isConsumed ()) {
16913 this.processComponentKeyEvent (e);
16914 }shouldProcessKey = javax.swing.JComponent.KeyboardState.shouldProcess (e);
16915 if (e.isConsumed ()) {
16916 return;
16917 }if (shouldProcessKey && this.processKeyBindings (e, e.getID () == 401)) {
16918 e.consume ();
16919 }}, "java.awt.event.KeyEvent");
16920 Clazz_defineMethod (c$, "processKeyBinding", 
16921 function (ks, e, condition, pressed) {
16922 var map = this.getInputMap (condition, false);
16923 var am = this.getActionMap (false);
16924 if (map != null && am != null && this.isEnabled ()) {
16925 var binding = map.get (ks);
16926 var action = (binding == null) ? null : am.get (binding);
16927 if (action != null) {
16928 return javax.swing.SwingUtilities.notifyAction (action, ks, e, this, e.getModifiers ());
16929 }}return false;
16930 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
16931 Clazz_defineMethod (c$, "processKeyBindings", 
16932 function (e, pressed) {
16933 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (e)) {
16934 return false;
16935 }var ks;
16936 if (e.getID () == 400) {
16937 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
16938 } else {
16939 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), (pressed ? false : true));
16940 }if (this.processKeyBinding (ks, e, 0, pressed)) return true;
16941 var parent = this;
16942 while (parent != null && !(Clazz_instanceOf (parent, java.awt.Window)) && !(Clazz_instanceOf (parent, java.applet.Applet))) {
16943 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16944 if ((parent).processKeyBinding (ks, e, 1, pressed)) return true;
16945 }parent = parent.getParent ();
16946 }
16947 if (parent != null) {
16948 return javax.swing.JComponent.processKeyBindingsForAllComponents (e, parent, pressed);
16949 }return false;
16950 }, "java.awt.event.KeyEvent,~B");
16951 c$.processKeyBindingsForAllComponents = Clazz_defineMethod (c$, "processKeyBindingsForAllComponents", 
16952 function (e, container, pressed) {
16953 while (true) {
16954 if (javax.swing.KeyboardManager.getCurrentManager ().fireKeyboardAction (e, pressed, container)) {
16955 return true;
16956 }if (Clazz_instanceOf (container, javax.swing.Popup.HeavyWeightWindow)) {
16957 container = (container).getOwner ();
16958 } else {
16959 return false;
16960 }}
16961 }, "java.awt.event.KeyEvent,java.awt.Container,~B");
16962 Clazz_defineMethod (c$, "setToolTipText", 
16963 function (text) {
16964 this.putClientProperty ("ToolTipText", text);
16965 }, "~S");
16966 Clazz_defineMethod (c$, "getToolTipText", 
16967 function () {
16968 return this.getClientProperty ("ToolTipText");
16969 });
16970 Clazz_defineMethod (c$, "getToolTipText", 
16971 function (event) {
16972 return this.getToolTipText ();
16973 }, "java.awt.event.MouseEvent");
16974 Clazz_defineMethod (c$, "getToolTipLocation", 
16975 function (event) {
16976 return null;
16977 }, "java.awt.event.MouseEvent");
16978 Clazz_defineMethod (c$, "getPopupLocation", 
16979 function (event) {
16980 return null;
16981 }, "java.awt.event.MouseEvent");
16982 Clazz_defineMethod (c$, "createToolTip", 
16983 function () {
16984 var tip =  new javax.swing.JToolTip ();
16985 tip.setComponent (this);
16986 return tip;
16987 });
16988 Clazz_defineMethod (c$, "scrollRectToVisible", 
16989 function (aRect) {
16990 var parent;
16991 var dx = this.getX ();
16992 var dy = this.getY ();
16993 for (parent = this.getParent (); !(parent == null) && !(Clazz_instanceOf (parent, javax.swing.JComponent)) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane)); parent = parent.getParent ()) {
16994 var bounds = parent.getBounds ();
16995 dx += bounds.x;
16996 dy += bounds.y;
16997 }
16998 if (!(parent == null) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane))) {
16999 aRect.x += dx;
17000 aRect.y += dy;
17001 (parent).scrollRectToVisible (aRect);
17002 aRect.x -= dx;
17003 aRect.y -= dy;
17004 }}, "java.awt.Rectangle");
17005 Clazz_defineMethod (c$, "setAutoscrolls", 
17006 function (autoscrolls) {
17007 }, "~B");
17008 Clazz_defineMethod (c$, "getAutoscrolls", 
17009 function () {
17010 return this.autoscrolls;
17011 });
17012 Clazz_defineMethod (c$, "superProcessMouseMotionEvent", 
17013 function (e) {
17014 Clazz_superCall (this, javax.swing.JComponent, "processMouseMotionEvent", [e]);
17015 }, "java.awt.event.MouseEvent");
17016 Clazz_defineMethod (c$, "setCreatedDoubleBuffer", 
17017 function (newValue) {
17018 this.setFlag (9, newValue);
17019 }, "~B");
17020 Clazz_defineMethod (c$, "getCreatedDoubleBuffer", 
17021 function () {
17022 return this.getFlag (9);
17023 });
17024 Clazz_defineMethod (c$, "getClientProperties", 
17025  function () {
17026 if (this.clientProperties == null) {
17027 this.clientProperties =  new javax.swing.ArrayTable ();
17028 }return this.clientProperties;
17029 });
17030 Clazz_defineMethod (c$, "getClientProperty", 
17031 function (key) {
17032 if (this.clientProperties == null) {
17033 return null;
17034 } else {
17035 {
17036 return this.clientProperties.get (key);
17037 }}}, "~O");
17038 Clazz_defineMethod (c$, "putClientProperty", 
17039 function (key, value) {
17040 if (value == null && this.clientProperties == null) {
17041 return;
17042 }var clientProperties = this.getClientProperties ();
17043 var oldValue;
17044 {
17045 oldValue = clientProperties.get (key);
17046 if (value != null) {
17047 clientProperties.put (key, value);
17048 } else if (oldValue != null) {
17049 clientProperties.remove (key);
17050 } else {
17051 return;
17052 }}this.clientPropertyChanged (key, oldValue, value);
17053 this.firePropertyChangeObject (key.toString (), oldValue, value);
17054 }, "~O,~O");
17055 Clazz_defineMethod (c$, "clientPropertyChanged", 
17056 function (key, oldValue, newValue) {
17057 }, "~O,~O,~O");
17058 Clazz_defineMethod (c$, "setUIProperty", 
17059 function (propertyName, value) {
17060 if (propertyName === "opaque") {
17061 if (!this.getFlag (24)) {
17062 this.setOpaque ((value).booleanValue ());
17063 this.setFlag (24, false);
17064 }} else if (propertyName === "autoscrolls") {
17065 if (!this.getFlag (25)) {
17066 this.setAutoscrolls ((value).booleanValue ());
17067 this.setFlag (25, false);
17068 }} else if (propertyName === "focusTraversalKeysForward") {
17069 } else if (propertyName === "focusTraversalKeysBackward") {
17070 } else {
17071 System.out.println (swingjs.JSToolkit.getClassName (this) + " property \"" + propertyName + "\" cannot be set using this method" + swingjs.JSToolkit.getStackTrace (5));
17072 }}, "~S,~O");
17073 c$.isLightweightComponent = Clazz_defineMethod (c$, "isLightweightComponent", 
17074 function (c) {
17075 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));
17076 }, "java.awt.Component");
17077 Clazz_overrideMethod (c$, "isOpaque", 
17078 function () {
17079 return this.getFlag (3);
17080 });
17081 Clazz_defineMethod (c$, "setOpaque", 
17082 function (isOpaque) {
17083 var oldValue = this.getFlag (3);
17084 this.setFlag (3, isOpaque);
17085 this.setFlag (24, true);
17086 this.firePropertyChangeBool ("opaque", oldValue, isOpaque);
17087 }, "~B");
17088 Clazz_defineMethod (c$, "rectangleIsObscured", 
17089 function (x, y, width, height) {
17090 var numChildren = this.getComponentCount ();
17091 for (var i = 0; i < numChildren; i++) {
17092 var child = this.getComponent (i);
17093 var cx;
17094 var cy;
17095 var cw;
17096 var ch;
17097 cx = child.getX ();
17098 cy = child.getY ();
17099 cw = child.getWidth ();
17100 ch = child.getHeight ();
17101 if (x >= cx && (x + width) <= (cx + cw) && y >= cy && (y + height) <= (cy + ch) && child.isVisible ()) {
17102 if (Clazz_instanceOf (child, javax.swing.JComponent)) {
17103 return (child).isOpaque ();
17104 } else {
17105 return false;
17106 }}}
17107 return false;
17108 }, "~N,~N,~N,~N");
17109 c$.computeVisibleRect = Clazz_defineMethod (c$, "computeVisibleRect", 
17110 function (c, visibleRect) {
17111 var p = c.getParent ();
17112 var bounds = c.getBounds ();
17113 if (p == null || Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17114 visibleRect.reshape (0, 0, bounds.width, bounds.height);
17115 } else {
17116 javax.swing.JComponent.computeVisibleRect (p, visibleRect);
17117 visibleRect.x -= bounds.x;
17118 visibleRect.y -= bounds.y;
17119 javax.swing.SwingUtilities.computeIntersection (0, 0, bounds.width, bounds.height, visibleRect);
17120 }}, "java.awt.Component,java.awt.Rectangle");
17121 Clazz_defineMethod (c$, "computeVisibleRect", 
17122 function (visibleRect) {
17123 javax.swing.JComponent.computeVisibleRect (this, visibleRect);
17124 }, "java.awt.Rectangle");
17125 Clazz_defineMethod (c$, "getVisibleRect", 
17126 function () {
17127 var visibleRect =  new java.awt.Rectangle ();
17128 this.computeVisibleRect (visibleRect);
17129 return visibleRect;
17130 });
17131 Clazz_defineMethod (c$, "getTopLevelAncestor", 
17132 function () {
17133 for (var p = this; p != null; p = p.getParent ()) {
17134 if (Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17135 return p;
17136 }}
17137 return null;
17138 });
17139 Clazz_defineMethod (c$, "getAncestorNotifier", 
17140  function () {
17141 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER);
17142 });
17143 Clazz_defineMethod (c$, "addAncestorListener", 
17144 function (listener) {
17145 var ancestorNotifier = this.getAncestorNotifier ();
17146 if (ancestorNotifier == null) {
17147 ancestorNotifier =  new javax.swing.AncestorNotifier (this);
17148 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, ancestorNotifier);
17149 }ancestorNotifier.addAncestorListener (listener);
17150 }, "javax.swing.event.AncestorListener");
17151 Clazz_defineMethod (c$, "removeAncestorListener", 
17152 function (listener) {
17153 var ancestorNotifier = this.getAncestorNotifier ();
17154 if (ancestorNotifier == null) {
17155 return;
17156 }ancestorNotifier.removeAncestorListener (listener);
17157 if (ancestorNotifier.listenerList.getListenerList ().length == 0) {
17158 ancestorNotifier.removeAllListeners ();
17159 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, null);
17160 }}, "javax.swing.event.AncestorListener");
17161 Clazz_defineMethod (c$, "getAncestorListeners", 
17162 function () {
17163 var ancestorNotifier = this.getAncestorNotifier ();
17164 if (ancestorNotifier == null) {
17165 return  new Array (0);
17166 }return ancestorNotifier.getAncestorListeners ();
17167 });
17168 Clazz_defineMethod (c$, "getListeners", 
17169 function (listenerType) {
17170 var result;
17171 if (listenerType === javax.swing.event.AncestorListener) {
17172 result = this.getAncestorListeners ();
17173 } else if (listenerType === java.beans.PropertyChangeListener) {
17174 result = this.getPropertyChangeListeners ();
17175 } else {
17176 result = this.listenerList.getListeners (listenerType);
17177 }if (result.length == 0) {
17178 return Clazz_superCall (this, javax.swing.JComponent, "getListeners", [listenerType]);
17179 }return result;
17180 }, "Class");
17181 Clazz_defineMethod (c$, "addNotify", 
17182 function () {
17183 Clazz_superCall (this, javax.swing.JComponent, "addNotify", []);
17184 this.firePropertyChangeObject ("ancestor", null, this.getParent ());
17185 this.registerWithKeyboardManager (false);
17186 this.registerNextFocusableComponent ();
17187 });
17188 Clazz_defineMethod (c$, "removeNotify", 
17189 function () {
17190 Clazz_superCall (this, javax.swing.JComponent, "removeNotify", []);
17191 this.firePropertyChangeObject ("ancestor", this.getParent (), null);
17192 this.unregisterWithKeyboardManager ();
17193 this.deregisterNextFocusableComponent ();
17194 if (this.getCreatedDoubleBuffer ()) {
17195 javax.swing.RepaintManager.currentManager (this).resetDoubleBuffer ();
17196 this.setCreatedDoubleBuffer (false);
17197 }});
17198 Clazz_defineMethod (c$, "repaint", 
17199 function (tm, x, y, width, height) {
17200 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
17201 }, "~N,~N,~N,~N,~N");
17202 Clazz_defineMethod (c$, "repaint", 
17203 function (r) {
17204 this.repaint (0, r.x, r.y, r.width, r.height);
17205 }, "java.awt.Rectangle");
17206 Clazz_defineMethod (c$, "revalidate", 
17207 function () {
17208 if (this.getParent () == null) {
17209 return;
17210 }if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
17211 this.invalidate ();
17212 javax.swing.RepaintManager.currentManager (this).addInvalidComponent (this);
17213 } else {
17214 {
17215 if (this.getFlag (28)) {
17216 return;
17217 }this.setFlag (28, true);
17218 }var callRevalidate = ((Clazz_isClassDefined ("javax.swing.JComponent$2") ? 0 : javax.swing.JComponent.$JComponent$2$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$2, this, null));
17219 javax.swing.SwingUtilities.invokeLater (callRevalidate);
17220 }});
17221 Clazz_defineMethod (c$, "isValidateRoot", 
17222 function () {
17223 return false;
17224 });
17225 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
17226 function () {
17227 return true;
17228 });
17229 Clazz_defineMethod (c$, "isPaintingOrigin", 
17230 function () {
17231 return false;
17232 });
17233 Clazz_defineMethod (c$, "paintImmediately", 
17234 function (x, y, w, h) {
17235 {
17236 if (arguments.length == 1) {
17237 var r = x;
17238 x = r.x;
17239 y = r.y;
17240 w = r.width;
17241 h = r.height;
17242 }
17243 }var c = this;
17244 var parent;
17245 if (!this.isShowing ()) {
17246 return;
17247 }while (!(c).isOpaque ()) {
17248 parent = c.getParent ();
17249 if (parent != null) {
17250 x += c.getX ();
17251 y += c.getY ();
17252 c = parent;
17253 } else {
17254 break;
17255 }if (!(Clazz_instanceOf (c, javax.swing.JComponent))) {
17256 break;
17257 }}
17258 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17259 (c)._paintImmediately (x, y, w, h);
17260 } else {
17261 c.repaint (x, y, w, h);
17262 }}, "~N,~N,~N,~N");
17263 Clazz_defineMethod (c$, "paintImmediately", 
17264 function (r) {
17265 this.paintImmediately (r.x, r.y, r.width, r.height);
17266 }, "java.awt.Rectangle");
17267 Clazz_defineMethod (c$, "alwaysOnTop", 
17268 function () {
17269 return false;
17270 });
17271 Clazz_defineMethod (c$, "setPaintingChild", 
17272 function (paintingChild) {
17273 this.paintingChild = paintingChild;
17274 }, "java.awt.Component");
17275 Clazz_defineMethod (c$, "_paintImmediately", 
17276 function (x, y, w, h) {
17277 var g;
17278 var c;
17279 var tmpX;
17280 var tmpY;
17281 var tmpWidth;
17282 var tmpHeight;
17283 var offsetX = 0;
17284 var offsetY = 0;
17285 var hasBuffer = false;
17286 var bufferedComponent = null;
17287 var paintingComponent = this;
17288 var path =  new java.util.ArrayList (7);
17289 var pIndex = -1;
17290 var pCount = 0;
17291 tmpX = tmpY = tmpWidth = tmpHeight = 0;
17292 var paintImmediatelyClip = javax.swing.JComponent.fetchRectangle ();
17293 paintImmediatelyClip.x = x;
17294 paintImmediatelyClip.y = y;
17295 paintImmediatelyClip.width = w;
17296 paintImmediatelyClip.height = h;
17297 var ontop = this.alwaysOnTop () && this.isOpaque ();
17298 if (ontop) {
17299 javax.swing.SwingUtilities.computeIntersection (0, 0, this.getWidth (), this.getHeight (), paintImmediatelyClip);
17300 if (paintImmediatelyClip.width == 0) {
17301 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17302 return;
17303 }}var child;
17304 for (c = this, child = null; c != null && !(Clazz_instanceOf (c, java.awt.Window)) && !(Clazz_instanceOf (c, java.applet.Applet)); child = c, c = c.getParent ()) {
17305 var jc = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
17306 path.add (c);
17307 if (!ontop && jc != null && !jc.isOptimizedDrawingEnabled ()) {
17308 var resetPC;
17309 if (c !== this) {
17310 if (jc.isPaintingOrigin ()) {
17311 resetPC = true;
17312 } else {
17313 var children = c.getComponents ();
17314 var i = 0;
17315 for (; i < children.length; i++) {
17316 if (children[i] === child) break;
17317 }
17318 switch (jc.getObscuredState (i, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height)) {
17319 case 0:
17320 resetPC = false;
17321 break;
17322 case 2:
17323 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17324 return;
17325 default:
17326 resetPC = true;
17327 break;
17328 }
17329 }} else {
17330 resetPC = false;
17331 }if (resetPC) {
17332 paintingComponent = jc;
17333 pIndex = pCount;
17334 offsetX = offsetY = 0;
17335 hasBuffer = false;
17336 }}pCount++;
17337 if (!ontop) {
17338 var bx = c.getX ();
17339 var by = c.getY ();
17340 tmpWidth = c.getWidth ();
17341 tmpHeight = c.getHeight ();
17342 javax.swing.SwingUtilities.computeIntersection (tmpX, tmpY, tmpWidth, tmpHeight, paintImmediatelyClip);
17343 paintImmediatelyClip.x += bx;
17344 paintImmediatelyClip.y += by;
17345 offsetX += bx;
17346 offsetY += by;
17347 }}
17348 if (c == null || paintImmediatelyClip.width <= 0 || paintImmediatelyClip.height <= 0) {
17349 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17350 return;
17351 }paintingComponent.setFlag (13, true);
17352 paintImmediatelyClip.x -= offsetX;
17353 paintImmediatelyClip.y -= offsetY;
17354 if (paintingComponent !== this) {
17355 var comp;
17356 var i = pIndex;
17357 for (; i > 0; i--) {
17358 comp = path.get (i);
17359 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17360 (comp).setPaintingChild (path.get (i - 1));
17361 }}
17362 }try {
17363 g = javax.swing.JComponent.safelyGetGraphics (paintingComponent, c).createSwingJS ();
17364 try {
17365 if (hasBuffer) {
17366 var rm = javax.swing.RepaintManager.currentManager (bufferedComponent);
17367 rm.beginPaint ();
17368 try {
17369 rm.paint (paintingComponent, bufferedComponent, g, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height);
17370 } finally {
17371 rm.endPaint ();
17372 }
17373 } else {
17374 paintingComponent.paint (g);
17375 }} finally {
17376 g.dispose ();
17377 }
17378 } finally {
17379 if (paintingComponent !== this) {
17380 var comp;
17381 var i = pIndex;
17382 for (; i > 0; i--) {
17383 comp = path.get (i);
17384 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17385 (comp).setPaintingChild (null);
17386 }}
17387 }paintingComponent.setFlag (13, false);
17388 }
17389 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17390 }, "~N,~N,~N,~N");
17391 Clazz_defineMethod (c$, "paintToOffscreen", 
17392 function (g, x, y, w, h, maxX, maxY) {
17393 try {
17394 this.setFlag (1, true);
17395 if ((y + h) < maxY || (x + w) < maxX) {
17396 this.setFlag (2, true);
17397 }if (this.getFlag (13)) {
17398 this.paint (g);
17399 } else {
17400 if (!this.rectangleIsObscured (x, y, w, h)) {
17401 this.paintComponent (g);
17402 this.paintBorder (g);
17403 }this.paintChildren (g);
17404 }} finally {
17405 this.setFlag (1, false);
17406 this.setFlag (2, false);
17407 }
17408 }, "java.awt.Graphics,~N,~N,~N,~N,~N,~N");
17409 Clazz_defineMethod (c$, "getObscuredState", 
17410  function (compIndex, x, y, width, height) {
17411 var retValue = 0;
17412 var tmpRect = javax.swing.JComponent.fetchRectangle ();
17413 for (var i = compIndex - 1; i >= 0; i--) {
17414 var sibling = this.getComponent (i);
17415 if (!sibling.isVisible ()) {
17416 continue;
17417 }var siblingRect;
17418 var opaque;
17419 if (Clazz_instanceOf (sibling, javax.swing.JComponent)) {
17420 opaque = (sibling).isOpaque ();
17421 if (!opaque) {
17422 if (retValue == 1) {
17423 continue;
17424 }}} else {
17425 opaque = true;
17426 }siblingRect = sibling.getBounds (tmpRect);
17427 if (opaque && x >= siblingRect.x && (x + width) <= (siblingRect.x + siblingRect.width) && y >= siblingRect.y && (y + height) <= (siblingRect.y + siblingRect.height)) {
17428 javax.swing.JComponent.recycleRectangle (tmpRect);
17429 return 2;
17430 } else if (retValue == 0 && !((x + width <= siblingRect.x) || (y + height <= siblingRect.y) || (x >= siblingRect.x + siblingRect.width) || (y >= siblingRect.y + siblingRect.height))) {
17431 retValue = 1;
17432 }}
17433 javax.swing.JComponent.recycleRectangle (tmpRect);
17434 return retValue;
17435 }, "~N,~N,~N,~N,~N");
17436 Clazz_defineMethod (c$, "checkIfChildObscuredBySibling", 
17437 function () {
17438 return true;
17439 });
17440 Clazz_defineMethod (c$, "setFlag", 
17441  function (aFlag, aValue) {
17442 if (aValue) {
17443 this.flags |= (1 << aFlag);
17444 } else {
17445 this.flags &= ~(1 << aFlag);
17446 }}, "~N,~B");
17447 Clazz_defineMethod (c$, "getFlag", 
17448  function (aFlag) {
17449 var mask = (1 << aFlag);
17450 return ((this.flags & mask) == mask);
17451 }, "~N");
17452 Clazz_defineMethod (c$, "setDoubleBuffered", 
17453 function (aFlag) {
17454 }, "~B");
17455 Clazz_overrideMethod (c$, "isDoubleBuffered", 
17456 function () {
17457 return this.getFlag (0);
17458 });
17459 Clazz_defineMethod (c$, "getRootPane", 
17460 function () {
17461 return javax.swing.SwingUtilities.getRootPane (this);
17462 });
17463 Clazz_defineMethod (c$, "paramString", 
17464 function () {
17465 var preferredSizeString = (this.isPreferredSizeSet () ? this.getPreferredSize ().toString () : "");
17466 var minimumSizeString = (this.isMinimumSizeSet () ? this.getMinimumSize ().toString () : "");
17467 var maximumSizeString = (this.isMaximumSizeSet () ? this.getMaximumSize ().toString () : "");
17468 var borderString = (this.border == null ? "" : (this.border === this ? "this" : this.border.toString ()));
17469 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;
17470 });
17471 c$.$JComponent$ActionStandin$ = function () {
17472 Clazz_pu$h(self.c$);
17473 c$ = Clazz_decorateAsClass (function () {
17474 Clazz_prepareCallback (this, arguments);
17475 this.actionListener = null;
17476 this.command = null;
17477 this.action = null;
17478 Clazz_instantialize (this, arguments);
17479 }, javax.swing.JComponent, "ActionStandin", null, javax.swing.Action);
17480 Clazz_makeConstructor (c$, 
17481 function (a, b) {
17482 this.actionListener = a;
17483 if (Clazz_instanceOf (a, javax.swing.Action)) {
17484 this.action = a;
17485 } else {
17486 this.action = null;
17487 }this.command = b;
17488 }, "java.awt.event.ActionListener,~S");
17489 Clazz_defineMethod (c$, "getValue", 
17490 function (a) {
17491 if (a != null) {
17492 if (a.equals ("ActionCommandKey")) {
17493 return this.command;
17494 }if (this.action != null) {
17495 return this.action.getValue (a);
17496 }if (a.equals ("Name")) {
17497 return "ActionStandin";
17498 }}return null;
17499 }, "~S");
17500 Clazz_defineMethod (c$, "isEnabled", 
17501 function () {
17502 if (this.actionListener == null) {
17503 return false;
17504 }if (this.action == null) {
17505 return true;
17506 }return this.action.isEnabled ();
17507 });
17508 Clazz_defineMethod (c$, "actionPerformed", 
17509 function (a) {
17510 if (this.actionListener != null) {
17511 this.actionListener.actionPerformed (a);
17512 }}, "java.awt.event.ActionEvent");
17513 Clazz_overrideMethod (c$, "putValue", 
17514 function (a, b) {
17515 }, "~S,~O");
17516 Clazz_overrideMethod (c$, "setEnabled", 
17517 function (a) {
17518 }, "~B");
17519 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
17520 function (a) {
17521 }, "java.beans.PropertyChangeListener");
17522 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
17523 function (a) {
17524 }, "java.beans.PropertyChangeListener");
17525 c$ = Clazz_p0p ();
17526 };
17527 c$.$JComponent$2$ = function () {
17528 Clazz_pu$h(self.c$);
17529 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$2", null, Runnable);
17530 Clazz_overrideMethod (c$, "run", 
17531 function () {
17532 {
17533 this.b$["javax.swing.JComponent"].setFlag (28, false);
17534 }this.b$["javax.swing.JComponent"].revalidate ();
17535 });
17536 c$ = Clazz_p0p ();
17537 };
17538 c$.$JComponent$1$ = function () {
17539 Clazz_pu$h(self.c$);
17540 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$1", null, jssun.awt.RequestFocusController);
17541 Clazz_overrideMethod (c$, "acceptRequestFocus", 
17542 function (from, to, temporary, focusedWindowChangeAllowed, cause) {
17543 if ((to == null) || !(Clazz_instanceOf (to, javax.swing.JComponent))) {
17544 return true;
17545 }if ((from == null) || !(Clazz_instanceOf (from, javax.swing.JComponent))) {
17546 return true;
17547 }var target = to;
17548 if (!target.getVerifyInputWhenFocusTarget ()) {
17549 return true;
17550 }var jFocusOwner = from;
17551 var iv = jFocusOwner.getInputVerifier ();
17552 if (iv == null) {
17553 return true;
17554 } else {
17555 var currentSource = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17556 if (currentSource === jFocusOwner) {
17557 return true;
17558 }javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, jFocusOwner);
17559 try {
17560 return iv.shouldYieldFocus (jFocusOwner);
17561 } finally {
17562 if (currentSource != null) {
17563 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, currentSource);
17564 } else {
17565 javax.swing.SwingUtilities.appContextRemove (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17566 }}
17567 }}, "java.awt.Component,java.awt.Component,~B,~B,jssun.awt.CausedFocusEvent.Cause");
17568 c$ = Clazz_p0p ();
17569 };
17570 Clazz_pu$h(self.c$);
17571 c$ = Clazz_decorateAsClass (function () {
17572 this.array = null;
17573 this.count = 0;
17574 this.capacity = 0;
17575 Clazz_instantialize (this, arguments);
17576 }, javax.swing.JComponent, "IntVector");
17577 Clazz_defineMethod (c$, "size", 
17578 function () {
17579 return this.count;
17580 });
17581 Clazz_defineMethod (c$, "elementAt", 
17582 function (a) {
17583 return this.array[a];
17584 }, "~N");
17585 Clazz_defineMethod (c$, "addElement", 
17586 function (a) {
17587 if (this.count == this.capacity) {
17588 this.capacity = (this.capacity + 2) * 2;
17589 var b =  Clazz_newIntArray (this.capacity, 0);
17590 if (this.count > 0) {
17591 System.arraycopy (this.array, 0, b, 0, this.count);
17592 }this.array = b;
17593 }this.array[this.count++] = a;
17594 }, "~N");
17595 Clazz_defineMethod (c$, "setElementAt", 
17596 function (a, b) {
17597 this.array[b] = a;
17598 }, "~N,~N");
17599 c$ = Clazz_p0p ();
17600 Clazz_pu$h(self.c$);
17601 c$ = Clazz_declareType (javax.swing.JComponent, "KeyboardState");
17602 c$.getKeyCodeArray = Clazz_defineMethod (c$, "getKeyCodeArray", 
17603 function () {
17604 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.KeyboardState.keyCodesKey);
17605 if (a == null) {
17606 a =  new javax.swing.JComponent.IntVector ();
17607 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.KeyboardState.keyCodesKey, a);
17608 }return a;
17609 });
17610 c$.registerKeyPressed = Clazz_defineMethod (c$, "registerKeyPressed", 
17611 function (a) {
17612 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17613 var c = b.size ();
17614 var d;
17615 for (d = 0; d < c; d++) {
17616 if (b.elementAt (d) == -1) {
17617 b.setElementAt (a, d);
17618 return;
17619 }}
17620 b.addElement (a);
17621 }, "~N");
17622 c$.registerKeyReleased = Clazz_defineMethod (c$, "registerKeyReleased", 
17623 function (a) {
17624 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17625 var c = b.size ();
17626 var d;
17627 for (d = 0; d < c; d++) {
17628 if (b.elementAt (d) == a) {
17629 b.setElementAt (-1, d);
17630 return;
17631 }}
17632 }, "~N");
17633 c$.keyIsPressed = Clazz_defineMethod (c$, "keyIsPressed", 
17634 function (a) {
17635 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17636 var c = b.size ();
17637 var d;
17638 for (d = 0; d < c; d++) {
17639 if (b.elementAt (d) == a) {
17640 return true;
17641 }}
17642 return false;
17643 }, "~N");
17644 c$.shouldProcess = Clazz_defineMethod (c$, "shouldProcess", 
17645 function (a) {
17646 switch (a.getID ()) {
17647 case 401:
17648 if (!javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ())) {
17649 javax.swing.JComponent.KeyboardState.registerKeyPressed (a.getKeyCode ());
17650 }return true;
17651 case 402:
17652 if (javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ()) || a.getKeyCode () == 154) {
17653 javax.swing.JComponent.KeyboardState.registerKeyReleased (a.getKeyCode ());
17654 return true;
17655 }return false;
17656 case 400:
17657 return true;
17658 default:
17659 return false;
17660 }
17661 }, "java.awt.event.KeyEvent");
17662 c$.keyCodesKey = c$.prototype.keyCodesKey = javax.swing.JComponent.KeyboardState;
17663 c$ = Clazz_p0p ();
17664 Clazz_defineStatics (c$,
17665 "uiClassID", "ComponentUI",
17666 "managingFocusForwardTraversalKeys", null,
17667 "managingFocusBackwardTraversalKeys", null,
17668 "NOT_OBSCURED", 0,
17669 "PARTIALLY_OBSCURED", 1,
17670 "COMPLETELY_OBSCURED", 2,
17671 "DEBUG_GRAPHICS_LOADED", false);
17672 c$.INPUT_VERIFIER_SOURCE_KEY = c$.prototype.INPUT_VERIFIER_SOURCE_KEY =  new Clazz._O ();
17673 Clazz_defineStatics (c$,
17674 "WHEN_FOCUSED", 0,
17675 "WHEN_ANCESTOR_OF_FOCUSED_COMPONENT", 1,
17676 "WHEN_IN_FOCUSED_WINDOW", 2,
17677 "UNDEFINED_CONDITION", -1,
17678 "WHEN_IN_FOCUSED_WINDOW_BINDINGS", "_WhenInFocusedWindow",
17679 "TOOL_TIP_TEXT_KEY", "ToolTipText",
17680 "NEXT_FOCUS", "nextFocus",
17681 "IS_DOUBLE_BUFFERED", 0,
17682 "ANCESTOR_USING_BUFFER", 1,
17683 "IS_PAINTING_TILE", 2,
17684 "IS_OPAQUE", 3,
17685 "FOCUS_INPUTMAP_CREATED", 5,
17686 "ANCESTOR_INPUTMAP_CREATED", 6,
17687 "WIF_INPUTMAP_CREATED", 7,
17688 "ACTIONMAP_CREATED", 8,
17689 "CREATED_DOUBLE_BUFFER", 9,
17690 "IS_PRINTING", 11,
17691 "IS_PRINTING_ALL", 12,
17692 "IS_REPAINTING", 13,
17693 "REQUEST_FOCUS_DISABLED", 22,
17694 "INHERITS_POPUP_MENU", 23,
17695 "OPAQUE_SET", 24,
17696 "AUTOSCROLLS_SET", 25,
17697 "REVALIDATE_RUNNABLE_SCHEDULED", 28);
17698 c$.tempRectangles = c$.prototype.tempRectangles =  new java.util.ArrayList (11);
17699 Clazz_defineStatics (c$,
17700 "defaultLocale", "JComponent.defaultLocale",
17701 "componentObtainingGraphicsFrom", null);
17702 c$.componentObtainingGraphicsFromLock = c$.prototype.componentObtainingGraphicsFromLock =  new Clazz._O ();
17703 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));
17704 });
17705 Clazz_declarePackage ("javax.swing");
17706 Clazz_load (["java.awt.event.ActionListener"], "javax.swing.Action", null, function () {
17707 c$ = Clazz_declareInterface (javax.swing, "Action", java.awt.event.ActionListener);
17708 Clazz_defineStatics (c$,
17709 "DEFAULT", "Default",
17710 "NAME", "Name",
17711 "SHORT_DESCRIPTION", "ShortDescription",
17712 "LONG_DESCRIPTION", "LongDescription",
17713 "SMALL_ICON", "SmallIcon",
17714 "ACTION_COMMAND_KEY", "ActionCommandKey",
17715 "ACCELERATOR_KEY", "AcceleratorKey",
17716 "MNEMONIC_KEY", "MnemonicKey",
17717 "SELECTED_KEY", "SwingSelectedKey",
17718 "DISPLAYED_MNEMONIC_INDEX_KEY", "SwingDisplayedMnemonicIndexKey",
17719 "LARGE_ICON_KEY", "SwingLargeIconKey");
17720 });
17721 Clazz_declarePackage ("javax.swing");
17722 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 () {
17723 c$ = Clazz_declareType (javax.swing, "SwingUtilities", null, javax.swing.SwingConstants);
17724 c$.installSwingDropTargetAsNecessary = Clazz_defineMethod (c$, "installSwingDropTargetAsNecessary", 
17725 function (c, t) {
17726 }, "java.awt.Component,javax.swing.TransferHandler");
17727 c$.isRectangleContainingRectangle = Clazz_defineMethod (c$, "isRectangleContainingRectangle", 
17728 function (a, b) {
17729 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)) {
17730 return true;
17731 }return false;
17732 }, "java.awt.Rectangle,java.awt.Rectangle");
17733 c$.getLocalBounds = Clazz_defineMethod (c$, "getLocalBounds", 
17734 function (aComponent) {
17735 var b =  new java.awt.Rectangle (aComponent.getBounds ());
17736 b.x = b.y = 0;
17737 return b;
17738 }, "java.awt.Component");
17739 c$.getWindowAncestor = Clazz_defineMethod (c$, "getWindowAncestor", 
17740 function (c) {
17741 for (var p = c.getParent (); p != null; p = p.getParent ()) {
17742 if (Clazz_instanceOf (p, java.awt.Window)) {
17743 return p;
17744 }}
17745 return null;
17746 }, "java.awt.Component");
17747 c$.convertScreenLocationToParent = Clazz_defineMethod (c$, "convertScreenLocationToParent", 
17748 function (parent, x, y) {
17749 for (var p = parent; p != null; p = p.getParent ()) {
17750 if (Clazz_instanceOf (p, java.awt.Window)) {
17751 var point =  new java.awt.Point (x, y);
17752 javax.swing.SwingUtilities.convertPointFromScreen (point, parent);
17753 return point;
17754 }}
17755 throw  new Error ("convertScreenLocationToParent: no window ancestor");
17756 }, "java.awt.Container,~N,~N");
17757 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17758 function (source, aPoint, destination) {
17759 var p;
17760 if (source == null && destination == null) return aPoint;
17761 if (source == null) {
17762 source = javax.swing.SwingUtilities.getWindowAncestor (destination);
17763 if (source == null) throw  new Error ("Source component not connected to component tree hierarchy");
17764 }p =  new java.awt.Point (aPoint);
17765 javax.swing.SwingUtilities.convertPointToScreen (p, source);
17766 if (destination == null) {
17767 destination = javax.swing.SwingUtilities.getWindowAncestor (source);
17768 if (destination == null) throw  new Error ("Destination component not connected to component tree hierarchy");
17769 }javax.swing.SwingUtilities.convertPointFromScreen (p, destination);
17770 return p;
17771 }, "java.awt.Component,java.awt.Point,java.awt.Component");
17772 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17773 function (source, x, y, destination) {
17774 var point =  new java.awt.Point (x, y);
17775 return javax.swing.SwingUtilities.convertPoint (source, point, destination);
17776 }, "java.awt.Component,~N,~N,java.awt.Component");
17777 c$.convertRectangle = Clazz_defineMethod (c$, "convertRectangle", 
17778 function (source, aRectangle, destination) {
17779 var point =  new java.awt.Point (aRectangle.x, aRectangle.y);
17780 point = javax.swing.SwingUtilities.convertPoint (source, point, destination);
17781 return  new java.awt.Rectangle (point.x, point.y, aRectangle.width, aRectangle.height);
17782 }, "java.awt.Component,java.awt.Rectangle,java.awt.Component");
17783 c$.getAncestorOfClass = Clazz_defineMethod (c$, "getAncestorOfClass", 
17784 function (c, comp) {
17785 if (comp == null || c == null) return null;
17786 var parent = comp.getParent ();
17787 while (parent != null && !(c.isInstance (parent))) parent = parent.getParent ();
17788
17789 return parent;
17790 }, "Class,java.awt.Component");
17791 c$.getAncestorNamed = Clazz_defineMethod (c$, "getAncestorNamed", 
17792 function (name, comp) {
17793 if (comp == null || name == null) return null;
17794 var parent = comp.getParent ();
17795 while (parent != null && !(name.equals (parent.getName ()))) parent = parent.getParent ();
17796
17797 return parent;
17798 }, "~S,java.awt.Component");
17799 c$.getDeepestComponentAt = Clazz_defineMethod (c$, "getDeepestComponentAt", 
17800 function (parent, x, y) {
17801 if (!parent.contains (x, y)) {
17802 return null;
17803 }if (Clazz_instanceOf (parent, java.awt.Container)) {
17804 var components = (parent).getComponents ();
17805 for (var i = 0; i < components.length; i++) {
17806 var comp = components[i];
17807 if (comp != null && comp.isVisible ()) {
17808 var loc = comp.getLocation ();
17809 if (Clazz_instanceOf (comp, java.awt.Container)) {
17810 comp = javax.swing.SwingUtilities.getDeepestComponentAt (comp, x - loc.x, y - loc.y);
17811 } else {
17812 comp = comp.getComponentAt (x - loc.x, y - loc.y);
17813 }if (comp != null && comp.isVisible ()) {
17814 return comp;
17815 }}}
17816 }return parent;
17817 }, "java.awt.Component,~N,~N");
17818 c$.convertMouseEvent = Clazz_defineMethod (c$, "convertMouseEvent", 
17819 function (source, sourceEvent, destination) {
17820 var p = javax.swing.SwingUtilities.convertPoint (source,  new java.awt.Point (sourceEvent.getX (), sourceEvent.getY ()), destination);
17821 var newSource;
17822 if (destination != null) newSource = destination;
17823  else newSource = source;
17824 var newEvent;
17825 if (Clazz_instanceOf (sourceEvent, java.awt.event.MouseWheelEvent)) {
17826 var sourceWheelEvent = sourceEvent;
17827 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 ());
17828 } else if (Clazz_instanceOf (sourceEvent, javax.swing.event.MenuDragMouseEvent)) {
17829 var sourceMenuDragEvent = sourceEvent;
17830 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 ());
17831 } else {
17832 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);
17833 }return newEvent;
17834 }, "java.awt.Component,java.awt.event.MouseEvent,java.awt.Component");
17835 c$.convertPointToScreen = Clazz_defineMethod (c$, "convertPointToScreen", 
17836 function (p, c) {
17837 var x;
17838 var y;
17839 do {
17840 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17841 x = (c).getX ();
17842 y = (c).getY ();
17843 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17844 try {
17845 var pp = c.getLocationOnScreen ();
17846 x = pp.x;
17847 y = pp.y;
17848 } catch (icse) {
17849 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17850 x = c.getX ();
17851 y = c.getY ();
17852 } else {
17853 throw icse;
17854 }
17855 }
17856 } else {
17857 x = c.getX ();
17858 y = c.getY ();
17859 }p.x += x;
17860 p.y += y;
17861 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17862 c = c.getParent ();
17863 } while (c != null);
17864 }, "java.awt.Point,java.awt.Component");
17865 c$.convertPointFromScreen = Clazz_defineMethod (c$, "convertPointFromScreen", 
17866 function (p, c) {
17867 var x;
17868 var y;
17869 do {
17870 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17871 x = (c).getX ();
17872 y = (c).getY ();
17873 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17874 try {
17875 var pp = c.getLocationOnScreen ();
17876 x = pp.x;
17877 y = pp.y;
17878 } catch (icse) {
17879 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17880 x = c.getX ();
17881 y = c.getY ();
17882 } else {
17883 throw icse;
17884 }
17885 }
17886 } else {
17887 x = c.getX ();
17888 y = c.getY ();
17889 }p.x -= x;
17890 p.y -= y;
17891 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17892 c = c.getParent ();
17893 } while (c != null);
17894 }, "java.awt.Point,java.awt.Component");
17895 c$.windowForComponent = Clazz_defineMethod (c$, "windowForComponent", 
17896 function (c) {
17897 return javax.swing.SwingUtilities.getWindowAncestor (c);
17898 }, "java.awt.Component");
17899 c$.isDescendingFrom = Clazz_defineMethod (c$, "isDescendingFrom", 
17900 function (a, b) {
17901 if (a === b) return true;
17902 for (var p = a.getParent (); p != null; p = p.getParent ()) if (p === b) return true;
17903
17904 return false;
17905 }, "java.awt.Component,java.awt.Component");
17906 c$.computeIntersection = Clazz_defineMethod (c$, "computeIntersection", 
17907 function (x, y, width, height, dest) {
17908 var x1 = (x > dest.x) ? x : dest.x;
17909 var x2 = ((x + width) < (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17910 var y1 = (y > dest.y) ? y : dest.y;
17911 var y2 = ((y + height) < (dest.y + dest.height) ? (y + height) : (dest.y + dest.height));
17912 dest.x = x1;
17913 dest.y = y1;
17914 dest.width = x2 - x1;
17915 dest.height = y2 - y1;
17916 if (dest.width < 0 || dest.height < 0) {
17917 dest.x = dest.y = dest.width = dest.height = 0;
17918 }return dest;
17919 }, "~N,~N,~N,~N,java.awt.Rectangle");
17920 c$.computeUnion = Clazz_defineMethod (c$, "computeUnion", 
17921 function (x, y, width, height, dest) {
17922 var x1 = (x < dest.x) ? x : dest.x;
17923 var x2 = ((x + width) > (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17924 var y1 = (y < dest.y) ? y : dest.y;
17925 var y2 = ((y + height) > (dest.y + dest.height)) ? (y + height) : (dest.y + dest.height);
17926 dest.x = x1;
17927 dest.y = y1;
17928 dest.width = (x2 - x1);
17929 dest.height = (y2 - y1);
17930 return dest;
17931 }, "~N,~N,~N,~N,java.awt.Rectangle");
17932 c$.computeDifference = Clazz_defineMethod (c$, "computeDifference", 
17933 function (rectA, rectB) {
17934 if (rectB == null || !rectA.intersects (rectB) || javax.swing.SwingUtilities.isRectangleContainingRectangle (rectB, rectA)) {
17935 return  new Array (0);
17936 }var t =  new java.awt.Rectangle ();
17937 var a = null;
17938 var b = null;
17939 var c = null;
17940 var d = null;
17941 var result;
17942 var rectCount = 0;
17943 if (javax.swing.SwingUtilities.isRectangleContainingRectangle (rectA, rectB)) {
17944 t.x = rectA.x;
17945 t.y = rectA.y;
17946 t.width = rectB.x - rectA.x;
17947 t.height = rectA.height;
17948 if (t.width > 0 && t.height > 0) {
17949 a =  new java.awt.Rectangle (t);
17950 rectCount++;
17951 }t.x = rectB.x;
17952 t.y = rectA.y;
17953 t.width = rectB.width;
17954 t.height = rectB.y - rectA.y;
17955 if (t.width > 0 && t.height > 0) {
17956 b =  new java.awt.Rectangle (t);
17957 rectCount++;
17958 }t.x = rectB.x;
17959 t.y = rectB.y + rectB.height;
17960 t.width = rectB.width;
17961 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17962 if (t.width > 0 && t.height > 0) {
17963 c =  new java.awt.Rectangle (t);
17964 rectCount++;
17965 }t.x = rectB.x + rectB.width;
17966 t.y = rectA.y;
17967 t.width = rectA.x + rectA.width - (rectB.x + rectB.width);
17968 t.height = rectA.height;
17969 if (t.width > 0 && t.height > 0) {
17970 d =  new java.awt.Rectangle (t);
17971 rectCount++;
17972 }} else {
17973 if (rectB.x <= rectA.x && rectB.y <= rectA.y) {
17974 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17975 t.x = rectA.x;
17976 t.y = rectB.y + rectB.height;
17977 t.width = rectA.width;
17978 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17979 if (t.width > 0 && t.height > 0) {
17980 a = t;
17981 rectCount++;
17982 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
17983 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
17984 if (t.width > 0 && t.height > 0) {
17985 a = t;
17986 rectCount++;
17987 }} else {
17988 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectB.y + rectB.height) - rectA.y);
17989 if (t.width > 0 && t.height > 0) {
17990 a =  new java.awt.Rectangle (t);
17991 rectCount++;
17992 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17993 if (t.width > 0 && t.height > 0) {
17994 b =  new java.awt.Rectangle (t);
17995 rectCount++;
17996 }}} else if (rectB.x <= rectA.x && (rectB.y + rectB.height) >= (rectA.y + rectA.height)) {
17997 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17998 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17999 if (t.width > 0 && t.height > 0) {
18000 a = t;
18001 rectCount++;
18002 }} else {
18003 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18004 if (t.width > 0 && t.height > 0) {
18005 a =  new java.awt.Rectangle (t);
18006 rectCount++;
18007 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectA.y + rectA.height) - rectB.y);
18008 if (t.width > 0 && t.height > 0) {
18009 b =  new java.awt.Rectangle (t);
18010 rectCount++;
18011 }}} else if (rectB.x <= rectA.x) {
18012 if ((rectB.x + rectB.width) >= (rectA.x + rectA.width)) {
18013 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18014 if (t.width > 0 && t.height > 0) {
18015 a =  new java.awt.Rectangle (t);
18016 rectCount++;
18017 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18018 if (t.width > 0 && t.height > 0) {
18019 b =  new java.awt.Rectangle (t);
18020 rectCount++;
18021 }} else {
18022 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18023 if (t.width > 0 && t.height > 0) {
18024 a =  new java.awt.Rectangle (t);
18025 rectCount++;
18026 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectB.height);
18027 if (t.width > 0 && t.height > 0) {
18028 b =  new java.awt.Rectangle (t);
18029 rectCount++;
18030 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18031 if (t.width > 0 && t.height > 0) {
18032 c =  new java.awt.Rectangle (t);
18033 rectCount++;
18034 }}} else if (rectB.x <= (rectA.x + rectA.width) && (rectB.x + rectB.width) > (rectA.x + rectA.width)) {
18035 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18036 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18037 if (t.width > 0 && t.height > 0) {
18038 a = t;
18039 rectCount++;
18040 }} else if (rectB.y <= rectA.y) {
18041 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, (rectB.y + rectB.height) - rectA.y);
18042 if (t.width > 0 && t.height > 0) {
18043 a =  new java.awt.Rectangle (t);
18044 rectCount++;
18045 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18046 if (t.width > 0 && t.height > 0) {
18047 b =  new java.awt.Rectangle (t);
18048 rectCount++;
18049 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18050 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18051 if (t.width > 0 && t.height > 0) {
18052 a =  new java.awt.Rectangle (t);
18053 rectCount++;
18054 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, (rectA.y + rectA.height) - rectB.y);
18055 if (t.width > 0 && t.height > 0) {
18056 b =  new java.awt.Rectangle (t);
18057 rectCount++;
18058 }} else {
18059 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18060 if (t.width > 0 && t.height > 0) {
18061 a =  new java.awt.Rectangle (t);
18062 rectCount++;
18063 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, rectB.height);
18064 if (t.width > 0 && t.height > 0) {
18065 b =  new java.awt.Rectangle (t);
18066 rectCount++;
18067 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18068 if (t.width > 0 && t.height > 0) {
18069 c =  new java.awt.Rectangle (t);
18070 rectCount++;
18071 }}} else if (rectB.x >= rectA.x && (rectB.x + rectB.width) <= (rectA.x + rectA.width)) {
18072 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18073 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18074 if (t.width > 0 && t.height > 0) {
18075 a =  new java.awt.Rectangle (t);
18076 rectCount++;
18077 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18078 if (t.width > 0 && t.height > 0) {
18079 b =  new java.awt.Rectangle (t);
18080 rectCount++;
18081 }} else if (rectB.y <= rectA.y) {
18082 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18083 if (t.width > 0 && t.height > 0) {
18084 a =  new java.awt.Rectangle (t);
18085 rectCount++;
18086 }t.reshape (rectB.x, (rectB.y + rectB.height), rectB.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18087 if (t.width > 0 && t.height > 0) {
18088 b =  new java.awt.Rectangle (t);
18089 rectCount++;
18090 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18091 if (t.width > 0 && t.height > 0) {
18092 c =  new java.awt.Rectangle (t);
18093 rectCount++;
18094 }} else {
18095 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18096 if (t.width > 0 && t.height > 0) {
18097 a =  new java.awt.Rectangle (t);
18098 rectCount++;
18099 }t.reshape (rectB.x, rectA.y, rectB.width, rectB.y - rectA.y);
18100 if (t.width > 0 && t.height > 0) {
18101 b =  new java.awt.Rectangle (t);
18102 rectCount++;
18103 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18104 if (t.width > 0 && t.height > 0) {
18105 c =  new java.awt.Rectangle (t);
18106 rectCount++;
18107 }}}}result =  new Array (rectCount);
18108 rectCount = 0;
18109 if (a != null) result[rectCount++] = a;
18110 if (b != null) result[rectCount++] = b;
18111 if (c != null) result[rectCount++] = c;
18112 if (d != null) result[rectCount++] = d;
18113 return result;
18114 }, "java.awt.Rectangle,java.awt.Rectangle");
18115 c$.isLeftMouseButton = Clazz_defineMethod (c$, "isLeftMouseButton", 
18116 function (anEvent) {
18117 return ((anEvent.getModifiers () & 16) != 0);
18118 }, "java.awt.event.MouseEvent");
18119 c$.isMiddleMouseButton = Clazz_defineMethod (c$, "isMiddleMouseButton", 
18120 function (anEvent) {
18121 return ((anEvent.getModifiers () & 8) == 8);
18122 }, "java.awt.event.MouseEvent");
18123 c$.isRightMouseButton = Clazz_defineMethod (c$, "isRightMouseButton", 
18124 function (anEvent) {
18125 return ((anEvent.getModifiers () & 4) == 4);
18126 }, "java.awt.event.MouseEvent");
18127 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18128 function (g, c, p, x, y, w, h) {
18129 javax.swing.SwingUtilities.getCellRendererPane (c, p).paintComponent (g, c, p, x, y, w, h, false);
18130 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
18131 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18132 function (g, c, p, r) {
18133 javax.swing.SwingUtilities.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
18134 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
18135 c$.getCellRendererPane = Clazz_defineMethod (c$, "getCellRendererPane", 
18136  function (c, p) {
18137 var shell = c.getParent ();
18138 if (Clazz_instanceOf (shell, javax.swing.CellRendererPane)) {
18139 if (shell.getParent () !== p) {
18140 p.add (shell);
18141 }} else {
18142 shell = swingjs.api.Interface.getInstance ("javax.swing.CellRendererPane", false);
18143 shell.add (c);
18144 p.add (shell);
18145 }return shell;
18146 }, "java.awt.Component,java.awt.Container");
18147 c$.updateComponentTreeUI = Clazz_defineMethod (c$, "updateComponentTreeUI", 
18148 function (c) {
18149 javax.swing.SwingUtilities.updateComponentTreeUI0 (c);
18150 c.invalidate ();
18151 c.validate ();
18152 c.repaint ();
18153 }, "java.awt.Component");
18154 c$.updateComponentTreeUI0 = Clazz_defineMethod (c$, "updateComponentTreeUI0", 
18155  function (c) {
18156 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
18157 var jc = c;
18158 jc.updateUI ();
18159 var jpm = jc.getComponentPopupMenu ();
18160 if (jpm != null) {
18161 javax.swing.SwingUtilities.updateComponentTreeUI (jpm);
18162 }}var children = null;
18163 if (Clazz_instanceOf (c, javax.swing.JMenu)) {
18164 children = (c).getMenuComponents ();
18165 } else if (Clazz_instanceOf (c, java.awt.Container)) {
18166 children = (c).getComponents ();
18167 }if (children != null) {
18168 for (var i = 0; i < children.length; i++) {
18169 javax.swing.SwingUtilities.updateComponentTreeUI0 (children[i]);
18170 }
18171 }}, "java.awt.Component");
18172 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
18173 function (doRun) {
18174 java.awt.EventQueue.invokeLater (doRun);
18175 }, "Runnable");
18176 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
18177 function (doRun) {
18178 java.awt.EventQueue.invokeAndWait (doRun);
18179 }, "Runnable");
18180 c$.isEventDispatchThread = Clazz_defineMethod (c$, "isEventDispatchThread", 
18181 function () {
18182 return java.awt.EventQueue.isDispatchThread ();
18183 });
18184 c$.getRootPane = Clazz_defineMethod (c$, "getRootPane", 
18185 function (c) {
18186 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
18187 return (c).getRootPane ();
18188 }for (; c != null; c = c.getParent ()) {
18189 if (Clazz_instanceOf (c, javax.swing.JRootPane)) {
18190 return c;
18191 }}
18192 return null;
18193 }, "java.awt.Component");
18194 c$.getRoot = Clazz_defineMethod (c$, "getRoot", 
18195 function (c) {
18196 var applet = null;
18197 for (var p = c; p != null; p = p.getParent ()) {
18198 if (Clazz_instanceOf (p, java.awt.Window)) {
18199 return p;
18200 }if (Clazz_instanceOf (p, java.applet.Applet)) {
18201 applet = p;
18202 }}
18203 return applet;
18204 }, "java.awt.Component");
18205 c$.processKeyBindings = Clazz_defineMethod (c$, "processKeyBindings", 
18206 function (event) {
18207 if (event != null) {
18208 if (event.isConsumed ()) {
18209 return false;
18210 }var component = event.getComponent ();
18211 var pressed = (event.getID () == 401);
18212 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (event)) {
18213 return false;
18214 }while (component != null) {
18215 if (Clazz_instanceOf (component, javax.swing.JComponent)) {
18216 return (component).processKeyBindings (event, pressed);
18217 }if ((Clazz_instanceOf (component, java.applet.Applet)) || (Clazz_instanceOf (component, java.awt.Window))) {
18218 return javax.swing.JComponent.processKeyBindingsForAllComponents (event, component, pressed);
18219 }component = component.getParent ();
18220 }
18221 }return false;
18222 }, "java.awt.event.KeyEvent");
18223 c$.isValidKeyEventForKeyBindings = Clazz_defineMethod (c$, "isValidKeyEventForKeyBindings", 
18224 function (e) {
18225 if (e.getID () == 400) {
18226 var mod = e.getModifiers ();
18227 if (((mod & 8) != 0) && ((mod & 2) == 0)) {
18228 return false;
18229 }}return true;
18230 }, "java.awt.event.KeyEvent");
18231 c$.notifyAction = Clazz_defineMethod (c$, "notifyAction", 
18232 function (action, ks, event, sender, modifiers) {
18233 if (action == null) {
18234 return false;
18235 }if (Clazz_instanceOf (action, jssun.swing.UIAction)) {
18236 if (!(action).isEnabled (sender)) {
18237 return false;
18238 }} else if (!action.isEnabled ()) {
18239 return false;
18240 }var commandO;
18241 var stayNull;
18242 commandO = action.getValue ("ActionCommandKey");
18243 if (commandO == null && (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin))) {
18244 stayNull = true;
18245 } else {
18246 stayNull = false;
18247 }var command;
18248 if (commandO != null) {
18249 command = commandO.toString ();
18250 } else if (!stayNull && event.getKeyChar () != '\uffff') {
18251 command = String.valueOf (event.getKeyChar ());
18252 } else {
18253 command = null;
18254 }action.actionPerformed ( new java.awt.event.ActionEvent (sender, 1001, command, event.getWhen (), modifiers));
18255 return true;
18256 }, "javax.swing.Action,javax.swing.KeyStroke,java.awt.event.KeyEvent,~O,~N");
18257 c$.replaceUIInputMap = Clazz_defineMethod (c$, "replaceUIInputMap", 
18258 function (component, type, uiInputMap) {
18259 var map = component.getInputMap (type, (uiInputMap != null));
18260 while (map != null) {
18261 var parent = map.getParent ();
18262 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18263 map.setParent (uiInputMap);
18264 return;
18265 }map = parent;
18266 }
18267 }, "javax.swing.JComponent,~N,javax.swing.InputMap");
18268 c$.replaceUIActionMap = Clazz_defineMethod (c$, "replaceUIActionMap", 
18269 function (component, uiActionMap) {
18270 var map = component.getActionMap ((uiActionMap != null));
18271 ;while (map != null) {
18272 var parent = map.getParent ();
18273 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18274 map.setParent (uiActionMap);
18275 return;
18276 }map = parent;
18277 }
18278 }, "javax.swing.JComponent,javax.swing.ActionMap");
18279 c$.getUIInputMap = Clazz_defineMethod (c$, "getUIInputMap", 
18280 function (component, condition) {
18281 var map = component.getInputMap (condition, false);
18282 while (map != null) {
18283 var parent = map.getParent ();
18284 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18285 return parent;
18286 }map = parent;
18287 }
18288 return null;
18289 }, "javax.swing.JComponent,~N");
18290 c$.getUIActionMap = Clazz_defineMethod (c$, "getUIActionMap", 
18291 function (component) {
18292 var map = component.getActionMap (false);
18293 while (map != null) {
18294 var parent = map.getParent ();
18295 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18296 return parent;
18297 }map = parent;
18298 }
18299 return null;
18300 }, "javax.swing.JComponent");
18301 c$.getSharedOwnerFrame = Clazz_defineMethod (c$, "getSharedOwnerFrame", 
18302 function () {
18303 var sharedOwnerFrame = javax.swing.SwingUtilities.appContextGet (javax.swing.SwingUtilities.sharedOwnerFrameKey);
18304 if (sharedOwnerFrame == null) {
18305 sharedOwnerFrame =  new javax.swing.SwingUtilities.SharedOwnerFrame ();
18306 javax.swing.SwingUtilities.appContextPut (javax.swing.SwingUtilities.sharedOwnerFrameKey, sharedOwnerFrame);
18307 }return sharedOwnerFrame;
18308 });
18309 c$.getSharedOwnerFrameShutdownListener = Clazz_defineMethod (c$, "getSharedOwnerFrameShutdownListener", 
18310 function () {
18311 var sharedOwnerFrame = javax.swing.SwingUtilities.getSharedOwnerFrame ();
18312 return sharedOwnerFrame;
18313 });
18314 c$.appContextGet = Clazz_defineMethod (c$, "appContextGet", 
18315 function (key) {
18316 return jssun.awt.AppContext.getAppContext ().get (key);
18317 }, "~O");
18318 c$.appContextPut = Clazz_defineMethod (c$, "appContextPut", 
18319 function (key, value) {
18320 jssun.awt.AppContext.getAppContext ().put (key, value);
18321 }, "~O,~O");
18322 c$.appContextRemove = Clazz_defineMethod (c$, "appContextRemove", 
18323 function (key) {
18324 jssun.awt.AppContext.getAppContext ().remove (key);
18325 }, "~O");
18326 c$.loadSystemClass = Clazz_defineMethod (c$, "loadSystemClass", 
18327 function (className) {
18328 return Clazz._4Name (className, true, Thread.currentThread ().getContextClassLoader ());
18329 }, "~S");
18330 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
18331 function (c) {
18332 return c.getComponentOrientation ().isLeftToRight ();
18333 }, "java.awt.Component");
18334 c$.doesIconReferenceImage = Clazz_defineMethod (c$, "doesIconReferenceImage", 
18335 function (icon, image) {
18336 var iconImage = (icon != null && (Clazz_instanceOf (icon, javax.swing.ImageIcon))) ? (icon).getImage () : null;
18337 return (iconImage === image);
18338 }, "javax.swing.Icon,java.awt.Image");
18339 c$.findDisplayedMnemonicIndex = Clazz_defineMethod (c$, "findDisplayedMnemonicIndex", 
18340 function (text, mnemonic) {
18341 if (text == null || mnemonic == 0) {
18342 return -1;
18343 }var uc = Character.toUpperCase (String.fromCharCode (mnemonic));
18344 var lc = Character.toLowerCase (String.fromCharCode (mnemonic));
18345 var uci = text.indexOf (uc);
18346 var lci = text.indexOf (lc);
18347 if (uci == -1) {
18348 return lci;
18349 } else if (lci == -1) {
18350 return uci;
18351 } else {
18352 return (lci < uci) ? lci : uci;
18353 }}, "~S,~N");
18354 c$.calculateInnerArea = Clazz_defineMethod (c$, "calculateInnerArea", 
18355 function (c, r) {
18356 if (c == null) {
18357 return null;
18358 }var rect = r;
18359 var insets = c.getInsets ();
18360 if (rect == null) {
18361 rect =  new java.awt.Rectangle ();
18362 }rect.x = insets.left;
18363 rect.y = insets.top;
18364 rect.width = c.getWidth () - insets.left - insets.right;
18365 rect.height = c.getHeight () - insets.top - insets.bottom;
18366 return rect;
18367 }, "javax.swing.JComponent,java.awt.Rectangle");
18368 c$.updateRendererOrEditorUI = Clazz_defineMethod (c$, "updateRendererOrEditorUI", 
18369 function (rendererOrEditor) {
18370 if (rendererOrEditor == null) {
18371 return;
18372 }var component = null;
18373 if (Clazz_instanceOf (rendererOrEditor, java.awt.Component)) {
18374 component = rendererOrEditor;
18375 }if (Clazz_instanceOf (rendererOrEditor, javax.swing.DefaultCellEditor)) {
18376 component = (rendererOrEditor).getComponent ();
18377 }if (component != null) {
18378 javax.swing.SwingUtilities.updateComponentTreeUI (component);
18379 }}, "~O");
18380 Clazz_pu$h(self.c$);
18381 c$ = Clazz_declareType (javax.swing.SwingUtilities, "SharedOwnerFrame", java.awt.Frame, java.awt.event.WindowListener);
18382 Clazz_defineMethod (c$, "addNotify", 
18383 function () {
18384 Clazz_superCall (this, javax.swing.SwingUtilities.SharedOwnerFrame, "addNotify", []);
18385 this.installListeners ();
18386 });
18387 Clazz_defineMethod (c$, "installListeners", 
18388 function () {
18389 var a = this.getOwnedWindows ();
18390 for (var b = 0; b < a.length; b++) {
18391 var c = a[b];
18392 if (c != null) {
18393 c.removeWindowListener (this);
18394 c.addWindowListener (this);
18395 }}
18396 });
18397 Clazz_overrideMethod (c$, "windowClosed", 
18398 function (a) {
18399 var b = this.getOwnedWindows ();
18400 for (var c = 0; c < b.length; c++) {
18401 var d = b[c];
18402 if (d != null) {
18403 if (d.isDisplayable ()) {
18404 return;
18405 }d.removeWindowListener (this);
18406 }this.dispose ();
18407 }
18408 }, "java.awt.event.WindowEvent");
18409 Clazz_overrideMethod (c$, "windowOpened", 
18410 function (a) {
18411 }, "java.awt.event.WindowEvent");
18412 Clazz_overrideMethod (c$, "windowClosing", 
18413 function (a) {
18414 }, "java.awt.event.WindowEvent");
18415 Clazz_overrideMethod (c$, "windowIconified", 
18416 function (a) {
18417 }, "java.awt.event.WindowEvent");
18418 Clazz_overrideMethod (c$, "windowDeiconified", 
18419 function (a) {
18420 }, "java.awt.event.WindowEvent");
18421 Clazz_overrideMethod (c$, "windowActivated", 
18422 function (a) {
18423 }, "java.awt.event.WindowEvent");
18424 Clazz_overrideMethod (c$, "windowDeactivated", 
18425 function (a) {
18426 }, "java.awt.event.WindowEvent");
18427 Clazz_defineMethod (c$, "show", 
18428 function () {
18429 });
18430 Clazz_overrideMethod (c$, "dispose", 
18431 function () {
18432 });
18433 c$ = Clazz_p0p ();
18434 c$.sharedOwnerFrameKey = c$.prototype.sharedOwnerFrameKey =  new Clazz._O ();
18435 });
18436 Clazz_declarePackage ("java.awt");
18437 Clazz_load (["java.awt.Window"], "java.awt.Frame", ["java.lang.IllegalArgumentException", "java.awt.Cursor", "$.IllegalComponentStateException"], function () {
18438 c$ = Clazz_decorateAsClass (function () {
18439 this.maximizedBounds = null;
18440 this.title = "Untitled";
18441 this.resizable = true;
18442 this.undecorated = false;
18443 this.mbManagement = false;
18444 this.$state = 0;
18445 this.ownedWindows = null;
18446 this.menuBar = null;
18447 Clazz_instantialize (this, arguments);
18448 }, java.awt, "Frame", java.awt.Window);
18449 Clazz_makeConstructor (c$, 
18450 function () {
18451 this.construct ("");
18452 });
18453 Clazz_makeConstructor (c$, 
18454 function (gc) {
18455 this.construct ("", gc);
18456 }, "java.awt.GraphicsConfiguration");
18457 Clazz_makeConstructor (c$, 
18458 function (title) {
18459 Clazz_superConstructor (this, java.awt.Frame, []);
18460 this.initFrame (title, null);
18461 }, "~S");
18462 Clazz_makeConstructor (c$, 
18463 function (title, gc) {
18464 Clazz_superConstructor (this, java.awt.Frame, [gc]);
18465 this.initFrame (title, gc);
18466 }, "~S,java.awt.GraphicsConfiguration");
18467 Clazz_defineMethod (c$, "initFrame", 
18468  function (title, gc) {
18469 this.title = title;
18470 }, "~S,java.awt.GraphicsConfiguration");
18471 Clazz_overrideMethod (c$, "constructComponentName", 
18472 function () {
18473 {
18474 return "frame" + java.awt.Frame.$nameCounter++;
18475 }});
18476 Clazz_defineMethod (c$, "addNotify", 
18477 function () {
18478 if (this.peer == null) {
18479 this.peer = this.getToolkit ().createFrame (this);
18480 }var p = this.peer;
18481 p.setMaximizedBounds (this.maximizedBounds);
18482 Clazz_superCall (this, java.awt.Frame, "addNotify", []);
18483 });
18484 Clazz_defineMethod (c$, "getTitle", 
18485 function () {
18486 return this.title;
18487 });
18488 Clazz_defineMethod (c$, "setTitle", 
18489 function (title) {
18490 var oldTitle = this.title;
18491 if (title == null) {
18492 title = "";
18493 }{
18494 this.title = title;
18495 }this.firePropertyChangeObject ("title", oldTitle, title);
18496 }, "~S");
18497 Clazz_defineMethod (c$, "getIconImage", 
18498 function () {
18499 var icons = this.icons;
18500 if (icons != null) {
18501 if (icons.size () > 0) {
18502 return icons.get (0);
18503 }}return null;
18504 });
18505 Clazz_defineMethod (c$, "isResizable", 
18506 function () {
18507 return this.resizable;
18508 });
18509 Clazz_defineMethod (c$, "setResizable", 
18510 function (resizable) {
18511 var oldResizable = this.resizable;
18512 {
18513 this.resizable = resizable;
18514 }this.firePropertyChangeBool ("resizable", oldResizable, resizable);
18515 }, "~B");
18516 Clazz_defineMethod (c$, "setState", 
18517 function (state) {
18518 var current = this.getExtendedState ();
18519 if (state == 1 && (current & 1) == 0) {
18520 this.setExtendedState (current | 1);
18521 } else if (state == 0 && (current & 1) != 0) {
18522 this.setExtendedState (current & -2);
18523 }}, "~N");
18524 Clazz_defineMethod (c$, "setExtendedState", 
18525 function (state) {
18526 if (!this.isFrameStateSupported (state)) {
18527 return;
18528 }this.$state = state;
18529 }, "~N");
18530 Clazz_defineMethod (c$, "isFrameStateSupported", 
18531  function (state) {
18532 if (!this.getToolkit ().isFrameStateSupported (state)) {
18533 if (((state & 1) != 0) && !this.getToolkit ().isFrameStateSupported (1)) {
18534 return false;
18535 } else {
18536 state &= -2;
18537 }return this.getToolkit ().isFrameStateSupported (state);
18538 }return true;
18539 }, "~N");
18540 Clazz_defineMethod (c$, "getState", 
18541 function () {
18542 return (this.getExtendedState () & 1) != 0 ? 1 : 0;
18543 });
18544 Clazz_defineMethod (c$, "getExtendedState", 
18545 function () {
18546 return this.$state;
18547 });
18548 Clazz_defineMethod (c$, "setMaximizedBounds", 
18549 function (bounds) {
18550 this.maximizedBounds = bounds;
18551 }, "java.awt.Rectangle");
18552 Clazz_defineMethod (c$, "getMaximizedBounds", 
18553 function () {
18554 return this.maximizedBounds;
18555 });
18556 Clazz_defineMethod (c$, "setUndecorated", 
18557 function (undecorated) {
18558 {
18559 if (this.isDisplayable ()) {
18560 throw  new java.awt.IllegalComponentStateException ("The frame is displayable.");
18561 }this.undecorated = undecorated;
18562 }}, "~B");
18563 Clazz_defineMethod (c$, "isUndecorated", 
18564 function () {
18565 return this.undecorated;
18566 });
18567 Clazz_overrideMethod (c$, "removeNotify", 
18568 function () {
18569 });
18570 Clazz_defineMethod (c$, "paramString", 
18571 function () {
18572 var str = Clazz_superCall (this, java.awt.Frame, "paramString", []);
18573 if (this.title != null) {
18574 str += ",title=" + this.title;
18575 }if (this.resizable) {
18576 str += ",resizable";
18577 }this.getExtendedState ();
18578 if (this.$state == 0) {
18579 str += ",normal";
18580 } else {
18581 if ((this.$state & 1) != 0) {
18582 str += ",iconified";
18583 }if ((this.$state & 6) == 6) {
18584 str += ",maximized";
18585 } else if ((this.$state & 2) != 0) {
18586 str += ",maximized_horiz";
18587 } else if ((this.$state & 4) != 0) {
18588 str += ",maximized_vert";
18589 }}return str;
18590 });
18591 Clazz_defineMethod (c$, "setCursor", 
18592 function (cursorType) {
18593 if (cursorType < 0 || cursorType > 13) {
18594 throw  new IllegalArgumentException ("illegal cursor type");
18595 }this.setCursor (java.awt.Cursor.getPredefinedCursor (cursorType));
18596 }, "~N");
18597 Clazz_defineMethod (c$, "getCursorType", 
18598 function () {
18599 return (this.getCursor ().getType ());
18600 });
18601 c$.getFrames = Clazz_defineMethod (c$, "getFrames", 
18602 function () {
18603 var allWindows = java.awt.Window.getWindows ();
18604 var frameCount = 0;
18605 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18606 if (Clazz_instanceOf (w, java.awt.Frame)) {
18607 frameCount++;
18608 }}
18609 var frames =  new Array (frameCount);
18610 var c = 0;
18611 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18612 if (Clazz_instanceOf (w, java.awt.Frame)) {
18613 frames[c++] = w;
18614 }}
18615 return frames;
18616 });
18617 Clazz_defineStatics (c$,
18618 "DEFAULT_CURSOR", 0,
18619 "CROSSHAIR_CURSOR", 1,
18620 "TEXT_CURSOR", 2,
18621 "WAIT_CURSOR", 3,
18622 "SW_RESIZE_CURSOR", 4,
18623 "SE_RESIZE_CURSOR", 5,
18624 "NW_RESIZE_CURSOR", 6,
18625 "NE_RESIZE_CURSOR", 7,
18626 "N_RESIZE_CURSOR", 8,
18627 "S_RESIZE_CURSOR", 9,
18628 "W_RESIZE_CURSOR", 10,
18629 "E_RESIZE_CURSOR", 11,
18630 "HAND_CURSOR", 12,
18631 "MOVE_CURSOR", 13,
18632 "NORMAL", 0,
18633 "ICONIFIED", 1,
18634 "MAXIMIZED_HORIZ", 2,
18635 "MAXIMIZED_VERT", 4,
18636 "MAXIMIZED_BOTH", 6,
18637 "$base", "frame",
18638 "$nameCounter", 0);
18639 });
18640 Clazz_declarePackage ("java.awt");
18641 Clazz_load (["java.lang.IllegalStateException"], "java.awt.IllegalComponentStateException", null, function () {
18642 c$ = Clazz_declareType (java.awt, "IllegalComponentStateException", IllegalStateException);
18643 });
18644 Clazz_declarePackage ("javax.swing");
18645 c$ = Clazz_declareInterface (javax.swing, "SwingConstants");
18646 Clazz_defineStatics (c$,
18647 "CENTER", 0,
18648 "TOP", 1,
18649 "LEFT", 2,
18650 "BOTTOM", 3,
18651 "RIGHT", 4,
18652 "NORTH", 1,
18653 "NORTH_EAST", 2,
18654 "EAST", 3,
18655 "SOUTH_EAST", 4,
18656 "SOUTH", 5,
18657 "SOUTH_WEST", 6,
18658 "WEST", 7,
18659 "NORTH_WEST", 8,
18660 "HORIZONTAL", 0,
18661 "VERTICAL", 1,
18662 "LEADING", 10,
18663 "TRAILING", 11,
18664 "NEXT", 12,
18665 "PREVIOUS", 13);
18666 Clazz_declarePackage ("java.awt");
18667 Clazz_load (["java.awt.Shape", "java.awt.geom.Rectangle2D"], "java.awt.Rectangle", ["java.awt.Dimension", "$.Point"], function () {
18668 c$ = Clazz_decorateAsClass (function () {
18669 this.x = 0;
18670 this.y = 0;
18671 this.width = 0;
18672 this.height = 0;
18673 Clazz_instantialize (this, arguments);
18674 }, java.awt, "Rectangle", java.awt.geom.Rectangle2D, java.awt.Shape);
18675 Clazz_makeConstructor (c$, 
18676 function () {
18677 this.construct (0, 0, 0, 0);
18678 });
18679 Clazz_makeConstructor (c$, 
18680 function (r) {
18681 this.construct (r.x, r.y, r.width, r.height);
18682 }, "java.awt.Rectangle");
18683 Clazz_makeConstructor (c$, 
18684 function (x, y, width, height) {
18685 Clazz_superConstructor (this, java.awt.Rectangle, []);
18686 this.x = x;
18687 this.y = y;
18688 this.width = width;
18689 this.height = height;
18690 }, "~N,~N,~N,~N");
18691 Clazz_makeConstructor (c$, 
18692 function (width, height) {
18693 this.construct (0, 0, width, height);
18694 }, "~N,~N");
18695 Clazz_makeConstructor (c$, 
18696 function (p, d) {
18697 this.construct (p.x, p.y, d.width, d.height);
18698 }, "java.awt.Point,java.awt.Dimension");
18699 Clazz_makeConstructor (c$, 
18700 function (p) {
18701 this.construct (p.x, p.y, 0, 0);
18702 }, "java.awt.Point");
18703 Clazz_makeConstructor (c$, 
18704 function (d) {
18705 this.construct (0, 0, d.width, d.height);
18706 }, "java.awt.Dimension");
18707 Clazz_overrideMethod (c$, "getX", 
18708 function () {
18709 return this.x;
18710 });
18711 Clazz_overrideMethod (c$, "getY", 
18712 function () {
18713 return this.y;
18714 });
18715 Clazz_overrideMethod (c$, "getWidth", 
18716 function () {
18717 return this.width;
18718 });
18719 Clazz_overrideMethod (c$, "getHeight", 
18720 function () {
18721 return this.height;
18722 });
18723 Clazz_overrideMethod (c$, "getBounds", 
18724 function () {
18725 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18726 });
18727 Clazz_overrideMethod (c$, "getBounds2D", 
18728 function () {
18729 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18730 });
18731 Clazz_defineMethod (c$, "setBounds", 
18732 function (r) {
18733 this.reshape (r.x, r.y, r.width, r.height);
18734 }, "java.awt.Rectangle");
18735 Clazz_defineMethod (c$, "setBounds", 
18736 function (x, y, width, height) {
18737 this.reshape (x, y, width, height);
18738 }, "~N,~N,~N,~N");
18739 Clazz_defineMethod (c$, "setRect", 
18740 function (x, y, width, height) {
18741 var newx;
18742 var newy;
18743 var neww;
18744 var newh;
18745 if (x > 4.294967294E9) {
18746 newx = 2147483647;
18747 neww = -1;
18748 } else {
18749 newx = java.awt.Rectangle.clip (x, false);
18750 if (width >= 0) width += x - newx;
18751 neww = java.awt.Rectangle.clip (width, width >= 0);
18752 }if (y > 4.294967294E9) {
18753 newy = 2147483647;
18754 newh = -1;
18755 } else {
18756 newy = java.awt.Rectangle.clip (y, false);
18757 if (height >= 0) height += y - newy;
18758 newh = java.awt.Rectangle.clip (height, height >= 0);
18759 }this.reshape (newx, newy, neww, newh);
18760 }, "~N,~N,~N,~N");
18761 c$.clip = Clazz_defineMethod (c$, "clip", 
18762  function (v, doceil) {
18763 if (v <= -2147483648) {
18764 return -2147483648;
18765 }if (v >= 2147483647) {
18766 return 2147483647;
18767 }return Clazz_doubleToInt (doceil ? Math.ceil (v) : Math.floor (v));
18768 }, "~N,~B");
18769 Clazz_defineMethod (c$, "reshape", 
18770 function (x, y, width, height) {
18771 this.x = x;
18772 this.y = y;
18773 this.width = width;
18774 this.height = height;
18775 }, "~N,~N,~N,~N");
18776 Clazz_defineMethod (c$, "getLocation", 
18777 function () {
18778 return  new java.awt.Point (this.x, this.y);
18779 });
18780 Clazz_defineMethod (c$, "setLocation", 
18781 function (p) {
18782 this.setLocation (p.x, p.y);
18783 }, "java.awt.Point");
18784 Clazz_defineMethod (c$, "setLocation", 
18785 function (x, y) {
18786 this.move (x, y);
18787 }, "~N,~N");
18788 Clazz_defineMethod (c$, "move", 
18789 function (x, y) {
18790 this.x = x;
18791 this.y = y;
18792 }, "~N,~N");
18793 Clazz_defineMethod (c$, "translate", 
18794 function (dx, dy) {
18795 var oldv = this.x;
18796 var newv = oldv + dx;
18797 if (dx < 0) {
18798 if (newv > oldv) {
18799 if (this.width >= 0) {
18800 this.width += newv - -2147483648;
18801 }newv = -2147483648;
18802 }} else {
18803 if (newv < oldv) {
18804 if (this.width >= 0) {
18805 this.width += newv - 2147483647;
18806 if (this.width < 0) this.width = 2147483647;
18807 }newv = 2147483647;
18808 }}this.x = newv;
18809 oldv = this.y;
18810 newv = oldv + dy;
18811 if (dy < 0) {
18812 if (newv > oldv) {
18813 if (this.height >= 0) {
18814 this.height += newv - -2147483648;
18815 }newv = -2147483648;
18816 }} else {
18817 if (newv < oldv) {
18818 if (this.height >= 0) {
18819 this.height += newv - 2147483647;
18820 if (this.height < 0) this.height = 2147483647;
18821 }newv = 2147483647;
18822 }}this.y = newv;
18823 }, "~N,~N");
18824 Clazz_defineMethod (c$, "getSize", 
18825 function () {
18826 return  new java.awt.Dimension (this.width, this.height);
18827 });
18828 Clazz_defineMethod (c$, "setSize", 
18829 function (d) {
18830 this.setSize (d.width, d.height);
18831 }, "java.awt.Dimension");
18832 Clazz_defineMethod (c$, "setSize", 
18833 function (width, height) {
18834 this.resize (width, height);
18835 }, "~N,~N");
18836 Clazz_defineMethod (c$, "resize", 
18837 function (width, height) {
18838 this.width = width;
18839 this.height = height;
18840 }, "~N,~N");
18841 Clazz_defineMethod (c$, "contains", 
18842 function (p) {
18843 return this.contains (p.x, p.y);
18844 }, "java.awt.Point");
18845 Clazz_defineMethod (c$, "contains", 
18846 function (x, y) {
18847 return this.inside (x, y);
18848 }, "~N,~N");
18849 Clazz_defineMethod (c$, "contains", 
18850 function (r) {
18851 return this.contains (r.x, r.y, r.width, r.height);
18852 }, "java.awt.Rectangle");
18853 Clazz_defineMethod (c$, "contains", 
18854 function (X, Y, W, H) {
18855 var w = this.width;
18856 var h = this.height;
18857 if ((w | h | W | H) < 0) {
18858 return false;
18859 }var x = this.x;
18860 var y = this.y;
18861 if (X < x || Y < y) {
18862 return false;
18863 }w += x;
18864 W += X;
18865 if (W <= X) {
18866 if (w >= x || W > w) return false;
18867 } else {
18868 if (w >= x && W > w) return false;
18869 }h += y;
18870 H += Y;
18871 if (H <= Y) {
18872 if (h >= y || H > h) return false;
18873 } else {
18874 if (h >= y && H > h) return false;
18875 }return true;
18876 }, "~N,~N,~N,~N");
18877 Clazz_defineMethod (c$, "inside", 
18878 function (X, Y) {
18879 var w = this.width;
18880 var h = this.height;
18881 if ((w | h) < 0) {
18882 return false;
18883 }var x = this.x;
18884 var y = this.y;
18885 if (X < x || Y < y) {
18886 return false;
18887 }w += x;
18888 h += y;
18889 return ((w < x || w > X) && (h < y || h > Y));
18890 }, "~N,~N");
18891 Clazz_defineMethod (c$, "intersects", 
18892 function (r) {
18893 var tw = this.width;
18894 var th = this.height;
18895 var rw = r.width;
18896 var rh = r.height;
18897 if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) {
18898 return false;
18899 }var tx = this.x;
18900 var ty = this.y;
18901 var rx = r.x;
18902 var ry = r.y;
18903 rw += rx;
18904 rh += ry;
18905 tw += tx;
18906 th += ty;
18907 return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry));
18908 }, "java.awt.Rectangle");
18909 Clazz_defineMethod (c$, "intersection", 
18910 function (r) {
18911 var tx1 = this.x;
18912 var ty1 = this.y;
18913 var rx1 = r.x;
18914 var ry1 = r.y;
18915 var tx2 = tx1;
18916 tx2 += this.width;
18917 var ty2 = ty1;
18918 ty2 += this.height;
18919 var rx2 = rx1;
18920 rx2 += r.width;
18921 var ry2 = ry1;
18922 ry2 += r.height;
18923 if (tx1 < rx1) tx1 = rx1;
18924 if (ty1 < ry1) ty1 = ry1;
18925 if (tx2 > rx2) tx2 = rx2;
18926 if (ty2 > ry2) ty2 = ry2;
18927 tx2 -= tx1;
18928 ty2 -= ty1;
18929 if (tx2 < -2147483648) tx2 = -2147483648;
18930 if (ty2 < -2147483648) ty2 = -2147483648;
18931 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18932 }, "java.awt.Rectangle");
18933 Clazz_defineMethod (c$, "union", 
18934 function (r) {
18935 var tx2 = this.width;
18936 var ty2 = this.height;
18937 if ((tx2 | ty2) < 0) {
18938 return  new java.awt.Rectangle (r);
18939 }var rx2 = r.width;
18940 var ry2 = r.height;
18941 if ((rx2 | ry2) < 0) {
18942 return  new java.awt.Rectangle (this);
18943 }var tx1 = this.x;
18944 var ty1 = this.y;
18945 tx2 += tx1;
18946 ty2 += ty1;
18947 var rx1 = r.x;
18948 var ry1 = r.y;
18949 rx2 += rx1;
18950 ry2 += ry1;
18951 if (tx1 > rx1) tx1 = rx1;
18952 if (ty1 > ry1) ty1 = ry1;
18953 if (tx2 < rx2) tx2 = rx2;
18954 if (ty2 < ry2) ty2 = ry2;
18955 tx2 -= tx1;
18956 ty2 -= ty1;
18957 if (tx2 > 2147483647) tx2 = 2147483647;
18958 if (ty2 > 2147483647) ty2 = 2147483647;
18959 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18960 }, "java.awt.Rectangle");
18961 Clazz_defineMethod (c$, "add", 
18962 function (newx, newy) {
18963 if ((this.width | this.height) < 0) {
18964 this.x = newx;
18965 this.y = newy;
18966 this.width = this.height = 0;
18967 return;
18968 }var x1 = this.x;
18969 var y1 = this.y;
18970 var x2 = this.width;
18971 var y2 = this.height;
18972 x2 += x1;
18973 y2 += y1;
18974 if (x1 > newx) x1 = newx;
18975 if (y1 > newy) y1 = newy;
18976 if (x2 < newx) x2 = newx;
18977 if (y2 < newy) y2 = newy;
18978 x2 -= x1;
18979 y2 -= y1;
18980 if (x2 > 2147483647) x2 = 2147483647;
18981 if (y2 > 2147483647) y2 = 2147483647;
18982 this.reshape (x1, y1, x2, y2);
18983 }, "~N,~N");
18984 Clazz_defineMethod (c$, "add", 
18985 function (pt) {
18986 this.add (pt.x, pt.y);
18987 }, "java.awt.Point");
18988 Clazz_defineMethod (c$, "add", 
18989 function (r) {
18990 var tx2 = this.width;
18991 var ty2 = this.height;
18992 if ((tx2 | ty2) < 0) {
18993 this.reshape (r.x, r.y, r.width, r.height);
18994 }var rx2 = r.width;
18995 var ry2 = r.height;
18996 if ((rx2 | ry2) < 0) {
18997 return;
18998 }var tx1 = this.x;
18999 var ty1 = this.y;
19000 tx2 += tx1;
19001 ty2 += ty1;
19002 var rx1 = r.x;
19003 var ry1 = r.y;
19004 rx2 += rx1;
19005 ry2 += ry1;
19006 if (tx1 > rx1) tx1 = rx1;
19007 if (ty1 > ry1) ty1 = ry1;
19008 if (tx2 < rx2) tx2 = rx2;
19009 if (ty2 < ry2) ty2 = ry2;
19010 tx2 -= tx1;
19011 ty2 -= ty1;
19012 if (tx2 > 2147483647) tx2 = 2147483647;
19013 if (ty2 > 2147483647) ty2 = 2147483647;
19014 this.reshape (tx1, ty1, tx2, ty2);
19015 }, "java.awt.Rectangle");
19016 Clazz_defineMethod (c$, "grow", 
19017 function (h, v) {
19018 var x0 = this.x;
19019 var y0 = this.y;
19020 var x1 = this.width;
19021 var y1 = this.height;
19022 x1 += x0;
19023 y1 += y0;
19024 x0 -= h;
19025 y0 -= v;
19026 x1 += h;
19027 y1 += v;
19028 if (x1 < x0) {
19029 x1 -= x0;
19030 if (x1 < -2147483648) x1 = -2147483648;
19031 if (x0 < -2147483648) x0 = -2147483648;
19032  else if (x0 > 2147483647) x0 = 2147483647;
19033 } else {
19034 if (x0 < -2147483648) x0 = -2147483648;
19035  else if (x0 > 2147483647) x0 = 2147483647;
19036 x1 -= x0;
19037 if (x1 < -2147483648) x1 = -2147483648;
19038  else if (x1 > 2147483647) x1 = 2147483647;
19039 }if (y1 < y0) {
19040 y1 -= y0;
19041 if (y1 < -2147483648) y1 = -2147483648;
19042 if (y0 < -2147483648) y0 = -2147483648;
19043  else if (y0 > 2147483647) y0 = 2147483647;
19044 } else {
19045 if (y0 < -2147483648) y0 = -2147483648;
19046  else if (y0 > 2147483647) y0 = 2147483647;
19047 y1 -= y0;
19048 if (y1 < -2147483648) y1 = -2147483648;
19049  else if (y1 > 2147483647) y1 = 2147483647;
19050 }this.reshape (x0, y0, x1, y1);
19051 }, "~N,~N");
19052 Clazz_overrideMethod (c$, "isEmpty", 
19053 function () {
19054 return (this.width <= 0) || (this.height <= 0);
19055 });
19056 Clazz_defineMethod (c$, "outcode", 
19057 function (x, y) {
19058 var out = 0;
19059 if (this.width <= 0) {
19060 out |= 5;
19061 } else if (x < this.x) {
19062 out |= 1;
19063 } else if (x > this.x + this.width) {
19064 out |= 4;
19065 }if (this.height <= 0) {
19066 out |= 10;
19067 } else if (y < this.y) {
19068 out |= 2;
19069 } else if (y > this.y + this.height) {
19070 out |= 8;
19071 }return out;
19072 }, "~N,~N");
19073 Clazz_overrideMethod (c$, "createIntersection", 
19074 function (r) {
19075 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
19076 return this.intersection (r);
19077 }var dest =  new java.awt.geom.Rectangle2D.Double ();
19078 java.awt.geom.Rectangle2D.intersect (this, r, dest);
19079 return dest;
19080 }, "java.awt.geom.Rectangle2D");
19081 Clazz_overrideMethod (c$, "createUnion", 
19082 function (r) {
19083 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
19084 return this.union (r);
19085 }var dest =  new java.awt.geom.Rectangle2D.Double ();
19086 java.awt.geom.Rectangle2D.union (this, r, dest);
19087 return dest;
19088 }, "java.awt.geom.Rectangle2D");
19089 Clazz_defineMethod (c$, "equals", 
19090 function (obj) {
19091 if (Clazz_instanceOf (obj, java.awt.Rectangle)) {
19092 var r = obj;
19093 return ((this.x == r.x) && (this.y == r.y) && (this.width == r.width) && (this.height == r.height));
19094 }return Clazz_superCall (this, java.awt.Rectangle, "equals", [obj]);
19095 }, "~O");
19096 Clazz_overrideMethod (c$, "toString", 
19097 function () {
19098 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",width=" + this.width + ",height=" + this.height + "]";
19099 });
19100 });
19101 Clazz_declarePackage ("java.awt");
19102 Clazz_declareInterface (java.awt, "Shape");
19103 Clazz_declarePackage ("java.awt.geom");
19104 Clazz_load (["java.awt.geom.RectangularShape"], "java.awt.geom.Rectangle2D", ["java.lang.Double", "java.awt.geom.RectIterator"], function () {
19105 c$ = Clazz_declareType (java.awt.geom, "Rectangle2D", java.awt.geom.RectangularShape);
19106 Clazz_makeConstructor (c$, 
19107 function () {
19108 Clazz_superConstructor (this, java.awt.geom.Rectangle2D, []);
19109 });
19110 Clazz_defineMethod (c$, "setRect", 
19111 function (r) {
19112 this.setRect (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19113 }, "java.awt.geom.Rectangle2D");
19114 Clazz_defineMethod (c$, "intersectsLine", 
19115 function (x1, y1, x2, y2) {
19116 var out1;
19117 var out2;
19118 if ((out2 = this.outcode (x2, y2)) == 0) {
19119 return true;
19120 }while ((out1 = this.outcode (x1, y1)) != 0) {
19121 if ((out1 & out2) != 0) {
19122 return false;
19123 }if ((out1 & (5)) != 0) {
19124 var x = this.getX ();
19125 if ((out1 & 4) != 0) {
19126 x += this.getWidth ();
19127 }y1 = y1 + (x - x1) * (y2 - y1) / (x2 - x1);
19128 x1 = x;
19129 } else {
19130 var y = this.getY ();
19131 if ((out1 & 8) != 0) {
19132 y += this.getHeight ();
19133 }x1 = x1 + (y - y1) * (x2 - x1) / (y2 - y1);
19134 y1 = y;
19135 }}
19136 return true;
19137 }, "~N,~N,~N,~N");
19138 Clazz_defineMethod (c$, "intersectsLine", 
19139 function (l) {
19140 return this.intersectsLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
19141 }, "java.awt.geom.Line2D");
19142 Clazz_defineMethod (c$, "outcode", 
19143 function (p) {
19144 return this.outcode (p.getX (), p.getY ());
19145 }, "java.awt.geom.Point2D");
19146 Clazz_defineMethod (c$, "setFrame", 
19147 function (x, y, w, h) {
19148 this.setRect (x, y, w, h);
19149 }, "~N,~N,~N,~N");
19150 Clazz_overrideMethod (c$, "getBounds2D", 
19151 function () {
19152 return this.clone ();
19153 });
19154 Clazz_defineMethod (c$, "contains", 
19155 function (x, y) {
19156 var x0 = this.getX ();
19157 var y0 = this.getY ();
19158 return (x >= x0 && y >= y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19159 }, "~N,~N");
19160 Clazz_defineMethod (c$, "intersects", 
19161 function (x, y, w, h) {
19162 if (this.isEmpty () || w <= 0 || h <= 0) {
19163 return false;
19164 }var x0 = this.getX ();
19165 var y0 = this.getY ();
19166 return (x + w > x0 && y + h > y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19167 }, "~N,~N,~N,~N");
19168 Clazz_defineMethod (c$, "contains", 
19169 function (x, y, w, h) {
19170 if (this.isEmpty () || w <= 0 || h <= 0) {
19171 return false;
19172 }var x0 = this.getX ();
19173 var y0 = this.getY ();
19174 return (x >= x0 && y >= y0 && (x + w) <= x0 + this.getWidth () && (y + h) <= y0 + this.getHeight ());
19175 }, "~N,~N,~N,~N");
19176 c$.intersect = Clazz_defineMethod (c$, "intersect", 
19177 function (src1, src2, dest) {
19178 var x1 = Math.max (src1.getMinX (), src2.getMinX ());
19179 var y1 = Math.max (src1.getMinY (), src2.getMinY ());
19180 var x2 = Math.min (src1.getMaxX (), src2.getMaxX ());
19181 var y2 = Math.min (src1.getMaxY (), src2.getMaxY ());
19182 dest.setFrame (x1, y1, x2 - x1, y2 - y1);
19183 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19184 c$.union = Clazz_defineMethod (c$, "union", 
19185 function (src1, src2, dest) {
19186 var x1 = Math.min (src1.getMinX (), src2.getMinX ());
19187 var y1 = Math.min (src1.getMinY (), src2.getMinY ());
19188 var x2 = Math.max (src1.getMaxX (), src2.getMaxX ());
19189 var y2 = Math.max (src1.getMaxY (), src2.getMaxY ());
19190 dest.setFrameFromDiagonal (x1, y1, x2, y2);
19191 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19192 Clazz_defineMethod (c$, "add", 
19193 function (newx, newy) {
19194 var x1 = Math.min (this.getMinX (), newx);
19195 var x2 = Math.max (this.getMaxX (), newx);
19196 var y1 = Math.min (this.getMinY (), newy);
19197 var y2 = Math.max (this.getMaxY (), newy);
19198 this.setRect (x1, y1, x2 - x1, y2 - y1);
19199 }, "~N,~N");
19200 Clazz_defineMethod (c$, "add", 
19201 function (pt) {
19202 this.add (pt.getX (), pt.getY ());
19203 }, "java.awt.geom.Point2D");
19204 Clazz_defineMethod (c$, "add", 
19205 function (r) {
19206 var x1 = Math.min (this.getMinX (), r.getMinX ());
19207 var x2 = Math.max (this.getMaxX (), r.getMaxX ());
19208 var y1 = Math.min (this.getMinY (), r.getMinY ());
19209 var y2 = Math.max (this.getMaxY (), r.getMaxY ());
19210 this.setRect (x1, y1, x2 - x1, y2 - y1);
19211 }, "java.awt.geom.Rectangle2D");
19212 Clazz_defineMethod (c$, "getPathIterator", 
19213 function (at) {
19214 return  new java.awt.geom.RectIterator (this, at);
19215 }, "java.awt.geom.AffineTransform");
19216 Clazz_defineMethod (c$, "getPathIterator", 
19217 function (at, flatness) {
19218 return  new java.awt.geom.RectIterator (this, at);
19219 }, "java.awt.geom.AffineTransform,~N");
19220 Clazz_overrideMethod (c$, "hashCode", 
19221 function () {
19222 var bits = java.lang.Double.doubleToLongBits (this.getX ());
19223 bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37;
19224 bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43;
19225 bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47;
19226 return ((bits) ^ ((bits >> 32)));
19227 });
19228 Clazz_overrideMethod (c$, "equals", 
19229 function (obj) {
19230 if (obj === this) {
19231 return true;
19232 }if (Clazz_instanceOf (obj, java.awt.geom.Rectangle2D)) {
19233 var r2d = obj;
19234 return ((this.getX () == r2d.getX ()) && (this.getY () == r2d.getY ()) && (this.getWidth () == r2d.getWidth ()) && (this.getHeight () == r2d.getHeight ()));
19235 }return false;
19236 }, "~O");
19237 Clazz_pu$h(self.c$);
19238 c$ = Clazz_decorateAsClass (function () {
19239 this.x = 0;
19240 this.y = 0;
19241 this.width = 0;
19242 this.height = 0;
19243 Clazz_instantialize (this, arguments);
19244 }, java.awt.geom.Rectangle2D, "Float", java.awt.geom.Rectangle2D);
19245 Clazz_makeConstructor (c$, 
19246 function (a, b, c, d) {
19247 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Float, []);
19248 {
19249 if (arguments.length == 0)
19250 return;
19251 }this.setRect (a, b, c, d);
19252 }, "~N,~N,~N,~N");
19253 Clazz_defineMethod (c$, "getX", 
19254 function () {
19255 return this.x;
19256 });
19257 Clazz_defineMethod (c$, "getY", 
19258 function () {
19259 return this.y;
19260 });
19261 Clazz_defineMethod (c$, "getWidth", 
19262 function () {
19263 return this.width;
19264 });
19265 Clazz_defineMethod (c$, "getHeight", 
19266 function () {
19267 return this.height;
19268 });
19269 Clazz_overrideMethod (c$, "isEmpty", 
19270 function () {
19271 return (this.width <= 0.0) || (this.height <= 0.0);
19272 });
19273 Clazz_defineMethod (c$, "setRect", 
19274 function (a, b, c, d) {
19275 this.x = a;
19276 this.y = b;
19277 this.width = c;
19278 this.height = d;
19279 }, "~N,~N,~N,~N");
19280 Clazz_defineMethod (c$, "setRect", 
19281 function (a, b, c, d) {
19282 this.x = a;
19283 this.y = b;
19284 this.width = c;
19285 this.height = d;
19286 }, "~N,~N,~N,~N");
19287 Clazz_defineMethod (c$, "setRect", 
19288 function (a) {
19289 this.x = a.getX ();
19290 this.y = a.getY ();
19291 this.width = a.getWidth ();
19292 this.height = a.getHeight ();
19293 }, "java.awt.geom.Rectangle2D");
19294 Clazz_defineMethod (c$, "outcode", 
19295 function (a, b) {
19296 var c = 0;
19297 if (this.width <= 0) {
19298 c |= 5;
19299 } else if (a < this.x) {
19300 c |= 1;
19301 } else if (a > this.x + this.width) {
19302 c |= 4;
19303 }if (this.height <= 0) {
19304 c |= 10;
19305 } else if (b < this.y) {
19306 c |= 2;
19307 } else if (b > this.y + this.height) {
19308 c |= 8;
19309 }return c;
19310 }, "~N,~N");
19311 Clazz_overrideMethod (c$, "getBounds2D", 
19312 function () {
19313 return  new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height);
19314 });
19315 Clazz_overrideMethod (c$, "createIntersection", 
19316 function (a) {
19317 var b;
19318 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19319 b =  new java.awt.geom.Rectangle2D.Float ();
19320 } else {
19321 b =  new java.awt.geom.Rectangle2D.Double ();
19322 }java.awt.geom.Rectangle2D.intersect (this, a, b);
19323 return b;
19324 }, "java.awt.geom.Rectangle2D");
19325 Clazz_overrideMethod (c$, "createUnion", 
19326 function (a) {
19327 var b;
19328 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19329 b =  new java.awt.geom.Rectangle2D.Float ();
19330 } else {
19331 b =  new java.awt.geom.Rectangle2D.Double ();
19332 }java.awt.geom.Rectangle2D.union (this, a, b);
19333 return b;
19334 }, "java.awt.geom.Rectangle2D");
19335 Clazz_overrideMethod (c$, "toString", 
19336 function () {
19337 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19338 });
19339 c$ = Clazz_p0p ();
19340 Clazz_pu$h(self.c$);
19341 c$ = Clazz_decorateAsClass (function () {
19342 this.x = 0;
19343 this.y = 0;
19344 this.width = 0;
19345 this.height = 0;
19346 Clazz_instantialize (this, arguments);
19347 }, java.awt.geom.Rectangle2D, "Double", java.awt.geom.Rectangle2D);
19348 Clazz_makeConstructor (c$, 
19349 function () {
19350 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19351 });
19352 Clazz_makeConstructor (c$, 
19353 function (a, b, c, d) {
19354 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19355 this.setRect (a, b, c, d);
19356 }, "~N,~N,~N,~N");
19357 Clazz_defineMethod (c$, "getX", 
19358 function () {
19359 return this.x;
19360 });
19361 Clazz_defineMethod (c$, "getY", 
19362 function () {
19363 return this.y;
19364 });
19365 Clazz_defineMethod (c$, "getWidth", 
19366 function () {
19367 return this.width;
19368 });
19369 Clazz_defineMethod (c$, "getHeight", 
19370 function () {
19371 return this.height;
19372 });
19373 Clazz_overrideMethod (c$, "isEmpty", 
19374 function () {
19375 return (this.width <= 0.0) || (this.height <= 0.0);
19376 });
19377 Clazz_defineMethod (c$, "setRect", 
19378 function (a, b, c, d) {
19379 this.x = a;
19380 this.y = b;
19381 this.width = c;
19382 this.height = d;
19383 }, "~N,~N,~N,~N");
19384 Clazz_defineMethod (c$, "setRect", 
19385 function (a) {
19386 this.x = a.getX ();
19387 this.y = a.getY ();
19388 this.width = a.getWidth ();
19389 this.height = a.getHeight ();
19390 }, "java.awt.geom.Rectangle2D");
19391 Clazz_defineMethod (c$, "outcode", 
19392 function (a, b) {
19393 var c = 0;
19394 if (this.width <= 0) {
19395 c |= 5;
19396 } else if (a < this.x) {
19397 c |= 1;
19398 } else if (a > this.x + this.width) {
19399 c |= 4;
19400 }if (this.height <= 0) {
19401 c |= 10;
19402 } else if (b < this.y) {
19403 c |= 2;
19404 } else if (b > this.y + this.height) {
19405 c |= 8;
19406 }return c;
19407 }, "~N,~N");
19408 Clazz_overrideMethod (c$, "getBounds2D", 
19409 function () {
19410 return  new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height);
19411 });
19412 Clazz_overrideMethod (c$, "createIntersection", 
19413 function (a) {
19414 var b =  new java.awt.geom.Rectangle2D.Double ();
19415 java.awt.geom.Rectangle2D.intersect (this, a, b);
19416 return b;
19417 }, "java.awt.geom.Rectangle2D");
19418 Clazz_overrideMethod (c$, "createUnion", 
19419 function (a) {
19420 var b =  new java.awt.geom.Rectangle2D.Double ();
19421 java.awt.geom.Rectangle2D.union (this, a, b);
19422 return b;
19423 }, "java.awt.geom.Rectangle2D");
19424 Clazz_overrideMethod (c$, "toString", 
19425 function () {
19426 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19427 });
19428 c$ = Clazz_p0p ();
19429 Clazz_defineStatics (c$,
19430 "OUT_LEFT", 1,
19431 "OUT_TOP", 2,
19432 "OUT_RIGHT", 4,
19433 "OUT_BOTTOM", 8);
19434 });
19435 Clazz_declarePackage ("java.awt.geom");
19436 Clazz_load (["java.awt.Shape"], "java.awt.geom.RectangularShape", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator"], function () {
19437 c$ = Clazz_declareType (java.awt.geom, "RectangularShape", null, [java.awt.Shape, Cloneable]);
19438 Clazz_makeConstructor (c$, 
19439 function () {
19440 });
19441 Clazz_defineMethod (c$, "getMinX", 
19442 function () {
19443 return this.getX ();
19444 });
19445 Clazz_defineMethod (c$, "getMinY", 
19446 function () {
19447 return this.getY ();
19448 });
19449 Clazz_defineMethod (c$, "getMaxX", 
19450 function () {
19451 return this.getX () + this.getWidth ();
19452 });
19453 Clazz_defineMethod (c$, "getMaxY", 
19454 function () {
19455 return this.getY () + this.getHeight ();
19456 });
19457 Clazz_defineMethod (c$, "getCenterX", 
19458 function () {
19459 return this.getX () + this.getWidth () / 2.0;
19460 });
19461 Clazz_defineMethod (c$, "getCenterY", 
19462 function () {
19463 return this.getY () + this.getHeight () / 2.0;
19464 });
19465 Clazz_defineMethod (c$, "getFrame", 
19466 function () {
19467 return  new java.awt.geom.Rectangle2D.Double (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
19468 });
19469 Clazz_defineMethod (c$, "setFrame", 
19470 function (loc, size) {
19471 this.setFrame (loc.getX (), loc.getY (), size.getWidth (), size.getHeight ());
19472 }, "java.awt.geom.Point2D,java.awt.geom.Dimension2D");
19473 Clazz_defineMethod (c$, "setFrame", 
19474 function (r) {
19475 this.setFrame (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19476 }, "java.awt.geom.Rectangle2D");
19477 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19478 function (x1, y1, x2, y2) {
19479 if (x2 < x1) {
19480 var t = x1;
19481 x1 = x2;
19482 x2 = t;
19483 }if (y2 < y1) {
19484 var t = y1;
19485 y1 = y2;
19486 y2 = t;
19487 }this.setFrame (x1, y1, x2 - x1, y2 - y1);
19488 }, "~N,~N,~N,~N");
19489 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19490 function (p1, p2) {
19491 this.setFrameFromDiagonal (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
19492 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19493 Clazz_defineMethod (c$, "setFrameFromCenter", 
19494 function (centerX, centerY, cornerX, cornerY) {
19495 var halfW = Math.abs (cornerX - centerX);
19496 var halfH = Math.abs (cornerY - centerY);
19497 this.setFrame (centerX - halfW, centerY - halfH, halfW * 2.0, halfH * 2.0);
19498 }, "~N,~N,~N,~N");
19499 Clazz_defineMethod (c$, "setFrameFromCenter", 
19500 function (center, corner) {
19501 this.setFrameFromCenter (center.getX (), center.getY (), corner.getX (), corner.getY ());
19502 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19503 Clazz_defineMethod (c$, "contains", 
19504 function (p) {
19505 return this.contains (p.getX (), p.getY ());
19506 }, "java.awt.geom.Point2D");
19507 Clazz_overrideMethod (c$, "intersects", 
19508 function (r) {
19509 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19510 }, "java.awt.geom.Rectangle2D");
19511 Clazz_defineMethod (c$, "contains", 
19512 function (r) {
19513 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19514 }, "java.awt.geom.Rectangle2D");
19515 Clazz_overrideMethod (c$, "getBounds", 
19516 function () {
19517 var width = this.getWidth ();
19518 var height = this.getHeight ();
19519 if (width < 0 || height < 0) {
19520 return  new java.awt.Rectangle ();
19521 }var x = this.getX ();
19522 var y = this.getY ();
19523 var x1 = Math.floor (x);
19524 var y1 = Math.floor (y);
19525 var x2 = Math.ceil (x + width);
19526 var y2 = Math.ceil (y + height);
19527 return  new java.awt.Rectangle (Clazz_doubleToInt (x1), Clazz_doubleToInt (y1), Clazz_doubleToInt (x2 - x1), Clazz_doubleToInt (y2 - y1));
19528 });
19529 Clazz_overrideMethod (c$, "getPathIterator", 
19530 function (at, flatness) {
19531 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
19532 }, "java.awt.geom.AffineTransform,~N");
19533 Clazz_defineMethod (c$, "clone", 
19534 function () {
19535 try {
19536 return Clazz_superCall (this, java.awt.geom.RectangularShape, "clone", []);
19537 } catch (e) {
19538 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
19539 throw  new InternalError ();
19540 } else {
19541 throw e;
19542 }
19543 }
19544 });
19545 });
19546 Clazz_declarePackage ("java.awt.geom");
19547 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.FlatteningPathIterator", ["java.lang.IllegalArgumentException", "java.util.NoSuchElementException", "java.awt.geom.CubicCurve2D", "$.QuadCurve2D"], function () {
19548 c$ = Clazz_decorateAsClass (function () {
19549 this.src = null;
19550 this.squareflat = 0;
19551 this.limit = 0;
19552 this.hold = null;
19553 this.curx = 0;
19554 this.cury = 0;
19555 this.movx = 0;
19556 this.movy = 0;
19557 this.holdType = 0;
19558 this.holdEnd = 0;
19559 this.holdIndex = 0;
19560 this.levels = null;
19561 this.levelIndex = 0;
19562 this.done = false;
19563 Clazz_instantialize (this, arguments);
19564 }, java.awt.geom, "FlatteningPathIterator", null, java.awt.geom.PathIterator);
19565 Clazz_prepareFields (c$, function () {
19566 this.hold =  Clazz_newDoubleArray (14, 0);
19567 });
19568 Clazz_makeConstructor (c$, 
19569 function (src, flatness) {
19570 this.construct (src, flatness, 10);
19571 }, "java.awt.geom.PathIterator,~N");
19572 Clazz_makeConstructor (c$, 
19573 function (src, flatness, limit) {
19574 if (flatness < 0.0) {
19575 throw  new IllegalArgumentException ("flatness must be >= 0");
19576 }if (limit < 0) {
19577 throw  new IllegalArgumentException ("limit must be >= 0");
19578 }this.src = src;
19579 this.squareflat = flatness * flatness;
19580 this.limit = limit;
19581 this.levels =  Clazz_newIntArray (limit + 1, 0);
19582 this.next (false);
19583 }, "java.awt.geom.PathIterator,~N,~N");
19584 Clazz_defineMethod (c$, "getFlatness", 
19585 function () {
19586 return Math.sqrt (this.squareflat);
19587 });
19588 Clazz_defineMethod (c$, "getRecursionLimit", 
19589 function () {
19590 return this.limit;
19591 });
19592 Clazz_defineMethod (c$, "getWindingRule", 
19593 function () {
19594 return this.src.getWindingRule ();
19595 });
19596 Clazz_defineMethod (c$, "isDone", 
19597 function () {
19598 return this.done;
19599 });
19600 Clazz_defineMethod (c$, "ensureHoldCapacity", 
19601 function (want) {
19602 if (this.holdIndex - want < 0) {
19603 var have = this.hold.length - this.holdIndex;
19604 var newsize = this.hold.length + 24;
19605 var newhold =  Clazz_newDoubleArray (newsize, 0);
19606 System.arraycopy (this.hold, this.holdIndex, newhold, this.holdIndex + 24, have);
19607 this.hold = newhold;
19608 this.holdIndex += 24;
19609 this.holdEnd += 24;
19610 }}, "~N");
19611 Clazz_defineMethod (c$, "next", 
19612 function () {
19613 this.next (true);
19614 });
19615 Clazz_defineMethod (c$, "next", 
19616  function (doNext) {
19617 var level;
19618 if (this.holdIndex >= this.holdEnd) {
19619 if (doNext) {
19620 this.src.next ();
19621 }if (this.src.isDone ()) {
19622 this.done = true;
19623 return;
19624 }this.holdType = this.src.currentSegment (this.hold);
19625 this.levelIndex = 0;
19626 this.levels[0] = 0;
19627 }switch (this.holdType) {
19628 case 0:
19629 case 1:
19630 this.curx = this.hold[0];
19631 this.cury = this.hold[1];
19632 if (this.holdType == 0) {
19633 this.movx = this.curx;
19634 this.movy = this.cury;
19635 }this.holdIndex = 0;
19636 this.holdEnd = 0;
19637 break;
19638 case 4:
19639 this.curx = this.movx;
19640 this.cury = this.movy;
19641 this.holdIndex = 0;
19642 this.holdEnd = 0;
19643 break;
19644 case 2:
19645 if (this.holdIndex >= this.holdEnd) {
19646 this.holdIndex = this.hold.length - 6;
19647 this.holdEnd = this.hold.length - 2;
19648 this.hold[this.holdIndex + 0] = this.curx;
19649 this.hold[this.holdIndex + 1] = this.cury;
19650 this.hold[this.holdIndex + 2] = this.hold[0];
19651 this.hold[this.holdIndex + 3] = this.hold[1];
19652 this.hold[this.holdIndex + 4] = this.curx = this.hold[2];
19653 this.hold[this.holdIndex + 5] = this.cury = this.hold[3];
19654 }level = this.levels[this.levelIndex];
19655 while (level < this.limit) {
19656 if (java.awt.geom.QuadCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19657 break;
19658 }this.ensureHoldCapacity (4);
19659 java.awt.geom.QuadCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 4, this.hold, this.holdIndex);
19660 this.holdIndex -= 4;
19661 level++;
19662 this.levels[this.levelIndex] = level;
19663 this.levelIndex++;
19664 this.levels[this.levelIndex] = level;
19665 }
19666 this.holdIndex += 4;
19667 this.levelIndex--;
19668 break;
19669 case 3:
19670 if (this.holdIndex >= this.holdEnd) {
19671 this.holdIndex = this.hold.length - 8;
19672 this.holdEnd = this.hold.length - 2;
19673 this.hold[this.holdIndex + 0] = this.curx;
19674 this.hold[this.holdIndex + 1] = this.cury;
19675 this.hold[this.holdIndex + 2] = this.hold[0];
19676 this.hold[this.holdIndex + 3] = this.hold[1];
19677 this.hold[this.holdIndex + 4] = this.hold[2];
19678 this.hold[this.holdIndex + 5] = this.hold[3];
19679 this.hold[this.holdIndex + 6] = this.curx = this.hold[4];
19680 this.hold[this.holdIndex + 7] = this.cury = this.hold[5];
19681 }level = this.levels[this.levelIndex];
19682 while (level < this.limit) {
19683 if (java.awt.geom.CubicCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19684 break;
19685 }this.ensureHoldCapacity (6);
19686 java.awt.geom.CubicCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 6, this.hold, this.holdIndex);
19687 this.holdIndex -= 6;
19688 level++;
19689 this.levels[this.levelIndex] = level;
19690 this.levelIndex++;
19691 this.levels[this.levelIndex] = level;
19692 }
19693 this.holdIndex += 6;
19694 this.levelIndex--;
19695 break;
19696 }
19697 }, "~B");
19698 Clazz_defineMethod (c$, "currentSegment", 
19699 function (coords) {
19700 if (this.isDone ()) {
19701 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19702 }var type = this.holdType;
19703 if (type != 4) {
19704 coords[0] = this.hold[this.holdIndex + 0];
19705 coords[1] = this.hold[this.holdIndex + 1];
19706 if (type != 0) {
19707 type = 1;
19708 }}return type;
19709 }, "~A");
19710 Clazz_defineMethod (c$, "currentSegment", 
19711 function (coords) {
19712 if (this.isDone ()) {
19713 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19714 }var type = this.holdType;
19715 if (type != 4) {
19716 coords[0] = this.hold[this.holdIndex + 0];
19717 coords[1] = this.hold[this.holdIndex + 1];
19718 if (type != 0) {
19719 type = 1;
19720 }}return type;
19721 }, "~A");
19722 Clazz_defineStatics (c$,
19723 "GROW_SIZE", 24);
19724 });
19725 Clazz_declarePackage ("java.awt.geom");
19726 c$ = Clazz_declareInterface (java.awt.geom, "PathIterator");
19727 Clazz_defineStatics (c$,
19728 "WIND_EVEN_ODD", 0,
19729 "WIND_NON_ZERO", 1,
19730 "SEG_MOVETO", 0,
19731 "SEG_LINETO", 1,
19732 "SEG_QUADTO", 2,
19733 "SEG_CUBICTO", 3,
19734 "SEG_CLOSE", 4);
19735 Clazz_declarePackage ("java.awt.geom");
19736 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 () {
19737 c$ = Clazz_declareType (java.awt.geom, "CubicCurve2D", null, [java.awt.Shape, Cloneable]);
19738 Clazz_makeConstructor (c$, 
19739 function () {
19740 });
19741 Clazz_defineMethod (c$, "setCurve", 
19742 function (coords, offset) {
19743 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]);
19744 }, "~A,~N");
19745 Clazz_defineMethod (c$, "setCurve", 
19746 function (p1, cp1, cp2, p2) {
19747 this.setCurve (p1.getX (), p1.getY (), cp1.getX (), cp1.getY (), cp2.getX (), cp2.getY (), p2.getX (), p2.getY ());
19748 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
19749 Clazz_defineMethod (c$, "setCurve", 
19750 function (pts, offset) {
19751 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 ());
19752 }, "~A,~N");
19753 Clazz_defineMethod (c$, "setCurve", 
19754 function (c) {
19755 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX1 (), c.getCtrlY1 (), c.getCtrlX2 (), c.getCtrlY2 (), c.getX2 (), c.getY2 ());
19756 }, "java.awt.geom.CubicCurve2D");
19757 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19758 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19759 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));
19760 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19761 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19762 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19763 return Math.sqrt (java.awt.geom.CubicCurve2D.getFlatnessSq (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2));
19764 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19765 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19766 function (coords, offset) {
19767 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]);
19768 }, "~A,~N");
19769 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19770 function (coords, offset) {
19771 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]);
19772 }, "~A,~N");
19773 Clazz_defineMethod (c$, "getFlatnessSq", 
19774 function () {
19775 return java.awt.geom.CubicCurve2D.getFlatnessSq (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19776 });
19777 Clazz_defineMethod (c$, "getFlatness", 
19778 function () {
19779 return java.awt.geom.CubicCurve2D.getFlatness (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19780 });
19781 Clazz_defineMethod (c$, "subdivide", 
19782 function (left, right) {
19783 java.awt.geom.CubicCurve2D.subdivide (this, left, right);
19784 }, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19785 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19786 function (src, left, right) {
19787 var x1 = src.getX1 ();
19788 var y1 = src.getY1 ();
19789 var ctrlx1 = src.getCtrlX1 ();
19790 var ctrly1 = src.getCtrlY1 ();
19791 var ctrlx2 = src.getCtrlX2 ();
19792 var ctrly2 = src.getCtrlY2 ();
19793 var x2 = src.getX2 ();
19794 var y2 = src.getY2 ();
19795 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19796 var centery = (ctrly1 + ctrly2) / 2.0;
19797 ctrlx1 = (x1 + ctrlx1) / 2.0;
19798 ctrly1 = (y1 + ctrly1) / 2.0;
19799 ctrlx2 = (x2 + ctrlx2) / 2.0;
19800 ctrly2 = (y2 + ctrly2) / 2.0;
19801 var ctrlx12 = (ctrlx1 + centerx) / 2.0;
19802 var ctrly12 = (ctrly1 + centery) / 2.0;
19803 var ctrlx21 = (ctrlx2 + centerx) / 2.0;
19804 var ctrly21 = (ctrly2 + centery) / 2.0;
19805 centerx = (ctrlx12 + ctrlx21) / 2.0;
19806 centery = (ctrly12 + ctrly21) / 2.0;
19807 if (left != null) {
19808 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx12, ctrly12, centerx, centery);
19809 }if (right != null) {
19810 right.setCurve (centerx, centery, ctrlx21, ctrly21, ctrlx2, ctrly2, x2, y2);
19811 }}, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19812 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19813 function (src, srcoff, left, leftoff, right, rightoff) {
19814 var x1 = src[srcoff + 0];
19815 var y1 = src[srcoff + 1];
19816 var ctrlx1 = src[srcoff + 2];
19817 var ctrly1 = src[srcoff + 3];
19818 var ctrlx2 = src[srcoff + 4];
19819 var ctrly2 = src[srcoff + 5];
19820 var x2 = src[srcoff + 6];
19821 var y2 = src[srcoff + 7];
19822 if (left != null) {
19823 left[leftoff + 0] = x1;
19824 left[leftoff + 1] = y1;
19825 }if (right != null) {
19826 right[rightoff + 6] = x2;
19827 right[rightoff + 7] = y2;
19828 }x1 = (x1 + ctrlx1) / 2.0;
19829 y1 = (y1 + ctrly1) / 2.0;
19830 x2 = (x2 + ctrlx2) / 2.0;
19831 y2 = (y2 + ctrly2) / 2.0;
19832 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19833 var centery = (ctrly1 + ctrly2) / 2.0;
19834 ctrlx1 = (x1 + centerx) / 2.0;
19835 ctrly1 = (y1 + centery) / 2.0;
19836 ctrlx2 = (x2 + centerx) / 2.0;
19837 ctrly2 = (y2 + centery) / 2.0;
19838 centerx = (ctrlx1 + ctrlx2) / 2.0;
19839 centery = (ctrly1 + ctrly2) / 2.0;
19840 if (left != null) {
19841 left[leftoff + 2] = x1;
19842 left[leftoff + 3] = y1;
19843 left[leftoff + 4] = ctrlx1;
19844 left[leftoff + 5] = ctrly1;
19845 left[leftoff + 6] = centerx;
19846 left[leftoff + 7] = centery;
19847 }if (right != null) {
19848 right[rightoff + 0] = centerx;
19849 right[rightoff + 1] = centery;
19850 right[rightoff + 2] = ctrlx2;
19851 right[rightoff + 3] = ctrly2;
19852 right[rightoff + 4] = x2;
19853 right[rightoff + 5] = y2;
19854 }}, "~A,~N,~A,~N,~A,~N");
19855 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19856 function (eqn) {
19857 return java.awt.geom.CubicCurve2D.solveCubic (eqn, eqn);
19858 }, "~A");
19859 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19860 function (eqn, res) {
19861 var d = eqn[3];
19862 if (d == 0.0) {
19863 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
19864 }var a = eqn[2] / d;
19865 var b = eqn[1] / d;
19866 var c = eqn[0] / d;
19867 var roots = 0;
19868 var Q = (a * a - 3.0 * b) / 9.0;
19869 var R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0;
19870 var R2 = R * R;
19871 var Q3 = Q * Q * Q;
19872 a = a / 3.0;
19873 if (R2 < Q3) {
19874 var theta = Math.acos (R / Math.sqrt (Q3));
19875 Q = -2.0 * Math.sqrt (Q);
19876 if (res === eqn) {
19877 eqn =  Clazz_newDoubleArray (4, 0);
19878 System.arraycopy (res, 0, eqn, 0, 4);
19879 }res[roots++] = Q * Math.cos (theta / 3.0) - a;
19880 res[roots++] = Q * Math.cos ((theta + 6.283185307179586) / 3.0) - a;
19881 res[roots++] = Q * Math.cos ((theta - 6.283185307179586) / 3.0) - a;
19882 java.awt.geom.CubicCurve2D.fixRoots (res, eqn);
19883 } else {
19884 var neg = (R < 0.0);
19885 var S = Math.sqrt (R2 - Q3);
19886 if (neg) {
19887 R = -R;
19888 }var A = Math.pow (R + S, 0.3333333333333333);
19889 if (!neg) {
19890 A = -A;
19891 }var B = (A == 0.0) ? 0.0 : (Q / A);
19892 res[roots++] = (A + B) - a;
19893 }return roots;
19894 }, "~A,~A");
19895 c$.fixRoots = Clazz_defineMethod (c$, "fixRoots", 
19896  function (res, eqn) {
19897 var EPSILON = 1E-5;
19898 for (var i = 0; i < 3; i++) {
19899 var t = res[i];
19900 if (Math.abs (t) < 1.0E-5) {
19901 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 0, eqn);
19902 } else if (Math.abs (t - 1) < 1.0E-5) {
19903 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 1, eqn);
19904 }}
19905 }, "~A,~A");
19906 c$.solveEqn = Clazz_defineMethod (c$, "solveEqn", 
19907  function (eqn, order, t) {
19908 var v = eqn[order];
19909 while (--order >= 0) {
19910 v = v * t + eqn[order];
19911 }
19912 return v;
19913 }, "~A,~N,~N");
19914 c$.findZero = Clazz_defineMethod (c$, "findZero", 
19915  function (t, target, eqn) {
19916 var slopeqn =  Clazz_newDoubleArray (-1, [eqn[1], 2 * eqn[2], 3 * eqn[3]]);
19917 var slope;
19918 var origdelta = 0;
19919 var origt = t;
19920 while (true) {
19921 slope = java.awt.geom.CubicCurve2D.solveEqn (slopeqn, 2, t);
19922 if (slope == 0) {
19923 return t;
19924 }var y = java.awt.geom.CubicCurve2D.solveEqn (eqn, 3, t);
19925 if (y == 0) {
19926 return t;
19927 }var delta = -(y / slope);
19928 if (origdelta == 0) {
19929 origdelta = delta;
19930 }if (t < target) {
19931 if (delta < 0) return t;
19932 } else if (t > target) {
19933 if (delta > 0) return t;
19934 } else {
19935 return (delta > 0 ? (target + 4.9E-324) : (target - 4.9E-324));
19936 }var newt = t + delta;
19937 if (t == newt) {
19938 return t;
19939 }if (delta * origdelta < 0) {
19940 var tag = (origt < t ? java.awt.geom.CubicCurve2D.getTag (target, origt, t) : java.awt.geom.CubicCurve2D.getTag (target, t, origt));
19941 if (tag != 0) {
19942 return (origt + t) / 2;
19943 }t = target;
19944 } else {
19945 t = newt;
19946 }}
19947 }, "~N,~N,~A");
19948 Clazz_defineMethod (c$, "contains", 
19949 function (x, y) {
19950 if (!(x * 0.0 + y * 0.0 == 0.0)) {
19951 return false;
19952 }var x1 = this.getX1 ();
19953 var y1 = this.getY1 ();
19954 var x2 = this.getX2 ();
19955 var y2 = this.getY2 ();
19956 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));
19957 return ((crossings & 1) == 1);
19958 }, "~N,~N");
19959 Clazz_defineMethod (c$, "contains", 
19960 function (p) {
19961 return this.contains (p.getX (), p.getY ());
19962 }, "java.awt.geom.Point2D");
19963 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
19964  function (eqn, val, c1, cp1, cp2, c2) {
19965 eqn[0] = c1 - val;
19966 eqn[1] = (cp1 - c1) * 3.0;
19967 eqn[2] = (cp2 - cp1 - cp1 + c1) * 3.0;
19968 eqn[3] = c2 + (cp1 - cp2) * 3.0 - c1;
19969 return;
19970 }, "~A,~N,~N,~N,~N,~N");
19971 c$.evalCubic = Clazz_defineMethod (c$, "evalCubic", 
19972  function (vals, num, include0, include1, inflect, c1, cp1, cp2, c2) {
19973 var j = 0;
19974 for (var i = 0; i < num; i++) {
19975 var t = vals[i];
19976 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + (2 * inflect[2] + 3 * inflect[3] * t) * t != 0)) {
19977 var u = 1 - t;
19978 vals[j++] = c1 * u * u * u + 3 * cp1 * t * u * u + 3 * cp2 * t * t * u + c2 * t * t * t;
19979 }}
19980 return j;
19981 }, "~A,~N,~B,~B,~A,~N,~N,~N,~N");
19982 c$.getTag = Clazz_defineMethod (c$, "getTag", 
19983  function (coord, low, high) {
19984 if (coord <= low) {
19985 return (coord < low ? -2 : -1);
19986 }if (coord >= high) {
19987 return (coord > high ? 2 : 1);
19988 }return 0;
19989 }, "~N,~N,~N");
19990 c$.inwards = Clazz_defineMethod (c$, "inwards", 
19991  function (pttag, opt1tag, opt2tag) {
19992 switch (pttag) {
19993 case -2:
19994 case 2:
19995 default:
19996 return false;
19997 case -1:
19998 return (opt1tag >= 0 || opt2tag >= 0);
19999 case 0:
20000 return true;
20001 case 1:
20002 return (opt1tag <= 0 || opt2tag <= 0);
20003 }
20004 }, "~N,~N,~N");
20005 Clazz_defineMethod (c$, "intersects", 
20006 function (x, y, w, h) {
20007 if (w <= 0 || h <= 0) {
20008 return false;
20009 }var x1 = this.getX1 ();
20010 var y1 = this.getY1 ();
20011 var x1tag = java.awt.geom.CubicCurve2D.getTag (x1, x, x + w);
20012 var y1tag = java.awt.geom.CubicCurve2D.getTag (y1, y, y + h);
20013 if (x1tag == 0 && y1tag == 0) {
20014 return true;
20015 }var x2 = this.getX2 ();
20016 var y2 = this.getY2 ();
20017 var x2tag = java.awt.geom.CubicCurve2D.getTag (x2, x, x + w);
20018 var y2tag = java.awt.geom.CubicCurve2D.getTag (y2, y, y + h);
20019 if (x2tag == 0 && y2tag == 0) {
20020 return true;
20021 }var ctrlx1 = this.getCtrlX1 ();
20022 var ctrly1 = this.getCtrlY1 ();
20023 var ctrlx2 = this.getCtrlX2 ();
20024 var ctrly2 = this.getCtrlY2 ();
20025 var ctrlx1tag = java.awt.geom.CubicCurve2D.getTag (ctrlx1, x, x + w);
20026 var ctrly1tag = java.awt.geom.CubicCurve2D.getTag (ctrly1, y, y + h);
20027 var ctrlx2tag = java.awt.geom.CubicCurve2D.getTag (ctrlx2, x, x + w);
20028 var ctrly2tag = java.awt.geom.CubicCurve2D.getTag (ctrly2, y, y + h);
20029 if (x1tag < 0 && x2tag < 0 && ctrlx1tag < 0 && ctrlx2tag < 0) {
20030 return false;
20031 }if (y1tag < 0 && y2tag < 0 && ctrly1tag < 0 && ctrly2tag < 0) {
20032 return false;
20033 }if (x1tag > 0 && x2tag > 0 && ctrlx1tag > 0 && ctrlx2tag > 0) {
20034 return false;
20035 }if (y1tag > 0 && y2tag > 0 && ctrly1tag > 0 && ctrly2tag > 0) {
20036 return false;
20037 }if (java.awt.geom.CubicCurve2D.inwards (x1tag, x2tag, ctrlx1tag) && java.awt.geom.CubicCurve2D.inwards (y1tag, y2tag, ctrly1tag)) {
20038 return true;
20039 }if (java.awt.geom.CubicCurve2D.inwards (x2tag, x1tag, ctrlx2tag) && java.awt.geom.CubicCurve2D.inwards (y2tag, y1tag, ctrly2tag)) {
20040 return true;
20041 }var xoverlap = (x1tag * x2tag <= 0);
20042 var yoverlap = (y1tag * y2tag <= 0);
20043 if (x1tag == 0 && x2tag == 0 && yoverlap) {
20044 return true;
20045 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
20046 return true;
20047 }var eqn =  Clazz_newDoubleArray (4, 0);
20048 var res =  Clazz_newDoubleArray (4, 0);
20049 if (!yoverlap) {
20050 java.awt.geom.CubicCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly1, ctrly2, y2);
20051 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20052 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, x1, ctrlx1, ctrlx2, x2);
20053 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], x, x + w) * java.awt.geom.CubicCurve2D.getTag (res[1], x, x + w) <= 0);
20054 }if (!xoverlap) {
20055 java.awt.geom.CubicCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
20056 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20057 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
20058 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], y, y + h) * java.awt.geom.CubicCurve2D.getTag (res[1], y, y + h) <= 0);
20059 }var dx = x2 - x1;
20060 var dy = y2 - y1;
20061 var k = y2 * x1 - x2 * y1;
20062 var c1tag;
20063 var c2tag;
20064 if (y1tag == 0) {
20065 c1tag = x1tag;
20066 } else {
20067 c1tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
20068 }if (y2tag == 0) {
20069 c2tag = x2tag;
20070 } else {
20071 c2tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
20072 }if (c1tag * c2tag <= 0) {
20073 return true;
20074 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
20075 java.awt.geom.CubicCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
20076 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20077 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
20078 var tags =  Clazz_newIntArray (num + 1, 0);
20079 for (var i = 0; i < num; i++) {
20080 tags[i] = java.awt.geom.CubicCurve2D.getTag (res[i], y, y + h);
20081 }
20082 tags[num] = c1tag;
20083 java.util.Arrays.sort (tags);
20084 return ((num >= 1 && tags[0] * tags[1] <= 0) || (num >= 3 && tags[2] * tags[3] <= 0));
20085 }, "~N,~N,~N,~N");
20086 Clazz_defineMethod (c$, "intersects", 
20087 function (r) {
20088 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20089 }, "java.awt.geom.Rectangle2D");
20090 Clazz_defineMethod (c$, "contains", 
20091 function (x, y, w, h) {
20092 if (w <= 0 || h <= 0) {
20093 return false;
20094 }if (!(this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h))) {
20095 return false;
20096 }var rect =  new java.awt.geom.Rectangle2D.Double (x, y, w, h);
20097 return !rect.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20098 }, "~N,~N,~N,~N");
20099 Clazz_defineMethod (c$, "contains", 
20100 function (r) {
20101 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20102 }, "java.awt.geom.Rectangle2D");
20103 Clazz_overrideMethod (c$, "getBounds", 
20104 function () {
20105 return this.getBounds2D ().getBounds ();
20106 });
20107 Clazz_defineMethod (c$, "getPathIterator", 
20108 function (at) {
20109 return (swingjs.api.Interface.getInstance ("java.awt.geom.CubicInterator", false)).set (this, at);
20110 }, "java.awt.geom.AffineTransform");
20111 Clazz_defineMethod (c$, "getPathIterator", 
20112 function (at, flatness) {
20113 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
20114 }, "java.awt.geom.AffineTransform,~N");
20115 Clazz_defineMethod (c$, "clone", 
20116 function () {
20117 try {
20118 return Clazz_superCall (this, java.awt.geom.CubicCurve2D, "clone", []);
20119 } catch (e) {
20120 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20121 throw  new InternalError ();
20122 } else {
20123 throw e;
20124 }
20125 }
20126 });
20127 Clazz_pu$h(self.c$);
20128 c$ = Clazz_decorateAsClass (function () {
20129 this.x1 = 0;
20130 this.y1 = 0;
20131 this.ctrlx1 = 0;
20132 this.ctrly1 = 0;
20133 this.ctrlx2 = 0;
20134 this.ctrly2 = 0;
20135 this.x2 = 0;
20136 this.y2 = 0;
20137 Clazz_instantialize (this, arguments);
20138 }, java.awt.geom.CubicCurve2D, "Float", java.awt.geom.CubicCurve2D);
20139 Clazz_makeConstructor (c$, 
20140 function () {
20141 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20142 });
20143 Clazz_makeConstructor (c$, 
20144 function (a, b, c, d, e, f, g, h) {
20145 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20146 this.setCurve (a, b, c, d, e, f, g, h);
20147 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20148 Clazz_overrideMethod (c$, "getX1", 
20149 function () {
20150 return this.x1;
20151 });
20152 Clazz_overrideMethod (c$, "getY1", 
20153 function () {
20154 return this.y1;
20155 });
20156 Clazz_overrideMethod (c$, "getP1", 
20157 function () {
20158 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20159 });
20160 Clazz_overrideMethod (c$, "getCtrlX1", 
20161 function () {
20162 return this.ctrlx1;
20163 });
20164 Clazz_overrideMethod (c$, "getCtrlY1", 
20165 function () {
20166 return this.ctrly1;
20167 });
20168 Clazz_overrideMethod (c$, "getCtrlP1", 
20169 function () {
20170 return  new java.awt.geom.Point2D.Float (this.ctrlx1, this.ctrly1);
20171 });
20172 Clazz_overrideMethod (c$, "getCtrlX2", 
20173 function () {
20174 return this.ctrlx2;
20175 });
20176 Clazz_overrideMethod (c$, "getCtrlY2", 
20177 function () {
20178 return this.ctrly2;
20179 });
20180 Clazz_overrideMethod (c$, "getCtrlP2", 
20181 function () {
20182 return  new java.awt.geom.Point2D.Float (this.ctrlx2, this.ctrly2);
20183 });
20184 Clazz_overrideMethod (c$, "getX2", 
20185 function () {
20186 return this.x2;
20187 });
20188 Clazz_overrideMethod (c$, "getY2", 
20189 function () {
20190 return this.y2;
20191 });
20192 Clazz_overrideMethod (c$, "getP2", 
20193 function () {
20194 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20195 });
20196 Clazz_defineMethod (c$, "setCurve", 
20197 function (a, b, c, d, e, f, g, h) {
20198 this.x1 = a;
20199 this.y1 = b;
20200 this.ctrlx1 = c;
20201 this.ctrly1 = d;
20202 this.ctrlx2 = e;
20203 this.ctrly2 = f;
20204 this.x2 = g;
20205 this.y2 = h;
20206 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20207 Clazz_defineMethod (c$, "setCurve", 
20208 function (a, b, c, d, e, f, g, h) {
20209 this.x1 = a;
20210 this.y1 = b;
20211 this.ctrlx1 = c;
20212 this.ctrly1 = d;
20213 this.ctrlx2 = e;
20214 this.ctrly2 = f;
20215 this.x2 = g;
20216 this.y2 = h;
20217 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20218 Clazz_overrideMethod (c$, "getBounds2D", 
20219 function () {
20220 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20221 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20222 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20223 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20224 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
20225 });
20226 c$ = Clazz_p0p ();
20227 Clazz_pu$h(self.c$);
20228 c$ = Clazz_decorateAsClass (function () {
20229 this.x1 = 0;
20230 this.y1 = 0;
20231 this.ctrlx1 = 0;
20232 this.ctrly1 = 0;
20233 this.ctrlx2 = 0;
20234 this.ctrly2 = 0;
20235 this.x2 = 0;
20236 this.y2 = 0;
20237 Clazz_instantialize (this, arguments);
20238 }, java.awt.geom.CubicCurve2D, "Double", java.awt.geom.CubicCurve2D);
20239 Clazz_makeConstructor (c$, 
20240 function () {
20241 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20242 });
20243 Clazz_makeConstructor (c$, 
20244 function (a, b, c, d, e, f, g, h) {
20245 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20246 this.setCurve (a, b, c, d, e, f, g, h);
20247 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20248 Clazz_overrideMethod (c$, "getX1", 
20249 function () {
20250 return this.x1;
20251 });
20252 Clazz_overrideMethod (c$, "getY1", 
20253 function () {
20254 return this.y1;
20255 });
20256 Clazz_overrideMethod (c$, "getP1", 
20257 function () {
20258 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20259 });
20260 Clazz_overrideMethod (c$, "getCtrlX1", 
20261 function () {
20262 return this.ctrlx1;
20263 });
20264 Clazz_overrideMethod (c$, "getCtrlY1", 
20265 function () {
20266 return this.ctrly1;
20267 });
20268 Clazz_overrideMethod (c$, "getCtrlP1", 
20269 function () {
20270 return  new java.awt.geom.Point2D.Double (this.ctrlx1, this.ctrly1);
20271 });
20272 Clazz_overrideMethod (c$, "getCtrlX2", 
20273 function () {
20274 return this.ctrlx2;
20275 });
20276 Clazz_overrideMethod (c$, "getCtrlY2", 
20277 function () {
20278 return this.ctrly2;
20279 });
20280 Clazz_overrideMethod (c$, "getCtrlP2", 
20281 function () {
20282 return  new java.awt.geom.Point2D.Double (this.ctrlx2, this.ctrly2);
20283 });
20284 Clazz_overrideMethod (c$, "getX2", 
20285 function () {
20286 return this.x2;
20287 });
20288 Clazz_overrideMethod (c$, "getY2", 
20289 function () {
20290 return this.y2;
20291 });
20292 Clazz_overrideMethod (c$, "getP2", 
20293 function () {
20294 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20295 });
20296 Clazz_defineMethod (c$, "setCurve", 
20297 function (a, b, c, d, e, f, g, h) {
20298 this.x1 = a;
20299 this.y1 = b;
20300 this.ctrlx1 = c;
20301 this.ctrly1 = d;
20302 this.ctrlx2 = e;
20303 this.ctrly2 = f;
20304 this.x2 = g;
20305 this.y2 = h;
20306 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20307 Clazz_overrideMethod (c$, "getBounds2D", 
20308 function () {
20309 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20310 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20311 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20312 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20313 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
20314 });
20315 c$ = Clazz_p0p ();
20316 Clazz_defineStatics (c$,
20317 "BELOW", -2,
20318 "LOWEDGE", -1,
20319 "INSIDE", 0,
20320 "HIGHEDGE", 1,
20321 "ABOVE", 2);
20322 });
20323 Clazz_declarePackage ("java.awt.geom");
20324 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.CubicIterator", ["java.util.NoSuchElementException"], function () {
20325 c$ = Clazz_decorateAsClass (function () {
20326 this.cubic = null;
20327 this.affine = null;
20328 this.index = 0;
20329 Clazz_instantialize (this, arguments);
20330 }, java.awt.geom, "CubicIterator", null, java.awt.geom.PathIterator);
20331 Clazz_makeConstructor (c$, 
20332 function () {
20333 });
20334 Clazz_makeConstructor (c$, 
20335 function (q, at) {
20336 this.set (q, at);
20337 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20338 Clazz_defineMethod (c$, "set", 
20339 function (q, at) {
20340 this.cubic = q;
20341 this.affine = at;
20342 return this;
20343 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20344 Clazz_overrideMethod (c$, "getWindingRule", 
20345 function () {
20346 return 1;
20347 });
20348 Clazz_overrideMethod (c$, "isDone", 
20349 function () {
20350 return (this.index > 1);
20351 });
20352 Clazz_overrideMethod (c$, "next", 
20353 function () {
20354 this.index++;
20355 });
20356 Clazz_defineMethod (c$, "currentSegment", 
20357 function (coords) {
20358 if (this.isDone ()) {
20359 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20360 }var type;
20361 if (this.index == 0) {
20362 coords[0] = this.cubic.getX1 ();
20363 coords[1] = this.cubic.getY1 ();
20364 type = 0;
20365 } else {
20366 coords[0] = this.cubic.getCtrlX1 ();
20367 coords[1] = this.cubic.getCtrlY1 ();
20368 coords[2] = this.cubic.getCtrlX2 ();
20369 coords[3] = this.cubic.getCtrlY2 ();
20370 coords[4] = this.cubic.getX2 ();
20371 coords[5] = this.cubic.getY2 ();
20372 type = 3;
20373 }if (this.affine != null) {
20374 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20375 }return type;
20376 }, "~A");
20377 Clazz_defineMethod (c$, "currentSegment", 
20378 function (coords) {
20379 if (this.isDone ()) {
20380 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20381 }var type;
20382 if (this.index == 0) {
20383 coords[0] = this.cubic.getX1 ();
20384 coords[1] = this.cubic.getY1 ();
20385 type = 0;
20386 } else {
20387 coords[0] = this.cubic.getCtrlX1 ();
20388 coords[1] = this.cubic.getCtrlY1 ();
20389 coords[2] = this.cubic.getCtrlX2 ();
20390 coords[3] = this.cubic.getCtrlY2 ();
20391 coords[4] = this.cubic.getX2 ();
20392 coords[5] = this.cubic.getY2 ();
20393 type = 3;
20394 }if (this.affine != null) {
20395 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20396 }return type;
20397 }, "~A");
20398 });
20399 Clazz_declarePackage ("java.awt.geom");
20400 Clazz_load (["java.awt.Shape"], "java.awt.geom.Line2D", ["java.lang.InternalError", "java.awt.geom.LineIterator", "$.Point2D", "$.Rectangle2D"], function () {
20401 c$ = Clazz_declareType (java.awt.geom, "Line2D", null, [java.awt.Shape, Cloneable]);
20402 Clazz_makeConstructor (c$, 
20403 function () {
20404 });
20405 Clazz_defineMethod (c$, "setLine", 
20406 function (p1, p2) {
20407 this.setLine (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
20408 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20409 Clazz_defineMethod (c$, "setLine", 
20410 function (l) {
20411 this.setLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
20412 }, "java.awt.geom.Line2D");
20413 c$.relativeCCW = Clazz_defineMethod (c$, "relativeCCW", 
20414 function (x1, y1, x2, y2, px, py) {
20415 x2 -= x1;
20416 y2 -= y1;
20417 px -= x1;
20418 py -= y1;
20419 var ccw = px * y2 - py * x2;
20420 if (ccw == 0.0) {
20421 ccw = px * x2 + py * y2;
20422 if (ccw > 0.0) {
20423 px -= x2;
20424 py -= y2;
20425 ccw = px * x2 + py * y2;
20426 if (ccw < 0.0) {
20427 ccw = 0.0;
20428 }}}return (ccw < 0.0) ? -1 : ((ccw > 0.0) ? 1 : 0);
20429 }, "~N,~N,~N,~N,~N,~N");
20430 Clazz_defineMethod (c$, "relativeCCW", 
20431 function (px, py) {
20432 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20433 }, "~N,~N");
20434 Clazz_defineMethod (c$, "relativeCCW", 
20435 function (p) {
20436 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), p.getX (), p.getY ());
20437 }, "java.awt.geom.Point2D");
20438 c$.linesIntersect = Clazz_defineMethod (c$, "linesIntersect", 
20439 function (x1, y1, x2, y2, x3, y3, x4, y4) {
20440 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));
20441 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20442 Clazz_defineMethod (c$, "intersectsLine", 
20443 function (x1, y1, x2, y2) {
20444 return java.awt.geom.Line2D.linesIntersect (x1, y1, x2, y2, this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20445 }, "~N,~N,~N,~N");
20446 Clazz_defineMethod (c$, "intersectsLine", 
20447 function (l) {
20448 return java.awt.geom.Line2D.linesIntersect (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 (), this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20449 }, "java.awt.geom.Line2D");
20450 c$.ptSegDistSq = Clazz_defineMethod (c$, "ptSegDistSq", 
20451 function (x1, y1, x2, y2, px, py) {
20452 x2 -= x1;
20453 y2 -= y1;
20454 px -= x1;
20455 py -= y1;
20456 var dotprod = px * x2 + py * y2;
20457 var projlenSq;
20458 if (dotprod <= 0.0) {
20459 projlenSq = 0.0;
20460 } else {
20461 px = x2 - px;
20462 py = y2 - py;
20463 dotprod = px * x2 + py * y2;
20464 if (dotprod <= 0.0) {
20465 projlenSq = 0.0;
20466 } else {
20467 projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20468 }}var lenSq = px * px + py * py - projlenSq;
20469 if (lenSq < 0) {
20470 lenSq = 0;
20471 }return lenSq;
20472 }, "~N,~N,~N,~N,~N,~N");
20473 c$.ptSegDist = Clazz_defineMethod (c$, "ptSegDist", 
20474 function (x1, y1, x2, y2, px, py) {
20475 return Math.sqrt (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, px, py));
20476 }, "~N,~N,~N,~N,~N,~N");
20477 Clazz_defineMethod (c$, "ptSegDistSq", 
20478 function (px, py) {
20479 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20480 }, "~N,~N");
20481 Clazz_defineMethod (c$, "ptSegDistSq", 
20482 function (pt) {
20483 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20484 }, "java.awt.geom.Point2D");
20485 Clazz_defineMethod (c$, "ptSegDist", 
20486 function (px, py) {
20487 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20488 }, "~N,~N");
20489 Clazz_defineMethod (c$, "ptSegDist", 
20490 function (pt) {
20491 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20492 }, "java.awt.geom.Point2D");
20493 c$.ptLineDistSq = Clazz_defineMethod (c$, "ptLineDistSq", 
20494 function (x1, y1, x2, y2, px, py) {
20495 x2 -= x1;
20496 y2 -= y1;
20497 px -= x1;
20498 py -= y1;
20499 var dotprod = px * x2 + py * y2;
20500 var projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20501 var lenSq = px * px + py * py - projlenSq;
20502 if (lenSq < 0) {
20503 lenSq = 0;
20504 }return lenSq;
20505 }, "~N,~N,~N,~N,~N,~N");
20506 c$.ptLineDist = Clazz_defineMethod (c$, "ptLineDist", 
20507 function (x1, y1, x2, y2, px, py) {
20508 return Math.sqrt (java.awt.geom.Line2D.ptLineDistSq (x1, y1, x2, y2, px, py));
20509 }, "~N,~N,~N,~N,~N,~N");
20510 Clazz_defineMethod (c$, "ptLineDistSq", 
20511 function (px, py) {
20512 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20513 }, "~N,~N");
20514 Clazz_defineMethod (c$, "ptLineDistSq", 
20515 function (pt) {
20516 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20517 }, "java.awt.geom.Point2D");
20518 Clazz_defineMethod (c$, "ptLineDist", 
20519 function (px, py) {
20520 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20521 }, "~N,~N");
20522 Clazz_defineMethod (c$, "ptLineDist", 
20523 function (pt) {
20524 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20525 }, "java.awt.geom.Point2D");
20526 Clazz_defineMethod (c$, "contains", 
20527 function (x, y) {
20528 return false;
20529 }, "~N,~N");
20530 Clazz_defineMethod (c$, "contains", 
20531 function (p) {
20532 return false;
20533 }, "java.awt.geom.Point2D");
20534 Clazz_defineMethod (c$, "intersects", 
20535 function (x, y, w, h) {
20536 return this.intersects ( new java.awt.geom.Rectangle2D.Double (x, y, w, h));
20537 }, "~N,~N,~N,~N");
20538 Clazz_defineMethod (c$, "intersects", 
20539 function (r) {
20540 return r.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20541 }, "java.awt.geom.Rectangle2D");
20542 Clazz_defineMethod (c$, "contains", 
20543 function (x, y, w, h) {
20544 return false;
20545 }, "~N,~N,~N,~N");
20546 Clazz_defineMethod (c$, "contains", 
20547 function (r) {
20548 return false;
20549 }, "java.awt.geom.Rectangle2D");
20550 Clazz_overrideMethod (c$, "getBounds", 
20551 function () {
20552 return this.getBounds2D ().getBounds ();
20553 });
20554 Clazz_defineMethod (c$, "getPathIterator", 
20555 function (at) {
20556 return  new java.awt.geom.LineIterator (this, at);
20557 }, "java.awt.geom.AffineTransform");
20558 Clazz_defineMethod (c$, "getPathIterator", 
20559 function (at, flatness) {
20560 return  new java.awt.geom.LineIterator (this, at);
20561 }, "java.awt.geom.AffineTransform,~N");
20562 Clazz_defineMethod (c$, "clone", 
20563 function () {
20564 try {
20565 return Clazz_superCall (this, java.awt.geom.Line2D, "clone", []);
20566 } catch (e) {
20567 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20568 throw  new InternalError ();
20569 } else {
20570 throw e;
20571 }
20572 }
20573 });
20574 Clazz_pu$h(self.c$);
20575 c$ = Clazz_decorateAsClass (function () {
20576 this.x1 = 0;
20577 this.y1 = 0;
20578 this.x2 = 0;
20579 this.y2 = 0;
20580 Clazz_instantialize (this, arguments);
20581 }, java.awt.geom.Line2D, "Float", java.awt.geom.Line2D);
20582 Clazz_makeConstructor (c$, 
20583 function () {
20584 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20585 });
20586 Clazz_makeConstructor (c$, 
20587 function (a, b, c, d) {
20588 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20589 this.setLine (a, b, c, d);
20590 }, "~N,~N,~N,~N");
20591 Clazz_makeConstructor (c$, 
20592 function (a, b) {
20593 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20594 this.setLine (a, b);
20595 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20596 Clazz_overrideMethod (c$, "getX1", 
20597 function () {
20598 return this.x1;
20599 });
20600 Clazz_overrideMethod (c$, "getY1", 
20601 function () {
20602 return this.y1;
20603 });
20604 Clazz_overrideMethod (c$, "getP1", 
20605 function () {
20606 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20607 });
20608 Clazz_overrideMethod (c$, "getX2", 
20609 function () {
20610 return this.x2;
20611 });
20612 Clazz_overrideMethod (c$, "getY2", 
20613 function () {
20614 return this.y2;
20615 });
20616 Clazz_overrideMethod (c$, "getP2", 
20617 function () {
20618 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20619 });
20620 Clazz_defineMethod (c$, "setLine", 
20621 function (a, b, c, d) {
20622 this.x1 = a;
20623 this.y1 = b;
20624 this.x2 = c;
20625 this.y2 = d;
20626 }, "~N,~N,~N,~N");
20627 Clazz_defineMethod (c$, "setLine", 
20628 function (a, b, c, d) {
20629 this.x1 = a;
20630 this.y1 = b;
20631 this.x2 = c;
20632 this.y2 = d;
20633 }, "~N,~N,~N,~N");
20634 Clazz_overrideMethod (c$, "getBounds2D", 
20635 function () {
20636 var a;
20637 var b;
20638 var c;
20639 var d;
20640 if (this.x1 < this.x2) {
20641 a = this.x1;
20642 c = this.x2 - this.x1;
20643 } else {
20644 a = this.x2;
20645 c = this.x1 - this.x2;
20646 }if (this.y1 < this.y2) {
20647 b = this.y1;
20648 d = this.y2 - this.y1;
20649 } else {
20650 b = this.y2;
20651 d = this.y1 - this.y2;
20652 }return  new java.awt.geom.Rectangle2D.Float (a, b, c, d);
20653 });
20654 c$ = Clazz_p0p ();
20655 Clazz_pu$h(self.c$);
20656 c$ = Clazz_decorateAsClass (function () {
20657 this.x1 = 0;
20658 this.y1 = 0;
20659 this.x2 = 0;
20660 this.y2 = 0;
20661 Clazz_instantialize (this, arguments);
20662 }, java.awt.geom.Line2D, "Double", java.awt.geom.Line2D);
20663 Clazz_makeConstructor (c$, 
20664 function () {
20665 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20666 });
20667 Clazz_makeConstructor (c$, 
20668 function (a, b, c, d) {
20669 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20670 this.setLine (a, b, c, d);
20671 }, "~N,~N,~N,~N");
20672 Clazz_makeConstructor (c$, 
20673 function (a, b) {
20674 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20675 this.setLine (a, b);
20676 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20677 Clazz_overrideMethod (c$, "getX1", 
20678 function () {
20679 return this.x1;
20680 });
20681 Clazz_overrideMethod (c$, "getY1", 
20682 function () {
20683 return this.y1;
20684 });
20685 Clazz_overrideMethod (c$, "getP1", 
20686 function () {
20687 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20688 });
20689 Clazz_overrideMethod (c$, "getX2", 
20690 function () {
20691 return this.x2;
20692 });
20693 Clazz_overrideMethod (c$, "getY2", 
20694 function () {
20695 return this.y2;
20696 });
20697 Clazz_overrideMethod (c$, "getP2", 
20698 function () {
20699 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20700 });
20701 Clazz_defineMethod (c$, "setLine", 
20702 function (a, b, c, d) {
20703 this.x1 = a;
20704 this.y1 = b;
20705 this.x2 = c;
20706 this.y2 = d;
20707 }, "~N,~N,~N,~N");
20708 Clazz_overrideMethod (c$, "getBounds2D", 
20709 function () {
20710 var a;
20711 var b;
20712 var c;
20713 var d;
20714 if (this.x1 < this.x2) {
20715 a = this.x1;
20716 c = this.x2 - this.x1;
20717 } else {
20718 a = this.x2;
20719 c = this.x1 - this.x2;
20720 }if (this.y1 < this.y2) {
20721 b = this.y1;
20722 d = this.y2 - this.y1;
20723 } else {
20724 b = this.y2;
20725 d = this.y1 - this.y2;
20726 }return  new java.awt.geom.Rectangle2D.Double (a, b, c, d);
20727 });
20728 c$ = Clazz_p0p ();
20729 });
20730 Clazz_declarePackage ("java.awt.geom");
20731 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.LineIterator", ["java.util.NoSuchElementException"], function () {
20732 c$ = Clazz_decorateAsClass (function () {
20733 this.line = null;
20734 this.affine = null;
20735 this.index = 0;
20736 Clazz_instantialize (this, arguments);
20737 }, java.awt.geom, "LineIterator", null, java.awt.geom.PathIterator);
20738 Clazz_makeConstructor (c$, 
20739 function (l, at) {
20740 this.line = l;
20741 this.affine = at;
20742 }, "java.awt.geom.Line2D,java.awt.geom.AffineTransform");
20743 Clazz_overrideMethod (c$, "getWindingRule", 
20744 function () {
20745 return 1;
20746 });
20747 Clazz_overrideMethod (c$, "isDone", 
20748 function () {
20749 return (this.index > 1);
20750 });
20751 Clazz_overrideMethod (c$, "next", 
20752 function () {
20753 this.index++;
20754 });
20755 Clazz_defineMethod (c$, "currentSegment", 
20756 function (coords) {
20757 if (this.isDone ()) {
20758 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20759 }var type;
20760 if (this.index == 0) {
20761 coords[0] = this.line.getX1 ();
20762 coords[1] = this.line.getY1 ();
20763 type = 0;
20764 } else {
20765 coords[0] = this.line.getX2 ();
20766 coords[1] = this.line.getY2 ();
20767 type = 1;
20768 }if (this.affine != null) {
20769 this.affine.transform (coords, 0, coords, 0, 1);
20770 }return type;
20771 }, "~A");
20772 Clazz_defineMethod (c$, "currentSegment", 
20773 function (coords) {
20774 if (this.isDone ()) {
20775 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20776 }var type;
20777 if (this.index == 0) {
20778 coords[0] = this.line.getX1 ();
20779 coords[1] = this.line.getY1 ();
20780 type = 0;
20781 } else {
20782 coords[0] = this.line.getX2 ();
20783 coords[1] = this.line.getY2 ();
20784 type = 1;
20785 }if (this.affine != null) {
20786 this.affine.transform (coords, 0, coords, 0, 1);
20787 }return type;
20788 }, "~A");
20789 });
20790 Clazz_declarePackage ("java.awt.geom");
20791 Clazz_load (["java.awt.Shape"], "java.awt.geom.QuadCurve2D", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadIterator", "$.Rectangle2D"], function () {
20792 c$ = Clazz_declareType (java.awt.geom, "QuadCurve2D", null, [java.awt.Shape, Cloneable]);
20793 Clazz_makeConstructor (c$, 
20794 function () {
20795 });
20796 Clazz_defineMethod (c$, "setCurve", 
20797 function (coords, offset) {
20798 this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5]);
20799 }, "~A,~N");
20800 Clazz_defineMethod (c$, "setCurve", 
20801 function (p1, cp, p2) {
20802 this.setCurve (p1.getX (), p1.getY (), cp.getX (), cp.getY (), p2.getX (), p2.getY ());
20803 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
20804 Clazz_defineMethod (c$, "setCurve", 
20805 function (pts, offset) {
20806 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 ());
20807 }, "~A,~N");
20808 Clazz_defineMethod (c$, "setCurve", 
20809 function (c) {
20810 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX (), c.getCtrlY (), c.getX2 (), c.getY2 ());
20811 }, "java.awt.geom.QuadCurve2D");
20812 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20813 function (x1, y1, ctrlx, ctrly, x2, y2) {
20814 return java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx, ctrly);
20815 }, "~N,~N,~N,~N,~N,~N");
20816 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20817 function (x1, y1, ctrlx, ctrly, x2, y2) {
20818 return java.awt.geom.Line2D.ptSegDist (x1, y1, x2, y2, ctrlx, ctrly);
20819 }, "~N,~N,~N,~N,~N,~N");
20820 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20821 function (coords, offset) {
20822 return java.awt.geom.Line2D.ptSegDistSq (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20823 }, "~A,~N");
20824 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20825 function (coords, offset) {
20826 return java.awt.geom.Line2D.ptSegDist (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20827 }, "~A,~N");
20828 Clazz_defineMethod (c$, "getFlatnessSq", 
20829 function () {
20830 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20831 });
20832 Clazz_defineMethod (c$, "getFlatness", 
20833 function () {
20834 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20835 });
20836 Clazz_defineMethod (c$, "subdivide", 
20837 function (left, right) {
20838 java.awt.geom.QuadCurve2D.subdivide (this, left, right);
20839 }, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20840 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20841 function (src, left, right) {
20842 var x1 = src.getX1 ();
20843 var y1 = src.getY1 ();
20844 var ctrlx = src.getCtrlX ();
20845 var ctrly = src.getCtrlY ();
20846 var x2 = src.getX2 ();
20847 var y2 = src.getY2 ();
20848 var ctrlx1 = (x1 + ctrlx) / 2.0;
20849 var ctrly1 = (y1 + ctrly) / 2.0;
20850 var ctrlx2 = (x2 + ctrlx) / 2.0;
20851 var ctrly2 = (y2 + ctrly) / 2.0;
20852 ctrlx = (ctrlx1 + ctrlx2) / 2.0;
20853 ctrly = (ctrly1 + ctrly2) / 2.0;
20854 if (left != null) {
20855 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx, ctrly);
20856 }if (right != null) {
20857 right.setCurve (ctrlx, ctrly, ctrlx2, ctrly2, x2, y2);
20858 }}, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20859 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20860 function (src, srcoff, left, leftoff, right, rightoff) {
20861 var x1 = src[srcoff + 0];
20862 var y1 = src[srcoff + 1];
20863 var ctrlx = src[srcoff + 2];
20864 var ctrly = src[srcoff + 3];
20865 var x2 = src[srcoff + 4];
20866 var y2 = src[srcoff + 5];
20867 if (left != null) {
20868 left[leftoff + 0] = x1;
20869 left[leftoff + 1] = y1;
20870 }if (right != null) {
20871 right[rightoff + 4] = x2;
20872 right[rightoff + 5] = y2;
20873 }x1 = (x1 + ctrlx) / 2.0;
20874 y1 = (y1 + ctrly) / 2.0;
20875 x2 = (x2 + ctrlx) / 2.0;
20876 y2 = (y2 + ctrly) / 2.0;
20877 ctrlx = (x1 + x2) / 2.0;
20878 ctrly = (y1 + y2) / 2.0;
20879 if (left != null) {
20880 left[leftoff + 2] = x1;
20881 left[leftoff + 3] = y1;
20882 left[leftoff + 4] = ctrlx;
20883 left[leftoff + 5] = ctrly;
20884 }if (right != null) {
20885 right[rightoff + 0] = ctrlx;
20886 right[rightoff + 1] = ctrly;
20887 right[rightoff + 2] = x2;
20888 right[rightoff + 3] = y2;
20889 }}, "~A,~N,~A,~N,~A,~N");
20890 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20891 function (eqn) {
20892 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, eqn);
20893 }, "~A");
20894 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20895 function (eqn, res) {
20896 var a = eqn[2];
20897 var b = eqn[1];
20898 var c = eqn[0];
20899 var roots = 0;
20900 if (a == 0.0) {
20901 if (b == 0.0) {
20902 return -1;
20903 }res[roots++] = -c / b;
20904 } else {
20905 var d = b * b - 4.0 * a * c;
20906 if (d < 0.0) {
20907 return 0;
20908 }d = Math.sqrt (d);
20909 if (b < 0.0) {
20910 d = -d;
20911 }var q = (b + d) / -2.0;
20912 res[roots++] = q / a;
20913 if (q != 0.0) {
20914 res[roots++] = c / q;
20915 }}return roots;
20916 }, "~A,~A");
20917 Clazz_defineMethod (c$, "contains", 
20918 function (x, y) {
20919 var x1 = this.getX1 ();
20920 var y1 = this.getY1 ();
20921 var xc = this.getCtrlX ();
20922 var yc = this.getCtrlY ();
20923 var x2 = this.getX2 ();
20924 var y2 = this.getY2 ();
20925 var kx = x1 - 2 * xc + x2;
20926 var ky = y1 - 2 * yc + y2;
20927 var dx = x - x1;
20928 var dy = y - y1;
20929 var dxl = x2 - x1;
20930 var dyl = y2 - y1;
20931 var t0 = (dx * ky - dy * kx) / (dxl * ky - dyl * kx);
20932 if (t0 < 0 || t0 > 1 || t0 != t0) {
20933 return false;
20934 }var xb = kx * t0 * t0 + 2 * (xc - x1) * t0 + x1;
20935 var yb = ky * t0 * t0 + 2 * (yc - y1) * t0 + y1;
20936 var xl = dxl * t0 + x1;
20937 var yl = dyl * t0 + y1;
20938 return (x >= xb && x < xl) || (x >= xl && x < xb) || (y >= yb && y < yl) || (y >= yl && y < yb);
20939 }, "~N,~N");
20940 Clazz_defineMethod (c$, "contains", 
20941 function (p) {
20942 return this.contains (p.getX (), p.getY ());
20943 }, "java.awt.geom.Point2D");
20944 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
20945  function (eqn, val, c1, cp, c2) {
20946 eqn[0] = c1 - val;
20947 eqn[1] = cp + cp - c1 - c1;
20948 eqn[2] = c1 - cp - cp + c2;
20949 return;
20950 }, "~A,~N,~N,~N,~N");
20951 c$.evalQuadratic = Clazz_defineMethod (c$, "evalQuadratic", 
20952  function (vals, num, include0, include1, inflect, c1, ctrl, c2) {
20953 var j = 0;
20954 for (var i = 0; i < num; i++) {
20955 var t = vals[i];
20956 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + 2 * inflect[2] * t != 0)) {
20957 var u = 1 - t;
20958 vals[j++] = c1 * u * u + 2 * ctrl * t * u + c2 * t * t;
20959 }}
20960 return j;
20961 }, "~A,~N,~B,~B,~A,~N,~N,~N");
20962 c$.getTag = Clazz_defineMethod (c$, "getTag", 
20963  function (coord, low, high) {
20964 if (coord <= low) {
20965 return (coord < low ? -2 : -1);
20966 }if (coord >= high) {
20967 return (coord > high ? 2 : 1);
20968 }return 0;
20969 }, "~N,~N,~N");
20970 c$.inwards = Clazz_defineMethod (c$, "inwards", 
20971  function (pttag, opt1tag, opt2tag) {
20972 switch (pttag) {
20973 case -2:
20974 case 2:
20975 default:
20976 return false;
20977 case -1:
20978 return (opt1tag >= 0 || opt2tag >= 0);
20979 case 0:
20980 return true;
20981 case 1:
20982 return (opt1tag <= 0 || opt2tag <= 0);
20983 }
20984 }, "~N,~N,~N");
20985 Clazz_defineMethod (c$, "intersects", 
20986 function (x, y, w, h) {
20987 if (w <= 0 || h <= 0) {
20988 return false;
20989 }var x1 = this.getX1 ();
20990 var y1 = this.getY1 ();
20991 var x1tag = java.awt.geom.QuadCurve2D.getTag (x1, x, x + w);
20992 var y1tag = java.awt.geom.QuadCurve2D.getTag (y1, y, y + h);
20993 if (x1tag == 0 && y1tag == 0) {
20994 return true;
20995 }var x2 = this.getX2 ();
20996 var y2 = this.getY2 ();
20997 var x2tag = java.awt.geom.QuadCurve2D.getTag (x2, x, x + w);
20998 var y2tag = java.awt.geom.QuadCurve2D.getTag (y2, y, y + h);
20999 if (x2tag == 0 && y2tag == 0) {
21000 return true;
21001 }var ctrlx = this.getCtrlX ();
21002 var ctrly = this.getCtrlY ();
21003 var ctrlxtag = java.awt.geom.QuadCurve2D.getTag (ctrlx, x, x + w);
21004 var ctrlytag = java.awt.geom.QuadCurve2D.getTag (ctrly, y, y + h);
21005 if (x1tag < 0 && x2tag < 0 && ctrlxtag < 0) {
21006 return false;
21007 }if (y1tag < 0 && y2tag < 0 && ctrlytag < 0) {
21008 return false;
21009 }if (x1tag > 0 && x2tag > 0 && ctrlxtag > 0) {
21010 return false;
21011 }if (y1tag > 0 && y2tag > 0 && ctrlytag > 0) {
21012 return false;
21013 }if (java.awt.geom.QuadCurve2D.inwards (x1tag, x2tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y1tag, y2tag, ctrlytag)) {
21014 return true;
21015 }if (java.awt.geom.QuadCurve2D.inwards (x2tag, x1tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y2tag, y1tag, ctrlytag)) {
21016 return true;
21017 }var xoverlap = (x1tag * x2tag <= 0);
21018 var yoverlap = (y1tag * y2tag <= 0);
21019 if (x1tag == 0 && x2tag == 0 && yoverlap) {
21020 return true;
21021 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
21022 return true;
21023 }var eqn =  Clazz_newDoubleArray (3, 0);
21024 var res =  Clazz_newDoubleArray (3, 0);
21025 if (!yoverlap) {
21026 java.awt.geom.QuadCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly, y2);
21027 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);
21028 }if (!xoverlap) {
21029 java.awt.geom.QuadCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx, x2);
21030 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);
21031 }var dx = x2 - x1;
21032 var dy = y2 - y1;
21033 var k = y2 * x1 - x2 * y1;
21034 var c1tag;
21035 var c2tag;
21036 if (y1tag == 0) {
21037 c1tag = x1tag;
21038 } else {
21039 c1tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
21040 }if (y2tag == 0) {
21041 c2tag = x2tag;
21042 } else {
21043 c2tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
21044 }if (c1tag * c2tag <= 0) {
21045 return true;
21046 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
21047 java.awt.geom.QuadCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx, x2);
21048 var num = java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
21049 java.awt.geom.QuadCurve2D.evalQuadratic (res, num, true, true, null, y1, ctrly, y2);
21050 c2tag = java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h);
21051 return (c1tag * c2tag <= 0);
21052 }, "~N,~N,~N,~N");
21053 Clazz_defineMethod (c$, "intersects", 
21054 function (r) {
21055 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
21056 }, "java.awt.geom.Rectangle2D");
21057 Clazz_defineMethod (c$, "contains", 
21058 function (x, y, w, h) {
21059 if (w <= 0 || h <= 0) {
21060 return false;
21061 }return (this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h));
21062 }, "~N,~N,~N,~N");
21063 Clazz_defineMethod (c$, "contains", 
21064 function (r) {
21065 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
21066 }, "java.awt.geom.Rectangle2D");
21067 Clazz_overrideMethod (c$, "getBounds", 
21068 function () {
21069 return this.getBounds2D ().getBounds ();
21070 });
21071 Clazz_defineMethod (c$, "getPathIterator", 
21072 function (at) {
21073 return  new java.awt.geom.QuadIterator (this, at);
21074 }, "java.awt.geom.AffineTransform");
21075 Clazz_defineMethod (c$, "getPathIterator", 
21076 function (at, flatness) {
21077 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
21078 }, "java.awt.geom.AffineTransform,~N");
21079 Clazz_defineMethod (c$, "clone", 
21080 function () {
21081 try {
21082 return Clazz_superCall (this, java.awt.geom.QuadCurve2D, "clone", []);
21083 } catch (e) {
21084 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
21085 throw  new InternalError ();
21086 } else {
21087 throw e;
21088 }
21089 }
21090 });
21091 Clazz_pu$h(self.c$);
21092 c$ = Clazz_decorateAsClass (function () {
21093 this.x1 = 0;
21094 this.y1 = 0;
21095 this.ctrlx = 0;
21096 this.ctrly = 0;
21097 this.x2 = 0;
21098 this.y2 = 0;
21099 Clazz_instantialize (this, arguments);
21100 }, java.awt.geom.QuadCurve2D, "Float", java.awt.geom.QuadCurve2D);
21101 Clazz_makeConstructor (c$, 
21102 function () {
21103 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21104 });
21105 Clazz_makeConstructor (c$, 
21106 function (a, b, c, d, e, f) {
21107 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21108 this.setCurve (a, b, c, d, e, f);
21109 }, "~N,~N,~N,~N,~N,~N");
21110 Clazz_overrideMethod (c$, "getX1", 
21111 function () {
21112 return this.x1;
21113 });
21114 Clazz_overrideMethod (c$, "getY1", 
21115 function () {
21116 return this.y1;
21117 });
21118 Clazz_overrideMethod (c$, "getP1", 
21119 function () {
21120 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
21121 });
21122 Clazz_overrideMethod (c$, "getCtrlX", 
21123 function () {
21124 return this.ctrlx;
21125 });
21126 Clazz_overrideMethod (c$, "getCtrlY", 
21127 function () {
21128 return this.ctrly;
21129 });
21130 Clazz_overrideMethod (c$, "getCtrlPt", 
21131 function () {
21132 return  new java.awt.geom.Point2D.Float (this.ctrlx, this.ctrly);
21133 });
21134 Clazz_overrideMethod (c$, "getX2", 
21135 function () {
21136 return this.x2;
21137 });
21138 Clazz_overrideMethod (c$, "getY2", 
21139 function () {
21140 return this.y2;
21141 });
21142 Clazz_overrideMethod (c$, "getP2", 
21143 function () {
21144 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
21145 });
21146 Clazz_defineMethod (c$, "setCurve", 
21147 function (a, b, c, d, e, f) {
21148 this.x1 = a;
21149 this.y1 = b;
21150 this.ctrlx = c;
21151 this.ctrly = d;
21152 this.x2 = e;
21153 this.y2 = f;
21154 }, "~N,~N,~N,~N,~N,~N");
21155 Clazz_defineMethod (c$, "setCurve", 
21156 function (a, b, c, d, e, f) {
21157 this.x1 = a;
21158 this.y1 = b;
21159 this.ctrlx = c;
21160 this.ctrly = d;
21161 this.x2 = e;
21162 this.y2 = f;
21163 }, "~N,~N,~N,~N,~N,~N");
21164 Clazz_overrideMethod (c$, "getBounds2D", 
21165 function () {
21166 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21167 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21168 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21169 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21170 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
21171 });
21172 c$ = Clazz_p0p ();
21173 Clazz_pu$h(self.c$);
21174 c$ = Clazz_decorateAsClass (function () {
21175 this.x1 = 0;
21176 this.y1 = 0;
21177 this.ctrlx = 0;
21178 this.ctrly = 0;
21179 this.x2 = 0;
21180 this.y2 = 0;
21181 Clazz_instantialize (this, arguments);
21182 }, java.awt.geom.QuadCurve2D, "Double", java.awt.geom.QuadCurve2D);
21183 Clazz_makeConstructor (c$, 
21184 function () {
21185 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21186 });
21187 Clazz_makeConstructor (c$, 
21188 function (a, b, c, d, e, f) {
21189 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21190 this.setCurve (a, b, c, d, e, f);
21191 }, "~N,~N,~N,~N,~N,~N");
21192 Clazz_overrideMethod (c$, "getX1", 
21193 function () {
21194 return this.x1;
21195 });
21196 Clazz_overrideMethod (c$, "getY1", 
21197 function () {
21198 return this.y1;
21199 });
21200 Clazz_overrideMethod (c$, "getP1", 
21201 function () {
21202 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
21203 });
21204 Clazz_overrideMethod (c$, "getCtrlX", 
21205 function () {
21206 return this.ctrlx;
21207 });
21208 Clazz_overrideMethod (c$, "getCtrlY", 
21209 function () {
21210 return this.ctrly;
21211 });
21212 Clazz_overrideMethod (c$, "getCtrlPt", 
21213 function () {
21214 return  new java.awt.geom.Point2D.Double (this.ctrlx, this.ctrly);
21215 });
21216 Clazz_overrideMethod (c$, "getX2", 
21217 function () {
21218 return this.x2;
21219 });
21220 Clazz_overrideMethod (c$, "getY2", 
21221 function () {
21222 return this.y2;
21223 });
21224 Clazz_overrideMethod (c$, "getP2", 
21225 function () {
21226 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
21227 });
21228 Clazz_defineMethod (c$, "setCurve", 
21229 function (a, b, c, d, e, f) {
21230 this.x1 = a;
21231 this.y1 = b;
21232 this.ctrlx = c;
21233 this.ctrly = d;
21234 this.x2 = e;
21235 this.y2 = f;
21236 }, "~N,~N,~N,~N,~N,~N");
21237 Clazz_overrideMethod (c$, "getBounds2D", 
21238 function () {
21239 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21240 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21241 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21242 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21243 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
21244 });
21245 c$ = Clazz_p0p ();
21246 Clazz_defineStatics (c$,
21247 "BELOW", -2,
21248 "LOWEDGE", -1,
21249 "INSIDE", 0,
21250 "HIGHEDGE", 1,
21251 "ABOVE", 2);
21252 });
21253 Clazz_declarePackage ("java.awt.geom");
21254 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.QuadIterator", ["java.util.NoSuchElementException"], function () {
21255 c$ = Clazz_decorateAsClass (function () {
21256 this.quad = null;
21257 this.affine = null;
21258 this.index = 0;
21259 Clazz_instantialize (this, arguments);
21260 }, java.awt.geom, "QuadIterator", null, java.awt.geom.PathIterator);
21261 Clazz_makeConstructor (c$, 
21262 function (q, at) {
21263 this.quad = q;
21264 this.affine = at;
21265 }, "java.awt.geom.QuadCurve2D,java.awt.geom.AffineTransform");
21266 Clazz_overrideMethod (c$, "getWindingRule", 
21267 function () {
21268 return 1;
21269 });
21270 Clazz_overrideMethod (c$, "isDone", 
21271 function () {
21272 return (this.index > 1);
21273 });
21274 Clazz_overrideMethod (c$, "next", 
21275 function () {
21276 this.index++;
21277 });
21278 Clazz_defineMethod (c$, "currentSegment", 
21279 function (coords) {
21280 if (this.isDone ()) {
21281 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21282 }var type;
21283 if (this.index == 0) {
21284 coords[0] = this.quad.getX1 ();
21285 coords[1] = this.quad.getY1 ();
21286 type = 0;
21287 } else {
21288 coords[0] = this.quad.getCtrlX ();
21289 coords[1] = this.quad.getCtrlY ();
21290 coords[2] = this.quad.getX2 ();
21291 coords[3] = this.quad.getY2 ();
21292 type = 2;
21293 }if (this.affine != null) {
21294 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21295 }return type;
21296 }, "~A");
21297 Clazz_defineMethod (c$, "currentSegment", 
21298 function (coords) {
21299 if (this.isDone ()) {
21300 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21301 }var type;
21302 if (this.index == 0) {
21303 coords[0] = this.quad.getX1 ();
21304 coords[1] = this.quad.getY1 ();
21305 type = 0;
21306 } else {
21307 coords[0] = this.quad.getCtrlX ();
21308 coords[1] = this.quad.getCtrlY ();
21309 coords[2] = this.quad.getX2 ();
21310 coords[3] = this.quad.getY2 ();
21311 type = 2;
21312 }if (this.affine != null) {
21313 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21314 }return type;
21315 }, "~A");
21316 });
21317 Clazz_declarePackage ("jssun.awt.geom");
21318 Clazz_load (null, "jssun.awt.geom.Curve", ["java.lang.Double", "$.InternalError", "java.awt.geom.IllegalPathStateException"], function () {
21319 c$ = Clazz_decorateAsClass (function () {
21320 this.direction = 0;
21321 Clazz_instantialize (this, arguments);
21322 }, jssun.awt.geom, "Curve");
21323 c$.insertMove = Clazz_defineMethod (c$, "insertMove", 
21324 function (curves, x, y) {
21325 curves.add ( new jssun.awt.geom.Order0 (x, y));
21326 }, "java.util.Vector,~N,~N");
21327 c$.insertLine = Clazz_defineMethod (c$, "insertLine", 
21328 function (curves, x0, y0, x1, y1) {
21329 if (y0 < y1) {
21330 curves.add ( new jssun.awt.geom.Order1 (x0, y0, x1, y1, 1));
21331 } else if (y0 > y1) {
21332 curves.add ( new jssun.awt.geom.Order1 (x1, y1, x0, y0, -1));
21333 } else {
21334 }}, "java.util.Vector,~N,~N,~N,~N");
21335 c$.insertQuad = Clazz_defineMethod (c$, "insertQuad", 
21336 function (curves, x0, y0, coords) {
21337 var y1 = coords[3];
21338 if (y0 > y1) {
21339 jssun.awt.geom.Order2.insert (curves, coords, coords[2], y1, coords[0], coords[1], x0, y0, -1);
21340 } else if (y0 == y1 && y0 == coords[1]) {
21341 return;
21342 } else {
21343 jssun.awt.geom.Order2.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], y1, 1);
21344 }}, "java.util.Vector,~N,~N,~A");
21345 c$.insertCubic = Clazz_defineMethod (c$, "insertCubic", 
21346 function (curves, x0, y0, coords) {
21347 var y1 = coords[5];
21348 if (y0 > y1) {
21349 jssun.awt.geom.Order3.insert (curves, coords, coords[4], y1, coords[2], coords[3], coords[0], coords[1], x0, y0, -1);
21350 } else if (y0 == y1 && y0 == coords[1] && y0 == coords[3]) {
21351 return;
21352 } else {
21353 jssun.awt.geom.Order3.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], coords[3], coords[4], y1, 1);
21354 }}, "java.util.Vector,~N,~N,~A");
21355 c$.pointCrossingsForPath = Clazz_defineMethod (c$, "pointCrossingsForPath", 
21356 function (pi, px, py) {
21357 if (pi.isDone ()) {
21358 return 0;
21359 }var coords =  Clazz_newDoubleArray (6, 0);
21360 if (pi.currentSegment (coords) != 0) {
21361 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21362 }pi.next ();
21363 var movx = coords[0];
21364 var movy = coords[1];
21365 var curx = movx;
21366 var cury = movy;
21367 var endx;
21368 var endy;
21369 var crossings = 0;
21370 while (!pi.isDone ()) {
21371 switch (pi.currentSegment (coords)) {
21372 case 0:
21373 if (cury != movy) {
21374 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21375 }movx = curx = coords[0];
21376 movy = cury = coords[1];
21377 break;
21378 case 1:
21379 endx = coords[0];
21380 endy = coords[1];
21381 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, endx, endy);
21382 curx = endx;
21383 cury = endy;
21384 break;
21385 case 2:
21386 endx = coords[2];
21387 endy = coords[3];
21388 crossings += jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, curx, cury, coords[0], coords[1], endx, endy, 0);
21389 curx = endx;
21390 cury = endy;
21391 break;
21392 case 3:
21393 endx = coords[4];
21394 endy = coords[5];
21395 crossings += jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21396 curx = endx;
21397 cury = endy;
21398 break;
21399 case 4:
21400 if (cury != movy) {
21401 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21402 }curx = movx;
21403 cury = movy;
21404 break;
21405 }
21406 pi.next ();
21407 }
21408 if (cury != movy) {
21409 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21410 }return crossings;
21411 }, "java.awt.geom.PathIterator,~N,~N");
21412 c$.pointCrossingsForLine = Clazz_defineMethod (c$, "pointCrossingsForLine", 
21413 function (px, py, x0, y0, x1, y1) {
21414 if (py < y0 && py < y1) return 0;
21415 if (py >= y0 && py >= y1) return 0;
21416 if (px >= x0 && px >= x1) return 0;
21417 if (px < x0 && px < x1) return (y0 < y1) ? 1 : -1;
21418 var xintercept = x0 + (py - y0) * (x1 - x0) / (y1 - y0);
21419 if (px >= xintercept) return 0;
21420 return (y0 < y1) ? 1 : -1;
21421 }, "~N,~N,~N,~N,~N,~N");
21422 c$.pointCrossingsForQuad = Clazz_defineMethod (c$, "pointCrossingsForQuad", 
21423 function (px, py, x0, y0, xc, yc, x1, y1, level) {
21424 if (py < y0 && py < yc && py < y1) return 0;
21425 if (py >= y0 && py >= yc && py >= y1) return 0;
21426 if (px >= x0 && px >= xc && px >= x1) return 0;
21427 if (px < x0 && px < xc && px < x1) {
21428 if (py >= y0) {
21429 if (py < y1) return 1;
21430 } else {
21431 if (py >= y1) return -1;
21432 }return 0;
21433 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21434 var x0c = (x0 + xc) / 2;
21435 var y0c = (y0 + yc) / 2;
21436 var xc1 = (xc + x1) / 2;
21437 var yc1 = (yc + y1) / 2;
21438 xc = (x0c + xc1) / 2;
21439 yc = (y0c + yc1) / 2;
21440 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21441 return 0;
21442 }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));
21443 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21444 c$.pointCrossingsForCubic = Clazz_defineMethod (c$, "pointCrossingsForCubic", 
21445 function (px, py, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21446 if (py < y0 && py < yc0 && py < yc1 && py < y1) return 0;
21447 if (py >= y0 && py >= yc0 && py >= yc1 && py >= y1) return 0;
21448 if (px >= x0 && px >= xc0 && px >= xc1 && px >= x1) return 0;
21449 if (px < x0 && px < xc0 && px < xc1 && px < x1) {
21450 if (py >= y0) {
21451 if (py < y1) return 1;
21452 } else {
21453 if (py >= y1) return -1;
21454 }return 0;
21455 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21456 var xmid = (xc0 + xc1) / 2;
21457 var ymid = (yc0 + yc1) / 2;
21458 xc0 = (x0 + xc0) / 2;
21459 yc0 = (y0 + yc0) / 2;
21460 xc1 = (xc1 + x1) / 2;
21461 yc1 = (yc1 + y1) / 2;
21462 var xc0m = (xc0 + xmid) / 2;
21463 var yc0m = (yc0 + ymid) / 2;
21464 var xmc1 = (xmid + xc1) / 2;
21465 var ymc1 = (ymid + yc1) / 2;
21466 xmid = (xc0m + xmc1) / 2;
21467 ymid = (yc0m + ymc1) / 2;
21468 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21469 return 0;
21470 }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));
21471 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21472 c$.rectCrossingsForPath = Clazz_defineMethod (c$, "rectCrossingsForPath", 
21473 function (pi, rxmin, rymin, rxmax, rymax) {
21474 if (rxmax <= rxmin || rymax <= rymin) {
21475 return 0;
21476 }if (pi.isDone ()) {
21477 return 0;
21478 }var coords =  Clazz_newDoubleArray (6, 0);
21479 if (pi.currentSegment (coords) != 0) {
21480 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21481 }pi.next ();
21482 var curx;
21483 var cury;
21484 var movx;
21485 var movy;
21486 var endx;
21487 var endy;
21488 curx = movx = coords[0];
21489 cury = movy = coords[1];
21490 var crossings = 0;
21491 while (crossings != -2147483648 && !pi.isDone ()) {
21492 switch (pi.currentSegment (coords)) {
21493 case 0:
21494 if (curx != movx || cury != movy) {
21495 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21496 }movx = curx = coords[0];
21497 movy = cury = coords[1];
21498 break;
21499 case 1:
21500 endx = coords[0];
21501 endy = coords[1];
21502 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, endx, endy);
21503 curx = endx;
21504 cury = endy;
21505 break;
21506 case 2:
21507 endx = coords[2];
21508 endy = coords[3];
21509 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], endx, endy, 0);
21510 curx = endx;
21511 cury = endy;
21512 break;
21513 case 3:
21514 endx = coords[4];
21515 endy = coords[5];
21516 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21517 curx = endx;
21518 cury = endy;
21519 break;
21520 case 4:
21521 if (curx != movx || cury != movy) {
21522 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21523 }curx = movx;
21524 cury = movy;
21525 break;
21526 }
21527 pi.next ();
21528 }
21529 if (crossings != -2147483648 && (curx != movx || cury != movy)) {
21530 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21531 }return crossings;
21532 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
21533 c$.rectCrossingsForLine = Clazz_defineMethod (c$, "rectCrossingsForLine", 
21534 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1) {
21535 if (y0 >= rymax && y1 >= rymax) return crossings;
21536 if (y0 <= rymin && y1 <= rymin) return crossings;
21537 if (x0 <= rxmin && x1 <= rxmin) return crossings;
21538 if (x0 >= rxmax && x1 >= rxmax) {
21539 if (y0 < y1) {
21540 if (y0 <= rymin) crossings++;
21541 if (y1 >= rymax) crossings++;
21542 } else if (y1 < y0) {
21543 if (y1 <= rymin) crossings--;
21544 if (y0 >= rymax) crossings--;
21545 }return crossings;
21546 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21547 return -2147483648;
21548 }var xi0 = x0;
21549 if (y0 < rymin) {
21550 xi0 += ((rymin - y0) * (x1 - x0) / (y1 - y0));
21551 } else if (y0 > rymax) {
21552 xi0 += ((rymax - y0) * (x1 - x0) / (y1 - y0));
21553 }var xi1 = x1;
21554 if (y1 < rymin) {
21555 xi1 += ((rymin - y1) * (x0 - x1) / (y0 - y1));
21556 } else if (y1 > rymax) {
21557 xi1 += ((rymax - y1) * (x0 - x1) / (y0 - y1));
21558 }if (xi0 <= rxmin && xi1 <= rxmin) return crossings;
21559 if (xi0 >= rxmax && xi1 >= rxmax) {
21560 if (y0 < y1) {
21561 if (y0 <= rymin) crossings++;
21562 if (y1 >= rymax) crossings++;
21563 } else if (y1 < y0) {
21564 if (y1 <= rymin) crossings--;
21565 if (y0 >= rymax) crossings--;
21566 }return crossings;
21567 }return -2147483648;
21568 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21569 c$.rectCrossingsForQuad = Clazz_defineMethod (c$, "rectCrossingsForQuad", 
21570 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc, yc, x1, y1, level) {
21571 if (y0 >= rymax && yc >= rymax && y1 >= rymax) return crossings;
21572 if (y0 <= rymin && yc <= rymin && y1 <= rymin) return crossings;
21573 if (x0 <= rxmin && xc <= rxmin && x1 <= rxmin) return crossings;
21574 if (x0 >= rxmax && xc >= rxmax && x1 >= rxmax) {
21575 if (y0 < y1) {
21576 if (y0 <= rymin && y1 > rymin) crossings++;
21577 if (y0 < rymax && y1 >= rymax) crossings++;
21578 } else if (y1 < y0) {
21579 if (y1 <= rymin && y0 > rymin) crossings--;
21580 if (y1 < rymax && y0 >= rymax) crossings--;
21581 }return crossings;
21582 }if ((x0 < rxmax && x0 > rxmin && y0 < rymax && y0 > rymin) || (x1 < rxmax && x1 > rxmin && y1 < rymax && y1 > rymin)) {
21583 return -2147483648;
21584 }if (level > 52) {
21585 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21586 }var x0c = (x0 + xc) / 2;
21587 var y0c = (y0 + yc) / 2;
21588 var xc1 = (xc + x1) / 2;
21589 var yc1 = (yc + y1) / 2;
21590 xc = (x0c + xc1) / 2;
21591 yc = (y0c + yc1) / 2;
21592 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21593 return 0;
21594 }crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x0c, y0c, xc, yc, level + 1);
21595 if (crossings != -2147483648) {
21596 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, xc, yc, xc1, yc1, x1, y1, level + 1);
21597 }return crossings;
21598 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21599 c$.rectCrossingsForCubic = Clazz_defineMethod (c$, "rectCrossingsForCubic", 
21600 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21601 if (y0 >= rymax && yc0 >= rymax && yc1 >= rymax && y1 >= rymax) {
21602 return crossings;
21603 }if (y0 <= rymin && yc0 <= rymin && yc1 <= rymin && y1 <= rymin) {
21604 return crossings;
21605 }if (x0 <= rxmin && xc0 <= rxmin && xc1 <= rxmin && x1 <= rxmin) {
21606 return crossings;
21607 }if (x0 >= rxmax && xc0 >= rxmax && xc1 >= rxmax && x1 >= rxmax) {
21608 if (y0 < y1) {
21609 if (y0 <= rymin && y1 > rymin) crossings++;
21610 if (y0 < rymax && y1 >= rymax) crossings++;
21611 } else if (y1 < y0) {
21612 if (y1 <= rymin && y0 > rymin) crossings--;
21613 if (y1 < rymax && y0 >= rymax) crossings--;
21614 }return crossings;
21615 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21616 return -2147483648;
21617 }if (level > 52) {
21618 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21619 }var xmid = (xc0 + xc1) / 2;
21620 var ymid = (yc0 + yc1) / 2;
21621 xc0 = (x0 + xc0) / 2;
21622 yc0 = (y0 + yc0) / 2;
21623 xc1 = (xc1 + x1) / 2;
21624 yc1 = (yc1 + y1) / 2;
21625 var xc0m = (xc0 + xmid) / 2;
21626 var yc0m = (yc0 + ymid) / 2;
21627 var xmc1 = (xmid + xc1) / 2;
21628 var ymc1 = (ymid + yc1) / 2;
21629 xmid = (xc0m + xmc1) / 2;
21630 ymid = (yc0m + ymc1) / 2;
21631 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21632 return 0;
21633 }crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1);
21634 if (crossings != -2147483648) {
21635 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1);
21636 }return crossings;
21637 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21638 Clazz_makeConstructor (c$, 
21639 function (direction) {
21640 this.direction = direction;
21641 }, "~N");
21642 Clazz_defineMethod (c$, "getDirection", 
21643 function () {
21644 return this.direction;
21645 });
21646 Clazz_defineMethod (c$, "getWithDirection", 
21647 function (direction) {
21648 return (this.direction == direction ? this : this.getReversedCurve ());
21649 }, "~N");
21650 c$.round = Clazz_defineMethod (c$, "round", 
21651 function (v) {
21652 return v;
21653 }, "~N");
21654 c$.orderof = Clazz_defineMethod (c$, "orderof", 
21655 function (x1, x2) {
21656 if (x1 < x2) {
21657 return -1;
21658 }if (x1 > x2) {
21659 return 1;
21660 }return 0;
21661 }, "~N,~N");
21662 c$.signeddiffbits = Clazz_defineMethod (c$, "signeddiffbits", 
21663 function (y1, y2) {
21664 return (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21665 }, "~N,~N");
21666 c$.diffbits = Clazz_defineMethod (c$, "diffbits", 
21667 function (y1, y2) {
21668 return Math.abs (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21669 }, "~N,~N");
21670 c$.prev = Clazz_defineMethod (c$, "prev", 
21671 function (v) {
21672 return Double.longBitsToDouble (Double.doubleToLongBits (v) - 1);
21673 }, "~N");
21674 c$.next = Clazz_defineMethod (c$, "next", 
21675 function (v) {
21676 return Double.longBitsToDouble (Double.doubleToLongBits (v) + 1);
21677 }, "~N");
21678 Clazz_overrideMethod (c$, "toString", 
21679 function () {
21680 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") + "]");
21681 });
21682 Clazz_defineMethod (c$, "controlPointString", 
21683 function () {
21684 return "";
21685 });
21686 Clazz_defineMethod (c$, "crossingsFor", 
21687 function (x, y) {
21688 if (y >= this.getYTop () && y < this.getYBot ()) {
21689 if (x < this.getXMax () && (x < this.getXMin () || x < this.XforY (y))) {
21690 return 1;
21691 }}return 0;
21692 }, "~N,~N");
21693 Clazz_defineMethod (c$, "accumulateCrossings", 
21694 function (c) {
21695 var xhi = c.getXHi ();
21696 if (this.getXMin () >= xhi) {
21697 return false;
21698 }var xlo = c.getXLo ();
21699 var ylo = c.getYLo ();
21700 var yhi = c.getYHi ();
21701 var y0 = this.getYTop ();
21702 var y1 = this.getYBot ();
21703 var tstart;
21704 var ystart;
21705 var tend;
21706 var yend;
21707 if (y0 < ylo) {
21708 if (y1 <= ylo) {
21709 return false;
21710 }ystart = ylo;
21711 tstart = this.TforY (ylo);
21712 } else {
21713 if (y0 >= yhi) {
21714 return false;
21715 }ystart = y0;
21716 tstart = 0;
21717 }if (y1 > yhi) {
21718 yend = yhi;
21719 tend = this.TforY (yhi);
21720 } else {
21721 yend = y1;
21722 tend = 1;
21723 }var hitLo = false;
21724 var hitHi = false;
21725 while (true) {
21726 var x = this.XforT (tstart);
21727 if (x < xhi) {
21728 if (hitHi || x > xlo) {
21729 return true;
21730 }hitLo = true;
21731 } else {
21732 if (hitLo) {
21733 return true;
21734 }hitHi = true;
21735 }if (tstart >= tend) {
21736 break;
21737 }tstart = this.nextVertical (tstart, tend);
21738 }
21739 if (hitLo) {
21740 c.record (ystart, yend, this.direction);
21741 }return false;
21742 }, "jssun.awt.geom.Crossings");
21743 Clazz_defineMethod (c$, "getSubCurve", 
21744 function (ystart, yend) {
21745 return this.getSubCurve (ystart, yend, this.direction);
21746 }, "~N,~N");
21747 Clazz_defineMethod (c$, "compareTo", 
21748 function (that, yrange) {
21749 var y0 = yrange[0];
21750 var y1 = yrange[1];
21751 y1 = Math.min (Math.min (y1, this.getYBot ()), that.getYBot ());
21752 if (y1 <= yrange[0]) {
21753 System.err.println ("this == " + this);
21754 System.err.println ("that == " + that);
21755 System.out.println ("target range = " + yrange[0] + "=>" + yrange[1]);
21756 throw  new InternalError ("backstepping from " + yrange[0] + " to " + y1);
21757 }yrange[1] = y1;
21758 if (this.getXMax () <= that.getXMin ()) {
21759 if (this.getXMin () == that.getXMax ()) {
21760 return 0;
21761 }return -1;
21762 }if (this.getXMin () >= that.getXMax ()) {
21763 return 1;
21764 }var s0 = this.TforY (y0);
21765 var ys0 = this.YforT (s0);
21766 if (ys0 < y0) {
21767 s0 = this.refineTforY (s0, ys0, y0);
21768 ys0 = this.YforT (s0);
21769 }var s1 = this.TforY (y1);
21770 if (this.YforT (s1) < y0) {
21771 s1 = this.refineTforY (s1, this.YforT (s1), y0);
21772 }var t0 = that.TforY (y0);
21773 var yt0 = that.YforT (t0);
21774 if (yt0 < y0) {
21775 t0 = that.refineTforY (t0, yt0, y0);
21776 yt0 = that.YforT (t0);
21777 }var t1 = that.TforY (y1);
21778 if (that.YforT (t1) < y0) {
21779 t1 = that.refineTforY (t1, that.YforT (t1), y0);
21780 }var xs0 = this.XforT (s0);
21781 var xt0 = that.XforT (t0);
21782 var scale = Math.max (Math.abs (y0), Math.abs (y1));
21783 var ymin = Math.max (scale * 1E-14, 1E-300);
21784 if (this.fairlyClose (xs0, xt0)) {
21785 var bump = ymin;
21786 var maxbump = Math.min (ymin * 1E13, (y1 - y0) * .1);
21787 var y = y0 + bump;
21788 while (y <= y1) {
21789 if (this.fairlyClose (this.XforY (y), that.XforY (y))) {
21790 if ((bump *= 2) > maxbump) {
21791 bump = maxbump;
21792 }} else {
21793 y -= bump;
21794 while (true) {
21795 bump /= 2;
21796 var newy = y + bump;
21797 if (newy <= y) {
21798 break;
21799 }if (this.fairlyClose (this.XforY (newy), that.XforY (newy))) {
21800 y = newy;
21801 }}
21802 break;
21803 }y += bump;
21804 }
21805 if (y > y0) {
21806 if (y < y1) {
21807 yrange[1] = y;
21808 }return 0;
21809 }}if (ymin <= 0) {
21810 System.out.println ("ymin = " + ymin);
21811 }while (s0 < s1 && t0 < t1) {
21812 var sh = this.nextVertical (s0, s1);
21813 var xsh = this.XforT (sh);
21814 var ysh = this.YforT (sh);
21815 var th = that.nextVertical (t0, t1);
21816 var xth = that.XforT (th);
21817 var yth = that.YforT (th);
21818 try {
21819 if (this.findIntersect (that, yrange, ymin, 0, 0, s0, xs0, ys0, sh, xsh, ysh, t0, xt0, yt0, th, xth, yth)) {
21820 break;
21821 }} catch (t) {
21822 System.err.println ("Error: " + t);
21823 System.err.println ("y range was " + yrange[0] + "=>" + yrange[1]);
21824 System.err.println ("s y range is " + ys0 + "=>" + ysh);
21825 System.err.println ("t y range is " + yt0 + "=>" + yth);
21826 System.err.println ("ymin is " + ymin);
21827 return 0;
21828 }
21829 if (ysh < yth) {
21830 if (ysh > yrange[0]) {
21831 if (ysh < yrange[1]) {
21832 yrange[1] = ysh;
21833 }break;
21834 }s0 = sh;
21835 xs0 = xsh;
21836 ys0 = ysh;
21837 } else {
21838 if (yth > yrange[0]) {
21839 if (yth < yrange[1]) {
21840 yrange[1] = yth;
21841 }break;
21842 }t0 = th;
21843 xt0 = xth;
21844 yt0 = yth;
21845 }}
21846 var ymid = (yrange[0] + yrange[1]) / 2;
21847 return jssun.awt.geom.Curve.orderof (this.XforY (ymid), that.XforY (ymid));
21848 }, "jssun.awt.geom.Curve,~A");
21849 Clazz_defineMethod (c$, "findIntersect", 
21850 function (that, yrange, ymin, slevel, tlevel, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1) {
21851 if (ys0 > yt1 || yt0 > ys1) {
21852 return false;
21853 }if (Math.min (xs0, xs1) > Math.max (xt0, xt1) || Math.max (xs0, xs1) < Math.min (xt0, xt1)) {
21854 return false;
21855 }if (s1 - s0 > 0.001) {
21856 var s = (s0 + s1) / 2;
21857 var xs = this.XforT (s);
21858 var ys = this.YforT (s);
21859 if (s == s0 || s == s1) {
21860 System.out.println ("s0 = " + s0);
21861 System.out.println ("s1 = " + s1);
21862 throw  new InternalError ("no s progress!");
21863 }if (t1 - t0 > 0.001) {
21864 var t = (t0 + t1) / 2;
21865 var xt = that.XforT (t);
21866 var yt = that.YforT (t);
21867 if (t == t0 || t == t1) {
21868 System.out.println ("t0 = " + t0);
21869 System.out.println ("t1 = " + t1);
21870 throw  new InternalError ("no t progress!");
21871 }if (ys >= yt0 && yt >= ys0) {
21872 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t, xt, yt)) {
21873 return true;
21874 }}if (ys >= yt) {
21875 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t, xt, yt, t1, xt1, yt1)) {
21876 return true;
21877 }}if (yt >= ys) {
21878 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21879 return true;
21880 }}if (ys1 >= yt && yt1 >= ys) {
21881 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21882 return true;
21883 }}} else {
21884 if (ys >= yt0) {
21885 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t1, xt1, yt1)) {
21886 return true;
21887 }}if (yt1 >= ys) {
21888 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1)) {
21889 return true;
21890 }}}} else if (t1 - t0 > 0.001) {
21891 var t = (t0 + t1) / 2;
21892 var xt = that.XforT (t);
21893 var yt = that.YforT (t);
21894 if (t == t0 || t == t1) {
21895 System.out.println ("t0 = " + t0);
21896 System.out.println ("t1 = " + t1);
21897 throw  new InternalError ("no t progress!");
21898 }if (yt >= ys0) {
21899 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21900 return true;
21901 }}if (ys1 >= yt) {
21902 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21903 return true;
21904 }}} else {
21905 var xlk = xs1 - xs0;
21906 var ylk = ys1 - ys0;
21907 var xnm = xt1 - xt0;
21908 var ynm = yt1 - yt0;
21909 var xmk = xt0 - xs0;
21910 var ymk = yt0 - ys0;
21911 var det = xnm * ylk - ynm * xlk;
21912 if (det != 0) {
21913 var detinv = 1 / det;
21914 var s = (xnm * ymk - ynm * xmk) * detinv;
21915 var t = (xlk * ymk - ylk * xmk) * detinv;
21916 if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {
21917 s = s0 + s * (s1 - s0);
21918 t = t0 + t * (t1 - t0);
21919 if (s < 0 || s > 1 || t < 0 || t > 1) {
21920 System.out.println ("Uh oh!");
21921 }var y = (this.YforT (s) + that.YforT (t)) / 2;
21922 if (y <= yrange[1] && y > yrange[0]) {
21923 yrange[1] = y;
21924 return true;
21925 }}}}return false;
21926 }, "jssun.awt.geom.Curve,~A,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21927 Clazz_defineMethod (c$, "refineTforY", 
21928 function (t0, yt0, y0) {
21929 var t1 = 1;
21930 while (true) {
21931 var th = (t0 + t1) / 2;
21932 if (th == t0 || th == t1) {
21933 return t1;
21934 }var y = this.YforT (th);
21935 if (y < y0) {
21936 t0 = th;
21937 yt0 = y;
21938 } else if (y > y0) {
21939 t1 = th;
21940 } else {
21941 return t1;
21942 }}
21943 }, "~N,~N,~N");
21944 Clazz_defineMethod (c$, "fairlyClose", 
21945 function (v1, v2) {
21946 return (Math.abs (v1 - v2) < Math.max (Math.abs (v1), Math.abs (v2)) * 1E-10);
21947 }, "~N,~N");
21948 Clazz_defineStatics (c$,
21949 "INCREASING", 1,
21950 "DECREASING", -1,
21951 "RECT_INTERSECTS", 0x80000000,
21952 "TMIN", 1E-3);
21953 });
21954 Clazz_declarePackage ("java.awt.geom");
21955 Clazz_load (["java.lang.RuntimeException"], "java.awt.geom.IllegalPathStateException", null, function () {
21956 c$ = Clazz_declareType (java.awt.geom, "IllegalPathStateException", RuntimeException);
21957 Clazz_makeConstructor (c$, 
21958 function () {
21959 Clazz_superConstructor (this, java.awt.geom.IllegalPathStateException, []);
21960 });
21961 });
21962 Clazz_declarePackage ("java.awt.geom");
21963 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.RectIterator", ["java.util.NoSuchElementException"], function () {
21964 c$ = Clazz_decorateAsClass (function () {
21965 this.x = 0;
21966 this.y = 0;
21967 this.w = 0;
21968 this.h = 0;
21969 this.affine = null;
21970 this.index = 0;
21971 Clazz_instantialize (this, arguments);
21972 }, java.awt.geom, "RectIterator", null, java.awt.geom.PathIterator);
21973 Clazz_makeConstructor (c$, 
21974 function (r, at) {
21975 this.x = r.getX ();
21976 this.y = r.getY ();
21977 this.w = r.getWidth ();
21978 this.h = r.getHeight ();
21979 this.affine = at;
21980 if (this.w < 0 || this.h < 0) {
21981 this.index = 6;
21982 }}, "java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform");
21983 Clazz_overrideMethod (c$, "getWindingRule", 
21984 function () {
21985 return 1;
21986 });
21987 Clazz_overrideMethod (c$, "isDone", 
21988 function () {
21989 return this.index > 5;
21990 });
21991 Clazz_overrideMethod (c$, "next", 
21992 function () {
21993 this.index++;
21994 });
21995 Clazz_defineMethod (c$, "currentSegment", 
21996 function (coords) {
21997 if (this.isDone ()) {
21998 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
21999 }if (this.index == 5) {
22000 return 4;
22001 }coords[0] = this.x;
22002 coords[1] = this.y;
22003 if (this.index == 1 || this.index == 2) {
22004 coords[0] += this.w;
22005 }if (this.index == 2 || this.index == 3) {
22006 coords[1] += this.h;
22007 }if (this.affine != null) {
22008 this.affine.transform (coords, 0, coords, 0, 1);
22009 }return (this.index == 0 ? 0 : 1);
22010 }, "~A");
22011 Clazz_defineMethod (c$, "currentSegment", 
22012 function (coords) {
22013 if (this.isDone ()) {
22014 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
22015 }if (this.index == 5) {
22016 return 4;
22017 }coords[0] = this.x;
22018 coords[1] = this.y;
22019 if (this.index == 1 || this.index == 2) {
22020 coords[0] += this.w;
22021 }if (this.index == 2 || this.index == 3) {
22022 coords[1] += this.h;
22023 }if (this.affine != null) {
22024 this.affine.transform (coords, 0, coords, 0, 1);
22025 }return (this.index == 0 ? 0 : 1);
22026 }, "~A");
22027 });
22028 Clazz_declarePackage ("java.awt.event");
22029 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ActionEvent", ["java.awt.event.KeyEvent"], function () {
22030 c$ = Clazz_decorateAsClass (function () {
22031 this.actionCommand = null;
22032 this.when = 0;
22033 this.modifiers = 0;
22034 Clazz_instantialize (this, arguments);
22035 }, java.awt.event, "ActionEvent", java.awt.AWTEvent);
22036 Clazz_makeConstructor (c$, 
22037 function (source, id, command) {
22038 this.construct (source, id, command, 0);
22039 }, "~O,~N,~S");
22040 Clazz_makeConstructor (c$, 
22041 function (source, id, command, modifiers) {
22042 this.construct (source, id, command, 0, modifiers);
22043 }, "~O,~N,~S,~N");
22044 Clazz_makeConstructor (c$, 
22045 function (source, id, command, when, modifiers) {
22046 Clazz_superConstructor (this, java.awt.event.ActionEvent, [source, id]);
22047 this.actionCommand = command;
22048 this.when = when;
22049 this.modifiers = modifiers;
22050 }, "~O,~N,~S,~N,~N");
22051 Clazz_defineMethod (c$, "getActionCommand", 
22052 function () {
22053 return this.actionCommand;
22054 });
22055 Clazz_defineMethod (c$, "getWhen", 
22056 function () {
22057 return this.when;
22058 });
22059 Clazz_defineMethod (c$, "getModifiers", 
22060 function () {
22061 return this.modifiers;
22062 });
22063 Clazz_overrideMethod (c$, "paramString", 
22064 function () {
22065 var typeStr;
22066 switch (this.id) {
22067 case 1001:
22068 typeStr = "ACTION_PERFORMED";
22069 break;
22070 default:
22071 typeStr = "unknown type";
22072 }
22073 return typeStr + ",cmd=" + this.actionCommand + ",when=" + this.when + ",modifiers=" + java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers);
22074 });
22075 Clazz_defineStatics (c$,
22076 "SHIFT_MASK", 1,
22077 "CTRL_MASK", 2,
22078 "META_MASK", 4,
22079 "ALT_MASK", 8,
22080 "ACTION_FIRST", 1001,
22081 "ACTION_LAST", 1001,
22082 "ACTION_PERFORMED", 1001);
22083 });
22084 Clazz_declarePackage ("java.awt.event");
22085 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.KeyEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Toolkit"], function () {
22086 c$ = Clazz_decorateAsClass (function () {
22087 this.isProxyActive = false;
22088 this.keyCode = 0;
22089 this.keyChar = '\0';
22090 this.keyLocation = 0;
22091 Clazz_instantialize (this, arguments);
22092 }, java.awt.event, "KeyEvent", java.awt.event.InputEvent);
22093 Clazz_makeConstructor (c$, 
22094 function (source, id, when, modifiers, keyCode, keyChar, keyLocation) {
22095 Clazz_superConstructor (this, java.awt.event.KeyEvent, [source, id, when, modifiers]);
22096 if (id == 400) {
22097 if (keyChar == '\uffff') {
22098 throw  new IllegalArgumentException ("invalid keyChar");
22099 }if (keyCode != 0) {
22100 throw  new IllegalArgumentException ("invalid keyCode");
22101 }if (keyLocation != 0) {
22102 throw  new IllegalArgumentException ("invalid keyLocation");
22103 }}this.keyCode = keyCode;
22104 this.keyChar = keyChar;
22105 if ((keyLocation < 0) || (keyLocation > 4)) {
22106 throw  new IllegalArgumentException ("invalid keyLocation");
22107 }this.keyLocation = keyLocation;
22108 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22109 this.setNewModifiers ();
22110 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22111 this.setOldModifiers ();
22112 }}, "java.awt.Component,~N,~N,~N,~N,~S,~N");
22113 Clazz_makeConstructor (c$, 
22114 function (source, id, when, modifiers, keyCode, keyChar) {
22115 this.construct (source, id, when, modifiers, keyCode, keyChar, 0);
22116 }, "java.awt.Component,~N,~N,~N,~N,~S");
22117 Clazz_makeConstructor (c$, 
22118 function (source, id, when, modifiers, keyCode) {
22119 this.construct (source, id, when, modifiers, keyCode, String.fromCharCode (keyCode));
22120 }, "java.awt.Component,~N,~N,~N,~N");
22121 Clazz_defineMethod (c$, "getKeyCode", 
22122 function () {
22123 return this.keyCode;
22124 });
22125 Clazz_defineMethod (c$, "setKeyCode", 
22126 function (keyCode) {
22127 this.keyCode = keyCode;
22128 }, "~N");
22129 Clazz_defineMethod (c$, "getKeyChar", 
22130 function () {
22131 return this.keyChar;
22132 });
22133 Clazz_defineMethod (c$, "setKeyChar", 
22134 function (keyChar) {
22135 this.keyChar = keyChar;
22136 }, "~S");
22137 Clazz_defineMethod (c$, "setModifiers", 
22138 function (modifiers) {
22139 this.modifiers = modifiers;
22140 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22141 this.setNewModifiers ();
22142 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22143 this.setOldModifiers ();
22144 }}, "~N");
22145 Clazz_defineMethod (c$, "getKeyLocation", 
22146 function () {
22147 return this.keyLocation;
22148 });
22149 c$.getKeyText = Clazz_defineMethod (c$, "getKeyText", 
22150 function (keyCode) {
22151 if (keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90) {
22152 return String.valueOf (String.fromCharCode (keyCode));
22153 }switch (keyCode) {
22154 case 10:
22155 return java.awt.Toolkit.getProperty ("AWT.enter", "Enter");
22156 case 8:
22157 return java.awt.Toolkit.getProperty ("AWT.backSpace", "Backspace");
22158 case 9:
22159 return java.awt.Toolkit.getProperty ("AWT.tab", "Tab");
22160 case 3:
22161 return java.awt.Toolkit.getProperty ("AWT.cancel", "Cancel");
22162 case 12:
22163 return java.awt.Toolkit.getProperty ("AWT.clear", "Clear");
22164 case 65312:
22165 return java.awt.Toolkit.getProperty ("AWT.compose", "Compose");
22166 case 19:
22167 return java.awt.Toolkit.getProperty ("AWT.pause", "Pause");
22168 case 20:
22169 return java.awt.Toolkit.getProperty ("AWT.capsLock", "Caps Lock");
22170 case 27:
22171 return java.awt.Toolkit.getProperty ("AWT.escape", "Escape");
22172 case 32:
22173 return java.awt.Toolkit.getProperty ("AWT.space", "Space");
22174 case 33:
22175 return java.awt.Toolkit.getProperty ("AWT.pgup", "Page Up");
22176 case 34:
22177 return java.awt.Toolkit.getProperty ("AWT.pgdn", "Page Down");
22178 case 35:
22179 return java.awt.Toolkit.getProperty ("AWT.end", "End");
22180 case 36:
22181 return java.awt.Toolkit.getProperty ("AWT.home", "Home");
22182 case 37:
22183 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22184 case 38:
22185 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22186 case 39:
22187 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22188 case 40:
22189 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22190 case 65368:
22191 return java.awt.Toolkit.getProperty ("AWT.begin", "Begin");
22192 case 16:
22193 return java.awt.Toolkit.getProperty ("AWT.shift", "Shift");
22194 case 17:
22195 return java.awt.Toolkit.getProperty ("AWT.control", "Control");
22196 case 18:
22197 return java.awt.Toolkit.getProperty ("AWT.alt", "Alt");
22198 case 157:
22199 return java.awt.Toolkit.getProperty ("AWT.meta", "Meta");
22200 case 65406:
22201 return java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph");
22202 case 44:
22203 return java.awt.Toolkit.getProperty ("AWT.comma", "Comma");
22204 case 46:
22205 return java.awt.Toolkit.getProperty ("AWT.period", "Period");
22206 case 47:
22207 return java.awt.Toolkit.getProperty ("AWT.slash", "Slash");
22208 case 59:
22209 return java.awt.Toolkit.getProperty ("AWT.semicolon", "Semicolon");
22210 case 61:
22211 return java.awt.Toolkit.getProperty ("AWT.equals", "Equals");
22212 case 91:
22213 return java.awt.Toolkit.getProperty ("AWT.openBracket", "Open Bracket");
22214 case 92:
22215 return java.awt.Toolkit.getProperty ("AWT.backSlash", "Back Slash");
22216 case 93:
22217 return java.awt.Toolkit.getProperty ("AWT.closeBracket", "Close Bracket");
22218 case 106:
22219 return java.awt.Toolkit.getProperty ("AWT.multiply", "NumPad *");
22220 case 107:
22221 return java.awt.Toolkit.getProperty ("AWT.add", "NumPad +");
22222 case 108:
22223 return java.awt.Toolkit.getProperty ("AWT.separator", "NumPad ,");
22224 case 109:
22225 return java.awt.Toolkit.getProperty ("AWT.subtract", "NumPad -");
22226 case 110:
22227 return java.awt.Toolkit.getProperty ("AWT.decimal", "NumPad .");
22228 case 111:
22229 return java.awt.Toolkit.getProperty ("AWT.divide", "NumPad /");
22230 case 127:
22231 return java.awt.Toolkit.getProperty ("AWT.delete", "Delete");
22232 case 144:
22233 return java.awt.Toolkit.getProperty ("AWT.numLock", "Num Lock");
22234 case 145:
22235 return java.awt.Toolkit.getProperty ("AWT.scrollLock", "Scroll Lock");
22236 case 524:
22237 return java.awt.Toolkit.getProperty ("AWT.windows", "Windows");
22238 case 525:
22239 return java.awt.Toolkit.getProperty ("AWT.context", "Context Menu");
22240 case 112:
22241 return java.awt.Toolkit.getProperty ("AWT.f1", "F1");
22242 case 113:
22243 return java.awt.Toolkit.getProperty ("AWT.f2", "F2");
22244 case 114:
22245 return java.awt.Toolkit.getProperty ("AWT.f3", "F3");
22246 case 115:
22247 return java.awt.Toolkit.getProperty ("AWT.f4", "F4");
22248 case 116:
22249 return java.awt.Toolkit.getProperty ("AWT.f5", "F5");
22250 case 117:
22251 return java.awt.Toolkit.getProperty ("AWT.f6", "F6");
22252 case 118:
22253 return java.awt.Toolkit.getProperty ("AWT.f7", "F7");
22254 case 119:
22255 return java.awt.Toolkit.getProperty ("AWT.f8", "F8");
22256 case 120:
22257 return java.awt.Toolkit.getProperty ("AWT.f9", "F9");
22258 case 121:
22259 return java.awt.Toolkit.getProperty ("AWT.f10", "F10");
22260 case 122:
22261 return java.awt.Toolkit.getProperty ("AWT.f11", "F11");
22262 case 123:
22263 return java.awt.Toolkit.getProperty ("AWT.f12", "F12");
22264 case 61440:
22265 return java.awt.Toolkit.getProperty ("AWT.f13", "F13");
22266 case 61441:
22267 return java.awt.Toolkit.getProperty ("AWT.f14", "F14");
22268 case 61442:
22269 return java.awt.Toolkit.getProperty ("AWT.f15", "F15");
22270 case 61443:
22271 return java.awt.Toolkit.getProperty ("AWT.f16", "F16");
22272 case 61444:
22273 return java.awt.Toolkit.getProperty ("AWT.f17", "F17");
22274 case 61445:
22275 return java.awt.Toolkit.getProperty ("AWT.f18", "F18");
22276 case 61446:
22277 return java.awt.Toolkit.getProperty ("AWT.f19", "F19");
22278 case 61447:
22279 return java.awt.Toolkit.getProperty ("AWT.f20", "F20");
22280 case 61448:
22281 return java.awt.Toolkit.getProperty ("AWT.f21", "F21");
22282 case 61449:
22283 return java.awt.Toolkit.getProperty ("AWT.f22", "F22");
22284 case 61450:
22285 return java.awt.Toolkit.getProperty ("AWT.f23", "F23");
22286 case 61451:
22287 return java.awt.Toolkit.getProperty ("AWT.f24", "F24");
22288 case 154:
22289 return java.awt.Toolkit.getProperty ("AWT.printScreen", "Print Screen");
22290 case 155:
22291 return java.awt.Toolkit.getProperty ("AWT.insert", "Insert");
22292 case 156:
22293 return java.awt.Toolkit.getProperty ("AWT.help", "Help");
22294 case 192:
22295 return java.awt.Toolkit.getProperty ("AWT.backQuote", "Back Quote");
22296 case 222:
22297 return java.awt.Toolkit.getProperty ("AWT.quote", "Quote");
22298 case 224:
22299 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22300 case 225:
22301 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22302 case 226:
22303 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22304 case 227:
22305 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22306 case 128:
22307 return java.awt.Toolkit.getProperty ("AWT.deadGrave", "Dead Grave");
22308 case 129:
22309 return java.awt.Toolkit.getProperty ("AWT.deadAcute", "Dead Acute");
22310 case 130:
22311 return java.awt.Toolkit.getProperty ("AWT.deadCircumflex", "Dead Circumflex");
22312 case 131:
22313 return java.awt.Toolkit.getProperty ("AWT.deadTilde", "Dead Tilde");
22314 case 132:
22315 return java.awt.Toolkit.getProperty ("AWT.deadMacron", "Dead Macron");
22316 case 133:
22317 return java.awt.Toolkit.getProperty ("AWT.deadBreve", "Dead Breve");
22318 case 134:
22319 return java.awt.Toolkit.getProperty ("AWT.deadAboveDot", "Dead Above Dot");
22320 case 135:
22321 return java.awt.Toolkit.getProperty ("AWT.deadDiaeresis", "Dead Diaeresis");
22322 case 136:
22323 return java.awt.Toolkit.getProperty ("AWT.deadAboveRing", "Dead Above Ring");
22324 case 137:
22325 return java.awt.Toolkit.getProperty ("AWT.deadDoubleAcute", "Dead Double Acute");
22326 case 138:
22327 return java.awt.Toolkit.getProperty ("AWT.deadCaron", "Dead Caron");
22328 case 139:
22329 return java.awt.Toolkit.getProperty ("AWT.deadCedilla", "Dead Cedilla");
22330 case 140:
22331 return java.awt.Toolkit.getProperty ("AWT.deadOgonek", "Dead Ogonek");
22332 case 141:
22333 return java.awt.Toolkit.getProperty ("AWT.deadIota", "Dead Iota");
22334 case 142:
22335 return java.awt.Toolkit.getProperty ("AWT.deadVoicedSound", "Dead Voiced Sound");
22336 case 143:
22337 return java.awt.Toolkit.getProperty ("AWT.deadSemivoicedSound", "Dead Semivoiced Sound");
22338 case 150:
22339 return java.awt.Toolkit.getProperty ("AWT.ampersand", "Ampersand");
22340 case 151:
22341 return java.awt.Toolkit.getProperty ("AWT.asterisk", "Asterisk");
22342 case 152:
22343 return java.awt.Toolkit.getProperty ("AWT.quoteDbl", "Double Quote");
22344 case 153:
22345 return java.awt.Toolkit.getProperty ("AWT.Less", "Less");
22346 case 160:
22347 return java.awt.Toolkit.getProperty ("AWT.greater", "Greater");
22348 case 161:
22349 return java.awt.Toolkit.getProperty ("AWT.braceLeft", "Left Brace");
22350 case 162:
22351 return java.awt.Toolkit.getProperty ("AWT.braceRight", "Right Brace");
22352 case 512:
22353 return java.awt.Toolkit.getProperty ("AWT.at", "At");
22354 case 513:
22355 return java.awt.Toolkit.getProperty ("AWT.colon", "Colon");
22356 case 514:
22357 return java.awt.Toolkit.getProperty ("AWT.circumflex", "Circumflex");
22358 case 515:
22359 return java.awt.Toolkit.getProperty ("AWT.dollar", "Dollar");
22360 case 516:
22361 return java.awt.Toolkit.getProperty ("AWT.euro", "Euro");
22362 case 517:
22363 return java.awt.Toolkit.getProperty ("AWT.exclamationMark", "Exclamation Mark");
22364 case 518:
22365 return java.awt.Toolkit.getProperty ("AWT.invertedExclamationMark", "Inverted Exclamation Mark");
22366 case 519:
22367 return java.awt.Toolkit.getProperty ("AWT.leftParenthesis", "Left Parenthesis");
22368 case 520:
22369 return java.awt.Toolkit.getProperty ("AWT.numberSign", "Number Sign");
22370 case 45:
22371 return java.awt.Toolkit.getProperty ("AWT.minus", "Minus");
22372 case 521:
22373 return java.awt.Toolkit.getProperty ("AWT.plus", "Plus");
22374 case 522:
22375 return java.awt.Toolkit.getProperty ("AWT.rightParenthesis", "Right Parenthesis");
22376 case 523:
22377 return java.awt.Toolkit.getProperty ("AWT.underscore", "Underscore");
22378 case 24:
22379 return java.awt.Toolkit.getProperty ("AWT.final", "Final");
22380 case 28:
22381 return java.awt.Toolkit.getProperty ("AWT.convert", "Convert");
22382 case 29:
22383 return java.awt.Toolkit.getProperty ("AWT.noconvert", "No Convert");
22384 case 30:
22385 return java.awt.Toolkit.getProperty ("AWT.accept", "Accept");
22386 case 31:
22387 return java.awt.Toolkit.getProperty ("AWT.modechange", "Mode Change");
22388 case 21:
22389 return java.awt.Toolkit.getProperty ("AWT.kana", "Kana");
22390 case 25:
22391 return java.awt.Toolkit.getProperty ("AWT.kanji", "Kanji");
22392 case 240:
22393 return java.awt.Toolkit.getProperty ("AWT.alphanumeric", "Alphanumeric");
22394 case 241:
22395 return java.awt.Toolkit.getProperty ("AWT.katakana", "Katakana");
22396 case 242:
22397 return java.awt.Toolkit.getProperty ("AWT.hiragana", "Hiragana");
22398 case 243:
22399 return java.awt.Toolkit.getProperty ("AWT.fullWidth", "Full-Width");
22400 case 244:
22401 return java.awt.Toolkit.getProperty ("AWT.halfWidth", "Half-Width");
22402 case 245:
22403 return java.awt.Toolkit.getProperty ("AWT.romanCharacters", "Roman Characters");
22404 case 256:
22405 return java.awt.Toolkit.getProperty ("AWT.allCandidates", "All Candidates");
22406 case 257:
22407 return java.awt.Toolkit.getProperty ("AWT.previousCandidate", "Previous Candidate");
22408 case 258:
22409 return java.awt.Toolkit.getProperty ("AWT.codeInput", "Code Input");
22410 case 259:
22411 return java.awt.Toolkit.getProperty ("AWT.japaneseKatakana", "Japanese Katakana");
22412 case 260:
22413 return java.awt.Toolkit.getProperty ("AWT.japaneseHiragana", "Japanese Hiragana");
22414 case 261:
22415 return java.awt.Toolkit.getProperty ("AWT.japaneseRoman", "Japanese Roman");
22416 case 262:
22417 return java.awt.Toolkit.getProperty ("AWT.kanaLock", "Kana Lock");
22418 case 263:
22419 return java.awt.Toolkit.getProperty ("AWT.inputMethodOnOff", "Input Method On/Off");
22420 case 65481:
22421 return java.awt.Toolkit.getProperty ("AWT.again", "Again");
22422 case 65483:
22423 return java.awt.Toolkit.getProperty ("AWT.undo", "Undo");
22424 case 65485:
22425 return java.awt.Toolkit.getProperty ("AWT.copy", "Copy");
22426 case 65487:
22427 return java.awt.Toolkit.getProperty ("AWT.paste", "Paste");
22428 case 65489:
22429 return java.awt.Toolkit.getProperty ("AWT.cut", "Cut");
22430 case 65488:
22431 return java.awt.Toolkit.getProperty ("AWT.find", "Find");
22432 case 65482:
22433 return java.awt.Toolkit.getProperty ("AWT.props", "Props");
22434 case 65480:
22435 return java.awt.Toolkit.getProperty ("AWT.stop", "Stop");
22436 }
22437 if (keyCode >= 96 && keyCode <= 105) {
22438 var numpad = java.awt.Toolkit.getProperty ("AWT.numpad", "NumPad");
22439 var c = String.fromCharCode (keyCode - 96 + 48);
22440 return numpad + "-" + c;
22441 }var unknown = java.awt.Toolkit.getProperty ("AWT.unknown", "Unknown");
22442 return unknown + " keyCode: 0x" + Integer.toString (keyCode, 16);
22443 }, "~N");
22444 c$.getKeyModifiersText = Clazz_defineMethod (c$, "getKeyModifiersText", 
22445 function (modifiers) {
22446 var buf =  new StringBuilder ();
22447 if ((modifiers & 4) != 0) {
22448 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
22449 buf.append ("+");
22450 }if ((modifiers & 2) != 0) {
22451 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
22452 buf.append ("+");
22453 }if ((modifiers & 8) != 0) {
22454 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
22455 buf.append ("+");
22456 }if ((modifiers & 1) != 0) {
22457 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
22458 buf.append ("+");
22459 }if ((modifiers & 32) != 0) {
22460 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
22461 buf.append ("+");
22462 }if ((modifiers & 16) != 0) {
22463 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
22464 buf.append ("+");
22465 }if (buf.length () > 0) {
22466 buf.setLength (buf.length () - 1);
22467 }return buf.toString ();
22468 }, "~N");
22469 Clazz_defineMethod (c$, "isActionKey", 
22470 function () {
22471 switch (this.keyCode) {
22472 case 36:
22473 case 35:
22474 case 33:
22475 case 34:
22476 case 38:
22477 case 40:
22478 case 37:
22479 case 39:
22480 case 65368:
22481 case 226:
22482 case 224:
22483 case 227:
22484 case 225:
22485 case 112:
22486 case 113:
22487 case 114:
22488 case 115:
22489 case 116:
22490 case 117:
22491 case 118:
22492 case 119:
22493 case 120:
22494 case 121:
22495 case 122:
22496 case 123:
22497 case 61440:
22498 case 61441:
22499 case 61442:
22500 case 61443:
22501 case 61444:
22502 case 61445:
22503 case 61446:
22504 case 61447:
22505 case 61448:
22506 case 61449:
22507 case 61450:
22508 case 61451:
22509 case 154:
22510 case 145:
22511 case 20:
22512 case 144:
22513 case 19:
22514 case 155:
22515 case 24:
22516 case 28:
22517 case 29:
22518 case 30:
22519 case 31:
22520 case 21:
22521 case 25:
22522 case 240:
22523 case 241:
22524 case 242:
22525 case 243:
22526 case 244:
22527 case 245:
22528 case 256:
22529 case 257:
22530 case 258:
22531 case 259:
22532 case 260:
22533 case 261:
22534 case 262:
22535 case 263:
22536 case 65481:
22537 case 65483:
22538 case 65485:
22539 case 65487:
22540 case 65489:
22541 case 65488:
22542 case 65482:
22543 case 65480:
22544 case 156:
22545 case 524:
22546 case 525:
22547 return true;
22548 }
22549 return false;
22550 });
22551 Clazz_overrideMethod (c$, "paramString", 
22552 function () {
22553 var str =  new StringBuilder (100);
22554 switch (this.id) {
22555 case 401:
22556 str.append ("KEY_PRESSED");
22557 break;
22558 case 402:
22559 str.append ("KEY_RELEASED");
22560 break;
22561 case 400:
22562 str.append ("KEY_TYPED");
22563 break;
22564 default:
22565 str.append ("unknown type");
22566 break;
22567 }
22568 str.append (",keyCode=").append ("" + this.keyCode);
22569 str.append (",keyText=").append (java.awt.event.KeyEvent.getKeyText (this.keyCode));
22570 str.append (",keyChar=");
22571 switch (this.keyChar) {
22572 case '\b':
22573 str.append (java.awt.event.KeyEvent.getKeyText (8));
22574 break;
22575 case '\t':
22576 str.append (java.awt.event.KeyEvent.getKeyText (9));
22577 break;
22578 case '\n':
22579 str.append (java.awt.event.KeyEvent.getKeyText (10));
22580 break;
22581 case '\u0018':
22582 str.append (java.awt.event.KeyEvent.getKeyText (3));
22583 break;
22584 case '\u001b':
22585 str.append (java.awt.event.KeyEvent.getKeyText (27));
22586 break;
22587 case '\u007f':
22588 str.append (java.awt.event.KeyEvent.getKeyText (127));
22589 break;
22590 case '\uffff':
22591 str.append (java.awt.Toolkit.getProperty ("AWT.undefined", "Undefined"));
22592 str.append (" keyChar");
22593 break;
22594 default:
22595 str.append ("'").append (this.keyChar).append ("'");
22596 break;
22597 }
22598 if (this.getModifiers () != 0) {
22599 str.append (",modifiers=").append (java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers));
22600 }if (this.getModifiersEx () != 0) {
22601 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
22602 }str.append (",keyLocation=");
22603 switch (this.keyLocation) {
22604 case 0:
22605 str.append ("KEY_LOCATION_UNKNOWN");
22606 break;
22607 case 1:
22608 str.append ("KEY_LOCATION_STANDARD");
22609 break;
22610 case 2:
22611 str.append ("KEY_LOCATION_LEFT");
22612 break;
22613 case 3:
22614 str.append ("KEY_LOCATION_RIGHT");
22615 break;
22616 case 4:
22617 str.append ("KEY_LOCATION_NUMPAD");
22618 break;
22619 default:
22620 str.append ("KEY_LOCATION_UNKNOWN");
22621 break;
22622 }
22623 return str.toString ();
22624 });
22625 Clazz_defineMethod (c$, "setNewModifiers", 
22626  function () {
22627 if ((this.modifiers & 1) != 0) {
22628 this.modifiers |= 64;
22629 }if ((this.modifiers & 8) != 0) {
22630 this.modifiers |= 512;
22631 }if ((this.modifiers & 2) != 0) {
22632 this.modifiers |= 128;
22633 }if ((this.modifiers & 4) != 0) {
22634 this.modifiers |= 256;
22635 }if ((this.modifiers & 32) != 0) {
22636 this.modifiers |= 8192;
22637 }if ((this.modifiers & 16) != 0) {
22638 this.modifiers |= 1024;
22639 }});
22640 Clazz_defineMethod (c$, "setOldModifiers", 
22641  function () {
22642 if ((this.modifiers & 64) != 0) {
22643 this.modifiers |= 1;
22644 }if ((this.modifiers & 512) != 0) {
22645 this.modifiers |= 8;
22646 }if ((this.modifiers & 128) != 0) {
22647 this.modifiers |= 2;
22648 }if ((this.modifiers & 256) != 0) {
22649 this.modifiers |= 4;
22650 }if ((this.modifiers & 8192) != 0) {
22651 this.modifiers |= 32;
22652 }if ((this.modifiers & 1024) != 0) {
22653 this.modifiers |= 16;
22654 }});
22655 Clazz_defineStatics (c$,
22656 "KEY_FIRST", 400,
22657 "KEY_LAST", 402,
22658 "KEY_TYPED", 400,
22659 "KEY_PRESSED", 401,
22660 "KEY_RELEASED", 402,
22661 "VK_ENTER", '\n',
22662 "VK_BACK_SPACE", '\b',
22663 "VK_TAB", '\t',
22664 "VK_CANCEL", 0x03,
22665 "VK_CLEAR", 0x0C,
22666 "VK_SHIFT", 0x10,
22667 "VK_CONTROL", 0x11,
22668 "VK_ALT", 0x12,
22669 "VK_PAUSE", 0x13,
22670 "VK_CAPS_LOCK", 0x14,
22671 "VK_ESCAPE", 0x1B,
22672 "VK_SPACE", 0x20,
22673 "VK_PAGE_UP", 0x21,
22674 "VK_PAGE_DOWN", 0x22,
22675 "VK_END", 0x23,
22676 "VK_HOME", 0x24,
22677 "VK_LEFT", 0x25,
22678 "VK_UP", 0x26,
22679 "VK_RIGHT", 0x27,
22680 "VK_DOWN", 0x28,
22681 "VK_COMMA", 0x2C,
22682 "VK_MINUS", 0x2D,
22683 "VK_PERIOD", 0x2E,
22684 "VK_SLASH", 0x2F,
22685 "VK_0", 0x30,
22686 "VK_1", 0x31,
22687 "VK_2", 0x32,
22688 "VK_3", 0x33,
22689 "VK_4", 0x34,
22690 "VK_5", 0x35,
22691 "VK_6", 0x36,
22692 "VK_7", 0x37,
22693 "VK_8", 0x38,
22694 "VK_9", 0x39,
22695 "VK_SEMICOLON", 0x3B,
22696 "VK_EQUALS", 0x3D,
22697 "VK_A", 0x41,
22698 "VK_B", 0x42,
22699 "VK_C", 0x43,
22700 "VK_D", 0x44,
22701 "VK_E", 0x45,
22702 "VK_F", 0x46,
22703 "VK_G", 0x47,
22704 "VK_H", 0x48,
22705 "VK_I", 0x49,
22706 "VK_J", 0x4A,
22707 "VK_K", 0x4B,
22708 "VK_L", 0x4C,
22709 "VK_M", 0x4D,
22710 "VK_N", 0x4E,
22711 "VK_O", 0x4F,
22712 "VK_P", 0x50,
22713 "VK_Q", 0x51,
22714 "VK_R", 0x52,
22715 "VK_S", 0x53,
22716 "VK_T", 0x54,
22717 "VK_U", 0x55,
22718 "VK_V", 0x56,
22719 "VK_W", 0x57,
22720 "VK_X", 0x58,
22721 "VK_Y", 0x59,
22722 "VK_Z", 0x5A,
22723 "VK_OPEN_BRACKET", 0x5B,
22724 "VK_BACK_SLASH", 0x5C,
22725 "VK_CLOSE_BRACKET", 0x5D,
22726 "VK_NUMPAD0", 0x60,
22727 "VK_NUMPAD1", 0x61,
22728 "VK_NUMPAD2", 0x62,
22729 "VK_NUMPAD3", 0x63,
22730 "VK_NUMPAD4", 0x64,
22731 "VK_NUMPAD5", 0x65,
22732 "VK_NUMPAD6", 0x66,
22733 "VK_NUMPAD7", 0x67,
22734 "VK_NUMPAD8", 0x68,
22735 "VK_NUMPAD9", 0x69,
22736 "VK_MULTIPLY", 0x6A,
22737 "VK_ADD", 0x6B,
22738 "VK_SEPARATER", 0x6C,
22739 "VK_SEPARATOR", 108,
22740 "VK_SUBTRACT", 0x6D,
22741 "VK_DECIMAL", 0x6E,
22742 "VK_DIVIDE", 0x6F,
22743 "VK_DELETE", 0x7F,
22744 "VK_NUM_LOCK", 0x90,
22745 "VK_SCROLL_LOCK", 0x91,
22746 "VK_F1", 0x70,
22747 "VK_F2", 0x71,
22748 "VK_F3", 0x72,
22749 "VK_F4", 0x73,
22750 "VK_F5", 0x74,
22751 "VK_F6", 0x75,
22752 "VK_F7", 0x76,
22753 "VK_F8", 0x77,
22754 "VK_F9", 0x78,
22755 "VK_F10", 0x79,
22756 "VK_F11", 0x7A,
22757 "VK_F12", 0x7B,
22758 "VK_F13", 0xF000,
22759 "VK_F14", 0xF001,
22760 "VK_F15", 0xF002,
22761 "VK_F16", 0xF003,
22762 "VK_F17", 0xF004,
22763 "VK_F18", 0xF005,
22764 "VK_F19", 0xF006,
22765 "VK_F20", 0xF007,
22766 "VK_F21", 0xF008,
22767 "VK_F22", 0xF009,
22768 "VK_F23", 0xF00A,
22769 "VK_F24", 0xF00B,
22770 "VK_PRINTSCREEN", 0x9A,
22771 "VK_INSERT", 0x9B,
22772 "VK_HELP", 0x9C,
22773 "VK_META", 0x9D,
22774 "VK_BACK_QUOTE", 0xC0,
22775 "VK_QUOTE", 0xDE,
22776 "VK_KP_UP", 0xE0,
22777 "VK_KP_DOWN", 0xE1,
22778 "VK_KP_LEFT", 0xE2,
22779 "VK_KP_RIGHT", 0xE3,
22780 "VK_DEAD_GRAVE", 0x80,
22781 "VK_DEAD_ACUTE", 0x81,
22782 "VK_DEAD_CIRCUMFLEX", 0x82,
22783 "VK_DEAD_TILDE", 0x83,
22784 "VK_DEAD_MACRON", 0x84,
22785 "VK_DEAD_BREVE", 0x85,
22786 "VK_DEAD_ABOVEDOT", 0x86,
22787 "VK_DEAD_DIAERESIS", 0x87,
22788 "VK_DEAD_ABOVERING", 0x88,
22789 "VK_DEAD_DOUBLEACUTE", 0x89,
22790 "VK_DEAD_CARON", 0x8a,
22791 "VK_DEAD_CEDILLA", 0x8b,
22792 "VK_DEAD_OGONEK", 0x8c,
22793 "VK_DEAD_IOTA", 0x8d,
22794 "VK_DEAD_VOICED_SOUND", 0x8e,
22795 "VK_DEAD_SEMIVOICED_SOUND", 0x8f,
22796 "VK_AMPERSAND", 0x96,
22797 "VK_ASTERISK", 0x97,
22798 "VK_QUOTEDBL", 0x98,
22799 "VK_LESS", 0x99,
22800 "VK_GREATER", 0xa0,
22801 "VK_BRACELEFT", 0xa1,
22802 "VK_BRACERIGHT", 0xa2,
22803 "VK_AT", 0x0200,
22804 "VK_COLON", 0x0201,
22805 "VK_CIRCUMFLEX", 0x0202,
22806 "VK_DOLLAR", 0x0203,
22807 "VK_EURO_SIGN", 0x0204,
22808 "VK_EXCLAMATION_MARK", 0x0205,
22809 "VK_INVERTED_EXCLAMATION_MARK", 0x0206,
22810 "VK_LEFT_PARENTHESIS", 0x0207,
22811 "VK_NUMBER_SIGN", 0x0208,
22812 "VK_PLUS", 0x0209,
22813 "VK_RIGHT_PARENTHESIS", 0x020A,
22814 "VK_UNDERSCORE", 0x020B,
22815 "VK_WINDOWS", 0x020C,
22816 "VK_CONTEXT_MENU", 0x020D,
22817 "VK_FINAL", 0x0018,
22818 "VK_CONVERT", 0x001C,
22819 "VK_NONCONVERT", 0x001D,
22820 "VK_ACCEPT", 0x001E,
22821 "VK_MODECHANGE", 0x001F,
22822 "VK_KANA", 0x0015,
22823 "VK_KANJI", 0x0019,
22824 "VK_ALPHANUMERIC", 0x00F0,
22825 "VK_KATAKANA", 0x00F1,
22826 "VK_HIRAGANA", 0x00F2,
22827 "VK_FULL_WIDTH", 0x00F3,
22828 "VK_HALF_WIDTH", 0x00F4,
22829 "VK_ROMAN_CHARACTERS", 0x00F5,
22830 "VK_ALL_CANDIDATES", 0x0100,
22831 "VK_PREVIOUS_CANDIDATE", 0x0101,
22832 "VK_CODE_INPUT", 0x0102,
22833 "VK_JAPANESE_KATAKANA", 0x0103,
22834 "VK_JAPANESE_HIRAGANA", 0x0104,
22835 "VK_JAPANESE_ROMAN", 0x0105,
22836 "VK_KANA_LOCK", 0x0106,
22837 "VK_INPUT_METHOD_ON_OFF", 0x0107,
22838 "VK_CUT", 0xFFD1,
22839 "VK_COPY", 0xFFCD,
22840 "VK_PASTE", 0xFFCF,
22841 "VK_UNDO", 0xFFCB,
22842 "VK_AGAIN", 0xFFC9,
22843 "VK_FIND", 0xFFD0,
22844 "VK_PROPS", 0xFFCA,
22845 "VK_STOP", 0xFFC8,
22846 "VK_COMPOSE", 0xFF20,
22847 "VK_ALT_GRAPH", 0xFF7E,
22848 "VK_BEGIN", 0xFF58,
22849 "VK_UNDEFINED", 0x0,
22850 "CHAR_UNDEFINED", String.fromCharCode (0xFFFF),
22851 "KEY_LOCATION_UNKNOWN", 0,
22852 "KEY_LOCATION_STANDARD", 1,
22853 "KEY_LOCATION_LEFT", 2,
22854 "KEY_LOCATION_RIGHT", 3,
22855 "KEY_LOCATION_NUMPAD", 4);
22856 });
22857 Clazz_declarePackage ("java.awt.event");
22858 Clazz_load (["java.awt.event.MouseEvent"], "java.awt.event.MouseWheelEvent", null, function () {
22859 c$ = Clazz_decorateAsClass (function () {
22860 this.scrollType = 0;
22861 this.scrollAmount = 0;
22862 this.wheelRotation = 0;
22863 Clazz_instantialize (this, arguments);
22864 }, java.awt.event, "MouseWheelEvent", java.awt.event.MouseEvent);
22865 Clazz_makeConstructor (c$, 
22866 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22867 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation);
22868 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22869 Clazz_makeConstructor (c$, 
22870 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22871 Clazz_superConstructor (this, java.awt.event.MouseWheelEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
22872 this.scrollType = scrollType;
22873 this.scrollAmount = scrollAmount;
22874 this.wheelRotation = wheelRotation;
22875 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22876 Clazz_defineMethod (c$, "getScrollType", 
22877 function () {
22878 return this.scrollType;
22879 });
22880 Clazz_defineMethod (c$, "getScrollAmount", 
22881 function () {
22882 return this.scrollAmount;
22883 });
22884 Clazz_defineMethod (c$, "getWheelRotation", 
22885 function () {
22886 return this.wheelRotation;
22887 });
22888 Clazz_defineMethod (c$, "getUnitsToScroll", 
22889 function () {
22890 return this.scrollAmount * this.wheelRotation;
22891 });
22892 Clazz_defineMethod (c$, "paramString", 
22893 function () {
22894 var scrollTypeStr = null;
22895 if (this.getScrollType () == 0) {
22896 scrollTypeStr = "WHEEL_UNIT_SCROLL";
22897 } else if (this.getScrollType () == 1) {
22898 scrollTypeStr = "WHEEL_BLOCK_SCROLL";
22899 } else {
22900 scrollTypeStr = "unknown scroll type";
22901 }return Clazz_superCall (this, java.awt.event.MouseWheelEvent, "paramString", []) + ",scrollType=" + scrollTypeStr + ",scrollAmount=" + this.getScrollAmount () + ",wheelRotation=" + this.getWheelRotation ();
22902 });
22903 Clazz_defineStatics (c$,
22904 "WHEEL_UNIT_SCROLL", 0,
22905 "WHEEL_BLOCK_SCROLL", 1);
22906 });
22907 Clazz_declarePackage ("javax.swing");
22908 Clazz_load (["javax.swing.Action", "$.ArrayTable"], "javax.swing.AbstractAction", ["java.lang.Boolean", "javax.swing.event.SwingPropertyChangeSupport"], function () {
22909 c$ = Clazz_decorateAsClass (function () {
22910 this.enabled = true;
22911 this.arrayTable = null;
22912 this.changeSupport = null;
22913 Clazz_instantialize (this, arguments);
22914 }, javax.swing, "AbstractAction", null, [javax.swing.Action, Cloneable]);
22915 c$.shouldReconfigure = Clazz_defineMethod (c$, "shouldReconfigure", 
22916 function (e) {
22917 if (e.getPropertyName () == null) {
22918 javax.swing.AbstractAction.RECONFIGURE_ON_NULL = new Boolean (false);
22919 }return false;
22920 }, "java.beans.PropertyChangeEvent");
22921 c$.setEnabledFromAction = Clazz_defineMethod (c$, "setEnabledFromAction", 
22922 function (c, a) {
22923 c.setEnabled ((a != null) ? a.isEnabled () : true);
22924 }, "javax.swing.JComponent,javax.swing.Action");
22925 c$.setToolTipTextFromAction = Clazz_defineMethod (c$, "setToolTipTextFromAction", 
22926 function (c, a) {
22927 c.setToolTipText (a != null ? a.getValue ("ShortDescription") : null);
22928 }, "javax.swing.JComponent,javax.swing.Action");
22929 c$.hasSelectedKey = Clazz_defineMethod (c$, "hasSelectedKey", 
22930 function (a) {
22931 return (a != null && a.getValue ("SwingSelectedKey") != null);
22932 }, "javax.swing.Action");
22933 c$.isSelected = Clazz_defineMethod (c$, "isSelected", 
22934 function (a) {
22935 return Boolean.TRUE.equals (a.getValue ("SwingSelectedKey"));
22936 }, "javax.swing.Action");
22937 Clazz_makeConstructor (c$, 
22938 function () {
22939 });
22940 Clazz_makeConstructor (c$, 
22941 function (name) {
22942 this.putValue ("Name", name);
22943 }, "~S");
22944 Clazz_makeConstructor (c$, 
22945 function (name, icon) {
22946 this.construct (name);
22947 this.putValue ("SmallIcon", icon);
22948 }, "~S,javax.swing.Icon");
22949 Clazz_defineMethod (c$, "getValue", 
22950 function (key) {
22951 if (key === "enabled") {
22952 return this.enabled;
22953 }if (this.arrayTable == null) {
22954 return null;
22955 }return this.arrayTable.get (key);
22956 }, "~S");
22957 Clazz_overrideMethod (c$, "putValue", 
22958 function (key, newValue) {
22959 var oldValue = null;
22960 if (key === "enabled") {
22961 if (newValue == null || !(Clazz_instanceOf (newValue, Boolean))) {
22962 newValue = new Boolean (false);
22963 }oldValue = new Boolean (this.enabled);
22964 this.enabled = (newValue).booleanValue ();
22965 } else {
22966 if (this.arrayTable == null) {
22967 this.arrayTable =  new javax.swing.ArrayTable ();
22968 }if (this.arrayTable.containsKey (key)) oldValue = this.arrayTable.get (key);
22969 if (newValue == null) {
22970 this.arrayTable.remove (key);
22971 } else {
22972 this.arrayTable.put (key, newValue);
22973 }}this.firePropertyChange (key, oldValue, newValue);
22974 }, "~S,~O");
22975 Clazz_defineMethod (c$, "isEnabled", 
22976 function () {
22977 return this.enabled;
22978 });
22979 Clazz_overrideMethod (c$, "setEnabled", 
22980 function (newValue) {
22981 var oldValue = this.enabled;
22982 if (oldValue != newValue) {
22983 this.enabled = newValue;
22984 this.firePropertyChange ("enabled", Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
22985 }}, "~B");
22986 Clazz_defineMethod (c$, "getKeys", 
22987 function () {
22988 if (this.arrayTable == null) {
22989 return null;
22990 }var keys =  new Array (this.arrayTable.size ());
22991 this.arrayTable.getKeys (keys);
22992 return keys;
22993 });
22994 Clazz_defineMethod (c$, "firePropertyChange", 
22995 function (propertyName, oldValue, newValue) {
22996 if (this.changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
22997 return;
22998 }this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
22999 }, "~S,~O,~O");
23000 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
23001 function (listener) {
23002 if (this.changeSupport == null) {
23003 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
23004 }this.changeSupport.addPropertyChangeListener (listener);
23005 }, "java.beans.PropertyChangeListener");
23006 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
23007 function (listener) {
23008 if (this.changeSupport == null) {
23009 return;
23010 }this.changeSupport.removePropertyChangeListener (listener);
23011 }, "java.beans.PropertyChangeListener");
23012 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
23013 function () {
23014 if (this.changeSupport == null) {
23015 return  new Array (0);
23016 }return this.changeSupport.getPropertyChangeListeners ();
23017 });
23018 Clazz_defineMethod (c$, "clone", 
23019 function () {
23020 var newAction = Clazz_superCall (this, javax.swing.AbstractAction, "clone", []);
23021 {
23022 if (this.arrayTable != null) {
23023 newAction.arrayTable = this.arrayTable.clone ();
23024 }}return newAction;
23025 });
23026 Clazz_defineStatics (c$,
23027 "RECONFIGURE_ON_NULL", null);
23028 });
23029 Clazz_declarePackage ("javax.swing");
23030 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 () {
23031 c$ = Clazz_decorateAsClass (function () {
23032 this.model = null;
23033 this.text = "";
23034 this.margin = null;
23035 this.defaultMargin = null;
23036 this.defaultIcon = null;
23037 this.pressedIcon = null;
23038 this.disabledIcon = null;
23039 this.selectedIcon = null;
23040 this.disabledSelectedIcon = null;
23041 this.rolloverIcon = null;
23042 this.rolloverSelectedIcon = null;
23043 this.$paintBorder = true;
23044 this.paintFocus = true;
23045 this.rolloverEnabled = false;
23046 this.contentAreaFilled = true;
23047 this.verticalAlignment = 0;
23048 this.horizontalAlignment = 0;
23049 this.verticalTextPosition = 0;
23050 this.horizontalTextPosition = 11;
23051 this.iconTextGap = 4;
23052 this.mnemonic = 0;
23053 this.mnemonicIndex = -1;
23054 this.multiClickThreshhold = 0;
23055 this.borderPaintedSet = false;
23056 this.rolloverEnabledSet = false;
23057 this.iconTextGapSet = false;
23058 this.contentAreaFilledSet = false;
23059 this.$setLayout = false;
23060 this.defaultCapable = true;
23061 this.handler = null;
23062 this.changeListener = null;
23063 this.actionListener = null;
23064 this.itemListener = null;
23065 this.changeEvent = null;
23066 this.hideActionText = false;
23067 this.$action = null;
23068 this.actionPropertyChangeListener = null;
23069 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.ButtonChangeListener")) {
23070 javax.swing.AbstractButton.$AbstractButton$ButtonChangeListener$ ();
23071 }
23072 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.Handler")) {
23073 javax.swing.AbstractButton.$AbstractButton$Handler$ ();
23074 }
23075 Clazz_instantialize (this, arguments);
23076 }, javax.swing, "AbstractButton", javax.swing.JComponent, [java.awt.ItemSelectable, javax.swing.SwingConstants]);
23077 Clazz_defineMethod (c$, "setHideActionText", 
23078 function (hideActionText) {
23079 if (hideActionText != this.hideActionText) {
23080 this.hideActionText = hideActionText;
23081 if (this.getAction () != null) {
23082 this.setTextFromAction (this.getAction (), false);
23083 }this.firePropertyChangeBool ("hideActionText", !hideActionText, hideActionText);
23084 }}, "~B");
23085 Clazz_defineMethod (c$, "getHideActionText", 
23086 function () {
23087 return this.hideActionText;
23088 });
23089 Clazz_defineMethod (c$, "getText", 
23090 function () {
23091 return this.text;
23092 });
23093 Clazz_defineMethod (c$, "setText", 
23094 function (text) {
23095 var oldValue = this.text;
23096 this.text = text;
23097 this.firePropertyChangeObject ("text", oldValue, text);
23098 this.updateDisplayedMnemonicIndex (text, this.getMnemonic ());
23099 if (text == null || oldValue == null || !text.equals (oldValue)) {
23100 this.revalidate ();
23101 this.repaint ();
23102 }}, "~S");
23103 Clazz_defineMethod (c$, "isSelected", 
23104 function () {
23105 return this.model.isSelected ();
23106 });
23107 Clazz_defineMethod (c$, "setSelected", 
23108 function (b) {
23109 this.model.setSelected (b);
23110 }, "~B");
23111 Clazz_defineMethod (c$, "doClick", 
23112 function () {
23113 this.doClick (68);
23114 });
23115 Clazz_defineMethod (c$, "doClick", 
23116 function (pressTime) {
23117 }, "~N");
23118 Clazz_defineMethod (c$, "setMargin", 
23119 function (m) {
23120 if (Clazz_instanceOf (m, javax.swing.plaf.UIResource)) {
23121 this.defaultMargin = m;
23122 } else if (Clazz_instanceOf (this.margin, javax.swing.plaf.UIResource)) {
23123 this.defaultMargin = this.margin;
23124 }if (m == null && this.defaultMargin != null) {
23125 m = this.defaultMargin;
23126 }var old = this.margin;
23127 this.margin = m;
23128 this.firePropertyChangeObject ("margin", old, m);
23129 if (old == null || !old.equals (m)) {
23130 this.revalidate ();
23131 this.repaint ();
23132 }}, "java.awt.Insets");
23133 Clazz_defineMethod (c$, "getMargin", 
23134 function () {
23135 return (this.margin == null) ? null : this.margin.clone ();
23136 });
23137 Clazz_defineMethod (c$, "getIcon", 
23138 function () {
23139 return this.defaultIcon;
23140 });
23141 Clazz_defineMethod (c$, "setIcon", 
23142 function (defaultIcon) {
23143 var oldValue = this.defaultIcon;
23144 this.defaultIcon = defaultIcon;
23145 if (defaultIcon !== oldValue && (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource))) {
23146 this.disabledIcon = null;
23147 }this.firePropertyChangeObject ("icon", oldValue, defaultIcon);
23148 if (defaultIcon !== oldValue) {
23149 if (defaultIcon == null || oldValue == null || defaultIcon.getIconWidth () != oldValue.getIconWidth () || defaultIcon.getIconHeight () != oldValue.getIconHeight ()) {
23150 this.revalidate ();
23151 }this.repaint ();
23152 }}, "javax.swing.Icon");
23153 Clazz_defineMethod (c$, "getPressedIcon", 
23154 function () {
23155 return this.pressedIcon;
23156 });
23157 Clazz_defineMethod (c$, "setPressedIcon", 
23158 function (pressedIcon) {
23159 var oldValue = this.pressedIcon;
23160 this.pressedIcon = pressedIcon;
23161 this.firePropertyChangeObject ("pressedIcon", oldValue, pressedIcon);
23162 if (pressedIcon !== oldValue) {
23163 if (this.getModel ().isPressed ()) {
23164 this.repaint ();
23165 }}}, "javax.swing.Icon");
23166 Clazz_defineMethod (c$, "getSelectedIcon", 
23167 function () {
23168 return this.selectedIcon;
23169 });
23170 Clazz_defineMethod (c$, "setSelectedIcon", 
23171 function (selectedIcon) {
23172 var oldValue = this.selectedIcon;
23173 this.selectedIcon = selectedIcon;
23174 if (selectedIcon !== oldValue && Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23175 this.disabledSelectedIcon = null;
23176 }this.firePropertyChangeObject ("selectedIcon", oldValue, selectedIcon);
23177 if (selectedIcon !== oldValue) {
23178 if (this.isSelected ()) {
23179 this.repaint ();
23180 }}}, "javax.swing.Icon");
23181 Clazz_defineMethod (c$, "getRolloverIcon", 
23182 function () {
23183 return this.rolloverIcon;
23184 });
23185 Clazz_defineMethod (c$, "setRolloverIcon", 
23186 function (rolloverIcon) {
23187 var oldValue = this.rolloverIcon;
23188 this.rolloverIcon = rolloverIcon;
23189 this.firePropertyChangeObject ("rolloverIcon", oldValue, rolloverIcon);
23190 this.setRolloverEnabled (true);
23191 if (rolloverIcon !== oldValue) {
23192 this.repaint ();
23193 }}, "javax.swing.Icon");
23194 Clazz_defineMethod (c$, "getRolloverSelectedIcon", 
23195 function () {
23196 return this.rolloverSelectedIcon;
23197 });
23198 Clazz_defineMethod (c$, "setRolloverSelectedIcon", 
23199 function (rolloverSelectedIcon) {
23200 var oldValue = this.rolloverSelectedIcon;
23201 this.rolloverSelectedIcon = rolloverSelectedIcon;
23202 this.firePropertyChangeObject ("rolloverSelectedIcon", oldValue, rolloverSelectedIcon);
23203 this.setRolloverEnabled (true);
23204 if (rolloverSelectedIcon !== oldValue) {
23205 if (this.isSelected ()) {
23206 this.repaint ();
23207 }}}, "javax.swing.Icon");
23208 Clazz_defineMethod (c$, "getDisabledIcon", 
23209 function () {
23210 if (this.disabledIcon == null) {
23211 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.getIcon ());
23212 if (this.disabledIcon != null) {
23213 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
23214 }}return this.disabledIcon;
23215 });
23216 Clazz_defineMethod (c$, "setDisabledIcon", 
23217 function (disabledIcon) {
23218 var oldValue = this.disabledIcon;
23219 this.disabledIcon = disabledIcon;
23220 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
23221 if (disabledIcon !== oldValue) {
23222 if (!this.isEnabled ()) {
23223 this.repaint ();
23224 }}}, "javax.swing.Icon");
23225 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
23226 function () {
23227 if (this.disabledSelectedIcon == null) {
23228 if (this.selectedIcon != null) {
23229 this.disabledSelectedIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledSelectedIcon (this, this.getSelectedIcon ());
23230 } else {
23231 return this.getDisabledIcon ();
23232 }}return this.disabledSelectedIcon;
23233 });
23234 Clazz_defineMethod (c$, "setDisabledSelectedIcon", 
23235 function (disabledSelectedIcon) {
23236 var oldValue = this.disabledSelectedIcon;
23237 this.disabledSelectedIcon = disabledSelectedIcon;
23238 this.firePropertyChangeObject ("disabledSelectedIcon", oldValue, disabledSelectedIcon);
23239 if (disabledSelectedIcon !== oldValue) {
23240 if (disabledSelectedIcon == null || oldValue == null || disabledSelectedIcon.getIconWidth () != oldValue.getIconWidth () || disabledSelectedIcon.getIconHeight () != oldValue.getIconHeight ()) {
23241 this.revalidate ();
23242 }if (!this.isEnabled () && this.isSelected ()) {
23243 this.repaint ();
23244 }}}, "javax.swing.Icon");
23245 Clazz_defineMethod (c$, "getVerticalAlignment", 
23246 function () {
23247 return this.verticalAlignment;
23248 });
23249 Clazz_defineMethod (c$, "setVerticalAlignment", 
23250 function (alignment) {
23251 if (alignment == this.verticalAlignment) return;
23252 var oldValue = this.verticalAlignment;
23253 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
23254 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
23255 this.repaint ();
23256 }, "~N");
23257 Clazz_defineMethod (c$, "getHorizontalAlignment", 
23258 function () {
23259 return this.horizontalAlignment;
23260 });
23261 Clazz_defineMethod (c$, "setHorizontalAlignment", 
23262 function (alignment) {
23263 if (alignment == this.horizontalAlignment) return;
23264 var oldValue = this.horizontalAlignment;
23265 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
23266 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
23267 this.repaint ();
23268 }, "~N");
23269 Clazz_defineMethod (c$, "getVerticalTextPosition", 
23270 function () {
23271 return this.verticalTextPosition;
23272 });
23273 Clazz_defineMethod (c$, "setVerticalTextPosition", 
23274 function (textPosition) {
23275 if (textPosition == this.verticalTextPosition) return;
23276 var oldValue = this.verticalTextPosition;
23277 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
23278 this.firePropertyChangeInt ("verticalTextPosition", oldValue, this.verticalTextPosition);
23279 this.revalidate ();
23280 this.repaint ();
23281 }, "~N");
23282 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
23283 function () {
23284 return this.horizontalTextPosition;
23285 });
23286 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
23287 function (textPosition) {
23288 if (textPosition == this.horizontalTextPosition) return;
23289 var oldValue = this.horizontalTextPosition;
23290 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
23291 this.firePropertyChangeInt ("horizontalTextPosition", oldValue, this.horizontalTextPosition);
23292 this.revalidate ();
23293 this.repaint ();
23294 }, "~N");
23295 Clazz_defineMethod (c$, "getIconTextGap", 
23296 function () {
23297 return this.iconTextGap;
23298 });
23299 Clazz_defineMethod (c$, "setIconTextGap", 
23300 function (iconTextGap) {
23301 var oldValue = this.iconTextGap;
23302 this.iconTextGap = iconTextGap;
23303 this.iconTextGapSet = true;
23304 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
23305 if (iconTextGap != oldValue) {
23306 this.revalidate ();
23307 this.repaint ();
23308 }}, "~N");
23309 Clazz_defineMethod (c$, "checkHorizontalKey", 
23310 function (key, exception) {
23311 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
23312 return key;
23313 } else {
23314 throw  new IllegalArgumentException (exception);
23315 }}, "~N,~S");
23316 Clazz_defineMethod (c$, "checkVerticalKey", 
23317 function (key, exception) {
23318 if ((key == 1) || (key == 0) || (key == 3)) {
23319 return key;
23320 } else {
23321 throw  new IllegalArgumentException (exception);
23322 }}, "~N,~S");
23323 Clazz_defineMethod (c$, "removeNotify", 
23324 function () {
23325 Clazz_superCall (this, javax.swing.AbstractButton, "removeNotify", []);
23326 if (this.isRolloverEnabled ()) {
23327 this.getModel ().setRollover (false);
23328 }});
23329 Clazz_defineMethod (c$, "setActionCommand", 
23330 function (actionCommand) {
23331 this.getModel ().setActionCommand (actionCommand);
23332 }, "~S");
23333 Clazz_defineMethod (c$, "getActionCommand", 
23334 function () {
23335 var ac = this.getModel ().getActionCommand ();
23336 if (ac == null) {
23337 ac = this.getText ();
23338 }return ac;
23339 });
23340 Clazz_defineMethod (c$, "setAction", 
23341 function (a) {
23342 var oldValue = this.getAction ();
23343 if (this.$action == null || !this.$action.equals (a)) {
23344 this.$action = a;
23345 if (oldValue != null) {
23346 this.removeActionListener (oldValue);
23347 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
23348 this.actionPropertyChangeListener = null;
23349 }this.configurePropertiesFromAction (this.$action);
23350 if (this.$action != null) {
23351 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
23352 this.addActionListener (this.$action);
23353 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
23354 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
23355 }this.firePropertyChangeObject ("action", oldValue, this.$action);
23356 }}, "javax.swing.Action");
23357 Clazz_defineMethod (c$, "isListener", 
23358  function (c, a) {
23359 var isListener = false;
23360 var listeners = this.listenerList.getListenerList ();
23361 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23362 if (listeners[i] === c && listeners[i + 1] === a) {
23363 isListener = true;
23364 }}
23365 return isListener;
23366 }, "Class,java.awt.event.ActionListener");
23367 Clazz_defineMethod (c$, "getAction", 
23368 function () {
23369 return this.$action;
23370 });
23371 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
23372 function (a) {
23373 this.setMnemonicFromAction (a);
23374 this.setTextFromAction (a, false);
23375 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
23376 this.setIconFromAction (a);
23377 this.setActionCommandFromAction (a);
23378 javax.swing.AbstractAction.setEnabledFromAction (this, a);
23379 if (javax.swing.AbstractAction.hasSelectedKey (a) && this.shouldUpdateSelectedStateFromAction ()) {
23380 this.setSelectedFromAction (a);
23381 }this.setDisplayedMnemonicIndexFromAction (a, false);
23382 }, "javax.swing.Action");
23383 Clazz_overrideMethod (c$, "clientPropertyChanged", 
23384 function (key, oldValue, newValue) {
23385 if (key === "hideActionText") {
23386 var current = (Clazz_instanceOf (newValue, Boolean)) ? newValue : false;
23387 if (this.getHideActionText () != current) {
23388 this.setHideActionText (current);
23389 }}}, "~O,~O,~O");
23390 Clazz_defineMethod (c$, "shouldUpdateSelectedStateFromAction", 
23391 function () {
23392 return false;
23393 });
23394 Clazz_defineMethod (c$, "actionPropertyChanged", 
23395 function (action, propertyName) {
23396 if (propertyName === "Name") {
23397 this.setTextFromAction (action, true);
23398 } else if (propertyName === "enabled") {
23399 javax.swing.AbstractAction.setEnabledFromAction (this, action);
23400 } else if (propertyName === "ShortDescription") {
23401 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
23402 } else if (propertyName === "SmallIcon") {
23403 this.smallIconChanged (action);
23404 } else if (propertyName === "MnemonicKey") {
23405 this.setMnemonicFromAction (action);
23406 } else if (propertyName === "ActionCommandKey") {
23407 this.setActionCommandFromAction (action);
23408 } else if (propertyName === "SwingSelectedKey" && javax.swing.AbstractAction.hasSelectedKey (action) && this.shouldUpdateSelectedStateFromAction ()) {
23409 this.setSelectedFromAction (action);
23410 } else if (propertyName === "SwingDisplayedMnemonicIndexKey") {
23411 this.setDisplayedMnemonicIndexFromAction (action, true);
23412 } else if (propertyName === "SwingLargeIconKey") {
23413 this.largeIconChanged (action);
23414 }}, "javax.swing.Action,~S");
23415 Clazz_defineMethod (c$, "setDisplayedMnemonicIndexFromAction", 
23416  function (a, fromPropertyChange) {
23417 var iValue = (a == null) ? null : a.getValue ("SwingDisplayedMnemonicIndexKey");
23418 if (fromPropertyChange || iValue != null) {
23419 var value;
23420 if (iValue == null) {
23421 value = -1;
23422 } else {
23423 value = (iValue).intValue ();
23424 var text = this.getText ();
23425 if (text == null || value >= text.length) {
23426 value = -1;
23427 }}this.setDisplayedMnemonicIndex (value);
23428 }}, "javax.swing.Action,~B");
23429 Clazz_defineMethod (c$, "setMnemonicFromAction", 
23430  function (a) {
23431 var n = (a == null) ? null : a.getValue ("MnemonicKey");
23432 this.setMnemonic ((n == null) ? '\0' : n);
23433 }, "javax.swing.Action");
23434 Clazz_defineMethod (c$, "setTextFromAction", 
23435  function (a, propertyChange) {
23436 var hideText = this.getHideActionText ();
23437 if (!propertyChange) {
23438 this.setText ((a != null && !hideText) ? a.getValue ("Name") : null);
23439 } else if (!hideText) {
23440 this.setText (a.getValue ("Name"));
23441 }}, "javax.swing.Action,~B");
23442 Clazz_defineMethod (c$, "setIconFromAction", 
23443 function (a) {
23444 var icon = null;
23445 if (a != null) {
23446 icon = a.getValue ("SwingLargeIconKey");
23447 if (icon == null) {
23448 icon = a.getValue ("SmallIcon");
23449 }}this.setIcon (icon);
23450 }, "javax.swing.Action");
23451 Clazz_defineMethod (c$, "smallIconChanged", 
23452 function (a) {
23453 if (a.getValue ("SwingLargeIconKey") == null) {
23454 this.setIconFromAction (a);
23455 }}, "javax.swing.Action");
23456 Clazz_defineMethod (c$, "largeIconChanged", 
23457 function (a) {
23458 this.setIconFromAction (a);
23459 }, "javax.swing.Action");
23460 Clazz_defineMethod (c$, "setActionCommandFromAction", 
23461  function (a) {
23462 this.setActionCommand ((a != null) ? a.getValue ("ActionCommandKey") : null);
23463 }, "javax.swing.Action");
23464 Clazz_defineMethod (c$, "setSelectedFromAction", 
23465  function (a) {
23466 var selected = false;
23467 if (a != null) {
23468 selected = javax.swing.AbstractAction.isSelected (a);
23469 }if (selected != this.isSelected ()) {
23470 this.setSelected (selected);
23471 if (!selected && this.isSelected ()) {
23472 if (Clazz_instanceOf (this.getModel (), javax.swing.DefaultButtonModel)) {
23473 var group = (this.getModel ()).getGroup ();
23474 if (group != null) {
23475 group.clearSelection ();
23476 }}}}}, "javax.swing.Action");
23477 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
23478 function (a) {
23479 return this.createActionPropertyChangeListener0 (a);
23480 }, "javax.swing.Action");
23481 Clazz_defineMethod (c$, "createActionPropertyChangeListener0", 
23482 function (a) {
23483 return  new javax.swing.AbstractButton.ButtonActionPropertyChangeListener (this, a);
23484 }, "javax.swing.Action");
23485 Clazz_defineMethod (c$, "isBorderPainted", 
23486 function () {
23487 return this.$paintBorder;
23488 });
23489 Clazz_defineMethod (c$, "setBorderPainted", 
23490 function (b) {
23491 var oldValue = this.$paintBorder;
23492 this.$paintBorder = b;
23493 this.borderPaintedSet = true;
23494 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
23495 if (b != oldValue) {
23496 this.revalidate ();
23497 this.repaint ();
23498 }}, "~B");
23499 Clazz_defineMethod (c$, "paintBorder", 
23500 function (g) {
23501 if (this.isBorderPainted ()) {
23502 Clazz_superCall (this, javax.swing.AbstractButton, "paintBorder", [g]);
23503 }}, "java.awt.Graphics");
23504 Clazz_defineMethod (c$, "isFocusPainted", 
23505 function () {
23506 return this.paintFocus;
23507 });
23508 Clazz_defineMethod (c$, "setFocusPainted", 
23509 function (b) {
23510 var oldValue = this.paintFocus;
23511 this.paintFocus = b;
23512 this.firePropertyChangeBool ("focusPainted", oldValue, this.paintFocus);
23513 if (b != oldValue && this.isFocusOwner ()) {
23514 this.revalidate ();
23515 this.repaint ();
23516 }}, "~B");
23517 Clazz_defineMethod (c$, "isContentAreaFilled", 
23518 function () {
23519 return this.contentAreaFilled;
23520 });
23521 Clazz_defineMethod (c$, "setContentAreaFilled", 
23522 function (b) {
23523 var oldValue = this.contentAreaFilled;
23524 this.contentAreaFilled = b;
23525 this.contentAreaFilledSet = true;
23526 this.firePropertyChangeBool ("contentAreaFilled", oldValue, this.contentAreaFilled);
23527 if (b != oldValue) {
23528 this.repaint ();
23529 }}, "~B");
23530 Clazz_defineMethod (c$, "isRolloverEnabled", 
23531 function () {
23532 return this.rolloverEnabled;
23533 });
23534 Clazz_defineMethod (c$, "setRolloverEnabled", 
23535 function (b) {
23536 var oldValue = this.rolloverEnabled;
23537 this.rolloverEnabled = b;
23538 this.rolloverEnabledSet = true;
23539 this.firePropertyChangeBool ("rolloverEnabled", oldValue, this.rolloverEnabled);
23540 if (b != oldValue) {
23541 this.repaint ();
23542 }}, "~B");
23543 Clazz_defineMethod (c$, "getMnemonic", 
23544 function () {
23545 return this.mnemonic;
23546 });
23547 Clazz_defineMethod (c$, "setMnemonic", 
23548 function (mnemonic) {
23549 this.model.setMnemonic (mnemonic);
23550 this.updateMnemonicProperties ();
23551 }, "~N");
23552 Clazz_defineMethod (c$, "setMnemonic", 
23553 function (mnemonic) {
23554 var vk = (mnemonic).charCodeAt (0);
23555 if (vk >= 97 && vk <= 122) vk -= (32);
23556 this.setMnemonic (vk);
23557 }, "~S");
23558 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
23559 function (index) {
23560 var oldValue = this.mnemonicIndex;
23561 if (index == -1) {
23562 this.mnemonicIndex = -1;
23563 } else {
23564 var text = this.getText ();
23565 var textLength = (text == null) ? 0 : text.length;
23566 if (index < -1 || index >= textLength) {
23567 throw  new IllegalArgumentException ("index == " + index);
23568 }}this.mnemonicIndex = index;
23569 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
23570 if (index != oldValue) {
23571 this.revalidate ();
23572 this.repaint ();
23573 }}, "~N");
23574 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
23575 function () {
23576 return this.mnemonicIndex;
23577 });
23578 Clazz_defineMethod (c$, "updateDisplayedMnemonicIndex", 
23579  function (text, mnemonic) {
23580 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, mnemonic));
23581 }, "~S,~N");
23582 Clazz_defineMethod (c$, "updateMnemonicProperties", 
23583  function () {
23584 var newMnemonic = this.model.getMnemonic ();
23585 if (this.mnemonic != newMnemonic) {
23586 var oldValue = this.mnemonic;
23587 this.mnemonic = newMnemonic;
23588 this.firePropertyChangeInt ("mnemonic", oldValue, this.mnemonic);
23589 this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23590 this.revalidate ();
23591 this.repaint ();
23592 }});
23593 Clazz_defineMethod (c$, "setMultiClickThreshhold", 
23594 function (threshhold) {
23595 if (threshhold < 0) {
23596 throw  new IllegalArgumentException ("threshhold must be >= 0");
23597 }this.multiClickThreshhold = threshhold;
23598 }, "~N");
23599 Clazz_defineMethod (c$, "getMultiClickThreshhold", 
23600 function () {
23601 return this.multiClickThreshhold;
23602 });
23603 Clazz_defineMethod (c$, "getModel", 
23604 function () {
23605 return this.model;
23606 });
23607 Clazz_defineMethod (c$, "setModel", 
23608 function (newModel) {
23609 var oldModel = this.getModel ();
23610 if (oldModel != null) {
23611 oldModel.removeChangeListener (this.changeListener);
23612 oldModel.removeActionListener (this.actionListener);
23613 oldModel.removeItemListener (this.itemListener);
23614 this.changeListener = null;
23615 this.actionListener = null;
23616 this.itemListener = null;
23617 }this.model = newModel;
23618 if (newModel != null) {
23619 this.changeListener = this.createChangeListener ();
23620 this.actionListener = this.createActionListener ();
23621 this.itemListener = this.createItemListener ();
23622 newModel.addChangeListener (this.changeListener);
23623 newModel.addActionListener (this.actionListener);
23624 newModel.addItemListener (this.itemListener);
23625 this.updateMnemonicProperties ();
23626 Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [newModel.isEnabled ()]);
23627 } else {
23628 this.mnemonic = 0;
23629 }this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23630 this.firePropertyChangeObject ("model", oldModel, newModel);
23631 if (newModel !== oldModel) {
23632 this.revalidate ();
23633 this.repaint ();
23634 }}, "javax.swing.ButtonModel");
23635 Clazz_overrideMethod (c$, "getUI", 
23636 function () {
23637 return this.ui;
23638 });
23639 Clazz_defineMethod (c$, "setUI", 
23640 function (ui) {
23641 Clazz_superCall (this, javax.swing.AbstractButton, "setUI", [ui]);
23642 if (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource)) {
23643 this.setDisabledIcon (null);
23644 }if (Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23645 this.setDisabledSelectedIcon (null);
23646 }}, "javax.swing.plaf.ButtonUI");
23647 Clazz_overrideMethod (c$, "updateUI", 
23648 function () {
23649 });
23650 Clazz_overrideMethod (c$, "addImpl", 
23651 function (comp, constraints, index) {
23652 if (!this.$setLayout) {
23653 this.setLayout ( new javax.swing.OverlayLayout (this));
23654 }return this.addImplSAEM (comp, constraints, index);
23655 }, "java.awt.Component,~O,~N");
23656 Clazz_defineMethod (c$, "setLayout", 
23657 function (mgr) {
23658 this.$setLayout = true;
23659 Clazz_superCall (this, javax.swing.AbstractButton, "setLayout", [mgr]);
23660 }, "java.awt.LayoutManager");
23661 Clazz_defineMethod (c$, "addChangeListener", 
23662 function (l) {
23663 this.listenerList.add (javax.swing.event.ChangeListener, l);
23664 }, "javax.swing.event.ChangeListener");
23665 Clazz_defineMethod (c$, "removeChangeListener", 
23666 function (l) {
23667 this.listenerList.remove (javax.swing.event.ChangeListener, l);
23668 }, "javax.swing.event.ChangeListener");
23669 Clazz_defineMethod (c$, "getChangeListeners", 
23670 function () {
23671 return (this.listenerList.getListeners (javax.swing.event.ChangeListener));
23672 });
23673 Clazz_defineMethod (c$, "fireStateChanged", 
23674 function () {
23675 var listeners = this.listenerList.getListenerList ();
23676 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23677 if (listeners[i] === javax.swing.event.ChangeListener) {
23678 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
23679 (listeners[i + 1]).stateChanged (this.changeEvent);
23680 }}
23681 });
23682 Clazz_defineMethod (c$, "addActionListener", 
23683 function (l) {
23684 this.listenerList.add (java.awt.event.ActionListener, l);
23685 }, "java.awt.event.ActionListener");
23686 Clazz_defineMethod (c$, "removeActionListener", 
23687 function (l) {
23688 if ((l != null) && (this.getAction () === l)) {
23689 this.setAction (null);
23690 } else {
23691 this.listenerList.remove (java.awt.event.ActionListener, l);
23692 }}, "java.awt.event.ActionListener");
23693 Clazz_defineMethod (c$, "getActionListeners", 
23694 function () {
23695 return (this.listenerList.getListeners (java.awt.event.ActionListener));
23696 });
23697 Clazz_defineMethod (c$, "createChangeListener", 
23698 function () {
23699 return this.getHandler ();
23700 });
23701 Clazz_defineMethod (c$, "fireActionPerformed", 
23702 function (event) {
23703 var listeners = this.listenerList.getListenerList ();
23704 var e = null;
23705 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23706 if (listeners[i] === java.awt.event.ActionListener) {
23707 if (e == null) {
23708 var actionCommand = event.getActionCommand ();
23709 if (actionCommand == null) {
23710 actionCommand = this.getActionCommand ();
23711 }e =  new java.awt.event.ActionEvent (this, 1001, actionCommand, event.getWhen (), event.getModifiers ());
23712 }(listeners[i + 1]).actionPerformed (e);
23713 }}
23714 }, "java.awt.event.ActionEvent");
23715 Clazz_defineMethod (c$, "fireItemStateChanged", 
23716 function (event) {
23717 var listeners = this.listenerList.getListenerList ();
23718 var e = null;
23719 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23720 if (listeners[i] === java.awt.event.ItemListener) {
23721 if (e == null) {
23722 e =  new java.awt.event.ItemEvent (this, 701, this, event.getStateChange ());
23723 }(listeners[i + 1]).itemStateChanged (e);
23724 }}
23725 }, "java.awt.event.ItemEvent");
23726 Clazz_defineMethod (c$, "createActionListener", 
23727 function () {
23728 return this.getHandler ();
23729 });
23730 Clazz_defineMethod (c$, "createItemListener", 
23731 function () {
23732 return this.getHandler ();
23733 });
23734 Clazz_defineMethod (c$, "setEnabled", 
23735 function (b) {
23736 if (!b && this.model.isRollover ()) {
23737 this.model.setRollover (false);
23738 }Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [b]);
23739 this.model.setEnabled (b);
23740 }, "~B");
23741 Clazz_defineMethod (c$, "getLabel", 
23742 function () {
23743 return this.getText ();
23744 });
23745 Clazz_defineMethod (c$, "setLabel", 
23746 function (label) {
23747 this.setText (label);
23748 }, "~S");
23749 Clazz_overrideMethod (c$, "addItemListener", 
23750 function (l) {
23751 this.listenerList.add (java.awt.event.ItemListener, l);
23752 }, "java.awt.event.ItemListener");
23753 Clazz_overrideMethod (c$, "removeItemListener", 
23754 function (l) {
23755 this.listenerList.remove (java.awt.event.ItemListener, l);
23756 }, "java.awt.event.ItemListener");
23757 Clazz_defineMethod (c$, "getItemListeners", 
23758 function () {
23759 return this.listenerList.getListeners (java.awt.event.ItemListener);
23760 });
23761 Clazz_overrideMethod (c$, "getSelectedObjects", 
23762 function () {
23763 if (this.isSelected () == false) {
23764 return null;
23765 }var selectedObjects =  new Array (1);
23766 selectedObjects[0] = this.getText ();
23767 return selectedObjects;
23768 });
23769 Clazz_defineMethod (c$, "init", 
23770 function (text, icon) {
23771 if (text != null) {
23772 this.setText (text);
23773 }if (icon != null) {
23774 this.setIcon (icon);
23775 }this.updateUI ();
23776 this.setAlignmentX (0.0);
23777 this.setAlignmentY (0.5);
23778 }, "~S,javax.swing.Icon");
23779 Clazz_defineMethod (c$, "imageUpdate", 
23780 function (img, infoflags, x, y, w, h) {
23781 var iconDisplayed = this.getIcon ();
23782 if (iconDisplayed == null) {
23783 return false;
23784 }if (!this.model.isEnabled ()) {
23785 if (this.model.isSelected ()) {
23786 iconDisplayed = this.getDisabledSelectedIcon ();
23787 } else {
23788 iconDisplayed = this.getDisabledIcon ();
23789 }} else if (this.model.isPressed () && this.model.isArmed ()) {
23790 iconDisplayed = this.getPressedIcon ();
23791 } else if (this.isRolloverEnabled () && this.model.isRollover ()) {
23792 if (this.model.isSelected ()) {
23793 iconDisplayed = this.getRolloverSelectedIcon ();
23794 } else {
23795 iconDisplayed = this.getRolloverIcon ();
23796 }} else if (this.model.isSelected ()) {
23797 iconDisplayed = this.getSelectedIcon ();
23798 }if (!javax.swing.SwingUtilities.doesIconReferenceImage (iconDisplayed, img)) {
23799 return false;
23800 }return Clazz_superCall (this, javax.swing.AbstractButton, "imageUpdate", [img, infoflags, x, y, w, h]);
23801 }, "java.awt.Image,~N,~N,~N,~N,~N");
23802 Clazz_defineMethod (c$, "setUIProperty", 
23803 function (propertyName, value) {
23804 if (propertyName === "borderPainted") {
23805 if (!this.borderPaintedSet) {
23806 this.setBorderPainted ((value).booleanValue ());
23807 this.borderPaintedSet = false;
23808 }} else if (propertyName === "rolloverEnabled") {
23809 if (!this.rolloverEnabledSet) {
23810 this.setRolloverEnabled ((value).booleanValue ());
23811 this.rolloverEnabledSet = false;
23812 }} else if (propertyName === "iconTextGap") {
23813 if (!this.iconTextGapSet) {
23814 this.setIconTextGap ((value).intValue ());
23815 this.iconTextGapSet = false;
23816 }} else if (propertyName === "contentAreaFilled") {
23817 if (!this.contentAreaFilledSet) {
23818 this.setContentAreaFilled ((value).booleanValue ());
23819 this.contentAreaFilledSet = false;
23820 }} else {
23821 Clazz_superCall (this, javax.swing.AbstractButton, "setUIProperty", [propertyName, value]);
23822 }}, "~S,~O");
23823 Clazz_defineMethod (c$, "paramString", 
23824 function () {
23825 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
23826 var pressedIconString = ((this.pressedIcon != null) && (this.pressedIcon !== this) ? this.pressedIcon.toString () : "");
23827 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
23828 var selectedIconString = ((this.selectedIcon != null) && (this.selectedIcon !== this) ? this.selectedIcon.toString () : "");
23829 var disabledSelectedIconString = ((this.disabledSelectedIcon != null) && (this.disabledSelectedIcon !== this) ? this.disabledSelectedIcon.toString () : "");
23830 var rolloverIconString = ((this.rolloverIcon != null) && (this.rolloverIcon !== this) ? this.rolloverIcon.toString () : "");
23831 var rolloverSelectedIconString = ((this.rolloverSelectedIcon != null) && (this.rolloverSelectedIcon !== this) ? this.rolloverSelectedIcon.toString () : "");
23832 var paintBorderString = (this.$paintBorder ? "true" : "false");
23833 var paintFocusString = (this.paintFocus ? "true" : "false");
23834 var rolloverEnabledString = (this.rolloverEnabled ? "true" : "false");
23835 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;
23836 });
23837 Clazz_defineMethod (c$, "getHandler", 
23838  function () {
23839 if (this.handler == null) {
23840 this.handler = Clazz_innerTypeInstance (javax.swing.AbstractButton.Handler, this, null);
23841 }return this.handler;
23842 });
23843 c$.$AbstractButton$ButtonChangeListener$ = function () {
23844 Clazz_pu$h(self.c$);
23845 c$ = Clazz_decorateAsClass (function () {
23846 Clazz_prepareCallback (this, arguments);
23847 Clazz_instantialize (this, arguments);
23848 }, javax.swing.AbstractButton, "ButtonChangeListener", null, javax.swing.event.ChangeListener);
23849 Clazz_makeConstructor (c$, 
23850 function () {
23851 });
23852 Clazz_overrideMethod (c$, "stateChanged", 
23853 function (a) {
23854 this.b$["javax.swing.AbstractButton"].getHandler ().stateChanged (a);
23855 }, "javax.swing.event.ChangeEvent");
23856 c$ = Clazz_p0p ();
23857 };
23858 c$.$AbstractButton$Handler$ = function () {
23859 Clazz_pu$h(self.c$);
23860 c$ = Clazz_decorateAsClass (function () {
23861 Clazz_prepareCallback (this, arguments);
23862 Clazz_instantialize (this, arguments);
23863 }, javax.swing.AbstractButton, "Handler", null, [java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.awt.event.ItemListener]);
23864 Clazz_overrideMethod (c$, "stateChanged", 
23865 function (a) {
23866 this.b$["javax.swing.AbstractButton"].updateMnemonicProperties ();
23867 if (this.b$["javax.swing.AbstractButton"].isEnabled () != this.b$["javax.swing.AbstractButton"].model.isEnabled ()) {
23868 this.b$["javax.swing.AbstractButton"].setEnabled (this.b$["javax.swing.AbstractButton"].model.isEnabled ());
23869 }this.b$["javax.swing.AbstractButton"].fireStateChanged ();
23870 this.b$["javax.swing.AbstractButton"].repaint ();
23871 }, "javax.swing.event.ChangeEvent");
23872 Clazz_overrideMethod (c$, "actionPerformed", 
23873 function (a) {
23874 this.b$["javax.swing.AbstractButton"].fireActionPerformed (a);
23875 }, "java.awt.event.ActionEvent");
23876 Clazz_overrideMethod (c$, "itemStateChanged", 
23877 function (a) {
23878 this.b$["javax.swing.AbstractButton"].fireItemStateChanged (a);
23879 if (this.b$["javax.swing.AbstractButton"].shouldUpdateSelectedStateFromAction ()) {
23880 var b = this.b$["javax.swing.AbstractButton"].getAction ();
23881 if (b != null && javax.swing.AbstractAction.hasSelectedKey (b)) {
23882 var c = this.b$["javax.swing.AbstractButton"].isSelected ();
23883 var d = javax.swing.AbstractAction.isSelected (b);
23884 if (d != c) {
23885 b.putValue ("SwingSelectedKey", new Boolean (c));
23886 }}}}, "java.awt.event.ItemEvent");
23887 c$ = Clazz_p0p ();
23888 };
23889 Clazz_pu$h(self.c$);
23890 c$ = Clazz_declareType (javax.swing.AbstractButton, "ButtonActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
23891 Clazz_overrideMethod (c$, "actionPropertyChanged", 
23892 function (a, b, c) {
23893 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
23894 a.configurePropertiesFromAction (b);
23895 } else {
23896 a.actionPropertyChanged (b, c.getPropertyName ());
23897 }}, "javax.swing.AbstractButton,javax.swing.Action,java.beans.PropertyChangeEvent");
23898 c$ = Clazz_p0p ();
23899 Clazz_defineStatics (c$,
23900 "MODEL_CHANGED_PROPERTY", "model",
23901 "TEXT_CHANGED_PROPERTY", "text",
23902 "MNEMONIC_CHANGED_PROPERTY", "mnemonic",
23903 "MARGIN_CHANGED_PROPERTY", "margin",
23904 "VERTICAL_ALIGNMENT_CHANGED_PROPERTY", "verticalAlignment",
23905 "HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY", "horizontalAlignment",
23906 "VERTICAL_TEXT_POSITION_CHANGED_PROPERTY", "verticalTextPosition",
23907 "HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY", "horizontalTextPosition",
23908 "BORDER_PAINTED_CHANGED_PROPERTY", "borderPainted",
23909 "FOCUS_PAINTED_CHANGED_PROPERTY", "focusPainted",
23910 "ROLLOVER_ENABLED_CHANGED_PROPERTY", "rolloverEnabled",
23911 "CONTENT_AREA_FILLED_CHANGED_PROPERTY", "contentAreaFilled",
23912 "ICON_CHANGED_PROPERTY", "icon",
23913 "PRESSED_ICON_CHANGED_PROPERTY", "pressedIcon",
23914 "SELECTED_ICON_CHANGED_PROPERTY", "selectedIcon",
23915 "ROLLOVER_ICON_CHANGED_PROPERTY", "rolloverIcon",
23916 "ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY", "rolloverSelectedIcon",
23917 "DISABLED_ICON_CHANGED_PROPERTY", "disabledIcon",
23918 "DISABLED_SELECTED_ICON_CHANGED_PROPERTY", "disabledSelectedIcon");
23919 });
23920 Clazz_declarePackage ("javax.swing");
23921 Clazz_load (null, "javax.swing.ArrayTable", ["java.util.Hashtable"], function () {
23922 c$ = Clazz_decorateAsClass (function () {
23923 this.table = null;
23924 Clazz_instantialize (this, arguments);
23925 }, javax.swing, "ArrayTable", null, Cloneable);
23926 Clazz_makeConstructor (c$, 
23927 function () {
23928 });
23929 Clazz_defineMethod (c$, "put", 
23930 function (key, value) {
23931 if (this.table == null) {
23932 this.table =  Clazz_newArray (-1, [key, value]);
23933 } else {
23934 var size = this.size ();
23935 if (size < 8) {
23936 if (this.containsKey (key)) {
23937 var tmp = this.table;
23938 for (var i = 0; i < tmp.length - 1; i += 2) {
23939 if (tmp[i].equals (key)) {
23940 tmp[i + 1] = value;
23941 break;
23942 }}
23943 } else {
23944 var array = this.table;
23945 var i = array.length;
23946 var tmp =  new Array (i + 2);
23947 System.arraycopy (array, 0, tmp, 0, i);
23948 tmp[i] = key;
23949 tmp[i + 1] = value;
23950 this.table = tmp;
23951 }} else {
23952 if ((size == 8) && this.isArray ()) {
23953 this.grow ();
23954 }(this.table).put (key, value);
23955 }}}, "~O,~O");
23956 Clazz_defineMethod (c$, "get", 
23957 function (key) {
23958 var value = null;
23959 if (this.table != null) {
23960 if (this.isArray ()) {
23961 var array = this.table;
23962 for (var i = 0; i < array.length - 1; i += 2) {
23963 if (array[i].equals (key)) {
23964 value = array[i + 1];
23965 break;
23966 }}
23967 } else {
23968 value = (this.table).get (key);
23969 }}return value;
23970 }, "~O");
23971 Clazz_defineMethod (c$, "size", 
23972 function () {
23973 var size;
23974 if (this.table == null) return 0;
23975 if (this.isArray ()) {
23976 size = Clazz_doubleToInt ((this.table).length / 2);
23977 } else {
23978 size = (this.table).size ();
23979 }return size;
23980 });
23981 Clazz_defineMethod (c$, "containsKey", 
23982 function (key) {
23983 var contains = false;
23984 if (this.table != null) {
23985 if (this.isArray ()) {
23986 var array = this.table;
23987 for (var i = 0; i < array.length - 1; i += 2) {
23988 if (array[i].equals (key)) {
23989 contains = true;
23990 break;
23991 }}
23992 } else {
23993 contains = (this.table).containsKey (key);
23994 }}return contains;
23995 }, "~O");
23996 Clazz_defineMethod (c$, "remove", 
23997 function (key) {
23998 var value = null;
23999 if (key == null) {
24000 return null;
24001 }if (this.table != null) {
24002 if (this.isArray ()) {
24003 var index = -1;
24004 var array = this.table;
24005 for (var i = array.length - 2; i >= 0; i -= 2) {
24006 if (array[i].equals (key)) {
24007 index = i;
24008 value = array[i + 1];
24009 break;
24010 }}
24011 if (index != -1) {
24012 var tmp =  new Array (array.length - 2);
24013 System.arraycopy (array, 0, tmp, 0, index);
24014 if (index < tmp.length) System.arraycopy (array, index + 2, tmp, index, tmp.length - index);
24015 this.table = (tmp.length == 0) ? null : tmp;
24016 }} else {
24017 value = (this.table).remove (key);
24018 }if (this.size () == 7 && !this.isArray ()) {
24019 this.shrink ();
24020 }}return value;
24021 }, "~O");
24022 Clazz_defineMethod (c$, "clear", 
24023 function () {
24024 this.table = null;
24025 });
24026 Clazz_overrideMethod (c$, "clone", 
24027 function () {
24028 var newArrayTable =  new javax.swing.ArrayTable ();
24029 if (this.isArray ()) {
24030 var array = this.table;
24031 for (var i = 0; i < array.length - 1; i += 2) {
24032 newArrayTable.put (array[i], array[i + 1]);
24033 }
24034 } else {
24035 var tmp = this.table;
24036 var keys = tmp.keys ();
24037 while (keys.hasMoreElements ()) {
24038 var o = keys.nextElement ();
24039 newArrayTable.put (o, tmp.get (o));
24040 }
24041 }return newArrayTable;
24042 });
24043 Clazz_defineMethod (c$, "getKeys", 
24044 function (keys) {
24045 if (this.table == null) {
24046 return null;
24047 }if (this.isArray ()) {
24048 var array = this.table;
24049 if (keys == null) {
24050 keys =  new Array (Clazz_doubleToInt (array.length / 2));
24051 }for (var i = 0, index = 0; i < array.length - 1; i += 2, index++) {
24052 keys[index] = array[i];
24053 }
24054 } else {
24055 var tmp = this.table;
24056 var enum_ = tmp.keys ();
24057 var counter = tmp.size ();
24058 if (keys == null) {
24059 keys =  new Array (counter);
24060 }while (counter > 0) {
24061 keys[--counter] = enum_.nextElement ();
24062 }
24063 }return keys;
24064 }, "~A");
24065 Clazz_defineMethod (c$, "isArray", 
24066  function () {
24067 return (Clazz_instanceOf (this.table, Array));
24068 });
24069 Clazz_defineMethod (c$, "grow", 
24070  function () {
24071 var array = this.table;
24072 var tmp =  new java.util.Hashtable (Clazz_doubleToInt (array.length / 2));
24073 for (var i = 0; i < array.length; i += 2) {
24074 tmp.put (array[i], array[i + 1]);
24075 }
24076 this.table = tmp;
24077 });
24078 Clazz_defineMethod (c$, "shrink", 
24079  function () {
24080 var tmp = this.table;
24081 var array =  new Array (tmp.size () * 2);
24082 var keys = tmp.keys ();
24083 var j = 0;
24084 while (keys.hasMoreElements ()) {
24085 var o = keys.nextElement ();
24086 array[j] = o;
24087 array[j + 1] = tmp.get (o);
24088 j += 2;
24089 }
24090 this.table = array;
24091 });
24092 Clazz_defineStatics (c$,
24093 "ARRAY_BOUNDARY", 8);
24094 });
24095 Clazz_declarePackage ("javax.swing.event");
24096 Clazz_load (["java.beans.PropertyChangeSupport"], "javax.swing.event.SwingPropertyChangeSupport", ["java.lang.NullPointerException", "javax.swing.SwingUtilities"], function () {
24097 c$ = Clazz_decorateAsClass (function () {
24098 this.notifyOnEDT = false;
24099 Clazz_instantialize (this, arguments);
24100 }, javax.swing.event, "SwingPropertyChangeSupport", java.beans.PropertyChangeSupport);
24101 Clazz_makeConstructor (c$, 
24102 function (sourceBean) {
24103 this.construct (sourceBean, false);
24104 }, "~O");
24105 Clazz_makeConstructor (c$, 
24106 function (sourceBean, notifyOnEDT) {
24107 Clazz_superConstructor (this, javax.swing.event.SwingPropertyChangeSupport, [sourceBean]);
24108 this.notifyOnEDT = notifyOnEDT;
24109 }, "~O,~B");
24110 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
24111 function (evt) {
24112 if (evt == null) {
24113 throw  new NullPointerException ();
24114 }if (!this.isNotifyOnEDT () || javax.swing.SwingUtilities.isEventDispatchThread ()) {
24115 Clazz_superCall (this, javax.swing.event.SwingPropertyChangeSupport, "firePropertyChangeEvt", [evt]);
24116 } else {
24117 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))));
24118 }}, "java.beans.PropertyChangeEvent");
24119 Clazz_defineMethod (c$, "isNotifyOnEDT", 
24120 function () {
24121 return this.notifyOnEDT;
24122 });
24123 c$.$SwingPropertyChangeSupport$1$ = function () {
24124 Clazz_pu$h(self.c$);
24125 c$ = Clazz_declareAnonymous (javax.swing.event, "SwingPropertyChangeSupport$1", null, Runnable);
24126 Clazz_overrideMethod (c$, "run", 
24127 function () {
24128 this.b$["javax.swing.event.SwingPropertyChangeSupport"].firePropertyChangeEvt (this.f$.evt);
24129 });
24130 c$ = Clazz_p0p ();
24131 };
24132 });
24133 Clazz_declarePackage ("javax.swing");
24134 Clazz_load (["javax.swing.JComponent"], "javax.swing.JLayeredPane", ["java.util.ArrayList", "$.Hashtable", "java.awt.Color"], function () {
24135 c$ = Clazz_decorateAsClass (function () {
24136 this.componentToLayer = null;
24137 this.optimizedDrawingPossible = true;
24138 Clazz_instantialize (this, arguments);
24139 }, javax.swing, "JLayeredPane", javax.swing.JComponent);
24140 Clazz_makeConstructor (c$, 
24141 function () {
24142 Clazz_superConstructor (this, javax.swing.JLayeredPane, []);
24143 this.setLayout (null);
24144 });
24145 Clazz_defineMethod (c$, "validateOptimizedDrawing", 
24146  function () {
24147 var layeredComponentFound = false;
24148 {
24149 var layer = null;
24150 for (var c, $c = 0, $$c = this.getComponents (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
24151 layer = null;
24152 if ((Clazz_instanceOf (c, javax.swing.JComponent) && (layer = (c).getClientProperty ("layeredContainerLayer")) != null)) {
24153 if (layer != null && layer.equals (javax.swing.JLayeredPane.FRAME_CONTENT_LAYER)) continue;
24154 layeredComponentFound = true;
24155 break;
24156 }}
24157 }if (layeredComponentFound) this.optimizedDrawingPossible = false;
24158  else this.optimizedDrawingPossible = true;
24159 });
24160 Clazz_overrideMethod (c$, "addImpl", 
24161 function (comp, constraints, index) {
24162 var layer = javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24163 var pos;
24164 if (Clazz_instanceOf (constraints, Integer)) {
24165 layer = (constraints).intValue ();
24166 this.setLayer (comp, layer);
24167 } else layer = this.getLayer (comp);
24168 pos = this.insertIndexForLayer (layer, index);
24169 this.addImplSAEM (comp, constraints, pos);
24170 comp.validate ();
24171 comp.repaint ();
24172 this.validateOptimizedDrawing ();
24173 return comp;
24174 }, "java.awt.Component,~O,~N");
24175 Clazz_defineMethod (c$, "remove", 
24176 function (index) {
24177 var c = this.getComponent (index);
24178 Clazz_superCall (this, javax.swing.JLayeredPane, "remove", [index]);
24179 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24180 this.getComponentToLayer ().remove (c);
24181 }this.validateOptimizedDrawing ();
24182 }, "~N");
24183 Clazz_defineMethod (c$, "removeAll", 
24184 function () {
24185 var children = this.getComponents ();
24186 var cToL = this.getComponentToLayer ();
24187 for (var counter = children.length - 1; counter >= 0; counter--) {
24188 var c = children[counter];
24189 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24190 cToL.remove (c);
24191 }}
24192 Clazz_superCall (this, javax.swing.JLayeredPane, "removeAll", []);
24193 });
24194 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
24195 function () {
24196 return this.optimizedDrawingPossible;
24197 });
24198 c$.putLayer = Clazz_defineMethod (c$, "putLayer", 
24199 function (c, layer) {
24200 var layerObj;
24201 layerObj =  new Integer (layer);
24202 c.putClientProperty ("layeredContainerLayer", layerObj);
24203 }, "javax.swing.JComponent,~N");
24204 c$.getLayer = Clazz_defineMethod (c$, "getLayer", 
24205 function (c) {
24206 var i;
24207 if ((i = c.getClientProperty ("layeredContainerLayer")) != null) return i.intValue ();
24208 return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24209 }, "javax.swing.JComponent");
24210 c$.getLayeredPaneAbove = Clazz_defineMethod (c$, "getLayeredPaneAbove", 
24211 function (c) {
24212 if (c == null) return null;
24213 var parent = c.getParent ();
24214 while (parent != null && !(Clazz_instanceOf (parent, javax.swing.JLayeredPane))) parent = parent.getParent ();
24215
24216 return parent;
24217 }, "java.awt.Component");
24218 Clazz_defineMethod (c$, "setLayer", 
24219 function (c, layer) {
24220 this.setLayer (c, layer, -1);
24221 }, "java.awt.Component,~N");
24222 Clazz_defineMethod (c$, "setLayer", 
24223 function (c, layer, position) {
24224 var layerObj;
24225 layerObj = this.getObjectForLayer (layer);
24226 if (layer == this.getLayer (c) && position == this.getPosition (c)) {
24227 this.repaint (c.getBounds ());
24228 return;
24229 }if (Clazz_instanceOf (c, javax.swing.JComponent)) (c).putClientProperty ("layeredContainerLayer", layerObj);
24230  else this.getComponentToLayer ().put (c, layerObj);
24231 if (c.getParent () == null || c.getParent () !== this) {
24232 this.repaint (c.getBounds ());
24233 return;
24234 }var index = this.insertIndexForLayer (c, layer, position);
24235 this.setComponentZOrder (c, index);
24236 this.repaint (c.getBounds ());
24237 }, "java.awt.Component,~N,~N");
24238 Clazz_defineMethod (c$, "getLayer", 
24239 function (c) {
24240 var i;
24241 if (Clazz_instanceOf (c, javax.swing.JComponent)) i = (c).getClientProperty ("layeredContainerLayer");
24242  else i = this.getComponentToLayer ().get (c);
24243 if (i == null) return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24244 return i.intValue ();
24245 }, "java.awt.Component");
24246 Clazz_defineMethod (c$, "getIndexOf", 
24247 function (c) {
24248 var i;
24249 var count;
24250 count = this.getComponentCount ();
24251 for (i = 0; i < count; i++) {
24252 if (c === this.getComponent (i)) return i;
24253 }
24254 return -1;
24255 }, "java.awt.Component");
24256 Clazz_defineMethod (c$, "moveToFront", 
24257 function (c) {
24258 this.setPosition (c, 0);
24259 }, "java.awt.Component");
24260 Clazz_defineMethod (c$, "moveToBack", 
24261 function (c) {
24262 this.setPosition (c, -1);
24263 }, "java.awt.Component");
24264 Clazz_defineMethod (c$, "setPosition", 
24265 function (c, position) {
24266 this.setLayer (c, this.getLayer (c), position);
24267 }, "java.awt.Component,~N");
24268 Clazz_defineMethod (c$, "getPosition", 
24269 function (c) {
24270 var i;
24271 var count;
24272 var startLayer;
24273 var curLayer;
24274 var startLocation;
24275 var pos = 0;
24276 count = this.getComponentCount ();
24277 startLocation = this.getIndexOf (c);
24278 if (startLocation == -1) return -1;
24279 startLayer = this.getLayer (c);
24280 for (i = startLocation - 1; i >= 0; i--) {
24281 curLayer = this.getLayer (this.getComponent (i));
24282 if (curLayer == startLayer) pos++;
24283  else return pos;
24284 }
24285 return pos;
24286 }, "java.awt.Component");
24287 Clazz_defineMethod (c$, "highestLayer", 
24288 function () {
24289 if (this.getComponentCount () > 0) return this.getLayer (this.getComponent (0));
24290 return 0;
24291 });
24292 Clazz_defineMethod (c$, "lowestLayer", 
24293 function () {
24294 var count = this.getComponentCount ();
24295 if (count > 0) return this.getLayer (this.getComponent (count - 1));
24296 return 0;
24297 });
24298 Clazz_defineMethod (c$, "getComponentCountInLayer", 
24299 function (layer) {
24300 var i;
24301 var count;
24302 var curLayer;
24303 var layerCount = 0;
24304 count = this.getComponentCount ();
24305 for (i = 0; i < count; i++) {
24306 curLayer = this.getLayer (this.getComponent (i));
24307 if (curLayer == layer) {
24308 layerCount++;
24309 } else if (layerCount > 0 || curLayer < layer) {
24310 break;
24311 }}
24312 return layerCount;
24313 }, "~N");
24314 Clazz_defineMethod (c$, "getComponentsInLayer", 
24315 function (layer) {
24316 var i;
24317 var count;
24318 var curLayer;
24319 var layerCount = 0;
24320 var results;
24321 results =  new Array (this.getComponentCountInLayer (layer));
24322 count = this.getComponentCount ();
24323 for (i = 0; i < count; i++) {
24324 curLayer = this.getLayer (this.getComponent (i));
24325 if (curLayer == layer) {
24326 results[layerCount++] = this.getComponent (i);
24327 } else if (layerCount > 0 || curLayer < layer) {
24328 break;
24329 }}
24330 return results;
24331 }, "~N");
24332 Clazz_defineMethod (c$, "paint", 
24333 function (g) {
24334 if (this.isOpaque ()) {
24335 var r = g.getClipBounds ();
24336 var c = this.getBackground ();
24337 if (c == null) c = java.awt.Color.lightGray;
24338 g.setColor (c);
24339 if (r != null) {
24340 g.fillRect (r.x, r.y, r.width, r.height);
24341 } else {
24342 g.fillRect (0, 0, this.getWidth (), this.getHeight ());
24343 }}Clazz_superCall (this, javax.swing.JLayeredPane, "paint", [g]);
24344 }, "java.awt.Graphics");
24345 Clazz_defineMethod (c$, "getComponentToLayer", 
24346 function () {
24347 if (this.componentToLayer == null) this.componentToLayer =  new java.util.Hashtable (4);
24348 return this.componentToLayer;
24349 });
24350 Clazz_defineMethod (c$, "getObjectForLayer", 
24351 function (layer) {
24352 var layerObj;
24353 switch (layer) {
24354 case 0:
24355 layerObj = javax.swing.JLayeredPane.DEFAULT_LAYER;
24356 break;
24357 case 100:
24358 layerObj = javax.swing.JLayeredPane.PALETTE_LAYER;
24359 break;
24360 case 200:
24361 layerObj = javax.swing.JLayeredPane.MODAL_LAYER;
24362 break;
24363 case 300:
24364 layerObj = javax.swing.JLayeredPane.POPUP_LAYER;
24365 break;
24366 case 400:
24367 layerObj = javax.swing.JLayeredPane.DRAG_LAYER;
24368 break;
24369 default:
24370 layerObj =  new Integer (layer);
24371 }
24372 return layerObj;
24373 }, "~N");
24374 Clazz_defineMethod (c$, "insertIndexForLayer", 
24375 function (layer, position) {
24376 return this.insertIndexForLayer (null, layer, position);
24377 }, "~N,~N");
24378 Clazz_defineMethod (c$, "insertIndexForLayer", 
24379  function (comp, layer, position) {
24380 var i;
24381 var count;
24382 var curLayer;
24383 var layerStart = -1;
24384 var layerEnd = -1;
24385 var componentCount = this.getComponentCount ();
24386 var compList =  new java.util.ArrayList (componentCount);
24387 for (var index = 0; index < componentCount; index++) {
24388 if (this.getComponent (index) !== comp) {
24389 compList.add (this.getComponent (index));
24390 }}
24391 count = compList.size ();
24392 for (i = 0; i < count; i++) {
24393 curLayer = this.getLayer (compList.get (i));
24394 if (layerStart == -1 && curLayer == layer) {
24395 layerStart = i;
24396 }if (curLayer < layer) {
24397 if (i == 0) {
24398 layerStart = 0;
24399 layerEnd = 0;
24400 } else {
24401 layerEnd = i;
24402 }break;
24403 }}
24404 if (layerStart == -1 && layerEnd == -1) return count;
24405 if (layerStart != -1 && layerEnd == -1) layerEnd = count;
24406 if (layerEnd != -1 && layerStart == -1) layerStart = layerEnd;
24407 if (position == -1) return layerEnd;
24408 if (position > -1 && layerStart + position <= layerEnd) return layerStart + position;
24409 return layerEnd;
24410 }, "java.awt.Component,~N,~N");
24411 Clazz_defineMethod (c$, "paramString", 
24412 function () {
24413 var optimizedDrawingPossibleString = (this.optimizedDrawingPossible ? "true" : "false");
24414 return Clazz_superCall (this, javax.swing.JLayeredPane, "paramString", []) + ",optimizedDrawingPossible=" + optimizedDrawingPossibleString;
24415 });
24416 c$.DEFAULT_LAYER = c$.prototype.DEFAULT_LAYER =  new Integer (0);
24417 c$.PALETTE_LAYER = c$.prototype.PALETTE_LAYER =  new Integer (100);
24418 c$.MODAL_LAYER = c$.prototype.MODAL_LAYER =  new Integer (200);
24419 c$.POPUP_LAYER = c$.prototype.POPUP_LAYER =  new Integer (300);
24420 c$.DRAG_LAYER = c$.prototype.DRAG_LAYER =  new Integer (400);
24421 c$.FRAME_CONTENT_LAYER = c$.prototype.FRAME_CONTENT_LAYER =  new Integer (-30000);
24422 Clazz_defineStatics (c$,
24423 "LAYER_PROPERTY", "layeredContainerLayer");
24424 });
24425 Clazz_declarePackage ("javax.swing");
24426 Clazz_load (["javax.swing.JComponent"], "javax.swing.JPanel", ["java.lang.Boolean", "java.awt.FlowLayout", "javax.swing.UIManager"], function () {
24427 c$ = Clazz_declareType (javax.swing, "JPanel", javax.swing.JComponent);
24428 Clazz_makeConstructor (c$, 
24429 function (layout, isDoubleBuffered) {
24430 Clazz_superConstructor (this, javax.swing.JPanel, []);
24431 this.setLayout (layout);
24432 this.setUIProperty ("opaque", Boolean.TRUE);
24433 this.updateUI ();
24434 }, "java.awt.LayoutManager,~B");
24435 Clazz_makeConstructor (c$, 
24436 function (layout) {
24437 this.construct (layout, true);
24438 }, "java.awt.LayoutManager");
24439 Clazz_makeConstructor (c$, 
24440 function (isDoubleBuffered) {
24441 this.construct ( new java.awt.FlowLayout (), isDoubleBuffered);
24442 }, "~B");
24443 Clazz_makeConstructor (c$, 
24444 function () {
24445 this.construct (true);
24446 });
24447 Clazz_overrideMethod (c$, "updateUI", 
24448 function () {
24449 this.setUI (javax.swing.UIManager.getUI (this));
24450 });
24451 Clazz_overrideMethod (c$, "getUI", 
24452 function () {
24453 return this.ui;
24454 });
24455 Clazz_overrideMethod (c$, "getUIClassID", 
24456 function () {
24457 return "PanelUI";
24458 });
24459 Clazz_defineStatics (c$,
24460 "$uiClassID", "PanelUI");
24461 });
24462 Clazz_declarePackage ("javax.swing");
24463 Clazz_load (["java.lang.Enum", "java.util.Enumeration", "javax.swing.UIDefaults"], "javax.swing.MultiUIDefaults", ["java.lang.StringBuffer", "java.util.HashSet"], function () {
24464 c$ = Clazz_decorateAsClass (function () {
24465 this.tables = null;
24466 Clazz_instantialize (this, arguments);
24467 }, javax.swing, "MultiUIDefaults", javax.swing.UIDefaults);
24468 Clazz_makeConstructor (c$, 
24469 function (defaults) {
24470 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24471 this.tables = defaults;
24472 }, "~A");
24473 Clazz_makeConstructor (c$, 
24474 function () {
24475 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24476 this.tables =  new Array (0);
24477 });
24478 Clazz_defineMethod (c$, "get", 
24479 function (key) {
24480 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key]);
24481 if (value != null) {
24482 return value;
24483 }for (var i = 0; i < this.tables.length; i++) {
24484 var table = this.tables[i];
24485 value = (table != null) ? table.get (key) : null;
24486 if (value != null) {
24487 return value;
24488 }}
24489 return null;
24490 }, "~O");
24491 Clazz_defineMethod (c$, "get", 
24492 function (key, l) {
24493 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key, l]);
24494 if (value != null) {
24495 return value;
24496 }for (var i = 0; i < this.tables.length; i++) {
24497 var table = this.tables[i];
24498 value = (table != null) ? table.get (key, l) : null;
24499 if (value != null) {
24500 return value;
24501 }}
24502 return null;
24503 }, "~O,java.util.Locale");
24504 Clazz_overrideMethod (c$, "size", 
24505 function () {
24506 return this.entrySet ().size ();
24507 });
24508 Clazz_overrideMethod (c$, "isEmpty", 
24509 function () {
24510 return this.size () == 0;
24511 });
24512 Clazz_overrideMethod (c$, "keys", 
24513 function () {
24514 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS, this.entrySet ());
24515 });
24516 Clazz_overrideMethod (c$, "elements", 
24517 function () {
24518 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS, this.entrySet ());
24519 });
24520 Clazz_defineMethod (c$, "entrySet", 
24521 function () {
24522 var set =  new java.util.HashSet ();
24523 for (var i = this.tables.length - 1; i >= 0; i--) {
24524 if (this.tables[i] != null) {
24525 set.addAll (this.tables[i].entrySet ());
24526 }}
24527 set.addAll (Clazz_superCall (this, javax.swing.MultiUIDefaults, "entrySet", []));
24528 return set;
24529 });
24530 Clazz_defineMethod (c$, "getUIError", 
24531 function (msg) {
24532 if (this.tables.length > 0) {
24533 this.tables[0].getUIError (msg);
24534 } else {
24535 Clazz_superCall (this, javax.swing.MultiUIDefaults, "getUIError", [msg]);
24536 }}, "~S");
24537 Clazz_defineMethod (c$, "remove", 
24538 function (key) {
24539 var value = null;
24540 for (var i = this.tables.length - 1; i >= 0; i--) {
24541 if (this.tables[i] != null) {
24542 var v = this.tables[i].remove (key);
24543 if (v != null) {
24544 value = v;
24545 }}}
24546 var v = Clazz_superCall (this, javax.swing.MultiUIDefaults, "remove", [key]);
24547 if (v != null) {
24548 value = v;
24549 }return value;
24550 }, "~O");
24551 Clazz_defineMethod (c$, "clear", 
24552 function () {
24553 Clazz_superCall (this, javax.swing.MultiUIDefaults, "clear", []);
24554 for (var i = 0; i < this.tables.length; i++) {
24555 var table = this.tables[i];
24556 if (table != null) {
24557 table.clear ();
24558 }}
24559 });
24560 Clazz_overrideMethod (c$, "toString", 
24561 function () {
24562 var buf =  new StringBuffer ();
24563 buf.append ("{");
24564 var keys = this.keys ();
24565 while (keys.hasMoreElements ()) {
24566 var key = keys.nextElement ();
24567 buf.append (key + "=" + this.get (key) + ", ");
24568 }
24569 var length = buf.length ();
24570 if (length > 1) {
24571 buf.$delete (length - 2, length);
24572 }buf.append ("}");
24573 return buf.toString ();
24574 });
24575 Clazz_pu$h(self.c$);
24576 c$ = Clazz_decorateAsClass (function () {
24577 this.iterator = null;
24578 this.type = null;
24579 Clazz_instantialize (this, arguments);
24580 }, javax.swing.MultiUIDefaults, "MultiUIDefaultsEnumerator", null, java.util.Enumeration);
24581 Clazz_makeConstructor (c$, 
24582 function (a, b) {
24583 this.type = a;
24584 this.iterator = b.iterator ();
24585 }, "javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type,java.util.Set");
24586 Clazz_overrideMethod (c$, "hasMoreElements", 
24587 function () {
24588 return this.iterator.hasNext ();
24589 });
24590 Clazz_overrideMethod (c$, "nextElement", 
24591 function () {
24592 switch (this.type) {
24593 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS:
24594 return this.iterator.next ().getKey ();
24595 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS:
24596 return this.iterator.next ().getValue ();
24597 default:
24598 return null;
24599 }
24600 });
24601 Clazz_pu$h(self.c$);
24602 c$ = Clazz_declareType (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator, "Type", Enum);
24603 Clazz_defineEnumConstant (c$, "KEYS", 0, []);
24604 Clazz_defineEnumConstant (c$, "ELEMENTS", 1, []);
24605 c$ = Clazz_p0p ();
24606 c$ = Clazz_p0p ();
24607 });
24608 Clazz_declarePackage ("java.awt");
24609 Clazz_load (null, "java.awt.Font", ["java.awt.font.TextAttribute", "java.awt.geom.AffineTransform", "swingjs.JSToolkit"], function () {
24610 c$ = Clazz_decorateAsClass (function () {
24611 this.family = null;
24612 this.name = null;
24613 this.style = 0;
24614 this.size = 0;
24615 this.pointSize = 0;
24616 this.$hasLayoutAttributes = false;
24617 this.nonIdentityTx = false;
24618 this.hash = 0;
24619 Clazz_instantialize (this, arguments);
24620 }, java.awt, "Font");
24621 Clazz_makeConstructor (c$, 
24622 function (name, style, size) {
24623 this.name = (name != null) ? name : "Default";
24624 this.style = (style & -4) == 0 ? style : 0;
24625 this.size = size;
24626 this.pointSize = size;
24627 }, "~S,~N,~N");
24628 Clazz_makeConstructor (c$, 
24629  function (name, style, sizePts) {
24630 this.name = (name != null) ? name : "Default";
24631 this.style = (style & -4) == 0 ? style : 0;
24632 this.size = Clazz_doubleToInt (sizePts + 0.5);
24633 this.pointSize = sizePts;
24634 }, "~S,~N,~N");
24635 Clazz_makeConstructor (c$, 
24636 function (font) {
24637 this.name = font.name;
24638 this.style = font.style;
24639 this.size = font.size;
24640 this.pointSize = font.pointSize;
24641 }, "java.awt.Font");
24642 Clazz_defineMethod (c$, "getTransform", 
24643 function () {
24644 return  new java.awt.geom.AffineTransform ();
24645 });
24646 Clazz_defineMethod (c$, "getFamily", 
24647 function () {
24648 return (this.family == null ? this.family = swingjs.JSToolkit.getFontFamily (this) : this.family);
24649 });
24650 Clazz_defineMethod (c$, "getName", 
24651 function () {
24652 return this.name;
24653 });
24654 Clazz_defineMethod (c$, "getFontName", 
24655 function () {
24656 return this.name;
24657 });
24658 Clazz_defineMethod (c$, "getStyle", 
24659 function () {
24660 return this.style;
24661 });
24662 Clazz_defineMethod (c$, "getSize", 
24663 function () {
24664 return this.size;
24665 });
24666 Clazz_defineMethod (c$, "getSize2D", 
24667 function () {
24668 return this.pointSize;
24669 });
24670 Clazz_defineMethod (c$, "isPlain", 
24671 function () {
24672 return this.style == 0;
24673 });
24674 Clazz_defineMethod (c$, "isBold", 
24675 function () {
24676 return (this.style & 1) != 0;
24677 });
24678 Clazz_defineMethod (c$, "isItalic", 
24679 function () {
24680 return (this.style & 2) != 0;
24681 });
24682 Clazz_defineMethod (c$, "isTransformed", 
24683 function () {
24684 return this.nonIdentityTx;
24685 });
24686 Clazz_defineMethod (c$, "hasLayoutAttributes", 
24687 function () {
24688 return this.$hasLayoutAttributes;
24689 });
24690 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24691 function (nm) {
24692 return java.awt.Font.getFont (nm, null);
24693 }, "~S");
24694 c$.decode = Clazz_defineMethod (c$, "decode", 
24695 function (str) {
24696 var fontName = str;
24697 var styleName = "";
24698 var fontSize = 12;
24699 var fontStyle = 0;
24700 if (str == null) {
24701 return  new java.awt.Font ("Dialog", fontStyle, fontSize);
24702 }var lastHyphen = str.lastIndexOf ('-');
24703 var lastSpace = str.lastIndexOf (' ');
24704 var sepChar = (lastHyphen > lastSpace) ? '-' : ' ';
24705 var sizeIndex = str.lastIndexOf (sepChar);
24706 var styleIndex = str.lastIndexOf (sepChar, sizeIndex - 1);
24707 var strlen = str.length;
24708 if (sizeIndex > 0 && sizeIndex + 1 < strlen) {
24709 try {
24710 fontSize = Integer.$valueOf (str.substring (sizeIndex + 1)).intValue ();
24711 if (fontSize <= 0) {
24712 fontSize = 12;
24713 }} catch (e) {
24714 if (Clazz_exceptionOf (e, NumberFormatException)) {
24715 styleIndex = sizeIndex;
24716 sizeIndex = strlen;
24717 if (str.charAt (sizeIndex - 1) == sepChar) {
24718 sizeIndex--;
24719 }} else {
24720 throw e;
24721 }
24722 }
24723 }if (styleIndex >= 0 && styleIndex + 1 < strlen) {
24724 styleName = str.substring (styleIndex + 1, sizeIndex);
24725 styleName = styleName.toLowerCase ();
24726 if (styleName.equals ("bolditalic")) {
24727 fontStyle = 3;
24728 } else if (styleName.equals ("italic")) {
24729 fontStyle = 2;
24730 } else if (styleName.equals ("bold")) {
24731 fontStyle = 1;
24732 } else if (styleName.equals ("plain")) {
24733 fontStyle = 0;
24734 } else {
24735 styleIndex = sizeIndex;
24736 if (str.charAt (styleIndex - 1) == sepChar) {
24737 styleIndex--;
24738 }}fontName = str.substring (0, styleIndex);
24739 } else {
24740 var fontEnd = strlen;
24741 if (styleIndex > 0) {
24742 fontEnd = styleIndex;
24743 } else if (sizeIndex > 0) {
24744 fontEnd = sizeIndex;
24745 }if (fontEnd > 0 && str.charAt (fontEnd - 1) == sepChar) {
24746 fontEnd--;
24747 }fontName = str.substring (0, fontEnd);
24748 }return  new java.awt.Font (fontName, fontStyle, fontSize);
24749 }, "~S");
24750 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24751 function (nm, font) {
24752 var str = null;
24753 try {
24754 str = System.getProperty (nm);
24755 } catch (e) {
24756 if (Clazz_exceptionOf (e, SecurityException)) {
24757 } else {
24758 throw e;
24759 }
24760 }
24761 if (str == null) {
24762 return font;
24763 }return java.awt.Font.decode (str);
24764 }, "~S,java.awt.Font");
24765 Clazz_overrideMethod (c$, "hashCode", 
24766 function () {
24767 if (this.hash == 0) {
24768 this.hash = this.name.hashCode () ^ this.style ^ this.size;
24769 }return this.hash;
24770 });
24771 Clazz_overrideMethod (c$, "equals", 
24772 function (obj) {
24773 if (obj === this) {
24774 return true;
24775 }if (obj != null) {
24776 try {
24777 var font = obj;
24778 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)) {
24779 return true;
24780 }} catch (e) {
24781 if (Clazz_exceptionOf (e, ClassCastException)) {
24782 } else {
24783 throw e;
24784 }
24785 }
24786 }return false;
24787 }, "~O");
24788 Clazz_overrideMethod (c$, "toString", 
24789 function () {
24790 var strStyle;
24791 if (this.isBold ()) {
24792 strStyle = this.isItalic () ? "bolditalic" : "bold";
24793 } else {
24794 strStyle = this.isItalic () ? "italic" : "plain";
24795 }return this.getClass ().getName () + "[family=" + this.getFamily () + ",name=" + this.name + ",style=" + strStyle + ",size=" + this.size + "]";
24796 });
24797 Clazz_defineMethod (c$, "getAvailableAttributes", 
24798 function () {
24799 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]);
24800 return attributes;
24801 });
24802 Clazz_defineMethod (c$, "deriveFont", 
24803 function (style, size) {
24804 return  new java.awt.Font (this.name, style, size);
24805 }, "~N,~N");
24806 Clazz_defineMethod (c$, "deriveFont", 
24807 function (size) {
24808 return  new java.awt.Font (this.name, this.style, size);
24809 }, "~N");
24810 Clazz_defineMethod (c$, "deriveFont", 
24811 function (style) {
24812 return  new java.awt.Font (this.name, style, this.size);
24813 }, "~N");
24814 Clazz_defineMethod (c$, "hasUniformLineMetrics", 
24815 function () {
24816 return false;
24817 });
24818 Clazz_overrideMethod (c$, "finalize", 
24819 function () {
24820 });
24821 Clazz_defineStatics (c$,
24822 "DIALOG", "Dialog",
24823 "DIALOG_INPUT", "DialogInput",
24824 "SANS_SERIF", "SansSerif",
24825 "SERIF", "Serif",
24826 "MONOSPACED", "Monospaced",
24827 "PLAIN", 0,
24828 "BOLD", 1,
24829 "ITALIC", 2,
24830 "ROMAN_BASELINE", 0,
24831 "CENTER_BASELINE", 1,
24832 "HANGING_BASELINE", 2,
24833 "TRUETYPE_FONT", 0,
24834 "TYPE1_FONT", 1,
24835 "LAYOUT_LEFT_TO_RIGHT", 0,
24836 "LAYOUT_RIGHT_TO_LEFT", 1,
24837 "LAYOUT_NO_START_CONTEXT", 2,
24838 "LAYOUT_NO_LIMIT_CONTEXT", 4);
24839 });
24840 Clazz_declarePackage ("java.awt.font");
24841 Clazz_load (["java.text.AttributedCharacterIterator", "java.lang.Boolean", "$.Float", "java.util.HashMap"], "java.awt.font.TextAttribute", ["java.io.InvalidObjectException"], function () {
24842 c$ = Clazz_declareType (java.awt.font, "TextAttribute", java.text.AttributedCharacterIterator.Attribute);
24843 Clazz_makeConstructor (c$, 
24844 function (name) {
24845 Clazz_superConstructor (this, java.awt.font.TextAttribute, [name]);
24846 if (this.getClass () === java.awt.font.TextAttribute) {
24847 java.awt.font.TextAttribute.$instanceMap.put (name, this);
24848 }}, "~S");
24849 Clazz_overrideMethod (c$, "readResolve", 
24850 function () {
24851 if (this.getClass () !== java.awt.font.TextAttribute) {
24852 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24853 }var instance = java.awt.font.TextAttribute.$instanceMap.get (this.getName ());
24854 if (instance != null) {
24855 return instance;
24856 } else {
24857 throw  new java.io.InvalidObjectException ("unknown attribute name");
24858 }});
24859 c$.$instanceMap = c$.prototype.$instanceMap =  new java.util.HashMap (29);
24860 c$.FAMILY = c$.prototype.FAMILY =  new java.awt.font.TextAttribute ("family");
24861 c$.WEIGHT = c$.prototype.WEIGHT =  new java.awt.font.TextAttribute ("weight");
24862 c$.WEIGHT_EXTRA_LIGHT = c$.prototype.WEIGHT_EXTRA_LIGHT = Float.$valueOf (0.5);
24863 c$.WEIGHT_LIGHT = c$.prototype.WEIGHT_LIGHT = Float.$valueOf (0.75);
24864 c$.WEIGHT_DEMILIGHT = c$.prototype.WEIGHT_DEMILIGHT = Float.$valueOf (0.875);
24865 c$.WEIGHT_REGULAR = c$.prototype.WEIGHT_REGULAR = Float.$valueOf (1.0);
24866 c$.WEIGHT_SEMIBOLD = c$.prototype.WEIGHT_SEMIBOLD = Float.$valueOf (1.25);
24867 c$.WEIGHT_MEDIUM = c$.prototype.WEIGHT_MEDIUM = Float.$valueOf (1.5);
24868 c$.WEIGHT_DEMIBOLD = c$.prototype.WEIGHT_DEMIBOLD = Float.$valueOf (1.75);
24869 c$.WEIGHT_BOLD = c$.prototype.WEIGHT_BOLD = Float.$valueOf (2.0);
24870 c$.WEIGHT_HEAVY = c$.prototype.WEIGHT_HEAVY = Float.$valueOf (2.25);
24871 c$.WEIGHT_EXTRABOLD = c$.prototype.WEIGHT_EXTRABOLD = Float.$valueOf (2.5);
24872 c$.WEIGHT_ULTRABOLD = c$.prototype.WEIGHT_ULTRABOLD = Float.$valueOf (2.75);
24873 c$.WIDTH = c$.prototype.WIDTH =  new java.awt.font.TextAttribute ("width");
24874 c$.WIDTH_CONDENSED = c$.prototype.WIDTH_CONDENSED = Float.$valueOf (0.75);
24875 c$.WIDTH_SEMI_CONDENSED = c$.prototype.WIDTH_SEMI_CONDENSED = Float.$valueOf (0.875);
24876 c$.WIDTH_REGULAR = c$.prototype.WIDTH_REGULAR = Float.$valueOf (1.0);
24877 c$.WIDTH_SEMI_EXTENDED = c$.prototype.WIDTH_SEMI_EXTENDED = Float.$valueOf (1.25);
24878 c$.WIDTH_EXTENDED = c$.prototype.WIDTH_EXTENDED = Float.$valueOf (1.5);
24879 c$.POSTURE = c$.prototype.POSTURE =  new java.awt.font.TextAttribute ("posture");
24880 c$.POSTURE_REGULAR = c$.prototype.POSTURE_REGULAR = Float.$valueOf (0.0);
24881 c$.POSTURE_OBLIQUE = c$.prototype.POSTURE_OBLIQUE = Float.$valueOf (0.20);
24882 c$.SIZE = c$.prototype.SIZE =  new java.awt.font.TextAttribute ("size");
24883 c$.TRANSFORM = c$.prototype.TRANSFORM =  new java.awt.font.TextAttribute ("transform");
24884 c$.SUPERSCRIPT = c$.prototype.SUPERSCRIPT =  new java.awt.font.TextAttribute ("superscript");
24885 c$.SUPERSCRIPT_SUPER = c$.prototype.SUPERSCRIPT_SUPER = Integer.$valueOf (1);
24886 c$.SUPERSCRIPT_SUB = c$.prototype.SUPERSCRIPT_SUB = Integer.$valueOf (-1);
24887 c$.FONT = c$.prototype.FONT =  new java.awt.font.TextAttribute ("font");
24888 c$.CHAR_REPLACEMENT = c$.prototype.CHAR_REPLACEMENT =  new java.awt.font.TextAttribute ("char_replacement");
24889 c$.FOREGROUND = c$.prototype.FOREGROUND =  new java.awt.font.TextAttribute ("foreground");
24890 c$.BACKGROUND = c$.prototype.BACKGROUND =  new java.awt.font.TextAttribute ("background");
24891 c$.UNDERLINE = c$.prototype.UNDERLINE =  new java.awt.font.TextAttribute ("underline");
24892 c$.UNDERLINE_ON = c$.prototype.UNDERLINE_ON = Integer.$valueOf (0);
24893 c$.STRIKETHROUGH = c$.prototype.STRIKETHROUGH =  new java.awt.font.TextAttribute ("strikethrough");
24894 c$.STRIKETHROUGH_ON = c$.prototype.STRIKETHROUGH_ON = Boolean.TRUE;
24895 c$.RUN_DIRECTION = c$.prototype.RUN_DIRECTION =  new java.awt.font.TextAttribute ("run_direction");
24896 c$.RUN_DIRECTION_LTR = c$.prototype.RUN_DIRECTION_LTR = Boolean.FALSE;
24897 c$.RUN_DIRECTION_RTL = c$.prototype.RUN_DIRECTION_RTL = Boolean.TRUE;
24898 c$.BIDI_EMBEDDING = c$.prototype.BIDI_EMBEDDING =  new java.awt.font.TextAttribute ("bidi_embedding");
24899 c$.JUSTIFICATION = c$.prototype.JUSTIFICATION =  new java.awt.font.TextAttribute ("justification");
24900 c$.JUSTIFICATION_FULL = c$.prototype.JUSTIFICATION_FULL = Float.$valueOf (1.0);
24901 c$.JUSTIFICATION_NONE = c$.prototype.JUSTIFICATION_NONE = Float.$valueOf (0.0);
24902 c$.INPUT_METHOD_HIGHLIGHT = c$.prototype.INPUT_METHOD_HIGHLIGHT =  new java.awt.font.TextAttribute ("input method highlight");
24903 c$.INPUT_METHOD_UNDERLINE = c$.prototype.INPUT_METHOD_UNDERLINE =  new java.awt.font.TextAttribute ("input method underline");
24904 c$.UNDERLINE_LOW_ONE_PIXEL = c$.prototype.UNDERLINE_LOW_ONE_PIXEL = Integer.$valueOf (1);
24905 c$.UNDERLINE_LOW_TWO_PIXEL = c$.prototype.UNDERLINE_LOW_TWO_PIXEL = Integer.$valueOf (2);
24906 c$.UNDERLINE_LOW_DOTTED = c$.prototype.UNDERLINE_LOW_DOTTED = Integer.$valueOf (3);
24907 c$.UNDERLINE_LOW_GRAY = c$.prototype.UNDERLINE_LOW_GRAY = Integer.$valueOf (4);
24908 c$.UNDERLINE_LOW_DASHED = c$.prototype.UNDERLINE_LOW_DASHED = Integer.$valueOf (5);
24909 c$.SWAP_COLORS = c$.prototype.SWAP_COLORS =  new java.awt.font.TextAttribute ("swap_colors");
24910 c$.SWAP_COLORS_ON = c$.prototype.SWAP_COLORS_ON = Boolean.TRUE;
24911 c$.NUMERIC_SHAPING = c$.prototype.NUMERIC_SHAPING =  new java.awt.font.TextAttribute ("numeric_shaping");
24912 c$.KERNING = c$.prototype.KERNING =  new java.awt.font.TextAttribute ("kerning");
24913 c$.KERNING_ON = c$.prototype.KERNING_ON = Integer.$valueOf (1);
24914 c$.LIGATURES = c$.prototype.LIGATURES =  new java.awt.font.TextAttribute ("ligatures");
24915 c$.LIGATURES_ON = c$.prototype.LIGATURES_ON = Integer.$valueOf (1);
24916 c$.TRACKING = c$.prototype.TRACKING =  new java.awt.font.TextAttribute ("tracking");
24917 c$.TRACKING_TIGHT = c$.prototype.TRACKING_TIGHT = Float.$valueOf (-0.04);
24918 c$.TRACKING_LOOSE = c$.prototype.TRACKING_LOOSE = Float.$valueOf (.04);
24919 });
24920 Clazz_declarePackage ("java.text");
24921 Clazz_load (["java.text.CharacterIterator", "java.io.InvalidObjectException", "java.util.HashMap"], "java.text.AttributedCharacterIterator", null, function () {
24922 Clazz_declareInterface (java.text, "AttributedCharacterIterator", java.text.CharacterIterator);
24923 Clazz_pu$h(self.c$);
24924 c$ = Clazz_decorateAsClass (function () {
24925 this.name = null;
24926 Clazz_instantialize (this, arguments);
24927 }, java.text.AttributedCharacterIterator, "Attribute", null, java.io.Serializable);
24928 Clazz_makeConstructor (c$, 
24929 function (a) {
24930 this.name = a;
24931 if (this.getClass () === java.text.AttributedCharacterIterator.Attribute) {
24932 java.text.AttributedCharacterIterator.Attribute.instanceMap.put (a, this);
24933 }}, "~S");
24934 Clazz_overrideMethod (c$, "toString", 
24935 function () {
24936 return this.getClass ().getName () + "(" + this.name + ")";
24937 });
24938 Clazz_defineMethod (c$, "getName", 
24939 function () {
24940 return this.name;
24941 });
24942 Clazz_defineMethod (c$, "readResolve", 
24943 function () {
24944 if (this.getClass () !== java.text.AttributedCharacterIterator.Attribute) {
24945 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24946 }var a = java.text.AttributedCharacterIterator.Attribute.instanceMap.get (this.getName ());
24947 if (a != null) {
24948 return a;
24949 } else {
24950 throw  new java.io.InvalidObjectException ("unknown attribute name");
24951 }});
24952 c$.instanceMap = c$.prototype.instanceMap =  new java.util.HashMap (7);
24953 c$.LANGUAGE = c$.prototype.LANGUAGE =  new java.text.AttributedCharacterIterator.Attribute ("language");
24954 c$.READING = c$.prototype.READING =  new java.text.AttributedCharacterIterator.Attribute ("reading");
24955 c$.INPUT_METHOD_SEGMENT = c$.prototype.INPUT_METHOD_SEGMENT =  new java.text.AttributedCharacterIterator.Attribute ("input_method_segment");
24956 c$ = Clazz_p0p ();
24957 });
24958 Clazz_declarePackage ("java.text");
24959 c$ = Clazz_declareInterface (java.text, "CharacterIterator", Cloneable);
24960 Clazz_defineStatics (c$,
24961 "DONE", '\uFFFF');
24962 Clazz_declarePackage ("java.awt.geom");
24963 Clazz_load (null, "java.awt.geom.Point2D", ["java.lang.Double", "$.InternalError"], function () {
24964 c$ = Clazz_declareType (java.awt.geom, "Point2D", null, Cloneable);
24965 Clazz_makeConstructor (c$, 
24966 function () {
24967 });
24968 Clazz_defineMethod (c$, "setLocation", 
24969 function (p) {
24970 this.setLocation (p.getX (), p.getY ());
24971 }, "java.awt.geom.Point2D");
24972 c$.distanceSq = Clazz_defineMethod (c$, "distanceSq", 
24973 function (x1, y1, x2, y2) {
24974 x1 -= x2;
24975 y1 -= y2;
24976 return (x1 * x1 + y1 * y1);
24977 }, "~N,~N,~N,~N");
24978 c$.distance = Clazz_defineMethod (c$, "distance", 
24979 function (x1, y1, x2, y2) {
24980 x1 -= x2;
24981 y1 -= y2;
24982 return Math.sqrt (x1 * x1 + y1 * y1);
24983 }, "~N,~N,~N,~N");
24984 Clazz_defineMethod (c$, "distanceSq", 
24985 function (px, py) {
24986 px -= this.getX ();
24987 py -= this.getY ();
24988 return (px * px + py * py);
24989 }, "~N,~N");
24990 Clazz_defineMethod (c$, "distanceSq", 
24991 function (pt) {
24992 var px = pt.getX () - this.getX ();
24993 var py = pt.getY () - this.getY ();
24994 return (px * px + py * py);
24995 }, "java.awt.geom.Point2D");
24996 Clazz_defineMethod (c$, "distance", 
24997 function (px, py) {
24998 px -= this.getX ();
24999 py -= this.getY ();
25000 return Math.sqrt (px * px + py * py);
25001 }, "~N,~N");
25002 Clazz_defineMethod (c$, "distance", 
25003 function (pt) {
25004 var px = pt.getX () - this.getX ();
25005 var py = pt.getY () - this.getY ();
25006 return Math.sqrt (px * px + py * py);
25007 }, "java.awt.geom.Point2D");
25008 Clazz_defineMethod (c$, "clone", 
25009 function () {
25010 try {
25011 return Clazz_superCall (this, java.awt.geom.Point2D, "clone", []);
25012 } catch (e) {
25013 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
25014 throw  new InternalError ();
25015 } else {
25016 throw e;
25017 }
25018 }
25019 });
25020 Clazz_overrideMethod (c$, "hashCode", 
25021 function () {
25022 var bits = java.lang.Double.doubleToLongBits (this.getX ());
25023 bits ^= java.lang.Double.doubleToLongBits (this.getY ()) * 31;
25024 return ((bits) ^ ((bits >> 32)));
25025 });
25026 Clazz_defineMethod (c$, "equals", 
25027 function (obj) {
25028 if (Clazz_instanceOf (obj, java.awt.geom.Point2D)) {
25029 var p2d = obj;
25030 return (this.getX () == p2d.getX ()) && (this.getY () == p2d.getY ());
25031 }return Clazz_superCall (this, java.awt.geom.Point2D, "equals", [obj]);
25032 }, "~O");
25033 Clazz_pu$h(self.c$);
25034 c$ = Clazz_decorateAsClass (function () {
25035 this.x = 0;
25036 this.y = 0;
25037 Clazz_instantialize (this, arguments);
25038 }, java.awt.geom.Point2D, "Float", java.awt.geom.Point2D);
25039 Clazz_makeConstructor (c$, 
25040 function () {
25041 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
25042 });
25043 Clazz_makeConstructor (c$, 
25044 function (a, b) {
25045 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
25046 this.x = a;
25047 this.y = b;
25048 }, "~N,~N");
25049 Clazz_overrideMethod (c$, "getX", 
25050 function () {
25051 return this.x;
25052 });
25053 Clazz_overrideMethod (c$, "getY", 
25054 function () {
25055 return this.y;
25056 });
25057 Clazz_defineMethod (c$, "setLocation", 
25058 function (a, b) {
25059 this.x = a;
25060 this.y = b;
25061 }, "~N,~N");
25062 Clazz_defineMethod (c$, "setLocation", 
25063 function (a, b) {
25064 this.x = a;
25065 this.y = b;
25066 }, "~N,~N");
25067 Clazz_overrideMethod (c$, "toString", 
25068 function () {
25069 return "Point2D.Float[" + this.x + ", " + this.y + "]";
25070 });
25071 c$ = Clazz_p0p ();
25072 Clazz_pu$h(self.c$);
25073 c$ = Clazz_decorateAsClass (function () {
25074 this.x = 0;
25075 this.y = 0;
25076 Clazz_instantialize (this, arguments);
25077 }, java.awt.geom.Point2D, "Double", java.awt.geom.Point2D);
25078 Clazz_makeConstructor (c$, 
25079 function () {
25080 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
25081 });
25082 Clazz_makeConstructor (c$, 
25083 function (a, b) {
25084 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
25085 this.x = a;
25086 this.y = b;
25087 }, "~N,~N");
25088 Clazz_overrideMethod (c$, "getX", 
25089 function () {
25090 return this.x;
25091 });
25092 Clazz_overrideMethod (c$, "getY", 
25093 function () {
25094 return this.y;
25095 });
25096 Clazz_defineMethod (c$, "setLocation", 
25097 function (a, b) {
25098 this.x = a;
25099 this.y = b;
25100 }, "~N,~N");
25101 Clazz_overrideMethod (c$, "toString", 
25102 function () {
25103 return "Point2D.Double[" + this.x + ", " + this.y + "]";
25104 });
25105 c$ = Clazz_p0p ();
25106 });
25107 Clazz_declarePackage ("java.awt.geom");
25108 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 () {
25109 c$ = Clazz_decorateAsClass (function () {
25110 this.m00 = 0;
25111 this.m10 = 0;
25112 this.m01 = 0;
25113 this.m11 = 0;
25114 this.m02 = 0;
25115 this.m12 = 0;
25116 this.state = 0;
25117 this.type = 0;
25118 Clazz_instantialize (this, arguments);
25119 }, java.awt.geom, "AffineTransform", null, [Cloneable, java.io.Serializable]);
25120 Clazz_makeConstructor (c$, 
25121  function (m00, m10, m01, m11, m02, m12, state) {
25122 {
25123 switch (arguments.length) { case 0: this.m00 = this.m11 = 1.0;
25124 return;
25125 case 1:
25126 if (Clazz_instanceOf(m00, java.awt.geom.AffineTransform)) {
25127 var Tx = m00; this.m00 =
25128 Tx.m00; this.m10 = Tx.m10; this.m01 = Tx.m01; this.m11 =
25129 Tx.m11; this.m02 = Tx.m02; this.m12 = Tx.m12; this.state =
25130 Tx.state; this.type = Tx.type;
25131 } else {
25132 var flatmatrix = m00;
25133 this.m00 = flatmatrix[0];
25134 this.m10 = flatmatrix[1];
25135 this.m01 = flatmatrix[2];
25136 this.m11 = flatmatrix[3];
25137 if (flatmatrix.length > 5) {
25138 this.m02 = flatmatrix[4];
25139 this.m12 = flatmatrix[5];
25140 }
25141 this.updateState();
25142 }
25143 return;
25144 case 6:
25145 this.m00 = m00;
25146 this.m10 = m10;
25147 this.m01 = m01;
25148 this.m11 = m11;
25149 this.m02 = m02;
25150 this.m12 = m12;
25151 this.updateState();
25152 return;
25153 }
25154 }this.m00 = m00;
25155 this.m10 = m10;
25156 this.m01 = m01;
25157 this.m11 = m11;
25158 this.m02 = m02;
25159 this.m12 = m12;
25160 this.state = state;
25161 this.type = -1;
25162 }, "~N,~N,~N,~N,~N,~N,~N");
25163 c$.getTranslateInstance = Clazz_defineMethod (c$, "getTranslateInstance", 
25164 function (tx, ty) {
25165 var Tx =  new java.awt.geom.AffineTransform ();
25166 Tx.setToTranslation (tx, ty);
25167 return Tx;
25168 }, "~N,~N");
25169 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25170 function (theta) {
25171 var Tx =  new java.awt.geom.AffineTransform ();
25172 Tx.setToRotation (theta);
25173 return Tx;
25174 }, "~N");
25175 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25176 function (theta, anchorx, anchory) {
25177 var Tx =  new java.awt.geom.AffineTransform ();
25178 Tx.setToRotation (theta, anchorx, anchory);
25179 return Tx;
25180 }, "~N,~N,~N");
25181 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25182 function (vecx, vecy) {
25183 var Tx =  new java.awt.geom.AffineTransform ();
25184 Tx.setToRotation (vecx, vecy);
25185 return Tx;
25186 }, "~N,~N");
25187 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25188 function (vecx, vecy, anchorx, anchory) {
25189 var Tx =  new java.awt.geom.AffineTransform ();
25190 Tx.setToRotation (vecx, vecy, anchorx, anchory);
25191 return Tx;
25192 }, "~N,~N,~N,~N");
25193 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25194 function (numquadrants) {
25195 var Tx =  new java.awt.geom.AffineTransform ();
25196 Tx.setToQuadrantRotation (numquadrants);
25197 return Tx;
25198 }, "~N");
25199 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25200 function (numquadrants, anchorx, anchory) {
25201 var Tx =  new java.awt.geom.AffineTransform ();
25202 Tx.setToQuadrantRotation (numquadrants, anchorx, anchory);
25203 return Tx;
25204 }, "~N,~N,~N");
25205 c$.getScaleInstance = Clazz_defineMethod (c$, "getScaleInstance", 
25206 function (sx, sy) {
25207 var Tx =  new java.awt.geom.AffineTransform ();
25208 Tx.setToScale (sx, sy);
25209 return Tx;
25210 }, "~N,~N");
25211 c$.getShearInstance = Clazz_defineMethod (c$, "getShearInstance", 
25212 function (shx, shy) {
25213 var Tx =  new java.awt.geom.AffineTransform ();
25214 Tx.setToShear (shx, shy);
25215 return Tx;
25216 }, "~N,~N");
25217 Clazz_defineMethod (c$, "getType", 
25218 function () {
25219 if (this.type == -1) {
25220 this.calculateType ();
25221 }return this.type;
25222 });
25223 Clazz_defineMethod (c$, "calculateType", 
25224  function () {
25225 var ret = 0;
25226 var sgn0;
25227 var sgn1;
25228 var M0;
25229 var M1;
25230 var M2;
25231 var M3;
25232 this.updateState ();
25233 switch (this.state) {
25234 default:
25235 this.stateError ();
25236 case (7):
25237 ret = 1;
25238 case (6):
25239 if ((M0 = this.m00) * (M2 = this.m01) + (M3 = this.m10) * (M1 = this.m11) != 0) {
25240 this.type = 32;
25241 return;
25242 }sgn0 = (M0 >= 0.0);
25243 sgn1 = (M1 >= 0.0);
25244 if (sgn0 == sgn1) {
25245 if (M0 != M1 || M2 != -M3) {
25246 ret |= (20);
25247 } else if (M0 * M1 - M2 * M3 != 1.0) {
25248 ret |= (18);
25249 } else {
25250 ret |= 16;
25251 }} else {
25252 if (M0 != -M1 || M2 != M3) {
25253 ret |= (84);
25254 } else if (M0 * M1 - M2 * M3 != 1.0) {
25255 ret |= (82);
25256 } else {
25257 ret |= (80);
25258 }}break;
25259 case (5):
25260 ret = 1;
25261 case (4):
25262 sgn0 = ((M0 = this.m01) >= 0.0);
25263 sgn1 = ((M1 = this.m10) >= 0.0);
25264 if (sgn0 != sgn1) {
25265 if (M0 != -M1) {
25266 ret |= (12);
25267 } else if (M0 != 1.0 && M0 != -1.0) {
25268 ret |= (10);
25269 } else {
25270 ret |= 8;
25271 }} else {
25272 if (M0 == M1) {
25273 ret |= (74);
25274 } else {
25275 ret |= (76);
25276 }}break;
25277 case (3):
25278 ret = 1;
25279 case (2):
25280 sgn0 = ((M0 = this.m00) >= 0.0);
25281 sgn1 = ((M1 = this.m11) >= 0.0);
25282 if (sgn0 == sgn1) {
25283 if (sgn0) {
25284 if (M0 == M1) {
25285 ret |= 2;
25286 } else {
25287 ret |= 4;
25288 }} else {
25289 if (M0 != M1) {
25290 ret |= (12);
25291 } else if (M0 != -1.0) {
25292 ret |= (10);
25293 } else {
25294 ret |= 8;
25295 }}} else {
25296 if (M0 == -M1) {
25297 if (M0 == 1.0 || M0 == -1.0) {
25298 ret |= 64;
25299 } else {
25300 ret |= (66);
25301 }} else {
25302 ret |= (68);
25303 }}break;
25304 case (1):
25305 ret = 1;
25306 break;
25307 case (0):
25308 break;
25309 }
25310 this.type = ret;
25311 });
25312 Clazz_defineMethod (c$, "getDeterminant", 
25313 function () {
25314 switch (this.state) {
25315 default:
25316 this.stateError ();
25317 case (7):
25318 case (6):
25319 return this.m00 * this.m11 - this.m01 * this.m10;
25320 case (5):
25321 case (4):
25322 return -(this.m01 * this.m10);
25323 case (3):
25324 case (2):
25325 return this.m00 * this.m11;
25326 case (1):
25327 case (0):
25328 return 1.0;
25329 }
25330 });
25331 Clazz_defineMethod (c$, "updateState", 
25332 function () {
25333 if (this.m01 == 0.0 && this.m10 == 0.0) {
25334 if (this.m00 == 1.0 && this.m11 == 1.0) {
25335 if (this.m02 == 0.0 && this.m12 == 0.0) {
25336 this.state = 0;
25337 this.type = 0;
25338 } else {
25339 this.state = 1;
25340 this.type = 1;
25341 }} else {
25342 if (this.m02 == 0.0 && this.m12 == 0.0) {
25343 this.state = 2;
25344 this.type = -1;
25345 } else {
25346 this.state = (3);
25347 this.type = -1;
25348 }}} else {
25349 if (this.m00 == 0.0 && this.m11 == 0.0) {
25350 if (this.m02 == 0.0 && this.m12 == 0.0) {
25351 this.state = 4;
25352 this.type = -1;
25353 } else {
25354 this.state = (5);
25355 this.type = -1;
25356 }} else {
25357 if (this.m02 == 0.0 && this.m12 == 0.0) {
25358 this.state = (6);
25359 this.type = -1;
25360 } else {
25361 this.state = (7);
25362 this.type = -1;
25363 }}}});
25364 Clazz_defineMethod (c$, "stateError", 
25365  function () {
25366 throw  new InternalError ("missing case in transform state switch");
25367 });
25368 Clazz_defineMethod (c$, "getMatrix", 
25369 function (flatmatrix) {
25370 flatmatrix[0] = this.m00;
25371 flatmatrix[1] = this.m10;
25372 flatmatrix[2] = this.m01;
25373 flatmatrix[3] = this.m11;
25374 if (flatmatrix.length > 5) {
25375 flatmatrix[4] = this.m02;
25376 flatmatrix[5] = this.m12;
25377 }}, "~A");
25378 Clazz_defineMethod (c$, "getScaleX", 
25379 function () {
25380 return this.m00;
25381 });
25382 Clazz_defineMethod (c$, "getScaleY", 
25383 function () {
25384 return this.m11;
25385 });
25386 Clazz_defineMethod (c$, "getShearX", 
25387 function () {
25388 return this.m01;
25389 });
25390 Clazz_defineMethod (c$, "getShearY", 
25391 function () {
25392 return this.m10;
25393 });
25394 Clazz_defineMethod (c$, "getTranslateX", 
25395 function () {
25396 return this.m02;
25397 });
25398 Clazz_defineMethod (c$, "getTranslateY", 
25399 function () {
25400 return this.m12;
25401 });
25402 Clazz_defineMethod (c$, "translate", 
25403 function (tx, ty) {
25404 switch (this.state) {
25405 default:
25406 this.stateError ();
25407 case (7):
25408 this.m02 = tx * this.m00 + ty * this.m01 + this.m02;
25409 this.m12 = tx * this.m10 + ty * this.m11 + this.m12;
25410 if (this.m02 == 0.0 && this.m12 == 0.0) {
25411 this.state = 6;
25412 if (this.type != -1) {
25413 this.type -= 1;
25414 }}return;
25415 case (6):
25416 this.m02 = tx * this.m00 + ty * this.m01;
25417 this.m12 = tx * this.m10 + ty * this.m11;
25418 if (this.m02 != 0.0 || this.m12 != 0.0) {
25419 this.state = 7;
25420 this.type |= 1;
25421 }return;
25422 case (5):
25423 this.m02 = ty * this.m01 + this.m02;
25424 this.m12 = tx * this.m10 + this.m12;
25425 if (this.m02 == 0.0 && this.m12 == 0.0) {
25426 this.state = 4;
25427 if (this.type != -1) {
25428 this.type -= 1;
25429 }}return;
25430 case (4):
25431 this.m02 = ty * this.m01;
25432 this.m12 = tx * this.m10;
25433 if (this.m02 != 0.0 || this.m12 != 0.0) {
25434 this.state = 5;
25435 this.type |= 1;
25436 }return;
25437 case (3):
25438 this.m02 = tx * this.m00 + this.m02;
25439 this.m12 = ty * this.m11 + this.m12;
25440 if (this.m02 == 0.0 && this.m12 == 0.0) {
25441 this.state = 2;
25442 if (this.type != -1) {
25443 this.type -= 1;
25444 }}return;
25445 case (2):
25446 this.m02 = tx * this.m00;
25447 this.m12 = ty * this.m11;
25448 if (this.m02 != 0.0 || this.m12 != 0.0) {
25449 this.state = 3;
25450 this.type |= 1;
25451 }return;
25452 case (1):
25453 this.m02 = tx + this.m02;
25454 this.m12 = ty + this.m12;
25455 if (this.m02 == 0.0 && this.m12 == 0.0) {
25456 this.state = 0;
25457 this.type = 0;
25458 }return;
25459 case (0):
25460 this.m02 = tx;
25461 this.m12 = ty;
25462 if (tx != 0.0 || ty != 0.0) {
25463 this.state = 1;
25464 this.type = 1;
25465 }return;
25466 }
25467 }, "~N,~N");
25468 Clazz_defineMethod (c$, "rotate90", 
25469  function () {
25470 var M0 = this.m00;
25471 this.m00 = this.m01;
25472 this.m01 = -M0;
25473 M0 = this.m10;
25474 this.m10 = this.m11;
25475 this.m11 = -M0;
25476 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25477 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25478 state -= 2;
25479 }this.state = state;
25480 this.type = -1;
25481 });
25482 Clazz_defineMethod (c$, "rotate180", 
25483  function () {
25484 this.m00 = -this.m00;
25485 this.m11 = -this.m11;
25486 var state = this.state;
25487 if ((state & (4)) != 0) {
25488 this.m01 = -this.m01;
25489 this.m10 = -this.m10;
25490 } else {
25491 if (this.m00 == 1.0 && this.m11 == 1.0) {
25492 this.state = state & -3;
25493 } else {
25494 this.state = state | 2;
25495 }}this.type = -1;
25496 });
25497 Clazz_defineMethod (c$, "rotate270", 
25498  function () {
25499 var M0 = this.m00;
25500 this.m00 = -this.m01;
25501 this.m01 = M0;
25502 M0 = this.m10;
25503 this.m10 = -this.m11;
25504 this.m11 = M0;
25505 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25506 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25507 state -= 2;
25508 }this.state = state;
25509 this.type = -1;
25510 });
25511 Clazz_defineMethod (c$, "rotate", 
25512 function (theta) {
25513 var sin = Math.sin (theta);
25514 if (sin == 1.0) {
25515 this.rotate90 ();
25516 } else if (sin == -1.0) {
25517 this.rotate270 ();
25518 } else {
25519 var cos = Math.cos (theta);
25520 if (cos == -1.0) {
25521 this.rotate180 ();
25522 } else if (cos != 1.0) {
25523 var M0;
25524 var M1;
25525 M0 = this.m00;
25526 M1 = this.m01;
25527 this.m00 = cos * M0 + sin * M1;
25528 this.m01 = -sin * M0 + cos * M1;
25529 M0 = this.m10;
25530 M1 = this.m11;
25531 this.m10 = cos * M0 + sin * M1;
25532 this.m11 = -sin * M0 + cos * M1;
25533 this.updateState ();
25534 }}}, "~N");
25535 Clazz_defineMethod (c$, "rotate", 
25536 function (theta, anchorx, anchory) {
25537 this.translate (anchorx, anchory);
25538 this.rotate (theta);
25539 this.translate (-anchorx, -anchory);
25540 }, "~N,~N,~N");
25541 Clazz_defineMethod (c$, "rotate", 
25542 function (vecx, vecy) {
25543 if (vecy == 0.0) {
25544 if (vecx < 0.0) {
25545 this.rotate180 ();
25546 }} else if (vecx == 0.0) {
25547 if (vecy > 0.0) {
25548 this.rotate90 ();
25549 } else {
25550 this.rotate270 ();
25551 }} else {
25552 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25553 var sin = vecy / len;
25554 var cos = vecx / len;
25555 var M0;
25556 var M1;
25557 M0 = this.m00;
25558 M1 = this.m01;
25559 this.m00 = cos * M0 + sin * M1;
25560 this.m01 = -sin * M0 + cos * M1;
25561 M0 = this.m10;
25562 M1 = this.m11;
25563 this.m10 = cos * M0 + sin * M1;
25564 this.m11 = -sin * M0 + cos * M1;
25565 this.updateState ();
25566 }}, "~N,~N");
25567 Clazz_defineMethod (c$, "rotate", 
25568 function (vecx, vecy, anchorx, anchory) {
25569 this.translate (anchorx, anchory);
25570 this.rotate (vecx, vecy);
25571 this.translate (-anchorx, -anchory);
25572 }, "~N,~N,~N,~N");
25573 Clazz_defineMethod (c$, "quadrantRotate", 
25574 function (numquadrants) {
25575 switch (numquadrants & 3) {
25576 case 0:
25577 break;
25578 case 1:
25579 this.rotate90 ();
25580 break;
25581 case 2:
25582 this.rotate180 ();
25583 break;
25584 case 3:
25585 this.rotate270 ();
25586 break;
25587 }
25588 }, "~N");
25589 Clazz_defineMethod (c$, "quadrantRotate", 
25590 function (numquadrants, anchorx, anchory) {
25591 switch (numquadrants & 3) {
25592 case 0:
25593 return;
25594 case 1:
25595 this.m02 += anchorx * (this.m00 - this.m01) + anchory * (this.m01 + this.m00);
25596 this.m12 += anchorx * (this.m10 - this.m11) + anchory * (this.m11 + this.m10);
25597 this.rotate90 ();
25598 break;
25599 case 2:
25600 this.m02 += anchorx * (this.m00 + this.m00) + anchory * (this.m01 + this.m01);
25601 this.m12 += anchorx * (this.m10 + this.m10) + anchory * (this.m11 + this.m11);
25602 this.rotate180 ();
25603 break;
25604 case 3:
25605 this.m02 += anchorx * (this.m00 + this.m01) + anchory * (this.m01 - this.m00);
25606 this.m12 += anchorx * (this.m10 + this.m11) + anchory * (this.m11 - this.m10);
25607 this.rotate270 ();
25608 break;
25609 }
25610 if (this.m02 == 0.0 && this.m12 == 0.0) {
25611 this.state &= -2;
25612 } else {
25613 this.state |= 1;
25614 }}, "~N,~N,~N");
25615 Clazz_defineMethod (c$, "scale", 
25616 function (sx, sy) {
25617 var state = this.state;
25618 switch (state) {
25619 default:
25620 this.stateError ();
25621 case (7):
25622 case (6):
25623 this.m00 *= sx;
25624 this.m11 *= sy;
25625 case (5):
25626 case (4):
25627 this.m01 *= sy;
25628 this.m10 *= sx;
25629 if (this.m01 == 0 && this.m10 == 0) {
25630 state &= 1;
25631 if (this.m00 == 1.0 && this.m11 == 1.0) {
25632 this.type = (state == 0 ? 0 : 1);
25633 } else {
25634 state |= 2;
25635 this.type = -1;
25636 }this.state = state;
25637 }return;
25638 case (3):
25639 case (2):
25640 this.m00 *= sx;
25641 this.m11 *= sy;
25642 if (this.m00 == 1.0 && this.m11 == 1.0) {
25643 this.state = (state &= 1);
25644 this.type = (state == 0 ? 0 : 1);
25645 } else {
25646 this.type = -1;
25647 }return;
25648 case (1):
25649 case (0):
25650 this.m00 = sx;
25651 this.m11 = sy;
25652 if (sx != 1.0 || sy != 1.0) {
25653 this.state = state | 2;
25654 this.type = -1;
25655 }return;
25656 }
25657 }, "~N,~N");
25658 Clazz_defineMethod (c$, "shear", 
25659 function (shx, shy) {
25660 var state = this.state;
25661 switch (state) {
25662 default:
25663 this.stateError ();
25664 case (7):
25665 case (6):
25666 var M0;
25667 var M1;
25668 M0 = this.m00;
25669 M1 = this.m01;
25670 this.m00 = M0 + M1 * shy;
25671 this.m01 = M0 * shx + M1;
25672 M0 = this.m10;
25673 M1 = this.m11;
25674 this.m10 = M0 + M1 * shy;
25675 this.m11 = M0 * shx + M1;
25676 this.updateState ();
25677 return;
25678 case (5):
25679 case (4):
25680 this.m00 = this.m01 * shy;
25681 this.m11 = this.m10 * shx;
25682 if (this.m00 != 0.0 || this.m11 != 0.0) {
25683 this.state = state | 2;
25684 }this.type = -1;
25685 return;
25686 case (3):
25687 case (2):
25688 this.m01 = this.m00 * shx;
25689 this.m10 = this.m11 * shy;
25690 if (this.m01 != 0.0 || this.m10 != 0.0) {
25691 this.state = state | 4;
25692 }this.type = -1;
25693 return;
25694 case (1):
25695 case (0):
25696 this.m01 = shx;
25697 this.m10 = shy;
25698 if (this.m01 != 0.0 || this.m10 != 0.0) {
25699 this.state = state | 2 | 4;
25700 this.type = -1;
25701 }return;
25702 }
25703 }, "~N,~N");
25704 Clazz_defineMethod (c$, "setToIdentity", 
25705 function () {
25706 this.m00 = this.m11 = 1.0;
25707 this.m10 = this.m01 = this.m02 = this.m12 = 0.0;
25708 this.state = 0;
25709 this.type = 0;
25710 });
25711 Clazz_defineMethod (c$, "setToTranslation", 
25712 function (tx, ty) {
25713 this.m00 = 1.0;
25714 this.m10 = 0.0;
25715 this.m01 = 0.0;
25716 this.m11 = 1.0;
25717 this.m02 = tx;
25718 this.m12 = ty;
25719 if (tx != 0.0 || ty != 0.0) {
25720 this.state = 1;
25721 this.type = 1;
25722 } else {
25723 this.state = 0;
25724 this.type = 0;
25725 }}, "~N,~N");
25726 Clazz_defineMethod (c$, "setToRotation", 
25727 function (theta) {
25728 var sin = Math.sin (theta);
25729 var cos;
25730 if (sin == 1.0 || sin == -1.0) {
25731 cos = 0.0;
25732 this.state = 4;
25733 this.type = 8;
25734 } else {
25735 cos = Math.cos (theta);
25736 if (cos == -1.0) {
25737 sin = 0.0;
25738 this.state = 2;
25739 this.type = 8;
25740 } else if (cos == 1.0) {
25741 sin = 0.0;
25742 this.state = 0;
25743 this.type = 0;
25744 } else {
25745 this.state = 6;
25746 this.type = 16;
25747 }}this.m00 = cos;
25748 this.m10 = sin;
25749 this.m01 = -sin;
25750 this.m11 = cos;
25751 this.m02 = 0.0;
25752 this.m12 = 0.0;
25753 }, "~N");
25754 Clazz_defineMethod (c$, "setToRotation", 
25755 function (theta, anchorx, anchory) {
25756 this.setToRotation (theta);
25757 var sin = this.m10;
25758 var oneMinusCos = 1.0 - this.m00;
25759 this.m02 = anchorx * oneMinusCos + anchory * sin;
25760 this.m12 = anchory * oneMinusCos - anchorx * sin;
25761 if (this.m02 != 0.0 || this.m12 != 0.0) {
25762 this.state |= 1;
25763 this.type |= 1;
25764 }}, "~N,~N,~N");
25765 Clazz_defineMethod (c$, "setToRotation", 
25766 function (vecx, vecy) {
25767 var sin;
25768 var cos;
25769 if (vecy == 0) {
25770 sin = 0.0;
25771 if (vecx < 0.0) {
25772 cos = -1.0;
25773 this.state = 2;
25774 this.type = 8;
25775 } else {
25776 cos = 1.0;
25777 this.state = 0;
25778 this.type = 0;
25779 }} else if (vecx == 0) {
25780 cos = 0.0;
25781 sin = (vecy > 0.0) ? 1.0 : -1.0;
25782 this.state = 4;
25783 this.type = 8;
25784 } else {
25785 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25786 cos = vecx / len;
25787 sin = vecy / len;
25788 this.state = 6;
25789 this.type = 16;
25790 }this.m00 = cos;
25791 this.m10 = sin;
25792 this.m01 = -sin;
25793 this.m11 = cos;
25794 this.m02 = 0.0;
25795 this.m12 = 0.0;
25796 }, "~N,~N");
25797 Clazz_defineMethod (c$, "setToRotation", 
25798 function (vecx, vecy, anchorx, anchory) {
25799 this.setToRotation (vecx, vecy);
25800 var sin = this.m10;
25801 var oneMinusCos = 1.0 - this.m00;
25802 this.m02 = anchorx * oneMinusCos + anchory * sin;
25803 this.m12 = anchory * oneMinusCos - anchorx * sin;
25804 if (this.m02 != 0.0 || this.m12 != 0.0) {
25805 this.state |= 1;
25806 this.type |= 1;
25807 }}, "~N,~N,~N,~N");
25808 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25809 function (numquadrants) {
25810 switch (numquadrants & 3) {
25811 case 0:
25812 this.m00 = 1.0;
25813 this.m10 = 0.0;
25814 this.m01 = 0.0;
25815 this.m11 = 1.0;
25816 this.m02 = 0.0;
25817 this.m12 = 0.0;
25818 this.state = 0;
25819 this.type = 0;
25820 break;
25821 case 1:
25822 this.m00 = 0.0;
25823 this.m10 = 1.0;
25824 this.m01 = -1.0;
25825 this.m11 = 0.0;
25826 this.m02 = 0.0;
25827 this.m12 = 0.0;
25828 this.state = 4;
25829 this.type = 8;
25830 break;
25831 case 2:
25832 this.m00 = -1.0;
25833 this.m10 = 0.0;
25834 this.m01 = 0.0;
25835 this.m11 = -1.0;
25836 this.m02 = 0.0;
25837 this.m12 = 0.0;
25838 this.state = 2;
25839 this.type = 8;
25840 break;
25841 case 3:
25842 this.m00 = 0.0;
25843 this.m10 = -1.0;
25844 this.m01 = 1.0;
25845 this.m11 = 0.0;
25846 this.m02 = 0.0;
25847 this.m12 = 0.0;
25848 this.state = 4;
25849 this.type = 8;
25850 break;
25851 }
25852 }, "~N");
25853 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25854 function (numquadrants, anchorx, anchory) {
25855 switch (numquadrants & 3) {
25856 case 0:
25857 this.m00 = 1.0;
25858 this.m10 = 0.0;
25859 this.m01 = 0.0;
25860 this.m11 = 1.0;
25861 this.m02 = 0.0;
25862 this.m12 = 0.0;
25863 this.state = 0;
25864 this.type = 0;
25865 break;
25866 case 1:
25867 this.m00 = 0.0;
25868 this.m10 = 1.0;
25869 this.m01 = -1.0;
25870 this.m11 = 0.0;
25871 this.m02 = anchorx + anchory;
25872 this.m12 = anchory - anchorx;
25873 if (this.m02 == 0.0 && this.m12 == 0.0) {
25874 this.state = 4;
25875 this.type = 8;
25876 } else {
25877 this.state = 5;
25878 this.type = 9;
25879 }break;
25880 case 2:
25881 this.m00 = -1.0;
25882 this.m10 = 0.0;
25883 this.m01 = 0.0;
25884 this.m11 = -1.0;
25885 this.m02 = anchorx + anchorx;
25886 this.m12 = anchory + anchory;
25887 if (this.m02 == 0.0 && this.m12 == 0.0) {
25888 this.state = 2;
25889 this.type = 8;
25890 } else {
25891 this.state = 3;
25892 this.type = 9;
25893 }break;
25894 case 3:
25895 this.m00 = 0.0;
25896 this.m10 = -1.0;
25897 this.m01 = 1.0;
25898 this.m11 = 0.0;
25899 this.m02 = anchorx - anchory;
25900 this.m12 = anchory + anchorx;
25901 if (this.m02 == 0.0 && this.m12 == 0.0) {
25902 this.state = 4;
25903 this.type = 8;
25904 } else {
25905 this.state = 5;
25906 this.type = 9;
25907 }break;
25908 }
25909 }, "~N,~N,~N");
25910 Clazz_defineMethod (c$, "setToScale", 
25911 function (sx, sy) {
25912 this.m00 = sx;
25913 this.m10 = 0.0;
25914 this.m01 = 0.0;
25915 this.m11 = sy;
25916 this.m02 = 0.0;
25917 this.m12 = 0.0;
25918 if (sx != 1.0 || sy != 1.0) {
25919 this.state = 2;
25920 this.type = -1;
25921 } else {
25922 this.state = 0;
25923 this.type = 0;
25924 }}, "~N,~N");
25925 Clazz_defineMethod (c$, "setToShear", 
25926 function (shx, shy) {
25927 this.m00 = 1.0;
25928 this.m01 = shx;
25929 this.m10 = shy;
25930 this.m11 = 1.0;
25931 this.m02 = 0.0;
25932 this.m12 = 0.0;
25933 if (shx != 0.0 || shy != 0.0) {
25934 this.state = (6);
25935 this.type = -1;
25936 } else {
25937 this.state = 0;
25938 this.type = 0;
25939 }}, "~N,~N");
25940 Clazz_defineMethod (c$, "setTransform", 
25941 function (Tx) {
25942 this.m00 = Tx.m00;
25943 this.m10 = Tx.m10;
25944 this.m01 = Tx.m01;
25945 this.m11 = Tx.m11;
25946 this.m02 = Tx.m02;
25947 this.m12 = Tx.m12;
25948 this.state = Tx.state;
25949 this.type = Tx.type;
25950 }, "java.awt.geom.AffineTransform");
25951 Clazz_defineMethod (c$, "setTransform", 
25952 function (m00, m10, m01, m11, m02, m12) {
25953 this.m00 = m00;
25954 this.m10 = m10;
25955 this.m01 = m01;
25956 this.m11 = m11;
25957 this.m02 = m02;
25958 this.m12 = m12;
25959 this.updateState ();
25960 }, "~N,~N,~N,~N,~N,~N");
25961 Clazz_defineMethod (c$, "concatenate", 
25962 function (Tx) {
25963 var M0;
25964 var M1;
25965 var T00;
25966 var T01;
25967 var T10;
25968 var T11;
25969 var T02;
25970 var T12;
25971 var mystate = this.state;
25972 var txstate = Tx.state;
25973 switch ((txstate << 3) | mystate) {
25974 case (0):
25975 case (1):
25976 case (2):
25977 case (3):
25978 case (4):
25979 case (5):
25980 case (6):
25981 case (7):
25982 return;
25983 case (56):
25984 this.m01 = Tx.m01;
25985 this.m10 = Tx.m10;
25986 case (24):
25987 this.m00 = Tx.m00;
25988 this.m11 = Tx.m11;
25989 case (8):
25990 this.m02 = Tx.m02;
25991 this.m12 = Tx.m12;
25992 this.state = txstate;
25993 this.type = Tx.type;
25994 return;
25995 case (48):
25996 this.m01 = Tx.m01;
25997 this.m10 = Tx.m10;
25998 case (16):
25999 this.m00 = Tx.m00;
26000 this.m11 = Tx.m11;
26001 this.state = txstate;
26002 this.type = Tx.type;
26003 return;
26004 case (40):
26005 this.m02 = Tx.m02;
26006 this.m12 = Tx.m12;
26007 case (32):
26008 this.m01 = Tx.m01;
26009 this.m10 = Tx.m10;
26010 this.m00 = this.m11 = 0.0;
26011 this.state = txstate;
26012 this.type = Tx.type;
26013 return;
26014 case (15):
26015 case (14):
26016 case (13):
26017 case (12):
26018 case (11):
26019 case (10):
26020 case (9):
26021 this.translate (Tx.m02, Tx.m12);
26022 return;
26023 case (23):
26024 case (22):
26025 case (21):
26026 case (20):
26027 case (19):
26028 case (18):
26029 case (17):
26030 this.scale (Tx.m00, Tx.m11);
26031 return;
26032 case (39):
26033 case (38):
26034 T01 = Tx.m01;
26035 T10 = Tx.m10;
26036 M0 = this.m00;
26037 this.m00 = this.m01 * T10;
26038 this.m01 = M0 * T01;
26039 M0 = this.m10;
26040 this.m10 = this.m11 * T10;
26041 this.m11 = M0 * T01;
26042 this.type = -1;
26043 return;
26044 case (37):
26045 case (36):
26046 this.m00 = this.m01 * Tx.m10;
26047 this.m01 = 0.0;
26048 this.m11 = this.m10 * Tx.m01;
26049 this.m10 = 0.0;
26050 this.state = mystate ^ (6);
26051 this.type = -1;
26052 return;
26053 case (35):
26054 case (34):
26055 this.m01 = this.m00 * Tx.m01;
26056 this.m00 = 0.0;
26057 this.m10 = this.m11 * Tx.m10;
26058 this.m11 = 0.0;
26059 this.state = mystate ^ (6);
26060 this.type = -1;
26061 return;
26062 case (33):
26063 this.m00 = 0.0;
26064 this.m01 = Tx.m01;
26065 this.m10 = Tx.m10;
26066 this.m11 = 0.0;
26067 this.state = 5;
26068 this.type = -1;
26069 return;
26070 }
26071 T00 = Tx.m00;
26072 T01 = Tx.m01;
26073 T02 = Tx.m02;
26074 T10 = Tx.m10;
26075 T11 = Tx.m11;
26076 T12 = Tx.m12;
26077 switch (mystate) {
26078 default:
26079 this.stateError ();
26080 case (6):
26081 this.state = mystate | txstate;
26082 case (7):
26083 M0 = this.m00;
26084 M1 = this.m01;
26085 this.m00 = T00 * M0 + T10 * M1;
26086 this.m01 = T01 * M0 + T11 * M1;
26087 this.m02 += T02 * M0 + T12 * M1;
26088 M0 = this.m10;
26089 M1 = this.m11;
26090 this.m10 = T00 * M0 + T10 * M1;
26091 this.m11 = T01 * M0 + T11 * M1;
26092 this.m12 += T02 * M0 + T12 * M1;
26093 this.type = -1;
26094 return;
26095 case (5):
26096 case (4):
26097 M0 = this.m01;
26098 this.m00 = T10 * M0;
26099 this.m01 = T11 * M0;
26100 this.m02 += T12 * M0;
26101 M0 = this.m10;
26102 this.m10 = T00 * M0;
26103 this.m11 = T01 * M0;
26104 this.m12 += T02 * M0;
26105 break;
26106 case (3):
26107 case (2):
26108 M0 = this.m00;
26109 this.m00 = T00 * M0;
26110 this.m01 = T01 * M0;
26111 this.m02 += T02 * M0;
26112 M0 = this.m11;
26113 this.m10 = T10 * M0;
26114 this.m11 = T11 * M0;
26115 this.m12 += T12 * M0;
26116 break;
26117 case (1):
26118 this.m00 = T00;
26119 this.m01 = T01;
26120 this.m02 += T02;
26121 this.m10 = T10;
26122 this.m11 = T11;
26123 this.m12 += T12;
26124 this.state = txstate | 1;
26125 this.type = -1;
26126 return;
26127 }
26128 this.updateState ();
26129 }, "java.awt.geom.AffineTransform");
26130 Clazz_defineMethod (c$, "preConcatenate", 
26131 function (Tx) {
26132 var M0;
26133 var M1;
26134 var T00;
26135 var T01;
26136 var T10;
26137 var T11;
26138 var T02;
26139 var T12;
26140 var mystate = this.state;
26141 var txstate = Tx.state;
26142 switch ((txstate << 3) | mystate) {
26143 case (0):
26144 case (1):
26145 case (2):
26146 case (3):
26147 case (4):
26148 case (5):
26149 case (6):
26150 case (7):
26151 return;
26152 case (8):
26153 case (10):
26154 case (12):
26155 case (14):
26156 this.m02 = Tx.m02;
26157 this.m12 = Tx.m12;
26158 this.state = mystate | 1;
26159 this.type |= 1;
26160 return;
26161 case (9):
26162 case (11):
26163 case (13):
26164 case (15):
26165 this.m02 = this.m02 + Tx.m02;
26166 this.m12 = this.m12 + Tx.m12;
26167 return;
26168 case (17):
26169 case (16):
26170 this.state = mystate | 2;
26171 case (23):
26172 case (22):
26173 case (21):
26174 case (20):
26175 case (19):
26176 case (18):
26177 T00 = Tx.m00;
26178 T11 = Tx.m11;
26179 if ((mystate & 4) != 0) {
26180 this.m01 = this.m01 * T00;
26181 this.m10 = this.m10 * T11;
26182 if ((mystate & 2) != 0) {
26183 this.m00 = this.m00 * T00;
26184 this.m11 = this.m11 * T11;
26185 }} else {
26186 this.m00 = this.m00 * T00;
26187 this.m11 = this.m11 * T11;
26188 }if ((mystate & 1) != 0) {
26189 this.m02 = this.m02 * T00;
26190 this.m12 = this.m12 * T11;
26191 }this.type = -1;
26192 return;
26193 case (37):
26194 case (36):
26195 mystate = mystate | 2;
26196 case (33):
26197 case (32):
26198 case (35):
26199 case (34):
26200 this.state = mystate ^ 4;
26201 case (39):
26202 case (38):
26203 T01 = Tx.m01;
26204 T10 = Tx.m10;
26205 M0 = this.m00;
26206 this.m00 = this.m10 * T01;
26207 this.m10 = M0 * T10;
26208 M0 = this.m01;
26209 this.m01 = this.m11 * T01;
26210 this.m11 = M0 * T10;
26211 M0 = this.m02;
26212 this.m02 = this.m12 * T01;
26213 this.m12 = M0 * T10;
26214 this.type = -1;
26215 return;
26216 }
26217 T00 = Tx.m00;
26218 T01 = Tx.m01;
26219 T02 = Tx.m02;
26220 T10 = Tx.m10;
26221 T11 = Tx.m11;
26222 T12 = Tx.m12;
26223 switch (mystate) {
26224 default:
26225 this.stateError ();
26226 case (7):
26227 M0 = this.m02;
26228 M1 = this.m12;
26229 T02 += M0 * T00 + M1 * T01;
26230 T12 += M0 * T10 + M1 * T11;
26231 case (6):
26232 this.m02 = T02;
26233 this.m12 = T12;
26234 M0 = this.m00;
26235 M1 = this.m10;
26236 this.m00 = M0 * T00 + M1 * T01;
26237 this.m10 = M0 * T10 + M1 * T11;
26238 M0 = this.m01;
26239 M1 = this.m11;
26240 this.m01 = M0 * T00 + M1 * T01;
26241 this.m11 = M0 * T10 + M1 * T11;
26242 break;
26243 case (5):
26244 M0 = this.m02;
26245 M1 = this.m12;
26246 T02 += M0 * T00 + M1 * T01;
26247 T12 += M0 * T10 + M1 * T11;
26248 case (4):
26249 this.m02 = T02;
26250 this.m12 = T12;
26251 M0 = this.m10;
26252 this.m00 = M0 * T01;
26253 this.m10 = M0 * T11;
26254 M0 = this.m01;
26255 this.m01 = M0 * T00;
26256 this.m11 = M0 * T10;
26257 break;
26258 case (3):
26259 M0 = this.m02;
26260 M1 = this.m12;
26261 T02 += M0 * T00 + M1 * T01;
26262 T12 += M0 * T10 + M1 * T11;
26263 case (2):
26264 this.m02 = T02;
26265 this.m12 = T12;
26266 M0 = this.m00;
26267 this.m00 = M0 * T00;
26268 this.m10 = M0 * T10;
26269 M0 = this.m11;
26270 this.m01 = M0 * T01;
26271 this.m11 = M0 * T11;
26272 break;
26273 case (1):
26274 M0 = this.m02;
26275 M1 = this.m12;
26276 T02 += M0 * T00 + M1 * T01;
26277 T12 += M0 * T10 + M1 * T11;
26278 case (0):
26279 this.m02 = T02;
26280 this.m12 = T12;
26281 this.m00 = T00;
26282 this.m10 = T10;
26283 this.m01 = T01;
26284 this.m11 = T11;
26285 this.state = mystate | txstate;
26286 this.type = -1;
26287 return;
26288 }
26289 this.updateState ();
26290 }, "java.awt.geom.AffineTransform");
26291 Clazz_defineMethod (c$, "createInverse", 
26292 function () {
26293 var det;
26294 switch (this.state) {
26295 default:
26296 this.stateError ();
26297 case (7):
26298 det = this.m00 * this.m11 - this.m01 * this.m10;
26299 if (Math.abs (det) <= 4.9E-324) {
26300 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26301 }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));
26302 case (6):
26303 det = this.m00 * this.m11 - this.m01 * this.m10;
26304 if (Math.abs (det) <= 4.9E-324) {
26305 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26306 }return  new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, 0.0, 0.0, (6));
26307 case (5):
26308 if (this.m01 == 0.0 || this.m10 == 0.0) {
26309 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26310 }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));
26311 case (4):
26312 if (this.m01 == 0.0 || this.m10 == 0.0) {
26313 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26314 }return  new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, 0.0, 0.0, (4));
26315 case (3):
26316 if (this.m00 == 0.0 || this.m11 == 0.0) {
26317 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26318 }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));
26319 case (2):
26320 if (this.m00 == 0.0 || this.m11 == 0.0) {
26321 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26322 }return  new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, 0.0, 0.0, (2));
26323 case (1):
26324 return  new java.awt.geom.AffineTransform (1.0, 0.0, 0.0, 1.0, -this.m02, -this.m12, (1));
26325 case (0):
26326 return  new java.awt.geom.AffineTransform ();
26327 }
26328 });
26329 Clazz_defineMethod (c$, "invert", 
26330 function () {
26331 var M00;
26332 var M01;
26333 var M02;
26334 var M10;
26335 var M11;
26336 var M12;
26337 var det;
26338 switch (this.state) {
26339 default:
26340 this.stateError ();
26341 case (7):
26342 M00 = this.m00;
26343 M01 = this.m01;
26344 M02 = this.m02;
26345 M10 = this.m10;
26346 M11 = this.m11;
26347 M12 = this.m12;
26348 det = M00 * M11 - M01 * M10;
26349 if (Math.abs (det) <= 4.9E-324) {
26350 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26351 }this.m00 = M11 / det;
26352 this.m10 = -M10 / det;
26353 this.m01 = -M01 / det;
26354 this.m11 = M00 / det;
26355 this.m02 = (M01 * M12 - M11 * M02) / det;
26356 this.m12 = (M10 * M02 - M00 * M12) / det;
26357 break;
26358 case (6):
26359 M00 = this.m00;
26360 M01 = this.m01;
26361 M10 = this.m10;
26362 M11 = this.m11;
26363 det = M00 * M11 - M01 * M10;
26364 if (Math.abs (det) <= 4.9E-324) {
26365 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26366 }this.m00 = M11 / det;
26367 this.m10 = -M10 / det;
26368 this.m01 = -M01 / det;
26369 this.m11 = M00 / det;
26370 break;
26371 case (5):
26372 M01 = this.m01;
26373 M02 = this.m02;
26374 M10 = this.m10;
26375 M12 = this.m12;
26376 if (M01 == 0.0 || M10 == 0.0) {
26377 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26378 }this.m10 = 1.0 / M01;
26379 this.m01 = 1.0 / M10;
26380 this.m02 = -M12 / M10;
26381 this.m12 = -M02 / M01;
26382 break;
26383 case (4):
26384 M01 = this.m01;
26385 M10 = this.m10;
26386 if (M01 == 0.0 || M10 == 0.0) {
26387 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26388 }this.m10 = 1.0 / M01;
26389 this.m01 = 1.0 / M10;
26390 break;
26391 case (3):
26392 M00 = this.m00;
26393 M02 = this.m02;
26394 M11 = this.m11;
26395 M12 = this.m12;
26396 if (M00 == 0.0 || M11 == 0.0) {
26397 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26398 }this.m00 = 1.0 / M00;
26399 this.m11 = 1.0 / M11;
26400 this.m02 = -M02 / M00;
26401 this.m12 = -M12 / M11;
26402 break;
26403 case (2):
26404 M00 = this.m00;
26405 M11 = this.m11;
26406 if (M00 == 0.0 || M11 == 0.0) {
26407 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26408 }this.m00 = 1.0 / M00;
26409 this.m11 = 1.0 / M11;
26410 break;
26411 case (1):
26412 this.m02 = -this.m02;
26413 this.m12 = -this.m12;
26414 break;
26415 case (0):
26416 break;
26417 }
26418 });
26419 Clazz_defineMethod (c$, "transform", 
26420 function (ptSrc, ptDst) {
26421 if (ptDst == null) {
26422 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26423 ptDst =  new java.awt.geom.Point2D.Double ();
26424 } else {
26425 ptDst =  new java.awt.geom.Point2D.Float ();
26426 }}var x = ptSrc.getX ();
26427 var y = ptSrc.getY ();
26428 switch (this.state) {
26429 default:
26430 this.stateError ();
26431 case (7):
26432 ptDst.setLocation (x * this.m00 + y * this.m01 + this.m02, x * this.m10 + y * this.m11 + this.m12);
26433 return ptDst;
26434 case (6):
26435 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26436 return ptDst;
26437 case (5):
26438 ptDst.setLocation (y * this.m01 + this.m02, x * this.m10 + this.m12);
26439 return ptDst;
26440 case (4):
26441 ptDst.setLocation (y * this.m01, x * this.m10);
26442 return ptDst;
26443 case (3):
26444 ptDst.setLocation (x * this.m00 + this.m02, y * this.m11 + this.m12);
26445 return ptDst;
26446 case (2):
26447 ptDst.setLocation (x * this.m00, y * this.m11);
26448 return ptDst;
26449 case (1):
26450 ptDst.setLocation (x + this.m02, y + this.m12);
26451 return ptDst;
26452 case (0):
26453 ptDst.setLocation (x, y);
26454 return ptDst;
26455 }
26456 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26457 Clazz_defineMethod (c$, "transform", 
26458 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26459 if (numPts == 0) return;
26460 if (!JU.AU.isAD (srcPts)) {
26461 var src = srcPts;
26462 var dst = dstPts;
26463 this.transform (src, srcOff, dst, dstOff, numPts);
26464 return;
26465 }var M00;
26466 var M01;
26467 var M02;
26468 var M10;
26469 var M11;
26470 var M12;
26471 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26472 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26473 srcOff = dstOff;
26474 }switch (this.state) {
26475 default:
26476 this.stateError ();
26477 case (7):
26478 M00 = this.m00;
26479 M01 = this.m01;
26480 M02 = this.m02;
26481 M10 = this.m10;
26482 M11 = this.m11;
26483 M12 = this.m12;
26484 while (--numPts >= 0) {
26485 var x = srcPts[srcOff++];
26486 var y = srcPts[srcOff++];
26487 dstPts[dstOff++] = M00 * x + M01 * y + M02;
26488 dstPts[dstOff++] = M10 * x + M11 * y + M12;
26489 }
26490 return;
26491 case (6):
26492 M00 = this.m00;
26493 M01 = this.m01;
26494 M10 = this.m10;
26495 M11 = this.m11;
26496 while (--numPts >= 0) {
26497 var x = srcPts[srcOff++];
26498 var y = srcPts[srcOff++];
26499 dstPts[dstOff++] = M00 * x + M01 * y;
26500 dstPts[dstOff++] = M10 * x + M11 * y;
26501 }
26502 return;
26503 case (5):
26504 M01 = this.m01;
26505 M02 = this.m02;
26506 M10 = this.m10;
26507 M12 = this.m12;
26508 while (--numPts >= 0) {
26509 var x = srcPts[srcOff++];
26510 dstPts[dstOff++] = M01 * srcPts[srcOff++] + M02;
26511 dstPts[dstOff++] = M10 * x + M12;
26512 }
26513 return;
26514 case (4):
26515 M01 = this.m01;
26516 M10 = this.m10;
26517 while (--numPts >= 0) {
26518 var x = srcPts[srcOff++];
26519 dstPts[dstOff++] = M01 * srcPts[srcOff++];
26520 dstPts[dstOff++] = M10 * x;
26521 }
26522 return;
26523 case (3):
26524 M00 = this.m00;
26525 M02 = this.m02;
26526 M11 = this.m11;
26527 M12 = this.m12;
26528 while (--numPts >= 0) {
26529 dstPts[dstOff++] = M00 * srcPts[srcOff++] + M02;
26530 dstPts[dstOff++] = M11 * srcPts[srcOff++] + M12;
26531 }
26532 return;
26533 case (2):
26534 M00 = this.m00;
26535 M11 = this.m11;
26536 while (--numPts >= 0) {
26537 dstPts[dstOff++] = M00 * srcPts[srcOff++];
26538 dstPts[dstOff++] = M11 * srcPts[srcOff++];
26539 }
26540 return;
26541 case (1):
26542 M02 = this.m02;
26543 M12 = this.m12;
26544 while (--numPts >= 0) {
26545 dstPts[dstOff++] = srcPts[srcOff++] + M02;
26546 dstPts[dstOff++] = srcPts[srcOff++] + M12;
26547 }
26548 return;
26549 case (0):
26550 if (srcPts !== dstPts || srcOff != dstOff) {
26551 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26552 }return;
26553 }
26554 }, "~A,~N,~A,~N,~N");
26555 Clazz_defineMethod (c$, "inverseTransform", 
26556 function (ptSrc, ptDst) {
26557 if (ptDst == null) {
26558 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26559 ptDst =  new java.awt.geom.Point2D.Double ();
26560 } else {
26561 ptDst =  new java.awt.geom.Point2D.Float ();
26562 }}var x = ptSrc.getX ();
26563 var y = ptSrc.getY ();
26564 switch (this.state) {
26565 default:
26566 this.stateError ();
26567 case (7):
26568 x -= this.m02;
26569 y -= this.m12;
26570 case (6):
26571 var det = this.m00 * this.m11 - this.m01 * this.m10;
26572 if (Math.abs (det) <= 4.9E-324) {
26573 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26574 }ptDst.setLocation ((x * this.m11 - y * this.m01) / det, (y * this.m00 - x * this.m10) / det);
26575 return ptDst;
26576 case (5):
26577 x -= this.m02;
26578 y -= this.m12;
26579 case (4):
26580 if (this.m01 == 0.0 || this.m10 == 0.0) {
26581 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26582 }ptDst.setLocation (y / this.m10, x / this.m01);
26583 return ptDst;
26584 case (3):
26585 x -= this.m02;
26586 y -= this.m12;
26587 case (2):
26588 if (this.m00 == 0.0 || this.m11 == 0.0) {
26589 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26590 }ptDst.setLocation (x / this.m00, y / this.m11);
26591 return ptDst;
26592 case (1):
26593 ptDst.setLocation (x - this.m02, y - this.m12);
26594 return ptDst;
26595 case (0):
26596 ptDst.setLocation (x, y);
26597 return ptDst;
26598 }
26599 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26600 Clazz_defineMethod (c$, "inverseTransform", 
26601 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26602 var M00;
26603 var M01;
26604 var M02;
26605 var M10;
26606 var M11;
26607 var M12;
26608 var det;
26609 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26610 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26611 srcOff = dstOff;
26612 }switch (this.state) {
26613 default:
26614 this.stateError ();
26615 case (7):
26616 M00 = this.m00;
26617 M01 = this.m01;
26618 M02 = this.m02;
26619 M10 = this.m10;
26620 M11 = this.m11;
26621 M12 = this.m12;
26622 det = M00 * M11 - M01 * M10;
26623 if (Math.abs (det) <= 4.9E-324) {
26624 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26625 }while (--numPts >= 0) {
26626 var x = srcPts[srcOff++] - M02;
26627 var y = srcPts[srcOff++] - M12;
26628 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26629 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26630 }
26631 return;
26632 case (6):
26633 M00 = this.m00;
26634 M01 = this.m01;
26635 M10 = this.m10;
26636 M11 = this.m11;
26637 det = M00 * M11 - M01 * M10;
26638 if (Math.abs (det) <= 4.9E-324) {
26639 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26640 }while (--numPts >= 0) {
26641 var x = srcPts[srcOff++];
26642 var y = srcPts[srcOff++];
26643 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26644 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26645 }
26646 return;
26647 case (5):
26648 M01 = this.m01;
26649 M02 = this.m02;
26650 M10 = this.m10;
26651 M12 = this.m12;
26652 if (M01 == 0.0 || M10 == 0.0) {
26653 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26654 }while (--numPts >= 0) {
26655 var x = srcPts[srcOff++] - M02;
26656 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M10;
26657 dstPts[dstOff++] = x / M01;
26658 }
26659 return;
26660 case (4):
26661 M01 = this.m01;
26662 M10 = this.m10;
26663 if (M01 == 0.0 || M10 == 0.0) {
26664 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26665 }while (--numPts >= 0) {
26666 var x = srcPts[srcOff++];
26667 dstPts[dstOff++] = srcPts[srcOff++] / M10;
26668 dstPts[dstOff++] = x / M01;
26669 }
26670 return;
26671 case (3):
26672 M00 = this.m00;
26673 M02 = this.m02;
26674 M11 = this.m11;
26675 M12 = this.m12;
26676 if (M00 == 0.0 || M11 == 0.0) {
26677 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26678 }while (--numPts >= 0) {
26679 dstPts[dstOff++] = (srcPts[srcOff++] - M02) / M00;
26680 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M11;
26681 }
26682 return;
26683 case (2):
26684 M00 = this.m00;
26685 M11 = this.m11;
26686 if (M00 == 0.0 || M11 == 0.0) {
26687 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26688 }while (--numPts >= 0) {
26689 dstPts[dstOff++] = srcPts[srcOff++] / M00;
26690 dstPts[dstOff++] = srcPts[srcOff++] / M11;
26691 }
26692 return;
26693 case (1):
26694 M02 = this.m02;
26695 M12 = this.m12;
26696 while (--numPts >= 0) {
26697 dstPts[dstOff++] = srcPts[srcOff++] - M02;
26698 dstPts[dstOff++] = srcPts[srcOff++] - M12;
26699 }
26700 return;
26701 case (0):
26702 if (srcPts !== dstPts || srcOff != dstOff) {
26703 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26704 }return;
26705 }
26706 }, "~A,~N,~A,~N,~N");
26707 Clazz_defineMethod (c$, "deltaTransform", 
26708 function (ptSrc, ptDst) {
26709 if (ptDst == null) {
26710 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26711 ptDst =  new java.awt.geom.Point2D.Double ();
26712 } else {
26713 ptDst =  new java.awt.geom.Point2D.Float ();
26714 }}var x = ptSrc.getX ();
26715 var y = ptSrc.getY ();
26716 switch (this.state) {
26717 default:
26718 this.stateError ();
26719 case (7):
26720 case (6):
26721 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26722 return ptDst;
26723 case (5):
26724 case (4):
26725 ptDst.setLocation (y * this.m01, x * this.m10);
26726 return ptDst;
26727 case (3):
26728 case (2):
26729 ptDst.setLocation (x * this.m00, y * this.m11);
26730 return ptDst;
26731 case (1):
26732 case (0):
26733 ptDst.setLocation (x, y);
26734 return ptDst;
26735 }
26736 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26737 Clazz_defineMethod (c$, "deltaTransform", 
26738 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26739 var M00;
26740 var M01;
26741 var M10;
26742 var M11;
26743 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26744 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26745 srcOff = dstOff;
26746 }switch (this.state) {
26747 default:
26748 this.stateError ();
26749 case (7):
26750 case (6):
26751 M00 = this.m00;
26752 M01 = this.m01;
26753 M10 = this.m10;
26754 M11 = this.m11;
26755 while (--numPts >= 0) {
26756 var x = srcPts[srcOff++];
26757 var y = srcPts[srcOff++];
26758 dstPts[dstOff++] = x * M00 + y * M01;
26759 dstPts[dstOff++] = x * M10 + y * M11;
26760 }
26761 return;
26762 case (5):
26763 case (4):
26764 M01 = this.m01;
26765 M10 = this.m10;
26766 while (--numPts >= 0) {
26767 var x = srcPts[srcOff++];
26768 dstPts[dstOff++] = srcPts[srcOff++] * M01;
26769 dstPts[dstOff++] = x * M10;
26770 }
26771 return;
26772 case (3):
26773 case (2):
26774 M00 = this.m00;
26775 M11 = this.m11;
26776 while (--numPts >= 0) {
26777 dstPts[dstOff++] = srcPts[srcOff++] * M00;
26778 dstPts[dstOff++] = srcPts[srcOff++] * M11;
26779 }
26780 return;
26781 case (1):
26782 case (0):
26783 if (srcPts !== dstPts || srcOff != dstOff) {
26784 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26785 }return;
26786 }
26787 }, "~A,~N,~A,~N,~N");
26788 Clazz_defineMethod (c$, "createTransformedShape", 
26789 function (pSrc) {
26790 if (pSrc == null) {
26791 return null;
26792 }return  new java.awt.geom.Path2D.Double (pSrc, this);
26793 }, "java.awt.Shape");
26794 c$._matround = Clazz_defineMethod (c$, "_matround", 
26795  function (matval) {
26796 return Math.rint (matval * 1E15) / 1E15;
26797 }, "~N");
26798 Clazz_overrideMethod (c$, "toString", 
26799 function () {
26800 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) + "]]");
26801 });
26802 Clazz_defineMethod (c$, "isIdentity", 
26803 function () {
26804 return (this.state == 0 || (this.getType () == 0));
26805 });
26806 Clazz_defineMethod (c$, "clone", 
26807 function () {
26808 try {
26809 return Clazz_superCall (this, java.awt.geom.AffineTransform, "clone", []);
26810 } catch (e) {
26811 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
26812 throw  new InternalError ();
26813 } else {
26814 throw e;
26815 }
26816 }
26817 });
26818 Clazz_overrideMethod (c$, "hashCode", 
26819 function () {
26820 var bits = Double.doubleToLongBits (this.m00);
26821 bits = bits * 31 + Double.doubleToLongBits (this.m01);
26822 bits = bits * 31 + Double.doubleToLongBits (this.m02);
26823 bits = bits * 31 + Double.doubleToLongBits (this.m10);
26824 bits = bits * 31 + Double.doubleToLongBits (this.m11);
26825 bits = bits * 31 + Double.doubleToLongBits (this.m12);
26826 return ((bits) ^ ((bits >> 32)));
26827 });
26828 Clazz_overrideMethod (c$, "equals", 
26829 function (obj) {
26830 if (!(Clazz_instanceOf (obj, java.awt.geom.AffineTransform))) {
26831 return false;
26832 }var a = obj;
26833 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));
26834 }, "~O");
26835 Clazz_defineStatics (c$,
26836 "TYPE_UNKNOWN", -1,
26837 "TYPE_IDENTITY", 0,
26838 "TYPE_TRANSLATION", 1,
26839 "TYPE_UNIFORM_SCALE", 2,
26840 "TYPE_GENERAL_SCALE", 4,
26841 "TYPE_MASK_SCALE", (6),
26842 "TYPE_FLIP", 64,
26843 "TYPE_QUADRANT_ROTATION", 8,
26844 "TYPE_GENERAL_ROTATION", 16,
26845 "TYPE_MASK_ROTATION", (24),
26846 "TYPE_GENERAL_TRANSFORM", 32,
26847 "APPLY_IDENTITY", 0,
26848 "APPLY_TRANSLATE", 1,
26849 "APPLY_SCALE", 2,
26850 "APPLY_SHEAR", 4,
26851 "HI_SHIFT", 3,
26852 "HI_IDENTITY", 0,
26853 "HI_TRANSLATE", 8,
26854 "HI_SCALE", 16,
26855 "HI_SHEAR", 32,
26856 "rot90conversion",  Clazz_newIntArray (-1, [4, 5, 4, 5, 2, 3, 6, 7]));
26857 });
26858 Clazz_declarePackage ("java.awt.geom");
26859 Clazz_load (["java.lang.Exception"], "java.awt.geom.NoninvertibleTransformException", null, function () {
26860 c$ = Clazz_declareType (java.awt.geom, "NoninvertibleTransformException", Exception);
26861 });
26862 Clazz_declarePackage ("java.awt.geom");
26863 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 () {
26864 c$ = Clazz_decorateAsClass (function () {
26865 this.pointTypes = null;
26866 this.numTypes = 0;
26867 this.numCoords = 0;
26868 this.windingRule = 0;
26869 Clazz_instantialize (this, arguments);
26870 }, java.awt.geom, "Path2D", null, [java.awt.Shape, Cloneable]);
26871 Clazz_makeConstructor (c$, 
26872 function () {
26873 });
26874 Clazz_makeConstructor (c$, 
26875 function (rule, initialTypes) {
26876 this.setWindingRule (rule);
26877 this.pointTypes =  Clazz_newByteArray (initialTypes, 0);
26878 }, "~N,~N");
26879 Clazz_defineMethod (c$, "closePath", 
26880 function () {
26881 if (this.numTypes == 0 || this.pointTypes[this.numTypes - 1] != 4) {
26882 this.needRoom (true, 0);
26883 this.pointTypes[this.numTypes++] = 4;
26884 }});
26885 Clazz_defineMethod (c$, "append", 
26886 function (s, connect) {
26887 this.append (s.getPathIterator (null), connect);
26888 }, "java.awt.Shape,~B");
26889 Clazz_defineMethod (c$, "getWindingRule", 
26890 function () {
26891 return this.windingRule;
26892 });
26893 Clazz_defineMethod (c$, "setWindingRule", 
26894 function (rule) {
26895 if (rule != 0 && rule != 1) {
26896 throw  new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO");
26897 }this.windingRule = rule;
26898 }, "~N");
26899 Clazz_defineMethod (c$, "getCurrentPoint", 
26900 function () {
26901 var index = this.numCoords;
26902 if (this.numTypes < 1 || index < 1) {
26903 return null;
26904 }if (this.pointTypes[this.numTypes - 1] == 4) {
26905 loop : for (var i = this.numTypes - 2; i > 0; i--) {
26906 switch (this.pointTypes[i]) {
26907 case 0:
26908 break loop;
26909 case 1:
26910 index -= 2;
26911 break;
26912 case 2:
26913 index -= 4;
26914 break;
26915 case 3:
26916 index -= 6;
26917 break;
26918 case 4:
26919 break;
26920 }
26921 }
26922 }return this.getPoint (index - 2);
26923 });
26924 Clazz_defineMethod (c$, "reset", 
26925 function () {
26926 this.numTypes = this.numCoords = 0;
26927 });
26928 Clazz_defineMethod (c$, "createTransformedShape", 
26929 function (at) {
26930 var p2d = this.clone ();
26931 if (at != null) {
26932 p2d.transform (at);
26933 }return p2d;
26934 }, "java.awt.geom.AffineTransform");
26935 Clazz_overrideMethod (c$, "getBounds", 
26936 function () {
26937 return this.getBounds2D ().getBounds ();
26938 });
26939 c$.contains = Clazz_defineMethod (c$, "contains", 
26940 function (pi, x, y) {
26941 if (x * 0.0 + y * 0.0 == 0.0) {
26942 var mask = (pi.getWindingRule () == 1 ? -1 : 1);
26943 var cross = jssun.awt.geom.Curve.pointCrossingsForPath (pi, x, y);
26944 return ((cross & mask) != 0);
26945 } else {
26946 return false;
26947 }}, "java.awt.geom.PathIterator,~N,~N");
26948 c$.contains = Clazz_defineMethod (c$, "contains", 
26949 function (pi, p) {
26950 return java.awt.geom.Path2D.contains (pi, p.getX (), p.getY ());
26951 }, "java.awt.geom.PathIterator,java.awt.geom.Point2D");
26952 Clazz_defineMethod (c$, "contains", 
26953 function (x, y) {
26954 if (x * 0.0 + y * 0.0 == 0.0) {
26955 if (this.numTypes < 2) {
26956 return false;
26957 }var mask = (this.windingRule == 1 ? -1 : 1);
26958 return ((this.pointCrossings (x, y) & mask) != 0);
26959 } else {
26960 return false;
26961 }}, "~N,~N");
26962 Clazz_defineMethod (c$, "contains", 
26963 function (p) {
26964 return this.contains (p.getX (), p.getY ());
26965 }, "java.awt.geom.Point2D");
26966 c$.contains = Clazz_defineMethod (c$, "contains", 
26967 function (pi, x, y, w, h) {
26968 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26969 return false;
26970 }if (w <= 0 || h <= 0) {
26971 return false;
26972 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
26973 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
26974 return (crossings != -2147483648 && (crossings & mask) != 0);
26975 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
26976 c$.contains = Clazz_defineMethod (c$, "contains", 
26977 function (pi, r) {
26978 return java.awt.geom.Path2D.contains (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26979 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
26980 Clazz_defineMethod (c$, "contains", 
26981 function (x, y, w, h) {
26982 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26983 return false;
26984 }if (w <= 0 || h <= 0) {
26985 return false;
26986 }var mask = (this.windingRule == 1 ? -1 : 2);
26987 var crossings = this.rectCrossings (x, y, x + w, y + h);
26988 return (crossings != -2147483648 && (crossings & mask) != 0);
26989 }, "~N,~N,~N,~N");
26990 Clazz_defineMethod (c$, "contains", 
26991 function (r) {
26992 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26993 }, "java.awt.geom.Rectangle2D");
26994 c$.intersects = Clazz_defineMethod (c$, "intersects", 
26995 function (pi, x, y, w, h) {
26996 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26997 return false;
26998 }if (w <= 0 || h <= 0) {
26999 return false;
27000 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
27001 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
27002 return (crossings == -2147483648 || (crossings & mask) != 0);
27003 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
27004 c$.intersects = Clazz_defineMethod (c$, "intersects", 
27005 function (pi, r) {
27006 return java.awt.geom.Path2D.intersects (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
27007 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
27008 Clazz_defineMethod (c$, "intersects", 
27009 function (x, y, w, h) {
27010 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
27011 return false;
27012 }if (w <= 0 || h <= 0) {
27013 return false;
27014 }var mask = (this.windingRule == 1 ? -1 : 2);
27015 var crossings = this.rectCrossings (x, y, x + w, y + h);
27016 return (crossings == -2147483648 || (crossings & mask) != 0);
27017 }, "~N,~N,~N,~N");
27018 Clazz_defineMethod (c$, "intersects", 
27019 function (r) {
27020 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
27021 }, "java.awt.geom.Rectangle2D");
27022 Clazz_overrideMethod (c$, "getPathIterator", 
27023 function (at, flatness) {
27024 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
27025 }, "java.awt.geom.AffineTransform,~N");
27026 Clazz_pu$h(self.c$);
27027 c$ = Clazz_decorateAsClass (function () {
27028 this.typeIdx = 0;
27029 this.pointIdx = 0;
27030 this.path = null;
27031 Clazz_instantialize (this, arguments);
27032 }, java.awt.geom.Path2D, "Iterator", null, java.awt.geom.PathIterator);
27033 Clazz_makeConstructor (c$, 
27034 function (a) {
27035 this.path = a;
27036 }, "java.awt.geom.Path2D");
27037 Clazz_overrideMethod (c$, "getWindingRule", 
27038 function () {
27039 return this.path.getWindingRule ();
27040 });
27041 Clazz_overrideMethod (c$, "isDone", 
27042 function () {
27043 return (this.typeIdx >= this.path.numTypes);
27044 });
27045 Clazz_overrideMethod (c$, "next", 
27046 function () {
27047 var a = this.path.pointTypes[this.typeIdx++];
27048 this.pointIdx += java.awt.geom.Path2D.Iterator.curvecoords[a];
27049 });
27050 Clazz_defineStatics (c$,
27051 "curvecoords",  Clazz_newIntArray (-1, [2, 2, 4, 6, 0]));
27052 c$ = Clazz_p0p ();
27053 Clazz_pu$h(self.c$);
27054 c$ = Clazz_decorateAsClass (function () {
27055 this.floatCoords = null;
27056 Clazz_instantialize (this, arguments);
27057 }, java.awt.geom.Path2D, "Float", java.awt.geom.Path2D);
27058 Clazz_makeConstructor (c$, 
27059 function () {
27060 this.construct (1, 20);
27061 });
27062 Clazz_makeConstructor (c$, 
27063 function (a) {
27064 this.construct (a, 20);
27065 }, "~N");
27066 Clazz_makeConstructor (c$, 
27067 function (a, b) {
27068 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
27069 this.setWindingRule (a);
27070 this.pointTypes =  Clazz_newByteArray (b, 0);
27071 this.floatCoords =  Clazz_newFloatArray (b * 2, 0);
27072 }, "~N,~N");
27073 Clazz_makeConstructor (c$, 
27074 function (a) {
27075 this.construct (a, null);
27076 }, "java.awt.Shape");
27077 Clazz_makeConstructor (c$, 
27078 function (a, b) {
27079 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
27080 this.setPath (a, b);
27081 }, "java.awt.Shape,java.awt.geom.AffineTransform");
27082 Clazz_defineMethod (c$, "setPath", 
27083  function (a, b) {
27084 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
27085 var c = a;
27086 this.setWindingRule (c.windingRule);
27087 this.numTypes = c.numTypes;
27088 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
27089 this.numCoords = c.numCoords;
27090 this.floatCoords = c.cloneCoordsFloat (b);
27091 } else {
27092 var c = a.getPathIterator (b);
27093 this.setWindingRule (c.getWindingRule ());
27094 this.pointTypes =  Clazz_newByteArray (20, 0);
27095 this.floatCoords =  Clazz_newFloatArray (40, 0);
27096 this.append (c, false);
27097 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
27098 Clazz_defineMethod (c$, "cloneCoordsFloat", 
27099 function (a) {
27100 var b;
27101 if (a == null) {
27102 b = java.util.Arrays.copyOf (this.floatCoords, this.floatCoords.length);
27103 } else {
27104 b =  Clazz_newFloatArray (this.floatCoords.length, 0);
27105 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27106 }return b;
27107 }, "java.awt.geom.AffineTransform");
27108 Clazz_overrideMethod (c$, "cloneCoordsDouble", 
27109 function (a) {
27110 var b =  Clazz_newDoubleArray (this.floatCoords.length, 0);
27111 if (a == null) {
27112 for (var c = 0; c < this.numCoords; c++) {
27113 b[c] = this.floatCoords[c];
27114 }
27115 } else {
27116 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27117 }return b;
27118 }, "java.awt.geom.AffineTransform");
27119 Clazz_defineMethod (c$, "append", 
27120 function (a, b) {
27121 {
27122 if (typeof pi == "number") {
27123 this.floatCoords[this.numCoords++] = pi;
27124 this.floatCoords[this.numCoords++] = connect;
27125 return;
27126 }
27127 }var c =  Clazz_newFloatArray (6, 0);
27128 while (!a.isDone ()) {
27129 switch (a.currentSegment (c)) {
27130 case 0:
27131 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27132 this.moveTo (c[0], c[1]);
27133 break;
27134 }if (this.pointTypes[this.numTypes - 1] != 4 && this.floatCoords[this.numCoords - 2] == c[0] && this.floatCoords[this.numCoords - 1] == c[1]) {
27135 break;
27136 }case 1:
27137 this.lineTo (c[0], c[1]);
27138 break;
27139 case 2:
27140 this.quadTo (c[0], c[1], c[2], c[3]);
27141 break;
27142 case 3:
27143 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27144 break;
27145 case 4:
27146 this.closePath ();
27147 break;
27148 }
27149 a.next ();
27150 b = false;
27151 }
27152 }, "java.awt.geom.PathIterator,~B");
27153 Clazz_overrideMethod (c$, "getPoint", 
27154 function (a) {
27155 return  new java.awt.geom.Point2D.Float (this.floatCoords[a], this.floatCoords[a + 1]);
27156 }, "~N");
27157 Clazz_overrideMethod (c$, "needRoom", 
27158 function (a, b) {
27159 if (a && this.numTypes == 0) {
27160 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27161 }var c = this.pointTypes.length;
27162 if (this.numTypes >= c) {
27163 var d = c;
27164 if (d > 500) {
27165 d = 500;
27166 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27167 }c = this.floatCoords.length;
27168 if (this.numCoords + b > c) {
27169 var d = c;
27170 if (d > 1000) {
27171 d = 1000;
27172 }if (d < b) {
27173 d = b;
27174 }this.floatCoords = java.util.Arrays.copyOf (this.floatCoords, c + d);
27175 }}, "~B,~N");
27176 Clazz_defineMethod (c$, "moveTo", 
27177 function (a, b) {
27178 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27179 this.floatCoords[this.numCoords - 2] = a;
27180 this.floatCoords[this.numCoords - 1] = b;
27181 } else {
27182 this.needRoom (false, 2);
27183 this.pointTypes[this.numTypes++] = 0;
27184 this.floatCoords[this.numCoords++] = a;
27185 this.floatCoords[this.numCoords++] = b;
27186 }}, "~N,~N");
27187 Clazz_defineMethod (c$, "moveTo", 
27188 function (a, b) {
27189 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27190 this.floatCoords[this.numCoords - 2] = a;
27191 this.floatCoords[this.numCoords - 1] = b;
27192 } else {
27193 this.needRoom (false, 2);
27194 this.pointTypes[this.numTypes++] = 0;
27195 this.floatCoords[this.numCoords++] = a;
27196 this.floatCoords[this.numCoords++] = b;
27197 }}, "~N,~N");
27198 Clazz_defineMethod (c$, "lineTo", 
27199 function (a, b) {
27200 this.needRoom (true, 2);
27201 this.pointTypes[this.numTypes++] = 1;
27202 this.floatCoords[this.numCoords++] = a;
27203 this.floatCoords[this.numCoords++] = b;
27204 }, "~N,~N");
27205 Clazz_defineMethod (c$, "lineTo", 
27206 function (a, b) {
27207 this.needRoom (true, 2);
27208 this.pointTypes[this.numTypes++] = 1;
27209 this.floatCoords[this.numCoords++] = a;
27210 this.floatCoords[this.numCoords++] = b;
27211 }, "~N,~N");
27212 Clazz_defineMethod (c$, "quadTo", 
27213 function (a, b, c, d) {
27214 this.needRoom (true, 4);
27215 this.pointTypes[this.numTypes++] = 2;
27216 this.floatCoords[this.numCoords++] = a;
27217 this.floatCoords[this.numCoords++] = b;
27218 this.floatCoords[this.numCoords++] = c;
27219 this.floatCoords[this.numCoords++] = d;
27220 }, "~N,~N,~N,~N");
27221 Clazz_defineMethod (c$, "quadTo", 
27222 function (a, b, c, d) {
27223 this.needRoom (true, 4);
27224 this.pointTypes[this.numTypes++] = 2;
27225 this.floatCoords[this.numCoords++] = a;
27226 this.floatCoords[this.numCoords++] = b;
27227 this.floatCoords[this.numCoords++] = c;
27228 this.floatCoords[this.numCoords++] = d;
27229 }, "~N,~N,~N,~N");
27230 Clazz_defineMethod (c$, "curveTo", 
27231 function (a, b, c, d, e, f) {
27232 this.needRoom (true, 6);
27233 this.pointTypes[this.numTypes++] = 3;
27234 this.floatCoords[this.numCoords++] = a;
27235 this.floatCoords[this.numCoords++] = b;
27236 this.floatCoords[this.numCoords++] = c;
27237 this.floatCoords[this.numCoords++] = d;
27238 this.floatCoords[this.numCoords++] = e;
27239 this.floatCoords[this.numCoords++] = f;
27240 }, "~N,~N,~N,~N,~N,~N");
27241 Clazz_defineMethod (c$, "curveTo", 
27242 function (a, b, c, d, e, f) {
27243 this.needRoom (true, 6);
27244 this.pointTypes[this.numTypes++] = 3;
27245 this.floatCoords[this.numCoords++] = a;
27246 this.floatCoords[this.numCoords++] = b;
27247 this.floatCoords[this.numCoords++] = c;
27248 this.floatCoords[this.numCoords++] = d;
27249 this.floatCoords[this.numCoords++] = e;
27250 this.floatCoords[this.numCoords++] = f;
27251 }, "~N,~N,~N,~N,~N,~N");
27252 Clazz_overrideMethod (c$, "pointCrossings", 
27253 function (a, b) {
27254 var c;
27255 var d;
27256 var e;
27257 var f;
27258 var g;
27259 var h;
27260 var i = this.floatCoords;
27261 e = c = i[0];
27262 f = d = i[1];
27263 var j = 0;
27264 var k = 2;
27265 for (var l = 1; l < this.numTypes; l++) {
27266 switch (this.pointTypes[l]) {
27267 case 0:
27268 if (f != d) {
27269 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27270 }c = e = i[k++];
27271 d = f = i[k++];
27272 break;
27273 case 1:
27274 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27275 e = g;
27276 f = h;
27277 break;
27278 case 2:
27279 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27280 e = g;
27281 f = h;
27282 break;
27283 case 3:
27284 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);
27285 e = g;
27286 f = h;
27287 break;
27288 case 4:
27289 if (f != d) {
27290 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27291 }e = c;
27292 f = d;
27293 break;
27294 }
27295 }
27296 if (f != d) {
27297 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27298 }return j;
27299 }, "~N,~N");
27300 Clazz_overrideMethod (c$, "rectCrossings", 
27301 function (a, b, c, d) {
27302 var e = this.floatCoords;
27303 var f;
27304 var g;
27305 var h;
27306 var i;
27307 var j;
27308 var k;
27309 f = h = e[0];
27310 g = i = e[1];
27311 var l = 0;
27312 var m = 2;
27313 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27314 switch (this.pointTypes[n]) {
27315 case 0:
27316 if (f != h || g != i) {
27317 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27318 }h = f = e[m++];
27319 i = g = e[m++];
27320 break;
27321 case 1:
27322 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j = e[m++], k = e[m++]);
27323 f = j;
27324 g = k;
27325 break;
27326 case 2:
27327 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27328 f = j;
27329 g = k;
27330 break;
27331 case 3:
27332 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);
27333 f = j;
27334 g = k;
27335 break;
27336 case 4:
27337 if (f != h || g != i) {
27338 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27339 }f = h;
27340 g = i;
27341 break;
27342 }
27343 }
27344 if (l != -2147483648 && (f != h || g != i)) {
27345 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27346 }return l;
27347 }, "~N,~N,~N,~N");
27348 Clazz_overrideMethod (c$, "transform", 
27349 function (a) {
27350 a.transform (this.floatCoords, 0, this.floatCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27351 }, "java.awt.geom.AffineTransform");
27352 Clazz_overrideMethod (c$, "getBounds2D", 
27353 function () {
27354 var a;
27355 var b;
27356 var c;
27357 var d;
27358 var e = this.numCoords;
27359 if (e > 0) {
27360 b = d = this.floatCoords[--e];
27361 a = c = this.floatCoords[--e];
27362 while (e > 0) {
27363 var f = this.floatCoords[--e];
27364 var g = this.floatCoords[--e];
27365 if (g < a) a = g;
27366 if (f < b) b = f;
27367 if (g > c) c = g;
27368 if (f > d) d = f;
27369 }
27370 } else {
27371 a = b = c = d = 0.0;
27372 }return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
27373 });
27374 Clazz_defineMethod (c$, "getPathIterator", 
27375 function (a) {
27376 if (a == null) {
27377 return  new java.awt.geom.Path2D.Float.CopyIterator (this);
27378 } else {
27379 return  new java.awt.geom.Path2D.Float.TxIterator (this, a);
27380 }}, "java.awt.geom.AffineTransform");
27381 Clazz_overrideMethod (c$, "clone", 
27382 function () {
27383 return  new java.awt.geom.Path2D.Float (this);
27384 });
27385 Clazz_pu$h(self.c$);
27386 c$ = Clazz_decorateAsClass (function () {
27387 this.floatCoords = null;
27388 Clazz_instantialize (this, arguments);
27389 }, java.awt.geom.Path2D.Float, "CopyIterator", java.awt.geom.Path2D.Iterator);
27390 Clazz_makeConstructor (c$, 
27391 function (a) {
27392 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.CopyIterator, [a]);
27393 this.floatCoords = a.floatCoords;
27394 }, "java.awt.geom.Path2D.Float");
27395 Clazz_defineMethod (c$, "currentSegment", 
27396 function (a) {
27397 var b = this.path.pointTypes[this.typeIdx];
27398 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27399 if (c > 0) {
27400 for (var d = 0; d < c; d++) {
27401 a[d] = this.floatCoords[this.pointIdx + d];
27402 }
27403 }return b;
27404 }, "~A");
27405 c$ = Clazz_p0p ();
27406 Clazz_pu$h(self.c$);
27407 c$ = Clazz_decorateAsClass (function () {
27408 this.floatCoords = null;
27409 this.affine = null;
27410 Clazz_instantialize (this, arguments);
27411 }, java.awt.geom.Path2D.Float, "TxIterator", java.awt.geom.Path2D.Iterator);
27412 Clazz_makeConstructor (c$, 
27413 function (a, b) {
27414 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.TxIterator, [a]);
27415 this.floatCoords = a.floatCoords;
27416 this.affine = b;
27417 }, "java.awt.geom.Path2D.Float,java.awt.geom.AffineTransform");
27418 Clazz_defineMethod (c$, "currentSegment", 
27419 function (a) {
27420 var b = this.path.pointTypes[this.typeIdx];
27421 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27422 if (c > 0) {
27423 this.affine.transform (this.floatCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27424 }return b;
27425 }, "~A");
27426 c$ = Clazz_p0p ();
27427 c$ = Clazz_p0p ();
27428 Clazz_pu$h(self.c$);
27429 c$ = Clazz_decorateAsClass (function () {
27430 this.doubleCoords = null;
27431 Clazz_instantialize (this, arguments);
27432 }, java.awt.geom.Path2D, "Double", java.awt.geom.Path2D);
27433 Clazz_makeConstructor (c$, 
27434 function () {
27435 this.construct (1, 20);
27436 });
27437 Clazz_makeConstructor (c$, 
27438 function (a) {
27439 this.construct (a, 20);
27440 }, "~N");
27441 Clazz_makeConstructor (c$, 
27442 function (a, b) {
27443 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, [a, b]);
27444 this.doubleCoords =  Clazz_newDoubleArray (b * 2, 0);
27445 }, "~N,~N");
27446 Clazz_makeConstructor (c$, 
27447 function (a) {
27448 this.construct (a, null);
27449 }, "java.awt.Shape");
27450 Clazz_makeConstructor (c$, 
27451 function (a, b) {
27452 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, []);
27453 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
27454 var c = a;
27455 this.setWindingRule (c.windingRule);
27456 this.numTypes = c.numTypes;
27457 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
27458 this.numCoords = c.numCoords;
27459 this.doubleCoords = c.cloneCoordsDouble (b);
27460 } else {
27461 var c = a.getPathIterator (b);
27462 this.setWindingRule (c.getWindingRule ());
27463 this.pointTypes =  Clazz_newByteArray (20, 0);
27464 this.doubleCoords =  Clazz_newDoubleArray (40, 0);
27465 this.append (c, false);
27466 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
27467 Clazz_overrideMethod (c$, "cloneCoordsFloat", 
27468 function (a) {
27469 var b =  Clazz_newFloatArray (this.doubleCoords.length, 0);
27470 if (a == null) {
27471 for (var c = 0; c < this.numCoords; c++) {
27472 b[c] = this.doubleCoords[c];
27473 }
27474 } else {
27475 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27476 }return b;
27477 }, "java.awt.geom.AffineTransform");
27478 Clazz_defineMethod (c$, "cloneCoordsDouble", 
27479 function (a) {
27480 var b;
27481 if (a == null) {
27482 b = java.util.Arrays.copyOf (this.doubleCoords, this.doubleCoords.length);
27483 } else {
27484 b =  Clazz_newDoubleArray (this.doubleCoords.length, 0);
27485 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27486 }return b;
27487 }, "java.awt.geom.AffineTransform");
27488 Clazz_defineMethod (c$, "append", 
27489 function (a, b) {
27490 {
27491 if (typeof pi == "number") {
27492 this.floatCoords[this.numCoords++] = pi;
27493 this.floatCoords[this.numCoords++] = connect;
27494 return;
27495 }
27496 }var c =  Clazz_newDoubleArray (6, 0);
27497 while (!a.isDone ()) {
27498 switch (a.currentSegment (c)) {
27499 case 0:
27500 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27501 this.moveTo (c[0], c[1]);
27502 break;
27503 }if (this.pointTypes[this.numTypes - 1] != 4 && this.doubleCoords[this.numCoords - 2] == c[0] && this.doubleCoords[this.numCoords - 1] == c[1]) {
27504 break;
27505 }case 1:
27506 this.lineTo (c[0], c[1]);
27507 break;
27508 case 2:
27509 this.quadTo (c[0], c[1], c[2], c[3]);
27510 break;
27511 case 3:
27512 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27513 break;
27514 case 4:
27515 this.closePath ();
27516 break;
27517 }
27518 a.next ();
27519 b = false;
27520 }
27521 }, "java.awt.geom.PathIterator,~B");
27522 Clazz_overrideMethod (c$, "getPoint", 
27523 function (a) {
27524 return  new java.awt.geom.Point2D.Double (this.doubleCoords[a], this.doubleCoords[a + 1]);
27525 }, "~N");
27526 Clazz_overrideMethod (c$, "needRoom", 
27527 function (a, b) {
27528 if (a && this.numTypes == 0) {
27529 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27530 }var c = this.pointTypes.length;
27531 if (this.numTypes >= c) {
27532 var d = c;
27533 if (d > 500) {
27534 d = 500;
27535 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27536 }c = this.doubleCoords.length;
27537 if (this.numCoords + b > c) {
27538 var d = c;
27539 if (d > 1000) {
27540 d = 1000;
27541 }if (d < b) {
27542 d = b;
27543 }this.doubleCoords = java.util.Arrays.copyOf (this.doubleCoords, c + d);
27544 }}, "~B,~N");
27545 Clazz_overrideMethod (c$, "moveTo", 
27546 function (a, b) {
27547 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27548 this.doubleCoords[this.numCoords - 2] = a;
27549 this.doubleCoords[this.numCoords - 1] = b;
27550 } else {
27551 this.needRoom (false, 2);
27552 this.pointTypes[this.numTypes++] = 0;
27553 this.doubleCoords[this.numCoords++] = a;
27554 this.doubleCoords[this.numCoords++] = b;
27555 }}, "~N,~N");
27556 Clazz_overrideMethod (c$, "lineTo", 
27557 function (a, b) {
27558 this.needRoom (true, 2);
27559 this.pointTypes[this.numTypes++] = 1;
27560 this.doubleCoords[this.numCoords++] = a;
27561 this.doubleCoords[this.numCoords++] = b;
27562 }, "~N,~N");
27563 Clazz_overrideMethod (c$, "quadTo", 
27564 function (a, b, c, d) {
27565 this.needRoom (true, 4);
27566 this.pointTypes[this.numTypes++] = 2;
27567 this.doubleCoords[this.numCoords++] = a;
27568 this.doubleCoords[this.numCoords++] = b;
27569 this.doubleCoords[this.numCoords++] = c;
27570 this.doubleCoords[this.numCoords++] = d;
27571 }, "~N,~N,~N,~N");
27572 Clazz_overrideMethod (c$, "curveTo", 
27573 function (a, b, c, d, e, f) {
27574 this.needRoom (true, 6);
27575 this.pointTypes[this.numTypes++] = 3;
27576 this.doubleCoords[this.numCoords++] = a;
27577 this.doubleCoords[this.numCoords++] = b;
27578 this.doubleCoords[this.numCoords++] = c;
27579 this.doubleCoords[this.numCoords++] = d;
27580 this.doubleCoords[this.numCoords++] = e;
27581 this.doubleCoords[this.numCoords++] = f;
27582 }, "~N,~N,~N,~N,~N,~N");
27583 Clazz_overrideMethod (c$, "pointCrossings", 
27584 function (a, b) {
27585 var c;
27586 var d;
27587 var e;
27588 var f;
27589 var g;
27590 var h;
27591 var i = this.doubleCoords;
27592 e = c = i[0];
27593 f = d = i[1];
27594 var j = 0;
27595 var k = 2;
27596 for (var l = 1; l < this.numTypes; l++) {
27597 switch (this.pointTypes[l]) {
27598 case 0:
27599 if (f != d) {
27600 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27601 }c = e = i[k++];
27602 d = f = i[k++];
27603 break;
27604 case 1:
27605 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27606 e = g;
27607 f = h;
27608 break;
27609 case 2:
27610 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27611 e = g;
27612 f = h;
27613 break;
27614 case 3:
27615 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);
27616 e = g;
27617 f = h;
27618 break;
27619 case 4:
27620 if (f != d) {
27621 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27622 }e = c;
27623 f = d;
27624 break;
27625 }
27626 }
27627 if (f != d) {
27628 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27629 }return j;
27630 }, "~N,~N");
27631 Clazz_overrideMethod (c$, "rectCrossings", 
27632 function (a, b, c, d) {
27633 var e = this.doubleCoords;
27634 var f;
27635 var g;
27636 var h;
27637 var i;
27638 var j;
27639 var k;
27640 f = h = e[0];
27641 g = i = e[1];
27642 var l = 0;
27643 var m = 2;
27644 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27645 switch (this.pointTypes[n]) {
27646 case 0:
27647 if (f != h || g != i) {
27648 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27649 }h = f = e[m++];
27650 i = g = e[m++];
27651 break;
27652 case 1:
27653 j = e[m++];
27654 k = e[m++];
27655 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j, k);
27656 f = j;
27657 g = k;
27658 break;
27659 case 2:
27660 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27661 f = j;
27662 g = k;
27663 break;
27664 case 3:
27665 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);
27666 f = j;
27667 g = k;
27668 break;
27669 case 4:
27670 if (f != h || g != i) {
27671 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27672 }f = h;
27673 g = i;
27674 break;
27675 }
27676 }
27677 if (l != -2147483648 && (f != h || g != i)) {
27678 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27679 }return l;
27680 }, "~N,~N,~N,~N");
27681 Clazz_overrideMethod (c$, "transform", 
27682 function (a) {
27683 a.transform (this.doubleCoords, 0, this.doubleCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27684 }, "java.awt.geom.AffineTransform");
27685 Clazz_overrideMethod (c$, "getBounds2D", 
27686 function () {
27687 var a;
27688 var b;
27689 var c;
27690 var d;
27691 var e = this.numCoords;
27692 if (e > 0) {
27693 b = d = this.doubleCoords[--e];
27694 a = c = this.doubleCoords[--e];
27695 while (e > 0) {
27696 var f = this.doubleCoords[--e];
27697 var g = this.doubleCoords[--e];
27698 if (g < a) a = g;
27699 if (f < b) b = f;
27700 if (g > c) c = g;
27701 if (f > d) d = f;
27702 }
27703 } else {
27704 a = b = c = d = 0.0;
27705 }return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
27706 });
27707 Clazz_defineMethod (c$, "getPathIterator", 
27708 function (a) {
27709 if (a == null) {
27710 return  new java.awt.geom.Path2D.Double.CopyIterator (this);
27711 } else {
27712 return  new java.awt.geom.Path2D.Double.TxIterator (this, a);
27713 }}, "java.awt.geom.AffineTransform");
27714 Clazz_overrideMethod (c$, "clone", 
27715 function () {
27716 return  new java.awt.geom.Path2D.Double (this);
27717 });
27718 Clazz_pu$h(self.c$);
27719 c$ = Clazz_decorateAsClass (function () {
27720 this.doubleCoords = null;
27721 Clazz_instantialize (this, arguments);
27722 }, java.awt.geom.Path2D.Double, "CopyIterator", java.awt.geom.Path2D.Iterator);
27723 Clazz_makeConstructor (c$, 
27724 function (a) {
27725 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.CopyIterator, [a]);
27726 this.doubleCoords = a.doubleCoords;
27727 }, "java.awt.geom.Path2D.Double");
27728 Clazz_defineMethod (c$, "currentSegment", 
27729 function (a) {
27730 var b = this.path.pointTypes[this.typeIdx];
27731 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27732 if (c > 0) {
27733 for (var d = 0; d < c; d++) {
27734 a[d] = this.doubleCoords[this.pointIdx + d];
27735 }
27736 }return b;
27737 }, "~A");
27738 Clazz_defineMethod (c$, "currentSegment", 
27739 function (a) {
27740 var b = this.path.pointTypes[this.typeIdx];
27741 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27742 if (c > 0) {
27743 System.arraycopy (this.doubleCoords, this.pointIdx, a, 0, c);
27744 }return b;
27745 }, "~A");
27746 c$ = Clazz_p0p ();
27747 Clazz_pu$h(self.c$);
27748 c$ = Clazz_decorateAsClass (function () {
27749 this.doubleCoords = null;
27750 this.affine = null;
27751 Clazz_instantialize (this, arguments);
27752 }, java.awt.geom.Path2D.Double, "TxIterator", java.awt.geom.Path2D.Iterator);
27753 Clazz_makeConstructor (c$, 
27754 function (a, b) {
27755 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.TxIterator, [a]);
27756 this.doubleCoords = a.doubleCoords;
27757 this.affine = b;
27758 }, "java.awt.geom.Path2D.Double,java.awt.geom.AffineTransform");
27759 Clazz_defineMethod (c$, "currentSegment", 
27760 function (a) {
27761 var b = this.path.pointTypes[this.typeIdx];
27762 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27763 if (c > 0) {
27764 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27765 }return b;
27766 }, "~A");
27767 Clazz_defineMethod (c$, "currentSegment", 
27768 function (a) {
27769 var b = this.path.pointTypes[this.typeIdx];
27770 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27771 if (c > 0) {
27772 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27773 }return b;
27774 }, "~A");
27775 c$ = Clazz_p0p ();
27776 c$ = Clazz_p0p ();
27777 Clazz_defineStatics (c$,
27778 "WIND_EVEN_ODD", 0,
27779 "WIND_NON_ZERO", 1,
27780 "SEG_MOVETO", 0,
27781 "SEG_LINETO", 1,
27782 "SEG_QUADTO", 2,
27783 "SEG_CUBICTO", 3,
27784 "SEG_CLOSE", 4,
27785 "INIT_SIZE", 20,
27786 "EXPAND_MAX", 500);
27787 });
27788 Clazz_declarePackage ("javax.swing");
27789 Clazz_declareInterface (javax.swing, "Icon");
27790 Clazz_declarePackage ("javax.swing");
27791 Clazz_load (["javax.swing.JTextField"], "javax.swing.JPasswordField", ["javax.swing.text.Segment"], function () {
27792 c$ = Clazz_decorateAsClass (function () {
27793 this.echoChar = '\0';
27794 this.echoCharSet = false;
27795 Clazz_instantialize (this, arguments);
27796 }, javax.swing, "JPasswordField", javax.swing.JTextField);
27797 Clazz_makeConstructor (c$, 
27798 function () {
27799 this.construct (null, null, 0);
27800 });
27801 Clazz_makeConstructor (c$, 
27802 function (text) {
27803 this.construct (null, text, 0);
27804 }, "~S");
27805 Clazz_makeConstructor (c$, 
27806 function (columns) {
27807 this.construct (null, null, columns);
27808 }, "~N");
27809 Clazz_makeConstructor (c$, 
27810 function (text, columns) {
27811 this.construct (null, text, columns);
27812 }, "~S,~N");
27813 Clazz_overrideMethod (c$, "getUIClassID", 
27814 function () {
27815 return "PasswordFieldUI";
27816 });
27817 Clazz_defineMethod (c$, "updateUI", 
27818 function () {
27819 if (!this.echoCharSet) {
27820 this.echoChar = '*';
27821 }Clazz_superCall (this, javax.swing.JPasswordField, "updateUI", []);
27822 });
27823 Clazz_defineMethod (c$, "getEchoChar", 
27824 function () {
27825 return this.echoChar;
27826 });
27827 Clazz_defineMethod (c$, "setEchoChar", 
27828 function (c) {
27829 this.echoChar = c;
27830 this.echoCharSet = true;
27831 this.repaint ();
27832 this.revalidate ();
27833 }, "~S");
27834 Clazz_defineMethod (c$, "echoCharIsSet", 
27835 function () {
27836 return this.echoChar.charCodeAt (0) != 0;
27837 });
27838 Clazz_overrideMethod (c$, "cut", 
27839 function () {
27840 });
27841 Clazz_overrideMethod (c$, "copy", 
27842 function () {
27843 });
27844 Clazz_defineMethod (c$, "getPassword", 
27845 function () {
27846 var doc = this.getDocument ();
27847 var txt =  new javax.swing.text.Segment ();
27848 try {
27849 doc.getText (0, doc.getLength (), txt);
27850 } catch (e) {
27851 if (Clazz_exceptionOf (e, javax.swing.text.BadLocationException)) {
27852 return null;
27853 } else {
27854 throw e;
27855 }
27856 }
27857 var retValue =  Clazz_newCharArray (txt.count, '\0');
27858 System.arraycopy (txt.array, txt.offset, retValue, 0, txt.count);
27859 return retValue;
27860 });
27861 Clazz_defineMethod (c$, "paramString", 
27862 function () {
27863 return Clazz_superCall (this, javax.swing.JPasswordField, "paramString", []) + ",echoChar=" + this.echoChar;
27864 });
27865 Clazz_defineMethod (c$, "customSetUIProperty", 
27866 function (propertyName, value) {
27867 if (propertyName === "echoChar") {
27868 if (!this.echoCharSet) {
27869 this.setEchoChar ((value).charValue ());
27870 this.echoCharSet = false;
27871 }return true;
27872 }return false;
27873 }, "~S,~O");
27874 Clazz_defineStatics (c$,
27875 "$$uiClassID", "PasswordFieldUI");
27876 });
27877 Clazz_declarePackage ("javax.swing");
27878 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 () {
27879 c$ = Clazz_decorateAsClass (function () {
27880 this.$action = null;
27881 this.actionPropertyChangeListener = null;
27882 this.horizontalAlignment = 10;
27883 this.columns = 0;
27884 this.columnWidth = 0;
27885 this.command = null;
27886 if (!Clazz_isClassDefined ("javax.swing.JTextField.ScrollRepainter")) {
27887 javax.swing.JTextField.$JTextField$ScrollRepainter$ ();
27888 }
27889 Clazz_instantialize (this, arguments);
27890 }, javax.swing, "JTextField", javax.swing.text.JTextComponent, javax.swing.SwingConstants);
27891 Clazz_makeConstructor (c$, 
27892 function () {
27893 this.construct (null, null, 0);
27894 });
27895 Clazz_makeConstructor (c$, 
27896 function (text) {
27897 this.construct (null, text, 0);
27898 }, "~S");
27899 Clazz_makeConstructor (c$, 
27900 function (columns) {
27901 this.construct (null, null, columns);
27902 }, "~N");
27903 Clazz_makeConstructor (c$, 
27904 function (text, columns) {
27905 this.construct (null, text, columns);
27906 }, "~S,~N");
27907 Clazz_makeConstructor (c$, 
27908 function (doc, text, columns) {
27909 Clazz_superConstructor (this, javax.swing.JTextField);
27910 if (columns < 0) {
27911 throw  new IllegalArgumentException ("columns less than zero.");
27912 }this.columns = columns;
27913 if (doc == null) {
27914 doc = this.createDefaultModel ();
27915 }this.setDocument (doc);
27916 if (text != null) {
27917 this.setText (text);
27918 }}, "javax.swing.text.Document,~S,~N");
27919 Clazz_overrideMethod (c$, "getUIClassID", 
27920 function () {
27921 return "TextFieldUI";
27922 });
27923 Clazz_defineMethod (c$, "setDocument", 
27924 function (doc) {
27925 if (doc != null) {
27926 doc.putProperty ("filterNewlines", Boolean.TRUE);
27927 }Clazz_superCall (this, javax.swing.JTextField, "setDocument", [doc]);
27928 }, "javax.swing.text.Document");
27929 Clazz_overrideMethod (c$, "isValidateRoot", 
27930 function () {
27931 var parent = this.getParent ();
27932 if (Clazz_instanceOf (parent, javax.swing.JViewport)) {
27933 return false;
27934 }return true;
27935 });
27936 Clazz_defineMethod (c$, "getHorizontalAlignment", 
27937 function () {
27938 return this.horizontalAlignment;
27939 });
27940 Clazz_defineMethod (c$, "setHorizontalAlignment", 
27941 function (alignment) {
27942 if (alignment == this.horizontalAlignment) return;
27943 var oldValue = this.horizontalAlignment;
27944 if ((alignment == 2) || (alignment == 0) || (alignment == 4) || (alignment == 10) || (alignment == 11)) {
27945 this.horizontalAlignment = alignment;
27946 } else {
27947 throw  new IllegalArgumentException ("horizontalAlignment");
27948 }this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
27949 this.invalidate ();
27950 this.repaint ();
27951 }, "~N");
27952 Clazz_defineMethod (c$, "createDefaultModel", 
27953 function () {
27954 return swingjs.JSToolkit.getPlainDocument (this);
27955 });
27956 Clazz_defineMethod (c$, "getColumns", 
27957 function () {
27958 return this.columns;
27959 });
27960 Clazz_defineMethod (c$, "setColumns", 
27961 function (columns) {
27962 var oldVal = this.columns;
27963 if (columns < 0) {
27964 throw  new IllegalArgumentException ("columns less than zero.");
27965 }if (columns != oldVal) {
27966 this.columns = columns;
27967 this.invalidate ();
27968 }}, "~N");
27969 Clazz_defineMethod (c$, "getColumnWidth", 
27970 function () {
27971 if (this.columnWidth == 0) {
27972 var metrics = this.getFontMetrics (this.getFont ());
27973 this.columnWidth = metrics.charWidth ('m');
27974 }return this.columnWidth;
27975 });
27976 Clazz_overrideMethod (c$, "getPreferredSize", 
27977 function () {
27978 return this.getPrefSizeJTF ();
27979 });
27980 Clazz_defineMethod (c$, "getPrefSizeJTF", 
27981 function () {
27982 var size = this.getPrefSizeJComp ();
27983 if (this.columns != 0) {
27984 var insets = this.getInsets ();
27985 size.width = this.columns * this.getColumnWidth () + insets.left + insets.right;
27986 }return size;
27987 });
27988 Clazz_defineMethod (c$, "setFont", 
27989 function (f) {
27990 Clazz_superCall (this, javax.swing.JTextField, "setFont", [f]);
27991 this.columnWidth = 0;
27992 }, "java.awt.Font");
27993 Clazz_defineMethod (c$, "addActionListener", 
27994 function (l) {
27995 this.listenerList.add (java.awt.event.ActionListener, l);
27996 }, "java.awt.event.ActionListener");
27997 Clazz_defineMethod (c$, "removeActionListener", 
27998 function (l) {
27999 if ((l != null) && (this.getAction () === l)) {
28000 this.setAction (null);
28001 } else {
28002 this.listenerList.remove (java.awt.event.ActionListener, l);
28003 }}, "java.awt.event.ActionListener");
28004 Clazz_defineMethod (c$, "getActionListeners", 
28005 function () {
28006 return this.listenerList.getListeners (java.awt.event.ActionListener);
28007 });
28008 Clazz_defineMethod (c$, "fireActionPerformed", 
28009 function () {
28010 var listeners = this.listenerList.getListenerList ();
28011 var modifiers = 0;
28012 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
28013 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
28014 modifiers = (currentEvent).getModifiers ();
28015 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
28016 modifiers = (currentEvent).getModifiers ();
28017 }var e =  new java.awt.event.ActionEvent (this, 1001, (this.command != null) ? this.command : this.getText (), java.awt.EventQueue.getMostRecentEventTime (), modifiers);
28018 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28019 if (listeners[i] === java.awt.event.ActionListener) {
28020 (listeners[i + 1]).actionPerformed (e);
28021 }}
28022 });
28023 Clazz_defineMethod (c$, "setActionCommand", 
28024 function (command) {
28025 this.command = command;
28026 }, "~S");
28027 Clazz_defineMethod (c$, "setAction", 
28028 function (a) {
28029 var oldValue = this.getAction ();
28030 if (this.$action == null || !this.$action.equals (a)) {
28031 this.$action = a;
28032 if (oldValue != null) {
28033 this.removeActionListener (oldValue);
28034 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
28035 this.actionPropertyChangeListener = null;
28036 }this.configurePropertiesFromAction (this.$action);
28037 if (this.$action != null) {
28038 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
28039 this.addActionListener (this.$action);
28040 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
28041 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
28042 }this.firePropertyChangeObject ("action", oldValue, this.$action);
28043 }}, "javax.swing.Action");
28044 Clazz_defineMethod (c$, "isListener", 
28045  function (c, a) {
28046 var isListener = false;
28047 var listeners = this.listenerList.getListenerList ();
28048 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28049 if (listeners[i] === c && listeners[i + 1] === a) {
28050 isListener = true;
28051 }}
28052 return isListener;
28053 }, "Class,java.awt.event.ActionListener");
28054 Clazz_defineMethod (c$, "getAction", 
28055 function () {
28056 return this.$action;
28057 });
28058 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
28059 function (a) {
28060 javax.swing.AbstractAction.setEnabledFromAction (this, a);
28061 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
28062 this.setActionCommandFromAction (a);
28063 }, "javax.swing.Action");
28064 Clazz_defineMethod (c$, "actionPropertyChanged", 
28065 function (action, propertyName) {
28066 if (propertyName === "ActionCommandKey") {
28067 this.setActionCommandFromAction (action);
28068 } else if (propertyName === "enabled") {
28069 javax.swing.AbstractAction.setEnabledFromAction (this, action);
28070 } else if (propertyName === "ShortDescription") {
28071 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
28072 }}, "javax.swing.Action,~S");
28073 Clazz_defineMethod (c$, "setActionCommandFromAction", 
28074  function (action) {
28075 this.setActionCommand ((action == null) ? null : action.getValue ("ActionCommandKey"));
28076 }, "javax.swing.Action");
28077 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
28078 function (a) {
28079 return  new javax.swing.JTextField.TextFieldActionPropertyChangeListener (this, a);
28080 }, "javax.swing.Action");
28081 Clazz_defineMethod (c$, "getActions", 
28082 function () {
28083 return javax.swing.text.TextAction.augmentList (Clazz_superCall (this, javax.swing.JTextField, "getActions", []), javax.swing.JTextField.defaultActions);
28084 });
28085 Clazz_defineMethod (c$, "postActionEvent", 
28086 function () {
28087 this.fireActionPerformed ();
28088 });
28089 Clazz_defineMethod (c$, "hasActionListener", 
28090 function () {
28091 var listeners = this.listenerList.getListenerList ();
28092 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28093 if (listeners[i] === java.awt.event.ActionListener) {
28094 return true;
28095 }}
28096 return false;
28097 });
28098 Clazz_defineMethod (c$, "paramString", 
28099 function () {
28100 var horizontalAlignmentString;
28101 if (this.horizontalAlignment == 2) {
28102 horizontalAlignmentString = "LEFT";
28103 } else if (this.horizontalAlignment == 0) {
28104 horizontalAlignmentString = "CENTER";
28105 } else if (this.horizontalAlignment == 4) {
28106 horizontalAlignmentString = "RIGHT";
28107 } else if (this.horizontalAlignment == 10) {
28108 horizontalAlignmentString = "LEADING";
28109 } else if (this.horizontalAlignment == 11) {
28110 horizontalAlignmentString = "TRAILING";
28111 } else horizontalAlignmentString = "";
28112 var commandString = (this.command != null ? this.command : "");
28113 return Clazz_superCall (this, javax.swing.JTextField, "paramString", []) + ",columns=" + this.columns + ",columnWidth=" + this.columnWidth + ",command=" + commandString + ",horizontalAlignment=" + horizontalAlignmentString;
28114 });
28115 c$.$JTextField$ScrollRepainter$ = function () {
28116 Clazz_pu$h(self.c$);
28117 c$ = Clazz_decorateAsClass (function () {
28118 Clazz_prepareCallback (this, arguments);
28119 Clazz_instantialize (this, arguments);
28120 }, javax.swing.JTextField, "ScrollRepainter", null, javax.swing.event.ChangeListener);
28121 Clazz_overrideMethod (c$, "stateChanged", 
28122 function (a) {
28123 this.b$["javax.swing.JTextField"].repaint ();
28124 }, "javax.swing.event.ChangeEvent");
28125 c$ = Clazz_p0p ();
28126 };
28127 Clazz_pu$h(self.c$);
28128 c$ = Clazz_declareType (javax.swing.JTextField, "TextFieldActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
28129 Clazz_overrideMethod (c$, "actionPropertyChanged", 
28130 function (a, b, c) {
28131 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
28132 a.configurePropertiesFromAction (b);
28133 } else {
28134 a.actionPropertyChanged (b, c.getPropertyName ());
28135 }}, "javax.swing.JTextField,javax.swing.Action,java.beans.PropertyChangeEvent");
28136 c$ = Clazz_p0p ();
28137 Clazz_pu$h(self.c$);
28138 c$ = Clazz_declareType (javax.swing.JTextField, "NotifyAction", javax.swing.text.TextAction);
28139 Clazz_makeConstructor (c$, 
28140 function () {
28141 Clazz_superConstructor (this, javax.swing.JTextField.NotifyAction, ["notify-field-accept"]);
28142 });
28143 Clazz_overrideMethod (c$, "actionPerformed", 
28144 function (a) {
28145 var b = this.getFocusedComponent ();
28146 if (Clazz_instanceOf (b, javax.swing.JTextField)) {
28147 var c = b;
28148 c.postActionEvent ();
28149 }}, "java.awt.event.ActionEvent");
28150 Clazz_overrideMethod (c$, "isEnabled", 
28151 function () {
28152 var a = this.getFocusedComponent ();
28153 if (Clazz_instanceOf (a, javax.swing.JTextField)) {
28154 return (a).hasActionListener ();
28155 }return false;
28156 });
28157 c$ = Clazz_p0p ();
28158 Clazz_defineStatics (c$,
28159 "notifyAction", "notify-field-accept");
28160 c$.defaultActions = c$.prototype.defaultActions =  Clazz_newArray (-1, [ new javax.swing.JTextField.NotifyAction ()]);
28161 Clazz_defineStatics (c$,
28162 "$uiClassID", "TextFieldUI");
28163 });
28164 Clazz_declarePackage ("javax.swing");
28165 Clazz_load (["java.beans.PropertyChangeListener"], "javax.swing.ActionPropertyChangeListener", null, function () {
28166 c$ = Clazz_decorateAsClass (function () {
28167 this.action = null;
28168 Clazz_instantialize (this, arguments);
28169 }, javax.swing, "ActionPropertyChangeListener", null, java.beans.PropertyChangeListener);
28170 Clazz_makeConstructor (c$, 
28171 function (c, a) {
28172 this.setTarget (c);
28173 this.action = a;
28174 }, "~O,javax.swing.Action");
28175 Clazz_overrideMethod (c$, "propertyChange", 
28176 function (e) {
28177 var target = this.getTarget ();
28178 if (target == null) {
28179 this.getAction ().removePropertyChangeListener (this);
28180 } else {
28181 this.actionPropertyChanged (target, this.getAction (), e);
28182 }}, "java.beans.PropertyChangeEvent");
28183 Clazz_defineMethod (c$, "setTarget", 
28184  function (c) {
28185 }, "~O");
28186 Clazz_defineMethod (c$, "getTarget", 
28187 function () {
28188 return null;
28189 });
28190 Clazz_defineMethod (c$, "getAction", 
28191 function () {
28192 return this.action;
28193 });
28194 });
28195 Clazz_declarePackage ("javax.swing.event");
28196 Clazz_load (["java.util.EventListener"], "javax.swing.event.ChangeListener", null, function () {
28197 Clazz_declareInterface (javax.swing.event, "ChangeListener", java.util.EventListener);
28198 });
28199 Clazz_declarePackage ("javax.swing");
28200 Clazz_load (null, "javax.swing.ActionMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28201 c$ = Clazz_decorateAsClass (function () {
28202 this.arrayTable = null;
28203 this.parent = null;
28204 Clazz_instantialize (this, arguments);
28205 }, javax.swing, "ActionMap");
28206 Clazz_makeConstructor (c$, 
28207 function () {
28208 });
28209 Clazz_defineMethod (c$, "setParent", 
28210 function (map) {
28211 this.parent = map;
28212 }, "javax.swing.ActionMap");
28213 Clazz_defineMethod (c$, "getParent", 
28214 function () {
28215 return this.parent;
28216 });
28217 Clazz_defineMethod (c$, "put", 
28218 function (key, action) {
28219 if (key == null) {
28220 return;
28221 }if (action == null) {
28222 this.remove (key);
28223 } else {
28224 if (this.arrayTable == null) {
28225 this.arrayTable =  new javax.swing.ArrayTable ();
28226 }this.arrayTable.put (key, action);
28227 }}, "~O,javax.swing.Action");
28228 Clazz_defineMethod (c$, "get", 
28229 function (key) {
28230 var value = (this.arrayTable == null) ? null : this.arrayTable.get (key);
28231 if (value == null) {
28232 var parent = this.getParent ();
28233 if (parent != null) {
28234 return parent.get (key);
28235 }}return value;
28236 }, "~O");
28237 Clazz_defineMethod (c$, "remove", 
28238 function (key) {
28239 if (this.arrayTable != null) {
28240 this.arrayTable.remove (key);
28241 }}, "~O");
28242 Clazz_defineMethod (c$, "clear", 
28243 function () {
28244 if (this.arrayTable != null) {
28245 this.arrayTable.clear ();
28246 }});
28247 Clazz_defineMethod (c$, "keys", 
28248 function () {
28249 if (this.arrayTable == null) {
28250 return null;
28251 }return this.arrayTable.getKeys (null);
28252 });
28253 Clazz_defineMethod (c$, "size", 
28254 function () {
28255 if (this.arrayTable == null) {
28256 return 0;
28257 }return this.arrayTable.size ();
28258 });
28259 Clazz_defineMethod (c$, "allKeys", 
28260 function () {
28261 var count = this.size ();
28262 var parent = this.getParent ();
28263 if (count == 0) {
28264 if (parent != null) {
28265 return parent.allKeys ();
28266 }return this.keys ();
28267 }if (parent == null) {
28268 return this.keys ();
28269 }var keys = this.keys ();
28270 var pKeys = parent.allKeys ();
28271 if (pKeys == null) {
28272 return keys;
28273 }if (keys == null) {
28274 return pKeys;
28275 }var keyMap =  new java.util.HashMap ();
28276 var counter;
28277 for (counter = keys.length - 1; counter >= 0; counter--) {
28278 keyMap.put (keys[counter], keys[counter]);
28279 }
28280 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28281 keyMap.put (pKeys[counter], pKeys[counter]);
28282 }
28283 return keyMap.keySet ().toArray ();
28284 });
28285 });
28286 Clazz_declarePackage ("javax.swing");
28287 Clazz_load (null, "javax.swing.InputMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28288 c$ = Clazz_decorateAsClass (function () {
28289 this.arrayTable = null;
28290 this.parent = null;
28291 Clazz_instantialize (this, arguments);
28292 }, javax.swing, "InputMap");
28293 Clazz_makeConstructor (c$, 
28294 function () {
28295 });
28296 Clazz_defineMethod (c$, "setParent", 
28297 function (map) {
28298 this.parent = map;
28299 }, "javax.swing.InputMap");
28300 Clazz_defineMethod (c$, "getParent", 
28301 function () {
28302 return this.parent;
28303 });
28304 Clazz_defineMethod (c$, "put", 
28305 function (keyStroke, actionMapKey) {
28306 if (keyStroke == null) {
28307 return;
28308 }if (actionMapKey == null) {
28309 this.remove (keyStroke);
28310 } else {
28311 if (this.arrayTable == null) {
28312 this.arrayTable =  new javax.swing.ArrayTable ();
28313 }this.arrayTable.put (keyStroke, actionMapKey);
28314 }}, "javax.swing.KeyStroke,~O");
28315 Clazz_defineMethod (c$, "get", 
28316 function (keyStroke) {
28317 if (this.arrayTable == null) {
28318 var parent = this.getParent ();
28319 if (parent != null) {
28320 return parent.get (keyStroke);
28321 }return null;
28322 }var value = this.arrayTable.get (keyStroke);
28323 if (value == null) {
28324 var parent = this.getParent ();
28325 if (parent != null) {
28326 return parent.get (keyStroke);
28327 }}return value;
28328 }, "javax.swing.KeyStroke");
28329 Clazz_defineMethod (c$, "remove", 
28330 function (key) {
28331 if (this.arrayTable != null) {
28332 this.arrayTable.remove (key);
28333 }}, "javax.swing.KeyStroke");
28334 Clazz_defineMethod (c$, "clear", 
28335 function () {
28336 if (this.arrayTable != null) {
28337 this.arrayTable.clear ();
28338 }});
28339 Clazz_defineMethod (c$, "keys", 
28340 function () {
28341 if (this.arrayTable == null) {
28342 return null;
28343 }var keys =  new Array (this.arrayTable.size ());
28344 this.arrayTable.getKeys (keys);
28345 return keys;
28346 });
28347 Clazz_defineMethod (c$, "size", 
28348 function () {
28349 if (this.arrayTable == null) {
28350 return 0;
28351 }return this.arrayTable.size ();
28352 });
28353 Clazz_defineMethod (c$, "allKeys", 
28354 function () {
28355 var count = this.size ();
28356 var parent = this.getParent ();
28357 if (count == 0) {
28358 if (parent != null) {
28359 return parent.allKeys ();
28360 }return this.keys ();
28361 }if (parent == null) {
28362 return this.keys ();
28363 }var keys = this.keys ();
28364 var pKeys = parent.allKeys ();
28365 if (pKeys == null) {
28366 return keys;
28367 }if (keys == null) {
28368 return pKeys;
28369 }var keyMap =  new java.util.HashMap ();
28370 var counter;
28371 for (counter = keys.length - 1; counter >= 0; counter--) {
28372 keyMap.put (keys[counter], keys[counter]);
28373 }
28374 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28375 keyMap.put (pKeys[counter], pKeys[counter]);
28376 }
28377 var allKeys =  new Array (keyMap.size ());
28378 return keyMap.keySet ().toArray (allKeys);
28379 });
28380 });
28381 Clazz_declarePackage ("javax.swing");
28382 Clazz_declareInterface (javax.swing, "Scrollable");
28383 Clazz_declarePackage ("javax.swing.event");
28384 Clazz_load (["java.util.EventObject"], "javax.swing.event.CaretEvent", null, function () {
28385 c$ = Clazz_declareType (javax.swing.event, "CaretEvent", java.util.EventObject);
28386 });
28387 Clazz_declarePackage ("javax.swing.event");
28388 Clazz_load (["java.util.EventListener"], "javax.swing.event.DocumentListener", null, function () {
28389 Clazz_declareInterface (javax.swing.event, "DocumentListener", java.util.EventListener);
28390 });
28391 Clazz_declarePackage ("javax.swing.event");
28392 Clazz_load (null, "javax.swing.event.EventListenerList", ["java.lang.reflect.Array"], function () {
28393 c$ = Clazz_decorateAsClass (function () {
28394 this.listenerList = null;
28395 Clazz_instantialize (this, arguments);
28396 }, javax.swing.event, "EventListenerList");
28397 Clazz_prepareFields (c$, function () {
28398 this.listenerList = javax.swing.event.EventListenerList.NULL_ARRAY;
28399 });
28400 Clazz_defineMethod (c$, "getListenerList", 
28401 function () {
28402 return this.listenerList;
28403 });
28404 Clazz_defineMethod (c$, "getListeners", 
28405 function (t) {
28406 var lList = this.listenerList;
28407 var n = this.getListenerCount (lList, t);
28408 var result = java.lang.reflect.Array.newInstance (t, n);
28409 var j = 0;
28410 for (var i = lList.length - 2; i >= 0; i -= 2) {
28411 if (lList[i] === t) {
28412 result[j++] = lList[i + 1];
28413 }}
28414 return result;
28415 }, "Class");
28416 Clazz_defineMethod (c$, "getListenerCount", 
28417 function () {
28418 return Clazz_doubleToInt (this.listenerList.length / 2);
28419 });
28420 Clazz_defineMethod (c$, "getListenerCount", 
28421 function (t) {
28422 var lList = this.listenerList;
28423 return this.getListenerCount (lList, t);
28424 }, "Class");
28425 Clazz_defineMethod (c$, "getListenerCount", 
28426  function (list, t) {
28427 var count = 0;
28428 for (var i = 0; i < list.length; i += 2) {
28429 if (t === list[i]) count++;
28430 }
28431 return count;
28432 }, "~A,Class");
28433 Clazz_defineMethod (c$, "add", 
28434 function (t, l) {
28435 if (l == null) {
28436 return;
28437 }if (this.listenerList === javax.swing.event.EventListenerList.NULL_ARRAY) {
28438 this.listenerList =  Clazz_newArray (-1, [t, l]);
28439 } else {
28440 var i = this.listenerList.length;
28441 var tmp =  new Array (i + 2);
28442 System.arraycopy (this.listenerList, 0, tmp, 0, i);
28443 tmp[i] = t;
28444 tmp[i + 1] = l;
28445 this.listenerList = tmp;
28446 }}, "Class,~O");
28447 Clazz_defineMethod (c$, "remove", 
28448 function (t, l) {
28449 if (l == null) {
28450 return;
28451 }var index = -1;
28452 for (var i = this.listenerList.length - 2; i >= 0; i -= 2) {
28453 if ((this.listenerList[i] === t) && (this.listenerList[i + 1].equals (l) == true)) {
28454 index = i;
28455 break;
28456 }}
28457 if (index != -1) {
28458 var tmp =  new Array (this.listenerList.length - 2);
28459 System.arraycopy (this.listenerList, 0, tmp, 0, index);
28460 if (index < tmp.length) System.arraycopy (this.listenerList, index + 2, tmp, index, tmp.length - index);
28461 this.listenerList = (tmp.length == 0) ? javax.swing.event.EventListenerList.NULL_ARRAY : tmp;
28462 }}, "Class,~O");
28463 Clazz_overrideMethod (c$, "toString", 
28464 function () {
28465 var lList = this.listenerList;
28466 var s = "EventListenerList: ";
28467 s += Clazz_doubleToInt (lList.length / 2) + " listeners: ";
28468 for (var i = 0; i <= lList.length - 2; i += 2) {
28469 s += " type " + (lList[i]).getName ();
28470 s += " listener " + lList[i + 1];
28471 }
28472 return s;
28473 });
28474 c$.NULL_ARRAY = c$.prototype.NULL_ARRAY =  new Array (0);
28475 });
28476 Clazz_declarePackage ("javax.swing.event");
28477 Clazz_load (["java.util.EventObject"], "javax.swing.event.ChangeEvent", null, function () {
28478 c$ = Clazz_declareType (javax.swing.event, "ChangeEvent", java.util.EventObject);
28479 });
28480 Clazz_declarePackage ("jssun.swing");
28481 Clazz_load (["jssun.swing.UIClientPropertyKey"], "jssun.swing.StringUIClientPropertyKey", null, function () {
28482 c$ = Clazz_decorateAsClass (function () {
28483 this.key = null;
28484 Clazz_instantialize (this, arguments);
28485 }, jssun.swing, "StringUIClientPropertyKey", null, jssun.swing.UIClientPropertyKey);
28486 Clazz_makeConstructor (c$, 
28487 function (key) {
28488 this.key = key;
28489 }, "~S");
28490 Clazz_overrideMethod (c$, "toString", 
28491 function () {
28492 return this.key;
28493 });
28494 });
28495 Clazz_declarePackage ("jssun.swing");
28496 Clazz_declareInterface (jssun.swing, "UIClientPropertyKey");
28497 Clazz_declarePackage ("java.awt");
28498 Clazz_load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () {
28499 c$ = Clazz_declareType (java.awt, "Graphics2D", java.awt.Graphics);
28500 Clazz_makeConstructor (c$, 
28501 function () {
28502 Clazz_superConstructor (this, java.awt.Graphics2D, []);
28503 });
28504 Clazz_overrideMethod (c$, "draw3DRect", 
28505 function (x, y, width, height, raised) {
28506 var p = this.getPaint ();
28507 var c = this.getColor ();
28508 var brighter = c.brighter ();
28509 var darker = c.darker ();
28510 this.setColor (raised ? brighter : darker);
28511 this.fillRect (x, y, 1, height + 1);
28512 this.fillRect (x + 1, y, width - 1, 1);
28513 this.setColor (raised ? darker : brighter);
28514 this.fillRect (x + 1, y + height, width, 1);
28515 this.fillRect (x + width, y, 1, height);
28516 this.setPaint (p);
28517 }, "~N,~N,~N,~N,~B");
28518 Clazz_overrideMethod (c$, "fill3DRect", 
28519 function (x, y, width, height, raised) {
28520 var p = this.getPaint ();
28521 var c = this.getColor ();
28522 var brighter = c.brighter ();
28523 var darker = c.darker ();
28524 if (!raised) {
28525 this.setColor (darker);
28526 } else if (p !== c) {
28527 this.setColor (c);
28528 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28529 this.setColor (raised ? brighter : darker);
28530 this.fillRect (x, y, 1, height);
28531 this.fillRect (x + 1, y, width - 2, 1);
28532 this.setColor (raised ? darker : brighter);
28533 this.fillRect (x + 1, y + height - 1, width - 1, 1);
28534 this.fillRect (x + width - 1, y, 1, height - 1);
28535 this.setPaint (p);
28536 }, "~N,~N,~N,~N,~B");
28537 });
28538 Clazz_declarePackage ("java.awt");
28539 c$ = Clazz_declareType (java.awt, "Graphics");
28540 Clazz_makeConstructor (c$, 
28541 function () {
28542 });
28543 Clazz_defineMethod (c$, "create", 
28544 function () {
28545 return this.createSwingJS ();
28546 });
28547 Clazz_defineMethod (c$, "create", 
28548 function (x, y, width, height) {
28549 return this.create4 (x, y, width, height);
28550 }, "~N,~N,~N,~N");
28551 Clazz_defineMethod (c$, "create4", 
28552 function (x, y, width, height) {
28553 var g = this.createSwingJS ();
28554 if (g == null) return null;
28555 g.translate (x, y);
28556 g.clipRect (0, 0, width, height);
28557 return g;
28558 }, "~N,~N,~N,~N");
28559 Clazz_defineMethod (c$, "getFontMetrics", 
28560 function () {
28561 return this.getFontMetrics (this.getFont ());
28562 });
28563 Clazz_defineMethod (c$, "drawRect", 
28564 function (x, y, width, height) {
28565 if ((width < 0) || (height < 0)) {
28566 return;
28567 }if (height == 0 || width == 0) {
28568 this.drawLine (x, y, x + width, y + height);
28569 } else {
28570 this.drawLine (x, y, x + width - 1, y);
28571 this.drawLine (x + width, y, x + width, y + height - 1);
28572 this.drawLine (x + width, y + height, x + 1, y + height);
28573 this.drawLine (x, y + height, x, y + 1);
28574 }}, "~N,~N,~N,~N");
28575 Clazz_defineMethod (c$, "draw3DRect", 
28576 function (x, y, width, height, raised) {
28577 var c = this.getColor ();
28578 var brighter = c.brighter ();
28579 var darker = c.darker ();
28580 this.setColor (raised ? brighter : darker);
28581 this.drawLine (x, y, x, y + height);
28582 this.drawLine (x + 1, y, x + width - 1, y);
28583 this.setColor (raised ? darker : brighter);
28584 this.drawLine (x + 1, y + height, x + width, y + height);
28585 this.drawLine (x + width, y, x + width, y + height - 1);
28586 this.setColor (c);
28587 }, "~N,~N,~N,~N,~B");
28588 Clazz_defineMethod (c$, "fill3DRect", 
28589 function (x, y, width, height, raised) {
28590 var c = this.getColor ();
28591 var brighter = c.brighter ();
28592 var darker = c.darker ();
28593 if (!raised) {
28594 this.setColor (darker);
28595 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28596 this.setColor (raised ? brighter : darker);
28597 this.drawLine (x, y, x, y + height - 1);
28598 this.drawLine (x + 1, y, x + width - 2, y);
28599 this.setColor (raised ? darker : brighter);
28600 this.drawLine (x + 1, y + height - 1, x + width - 1, y + height - 1);
28601 this.drawLine (x + width - 1, y, x + width - 1, y + height - 2);
28602 this.setColor (c);
28603 }, "~N,~N,~N,~N,~B");
28604 Clazz_defineMethod (c$, "drawPolygon", 
28605 function (p) {
28606 this.drawPolygon (p.xpoints, p.ypoints, p.npoints);
28607 }, "java.awt.Polygon");
28608 Clazz_defineMethod (c$, "fillPolygon", 
28609 function (p) {
28610 this.fillPolygon (p.xpoints, p.ypoints, p.npoints);
28611 }, "java.awt.Polygon");
28612 Clazz_defineMethod (c$, "drawChars", 
28613 function (data, offset, length, x, y) {
28614 this.drawString ( String.instantialize (data, offset, length), x, y);
28615 }, "~A,~N,~N,~N,~N");
28616 Clazz_defineMethod (c$, "drawBytes", 
28617 function (data, offset, length, x, y) {
28618 this.drawString ( String.instantialize (data, 0, offset, length), x, y);
28619 }, "~A,~N,~N,~N,~N");
28620 Clazz_overrideMethod (c$, "finalize", 
28621 function () {
28622 this.dispose ();
28623 });
28624 Clazz_overrideMethod (c$, "toString", 
28625 function () {
28626 return this.getClass ().getName () + "[font=" + this.getFont () + ",color=" + this.getColor () + "]";
28627 });
28628 Clazz_defineMethod (c$, "getClipRect", 
28629 function () {
28630 return this.getClipBounds ();
28631 });
28632 Clazz_defineMethod (c$, "hitClip", 
28633 function (x, y, width, height) {
28634 var clipRect = this.getClipBounds ();
28635 if (clipRect == null) {
28636 return true;
28637 }return clipRect.intersects (x, y, width, height);
28638 }, "~N,~N,~N,~N");
28639 Clazz_declarePackage ("jssun.font");
28640 Clazz_load (["java.awt.FontMetrics", "java.util.Hashtable"], "jssun.font.FontDesignMetrics", ["java.lang.IndexOutOfBoundsException", "java.awt.Toolkit", "swingjs.JSToolkit"], function () {
28641 c$ = Clazz_decorateAsClass (function () {
28642 this.ascent = 0;
28643 this.descent = 0;
28644 this.leading = 0;
28645 this.height = -1;
28646 Clazz_instantialize (this, arguments);
28647 }, jssun.font, "FontDesignMetrics", java.awt.FontMetrics);
28648 c$.getMetrics = Clazz_defineMethod (c$, "getMetrics", 
28649 function (font) {
28650 var m = null;
28651 var r;
28652 r = jssun.font.FontDesignMetrics.metricsCache.get (font);
28653 if (r != null) {
28654 m = r.get ();
28655 }if (m == null) {
28656 m =  new jssun.font.FontDesignMetrics (font);
28657 jssun.font.FontDesignMetrics.metricsCache.put (font,  new jssun.font.FontDesignMetrics.KeyReference (font, m));
28658 }for (var i = 0; i < jssun.font.FontDesignMetrics.recentMetrics.length; i++) {
28659 if (jssun.font.FontDesignMetrics.recentMetrics[i] === m) {
28660 return m;
28661 }}
28662 {
28663 jssun.font.FontDesignMetrics.recentMetrics[jssun.font.FontDesignMetrics.recentIndex++] = m;
28664 if (jssun.font.FontDesignMetrics.recentIndex == 5) {
28665 jssun.font.FontDesignMetrics.recentIndex = 0;
28666 }}return m;
28667 }, "java.awt.Font");
28668 Clazz_makeConstructor (c$, 
28669  function (font) {
28670 Clazz_superConstructor (this, jssun.font.FontDesignMetrics, [font]);
28671 this.font = font;
28672 this.initMatrixAndMetrics ();
28673 }, "java.awt.Font");
28674 Clazz_defineMethod (c$, "initMatrixAndMetrics", 
28675  function () {
28676 {
28677 //need to calculate ascent, descent, leading, and maxAdvance
28678 }});
28679 Clazz_defineMethod (c$, "charWidth", 
28680 function (ch) {
28681 var s = "";
28682 {
28683 s = "" + ch;
28684 }return this.stringWidth (s);
28685 }, "~S");
28686 Clazz_overrideMethod (c$, "stringWidth", 
28687 function (str) {
28688 return Clazz_doubleToInt (0.5 + this.getWidth (str));
28689 }, "~S");
28690 Clazz_defineMethod (c$, "getWidth", 
28691  function (str) {
28692 return swingjs.JSToolkit.getStringWidth (null, this.font, str);
28693 }, "~S");
28694 Clazz_overrideMethod (c$, "charsWidth", 
28695 function (data, off, len) {
28696 var width = 0;
28697 if (len < 0) {
28698 throw  new IndexOutOfBoundsException ("len=" + len);
28699 }var limit = off + len;
28700 for (var i = off; i < limit; i++) {
28701 var ch = data[i];
28702 width += this.stringWidth ("" + ch);
28703 }
28704 return Clazz_doubleToInt (0.5 + width);
28705 }, "~A,~N,~N");
28706 Clazz_overrideMethod (c$, "getWidths", 
28707 function () {
28708 var widths =  Clazz_newIntArray (256, 0);
28709 return widths;
28710 });
28711 Clazz_defineMethod (c$, "getAscent", 
28712 function () {
28713 if (this.ascent == 0) this.ascent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getAscent ();
28714 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.ascent);
28715 });
28716 Clazz_defineMethod (c$, "getDescent", 
28717 function () {
28718 if (this.descent == 0) this.descent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getDescent ();
28719 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28720 });
28721 Clazz_overrideMethod (c$, "getLeading", 
28722 function () {
28723 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading) - Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28724 });
28725 Clazz_overrideMethod (c$, "getHeight", 
28726 function () {
28727 if (this.height < 0) {
28728 this.height = this.getAscent () + Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading);
28729 }return this.height;
28730 });
28731 Clazz_pu$h(self.c$);
28732 c$ = Clazz_decorateAsClass (function () {
28733 this.key = null;
28734 this.val = null;
28735 Clazz_instantialize (this, arguments);
28736 }, jssun.font.FontDesignMetrics, "KeyReference");
28737 Clazz_makeConstructor (c$, 
28738 function (a, b) {
28739 this.key = a;
28740 this.val = b;
28741 }, "~O,~O");
28742 Clazz_defineMethod (c$, "get", 
28743 function () {
28744 return this.val;
28745 });
28746 Clazz_defineMethod (c$, "dispose", 
28747 function () {
28748 if (jssun.font.FontDesignMetrics.metricsCache.get (this.key) === this) {
28749 jssun.font.FontDesignMetrics.metricsCache.remove (this.key);
28750 }});
28751 c$ = Clazz_p0p ();
28752 Clazz_defineStatics (c$,
28753 "roundingUpValue", 0.95);
28754 c$.metricsCache = c$.prototype.metricsCache =  new java.util.Hashtable ();
28755 Clazz_defineStatics (c$,
28756 "MAXRECENT", 5);
28757 c$.recentMetrics = c$.prototype.recentMetrics =  new Array (5);
28758 Clazz_defineStatics (c$,
28759 "recentIndex", 0);
28760 });
28761 Clazz_declarePackage ("java.awt");
28762 Clazz_load (["java.awt.font.FontRenderContext"], "java.awt.FontMetrics", ["java.lang.Character"], function () {
28763 c$ = Clazz_decorateAsClass (function () {
28764 this.font = null;
28765 Clazz_instantialize (this, arguments);
28766 }, java.awt, "FontMetrics");
28767 Clazz_makeConstructor (c$, 
28768 function (font) {
28769 this.font = font;
28770 }, "java.awt.Font");
28771 Clazz_defineMethod (c$, "getFont", 
28772 function () {
28773 return this.font;
28774 });
28775 Clazz_defineMethod (c$, "getFontRenderContext", 
28776 function () {
28777 return java.awt.FontMetrics.DEFAULT_FRC;
28778 });
28779 Clazz_defineMethod (c$, "getLeading", 
28780 function () {
28781 return 0;
28782 });
28783 Clazz_defineMethod (c$, "getAscent", 
28784 function () {
28785 return this.font.getSize ();
28786 });
28787 Clazz_defineMethod (c$, "getDescent", 
28788 function () {
28789 return 0;
28790 });
28791 Clazz_defineMethod (c$, "getHeight", 
28792 function () {
28793 return this.getLeading () + this.getAscent () + this.getDescent ();
28794 });
28795 Clazz_defineMethod (c$, "getMaxAscent", 
28796 function () {
28797 return this.getAscent ();
28798 });
28799 Clazz_defineMethod (c$, "getMaxDescent", 
28800 function () {
28801 return this.getDescent ();
28802 });
28803 Clazz_defineMethod (c$, "getMaxDecent", 
28804 function () {
28805 return this.getMaxDescent ();
28806 });
28807 Clazz_defineMethod (c$, "getMaxAdvance", 
28808 function () {
28809 return -1;
28810 });
28811 Clazz_defineMethod (c$, "charWidth", 
28812 function (codePoint) {
28813 if (!Character.isValidCodePoint (codePoint)) {
28814 codePoint = 0xffff;
28815 }if (codePoint < 256) {
28816 return this.getWidths ()[codePoint];
28817 } else {
28818 var buffer =  Clazz_newCharArray (2, '\0');
28819 var len = Character.toChars (codePoint, buffer, 0);
28820 return this.charsWidth (buffer, 0, len);
28821 }}, "~N");
28822 Clazz_defineMethod (c$, "charWidth", 
28823 function (ch) {
28824 if (ch.charCodeAt (0) < 256) {
28825 return this.getWidths ()[ch.charCodeAt (0)];
28826 }var data =  Clazz_newCharArray (-1, [ch]);
28827 return this.charsWidth (data, 0, 1);
28828 }, "~S");
28829 Clazz_defineMethod (c$, "stringWidth", 
28830 function (str) {
28831 var len = str.length;
28832 var data =  Clazz_newCharArray (len, '\0');
28833 str.getChars (0, len, data, 0);
28834 return this.charsWidth (data, 0, len);
28835 }, "~S");
28836 Clazz_defineMethod (c$, "charsWidth", 
28837 function (data, off, len) {
28838 return this.stringWidth ( String.instantialize (data, off, len));
28839 }, "~A,~N,~N");
28840 Clazz_defineMethod (c$, "bytesWidth", 
28841 function (data, off, len) {
28842 return this.stringWidth ( String.instantialize (data, 0, off, len));
28843 }, "~A,~N,~N");
28844 Clazz_defineMethod (c$, "getWidths", 
28845 function () {
28846 var widths =  Clazz_newIntArray (256, 0);
28847 for (var ch = String.fromCharCode (0); ch.charCodeAt (0) < 256; ch = String.fromCharCode (ch.charCodeAt (0) + 1)) {
28848 widths[ch.charCodeAt (0)] = this.charWidth (ch);
28849 }
28850 return widths;
28851 });
28852 Clazz_overrideMethod (c$, "toString", 
28853 function () {
28854 return this.getClass ().getName () + "[font=" + this.getFont () + "ascent=" + this.getAscent () + ", descent=" + this.getDescent () + ", height=" + this.getHeight () + "]";
28855 });
28856 c$.DEFAULT_FRC = c$.prototype.DEFAULT_FRC =  new java.awt.font.FontRenderContext (null, false, false);
28857 });
28858 Clazz_declarePackage ("JU");
28859 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 () {
28860 c$ = Clazz_declareType (JU, "PT");
28861 c$.parseInt = Clazz_defineMethod (c$, "parseInt", 
28862 function (str) {
28863 return JU.PT.parseIntNext (str,  Clazz_newIntArray (-1, [0]));
28864 }, "~S");
28865 c$.parseIntNext = Clazz_defineMethod (c$, "parseIntNext", 
28866 function (str, next) {
28867 var cch = str.length;
28868 if (next[0] < 0 || next[0] >= cch) return -2147483648;
28869 return JU.PT.parseIntChecked (str, cch, next);
28870 }, "~S,~A");
28871 c$.parseIntChecked = Clazz_defineMethod (c$, "parseIntChecked", 
28872 function (str, ichMax, next) {
28873 var digitSeen = false;
28874 var value = 0;
28875 var ich = next[0];
28876 if (ich < 0) return -2147483648;
28877 var ch;
28878 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28879
28880 var negative = false;
28881 if (ich < ichMax && str.charCodeAt (ich) == 45) {
28882 negative = true;
28883 ++ich;
28884 }while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28885 value = value * 10 + (ch - 48);
28886 digitSeen = true;
28887 ++ich;
28888 }
28889 if (!digitSeen) value = -2147483648;
28890  else if (negative) value = -value;
28891 next[0] = ich;
28892 return value;
28893 }, "~S,~N,~A");
28894 c$.isWhiteSpace = Clazz_defineMethod (c$, "isWhiteSpace", 
28895 function (str, ich) {
28896 var ch;
28897 return (ich >= 0 && ((ch = str.charAt (ich)) == ' ' || ch == '\t' || ch == '\n'));
28898 }, "~S,~N");
28899 c$.parseFloatChecked = Clazz_defineMethod (c$, "parseFloatChecked", 
28900 function (str, ichMax, next, isStrict) {
28901 var digitSeen = false;
28902 var ich = next[0];
28903 if (isStrict && str.indexOf ('\n') != str.lastIndexOf ('\n')) return NaN;
28904 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28905
28906 var negative = false;
28907 if (ich < ichMax && str.charAt (ich) == '-') {
28908 ++ich;
28909 negative = true;
28910 }var ch = 0;
28911 var ival = 0;
28912 var ival2 = 0;
28913 while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28914 ival = (ival * 10) + (ch - 48) * 1;
28915 ++ich;
28916 digitSeen = true;
28917 }
28918 var isDecimal = false;
28919 var iscale = 0;
28920 var nzero = (ival == 0 ? -1 : 0);
28921 if (ch == 46) {
28922 isDecimal = true;
28923 while (++ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28924 digitSeen = true;
28925 if (nzero < 0) {
28926 if (ch == 48) {
28927 nzero--;
28928 continue;
28929 }nzero = -nzero;
28930 }if (iscale < JU.PT.decimalScale.length) {
28931 ival2 = (ival2 * 10) + (ch - 48) * 1;
28932 iscale++;
28933 }}
28934 }var value;
28935 if (!digitSeen) {
28936 value = NaN;
28937 } else if (ival2 > 0) {
28938 value = ival2 * JU.PT.decimalScale[iscale - 1];
28939 if (nzero > 1) {
28940 if (nzero - 2 < JU.PT.decimalScale.length) {
28941 value *= JU.PT.decimalScale[nzero - 2];
28942 } else {
28943 value *= Math.pow (10, 1 - nzero);
28944 }} else {
28945 value += ival;
28946 }} else {
28947 value = ival;
28948 }var isExponent = false;
28949 if (ich < ichMax && (ch == 69 || ch == 101 || ch == 68)) {
28950 isExponent = true;
28951 if (++ich >= ichMax) return NaN;
28952 ch = str.charCodeAt (ich);
28953 if ((ch == 43) && (++ich >= ichMax)) return NaN;
28954 next[0] = ich;
28955 var exponent = JU.PT.parseIntChecked (str, ichMax, next);
28956 if (exponent == -2147483648) return NaN;
28957 if (exponent > 0 && exponent <= JU.PT.tensScale.length) value *= JU.PT.tensScale[exponent - 1];
28958  else if (exponent < 0 && -exponent <= JU.PT.decimalScale.length) value *= JU.PT.decimalScale[-exponent - 1];
28959  else if (exponent != 0) value *= Math.pow (10, exponent);
28960 } else {
28961 next[0] = ich;
28962 }if (negative) value = -value;
28963 if (value == Infinity) value = 3.4028235E38;
28964 return (!isStrict || (!isExponent || isDecimal) && JU.PT.checkTrailingText (str, next[0], ichMax) ? value : NaN);
28965 }, "~S,~N,~A,~B");
28966 c$.checkTrailingText = Clazz_defineMethod (c$, "checkTrailingText", 
28967 function (str, ich, ichMax) {
28968 var ch;
28969 while (ich < ichMax && (JU.PT.isWhitespace (ch = str.charAt (ich)) || ch == ';')) ++ich;
28970
28971 return (ich == ichMax);
28972 }, "~S,~N,~N");
28973 c$.parseFloatArray = Clazz_defineMethod (c$, "parseFloatArray", 
28974 function (str) {
28975 return JU.PT.parseFloatArrayNext (str,  Clazz_newIntArray (1, 0), null, null, null);
28976 }, "~S");
28977 c$.parseFloatArrayInfested = Clazz_defineMethod (c$, "parseFloatArrayInfested", 
28978 function (tokens, data) {
28979 var len = data.length;
28980 var nTokens = tokens.length;
28981 var n = 0;
28982 var max = 0;
28983 for (var i = 0; i >= 0 && i < len && n < nTokens; i++) {
28984 var f;
28985 while (Float.isNaN (f = JU.PT.parseFloat (tokens[n++])) && n < nTokens) {
28986 }
28987 if (!Float.isNaN (f)) data[(max = i)] = f;
28988 if (n == nTokens) break;
28989 }
28990 return max + 1;
28991 }, "~A,~A");
28992 c$.parseFloatArrayNext = Clazz_defineMethod (c$, "parseFloatArrayNext", 
28993 function (str, next, f, strStart, strEnd) {
28994 var n = 0;
28995 var pt = next[0];
28996 if (pt >= 0) {
28997 if (strStart != null) {
28998 var p = str.indexOf (strStart, pt);
28999 if (p >= 0) next[0] = p + strStart.length;
29000 }str = str.substring (next[0]);
29001 pt = (strEnd == null ? -1 : str.indexOf (strEnd));
29002 if (pt < 0) pt = str.length;
29003  else str = str.substring (0, pt);
29004 next[0] += pt + 1;
29005 var tokens = JU.PT.getTokens (str);
29006 if (f == null) f =  Clazz_newFloatArray (tokens.length, 0);
29007 n = JU.PT.parseFloatArrayInfested (tokens, f);
29008 }if (f == null) return  Clazz_newFloatArray (0, 0);
29009 for (var i = n; i < f.length; i++) f[i] = NaN;
29010
29011 return f;
29012 }, "~S,~A,~A,~S,~S");
29013 c$.parseFloatRange = Clazz_defineMethod (c$, "parseFloatRange", 
29014 function (str, ichMax, next) {
29015 var cch = str.length;
29016 if (ichMax > cch) ichMax = cch;
29017 if (next[0] < 0 || next[0] >= ichMax) return NaN;
29018 return JU.PT.parseFloatChecked (str, ichMax, next, false);
29019 }, "~S,~N,~A");
29020 c$.parseFloatNext = Clazz_defineMethod (c$, "parseFloatNext", 
29021 function (str, next) {
29022 var cch = (str == null ? -1 : str.length);
29023 return (next[0] < 0 || next[0] >= cch ? NaN : JU.PT.parseFloatChecked (str, cch, next, false));
29024 }, "~S,~A");
29025 c$.parseFloatStrict = Clazz_defineMethod (c$, "parseFloatStrict", 
29026 function (str) {
29027 var cch = str.length;
29028 if (cch == 0) return NaN;
29029 return JU.PT.parseFloatChecked (str, cch,  Clazz_newIntArray (-1, [0]), true);
29030 }, "~S");
29031 c$.parseFloat = Clazz_defineMethod (c$, "parseFloat", 
29032 function (str) {
29033 return JU.PT.parseFloatNext (str,  Clazz_newIntArray (-1, [0]));
29034 }, "~S");
29035 c$.parseIntRadix = Clazz_defineMethod (c$, "parseIntRadix", 
29036 function (s, i) {
29037 {
29038 return Integer.parseIntRadix(s, i);
29039 }}, "~S,~N");
29040 c$.getTokens = Clazz_defineMethod (c$, "getTokens", 
29041 function (line) {
29042 return JU.PT.getTokensAt (line, 0);
29043 }, "~S");
29044 c$.parseToken = Clazz_defineMethod (c$, "parseToken", 
29045 function (str) {
29046 return JU.PT.parseTokenNext (str,  Clazz_newIntArray (-1, [0]));
29047 }, "~S");
29048 c$.parseTrimmed = Clazz_defineMethod (c$, "parseTrimmed", 
29049 function (str) {
29050 return JU.PT.parseTrimmedRange (str, 0, str.length);
29051 }, "~S");
29052 c$.parseTrimmedAt = Clazz_defineMethod (c$, "parseTrimmedAt", 
29053 function (str, ichStart) {
29054 return JU.PT.parseTrimmedRange (str, ichStart, str.length);
29055 }, "~S,~N");
29056 c$.parseTrimmedRange = Clazz_defineMethod (c$, "parseTrimmedRange", 
29057 function (str, ichStart, ichMax) {
29058 var cch = str.length;
29059 if (ichMax < cch) cch = ichMax;
29060 if (cch < ichStart) return "";
29061 return JU.PT.parseTrimmedChecked (str, ichStart, cch);
29062 }, "~S,~N,~N");
29063 c$.getTokensAt = Clazz_defineMethod (c$, "getTokensAt", 
29064 function (line, ich) {
29065 if (line == null) return null;
29066 var cchLine = line.length;
29067 if (ich < 0 || ich > cchLine) return null;
29068 var tokenCount = JU.PT.countTokens (line, ich);
29069 var tokens =  new Array (tokenCount);
29070 var next =  Clazz_newIntArray (1, 0);
29071 next[0] = ich;
29072 for (var i = 0; i < tokenCount; ++i) tokens[i] = JU.PT.parseTokenChecked (line, cchLine, next);
29073
29074 return tokens;
29075 }, "~S,~N");
29076 c$.countTokens = Clazz_defineMethod (c$, "countTokens", 
29077 function (line, ich) {
29078 var tokenCount = 0;
29079 if (line != null) {
29080 var ichMax = line.length;
29081 while (true) {
29082 while (ich < ichMax && JU.PT.isWhiteSpace (line, ich)) ++ich;
29083
29084 if (ich == ichMax) break;
29085 ++tokenCount;
29086 do {
29087 ++ich;
29088 } while (ich < ichMax && !JU.PT.isWhiteSpace (line, ich));
29089 }
29090 }return tokenCount;
29091 }, "~S,~N");
29092 c$.parseTokenNext = Clazz_defineMethod (c$, "parseTokenNext", 
29093 function (str, next) {
29094 var cch = str.length;
29095 return (next[0] < 0 || next[0] >= cch ? null : JU.PT.parseTokenChecked (str, cch, next));
29096 }, "~S,~A");
29097 c$.parseTokenRange = Clazz_defineMethod (c$, "parseTokenRange", 
29098 function (str, ichMax, next) {
29099 var cch = str.length;
29100 if (ichMax > cch) ichMax = cch;
29101 return (next[0] < 0 || next[0] >= ichMax ? null : JU.PT.parseTokenChecked (str, ichMax, next));
29102 }, "~S,~N,~A");
29103 c$.parseTokenChecked = Clazz_defineMethod (c$, "parseTokenChecked", 
29104 function (str, ichMax, next) {
29105 var ich = next[0];
29106 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29107
29108 var ichNonWhite = ich;
29109 while (ich < ichMax && !JU.PT.isWhiteSpace (str, ich)) ++ich;
29110
29111 next[0] = ich;
29112 return (ichNonWhite == ich ? null : str.substring (ichNonWhite, ich));
29113 }, "~S,~N,~A");
29114 c$.parseTrimmedChecked = Clazz_defineMethod (c$, "parseTrimmedChecked", 
29115 function (str, ich, ichMax) {
29116 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29117
29118 var ichLast = ichMax - 1;
29119 while (ichLast >= ich && JU.PT.isWhiteSpace (str, ichLast)) --ichLast;
29120
29121 return (ichLast < ich ? "" : str.substring (ich, ichLast + 1));
29122 }, "~S,~N,~N");
29123 c$.dVal = Clazz_defineMethod (c$, "dVal", 
29124 function (s) {
29125 {
29126 if(s==null)
29127 throw new NumberFormatException("null");
29128 var d=parseFloat(s);
29129 if(isNaN(d))
29130 throw new NumberFormatException("Not a Number : "+s);
29131 return d
29132 }}, "~S");
29133 c$.fVal = Clazz_defineMethod (c$, "fVal", 
29134 function (s) {
29135 {
29136 return this.dVal(s);
29137 }}, "~S");
29138 c$.parseIntRange = Clazz_defineMethod (c$, "parseIntRange", 
29139 function (str, ichMax, next) {
29140 var cch = str.length;
29141 if (ichMax > cch) ichMax = cch;
29142 return (next[0] < 0 || next[0] >= ichMax ? -2147483648 : JU.PT.parseIntChecked (str, ichMax, next));
29143 }, "~S,~N,~A");
29144 c$.parseFloatArrayData = Clazz_defineMethod (c$, "parseFloatArrayData", 
29145 function (tokens, data) {
29146 JU.PT.parseFloatArrayDataN (tokens, data, data.length);
29147 }, "~A,~A");
29148 c$.parseFloatArrayDataN = Clazz_defineMethod (c$, "parseFloatArrayDataN", 
29149 function (tokens, data, nData) {
29150 for (var i = nData; --i >= 0; ) data[i] = (i >= tokens.length ? NaN : JU.PT.parseFloat (tokens[i]));
29151
29152 }, "~A,~A,~N");
29153 c$.split = Clazz_defineMethod (c$, "split", 
29154 function (text, run) {
29155 if (text.length == 0) return  new Array (0);
29156 var n = 1;
29157 var i = text.indexOf (run);
29158 var lines;
29159 var runLen = run.length;
29160 if (i < 0 || runLen == 0) {
29161 lines =  new Array (1);
29162 lines[0] = text;
29163 return lines;
29164 }var len = text.length - runLen;
29165 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
29166
29167 lines =  new Array (n);
29168 i = 0;
29169 var ipt = 0;
29170 var pt = 0;
29171 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
29172 lines[pt++] = text.substring (i, ipt);
29173 i = ipt + runLen;
29174 }
29175 if (text.indexOf (run, len) != len) len += runLen;
29176 lines[pt] = text.substring (i, len);
29177 return lines;
29178 }, "~S,~S");
29179 c$.getQuotedStringAt = Clazz_defineMethod (c$, "getQuotedStringAt", 
29180 function (line, ipt0) {
29181 var next =  Clazz_newIntArray (-1, [ipt0]);
29182 return JU.PT.getQuotedStringNext (line, next);
29183 }, "~S,~N");
29184 c$.getQuotedStringNext = Clazz_defineMethod (c$, "getQuotedStringNext", 
29185 function (line, next) {
29186 var i = next[0];
29187 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return "";
29188 var pt = i + 1;
29189 var len = line.length;
29190 while (++i < len && line.charAt (i) != '"') if (line.charAt (i) == '\\') i++;
29191
29192 next[0] = i + 1;
29193 return line.substring (pt, i);
29194 }, "~S,~A");
29195 c$.getCSVString = Clazz_defineMethod (c$, "getCSVString", 
29196 function (line, next) {
29197 var i = next[1];
29198 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return null;
29199 var pt = next[0] = i;
29200 var len = line.length;
29201 var escaped = false;
29202 var haveEscape = false;
29203 while (++i < len && (line.charAt (i) != '"' || (escaped = (i + 1 < len && line.charAt (i + 1) == '"')))) if (escaped) {
29204 escaped = false;
29205 haveEscape = true;
29206 i++;
29207 }
29208 if (i >= len) {
29209 next[1] = -1;
29210 return null;
29211 }next[1] = i + 1;
29212 var s = line.substring (pt + 1, i);
29213 return (haveEscape ? JU.PT.rep (JU.PT.rep (s, "\"\"", "\0"), "\0", "\"") : s);
29214 }, "~S,~A");
29215 c$.isOneOf = Clazz_defineMethod (c$, "isOneOf", 
29216 function (key, semiList) {
29217 if (semiList.length == 0) return false;
29218 if (semiList.charAt (0) != ';') semiList = ";" + semiList + ";";
29219 return key.indexOf (";") < 0 && semiList.indexOf (';' + key + ';') >= 0;
29220 }, "~S,~S");
29221 c$.getQuotedAttribute = Clazz_defineMethod (c$, "getQuotedAttribute", 
29222 function (info, name) {
29223 var i = info.indexOf (name + "=");
29224 return (i < 0 ? null : JU.PT.getQuotedStringAt (info, i));
29225 }, "~S,~S");
29226 c$.approx = Clazz_defineMethod (c$, "approx", 
29227 function (f, n) {
29228 return Math.round (f * n) / n;
29229 }, "~N,~N");
29230 c$.rep = Clazz_defineMethod (c$, "rep", 
29231 function (str, strFrom, strTo) {
29232 if (str == null || strFrom.length == 0 || str.indexOf (strFrom) < 0) return str;
29233 var isOnce = (strTo.indexOf (strFrom) >= 0);
29234 do {
29235 str = str.$replace (strFrom, strTo);
29236 } while (!isOnce && str.indexOf (strFrom) >= 0);
29237 return str;
29238 }, "~S,~S,~S");
29239 c$.formatF = Clazz_defineMethod (c$, "formatF", 
29240 function (value, width, precision, alignLeft, zeroPad) {
29241 return JU.PT.formatS (JU.DF.formatDecimal (value, precision), width, 0, alignLeft, zeroPad);
29242 }, "~N,~N,~N,~B,~B");
29243 c$.formatD = Clazz_defineMethod (c$, "formatD", 
29244 function (value, width, precision, alignLeft, zeroPad, allowOverflow) {
29245 return JU.PT.formatS (JU.DF.formatDecimal (value, -1 - precision), width, 0, alignLeft, zeroPad);
29246 }, "~N,~N,~N,~B,~B,~B");
29247 c$.formatS = Clazz_defineMethod (c$, "formatS", 
29248 function (value, width, precision, alignLeft, zeroPad) {
29249 if (value == null) return "";
29250 var len = value.length;
29251 if (precision != 2147483647 && precision > 0 && precision < len) value = value.substring (0, precision);
29252  else if (precision < 0 && len + precision >= 0) value = value.substring (len + precision + 1);
29253 var padLength = width - value.length;
29254 if (padLength <= 0) return value;
29255 var isNeg = (zeroPad && !alignLeft && value.charAt (0) == '-');
29256 var padChar = (zeroPad ? '0' : ' ');
29257 var padChar0 = (isNeg ? '-' : padChar);
29258 var sb =  new JU.SB ();
29259 if (alignLeft) sb.append (value);
29260 sb.appendC (padChar0);
29261 for (var i = padLength; --i > 0; ) sb.appendC (padChar);
29262
29263 if (!alignLeft) sb.append (isNeg ? padChar + value.substring (1) : value);
29264 return sb.toString ();
29265 }, "~S,~N,~N,~B,~B");
29266 c$.replaceWithCharacter = Clazz_defineMethod (c$, "replaceWithCharacter", 
29267 function (str, strFrom, chTo) {
29268 if (str == null) return null;
29269 for (var i = strFrom.length; --i >= 0; ) str = str.$replace (strFrom.charAt (i), chTo);
29270
29271 return str;
29272 }, "~S,~S,~S");
29273 c$.replaceAllCharacters = Clazz_defineMethod (c$, "replaceAllCharacters", 
29274 function (str, strFrom, strTo) {
29275 for (var i = strFrom.length; --i >= 0; ) {
29276 var chFrom = strFrom.substring (i, i + 1);
29277 str = JU.PT.rep (str, chFrom, strTo);
29278 }
29279 return str;
29280 }, "~S,~S,~S");
29281 c$.trim = Clazz_defineMethod (c$, "trim", 
29282 function (str, chars) {
29283 if (chars.length == 0) return str.trim ();
29284 var len = str.length;
29285 var k = 0;
29286 while (k < len && chars.indexOf (str.charAt (k)) >= 0) k++;
29287
29288 var m = str.length - 1;
29289 while (m > k && chars.indexOf (str.charAt (m)) >= 0) m--;
29290
29291 return str.substring (k, m + 1);
29292 }, "~S,~S");
29293 c$.trimQuotes = Clazz_defineMethod (c$, "trimQuotes", 
29294 function (value) {
29295 return (value != null && value.length > 1 && value.startsWith ("\"") && value.endsWith ("\"") ? value.substring (1, value.length - 1) : value);
29296 }, "~S");
29297 c$.isNonStringPrimitive = Clazz_defineMethod (c$, "isNonStringPrimitive", 
29298 function (info) {
29299 return Clazz_instanceOf (info, Number) || Clazz_instanceOf (info, Boolean);
29300 }, "~O");
29301 c$.arrayGet = Clazz_defineMethod (c$, "arrayGet", 
29302  function (info, i) {
29303 {
29304 return info[i];
29305 }}, "~O,~N");
29306 c$.toJSON = Clazz_defineMethod (c$, "toJSON", 
29307 function (infoType, info) {
29308 if (info == null) return JU.PT.packageJSON (infoType, null);
29309 if (JU.PT.isNonStringPrimitive (info)) return JU.PT.packageJSON (infoType, info.toString ());
29310 var s = null;
29311 var sb = null;
29312 while (true) {
29313 if (Clazz_instanceOf (info, String)) {
29314 s = info;
29315 {
29316 if (typeof s == "undefined") s = "null"
29317 }if (s.indexOf ("{\"") != 0) {
29318 s = JU.PT.rep (s, "\"", "\\\"");
29319 s = JU.PT.rep (s, "\n", "\\n");
29320 s = "\"" + s + "\"";
29321 }break;
29322 }if (Clazz_instanceOf (info, javajs.api.JSONEncodable)) {
29323 if ((s = (info).toJSON ()) == null) s = "null";
29324 break;
29325 }sb =  new JU.SB ();
29326 if (Clazz_instanceOf (info, java.util.Map)) {
29327 sb.append ("{ ");
29328 var sep = "";
29329 for (var key, $key = (info).keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
29330 sb.append (sep).append (JU.PT.packageJSON (key, JU.PT.toJSON (null, (info).get (key))));
29331 sep = ",";
29332 }
29333 sb.append (" }");
29334 break;
29335 }if (Clazz_instanceOf (info, JU.Lst)) {
29336 sb.append ("[ ");
29337 var n = (info).size ();
29338 for (var i = 0; i < n; i++) {
29339 if (i > 0) sb.appendC (',');
29340 sb.append (JU.PT.toJSON (null, (info).get (i)));
29341 }
29342 sb.append (" ]");
29343 break;
29344 }if (Clazz_instanceOf (info, JU.M34)) {
29345 var len = (Clazz_instanceOf (info, JU.M4) ? 4 : 3);
29346 var x =  Clazz_newFloatArray (len, 0);
29347 var m = info;
29348 sb.appendC ('[');
29349 for (var i = 0; i < len; i++) {
29350 if (i > 0) sb.appendC (',');
29351 m.getRow (i, x);
29352 sb.append (JU.PT.toJSON (null, x));
29353 }
29354 sb.appendC (']');
29355 break;
29356 }s = JU.PT.nonArrayString (info);
29357 if (s == null) {
29358 sb.append ("[");
29359 var n = JU.AU.getLength (info);
29360 for (var i = 0; i < n; i++) {
29361 if (i > 0) sb.appendC (',');
29362 sb.append (JU.PT.toJSON (null, JU.PT.arrayGet (info, i)));
29363 }
29364 sb.append ("]");
29365 break;
29366 }info = info.toString ();
29367 }
29368 return JU.PT.packageJSON (infoType, (s == null ? sb.toString () : s));
29369 }, "~S,~O");
29370 c$.nonArrayString = Clazz_defineMethod (c$, "nonArrayString", 
29371 function (x) {
29372 {
29373 var s = x.toString(); return (s.startsWith("[object") &&
29374 s.endsWith("Array]") ? null : s);
29375 }}, "~O");
29376 c$.byteArrayToJSON = Clazz_defineMethod (c$, "byteArrayToJSON", 
29377 function (data) {
29378 var sb =  new JU.SB ();
29379 sb.append ("[");
29380 var n = data.length;
29381 for (var i = 0; i < n; i++) {
29382 if (i > 0) sb.appendC (',');
29383 sb.appendI (data[i] & 0xFF);
29384 }
29385 sb.append ("]");
29386 return sb.toString ();
29387 }, "~A");
29388 c$.packageJSON = Clazz_defineMethod (c$, "packageJSON", 
29389 function (infoType, info) {
29390 return (infoType == null ? info : "\"" + infoType + "\": " + info);
29391 }, "~S,~S");
29392 c$.isAS = Clazz_defineMethod (c$, "isAS", 
29393 function (x) {
29394 {
29395 return Clazz_isAS(x);
29396 }}, "~O");
29397 c$.isASS = Clazz_defineMethod (c$, "isASS", 
29398 function (x) {
29399 {
29400 return Clazz_isASS(x);
29401 }}, "~O");
29402 c$.isAP = Clazz_defineMethod (c$, "isAP", 
29403 function (x) {
29404 {
29405 return Clazz_isAP(x);
29406 }}, "~O");
29407 c$.isAF = Clazz_defineMethod (c$, "isAF", 
29408 function (x) {
29409 {
29410 return Clazz_isAF(x);
29411 }}, "~O");
29412 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
29413 function (x) {
29414 {
29415 return Clazz_isAFloat(x);
29416 }}, "~O");
29417 c$.isAD = Clazz_defineMethod (c$, "isAD", 
29418 function (x) {
29419 {
29420 return Clazz_isAF(x);
29421 }}, "~O");
29422 c$.isADD = Clazz_defineMethod (c$, "isADD", 
29423 function (x) {
29424 {
29425 return Clazz_isAFF(x);
29426 }}, "~O");
29427 c$.isAB = Clazz_defineMethod (c$, "isAB", 
29428 function (x) {
29429 {
29430 return Clazz_isAI(x);
29431 }}, "~O");
29432 c$.isAI = Clazz_defineMethod (c$, "isAI", 
29433 function (x) {
29434 {
29435 return Clazz_isAI(x);
29436 }}, "~O");
29437 c$.isAII = Clazz_defineMethod (c$, "isAII", 
29438 function (x) {
29439 {
29440 return Clazz_isAII(x);
29441 }}, "~O");
29442 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
29443 function (x) {
29444 {
29445 return Clazz_isAFF(x);
29446 }}, "~O");
29447 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
29448 function (x) {
29449 {
29450 return Clazz_isAFFF(x);
29451 }}, "~O");
29452 c$.escapeUrl = Clazz_defineMethod (c$, "escapeUrl", 
29453 function (url) {
29454 url = JU.PT.rep (url, "\n", "");
29455 url = JU.PT.rep (url, "%", "%25");
29456 url = JU.PT.rep (url, "#", "%23");
29457 url = JU.PT.rep (url, "[", "%5B");
29458 url = JU.PT.rep (url, "]", "%5D");
29459 url = JU.PT.rep (url, " ", "%20");
29460 return url;
29461 }, "~S");
29462 c$.esc = Clazz_defineMethod (c$, "esc", 
29463 function (str) {
29464 if (str == null || str.length == 0) return "\"\"";
29465 var haveEscape = false;
29466 var i = 0;
29467 for (; i < "\\\\\tt\rr\nn\"\"".length; i += 2) if (str.indexOf ("\\\\\tt\rr\nn\"\"".charAt (i)) >= 0) {
29468 haveEscape = true;
29469 break;
29470 }
29471 if (haveEscape) while (i < "\\\\\tt\rr\nn\"\"".length) {
29472 var pt = -1;
29473 var ch = "\\\\\tt\rr\nn\"\"".charAt (i++);
29474 var ch2 = "\\\\\tt\rr\nn\"\"".charAt (i++);
29475 var sb =  new JU.SB ();
29476 var pt0 = 0;
29477 while ((pt = str.indexOf (ch, pt + 1)) >= 0) {
29478 sb.append (str.substring (pt0, pt)).appendC ('\\').appendC (ch2);
29479 pt0 = pt + 1;
29480 }
29481 sb.append (str.substring (pt0, str.length));
29482 str = sb.toString ();
29483 }
29484 return "\"" + JU.PT.escUnicode (str) + "\"";
29485 }, "~S");
29486 c$.escUnicode = Clazz_defineMethod (c$, "escUnicode", 
29487 function (str) {
29488 for (var i = str.length; --i >= 0; ) if (str.charCodeAt (i) > 0x7F) {
29489 var s = "0000" + Integer.toHexString (str.charCodeAt (i));
29490 str = str.substring (0, i) + "\\u" + s.substring (s.length - 4) + str.substring (i + 1);
29491 }
29492 return str;
29493 }, "~S");
29494 c$.escF = Clazz_defineMethod (c$, "escF", 
29495 function (f) {
29496 var sf = "" + f;
29497 {
29498 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
29499 sf += ".0";
29500 }return sf;
29501 }, "~N");
29502 c$.join = Clazz_defineMethod (c$, "join", 
29503 function (s, c, i0) {
29504 if (s.length < i0) return null;
29505 var sb =  new JU.SB ();
29506 sb.append (s[i0++]);
29507 for (var i = i0; i < s.length; i++) sb.appendC (c).append (s[i]);
29508
29509 return sb.toString ();
29510 }, "~A,~S,~N");
29511 c$.isLike = Clazz_defineMethod (c$, "isLike", 
29512 function (a, b) {
29513 var areEqual = a.equals (b);
29514 if (areEqual) return true;
29515 var isStart = b.startsWith ("*");
29516 var isEnd = b.endsWith ("*");
29517 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));
29518 }, "~S,~S");
29519 c$.getMapValueNoCase = Clazz_defineMethod (c$, "getMapValueNoCase", 
29520 function (h, key) {
29521 if ("this".equals (key)) return h;
29522 var val = h.get (key);
29523 if (val == null) for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) if (e.getKey ().equalsIgnoreCase (key)) return e.getValue ();
29524
29525 return val;
29526 }, "java.util.Map,~S");
29527 c$.getMapSubset = Clazz_defineMethod (c$, "getMapSubset", 
29528 function (h, key, h2) {
29529 var val = h.get (key);
29530 if (val != null) {
29531 h2.put (key, val);
29532 return;
29533 }for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) {
29534 var k = e.getKey ();
29535 if (JU.PT.isLike (k, key)) h2.put (k, e.getValue ());
29536 }
29537 }, "java.util.Map,~S,java.util.Map");
29538 c$.clean = Clazz_defineMethod (c$, "clean", 
29539 function (s) {
29540 return JU.PT.rep (JU.PT.replaceAllCharacters (s, " \t\n\r", " "), "  ", " ").trim ();
29541 }, "~S");
29542 c$.fdup = Clazz_defineMethod (c$, "fdup", 
29543 function (f, pt, n) {
29544 var ch;
29545 var count = 0;
29546 for (var i = pt; --i >= 1; ) {
29547 if (JU.PT.isDigit (ch = f.charAt (i))) continue;
29548 switch (ch) {
29549 case '.':
29550 if (count++ != 0) return f;
29551 continue;
29552 case '-':
29553 if (i != 1 && f.charAt (i - 1) != '.') return f;
29554 continue;
29555 default:
29556 return f;
29557 }
29558 }
29559 var s = f.substring (0, pt + 1);
29560 var sb =  new JU.SB ();
29561 for (var i = 0; i < n; i++) sb.append (s);
29562
29563 sb.append (f.substring (pt + 1));
29564 return sb.toString ();
29565 }, "~S,~N,~N");
29566 c$.formatString = Clazz_defineMethod (c$, "formatString", 
29567 function (strFormat, key, strT, floatT, doubleT, doOne) {
29568 if (strFormat == null) return null;
29569 if ("".equals (strFormat)) return "";
29570 var len = key.length;
29571 if (strFormat.indexOf ("%") < 0 || len == 0 || strFormat.indexOf (key) < 0) return strFormat;
29572 var strLabel = "";
29573 var ich;
29574 var ichPercent;
29575 var ichKey;
29576 for (ich = 0; (ichPercent = strFormat.indexOf ('%', ich)) >= 0 && (ichKey = strFormat.indexOf (key, ichPercent + 1)) >= 0; ) {
29577 if (ich != ichPercent) strLabel += strFormat.substring (ich, ichPercent);
29578 ich = ichPercent + 1;
29579 if (ichKey > ichPercent + 6) {
29580 strLabel += '%';
29581 continue;
29582 }try {
29583 var alignLeft = false;
29584 if (strFormat.charAt (ich) == '-') {
29585 alignLeft = true;
29586 ++ich;
29587 }var zeroPad = false;
29588 if (strFormat.charAt (ich) == '0') {
29589 zeroPad = true;
29590 ++ich;
29591 }var ch;
29592 var width = 0;
29593 while ((ch = strFormat.charAt (ich)) >= '0' && (ch <= '9')) {
29594 width = (10 * width) + (ch.charCodeAt (0) - 48);
29595 ++ich;
29596 }
29597 var precision = 2147483647;
29598 var isExponential = false;
29599 if (strFormat.charAt (ich) == '.') {
29600 ++ich;
29601 if ((ch = strFormat.charAt (ich)) == '-') {
29602 isExponential = true;
29603 ++ich;
29604 }if ((ch = strFormat.charAt (ich)) >= '0' && ch <= '9') {
29605 precision = ch.charCodeAt (0) - 48;
29606 ++ich;
29607 }if (isExponential) precision = -precision - (strT == null ? 1 : 0);
29608 }var st = strFormat.substring (ich, ich + len);
29609 if (!st.equals (key)) {
29610 ich = ichPercent + 1;
29611 strLabel += '%';
29612 continue;
29613 }ich += len;
29614 if (!Float.isNaN (floatT)) strLabel += JU.PT.formatF (floatT, width, precision, alignLeft, zeroPad);
29615  else if (strT != null) strLabel += JU.PT.formatS (strT, width, precision, alignLeft, zeroPad);
29616  else if (!Double.isNaN (doubleT)) strLabel += JU.PT.formatD (doubleT, width, precision, alignLeft, zeroPad, true);
29617 if (doOne) break;
29618 } catch (ioobe) {
29619 if (Clazz_exceptionOf (ioobe, IndexOutOfBoundsException)) {
29620 ich = ichPercent;
29621 break;
29622 } else {
29623 throw ioobe;
29624 }
29625 }
29626 }
29627 strLabel += strFormat.substring (ich);
29628 return strLabel;
29629 }, "~S,~S,~S,~N,~N,~B");
29630 c$.formatStringS = Clazz_defineMethod (c$, "formatStringS", 
29631 function (strFormat, key, strT) {
29632 return JU.PT.formatString (strFormat, key, strT, NaN, NaN, false);
29633 }, "~S,~S,~S");
29634 c$.formatStringF = Clazz_defineMethod (c$, "formatStringF", 
29635 function (strFormat, key, floatT) {
29636 return JU.PT.formatString (strFormat, key, null, floatT, NaN, false);
29637 }, "~S,~S,~N");
29638 c$.formatStringI = Clazz_defineMethod (c$, "formatStringI", 
29639 function (strFormat, key, intT) {
29640 return JU.PT.formatString (strFormat, key, "" + intT, NaN, NaN, false);
29641 }, "~S,~S,~N");
29642 c$.sprintf = Clazz_defineMethod (c$, "sprintf", 
29643 function (strFormat, list, values) {
29644 if (values == null) return strFormat;
29645 var n = list.length;
29646 if (n == values.length) try {
29647 for (var o = 0; o < n; o++) {
29648 if (values[o] == null) continue;
29649 switch (list.charAt (o)) {
29650 case 's':
29651 strFormat = JU.PT.formatString (strFormat, "s", values[o], NaN, NaN, true);
29652 break;
29653 case 'f':
29654 strFormat = JU.PT.formatString (strFormat, "f", null, (values[o]).floatValue (), NaN, true);
29655 break;
29656 case 'i':
29657 strFormat = JU.PT.formatString (strFormat, "d", "" + values[o], NaN, NaN, true);
29658 strFormat = JU.PT.formatString (strFormat, "i", "" + values[o], NaN, NaN, true);
29659 break;
29660 case 'd':
29661 strFormat = JU.PT.formatString (strFormat, "e", null, NaN, (values[o]).doubleValue (), true);
29662 break;
29663 case 'p':
29664 var pVal = values[o];
29665 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.x, NaN, true);
29666 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.y, NaN, true);
29667 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.z, NaN, true);
29668 break;
29669 case 'q':
29670 var qVal = values[o];
29671 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.x, NaN, true);
29672 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.y, NaN, true);
29673 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.z, NaN, true);
29674 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.w, NaN, true);
29675 break;
29676 case 'S':
29677 var sVal = values[o];
29678 for (var i = 0; i < sVal.length; i++) strFormat = JU.PT.formatString (strFormat, "s", sVal[i], NaN, NaN, true);
29679
29680 break;
29681 case 'F':
29682 var fVal = values[o];
29683 for (var i = 0; i < fVal.length; i++) strFormat = JU.PT.formatString (strFormat, "f", null, fVal[i], NaN, true);
29684
29685 break;
29686 case 'I':
29687 var iVal = values[o];
29688 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "d", "" + iVal[i], NaN, NaN, true);
29689
29690 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "i", "" + iVal[i], NaN, NaN, true);
29691
29692 break;
29693 case 'D':
29694 var dVal = values[o];
29695 for (var i = 0; i < dVal.length; i++) strFormat = JU.PT.formatString (strFormat, "e", null, NaN, dVal[i], true);
29696
29697 }
29698 }
29699 return JU.PT.rep (strFormat, "%%", "%");
29700 } catch (e) {
29701 if (Clazz_exceptionOf (e, Exception)) {
29702 } else {
29703 throw e;
29704 }
29705 }
29706 System.out.println ("TextFormat.sprintf error " + list + " " + strFormat);
29707 return JU.PT.rep (strFormat, "%", "?");
29708 }, "~S,~S,~A");
29709 c$.formatCheck = Clazz_defineMethod (c$, "formatCheck", 
29710 function (strFormat) {
29711 if (strFormat == null || strFormat.indexOf ('p') < 0 && strFormat.indexOf ('q') < 0) return strFormat;
29712 strFormat = JU.PT.rep (strFormat, "%%", "\1");
29713 strFormat = JU.PT.rep (strFormat, "%p", "%6.2p");
29714 strFormat = JU.PT.rep (strFormat, "%q", "%6.2q");
29715 var format = JU.PT.split (strFormat, "%");
29716 var sb =  new JU.SB ();
29717 sb.append (format[0]);
29718 for (var i = 1; i < format.length; i++) {
29719 var f = "%" + format[i];
29720 var pt;
29721 if (f.length >= 3) {
29722 if ((pt = f.indexOf ('p')) >= 0) f = JU.PT.fdup (f, pt, 3);
29723 if ((pt = f.indexOf ('q')) >= 0) f = JU.PT.fdup (f, pt, 4);
29724 }sb.append (f);
29725 }
29726 return sb.toString ().$replace ('\1', '%');
29727 }, "~S");
29728 c$.leftJustify = Clazz_defineMethod (c$, "leftJustify", 
29729 function (s, s1, s2) {
29730 s.append (s2);
29731 var n = s1.length - s2.length;
29732 if (n > 0) s.append (s1.substring (0, n));
29733 }, "JU.SB,~S,~S");
29734 c$.rightJustify = Clazz_defineMethod (c$, "rightJustify", 
29735 function (s, s1, s2) {
29736 var n = s1.length - s2.length;
29737 if (n > 0) s.append (s1.substring (0, n));
29738 s.append (s2);
29739 }, "JU.SB,~S,~S");
29740 c$.safeTruncate = Clazz_defineMethod (c$, "safeTruncate", 
29741 function (f, n) {
29742 if (f > -0.001 && f < 0.001) f = 0;
29743 return (f + "         ").substring (0, n);
29744 }, "~N,~N");
29745 c$.isWild = Clazz_defineMethod (c$, "isWild", 
29746 function (s) {
29747 return s != null && (s.indexOf ("*") >= 0 || s.indexOf ("?") >= 0);
29748 }, "~S");
29749 c$.isMatch = Clazz_defineMethod (c$, "isMatch", 
29750 function (search, match, checkStar, allowInitialStar) {
29751 if (search.equals (match)) return true;
29752 var mLen = match.length;
29753 if (mLen == 0) return false;
29754 var isStar0 = (checkStar && allowInitialStar ? match.charAt (0) == '*' : false);
29755 if (mLen == 1 && isStar0) return true;
29756 var isStar1 = (checkStar && match.endsWith ("*"));
29757 var haveQ = (match.indexOf ('?') >= 0);
29758 if (!haveQ) {
29759 if (isStar0) return (isStar1 ? (mLen < 3 || search.indexOf (match.substring (1, mLen - 1)) >= 0) : search.endsWith (match.substring (1)));
29760  else if (isStar1) return search.startsWith (match.substring (0, mLen - 1));
29761 }var sLen = search.length;
29762 var qqqq = "????";
29763 var nq = 4;
29764 while (nq < sLen) {
29765 qqqq += qqqq;
29766 nq += 4;
29767 }
29768 if (checkStar) {
29769 if (isStar0) {
29770 match = qqqq + match.substring (1);
29771 mLen += nq - 1;
29772 }if (isStar1) {
29773 match = match.substring (0, mLen - 1) + qqqq;
29774 mLen += nq - 1;
29775 }}if (mLen < sLen) return false;
29776 var ich = 0;
29777 while (mLen > sLen) {
29778 if (allowInitialStar && match.charAt (ich) == '?') {
29779 ++ich;
29780 } else if (match.charAt (ich + mLen - 1) != '?') {
29781 return false;
29782 }--mLen;
29783 }
29784 for (var i = sLen; --i >= 0; ) {
29785 var chm = match.charAt (ich + i);
29786 if (chm == '?') continue;
29787 var chs = search.charAt (i);
29788 if (chm != chs && (chm != '\1' || chs != '?')) return false;
29789 }
29790 return true;
29791 }, "~S,~S,~B,~B");
29792 c$.replaceQuotedStrings = Clazz_defineMethod (c$, "replaceQuotedStrings", 
29793 function (s, list, newList) {
29794 var n = list.size ();
29795 for (var i = 0; i < n; i++) {
29796 var name = list.get (i);
29797 var newName = newList.get (i);
29798 if (!newName.equals (name)) s = JU.PT.rep (s, "\"" + name + "\"", "\"" + newName + "\"");
29799 }
29800 return s;
29801 }, "~S,JU.Lst,JU.Lst");
29802 c$.replaceStrings = Clazz_defineMethod (c$, "replaceStrings", 
29803 function (s, list, newList) {
29804 var n = list.size ();
29805 for (var i = 0; i < n; i++) {
29806 var name = list.get (i);
29807 var newName = newList.get (i);
29808 if (!newName.equals (name)) s = JU.PT.rep (s, name, newName);
29809 }
29810 return s;
29811 }, "~S,JU.Lst,JU.Lst");
29812 c$.isDigit = Clazz_defineMethod (c$, "isDigit", 
29813 function (ch) {
29814 var c = (ch).charCodeAt (0);
29815 return (48 <= c && c <= 57);
29816 }, "~S");
29817 c$.isUpperCase = Clazz_defineMethod (c$, "isUpperCase", 
29818 function (ch) {
29819 var c = (ch).charCodeAt (0);
29820 return (65 <= c && c <= 90);
29821 }, "~S");
29822 c$.isLowerCase = Clazz_defineMethod (c$, "isLowerCase", 
29823 function (ch) {
29824 var c = (ch).charCodeAt (0);
29825 return (97 <= c && c <= 122);
29826 }, "~S");
29827 c$.isLetter = Clazz_defineMethod (c$, "isLetter", 
29828 function (ch) {
29829 var c = (ch).charCodeAt (0);
29830 return (65 <= c && c <= 90 || 97 <= c && c <= 122);
29831 }, "~S");
29832 c$.isLetterOrDigit = Clazz_defineMethod (c$, "isLetterOrDigit", 
29833 function (ch) {
29834 var c = (ch).charCodeAt (0);
29835 return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57);
29836 }, "~S");
29837 c$.isWhitespace = Clazz_defineMethod (c$, "isWhitespace", 
29838 function (ch) {
29839 var c = (ch).charCodeAt (0);
29840 return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd);
29841 }, "~S");
29842 c$.fixPtFloats = Clazz_defineMethod (c$, "fixPtFloats", 
29843 function (pt, f) {
29844 pt.x = Math.round (pt.x * f) / f;
29845 pt.y = Math.round (pt.y * f) / f;
29846 pt.z = Math.round (pt.z * f) / f;
29847 }, "JU.T3,~N");
29848 c$.fixDouble = Clazz_defineMethod (c$, "fixDouble", 
29849 function (d, f) {
29850 return Math.round (d * f) / f;
29851 }, "~N,~N");
29852 c$.parseFloatFraction = Clazz_defineMethod (c$, "parseFloatFraction", 
29853 function (s) {
29854 var pt = s.indexOf ("/");
29855 return (pt < 0 ? JU.PT.parseFloat (s) : JU.PT.parseFloat (s.substring (0, pt)) / JU.PT.parseFloat (s.substring (pt + 1)));
29856 }, "~S");
29857 Clazz_defineStatics (c$,
29858 "tensScale",  Clazz_newFloatArray (-1, [10, 100, 1000, 10000, 100000, 1000000]),
29859 "decimalScale",  Clazz_newFloatArray (-1, [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001, 0.00000001, 0.000000001]),
29860 "FLOAT_MIN_SAFE", 2E-45,
29861 "escapable", "\\\\\tt\rr\nn\"\"",
29862 "FRACTIONAL_PRECISION", 100000,
29863 "CARTESIAN_PRECISION", 10000);
29864 });
29865 Clazz_declarePackage ("javajs.api");
29866 Clazz_declareInterface (javajs.api, "JSONEncodable");
29867 Clazz_declarePackage ("JU");
29868 Clazz_load (null, "JU.AU", ["java.util.Arrays", "JU.Lst"], function () {
29869 c$ = Clazz_declareType (JU, "AU");
29870 c$.ensureLength = Clazz_defineMethod (c$, "ensureLength", 
29871 function (array, minimumLength) {
29872 if (array != null && JU.AU.getLength (array) >= minimumLength) return array;
29873 return JU.AU.arrayCopyObject (array, minimumLength);
29874 }, "~O,~N");
29875 c$.ensureLengthS = Clazz_defineMethod (c$, "ensureLengthS", 
29876 function (array, minimumLength) {
29877 if (array != null && array.length >= minimumLength) return array;
29878 return JU.AU.arrayCopyS (array, minimumLength);
29879 }, "~A,~N");
29880 c$.ensureLengthA = Clazz_defineMethod (c$, "ensureLengthA", 
29881 function (array, minimumLength) {
29882 if (array != null && array.length >= minimumLength) return array;
29883 return JU.AU.arrayCopyF (array, minimumLength);
29884 }, "~A,~N");
29885 c$.ensureLengthI = Clazz_defineMethod (c$, "ensureLengthI", 
29886 function (array, minimumLength) {
29887 if (array != null && array.length >= minimumLength) return array;
29888 return JU.AU.arrayCopyI (array, minimumLength);
29889 }, "~A,~N");
29890 c$.ensureLengthShort = Clazz_defineMethod (c$, "ensureLengthShort", 
29891 function (array, minimumLength) {
29892 if (array != null && array.length >= minimumLength) return array;
29893 return JU.AU.arrayCopyShort (array, minimumLength);
29894 }, "~A,~N");
29895 c$.ensureLengthByte = Clazz_defineMethod (c$, "ensureLengthByte", 
29896 function (array, minimumLength) {
29897 if (array != null && array.length >= minimumLength) return array;
29898 return JU.AU.arrayCopyByte (array, minimumLength);
29899 }, "~A,~N");
29900 c$.doubleLength = Clazz_defineMethod (c$, "doubleLength", 
29901 function (array) {
29902 return JU.AU.arrayCopyObject (array, (array == null ? 16 : 2 * JU.AU.getLength (array)));
29903 }, "~O");
29904 c$.doubleLengthS = Clazz_defineMethod (c$, "doubleLengthS", 
29905 function (array) {
29906 return JU.AU.arrayCopyS (array, (array == null ? 16 : 2 * array.length));
29907 }, "~A");
29908 c$.doubleLengthF = Clazz_defineMethod (c$, "doubleLengthF", 
29909 function (array) {
29910 return JU.AU.arrayCopyF (array, (array == null ? 16 : 2 * array.length));
29911 }, "~A");
29912 c$.doubleLengthI = Clazz_defineMethod (c$, "doubleLengthI", 
29913 function (array) {
29914 return JU.AU.arrayCopyI (array, (array == null ? 16 : 2 * array.length));
29915 }, "~A");
29916 c$.doubleLengthShort = Clazz_defineMethod (c$, "doubleLengthShort", 
29917 function (array) {
29918 return JU.AU.arrayCopyShort (array, (array == null ? 16 : 2 * array.length));
29919 }, "~A");
29920 c$.doubleLengthByte = Clazz_defineMethod (c$, "doubleLengthByte", 
29921 function (array) {
29922 return JU.AU.arrayCopyByte (array, (array == null ? 16 : 2 * array.length));
29923 }, "~A");
29924 c$.doubleLengthBool = Clazz_defineMethod (c$, "doubleLengthBool", 
29925 function (array) {
29926 return JU.AU.arrayCopyBool (array, (array == null ? 16 : 2 * array.length));
29927 }, "~A");
29928 c$.deleteElements = Clazz_defineMethod (c$, "deleteElements", 
29929 function (array, firstElement, nElements) {
29930 if (nElements == 0 || array == null) return array;
29931 var oldLength = JU.AU.getLength (array);
29932 if (firstElement >= oldLength) return array;
29933 var n = oldLength - (firstElement + nElements);
29934 if (n < 0) n = 0;
29935 var t = JU.AU.newInstanceO (array, firstElement + n);
29936 if (firstElement > 0) System.arraycopy (array, 0, t, 0, firstElement);
29937 if (n > 0) System.arraycopy (array, firstElement + nElements, t, firstElement, n);
29938 return t;
29939 }, "~O,~N,~N");
29940 c$.arrayCopyObject = Clazz_defineMethod (c$, "arrayCopyObject", 
29941 function (array, newLength) {
29942 if (array == null) {
29943 return null;
29944 }var oldLength = JU.AU.getLength (array);
29945 if (newLength == oldLength) return array;
29946 var t = JU.AU.newInstanceO (array, newLength);
29947 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29948 return t;
29949 }, "~O,~N");
29950 c$.newInstanceO = Clazz_defineMethod (c$, "newInstanceO", 
29951  function (array, n) {
29952 {
29953 if (!array.getClass().getComponentType)
29954 return new Array(n);
29955 }}, "~O,~N");
29956 c$.getLength = Clazz_defineMethod (c$, "getLength", 
29957 function (array) {
29958 {
29959 return array.length
29960 }}, "~O");
29961 c$.arrayCopyS = Clazz_defineMethod (c$, "arrayCopyS", 
29962 function (array, newLength) {
29963 if (newLength < 0) newLength = array.length;
29964 var t =  new Array (newLength);
29965 if (array != null) {
29966 var oldLength = array.length;
29967 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29968 }return t;
29969 }, "~A,~N");
29970 c$.arrayCopyII = Clazz_defineMethod (c$, "arrayCopyII", 
29971 function (array, newLength) {
29972 var t = JU.AU.newInt2 (newLength);
29973 if (array != null) {
29974 var oldLength = array.length;
29975 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29976 }return t;
29977 }, "~A,~N");
29978 c$.arrayCopyPt = Clazz_defineMethod (c$, "arrayCopyPt", 
29979 function (array, newLength) {
29980 if (newLength < 0) newLength = array.length;
29981 var t =  new Array (newLength);
29982 if (array != null) {
29983 var oldLength = array.length;
29984 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29985 }return t;
29986 }, "~A,~N");
29987 c$.arrayCopyF = Clazz_defineMethod (c$, "arrayCopyF", 
29988 function (array, newLength) {
29989 if (newLength < 0) newLength = array.length;
29990 var t =  Clazz_newFloatArray (newLength, 0);
29991 if (array != null) {
29992 var oldLength = array.length;
29993 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29994 }return t;
29995 }, "~A,~N");
29996 c$.arrayCopyI = Clazz_defineMethod (c$, "arrayCopyI", 
29997 function (array, newLength) {
29998 if (newLength < 0) newLength = array.length;
29999 var t =  Clazz_newIntArray (newLength, 0);
30000 if (array != null) {
30001 var oldLength = array.length;
30002 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30003 }return t;
30004 }, "~A,~N");
30005 c$.arrayCopyRangeI = Clazz_defineMethod (c$, "arrayCopyRangeI", 
30006 function (array, i0, n) {
30007 if (array == null) return null;
30008 var oldLength = array.length;
30009 if (n == -1) n = oldLength;
30010 if (n == -2) n = Clazz_doubleToInt (oldLength / 2);
30011 n = n - i0;
30012 var t =  Clazz_newIntArray (n, 0);
30013 System.arraycopy (array, i0, t, 0, n);
30014 return t;
30015 }, "~A,~N,~N");
30016 c$.arrayCopyRangeRevI = Clazz_defineMethod (c$, "arrayCopyRangeRevI", 
30017 function (array, i0, n) {
30018 if (array == null) return null;
30019 var t = JU.AU.arrayCopyRangeI (array, i0, n);
30020 if (n < 0) n = array.length;
30021 for (var i = Clazz_doubleToInt (n / 2); --i >= 0; ) JU.AU.swapInt (t, i, n - 1 - i);
30022
30023 return t;
30024 }, "~A,~N,~N");
30025 c$.arrayCopyShort = Clazz_defineMethod (c$, "arrayCopyShort", 
30026 function (array, newLength) {
30027 if (newLength < 0) newLength = array.length;
30028 var t =  Clazz_newShortArray (newLength, 0);
30029 if (array != null) {
30030 var oldLength = array.length;
30031 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30032 }return t;
30033 }, "~A,~N");
30034 c$.arrayCopyByte = Clazz_defineMethod (c$, "arrayCopyByte", 
30035 function (array, newLength) {
30036 if (newLength < 0) newLength = array.length;
30037 var t =  Clazz_newByteArray (newLength, 0);
30038 if (array != null) {
30039 var oldLength = array.length;
30040 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30041 }return t;
30042 }, "~A,~N");
30043 c$.arrayCopyBool = Clazz_defineMethod (c$, "arrayCopyBool", 
30044 function (array, newLength) {
30045 if (newLength < 0) newLength = array.length;
30046 var t =  Clazz_newBooleanArray (newLength, false);
30047 if (array != null) {
30048 var oldLength = array.length;
30049 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30050 }return t;
30051 }, "~A,~N");
30052 c$.swapInt = Clazz_defineMethod (c$, "swapInt", 
30053 function (array, indexA, indexB) {
30054 var t = array[indexA];
30055 array[indexA] = array[indexB];
30056 array[indexB] = t;
30057 }, "~A,~N,~N");
30058 c$.dumpArray = Clazz_defineMethod (c$, "dumpArray", 
30059 function (msg, A, x1, x2, y1, y2) {
30060 var s = "dumpArray: " + msg + "\n";
30061 for (var x = x1; x <= x2; x++) s += "\t*" + x + "*";
30062
30063 for (var y = y2; y >= y1; y--) {
30064 s += "\n*" + y + "*";
30065 for (var x = x1; x <= x2; x++) s += "\t" + (x < A.length && y < A[x].length ? A[x][y] : NaN);
30066
30067 }
30068 return s;
30069 }, "~S,~A,~N,~N,~N,~N");
30070 c$.dumpIntArray = Clazz_defineMethod (c$, "dumpIntArray", 
30071 function (A, n) {
30072 var str = "";
30073 for (var i = 0; i < n; i++) str += " " + A[i];
30074
30075 return str;
30076 }, "~A,~N");
30077 c$.sortedItem = Clazz_defineMethod (c$, "sortedItem", 
30078 function (v, n) {
30079 if (v.size () == 0) return null;
30080 if (v.size () == 1) return v.get (0);
30081 var keys = v.toArray ( new Array (v.size ()));
30082 java.util.Arrays.sort (keys);
30083 return keys[n % keys.length];
30084 }, "JU.Lst,~N");
30085 c$.createArrayOfArrayList = Clazz_defineMethod (c$, "createArrayOfArrayList", 
30086 function (size) {
30087 return  new Array (size);
30088 }, "~N");
30089 c$.createArrayOfHashtable = Clazz_defineMethod (c$, "createArrayOfHashtable", 
30090 function (size) {
30091 return  new Array (size);
30092 }, "~N");
30093 c$.swap = Clazz_defineMethod (c$, "swap", 
30094 function (o, i, j) {
30095 var oi = o[i];
30096 o[i] = o[j];
30097 o[j] = oi;
30098 }, "~A,~N,~N");
30099 c$.newFloat2 = Clazz_defineMethod (c$, "newFloat2", 
30100 function (n) {
30101 {
30102 return Clazz_newArray(n, null);
30103 }}, "~N");
30104 c$.newInt2 = Clazz_defineMethod (c$, "newInt2", 
30105 function (n) {
30106 {
30107 return Clazz_newArray(n, null);
30108 }}, "~N");
30109 c$.newInt3 = Clazz_defineMethod (c$, "newInt3", 
30110 function (nx, ny) {
30111 {
30112 return Clazz_newArray(nx, null);
30113 }}, "~N,~N");
30114 c$.newFloat3 = Clazz_defineMethod (c$, "newFloat3", 
30115 function (nx, ny) {
30116 {
30117 return Clazz_newArray(nx, null);
30118 }}, "~N,~N");
30119 c$.newInt4 = Clazz_defineMethod (c$, "newInt4", 
30120 function (n) {
30121 {
30122 return Clazz_newArray(n, null);
30123 }}, "~N");
30124 c$.newShort2 = Clazz_defineMethod (c$, "newShort2", 
30125 function (n) {
30126 {
30127 return Clazz_newArray(n, null);
30128 }}, "~N");
30129 c$.newByte2 = Clazz_defineMethod (c$, "newByte2", 
30130 function (n) {
30131 {
30132 return Clazz_newArray(n, null);
30133 }}, "~N");
30134 c$.newDouble2 = Clazz_defineMethod (c$, "newDouble2", 
30135 function (n) {
30136 {
30137 return Clazz_newArray(n, null);
30138 }}, "~N");
30139 c$.removeMapKeys = Clazz_defineMethod (c$, "removeMapKeys", 
30140 function (map, root) {
30141 var list =  new JU.Lst ();
30142 for (var key, $key = map.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) if (key.startsWith (root)) list.addLast (key);
30143
30144 for (var i = list.size (); --i >= 0; ) map.remove (list.get (i));
30145
30146 return list.size ();
30147 }, "java.util.Map,~S");
30148 c$.isAS = Clazz_defineMethod (c$, "isAS", 
30149 function (x) {
30150 {
30151 return Clazz_isAS(x);
30152 }}, "~O");
30153 c$.isASS = Clazz_defineMethod (c$, "isASS", 
30154 function (x) {
30155 {
30156 return Clazz_isASS(x);
30157 }}, "~O");
30158 c$.isAP = Clazz_defineMethod (c$, "isAP", 
30159 function (x) {
30160 {
30161 return Clazz_isAP(x);
30162 }}, "~O");
30163 c$.isAF = Clazz_defineMethod (c$, "isAF", 
30164 function (x) {
30165 {
30166 return Clazz_isAF(x);
30167 }}, "~O");
30168 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
30169 function (x) {
30170 {
30171 return Clazz_isAFloat(x);
30172 }}, "~O");
30173 c$.isAD = Clazz_defineMethod (c$, "isAD", 
30174 function (x) {
30175 {
30176 return Clazz_isAF(x);
30177 }}, "~O");
30178 c$.isADD = Clazz_defineMethod (c$, "isADD", 
30179 function (x) {
30180 {
30181 return Clazz_isAFF(x);
30182 }}, "~O");
30183 c$.isAB = Clazz_defineMethod (c$, "isAB", 
30184 function (x) {
30185 {
30186 return Clazz_isAI(x);
30187 }}, "~O");
30188 c$.isAI = Clazz_defineMethod (c$, "isAI", 
30189 function (x) {
30190 {
30191 return Clazz_isAI(x);
30192 }}, "~O");
30193 c$.isAII = Clazz_defineMethod (c$, "isAII", 
30194 function (x) {
30195 {
30196 return Clazz_isAII(x);
30197 }}, "~O");
30198 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
30199 function (x) {
30200 {
30201 return Clazz_isAFF(x);
30202 }}, "~O");
30203 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
30204 function (x) {
30205 {
30206 return Clazz_isAFFF(x);
30207 }}, "~O");
30208 c$.ensureSignedBytes = Clazz_defineMethod (c$, "ensureSignedBytes", 
30209 function (b) {
30210 if (b != null) {
30211 {
30212 for (var i = b.length; --i >= 0;) { var j = b[i] & 0xFF; if
30213 (j >= 0x80) j -= 0x100; b[i] = j; }
30214 }}return b;
30215 }, "~A");
30216 });
30217 Clazz_declarePackage ("JU");
30218 Clazz_load (["java.util.ArrayList"], "JU.Lst", null, function () {
30219 c$ = Clazz_declareType (JU, "Lst", java.util.ArrayList);
30220 Clazz_defineMethod (c$, "addLast", 
30221 function (v) {
30222 {
30223 return this.add1(v);
30224 }}, "~O");
30225 Clazz_defineMethod (c$, "removeObj", 
30226 function (v) {
30227 {
30228 return this.removeObject(v);
30229 }}, "~O");
30230 });
30231 Clazz_declarePackage ("JU");
30232 Clazz_load (["java.lang.Boolean"], "JU.DF", ["java.lang.Double", "$.Float", "JU.PT", "$.SB"], function () {
30233 c$ = Clazz_declareType (JU, "DF");
30234 c$.setUseNumberLocalization = Clazz_defineMethod (c$, "setUseNumberLocalization", 
30235 function (TF) {
30236 JU.DF.useNumberLocalization[0] = (TF ? Boolean.TRUE : Boolean.FALSE);
30237 }, "~B");
30238 c$.formatDecimalDbl = Clazz_defineMethod (c$, "formatDecimalDbl", 
30239 function (value, decimalDigits) {
30240 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Double.isNaN (value)) return "" + value;
30241 return JU.DF.formatDecimal (value, decimalDigits);
30242 }, "~N,~N");
30243 c$.formatDecimal = Clazz_defineMethod (c$, "formatDecimal", 
30244 function (value, decimalDigits) {
30245 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Float.isNaN (value)) return "" + value;
30246 var n;
30247 if (decimalDigits < 0) {
30248 decimalDigits = -decimalDigits;
30249 if (decimalDigits > JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length;
30250 if (value == 0) return JU.DF.formattingStrings[decimalDigits] + "E+0";
30251 n = 0;
30252 var d;
30253 if (Math.abs (value) < 1) {
30254 n = 10;
30255 d = value * 1e-10;
30256 } else {
30257 n = -10;
30258 d = value * 1e10;
30259 }var s = ("" + d).toUpperCase ();
30260 var i = s.indexOf ("E");
30261 n = JU.PT.parseInt (s.substring (i + 1)) + n;
30262 return (i < 0 ? "" + value : JU.DF.formatDecimal (JU.PT.parseFloat (s.substring (0, i)), decimalDigits - 1) + "E" + (n >= 0 ? "+" : "") + n);
30263 }if (decimalDigits >= JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length - 1;
30264 var s1 = ("" + value).toUpperCase ();
30265 var pt = s1.indexOf (".");
30266 if (pt < 0) return s1 + JU.DF.formattingStrings[decimalDigits].substring (1);
30267 var isNeg = s1.startsWith ("-");
30268 if (isNeg) {
30269 s1 = s1.substring (1);
30270 pt--;
30271 }var pt1 = s1.indexOf ("E-");
30272 if (pt1 > 0) {
30273 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30274 s1 = "0." + "0000000000000000000000000000000000000000".substring (0, -n - 1) + s1.substring (0, 1) + s1.substring (2, pt1);
30275 pt = 1;
30276 }pt1 = s1.indexOf ("E");
30277 if (pt1 > 0) {
30278 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30279 s1 = s1.substring (0, 1) + s1.substring (2, pt1) + "0000000000000000000000000000000000000000";
30280 s1 = s1.substring (0, n + 1) + "." + s1.substring (n + 1);
30281 pt = s1.indexOf (".");
30282 }var len = s1.length;
30283 var pt2 = decimalDigits + pt + 1;
30284 if (pt2 < len && s1.charAt (pt2) >= '5') {
30285 return JU.DF.formatDecimal (value + (isNeg ? -1 : 1) * JU.DF.formatAdds[decimalDigits], decimalDigits);
30286 }var sb = JU.SB.newS (s1.substring (0, (decimalDigits == 0 ? pt : ++pt)));
30287 for (var i = 0; i < decimalDigits; i++, pt++) {
30288 if (pt < len) sb.appendC (s1.charAt (pt));
30289  else sb.appendC ('0');
30290 }
30291 s1 = (isNeg ? "-" : "") + sb;
30292 return (Boolean.TRUE.equals (JU.DF.useNumberLocalization[0]) ? s1 : s1.$replace (',', '.'));
30293 }, "~N,~N");
30294 c$.formatDecimalTrimmed = Clazz_defineMethod (c$, "formatDecimalTrimmed", 
30295 function (x, precision) {
30296 var str = JU.DF.formatDecimalDbl (x, precision);
30297 var m = str.length - 1;
30298 var zero = '0';
30299 while (m >= 0 && str.charAt (m) == zero) m--;
30300
30301 return str.substring (0, m + 1);
30302 }, "~N,~N");
30303 Clazz_defineStatics (c$,
30304 "formattingStrings",  Clazz_newArray (-1, ["0", "0.0", "0.00", "0.000", "0.0000", "0.00000", "0.000000", "0.0000000", "0.00000000", "0.000000000"]),
30305 "zeros", "0000000000000000000000000000000000000000",
30306 "formatAdds",  Clazz_newFloatArray (-1, [0.5, 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005]));
30307 c$.useNumberLocalization = c$.prototype.useNumberLocalization =  Clazz_newArray (-1, [Boolean.TRUE]);
30308 });
30309 Clazz_declarePackage ("JU");
30310 c$ = Clazz_decorateAsClass (function () {
30311 this.sb = null;
30312 this.s = null;
30313 Clazz_instantialize (this, arguments);
30314 }, JU, "SB");
30315 Clazz_makeConstructor (c$, 
30316 function () {
30317 {
30318 this.s = "";
30319 }});
30320 c$.newN = Clazz_defineMethod (c$, "newN", 
30321 function (n) {
30322 {
30323 return new JU.SB();
30324 }}, "~N");
30325 c$.newS = Clazz_defineMethod (c$, "newS", 
30326 function (s) {
30327 {
30328 var sb = new JU.SB();
30329 sb.s = s;
30330 return sb;
30331 }}, "~S");
30332 Clazz_defineMethod (c$, "append", 
30333 function (s) {
30334 {
30335 this.s += s
30336 }return this;
30337 }, "~S");
30338 Clazz_defineMethod (c$, "appendC", 
30339 function (c) {
30340 {
30341 this.s += c;
30342 }return this;
30343 }, "~S");
30344 Clazz_defineMethod (c$, "appendI", 
30345 function (i) {
30346 {
30347 this.s += i
30348 }return this;
30349 }, "~N");
30350 Clazz_defineMethod (c$, "appendB", 
30351 function (b) {
30352 {
30353 this.s += b
30354 }return this;
30355 }, "~B");
30356 Clazz_defineMethod (c$, "appendF", 
30357 function (f) {
30358 {
30359 var sf = "" + f;
30360 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30361 sf += ".0" ;
30362 this.s += sf;
30363 }return this;
30364 }, "~N");
30365 Clazz_defineMethod (c$, "appendD", 
30366 function (d) {
30367 {
30368 var sf = "" + d;
30369 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30370 sf += ".0" ;
30371 this.s += sf;
30372 }return this;
30373 }, "~N");
30374 Clazz_defineMethod (c$, "appendSB", 
30375 function (buf) {
30376 {
30377 this.s += buf.s;
30378 }return this;
30379 }, "JU.SB");
30380 Clazz_defineMethod (c$, "appendO", 
30381 function (data) {
30382 if (data != null) {
30383 {
30384 this.s += data.toString();
30385 }}return this;
30386 }, "~O");
30387 Clazz_defineMethod (c$, "appendCB", 
30388 function (cb, off, len) {
30389 {
30390 for (var i = len,j=off; --i >= 0;)
30391 this.s += cb[j++];
30392 }}, "~A,~N,~N");
30393 Clazz_overrideMethod (c$, "toString", 
30394 function () {
30395 {
30396 return this.s;
30397 }});
30398 Clazz_defineMethod (c$, "length", 
30399 function () {
30400 {
30401 return this.s.length;
30402 }});
30403 Clazz_defineMethod (c$, "indexOf", 
30404 function (s) {
30405 {
30406 return this.s.indexOf(s);
30407 }}, "~S");
30408 Clazz_defineMethod (c$, "charAt", 
30409 function (i) {
30410 {
30411 return this.s.charAt(i);
30412 }}, "~N");
30413 Clazz_defineMethod (c$, "charCodeAt", 
30414 function (i) {
30415 {
30416 return this.s.charCodeAt(i);
30417 }}, "~N");
30418 Clazz_defineMethod (c$, "setLength", 
30419 function (n) {
30420 {
30421 this.s = this.s.substring(0, n);
30422 }}, "~N");
30423 Clazz_defineMethod (c$, "lastIndexOf", 
30424 function (s) {
30425 {
30426 return this.s.lastIndexOf(s);
30427 }}, "~S");
30428 Clazz_defineMethod (c$, "indexOf2", 
30429 function (s, i) {
30430 {
30431 return this.s.indexOf(s, i);
30432 }}, "~S,~N");
30433 Clazz_defineMethod (c$, "substring", 
30434 function (i) {
30435 {
30436 return this.s.substring(i);
30437 }}, "~N");
30438 Clazz_defineMethod (c$, "substring2", 
30439 function (i, j) {
30440 {
30441 return this.s.substring(i, j);
30442 }}, "~N,~N");
30443 Clazz_defineMethod (c$, "toBytes", 
30444 function (off, len) {
30445 if (len < 0) len = this.length () - off;
30446 var b =  Clazz_newByteArray (len, 0);
30447 for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0);
30448
30449 return b;
30450 }, "~N,~N");
30451 Clazz_defineMethod (c$, "replace", 
30452 function (start, end, str) {
30453 {
30454 this.s = this.s.substring(0, start) + str + this.s.substring(end);
30455 }}, "~N,~N,~S");
30456 Clazz_defineMethod (c$, "insert", 
30457 function (offset, str) {
30458 this.replace (offset, offset, str);
30459 }, "~N,~S");
30460 Clazz_declarePackage ("JU");
30461 Clazz_load (null, "JU.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () {
30462 c$ = Clazz_decorateAsClass (function () {
30463 this.m00 = 0;
30464 this.m01 = 0;
30465 this.m02 = 0;
30466 this.m10 = 0;
30467 this.m11 = 0;
30468 this.m12 = 0;
30469 this.m20 = 0;
30470 this.m21 = 0;
30471 this.m22 = 0;
30472 Clazz_instantialize (this, arguments);
30473 }, JU, "M34");
30474 Clazz_defineMethod (c$, "setAA33", 
30475 function (a) {
30476 var x = a.x;
30477 var y = a.y;
30478 var z = a.z;
30479 var angle = a.angle;
30480 var n = Math.sqrt (x * x + y * y + z * z);
30481 n = 1 / n;
30482 x *= n;
30483 y *= n;
30484 z *= n;
30485 var c = Math.cos (angle);
30486 var s = Math.sin (angle);
30487 var omc = 1.0 - c;
30488 this.m00 = (c + x * x * omc);
30489 this.m11 = (c + y * y * omc);
30490 this.m22 = (c + z * z * omc);
30491 var tmp1 = x * y * omc;
30492 var tmp2 = z * s;
30493 this.m01 = (tmp1 - tmp2);
30494 this.m10 = (tmp1 + tmp2);
30495 tmp1 = x * z * omc;
30496 tmp2 = y * s;
30497 this.m02 = (tmp1 + tmp2);
30498 this.m20 = (tmp1 - tmp2);
30499 tmp1 = y * z * omc;
30500 tmp2 = x * s;
30501 this.m12 = (tmp1 - tmp2);
30502 this.m21 = (tmp1 + tmp2);
30503 }, "JU.A4");
30504 Clazz_defineMethod (c$, "rotate", 
30505 function (t) {
30506 this.rotate2 (t, t);
30507 }, "JU.T3");
30508 Clazz_defineMethod (c$, "rotate2", 
30509 function (t, result) {
30510 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);
30511 }, "JU.T3,JU.T3");
30512 Clazz_defineMethod (c$, "setM33", 
30513 function (m1) {
30514 this.m00 = m1.m00;
30515 this.m01 = m1.m01;
30516 this.m02 = m1.m02;
30517 this.m10 = m1.m10;
30518 this.m11 = m1.m11;
30519 this.m12 = m1.m12;
30520 this.m20 = m1.m20;
30521 this.m21 = m1.m21;
30522 this.m22 = m1.m22;
30523 }, "JU.M34");
30524 Clazz_defineMethod (c$, "clear33", 
30525 function () {
30526 this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0;
30527 });
30528 Clazz_defineMethod (c$, "set33", 
30529 function (row, col, v) {
30530 switch (row) {
30531 case 0:
30532 switch (col) {
30533 case 0:
30534 this.m00 = v;
30535 return;
30536 case 1:
30537 this.m01 = v;
30538 return;
30539 case 2:
30540 this.m02 = v;
30541 return;
30542 }
30543 break;
30544 case 1:
30545 switch (col) {
30546 case 0:
30547 this.m10 = v;
30548 return;
30549 case 1:
30550 this.m11 = v;
30551 return;
30552 case 2:
30553 this.m12 = v;
30554 return;
30555 }
30556 break;
30557 case 2:
30558 switch (col) {
30559 case 0:
30560 this.m20 = v;
30561 return;
30562 case 1:
30563 this.m21 = v;
30564 return;
30565 case 2:
30566 this.m22 = v;
30567 return;
30568 }
30569 break;
30570 }
30571 this.err ();
30572 }, "~N,~N,~N");
30573 Clazz_defineMethod (c$, "get33", 
30574 function (row, col) {
30575 switch (row) {
30576 case 0:
30577 switch (col) {
30578 case 0:
30579 return this.m00;
30580 case 1:
30581 return this.m01;
30582 case 2:
30583 return this.m02;
30584 }
30585 break;
30586 case 1:
30587 switch (col) {
30588 case 0:
30589 return this.m10;
30590 case 1:
30591 return this.m11;
30592 case 2:
30593 return this.m12;
30594 }
30595 break;
30596 case 2:
30597 switch (col) {
30598 case 0:
30599 return this.m20;
30600 case 1:
30601 return this.m21;
30602 case 2:
30603 return this.m22;
30604 }
30605 break;
30606 }
30607 this.err ();
30608 return 0;
30609 }, "~N,~N");
30610 Clazz_defineMethod (c$, "setRow33", 
30611 function (row, v) {
30612 switch (row) {
30613 case 0:
30614 this.m00 = v[0];
30615 this.m01 = v[1];
30616 this.m02 = v[2];
30617 return;
30618 case 1:
30619 this.m10 = v[0];
30620 this.m11 = v[1];
30621 this.m12 = v[2];
30622 return;
30623 case 2:
30624 this.m20 = v[0];
30625 this.m21 = v[1];
30626 this.m22 = v[2];
30627 return;
30628 default:
30629 this.err ();
30630 }
30631 }, "~N,~A");
30632 Clazz_defineMethod (c$, "getRow33", 
30633 function (row, v) {
30634 switch (row) {
30635 case 0:
30636 v[0] = this.m00;
30637 v[1] = this.m01;
30638 v[2] = this.m02;
30639 return;
30640 case 1:
30641 v[0] = this.m10;
30642 v[1] = this.m11;
30643 v[2] = this.m12;
30644 return;
30645 case 2:
30646 v[0] = this.m20;
30647 v[1] = this.m21;
30648 v[2] = this.m22;
30649 return;
30650 }
30651 this.err ();
30652 }, "~N,~A");
30653 Clazz_defineMethod (c$, "setColumn33", 
30654 function (column, v) {
30655 switch (column) {
30656 case 0:
30657 this.m00 = v[0];
30658 this.m10 = v[1];
30659 this.m20 = v[2];
30660 break;
30661 case 1:
30662 this.m01 = v[0];
30663 this.m11 = v[1];
30664 this.m21 = v[2];
30665 break;
30666 case 2:
30667 this.m02 = v[0];
30668 this.m12 = v[1];
30669 this.m22 = v[2];
30670 break;
30671 default:
30672 this.err ();
30673 }
30674 }, "~N,~A");
30675 Clazz_defineMethod (c$, "getColumn33", 
30676 function (column, v) {
30677 switch (column) {
30678 case 0:
30679 v[0] = this.m00;
30680 v[1] = this.m10;
30681 v[2] = this.m20;
30682 break;
30683 case 1:
30684 v[0] = this.m01;
30685 v[1] = this.m11;
30686 v[2] = this.m21;
30687 break;
30688 case 2:
30689 v[0] = this.m02;
30690 v[1] = this.m12;
30691 v[2] = this.m22;
30692 break;
30693 default:
30694 this.err ();
30695 }
30696 }, "~N,~A");
30697 Clazz_defineMethod (c$, "add33", 
30698 function (m1) {
30699 this.m00 += m1.m00;
30700 this.m01 += m1.m01;
30701 this.m02 += m1.m02;
30702 this.m10 += m1.m10;
30703 this.m11 += m1.m11;
30704 this.m12 += m1.m12;
30705 this.m20 += m1.m20;
30706 this.m21 += m1.m21;
30707 this.m22 += m1.m22;
30708 }, "JU.M34");
30709 Clazz_defineMethod (c$, "sub33", 
30710 function (m1) {
30711 this.m00 -= m1.m00;
30712 this.m01 -= m1.m01;
30713 this.m02 -= m1.m02;
30714 this.m10 -= m1.m10;
30715 this.m11 -= m1.m11;
30716 this.m12 -= m1.m12;
30717 this.m20 -= m1.m20;
30718 this.m21 -= m1.m21;
30719 this.m22 -= m1.m22;
30720 }, "JU.M34");
30721 Clazz_defineMethod (c$, "mul33", 
30722 function (x) {
30723 this.m00 *= x;
30724 this.m01 *= x;
30725 this.m02 *= x;
30726 this.m10 *= x;
30727 this.m11 *= x;
30728 this.m12 *= x;
30729 this.m20 *= x;
30730 this.m21 *= x;
30731 this.m22 *= x;
30732 }, "~N");
30733 Clazz_defineMethod (c$, "transpose33", 
30734 function () {
30735 var tmp = this.m01;
30736 this.m01 = this.m10;
30737 this.m10 = tmp;
30738 tmp = this.m02;
30739 this.m02 = this.m20;
30740 this.m20 = tmp;
30741 tmp = this.m12;
30742 this.m12 = this.m21;
30743 this.m21 = tmp;
30744 });
30745 Clazz_defineMethod (c$, "setXRot", 
30746 function (angle) {
30747 var c = Math.cos (angle);
30748 var s = Math.sin (angle);
30749 this.m00 = 1.0;
30750 this.m01 = 0.0;
30751 this.m02 = 0.0;
30752 this.m10 = 0.0;
30753 this.m11 = c;
30754 this.m12 = -s;
30755 this.m20 = 0.0;
30756 this.m21 = s;
30757 this.m22 = c;
30758 }, "~N");
30759 Clazz_defineMethod (c$, "setYRot", 
30760 function (angle) {
30761 var c = Math.cos (angle);
30762 var s = Math.sin (angle);
30763 this.m00 = c;
30764 this.m01 = 0.0;
30765 this.m02 = s;
30766 this.m10 = 0.0;
30767 this.m11 = 1.0;
30768 this.m12 = 0.0;
30769 this.m20 = -s;
30770 this.m21 = 0.0;
30771 this.m22 = c;
30772 }, "~N");
30773 Clazz_defineMethod (c$, "setZRot", 
30774 function (angle) {
30775 var c = Math.cos (angle);
30776 var s = Math.sin (angle);
30777 this.m00 = c;
30778 this.m01 = -s;
30779 this.m02 = 0.0;
30780 this.m10 = s;
30781 this.m11 = c;
30782 this.m12 = 0.0;
30783 this.m20 = 0.0;
30784 this.m21 = 0.0;
30785 this.m22 = 1.0;
30786 }, "~N");
30787 Clazz_defineMethod (c$, "determinant3", 
30788 function () {
30789 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);
30790 });
30791 Clazz_defineMethod (c$, "err", 
30792 function () {
30793 throw  new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds");
30794 });
30795 });
30796 Clazz_declarePackage ("JU");
30797 Clazz_load (["JU.M34"], "JU.M4", ["JU.T3"], function () {
30798 c$ = Clazz_decorateAsClass (function () {
30799 this.m03 = 0;
30800 this.m13 = 0;
30801 this.m23 = 0;
30802 this.m30 = 0;
30803 this.m31 = 0;
30804 this.m32 = 0;
30805 this.m33 = 0;
30806 Clazz_instantialize (this, arguments);
30807 }, JU, "M4", JU.M34);
30808 c$.newA16 = Clazz_defineMethod (c$, "newA16", 
30809 function (v) {
30810 var m =  new JU.M4 ();
30811 m.m00 = v[0];
30812 m.m01 = v[1];
30813 m.m02 = v[2];
30814 m.m03 = v[3];
30815 m.m10 = v[4];
30816 m.m11 = v[5];
30817 m.m12 = v[6];
30818 m.m13 = v[7];
30819 m.m20 = v[8];
30820 m.m21 = v[9];
30821 m.m22 = v[10];
30822 m.m23 = v[11];
30823 m.m30 = v[12];
30824 m.m31 = v[13];
30825 m.m32 = v[14];
30826 m.m33 = v[15];
30827 return m;
30828 }, "~A");
30829 c$.newM4 = Clazz_defineMethod (c$, "newM4", 
30830 function (m1) {
30831 var m =  new JU.M4 ();
30832 if (m1 == null) {
30833 m.setIdentity ();
30834 return m;
30835 }m.setToM3 (m1);
30836 m.m03 = m1.m03;
30837 m.m13 = m1.m13;
30838 m.m23 = m1.m23;
30839 m.m30 = m1.m30;
30840 m.m31 = m1.m31;
30841 m.m32 = m1.m32;
30842 m.m33 = m1.m33;
30843 return m;
30844 }, "JU.M4");
30845 c$.newMV = Clazz_defineMethod (c$, "newMV", 
30846 function (m1, t) {
30847 var m =  new JU.M4 ();
30848 m.setMV (m1, t);
30849 return m;
30850 }, "JU.M3,JU.T3");
30851 Clazz_defineMethod (c$, "setZero", 
30852 function () {
30853 this.clear33 ();
30854 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = this.m33 = 0.0;
30855 });
30856 Clazz_defineMethod (c$, "setIdentity", 
30857 function () {
30858 this.setZero ();
30859 this.m00 = this.m11 = this.m22 = this.m33 = 1.0;
30860 });
30861 Clazz_defineMethod (c$, "setM4", 
30862 function (m1) {
30863 this.setM33 (m1);
30864 this.m03 = m1.m03;
30865 this.m13 = m1.m13;
30866 this.m23 = m1.m23;
30867 this.m30 = m1.m30;
30868 this.m31 = m1.m31;
30869 this.m32 = m1.m32;
30870 this.m33 = m1.m33;
30871 return this;
30872 }, "JU.M4");
30873 Clazz_defineMethod (c$, "setMV", 
30874 function (m1, t) {
30875 this.setM33 (m1);
30876 this.setTranslation (t);
30877 this.m33 = 1;
30878 }, "JU.M3,JU.T3");
30879 Clazz_defineMethod (c$, "setToM3", 
30880 function (m1) {
30881 this.setM33 (m1);
30882 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = 0.0;
30883 this.m33 = 1.0;
30884 }, "JU.M34");
30885 Clazz_defineMethod (c$, "setToAA", 
30886 function (a) {
30887 this.setIdentity ();
30888 this.setAA33 (a);
30889 }, "JU.A4");
30890 Clazz_defineMethod (c$, "setA", 
30891 function (m) {
30892 this.m00 = m[0];
30893 this.m01 = m[1];
30894 this.m02 = m[2];
30895 this.m03 = m[3];
30896 this.m10 = m[4];
30897 this.m11 = m[5];
30898 this.m12 = m[6];
30899 this.m13 = m[7];
30900 this.m20 = m[8];
30901 this.m21 = m[9];
30902 this.m22 = m[10];
30903 this.m23 = m[11];
30904 this.m30 = m[12];
30905 this.m31 = m[13];
30906 this.m32 = m[14];
30907 this.m33 = m[15];
30908 }, "~A");
30909 Clazz_defineMethod (c$, "setTranslation", 
30910 function (trans) {
30911 this.m03 = trans.x;
30912 this.m13 = trans.y;
30913 this.m23 = trans.z;
30914 }, "JU.T3");
30915 Clazz_defineMethod (c$, "setElement", 
30916 function (row, col, v) {
30917 if (row < 3 && col < 3) {
30918 this.set33 (row, col, v);
30919 return;
30920 }if (row > 3 || col > 3) this.err ();
30921 switch (row) {
30922 case 0:
30923 this.m03 = v;
30924 return;
30925 case 1:
30926 this.m13 = v;
30927 return;
30928 case 2:
30929 this.m23 = v;
30930 return;
30931 }
30932 switch (col) {
30933 case 0:
30934 this.m30 = v;
30935 return;
30936 case 1:
30937 this.m31 = v;
30938 return;
30939 case 2:
30940 this.m32 = v;
30941 return;
30942 case 3:
30943 this.m33 = v;
30944 return;
30945 }
30946 }, "~N,~N,~N");
30947 Clazz_defineMethod (c$, "getElement", 
30948 function (row, col) {
30949 if (row < 3 && col < 3) return this.get33 (row, col);
30950 if (row > 3 || col > 3) {
30951 this.err ();
30952 return 0;
30953 }switch (row) {
30954 case 0:
30955 return this.m03;
30956 case 1:
30957 return this.m13;
30958 case 2:
30959 return this.m23;
30960 default:
30961 switch (col) {
30962 case 0:
30963 return this.m30;
30964 case 1:
30965 return this.m31;
30966 case 2:
30967 return this.m32;
30968 default:
30969 return this.m33;
30970 }
30971 }
30972 }, "~N,~N");
30973 Clazz_defineMethod (c$, "getTranslation", 
30974 function (trans) {
30975 trans.x = this.m03;
30976 trans.y = this.m13;
30977 trans.z = this.m23;
30978 }, "JU.T3");
30979 Clazz_defineMethod (c$, "getRotationScale", 
30980 function (m1) {
30981 m1.m00 = this.m00;
30982 m1.m01 = this.m01;
30983 m1.m02 = this.m02;
30984 m1.m10 = this.m10;
30985 m1.m11 = this.m11;
30986 m1.m12 = this.m12;
30987 m1.m20 = this.m20;
30988 m1.m21 = this.m21;
30989 m1.m22 = this.m22;
30990 }, "JU.M3");
30991 Clazz_defineMethod (c$, "setRotationScale", 
30992 function (m1) {
30993 this.m00 = m1.m00;
30994 this.m01 = m1.m01;
30995 this.m02 = m1.m02;
30996 this.m10 = m1.m10;
30997 this.m11 = m1.m11;
30998 this.m12 = m1.m12;
30999 this.m20 = m1.m20;
31000 this.m21 = m1.m21;
31001 this.m22 = m1.m22;
31002 }, "JU.M3");
31003 Clazz_defineMethod (c$, "setRowA", 
31004 function (row, v) {
31005 if (row < 3) this.setRow33 (row, v);
31006 switch (row) {
31007 case 0:
31008 this.m03 = v[3];
31009 return;
31010 case 1:
31011 this.m13 = v[3];
31012 return;
31013 case 2:
31014 this.m23 = v[3];
31015 return;
31016 case 3:
31017 this.m30 = v[0];
31018 this.m31 = v[1];
31019 this.m32 = v[2];
31020 this.m33 = v[3];
31021 return;
31022 }
31023 this.err ();
31024 }, "~N,~A");
31025 Clazz_overrideMethod (c$, "getRow", 
31026 function (row, v) {
31027 if (row < 3) this.getRow33 (row, v);
31028 switch (row) {
31029 case 0:
31030 v[3] = this.m03;
31031 return;
31032 case 1:
31033 v[3] = this.m13;
31034 return;
31035 case 2:
31036 v[3] = this.m23;
31037 return;
31038 case 3:
31039 v[0] = this.m30;
31040 v[1] = this.m31;
31041 v[2] = this.m32;
31042 v[3] = this.m33;
31043 return;
31044 }
31045 this.err ();
31046 }, "~N,~A");
31047 Clazz_defineMethod (c$, "setColumn4", 
31048 function (column, x, y, z, w) {
31049 if (column == 0) {
31050 this.m00 = x;
31051 this.m10 = y;
31052 this.m20 = z;
31053 this.m30 = w;
31054 } else if (column == 1) {
31055 this.m01 = x;
31056 this.m11 = y;
31057 this.m21 = z;
31058 this.m31 = w;
31059 } else if (column == 2) {
31060 this.m02 = x;
31061 this.m12 = y;
31062 this.m22 = z;
31063 this.m32 = w;
31064 } else if (column == 3) {
31065 this.m03 = x;
31066 this.m13 = y;
31067 this.m23 = z;
31068 this.m33 = w;
31069 } else {
31070 this.err ();
31071 }}, "~N,~N,~N,~N,~N");
31072 Clazz_defineMethod (c$, "setColumnA", 
31073 function (column, v) {
31074 if (column < 3) this.setColumn33 (column, v);
31075 switch (column) {
31076 case 0:
31077 this.m30 = v[3];
31078 return;
31079 case 1:
31080 this.m31 = v[3];
31081 return;
31082 case 2:
31083 this.m32 = v[3];
31084 return;
31085 case 3:
31086 this.m03 = v[0];
31087 this.m13 = v[1];
31088 this.m23 = v[2];
31089 this.m33 = v[3];
31090 return;
31091 default:
31092 this.err ();
31093 }
31094 }, "~N,~A");
31095 Clazz_defineMethod (c$, "getColumn", 
31096 function (column, v) {
31097 if (column < 3) this.getColumn33 (column, v);
31098 switch (column) {
31099 case 0:
31100 v[3] = this.m30;
31101 return;
31102 case 1:
31103 v[3] = this.m31;
31104 return;
31105 case 2:
31106 v[3] = this.m32;
31107 return;
31108 case 3:
31109 v[0] = this.m03;
31110 v[1] = this.m13;
31111 v[2] = this.m23;
31112 v[3] = this.m33;
31113 return;
31114 default:
31115 this.err ();
31116 }
31117 }, "~N,~A");
31118 Clazz_defineMethod (c$, "sub", 
31119 function (m1) {
31120 this.sub33 (m1);
31121 this.m03 -= m1.m03;
31122 this.m13 -= m1.m13;
31123 this.m23 -= m1.m23;
31124 this.m30 -= m1.m30;
31125 this.m31 -= m1.m31;
31126 this.m32 -= m1.m32;
31127 this.m33 -= m1.m33;
31128 }, "JU.M4");
31129 Clazz_defineMethod (c$, "transpose", 
31130 function () {
31131 this.transpose33 ();
31132 var tmp = this.m03;
31133 this.m03 = this.m30;
31134 this.m30 = tmp;
31135 tmp = this.m13;
31136 this.m13 = this.m31;
31137 this.m31 = tmp;
31138 tmp = this.m23;
31139 this.m23 = this.m32;
31140 this.m32 = tmp;
31141 });
31142 Clazz_defineMethod (c$, "invert", 
31143 function () {
31144 var s = this.determinant4 ();
31145 if (s == 0.0) return this;
31146 s = 1 / s;
31147 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));
31148 this.scale (s);
31149 return this;
31150 });
31151 Clazz_defineMethod (c$, "set", 
31152  function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {
31153 this.m00 = m00;
31154 this.m01 = m01;
31155 this.m02 = m02;
31156 this.m03 = m03;
31157 this.m10 = m10;
31158 this.m11 = m11;
31159 this.m12 = m12;
31160 this.m13 = m13;
31161 this.m20 = m20;
31162 this.m21 = m21;
31163 this.m22 = m22;
31164 this.m23 = m23;
31165 this.m30 = m30;
31166 this.m31 = m31;
31167 this.m32 = m32;
31168 this.m33 = m33;
31169 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
31170 Clazz_defineMethod (c$, "determinant4", 
31171 function () {
31172 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);
31173 });
31174 Clazz_defineMethod (c$, "scale", 
31175  function (scalar) {
31176 this.mul33 (scalar);
31177 this.m03 *= scalar;
31178 this.m13 *= scalar;
31179 this.m23 *= scalar;
31180 this.m30 *= scalar;
31181 this.m31 *= scalar;
31182 this.m32 *= scalar;
31183 this.m33 *= scalar;
31184 }, "~N");
31185 Clazz_defineMethod (c$, "mul", 
31186 function (m1) {
31187 this.mul2 (this, m1);
31188 }, "JU.M4");
31189 Clazz_defineMethod (c$, "mul2", 
31190 function (m1, m2) {
31191 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);
31192 }, "JU.M4,JU.M4");
31193 Clazz_defineMethod (c$, "transform", 
31194 function (vec) {
31195 this.transform2 (vec, vec);
31196 }, "JU.T4");
31197 Clazz_defineMethod (c$, "transform2", 
31198 function (vec, vecOut) {
31199 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);
31200 }, "JU.T4,JU.T4");
31201 Clazz_defineMethod (c$, "rotTrans", 
31202 function (point) {
31203 this.rotTrans2 (point, point);
31204 }, "JU.T3");
31205 Clazz_defineMethod (c$, "rotTrans2", 
31206 function (point, pointOut) {
31207 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);
31208 return pointOut;
31209 }, "JU.T3,JU.T3");
31210 Clazz_defineMethod (c$, "setAsXYRotation", 
31211 function (angle) {
31212 this.setIdentity ();
31213 var c = Math.cos (angle);
31214 var s = Math.sin (angle);
31215 this.m22 = c;
31216 this.m23 = -s;
31217 this.m32 = s;
31218 this.m33 = c;
31219 return this;
31220 }, "~N");
31221 Clazz_defineMethod (c$, "setAsYZRotation", 
31222 function (angle) {
31223 this.setIdentity ();
31224 var c = Math.cos (angle);
31225 var s = Math.sin (angle);
31226 this.m00 = c;
31227 this.m03 = -s;
31228 this.m30 = s;
31229 this.m33 = c;
31230 return this;
31231 }, "~N");
31232 Clazz_defineMethod (c$, "setAsXZRotation", 
31233 function (angle) {
31234 this.setIdentity ();
31235 var c = Math.cos (angle);
31236 var s = Math.sin (angle);
31237 this.m11 = c;
31238 this.m13 = -s;
31239 this.m31 = s;
31240 this.m33 = c;
31241 return this;
31242 }, "~N");
31243 Clazz_overrideMethod (c$, "equals", 
31244 function (o) {
31245 if (!(Clazz_instanceOf (o, JU.M4))) return false;
31246 var m = o;
31247 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);
31248 }, "~O");
31249 Clazz_overrideMethod (c$, "hashCode", 
31250 function () {
31251 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);
31252 });
31253 Clazz_overrideMethod (c$, "toString", 
31254 function () {
31255 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 + "] ]";
31256 });
31257 });
31258 Clazz_declarePackage ("JU");
31259 Clazz_load (["javajs.api.JSONEncodable"], "JU.T3", ["java.lang.Float"], function () {
31260 c$ = Clazz_decorateAsClass (function () {
31261 this.x = 0;
31262 this.y = 0;
31263 this.z = 0;
31264 Clazz_instantialize (this, arguments);
31265 }, JU, "T3", null, [javajs.api.JSONEncodable, java.io.Serializable]);
31266 Clazz_defineMethod (c$, "set", 
31267 function (x, y, z) {
31268 this.x = x;
31269 this.y = y;
31270 this.z = z;
31271 }, "~N,~N,~N");
31272 Clazz_defineMethod (c$, "setA", 
31273 function (t) {
31274 this.x = t[0];
31275 this.y = t[1];
31276 this.z = t[2];
31277 }, "~A");
31278 Clazz_defineMethod (c$, "setT", 
31279 function (t1) {
31280 this.x = t1.x;
31281 this.y = t1.y;
31282 this.z = t1.z;
31283 }, "JU.T3");
31284 Clazz_defineMethod (c$, "add2", 
31285 function (t1, t2) {
31286 this.x = t1.x + t2.x;
31287 this.y = t1.y + t2.y;
31288 this.z = t1.z + t2.z;
31289 }, "JU.T3,JU.T3");
31290 Clazz_defineMethod (c$, "add", 
31291 function (t1) {
31292 this.x += t1.x;
31293 this.y += t1.y;
31294 this.z += t1.z;
31295 }, "JU.T3");
31296 Clazz_defineMethod (c$, "distanceSquared", 
31297 function (p1) {
31298 var dx = this.x - p1.x;
31299 var dy = this.y - p1.y;
31300 var dz = this.z - p1.z;
31301 return (dx * dx + dy * dy + dz * dz);
31302 }, "JU.T3");
31303 Clazz_defineMethod (c$, "distance", 
31304 function (p1) {
31305 return Math.sqrt (this.distanceSquared (p1));
31306 }, "JU.T3");
31307 Clazz_defineMethod (c$, "sub2", 
31308 function (t1, t2) {
31309 this.x = t1.x - t2.x;
31310 this.y = t1.y - t2.y;
31311 this.z = t1.z - t2.z;
31312 }, "JU.T3,JU.T3");
31313 Clazz_defineMethod (c$, "sub", 
31314 function (t1) {
31315 this.x -= t1.x;
31316 this.y -= t1.y;
31317 this.z -= t1.z;
31318 }, "JU.T3");
31319 Clazz_defineMethod (c$, "scale", 
31320 function (s) {
31321 this.x *= s;
31322 this.y *= s;
31323 this.z *= s;
31324 }, "~N");
31325 Clazz_defineMethod (c$, "add3", 
31326 function (a, b, c) {
31327 this.x += a;
31328 this.y += b;
31329 this.z += c;
31330 }, "~N,~N,~N");
31331 Clazz_defineMethod (c$, "scaleT", 
31332 function (p) {
31333 this.x *= p.x;
31334 this.y *= p.y;
31335 this.z *= p.z;
31336 }, "JU.T3");
31337 Clazz_defineMethod (c$, "scaleAdd2", 
31338 function (s, t1, t2) {
31339 this.x = s * t1.x + t2.x;
31340 this.y = s * t1.y + t2.y;
31341 this.z = s * t1.z + t2.z;
31342 }, "~N,JU.T3,JU.T3");
31343 Clazz_defineMethod (c$, "ave", 
31344 function (a, b) {
31345 this.x = (a.x + b.x) / 2;
31346 this.y = (a.y + b.y) / 2;
31347 this.z = (a.z + b.z) / 2;
31348 }, "JU.T3,JU.T3");
31349 Clazz_defineMethod (c$, "dot", 
31350 function (v) {
31351 return this.x * v.x + this.y * v.y + this.z * v.z;
31352 }, "JU.T3");
31353 Clazz_defineMethod (c$, "lengthSquared", 
31354 function () {
31355 return this.x * this.x + this.y * this.y + this.z * this.z;
31356 });
31357 Clazz_defineMethod (c$, "length", 
31358 function () {
31359 return Math.sqrt (this.lengthSquared ());
31360 });
31361 Clazz_defineMethod (c$, "normalize", 
31362 function () {
31363 var d = this.length ();
31364 this.x /= d;
31365 this.y /= d;
31366 this.z /= d;
31367 });
31368 Clazz_defineMethod (c$, "cross", 
31369 function (v1, v2) {
31370 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);
31371 }, "JU.T3,JU.T3");
31372 Clazz_overrideMethod (c$, "hashCode", 
31373 function () {
31374 var bits = 1;
31375 bits = 31 * bits + JU.T3.floatToIntBits0 (this.x);
31376 bits = 31 * bits + JU.T3.floatToIntBits0 (this.y);
31377 bits = 31 * bits + JU.T3.floatToIntBits0 (this.z);
31378 return (bits ^ (bits >> 32));
31379 });
31380 c$.floatToIntBits0 = Clazz_defineMethod (c$, "floatToIntBits0", 
31381 function (f) {
31382 return (f == 0 ? 0 : Float.floatToIntBits (f));
31383 }, "~N");
31384 Clazz_overrideMethod (c$, "equals", 
31385 function (t1) {
31386 if (!(Clazz_instanceOf (t1, JU.T3))) return false;
31387 var t2 = t1;
31388 return (this.x == t2.x && this.y == t2.y && this.z == t2.z);
31389 }, "~O");
31390 Clazz_overrideMethod (c$, "toString", 
31391 function () {
31392 return "{" + this.x + ", " + this.y + ", " + this.z + "}";
31393 });
31394 Clazz_overrideMethod (c$, "toJSON", 
31395 function () {
31396 return "[" + this.x + "," + this.y + "," + this.z + "]";
31397 });
31398 });
31399 Clazz_declarePackage ("javax.swing");
31400 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 () {
31401 c$ = Clazz_decorateAsClass (function () {
31402 this.windowDecorationStyle = 0;
31403 this.menuBar = null;
31404 this.contentPane = null;
31405 this.layeredPane = null;
31406 this.glassPane = null;
31407 this.defaultButton = null;
31408 this.defaultPressAction = null;
31409 this.defaultReleaseAction = null;
31410 this.useTrueDoubleBuffering = true;
31411 if (!Clazz_isClassDefined ("javax.swing.JRootPane.RootLayout")) {
31412 javax.swing.JRootPane.$JRootPane$RootLayout$ ();
31413 }
31414 Clazz_instantialize (this, arguments);
31415 }, javax.swing, "JRootPane", javax.swing.JComponent);
31416 Clazz_makeConstructor (c$, 
31417 function () {
31418 Clazz_superConstructor (this, javax.swing.JRootPane, []);
31419 var appletName = jssun.awt.AppContext.getAppContext ().getThreadGroup ().getName ();
31420 this.setName (appletName + ".JRootPane");
31421 this.setGlassPane (this.createGlassPane ());
31422 this.setLayeredPane (this.createLayeredPane ());
31423 this.setContentPane (this.createContentPane ());
31424 this.setLayout (this.createRootLayout ());
31425 this.updateUI ();
31426 });
31427 Clazz_overrideMethod (c$, "setDoubleBuffered", 
31428 function (aFlag) {
31429 }, "~B");
31430 Clazz_defineMethod (c$, "getWindowDecorationStyle", 
31431 function () {
31432 return this.windowDecorationStyle;
31433 });
31434 Clazz_defineMethod (c$, "setWindowDecorationStyle", 
31435 function (windowDecorationStyle) {
31436 if (windowDecorationStyle < 0 || windowDecorationStyle > 8) {
31437 throw  new IllegalArgumentException ("Invalid decoration style");
31438 }var oldWindowDecorationStyle = this.getWindowDecorationStyle ();
31439 this.windowDecorationStyle = windowDecorationStyle;
31440 this.firePropertyChangeInt ("windowDecorationStyle", oldWindowDecorationStyle, windowDecorationStyle);
31441 }, "~N");
31442 Clazz_overrideMethod (c$, "getUI", 
31443 function () {
31444 return this.ui;
31445 });
31446 Clazz_overrideMethod (c$, "updateUI", 
31447 function () {
31448 this.setUI (javax.swing.UIManager.getUI (this));
31449 });
31450 Clazz_overrideMethod (c$, "getUIClassID", 
31451 function () {
31452 return "RootPaneUI";
31453 });
31454 Clazz_defineMethod (c$, "createLayeredPane", 
31455 function () {
31456 var p =  new javax.swing.JLayeredPane ();
31457 p.setName (this.getName () + ".layeredPane");
31458 return p;
31459 });
31460 Clazz_defineMethod (c$, "createContentPane", 
31461 function () {
31462 var c =  new javax.swing.JPanel ();
31463 c.setName (this.getName () + ".contentPane");
31464 c.setLayout (((Clazz_isClassDefined ("javax.swing.JRootPane$1") ? 0 : javax.swing.JRootPane.$JRootPane$1$ ()), Clazz_innerTypeInstance (javax.swing.JRootPane$1, this, null)));
31465 return c;
31466 });
31467 Clazz_defineMethod (c$, "createGlassPane", 
31468 function () {
31469 var c =  new javax.swing.JPanel ();
31470 c.setName (this.getName () + ".glassPane");
31471 c.setVisible (false);
31472 (c).setOpaque (false);
31473 return c;
31474 });
31475 Clazz_defineMethod (c$, "createRootLayout", 
31476 function () {
31477 return Clazz_innerTypeInstance (javax.swing.JRootPane.RootLayout, this, null);
31478 });
31479 Clazz_defineMethod (c$, "setJMenuBar", 
31480 function (menu) {
31481 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31482 this.menuBar = menu;
31483 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31484 }, "javax.swing.JMenuBar");
31485 Clazz_defineMethod (c$, "setMenuBar", 
31486 function (menu) {
31487 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31488 this.menuBar = menu;
31489 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31490 }, "javax.swing.JMenuBar");
31491 Clazz_defineMethod (c$, "getJMenuBar", 
31492 function () {
31493 return this.menuBar;
31494 });
31495 Clazz_defineMethod (c$, "getMenuBar", 
31496 function () {
31497 return this.menuBar;
31498 });
31499 Clazz_defineMethod (c$, "setContentPane", 
31500 function (content) {
31501 if (content == null) throw  new java.awt.IllegalComponentStateException ("contentPane cannot be set to null.");
31502 if (this.contentPane != null && this.contentPane.getParent () === this.layeredPane) this.layeredPane.remove (this.contentPane);
31503 this.contentPane = content;
31504 this.layeredPane.add (this.contentPane, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31505 }, "java.awt.Container");
31506 Clazz_defineMethod (c$, "getContentPane", 
31507 function () {
31508 return this.contentPane;
31509 });
31510 Clazz_defineMethod (c$, "setLayeredPane", 
31511 function (layered) {
31512 if (layered == null) throw  new java.awt.IllegalComponentStateException ("layeredPane cannot be set to null.");
31513 if (this.layeredPane != null && this.layeredPane.getParent () === this) this.remove (this.layeredPane);
31514 this.layeredPane = layered;
31515 this.add (this.layeredPane, -1);
31516 }, "javax.swing.JLayeredPane");
31517 Clazz_defineMethod (c$, "getLayeredPane", 
31518 function () {
31519 return this.layeredPane;
31520 });
31521 Clazz_defineMethod (c$, "setGlassPane", 
31522 function (glass) {
31523 if (glass == null) {
31524 throw  new NullPointerException ("glassPane cannot be set to null.");
31525 }var visible = false;
31526 if (this.glassPane != null && this.glassPane.getParent () === this) {
31527 this.remove (this.glassPane);
31528 visible = this.glassPane.isVisible ();
31529 }glass.setVisible (visible);
31530 this.glassPane = glass;
31531 this.add (this.glassPane, 0);
31532 if (visible) {
31533 this.repaint ();
31534 }}, "java.awt.Component");
31535 Clazz_defineMethod (c$, "getGlassPane", 
31536 function () {
31537 return this.glassPane;
31538 });
31539 Clazz_overrideMethod (c$, "isValidateRoot", 
31540 function () {
31541 return true;
31542 });
31543 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
31544 function () {
31545 return !this.glassPane.isVisible ();
31546 });
31547 Clazz_defineMethod (c$, "addNotify", 
31548 function () {
31549 Clazz_superCall (this, javax.swing.JRootPane, "addNotify", []);
31550 this.enableEvents (8);
31551 });
31552 Clazz_defineMethod (c$, "setDefaultButton", 
31553 function (defaultButton) {
31554 var oldDefault = this.defaultButton;
31555 if (oldDefault !== defaultButton) {
31556 this.defaultButton = defaultButton;
31557 if (oldDefault != null) {
31558 oldDefault.repaint ();
31559 }if (defaultButton != null) {
31560 defaultButton.repaint ();
31561 }}this.firePropertyChangeObject ("defaultButton", oldDefault, defaultButton);
31562 }, "javax.swing.JButton");
31563 Clazz_defineMethod (c$, "getDefaultButton", 
31564 function () {
31565 return this.defaultButton;
31566 });
31567 Clazz_defineMethod (c$, "setUseTrueDoubleBuffering", 
31568 function (useTrueDoubleBuffering) {
31569 this.useTrueDoubleBuffering = useTrueDoubleBuffering;
31570 }, "~B");
31571 Clazz_defineMethod (c$, "getUseTrueDoubleBuffering", 
31572 function () {
31573 return this.useTrueDoubleBuffering;
31574 });
31575 Clazz_defineMethod (c$, "disableTrueDoubleBuffering", 
31576 function () {
31577 });
31578 Clazz_overrideMethod (c$, "addImpl", 
31579 function (comp, constraints, index) {
31580 this.addImplSAEM (comp, constraints, index);
31581 if (this.glassPane != null && this.glassPane.getParent () === this && this.getComponent (0) !== this.glassPane) {
31582 this.add (this.glassPane, 0);
31583 }return comp;
31584 }, "java.awt.Component,~O,~N");
31585 c$.$JRootPane$RootLayout$ = function () {
31586 Clazz_pu$h(self.c$);
31587 c$ = Clazz_decorateAsClass (function () {
31588 Clazz_prepareCallback (this, arguments);
31589 Clazz_instantialize (this, arguments);
31590 }, javax.swing.JRootPane, "RootLayout", null, java.awt.LayoutManager2);
31591 Clazz_overrideMethod (c$, "preferredLayoutSize", 
31592 function (a) {
31593 var b;
31594 var c;
31595 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31596 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31597 b = this.b$["javax.swing.JRootPane"].contentPane.getPreferredSize ();
31598 } else {
31599 b = a.getSize ();
31600 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31601 c = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31602 } else {
31603 c =  new java.awt.Dimension (0, 0);
31604 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31605 }, "java.awt.Container");
31606 Clazz_overrideMethod (c$, "minimumLayoutSize", 
31607 function (a) {
31608 var b;
31609 var c;
31610 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31611 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31612 b = this.b$["javax.swing.JRootPane"].contentPane.getMinimumSize ();
31613 } else {
31614 b = a.getSize ();
31615 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31616 c = this.b$["javax.swing.JRootPane"].menuBar.getMinimumSize ();
31617 } else {
31618 c =  new java.awt.Dimension (0, 0);
31619 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31620 }, "java.awt.Container");
31621 Clazz_overrideMethod (c$, "maximumLayoutSize", 
31622 function (a) {
31623 var b;
31624 var c;
31625 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31626 if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31627 c = this.b$["javax.swing.JRootPane"].menuBar.getMaximumSize ();
31628 } else {
31629 c =  new java.awt.Dimension (0, 0);
31630 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31631 b = this.b$["javax.swing.JRootPane"].contentPane.getMaximumSize ();
31632 } else {
31633 b =  new java.awt.Dimension (2147483647, 2147483647 - d.top - d.bottom - c.height - 1);
31634 }return  new java.awt.Dimension (Math.min (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31635 }, "java.awt.Container");
31636 Clazz_overrideMethod (c$, "layoutContainer", 
31637 function (a) {
31638 var b = a.getBounds ();
31639 var c = this.b$["javax.swing.JRootPane"].getInsets ();
31640 var d = 0;
31641 var e = b.width - c.right - c.left;
31642 var f = b.height - c.top - c.bottom;
31643 if (this.b$["javax.swing.JRootPane"].layeredPane != null) {
31644 this.b$["javax.swing.JRootPane"].layeredPane.setBounds (c.left, c.top, e, f);
31645 }if (this.b$["javax.swing.JRootPane"].glassPane != null) {
31646 this.b$["javax.swing.JRootPane"].glassPane.setBounds (c.left, c.top, e, f);
31647 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31648 var g = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31649 this.b$["javax.swing.JRootPane"].menuBar.setBounds (0, 0, e, g.height);
31650 d += g.height;
31651 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31652 this.b$["javax.swing.JRootPane"].contentPane.setBounds (0, d, e, f - d);
31653 }}, "java.awt.Container");
31654 Clazz_defineMethod (c$, "addLayoutComponent", 
31655 function (a, b) {
31656 }, "~S,java.awt.Component");
31657 Clazz_overrideMethod (c$, "removeLayoutComponent", 
31658 function (a) {
31659 }, "java.awt.Component");
31660 Clazz_defineMethod (c$, "addLayoutComponent", 
31661 function (a, b) {
31662 }, "java.awt.Component,~O");
31663 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
31664 function (a) {
31665 return 0.0;
31666 }, "java.awt.Container");
31667 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
31668 function (a) {
31669 return 0.0;
31670 }, "java.awt.Container");
31671 Clazz_overrideMethod (c$, "invalidateLayout", 
31672 function (a) {
31673 }, "java.awt.Container");
31674 c$ = Clazz_p0p ();
31675 };
31676 c$.$JRootPane$1$ = function () {
31677 Clazz_pu$h(self.c$);
31678 c$ = Clazz_declareAnonymous (javax.swing, "JRootPane$1", java.awt.BorderLayout);
31679 Clazz_defineMethod (c$, "addLayoutComponent", 
31680 function (comp, constraints) {
31681 if (constraints == null) {
31682 constraints = "Center";
31683 }Clazz_superCall (this, javax.swing.JRootPane$1, "addLayoutComponent", [comp, constraints]);
31684 }, "java.awt.Component,~O");
31685 c$ = Clazz_p0p ();
31686 };
31687 Clazz_pu$h(self.c$);
31688 c$ = Clazz_decorateAsClass (function () {
31689 this.owner = null;
31690 this.root = null;
31691 this.press = false;
31692 Clazz_instantialize (this, arguments);
31693 }, javax.swing.JRootPane, "DefaultAction", javax.swing.AbstractAction);
31694 Clazz_makeConstructor (c$, 
31695 function (a, b) {
31696 Clazz_superConstructor (this, javax.swing.JRootPane.DefaultAction, []);
31697 this.root = a;
31698 this.press = b;
31699 }, "javax.swing.JRootPane,~B");
31700 Clazz_defineMethod (c$, "setOwner", 
31701 function (a) {
31702 this.owner = a;
31703 }, "javax.swing.JButton");
31704 Clazz_overrideMethod (c$, "actionPerformed", 
31705 function (a) {
31706 if (this.owner != null && javax.swing.SwingUtilities.getRootPane (this.owner) === this.root) {
31707 var b = this.owner.getModel ();
31708 if (this.press) {
31709 b.setArmed (true);
31710 b.setPressed (true);
31711 } else {
31712 b.setPressed (false);
31713 }}}, "java.awt.event.ActionEvent");
31714 Clazz_overrideMethod (c$, "isEnabled", 
31715 function () {
31716 return this.owner.getModel ().isEnabled ();
31717 });
31718 c$ = Clazz_p0p ();
31719 Clazz_defineStatics (c$,
31720 "$uiClassID", "RootPaneUI",
31721 "NONE", 0,
31722 "FRAME", 1,
31723 "PLAIN_DIALOG", 2,
31724 "INFORMATION_DIALOG", 3,
31725 "ERROR_DIALOG", 4,
31726 "COLOR_CHOOSER_DIALOG", 5,
31727 "FILE_CHOOSER_DIALOG", 6,
31728 "QUESTION_DIALOG", 7,
31729 "WARNING_DIALOG", 8);
31730 });
31731 Clazz_declarePackage ("javax.swing");
31732 Clazz_load (["javax.swing.AbstractButton", "$.DefaultButtonModel"], "javax.swing.JToggleButton", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.InputEvent", "$.ItemEvent", "javax.swing.UIManager"], function () {
31733 c$ = Clazz_declareType (javax.swing, "JToggleButton", javax.swing.AbstractButton);
31734 Clazz_makeConstructor (c$, 
31735 function () {
31736 this.construct (null, null, false);
31737 });
31738 Clazz_makeConstructor (c$, 
31739 function (icon) {
31740 this.construct (null, icon, false);
31741 }, "javax.swing.Icon");
31742 Clazz_makeConstructor (c$, 
31743 function (icon, selected) {
31744 this.construct (null, icon, selected);
31745 }, "javax.swing.Icon,~B");
31746 Clazz_makeConstructor (c$, 
31747 function (text) {
31748 this.construct (text, null, false);
31749 }, "~S");
31750 Clazz_makeConstructor (c$, 
31751 function (text, selected) {
31752 this.construct (text, null, selected);
31753 }, "~S,~B");
31754 Clazz_makeConstructor (c$, 
31755 function (a) {
31756 this.construct ();
31757 this.setAction (a);
31758 }, "javax.swing.Action");
31759 Clazz_makeConstructor (c$, 
31760 function (text, icon) {
31761 this.construct (text, icon, false);
31762 }, "~S,javax.swing.Icon");
31763 Clazz_makeConstructor (c$, 
31764 function (text, icon, selected) {
31765 Clazz_superConstructor (this, javax.swing.JToggleButton, []);
31766 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
31767 this.model.setSelected (selected);
31768 this.init (text, icon);
31769 }, "~S,javax.swing.Icon,~B");
31770 Clazz_overrideMethod (c$, "updateUI", 
31771 function () {
31772 this.setUI (javax.swing.UIManager.getUI (this));
31773 });
31774 Clazz_overrideMethod (c$, "getUIClassID", 
31775 function () {
31776 return "ToggleButtonUI";
31777 });
31778 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
31779 function () {
31780 return true;
31781 });
31782 Clazz_pu$h(self.c$);
31783 c$ = Clazz_declareType (javax.swing.JToggleButton, "ToggleButtonModel", javax.swing.DefaultButtonModel);
31784 Clazz_makeConstructor (c$, 
31785 function () {
31786 Clazz_superConstructor (this, javax.swing.JToggleButton.ToggleButtonModel, []);
31787 });
31788 Clazz_overrideMethod (c$, "isSelected", 
31789 function () {
31790 return (this.stateMask & 2) != 0;
31791 });
31792 Clazz_overrideMethod (c$, "setSelected", 
31793 function (a) {
31794 var b = this.getGroup ();
31795 if (b != null) {
31796 b.setSelected (this, a);
31797 a = b.isSelected (this);
31798 }if (this.isSelected () == a) {
31799 return;
31800 }if (a) {
31801 this.stateMask |= 2;
31802 } else {
31803 this.stateMask &= -3;
31804 }this.fireStateChanged ();
31805 this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, this.isSelected () ? 1 : 2));
31806 }, "~B");
31807 Clazz_overrideMethod (c$, "setPressed", 
31808 function (a) {
31809 if ((this.isPressed () == a) || !this.isEnabled ()) {
31810 return;
31811 }if (a == false && this.isArmed ()) {
31812 this.setSelected (!this.isSelected ());
31813 }if (a) {
31814 this.stateMask |= 4;
31815 } else {
31816 this.stateMask &= -5;
31817 }this.fireStateChanged ();
31818 if (!this.isPressed () && this.isArmed ()) {
31819 var b = 0;
31820 var c = java.awt.EventQueue.getCurrentEvent ();
31821 if (Clazz_instanceOf (c, java.awt.event.InputEvent)) {
31822 b = (c).getModifiers ();
31823 } else if (Clazz_instanceOf (c, java.awt.event.ActionEvent)) {
31824 b = (c).getModifiers ();
31825 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), b));
31826 }}, "~B");
31827 c$ = Clazz_p0p ();
31828 Clazz_defineStatics (c$,
31829 "$uiClassID", "ToggleButtonUI");
31830 });
31831 Clazz_declarePackage ("javax.swing");
31832 Clazz_load (["java.awt.ItemSelectable"], "javax.swing.ButtonModel", null, function () {
31833 Clazz_declareInterface (javax.swing, "ButtonModel", java.awt.ItemSelectable);
31834 });
31835 Clazz_declarePackage ("javax.swing");
31836 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JRadioButton", ["javax.swing.UIManager"], function () {
31837 c$ = Clazz_declareType (javax.swing, "JRadioButton", javax.swing.JToggleButton);
31838 Clazz_makeConstructor (c$, 
31839 function () {
31840 this.construct (null, null, false);
31841 });
31842 Clazz_makeConstructor (c$, 
31843 function (icon) {
31844 this.construct (null, icon, false);
31845 }, "javax.swing.Icon");
31846 Clazz_makeConstructor (c$, 
31847 function (a) {
31848 this.construct ();
31849 this.setAction (a);
31850 }, "javax.swing.Action");
31851 Clazz_makeConstructor (c$, 
31852 function (icon, selected) {
31853 this.construct (null, icon, selected);
31854 }, "javax.swing.Icon,~B");
31855 Clazz_makeConstructor (c$, 
31856 function (text) {
31857 this.construct (text, null, false);
31858 }, "~S");
31859 Clazz_makeConstructor (c$, 
31860 function (text, selected) {
31861 this.construct (text, null, selected);
31862 }, "~S,~B");
31863 Clazz_makeConstructor (c$, 
31864 function (text, icon) {
31865 this.construct (text, icon, false);
31866 }, "~S,javax.swing.Icon");
31867 Clazz_makeConstructor (c$, 
31868 function (text, icon, selected) {
31869 Clazz_superConstructor (this, javax.swing.JRadioButton, [text, icon, selected]);
31870 this.setBorderPainted (false);
31871 this.setHorizontalAlignment (10);
31872 }, "~S,javax.swing.Icon,~B");
31873 Clazz_overrideMethod (c$, "updateUI", 
31874 function () {
31875 this.setUI (javax.swing.UIManager.getUI (this));
31876 });
31877 Clazz_overrideMethod (c$, "getUIClassID", 
31878 function () {
31879 return "RadioButtonUI";
31880 });
31881 Clazz_overrideMethod (c$, "setIconFromAction", 
31882 function (a) {
31883 }, "javax.swing.Action");
31884 Clazz_defineStatics (c$,
31885 "$$uiClassID", "RadioButtonUI");
31886 });
31887 Clazz_declarePackage ("javax.swing");
31888 Clazz_load (["java.applet.Applet", "javax.swing.RootPaneContainer"], "javax.swing.JApplet", ["java.awt.BorderLayout", "$.Color", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
31889 c$ = Clazz_decorateAsClass (function () {
31890 this.rootPane = null;
31891 this.rootPaneCheckingEnabled = false;
31892 this.transferHandler = null;
31893 Clazz_instantialize (this, arguments);
31894 }, javax.swing, "JApplet", java.applet.Applet, javax.swing.RootPaneContainer);
31895 Clazz_makeConstructor (c$, 
31896 function () {
31897 Clazz_superConstructor (this, javax.swing.JApplet, []);
31898 this.setJApplet ();
31899 });
31900 Clazz_defineMethod (c$, "setJApplet", 
31901  function () {
31902 this.setPanel ();
31903 this.setForeground (java.awt.Color.black);
31904 this.setBackground (java.awt.Color.white);
31905 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
31906 this.setLayout ( new java.awt.BorderLayout ());
31907 this.setRootPane (this.createRootPane ());
31908 this.setRootPaneCheckingEnabled (true);
31909 this.setFocusTraversalPolicyProvider (true);
31910 this.enableEvents (8);
31911 });
31912 Clazz_defineMethod (c$, "createRootPane", 
31913 function () {
31914 var rp =  new javax.swing.JRootPane ();
31915 rp.setOpaque (true);
31916 return rp;
31917 });
31918 Clazz_defineMethod (c$, "setTransferHandler", 
31919 function (newHandler) {
31920 var oldHandler = this.transferHandler;
31921 this.transferHandler = newHandler;
31922 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
31923 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
31924 }, "javax.swing.TransferHandler");
31925 Clazz_defineMethod (c$, "getTransferHandler", 
31926 function () {
31927 return this.transferHandler;
31928 });
31929 Clazz_defineMethod (c$, "paint", 
31930 function (g) {
31931 this.getContentPane ().paint (g);
31932 }, "java.awt.Graphics");
31933 Clazz_overrideMethod (c$, "update", 
31934 function (g) {
31935 this.paint (g);
31936 }, "java.awt.Graphics");
31937 Clazz_defineMethod (c$, "setJMenuBar", 
31938 function (menuBar) {
31939 this.getRootPane ().setMenuBar (menuBar);
31940 }, "javax.swing.JMenuBar");
31941 Clazz_defineMethod (c$, "getJMenuBar", 
31942 function () {
31943 return this.getRootPane ().getMenuBar ();
31944 });
31945 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
31946 function () {
31947 return this.rootPaneCheckingEnabled;
31948 });
31949 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
31950 function (enabled) {
31951 this.rootPaneCheckingEnabled = enabled;
31952 }, "~B");
31953 Clazz_overrideMethod (c$, "addImpl", 
31954 function (comp, constraints, index) {
31955 if (this.isRootPaneCheckingEnabled ()) {
31956 return this.getContentPane ().add (comp, constraints, index);
31957 }return this.addImplSAEM (comp, constraints, index);
31958 }, "java.awt.Component,~O,~N");
31959 Clazz_defineMethod (c$, "remove", 
31960 function (comp) {
31961 if (comp === this.rootPane) {
31962 this.removeChild (comp);
31963 } else {
31964 this.getContentPane ().removeChild (comp);
31965 }}, "java.awt.Component");
31966 Clazz_defineMethod (c$, "setLayout", 
31967 function (manager) {
31968 if (this.isRootPaneCheckingEnabled ()) {
31969 this.getContentPane ().setLayout (manager);
31970 } else {
31971 Clazz_superCall (this, javax.swing.JApplet, "setLayout", [manager]);
31972 }}, "java.awt.LayoutManager");
31973 Clazz_overrideMethod (c$, "getRootPane", 
31974 function () {
31975 return this.rootPane;
31976 });
31977 Clazz_defineMethod (c$, "setRootPane", 
31978 function (root) {
31979 if (this.rootPane != null) {
31980 this.remove (this.rootPane);
31981 }this.rootPane = root;
31982 if (this.rootPane != null) {
31983 var checkingEnabled = this.isRootPaneCheckingEnabled ();
31984 try {
31985 this.setRootPaneCheckingEnabled (false);
31986 this.add (this.rootPane, "Center");
31987 } finally {
31988 this.setRootPaneCheckingEnabled (checkingEnabled);
31989 }
31990 }}, "javax.swing.JRootPane");
31991 Clazz_overrideMethod (c$, "getContentPane", 
31992 function () {
31993 return this.getRootPane ().getContentPane ();
31994 });
31995 Clazz_overrideMethod (c$, "setContentPane", 
31996 function (contentPane) {
31997 this.getRootPane ().setContentPane (contentPane);
31998 }, "java.awt.Container");
31999 Clazz_overrideMethod (c$, "getLayeredPane", 
32000 function () {
32001 return this.getRootPane ().getLayeredPane ();
32002 });
32003 Clazz_overrideMethod (c$, "setLayeredPane", 
32004 function (layeredPane) {
32005 this.getRootPane ().setLayeredPane (layeredPane);
32006 }, "javax.swing.JLayeredPane");
32007 Clazz_overrideMethod (c$, "getGlassPane", 
32008 function () {
32009 return this.getRootPane ().getGlassPane ();
32010 });
32011 Clazz_overrideMethod (c$, "setGlassPane", 
32012 function (glassPane) {
32013 this.getRootPane ().setGlassPane (glassPane);
32014 }, "java.awt.Component");
32015 Clazz_defineMethod (c$, "getGraphics", 
32016 function () {
32017 javax.swing.JComponent.getGraphicsInvoked (this);
32018 return Clazz_superCall (this, javax.swing.JApplet, "getGraphics", []);
32019 });
32020 Clazz_defineMethod (c$, "repaint", 
32021 function (time, x, y, width, height) {
32022 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
32023 System.out.println ("repaintNow " + this);
32024 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
32025 } else {
32026 Clazz_superCall (this, javax.swing.JApplet, "repaint", [time, x, y, width, height]);
32027 }}, "~N,~N,~N,~N,~N");
32028 Clazz_defineMethod (c$, "repaintNow", 
32029 function () {
32030 this.repaint (100, 0, 0, this.getWidth (), this.getHeight ());
32031 });
32032 Clazz_defineMethod (c$, "paramString", 
32033 function () {
32034 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
32035 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
32036 return Clazz_superCall (this, javax.swing.JApplet, "paramString", []) + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
32037 });
32038 });
32039 Clazz_declarePackage ("java.awt");
32040 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 () {
32041 c$ = Clazz_decorateAsClass (function () {
32042 this.queues = null;
32043 this.nextQueue = null;
32044 this.previousQueue = null;
32045 this.dispatchThread = null;
32046 this.threadGroup = null;
32047 this.mostRecentEventTime = 0;
32048 this.currentEvent = null;
32049 this.waitForID = 0;
32050 this.name = null;
32051 Clazz_instantialize (this, arguments);
32052 }, java.awt, "EventQueue");
32053 Clazz_prepareFields (c$, function () {
32054 this.queues =  new Array (4);
32055 this.threadGroup = Thread.currentThread ().getThreadGroup ();
32056 this.mostRecentEventTime = System.currentTimeMillis ();
32057 this.name = "AWT-EventQueue-" + java.awt.EventQueue.nextThreadNum ();
32058 });
32059 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
32060  function () {
32061 return java.awt.EventQueue.threadInitNumber++;
32062 });
32063 c$.noEvents = Clazz_defineMethod (c$, "noEvents", 
32064 function (eventQueue) {
32065 return eventQueue.noEvents ();
32066 }, "java.awt.EventQueue");
32067 c$.getNextQueue = Clazz_defineMethod (c$, "getNextQueue", 
32068 function (eventQueue) {
32069 return eventQueue.nextQueue;
32070 }, "java.awt.EventQueue");
32071 c$.removeSourceEvents = Clazz_defineMethod (c$, "removeSourceEvents", 
32072 function (eventQueue, source, removeAllEvents) {
32073 eventQueue.removeSourceEvents (source, removeAllEvents);
32074 }, "java.awt.EventQueue,~O,~B");
32075 Clazz_makeConstructor (c$, 
32076 function () {
32077 for (var i = 0; i < 4; i++) {
32078 this.queues[i] =  new java.awt.Queue ();
32079 }
32080 });
32081 Clazz_defineMethod (c$, "postEvent", 
32082 function (event) {
32083 jssun.awt.SunToolkit.flushPendingEvents ();
32084 this.postEventPrivate (event);
32085 }, "java.awt.AWTEvent");
32086 Clazz_defineMethod (c$, "postEventPrivate", 
32087 function (theEvent) {
32088 theEvent.isPosted = true;
32089 {
32090 if (this.dispatchThread == null && this.nextQueue == null) {
32091 if (theEvent.getSource () === jssun.awt.AWTAutoShutdown.getInstance ()) {
32092 return;
32093 } else {
32094 this.initDispatchThread ();
32095 }}if (this.nextQueue != null) {
32096 this.nextQueue.postEventPrivate (theEvent);
32097 return;
32098 }this.postEventNow (theEvent, java.awt.EventQueue.getPriority (theEvent));
32099 }}, "java.awt.AWTEvent");
32100 c$.getPriority = Clazz_defineMethod (c$, "getPriority", 
32101  function (theEvent) {
32102 if (Clazz_instanceOf (theEvent, jssun.awt.PeerEvent)) {
32103 var flags = (theEvent).getFlags ();
32104 if ((flags & 2) != 0) return 3;
32105 if ((flags & 1) != 0) return 2;
32106 if ((flags & 4) != 0) return 0;
32107 }switch (theEvent.getID ()) {
32108 case 1201:
32109 case 800:
32110 case 801:
32111 return 0;
32112 default:
32113 return 1;
32114 }
32115 }, "java.awt.AWTEvent");
32116 Clazz_defineMethod (c$, "postEventNow", 
32117  function (theEvent, priority) {
32118 if (this.coalesceEvent (theEvent, priority)) {
32119 return;
32120 }var newItem =  new java.awt.EventQueueItem (theEvent);
32121 this.cacheEQItem (newItem);
32122 if (this.queues[priority].head == null) {
32123 var shouldNotify = this.noEvents ();
32124 this.queues[priority].head = this.queues[priority].tail = newItem;
32125 if (shouldNotify) {
32126 if (theEvent.getSource () !== jssun.awt.AWTAutoShutdown.getInstance ()) {
32127 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (this.dispatchThread);
32128 }}} else {
32129 this.queues[priority].tail.next = newItem;
32130 this.queues[priority].tail = newItem;
32131 }}, "java.awt.AWTEvent,~N");
32132 Clazz_defineMethod (c$, "coalescePaintEvent", 
32133  function (e) {
32134 var sourcePeer = (e.getSource ()).peer;
32135 if (sourcePeer != null) {
32136 sourcePeer.coalescePaintEvent (e);
32137 }var cache = (e.getSource ()).eventCache;
32138 if (cache == null) {
32139 return false;
32140 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32141 if (index != -1 && cache[index] != null) {
32142 var merged = this.mergePaintEvents (e, cache[index].event);
32143 if (merged != null) {
32144 cache[index].event = merged;
32145 return true;
32146 }}return false;
32147 }, "java.awt.event.PaintEvent");
32148 Clazz_defineMethod (c$, "mergePaintEvents", 
32149  function (a, b) {
32150 var aRect = a.getUpdateRect ();
32151 var bRect = b.getUpdateRect ();
32152 if (bRect.contains (aRect)) {
32153 return b;
32154 }if (aRect.contains (bRect)) {
32155 return a;
32156 }return null;
32157 }, "java.awt.event.PaintEvent,java.awt.event.PaintEvent");
32158 Clazz_defineMethod (c$, "coalesceMouseEvent", 
32159  function (e) {
32160 var cache = (e.getSource ()).eventCache;
32161 if (cache == null) {
32162 return false;
32163 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32164 if (index != -1 && cache[index] != null) {
32165 cache[index].event = e;
32166 return true;
32167 }return false;
32168 }, "java.awt.event.MouseEvent");
32169 Clazz_defineMethod (c$, "coalescePeerEvent", 
32170  function (e) {
32171 var cache = (e.getSource ()).eventCache;
32172 if (cache == null) {
32173 return false;
32174 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32175 if (index != -1 && cache[index] != null) {
32176 e = e.coalesceEvents (cache[index].event);
32177 if (e != null) {
32178 cache[index].event = e;
32179 return true;
32180 } else {
32181 cache[index] = null;
32182 }}return false;
32183 }, "jssun.awt.PeerEvent");
32184 Clazz_defineMethod (c$, "coalesceOtherEvent", 
32185  function (e, priority) {
32186 var id = e.getID ();
32187 var source = e.getSource ();
32188 for (var entry = this.queues[priority].head; entry != null; entry = entry.next) {
32189 if (entry.event.getSource () === source && entry.id == id) {
32190 var coalescedEvent = source.coalesceEvents (entry.event, e);
32191 if (coalescedEvent != null) {
32192 entry.event = coalescedEvent;
32193 return true;
32194 }}}
32195 return false;
32196 }, "java.awt.AWTEvent,~N");
32197 Clazz_defineMethod (c$, "coalesceEvent", 
32198  function (e, priority) {
32199 if (!(Clazz_instanceOf (e.getSource (), java.awt.Component))) {
32200 return false;
32201 }if (Clazz_instanceOf (e, jssun.awt.PeerEvent)) {
32202 return this.coalescePeerEvent (e);
32203 }if ((e.getSource ()).isCoalescingEnabled () && this.coalesceOtherEvent (e, priority)) {
32204 return true;
32205 }if (Clazz_instanceOf (e, java.awt.event.PaintEvent)) {
32206 return this.coalescePaintEvent (e);
32207 }if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
32208 return this.coalesceMouseEvent (e);
32209 }return false;
32210 }, "java.awt.AWTEvent,~N");
32211 Clazz_defineMethod (c$, "cacheEQItem", 
32212  function (entry) {
32213 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32214 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32215 var source = entry.event.getSource ();
32216 if (source.eventCache == null) {
32217 source.eventCache =  new Array (5);
32218 }source.eventCache[index] = entry;
32219 }}, "java.awt.EventQueueItem");
32220 Clazz_defineMethod (c$, "uncacheEQItem", 
32221  function (entry) {
32222 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32223 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32224 var source = entry.event.getSource ();
32225 if (source.eventCache == null) {
32226 return;
32227 }source.eventCache[index] = null;
32228 }}, "java.awt.EventQueueItem");
32229 c$.eventToCacheIndex = Clazz_defineMethod (c$, "eventToCacheIndex", 
32230  function (e) {
32231 switch (e.getID ()) {
32232 case 800:
32233 return 0;
32234 case 801:
32235 return 1;
32236 case 503:
32237 return 2;
32238 case 506:
32239 return 3;
32240 default:
32241 return -1;
32242 }
32243 }, "java.awt.AWTEvent");
32244 Clazz_defineMethod (c$, "noEvents", 
32245  function () {
32246 for (var i = 0; i < 4; i++) {
32247 if (this.queues[i].head != null) {
32248 return false;
32249 }}
32250 return true;
32251 });
32252 Clazz_defineMethod (c$, "getNextEvent", 
32253 function () {
32254 jssun.awt.SunToolkit.flushPendingEvents ();
32255 {
32256 for (var i = 3; i >= 0; i--) {
32257 if (this.queues[i].head != null) {
32258 var entry = this.queues[i].head;
32259 this.queues[i].head = entry.next;
32260 if (entry.next == null) {
32261 this.queues[i].tail = null;
32262 }this.uncacheEQItem (entry);
32263 return entry.event;
32264 }}
32265 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this.dispatchThread);
32266 }return null;
32267 });
32268 Clazz_defineMethod (c$, "getNextEventForID", 
32269 function (id) {
32270 jssun.awt.SunToolkit.flushPendingEvents ();
32271 {
32272 for (var i = 0; i < 4; i++) {
32273 for (var entry = this.queues[i].head, prev = null; entry != null; prev = entry, entry = entry.next) {
32274 if (entry.id == id) {
32275 if (prev == null) {
32276 this.queues[i].head = entry.next;
32277 } else {
32278 prev.next = entry.next;
32279 }if (this.queues[i].tail === entry) {
32280 this.queues[i].tail = prev;
32281 }this.uncacheEQItem (entry);
32282 return entry.event;
32283 }}
32284 }
32285 this.waitForID = id;
32286 this.waitForID = 0;
32287 }return null;
32288 }, "~N");
32289 Clazz_defineMethod (c$, "peekEvent", 
32290 function () {
32291 for (var i = 3; i >= 0; i--) {
32292 if (this.queues[i].head != null) {
32293 return this.queues[i].head.event;
32294 }}
32295 return null;
32296 });
32297 Clazz_defineMethod (c$, "peekEvent", 
32298 function (id) {
32299 for (var i = 3; i >= 0; i--) {
32300 var q = this.queues[i].head;
32301 for (; q != null; q = q.next) {
32302 if (q.id == id) {
32303 return q.event;
32304 }}
32305 }
32306 return null;
32307 }, "~N");
32308 Clazz_defineMethod (c$, "dispatchEvent", 
32309 function (event) {
32310 var src = event.getSource ();
32311 this.dispatchEventImpl (event, src, false);
32312 }, "java.awt.AWTEvent");
32313 Clazz_defineMethod (c$, "dispatchEventAndWait", 
32314 function (event, src) {
32315 this.dispatchEventImpl (event, src, true);
32316 }, "java.awt.AWTEvent,~O");
32317 Clazz_defineMethod (c$, "dispatchEventImpl", 
32318  function (event, src, andWait) {
32319 event.isPosted = true;
32320 if (Clazz_instanceOf (event, java.awt.ActiveEvent)) {
32321 this.setCurrentEventAndMostRecentTimeImpl (event);
32322 swingjs.JSToolkit.dispatchEvent (event, null, andWait);
32323 } else if (Clazz_instanceOf (src, java.awt.Component)) {
32324 swingjs.JSToolkit.dispatchEvent (event, src, andWait);
32325 event.dispatched ();
32326 } else if (Clazz_instanceOf (src, jssun.awt.AWTAutoShutdown)) {
32327 if (this.noEvents ()) {
32328 this.dispatchThread.stopDispatching ();
32329 }} else {
32330 System.err.println ("unable to dispatch event: " + event);
32331 }}, "java.awt.AWTEvent,~O,~B");
32332 c$.getMostRecentEventTime = Clazz_defineMethod (c$, "getMostRecentEventTime", 
32333 function () {
32334 return 0;
32335 });
32336 Clazz_defineMethod (c$, "getMostRecentEventTimeEx", 
32337 function () {
32338 return this.mostRecentEventTime;
32339 });
32340 c$.getCurrentEvent = Clazz_defineMethod (c$, "getCurrentEvent", 
32341 function () {
32342 return java.awt.Toolkit.getEventQueue ().getCurrentEventImpl ();
32343 });
32344 Clazz_defineMethod (c$, "getCurrentEventImpl", 
32345  function () {
32346 return (swingjs.JSToolkit.isDispatchThread () ? (this.currentEvent) : null);
32347 });
32348 Clazz_defineMethod (c$, "push", 
32349 function (newEventQueue) {
32350 if (this.nextQueue != null) {
32351 this.nextQueue.push (newEventQueue);
32352 return;
32353 }{
32354 while (this.peekEvent () != null) {
32355 try {
32356 newEventQueue.postEventPrivate (this.getNextEvent ());
32357 } catch (ie) {
32358 if (Clazz_exceptionOf (ie, InterruptedException)) {
32359 } else {
32360 throw ie;
32361 }
32362 }
32363 }
32364 newEventQueue.previousQueue = this;
32365 }if (this.dispatchThread != null) {
32366 this.dispatchThread.stopDispatchingLater ();
32367 }this.nextQueue = newEventQueue;
32368 var appContext = jssun.awt.AppContext.getAppContext ();
32369 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32370 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, newEventQueue);
32371 }}, "java.awt.EventQueue");
32372 Clazz_defineMethod (c$, "pop", 
32373 function () {
32374 var prev = this.previousQueue;
32375 {
32376 {
32377 if (this.nextQueue != null) {
32378 this.nextQueue.pop ();
32379 return;
32380 }if (this.previousQueue == null) {
32381 throw  new java.util.EmptyStackException ();
32382 }this.previousQueue.nextQueue = null;
32383 while (this.peekEvent () != null) {
32384 try {
32385 this.previousQueue.postEventPrivate (this.getNextEvent ());
32386 } catch (ie) {
32387 if (Clazz_exceptionOf (ie, InterruptedException)) {
32388 } else {
32389 throw ie;
32390 }
32391 }
32392 }
32393 var appContext = jssun.awt.AppContext.getAppContext ();
32394 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32395 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, this.previousQueue);
32396 }this.previousQueue = null;
32397 }}var dt = this.dispatchThread;
32398 if (dt != null) {
32399 dt.stopDispatching ();
32400 }});
32401 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
32402 function () {
32403 return swingjs.JSToolkit.isDispatchThread ();
32404 });
32405 Clazz_defineMethod (c$, "initDispatchThread", 
32406 function () {
32407 {
32408 if (this.dispatchThread == null) {
32409 var t =  new java.awt.EventDispatchThread (this.threadGroup, this.name, this);
32410 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (t);
32411 this.dispatchThread = t;
32412 this.dispatchThread.start ();
32413 }}});
32414 Clazz_defineMethod (c$, "detachDispatchThread", 
32415 function () {
32416 this.dispatchThread = null;
32417 });
32418 Clazz_defineMethod (c$, "getDispatchThread", 
32419 function () {
32420 return this.dispatchThread;
32421 });
32422 Clazz_defineMethod (c$, "removeSourceEvents", 
32423 function (source, removeAllEvents) {
32424 jssun.awt.SunToolkit.flushPendingEvents ();
32425 {
32426 for (var i = 0; i < 4; i++) {
32427 var entry = this.queues[i].head;
32428 var prev = null;
32429 while (entry != null) {
32430 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)))) {
32431 if (Clazz_instanceOf (entry.event, java.awt.SequencedEvent)) {
32432 (entry.event).dispose ();
32433 }if (Clazz_instanceOf (entry.event, java.awt.SentEvent)) {
32434 (entry.event).dispose ();
32435 }if (prev == null) {
32436 this.queues[i].head = entry.next;
32437 } else {
32438 prev.next = entry.next;
32439 }this.uncacheEQItem (entry);
32440 } else {
32441 prev = entry;
32442 }entry = entry.next;
32443 }
32444 this.queues[i].tail = prev;
32445 }
32446 }}, "~O,~B");
32447 c$.setCurrentEventAndMostRecentTime = Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTime", 
32448 function (e) {
32449 java.awt.Toolkit.getEventQueue ().setCurrentEventAndMostRecentTimeImpl (e);
32450 }, "java.awt.AWTEvent");
32451 Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTimeImpl", 
32452  function (e) {
32453 if (swingjs.JSToolkit.isDispatchThread ()) {
32454 return;
32455 }this.currentEvent = e;
32456 var mostRecentEventTime2 = -9223372036854775808;
32457 if (Clazz_instanceOf (e, java.awt.event.InputEvent)) {
32458 var ie = e;
32459 mostRecentEventTime2 = ie.getWhen ();
32460 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
32461 var ime = e;
32462 mostRecentEventTime2 = ime.getWhen ();
32463 } else if (Clazz_instanceOf (e, java.awt.event.ActionEvent)) {
32464 var ae = e;
32465 mostRecentEventTime2 = ae.getWhen ();
32466 } else if (Clazz_instanceOf (e, java.awt.event.InvocationEvent)) {
32467 var ie = e;
32468 mostRecentEventTime2 = ie.getWhen ();
32469 }this.mostRecentEventTime = Math.max (this.mostRecentEventTime, mostRecentEventTime2);
32470 }, "java.awt.AWTEvent");
32471 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
32472 function (runnable) {
32473 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), runnable));
32474 }, "Runnable");
32475 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
32476 function (runnable) {
32477 java.awt.EventQueue.invokeAndWaitStatic (java.awt.Toolkit.getDefaultToolkit (), runnable);
32478 }, "Runnable");
32479 c$.invokeAndWaitStatic = Clazz_defineMethod (c$, "invokeAndWaitStatic", 
32480  function (source, runnable) {
32481 if (java.awt.EventQueue.isDispatchThread ()) {
32482 throw  new Error ("Cannot call invokeAndWait from the event dispatcher thread");
32483 }var event =  new java.awt.event.InvocationEvent (source, runnable, null, true);
32484 swingjs.JSToolkit.dispatchEvent (event, null, true);
32485 var eventThrowable = event.getThrowable ();
32486 if (eventThrowable != null) {
32487 throw  new java.lang.reflect.InvocationTargetException (eventThrowable);
32488 }}, "~O,Runnable");
32489 Clazz_defineMethod (c$, "wakeup", 
32490 function (isShutdown) {
32491 {
32492 if (this.nextQueue != null) {
32493 this.nextQueue.wakeup (isShutdown);
32494 } else if (this.dispatchThread != null) {
32495 try {
32496 this.dispatchThread.start ();
32497 } catch (e) {
32498 if (Clazz_exceptionOf (e, IllegalThreadStateException)) {
32499 this.dispatchThread.run ();
32500 } else {
32501 throw e;
32502 }
32503 }
32504 } else if (!isShutdown) {
32505 this.initDispatchThread ();
32506 }}}, "~B");
32507 Clazz_defineStatics (c$,
32508 "threadInitNumber", 0,
32509 "LOW_PRIORITY", 0,
32510 "NORM_PRIORITY", 1,
32511 "HIGH_PRIORITY", 2,
32512 "ULTIMATE_PRIORITY", 3,
32513 "NUM_PRIORITIES", 4,
32514 "PAINT", 0,
32515 "UPDATE", 1,
32516 "MOVE", 2,
32517 "DRAG", 3,
32518 "PEER", 4,
32519 "CACHE_LENGTH", 5);
32520 c$ = Clazz_decorateAsClass (function () {
32521 this.head = null;
32522 this.tail = null;
32523 Clazz_instantialize (this, arguments);
32524 }, java.awt, "Queue");
32525 c$ = Clazz_decorateAsClass (function () {
32526 this.event = null;
32527 this.id = 0;
32528 this.next = null;
32529 Clazz_instantialize (this, arguments);
32530 }, java.awt, "EventQueueItem");
32531 Clazz_makeConstructor (c$, 
32532 function (evt) {
32533 this.event = evt;
32534 this.id = evt.getID ();
32535 }, "java.awt.AWTEvent");
32536 });
32537 Clazz_declarePackage ("java.awt");
32538 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 () {
32539 c$ = Clazz_decorateAsClass (function () {
32540 this.a = null;
32541 this.b = null;
32542 Clazz_instantialize (this, arguments);
32543 }, 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]);
32544 Clazz_makeConstructor (c$, 
32545 function (a, b) {
32546 this.a = a;
32547 this.b = b;
32548 }, "java.util.EventListener,java.util.EventListener");
32549 Clazz_defineMethod (c$, "remove", 
32550 function (oldl) {
32551 if (oldl === this.a) return this.b;
32552 if (oldl === this.b) return this.a;
32553 var a2 = java.awt.AWTEventMulticaster.removeInternal (this.a, oldl);
32554 var b2 = java.awt.AWTEventMulticaster.removeInternal (this.b, oldl);
32555 if (a2 === this.a && b2 === this.b) {
32556 return this;
32557 }return java.awt.AWTEventMulticaster.addInternal (a2, b2);
32558 }, "java.util.EventListener");
32559 Clazz_defineMethod (c$, "componentResized", 
32560 function (e) {
32561 (this.a).componentResized (e);
32562 (this.b).componentResized (e);
32563 }, "java.awt.event.ComponentEvent");
32564 Clazz_defineMethod (c$, "componentMoved", 
32565 function (e) {
32566 (this.a).componentMoved (e);
32567 (this.b).componentMoved (e);
32568 }, "java.awt.event.ComponentEvent");
32569 Clazz_defineMethod (c$, "componentShown", 
32570 function (e) {
32571 (this.a).componentShown (e);
32572 (this.b).componentShown (e);
32573 }, "java.awt.event.ComponentEvent");
32574 Clazz_defineMethod (c$, "componentHidden", 
32575 function (e) {
32576 (this.a).componentHidden (e);
32577 (this.b).componentHidden (e);
32578 }, "java.awt.event.ComponentEvent");
32579 Clazz_defineMethod (c$, "componentAdded", 
32580 function (e) {
32581 (this.a).componentAdded (e);
32582 (this.b).componentAdded (e);
32583 }, "java.awt.event.ContainerEvent");
32584 Clazz_defineMethod (c$, "componentRemoved", 
32585 function (e) {
32586 (this.a).componentRemoved (e);
32587 (this.b).componentRemoved (e);
32588 }, "java.awt.event.ContainerEvent");
32589 Clazz_defineMethod (c$, "focusGained", 
32590 function (e) {
32591 (this.a).focusGained (e);
32592 (this.b).focusGained (e);
32593 }, "java.awt.event.FocusEvent");
32594 Clazz_defineMethod (c$, "focusLost", 
32595 function (e) {
32596 (this.a).focusLost (e);
32597 (this.b).focusLost (e);
32598 }, "java.awt.event.FocusEvent");
32599 Clazz_defineMethod (c$, "keyTyped", 
32600 function (e) {
32601 (this.a).keyTyped (e);
32602 (this.b).keyTyped (e);
32603 }, "java.awt.event.KeyEvent");
32604 Clazz_defineMethod (c$, "keyPressed", 
32605 function (e) {
32606 (this.a).keyPressed (e);
32607 (this.b).keyPressed (e);
32608 }, "java.awt.event.KeyEvent");
32609 Clazz_defineMethod (c$, "keyReleased", 
32610 function (e) {
32611 (this.a).keyReleased (e);
32612 (this.b).keyReleased (e);
32613 }, "java.awt.event.KeyEvent");
32614 Clazz_defineMethod (c$, "mouseClicked", 
32615 function (e) {
32616 (this.a).mouseClicked (e);
32617 (this.b).mouseClicked (e);
32618 }, "java.awt.event.MouseEvent");
32619 Clazz_defineMethod (c$, "mousePressed", 
32620 function (e) {
32621 (this.a).mousePressed (e);
32622 (this.b).mousePressed (e);
32623 }, "java.awt.event.MouseEvent");
32624 Clazz_defineMethod (c$, "mouseReleased", 
32625 function (e) {
32626 (this.a).mouseReleased (e);
32627 (this.b).mouseReleased (e);
32628 }, "java.awt.event.MouseEvent");
32629 Clazz_defineMethod (c$, "mouseEntered", 
32630 function (e) {
32631 (this.a).mouseEntered (e);
32632 (this.b).mouseEntered (e);
32633 }, "java.awt.event.MouseEvent");
32634 Clazz_defineMethod (c$, "mouseExited", 
32635 function (e) {
32636 (this.a).mouseExited (e);
32637 (this.b).mouseExited (e);
32638 }, "java.awt.event.MouseEvent");
32639 Clazz_defineMethod (c$, "mouseDragged", 
32640 function (e) {
32641 (this.a).mouseDragged (e);
32642 (this.b).mouseDragged (e);
32643 }, "java.awt.event.MouseEvent");
32644 Clazz_defineMethod (c$, "mouseMoved", 
32645 function (e) {
32646 (this.a).mouseMoved (e);
32647 (this.b).mouseMoved (e);
32648 }, "java.awt.event.MouseEvent");
32649 Clazz_defineMethod (c$, "windowOpened", 
32650 function (e) {
32651 (this.a).windowOpened (e);
32652 (this.b).windowOpened (e);
32653 }, "java.awt.event.WindowEvent");
32654 Clazz_defineMethod (c$, "windowClosing", 
32655 function (e) {
32656 (this.a).windowClosing (e);
32657 (this.b).windowClosing (e);
32658 }, "java.awt.event.WindowEvent");
32659 Clazz_defineMethod (c$, "windowClosed", 
32660 function (e) {
32661 (this.a).windowClosed (e);
32662 (this.b).windowClosed (e);
32663 }, "java.awt.event.WindowEvent");
32664 Clazz_defineMethod (c$, "windowIconified", 
32665 function (e) {
32666 (this.a).windowIconified (e);
32667 (this.b).windowIconified (e);
32668 }, "java.awt.event.WindowEvent");
32669 Clazz_defineMethod (c$, "windowDeiconified", 
32670 function (e) {
32671 (this.a).windowDeiconified (e);
32672 (this.b).windowDeiconified (e);
32673 }, "java.awt.event.WindowEvent");
32674 Clazz_defineMethod (c$, "windowActivated", 
32675 function (e) {
32676 (this.a).windowActivated (e);
32677 (this.b).windowActivated (e);
32678 }, "java.awt.event.WindowEvent");
32679 Clazz_defineMethod (c$, "windowDeactivated", 
32680 function (e) {
32681 (this.a).windowDeactivated (e);
32682 (this.b).windowDeactivated (e);
32683 }, "java.awt.event.WindowEvent");
32684 Clazz_defineMethod (c$, "windowStateChanged", 
32685 function (e) {
32686 (this.a).windowStateChanged (e);
32687 (this.b).windowStateChanged (e);
32688 }, "java.awt.event.WindowEvent");
32689 Clazz_defineMethod (c$, "windowGainedFocus", 
32690 function (e) {
32691 (this.a).windowGainedFocus (e);
32692 (this.b).windowGainedFocus (e);
32693 }, "java.awt.event.WindowEvent");
32694 Clazz_defineMethod (c$, "windowLostFocus", 
32695 function (e) {
32696 (this.a).windowLostFocus (e);
32697 (this.b).windowLostFocus (e);
32698 }, "java.awt.event.WindowEvent");
32699 Clazz_defineMethod (c$, "actionPerformed", 
32700 function (e) {
32701 (this.a).actionPerformed (e);
32702 (this.b).actionPerformed (e);
32703 }, "java.awt.event.ActionEvent");
32704 Clazz_defineMethod (c$, "itemStateChanged", 
32705 function (e) {
32706 (this.a).itemStateChanged (e);
32707 (this.b).itemStateChanged (e);
32708 }, "java.awt.event.ItemEvent");
32709 Clazz_defineMethod (c$, "adjustmentValueChanged", 
32710 function (e) {
32711 (this.a).adjustmentValueChanged (e);
32712 (this.b).adjustmentValueChanged (e);
32713 }, "java.awt.event.AdjustmentEvent");
32714 Clazz_defineMethod (c$, "textValueChanged", 
32715 function (e) {
32716 (this.a).textValueChanged (e);
32717 (this.b).textValueChanged (e);
32718 }, "java.awt.event.TextEvent");
32719 Clazz_defineMethod (c$, "inputMethodTextChanged", 
32720 function (e) {
32721 (this.a).inputMethodTextChanged (e);
32722 (this.b).inputMethodTextChanged (e);
32723 }, "java.awt.event.InputMethodEvent");
32724 Clazz_defineMethod (c$, "caretPositionChanged", 
32725 function (e) {
32726 (this.a).caretPositionChanged (e);
32727 (this.b).caretPositionChanged (e);
32728 }, "java.awt.event.InputMethodEvent");
32729 Clazz_defineMethod (c$, "hierarchyChanged", 
32730 function (e) {
32731 (this.a).hierarchyChanged (e);
32732 (this.b).hierarchyChanged (e);
32733 }, "java.awt.event.HierarchyEvent");
32734 Clazz_defineMethod (c$, "ancestorMoved", 
32735 function (e) {
32736 (this.a).ancestorMoved (e);
32737 (this.b).ancestorMoved (e);
32738 }, "java.awt.event.HierarchyEvent");
32739 Clazz_defineMethod (c$, "ancestorResized", 
32740 function (e) {
32741 (this.a).ancestorResized (e);
32742 (this.b).ancestorResized (e);
32743 }, "java.awt.event.HierarchyEvent");
32744 Clazz_defineMethod (c$, "mouseWheelMoved", 
32745 function (e) {
32746 (this.a).mouseWheelMoved (e);
32747 (this.b).mouseWheelMoved (e);
32748 }, "java.awt.event.MouseWheelEvent");
32749 c$.add = Clazz_defineMethod (c$, "add", 
32750 function (a, b) {
32751 return java.awt.AWTEventMulticaster.addInternal (a, b);
32752 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32753 c$.add = Clazz_defineMethod (c$, "add", 
32754 function (a, b) {
32755 return java.awt.AWTEventMulticaster.addInternal (a, b);
32756 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32757 c$.add = Clazz_defineMethod (c$, "add", 
32758 function (a, b) {
32759 return java.awt.AWTEventMulticaster.addInternal (a, b);
32760 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32761 c$.add = Clazz_defineMethod (c$, "add", 
32762 function (a, b) {
32763 return java.awt.AWTEventMulticaster.addInternal (a, b);
32764 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32765 c$.add = Clazz_defineMethod (c$, "add", 
32766 function (a, b) {
32767 return java.awt.AWTEventMulticaster.addInternal (a, b);
32768 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32769 c$.add = Clazz_defineMethod (c$, "add", 
32770 function (a, b) {
32771 return java.awt.AWTEventMulticaster.addInternal (a, b);
32772 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32773 c$.add = Clazz_defineMethod (c$, "add", 
32774 function (a, b) {
32775 return java.awt.AWTEventMulticaster.addInternal (a, b);
32776 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32777 c$.add = Clazz_defineMethod (c$, "add", 
32778 function (a, b) {
32779 return java.awt.AWTEventMulticaster.addInternal (a, b);
32780 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32781 c$.add = Clazz_defineMethod (c$, "add", 
32782 function (a, b) {
32783 return java.awt.AWTEventMulticaster.addInternal (a, b);
32784 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32785 c$.add = Clazz_defineMethod (c$, "add", 
32786 function (a, b) {
32787 return java.awt.AWTEventMulticaster.addInternal (a, b);
32788 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32789 c$.add = Clazz_defineMethod (c$, "add", 
32790 function (a, b) {
32791 return java.awt.AWTEventMulticaster.addInternal (a, b);
32792 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32793 c$.add = Clazz_defineMethod (c$, "add", 
32794 function (a, b) {
32795 return java.awt.AWTEventMulticaster.addInternal (a, b);
32796 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32797 c$.add = Clazz_defineMethod (c$, "add", 
32798 function (a, b) {
32799 return java.awt.AWTEventMulticaster.addInternal (a, b);
32800 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32801 c$.add = Clazz_defineMethod (c$, "add", 
32802 function (a, b) {
32803 return java.awt.AWTEventMulticaster.addInternal (a, b);
32804 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32805 c$.add = Clazz_defineMethod (c$, "add", 
32806 function (a, b) {
32807 return java.awt.AWTEventMulticaster.addInternal (a, b);
32808 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32809 c$.add = Clazz_defineMethod (c$, "add", 
32810 function (a, b) {
32811 return java.awt.AWTEventMulticaster.addInternal (a, b);
32812 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32813 c$.add = Clazz_defineMethod (c$, "add", 
32814 function (a, b) {
32815 return java.awt.AWTEventMulticaster.addInternal (a, b);
32816 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32817 c$.remove = Clazz_defineMethod (c$, "remove", 
32818 function (l, oldl) {
32819 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32820 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32821 c$.remove = Clazz_defineMethod (c$, "remove", 
32822 function (l, oldl) {
32823 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32824 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32825 c$.remove = Clazz_defineMethod (c$, "remove", 
32826 function (l, oldl) {
32827 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32828 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32829 c$.remove = Clazz_defineMethod (c$, "remove", 
32830 function (l, oldl) {
32831 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32832 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32833 c$.remove = Clazz_defineMethod (c$, "remove", 
32834 function (l, oldl) {
32835 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32836 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32837 c$.remove = Clazz_defineMethod (c$, "remove", 
32838 function (l, oldl) {
32839 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32840 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32841 c$.remove = Clazz_defineMethod (c$, "remove", 
32842 function (l, oldl) {
32843 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32844 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32845 c$.remove = Clazz_defineMethod (c$, "remove", 
32846 function (l, oldl) {
32847 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32848 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32849 c$.remove = Clazz_defineMethod (c$, "remove", 
32850 function (l, oldl) {
32851 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32852 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32853 c$.remove = Clazz_defineMethod (c$, "remove", 
32854 function (l, oldl) {
32855 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32856 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32857 c$.remove = Clazz_defineMethod (c$, "remove", 
32858 function (l, oldl) {
32859 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32860 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32861 c$.remove = Clazz_defineMethod (c$, "remove", 
32862 function (l, oldl) {
32863 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32864 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32865 c$.remove = Clazz_defineMethod (c$, "remove", 
32866 function (l, oldl) {
32867 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32868 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32869 c$.remove = Clazz_defineMethod (c$, "remove", 
32870 function (l, oldl) {
32871 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32872 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32873 c$.remove = Clazz_defineMethod (c$, "remove", 
32874 function (l, oldl) {
32875 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32876 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32877 c$.remove = Clazz_defineMethod (c$, "remove", 
32878 function (l, oldl) {
32879 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32880 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32881 c$.remove = Clazz_defineMethod (c$, "remove", 
32882 function (l, oldl) {
32883 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32884 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32885 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
32886 function (a, b) {
32887 if (a == null) return b;
32888 if (b == null) return a;
32889 return  new java.awt.AWTEventMulticaster (a, b);
32890 }, "java.util.EventListener,java.util.EventListener");
32891 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
32892 function (l, oldl) {
32893 if (l === oldl || l == null) {
32894 return null;
32895 } else if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32896 return (l).remove (oldl);
32897 } else {
32898 return l;
32899 }}, "java.util.EventListener,java.util.EventListener");
32900 c$.getListenerCount = Clazz_defineMethod (c$, "getListenerCount", 
32901  function (l, listenerType) {
32902 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32903 var mc = l;
32904 return java.awt.AWTEventMulticaster.getListenerCount (mc.a, listenerType) + java.awt.AWTEventMulticaster.getListenerCount (mc.b, listenerType);
32905 } else {
32906 return listenerType.isInstance (l) ? 1 : 0;
32907 }}, "java.util.EventListener,Class");
32908 c$.populateListenerArray = Clazz_defineMethod (c$, "populateListenerArray", 
32909  function (a, l, index) {
32910 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32911 var mc = l;
32912 var lhs = java.awt.AWTEventMulticaster.populateListenerArray (a, mc.a, index);
32913 return java.awt.AWTEventMulticaster.populateListenerArray (a, mc.b, lhs);
32914 } else if (a.getClass ().getComponentType ().isInstance (l)) {
32915 a[index] = l;
32916 return index + 1;
32917 } else {
32918 return index;
32919 }}, "~A,java.util.EventListener,~N");
32920 c$.getListeners = Clazz_defineMethod (c$, "getListeners", 
32921 function (l, listenerType) {
32922 if (listenerType == null) {
32923 throw  new NullPointerException ("Listener type should not be null");
32924 }var n = java.awt.AWTEventMulticaster.getListenerCount (l, listenerType);
32925 var result = java.lang.reflect.Array.newInstance (listenerType, n);
32926 java.awt.AWTEventMulticaster.populateListenerArray (result, l, 0);
32927 return result;
32928 }, "java.util.EventListener,Class");
32929 });
32930 Clazz_declarePackage ("java.awt");
32931 Clazz_load (["java.util.EventObject"], "java.awt.AWTEvent", ["java.awt.Component", "java.awt.peer.LightweightPeer"], function () {
32932 c$ = Clazz_decorateAsClass (function () {
32933 this.bdata = null;
32934 this.id = 0;
32935 this.num = 0;
32936 this.consumed = false;
32937 this.focusManagerIsDispatching = false;
32938 this.isPosted = false;
32939 Clazz_instantialize (this, arguments);
32940 }, java.awt, "AWTEvent", java.util.EventObject);
32941 Clazz_makeConstructor (c$, 
32942 function (event) {
32943 this.construct (event.target, event.id);
32944 }, "java.awt.Event");
32945 Clazz_makeConstructor (c$, 
32946 function (source, id) {
32947 Clazz_superConstructor (this, java.awt.AWTEvent, [source]);
32948 this.id = id;
32949 this.num = ++java.awt.AWTEvent.idnum;
32950 switch (id) {
32951 case 1001:
32952 case 701:
32953 case 601:
32954 case 900:
32955 this.consumed = true;
32956 break;
32957 default:
32958 }
32959 }, "~O,~N");
32960 Clazz_defineMethod (c$, "setSource", 
32961 function (newSource) {
32962 if (this.source === newSource) {
32963 return;
32964 }var comp = null;
32965 if (Clazz_instanceOf (newSource, java.awt.Component)) {
32966 comp = newSource;
32967 while (comp != null && comp.peer != null && (Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer))) {
32968 comp = comp.parent;
32969 }
32970 }this.source = newSource;
32971 }, "~O");
32972 Clazz_defineMethod (c$, "getID", 
32973 function () {
32974 return this.id;
32975 });
32976 Clazz_overrideMethod (c$, "toString", 
32977 function () {
32978 var srcName = null;
32979 if (Clazz_instanceOf (this.source, java.awt.Component)) {
32980 srcName = (this.source).getName ();
32981 }return this.getClass ().getName () + "[" + this.paramString () + "] on " + (srcName != null ? srcName : this.source);
32982 });
32983 Clazz_defineMethod (c$, "paramString", 
32984 function () {
32985 return "";
32986 });
32987 Clazz_defineMethod (c$, "consume", 
32988 function () {
32989 switch (this.id) {
32990 case 401:
32991 case 402:
32992 case 501:
32993 case 502:
32994 case 503:
32995 case 506:
32996 case 504:
32997 case 505:
32998 case 507:
32999 case 1100:
33000 case 1101:
33001 this.consumed = true;
33002 break;
33003 default:
33004 }
33005 });
33006 Clazz_defineMethod (c$, "isConsumed", 
33007 function () {
33008 return this.consumed;
33009 });
33010 Clazz_defineMethod (c$, "copyPrivateDataInto", 
33011 function (that) {
33012 that.bdata = this.bdata;
33013 }, "java.awt.AWTEvent");
33014 Clazz_defineMethod (c$, "dispatched", 
33015 function () {
33016 });
33017 Clazz_defineStatics (c$,
33018 "idnum", 0,
33019 "COMPONENT_EVENT_MASK", 0x01,
33020 "CONTAINER_EVENT_MASK", 0x02,
33021 "FOCUS_EVENT_MASK", 0x04,
33022 "KEY_EVENT_MASK", 0x08,
33023 "MOUSE_EVENT_MASK", 0x10,
33024 "MOUSE_MOTION_EVENT_MASK", 0x20,
33025 "WINDOW_EVENT_MASK", 0x40,
33026 "ACTION_EVENT_MASK", 0x80,
33027 "ADJUSTMENT_EVENT_MASK", 0x100,
33028 "ITEM_EVENT_MASK", 0x200,
33029 "TEXT_EVENT_MASK", 0x400,
33030 "INPUT_METHOD_EVENT_MASK", 0x800,
33031 "INPUT_METHODS_ENABLED_MASK", 0x1000,
33032 "PAINT_EVENT_MASK", 0x2000,
33033 "INVOCATION_EVENT_MASK", 0x4000,
33034 "HIERARCHY_EVENT_MASK", 0x8000,
33035 "HIERARCHY_BOUNDS_EVENT_MASK", 0x10000,
33036 "MOUSE_WHEEL_EVENT_MASK", 0x20000,
33037 "WINDOW_STATE_EVENT_MASK", 0x40000,
33038 "WINDOW_FOCUS_EVENT_MASK", 0x80000,
33039 "RESERVED_ID_MAX", 1999);
33040 });
33041 Clazz_declarePackage ("java.awt.event");
33042 Clazz_load (["java.util.EventListener"], "java.awt.event.AWTEventListener", null, function () {
33043 Clazz_declareInterface (java.awt.event, "AWTEventListener", java.util.EventListener);
33044 });
33045 Clazz_declarePackage ("java.awt");
33046 Clazz_declareInterface (java.awt, "ActiveEvent");
33047 Clazz_declarePackage ("java.awt.event");
33048 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.event.InvocationEvent", ["java.lang.Exception"], function () {
33049 c$ = Clazz_decorateAsClass (function () {
33050 this.runnable = null;
33051 this.notifier = null;
33052 this.catchExceptions = false;
33053 this.exception = null;
33054 this.throwable = null;
33055 this.when = 0;
33056 Clazz_instantialize (this, arguments);
33057 }, java.awt.event, "InvocationEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
33058 Clazz_makeConstructor (c$, 
33059 function (source, runnable) {
33060 this.construct (source, runnable, null, false);
33061 }, "~O,Runnable");
33062 Clazz_makeConstructor (c$, 
33063 function (source, runnable, notifier, catchThrowables) {
33064 this.construct (source, 1200, runnable, notifier, catchThrowables);
33065 }, "~O,Runnable,~O,~B");
33066 Clazz_makeConstructor (c$, 
33067 function (source, id, runnable, notifier, catchThrowables) {
33068 Clazz_superConstructor (this, java.awt.event.InvocationEvent, [source, id]);
33069 this.runnable = runnable;
33070 this.notifier = notifier;
33071 this.catchExceptions = catchThrowables;
33072 this.when = System.currentTimeMillis ();
33073 }, "~O,~N,Runnable,~O,~B");
33074 Clazz_overrideMethod (c$, "dispatch", 
33075 function () {
33076 if (this.catchExceptions) {
33077 try {
33078 this.runnable.run ();
33079 } catch (t) {
33080 if (Clazz_instanceOf (t, Exception)) {
33081 this.exception = t;
33082 }this.throwable = t;
33083 }
33084 } else {
33085 this.runnable.run ();
33086 }if (this.notifier != null) {
33087 {
33088 this.notifier.notifyAll ();
33089 }}});
33090 Clazz_defineMethod (c$, "getException", 
33091 function () {
33092 return (this.catchExceptions) ? this.exception : null;
33093 });
33094 Clazz_defineMethod (c$, "getThrowable", 
33095 function () {
33096 return (this.catchExceptions) ? this.throwable : null;
33097 });
33098 Clazz_defineMethod (c$, "getWhen", 
33099 function () {
33100 return this.when;
33101 });
33102 Clazz_overrideMethod (c$, "paramString", 
33103 function () {
33104 var typeStr;
33105 switch (this.id) {
33106 case 1200:
33107 typeStr = "INVOCATION_DEFAULT";
33108 break;
33109 default:
33110 typeStr = "unknown type";
33111 }
33112 return typeStr + ",runnable=" + this.runnable + ",notifier=" + this.notifier + ",catchExceptions=" + this.catchExceptions + ",when=" + this.when;
33113 });
33114 Clazz_defineStatics (c$,
33115 "SWINGJS_INVOCATION_LOW", 1201,
33116 "INVOCATION_FIRST", 1200,
33117 "INVOCATION_DEFAULT", 1200,
33118 "INVOCATION_LAST", 1201);
33119 });
33120 Clazz_declarePackage ("java.awt.event");
33121 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ComponentEvent", ["java.awt.Component"], function () {
33122 c$ = Clazz_declareType (java.awt.event, "ComponentEvent", java.awt.AWTEvent);
33123 Clazz_defineMethod (c$, "getComponent", 
33124 function () {
33125 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
33126 });
33127 Clazz_overrideMethod (c$, "paramString", 
33128 function () {
33129 var typeStr;
33130 var b = (this.source != null ? (this.source).getBounds () : null);
33131 switch (this.id) {
33132 case 102:
33133 typeStr = "COMPONENT_SHOWN";
33134 break;
33135 case 103:
33136 typeStr = "COMPONENT_HIDDEN";
33137 break;
33138 case 100:
33139 typeStr = "COMPONENT_MOVED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33140 break;
33141 case 101:
33142 typeStr = "COMPONENT_RESIZED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33143 break;
33144 default:
33145 typeStr = "unknown type";
33146 }
33147 return typeStr;
33148 });
33149 Clazz_defineStatics (c$,
33150 "COMPONENT_FIRST", 100,
33151 "COMPONENT_LAST", 103,
33152 "COMPONENT_MOVED", 100,
33153 "COMPONENT_RESIZED", 101,
33154 "COMPONENT_SHOWN", 102,
33155 "COMPONENT_HIDDEN", 103);
33156 });
33157 Clazz_declarePackage ("java.awt.event");
33158 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.MouseEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Point", "$.Toolkit"], function () {
33159 c$ = Clazz_decorateAsClass (function () {
33160 this.x = 0;
33161 this.y = 0;
33162 this.xAbs = 0;
33163 this.yAbs = 0;
33164 this.clickCount = 0;
33165 this.button = 0;
33166 this.popupTrigger = false;
33167 Clazz_instantialize (this, arguments);
33168 }, java.awt.event, "MouseEvent", java.awt.event.InputEvent);
33169 Clazz_defineMethod (c$, "getLocationOnScreen", 
33170 function () {
33171 return  new java.awt.Point (this.xAbs, this.yAbs);
33172 });
33173 Clazz_defineMethod (c$, "getXOnScreen", 
33174 function () {
33175 return this.xAbs;
33176 });
33177 Clazz_defineMethod (c$, "getYOnScreen", 
33178 function () {
33179 return this.yAbs;
33180 });
33181 Clazz_makeConstructor (c$, 
33182 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, button) {
33183 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, button);
33184 var eventLocationOnScreen =  new java.awt.Point (0, 0);
33185 try {
33186 eventLocationOnScreen = source.getLocationOnScreen ();
33187 this.xAbs = eventLocationOnScreen.x + x;
33188 this.yAbs = eventLocationOnScreen.y + y;
33189 } catch (e) {
33190 if (Clazz_exceptionOf (e, java.awt.IllegalComponentStateException)) {
33191 this.xAbs = 0;
33192 this.yAbs = 0;
33193 } else {
33194 throw e;
33195 }
33196 }
33197 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N");
33198 Clazz_makeConstructor (c$, 
33199 function (source, id, when, modifiers, x, y, clickCount, popupTrigger) {
33200 this.construct (source, id, when, modifiers, x, y, clickCount, popupTrigger, 0);
33201 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B");
33202 Clazz_makeConstructor (c$, 
33203 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, button) {
33204 Clazz_superConstructor (this, java.awt.event.MouseEvent, [source, id, when, modifiers]);
33205 this.x = x;
33206 this.y = y;
33207 this.xAbs = xAbs;
33208 this.yAbs = yAbs;
33209 this.clickCount = clickCount;
33210 this.popupTrigger = popupTrigger;
33211 if (button < 0 || button > 3) {
33212 throw  new IllegalArgumentException ("Invalid button value");
33213 }this.button = button;
33214 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
33215 this.setNewModifiers ();
33216 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0 || button != 0)) {
33217 this.setOldModifiers ();
33218 }}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N");
33219 Clazz_defineMethod (c$, "getX", 
33220 function () {
33221 return this.x;
33222 });
33223 Clazz_defineMethod (c$, "getY", 
33224 function () {
33225 return this.y;
33226 });
33227 Clazz_defineMethod (c$, "getPoint", 
33228 function () {
33229 var x;
33230 var y;
33231 {
33232 x = this.x;
33233 y = this.y;
33234 }return  new java.awt.Point (x, y);
33235 });
33236 Clazz_defineMethod (c$, "translatePoint", 
33237 function (x, y) {
33238 this.x += x;
33239 this.y += y;
33240 }, "~N,~N");
33241 Clazz_defineMethod (c$, "getClickCount", 
33242 function () {
33243 return this.clickCount;
33244 });
33245 Clazz_defineMethod (c$, "getButton", 
33246 function () {
33247 return this.button;
33248 });
33249 Clazz_defineMethod (c$, "isPopupTrigger", 
33250 function () {
33251 return this.popupTrigger;
33252 });
33253 c$.getMouseModifiersText = Clazz_defineMethod (c$, "getMouseModifiersText", 
33254 function (modifiers) {
33255 var buf =  new StringBuilder ();
33256 if ((modifiers & 8) != 0) {
33257 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33258 buf.append ("+");
33259 }if ((modifiers & 4) != 0) {
33260 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33261 buf.append ("+");
33262 }if ((modifiers & 2) != 0) {
33263 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33264 buf.append ("+");
33265 }if ((modifiers & 1) != 0) {
33266 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33267 buf.append ("+");
33268 }if ((modifiers & 32) != 0) {
33269 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33270 buf.append ("+");
33271 }if ((modifiers & 16) != 0) {
33272 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33273 buf.append ("+");
33274 }if ((modifiers & 8) != 0) {
33275 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33276 buf.append ("+");
33277 }if ((modifiers & 4) != 0) {
33278 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33279 buf.append ("+");
33280 }if (buf.length () > 0) {
33281 buf.setLength (buf.length () - 1);
33282 }return buf.toString ();
33283 }, "~N");
33284 Clazz_overrideMethod (c$, "paramString", 
33285 function () {
33286 var str =  new StringBuilder (80);
33287 str.append (java.awt.event.MouseEvent.getIdString (this.id));
33288 str.append (",(" + this.x).append ("," + this.y).append ("," + this.when).append (")");
33289 str.append (",absolute(").append ("" + this.xAbs).append (",").append ("" + this.yAbs).append (")");
33290 str.append (",button=").append ("" + this.getButton ());
33291 if (this.getModifiers () != 0) {
33292 str.append (",modifiers=").append (java.awt.event.MouseEvent.getMouseModifiersText (this.modifiers));
33293 }if (this.getModifiersEx () != 0) {
33294 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
33295 }str.append (",clickCount=").append ("" + this.clickCount);
33296 return str.toString ();
33297 });
33298 c$.getIdString = Clazz_defineMethod (c$, "getIdString", 
33299 function (id) {
33300 switch (id) {
33301 case 501:
33302 return "MOUSE_PRESSED";
33303 case 502:
33304 return "MOUSE_RELEASED";
33305 case 500:
33306 return "MOUSE_CLICKED";
33307 case 504:
33308 return "MOUSE_ENTERED";
33309 case 505:
33310 return "MOUSE_EXITED";
33311 case 503:
33312 return "MOUSE_MOVED";
33313 case 506:
33314 return "MOUSE_DRAGGED";
33315 case 507:
33316 return "MOUSE_WHEEL";
33317 default:
33318 return "unknown type";
33319 }
33320 }, "~N");
33321 Clazz_defineMethod (c$, "setNewModifiers", 
33322  function () {
33323 if ((this.modifiers & 16) != 0) {
33324 this.modifiers |= 1024;
33325 }if ((this.modifiers & 8) != 0) {
33326 this.modifiers |= 2048;
33327 }if ((this.modifiers & 4) != 0) {
33328 this.modifiers |= 4096;
33329 }if (this.id == 501 || this.id == 502 || this.id == 500) {
33330 if ((this.modifiers & 16) != 0) {
33331 this.button = 1;
33332 this.modifiers &= -13;
33333 if (this.id != 501) {
33334 this.modifiers &= -1025;
33335 }} else if ((this.modifiers & 8) != 0) {
33336 this.button = 2;
33337 this.modifiers &= -21;
33338 if (this.id != 501) {
33339 this.modifiers &= -2049;
33340 }} else if ((this.modifiers & 4) != 0) {
33341 this.button = 3;
33342 this.modifiers &= -25;
33343 if (this.id != 501) {
33344 this.modifiers &= -4097;
33345 }}}if ((this.modifiers & 8) != 0) {
33346 this.modifiers |= 512;
33347 }if ((this.modifiers & 4) != 0) {
33348 this.modifiers |= 256;
33349 }if ((this.modifiers & 1) != 0) {
33350 this.modifiers |= 64;
33351 }if ((this.modifiers & 2) != 0) {
33352 this.modifiers |= 128;
33353 }if ((this.modifiers & 32) != 0) {
33354 this.modifiers |= 8192;
33355 }});
33356 Clazz_defineMethod (c$, "setOldModifiers", 
33357  function () {
33358 if (this.id == 501 || this.id == 502 || this.id == 500) {
33359 switch (this.button) {
33360 case 1:
33361 this.modifiers |= 16;
33362 break;
33363 case 2:
33364 this.modifiers |= 8;
33365 break;
33366 case 3:
33367 this.modifiers |= 4;
33368 break;
33369 }
33370 } else {
33371 if ((this.modifiers & 1024) != 0) {
33372 this.modifiers |= 16;
33373 }if ((this.modifiers & 2048) != 0) {
33374 this.modifiers |= 8;
33375 }if ((this.modifiers & 4096) != 0) {
33376 this.modifiers |= 4;
33377 }}if ((this.modifiers & 512) != 0) {
33378 this.modifiers |= 8;
33379 }if ((this.modifiers & 256) != 0) {
33380 this.modifiers |= 4;
33381 }if ((this.modifiers & 64) != 0) {
33382 this.modifiers |= 1;
33383 }if ((this.modifiers & 128) != 0) {
33384 this.modifiers |= 2;
33385 }if ((this.modifiers & 8192) != 0) {
33386 this.modifiers |= 32;
33387 }});
33388 Clazz_defineStatics (c$,
33389 "MOUSE_FIRST", 500,
33390 "MOUSE_LAST", 507,
33391 "MOUSE_CLICKED", 500,
33392 "MOUSE_PRESSED", 501,
33393 "MOUSE_RELEASED", 502,
33394 "MOUSE_MOVED", 503,
33395 "MOUSE_ENTERED", 504,
33396 "MOUSE_EXITED", 505,
33397 "MOUSE_DRAGGED", 506,
33398 "MOUSE_WHEEL", 507,
33399 "NOBUTTON", 0,
33400 "BUTTON1", 1,
33401 "BUTTON2", 2,
33402 "BUTTON3", 3);
33403 });
33404 Clazz_declarePackage ("java.awt.event");
33405 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.InputEvent", ["java.lang.StringBuilder", "java.awt.Toolkit"], function () {
33406 c$ = Clazz_decorateAsClass (function () {
33407 this.when = 0;
33408 this.modifiers = 0;
33409 this.canAccessSystemClipboard = false;
33410 Clazz_instantialize (this, arguments);
33411 }, java.awt.event, "InputEvent", java.awt.event.ComponentEvent);
33412 Clazz_makeConstructor (c$, 
33413 function (source, id, when, modifiers) {
33414 Clazz_superConstructor (this, java.awt.event.InputEvent, [source, id]);
33415 this.when = when;
33416 this.modifiers = modifiers;
33417 this.canAccessSystemClipboard = false;
33418 }, "java.awt.Component,~N,~N,~N");
33419 Clazz_defineMethod (c$, "isShiftDown", 
33420 function () {
33421 return (this.modifiers & 1) != 0;
33422 });
33423 Clazz_defineMethod (c$, "isControlDown", 
33424 function () {
33425 return (this.modifiers & 2) != 0;
33426 });
33427 Clazz_defineMethod (c$, "isMetaDown", 
33428 function () {
33429 return (this.modifiers & 4) != 0;
33430 });
33431 Clazz_defineMethod (c$, "isAltDown", 
33432 function () {
33433 return (this.modifiers & 8) != 0;
33434 });
33435 Clazz_defineMethod (c$, "isAltGraphDown", 
33436 function () {
33437 return (this.modifiers & 32) != 0;
33438 });
33439 Clazz_defineMethod (c$, "getWhen", 
33440 function () {
33441 return this.when;
33442 });
33443 Clazz_defineMethod (c$, "getModifiers", 
33444 function () {
33445 return this.modifiers & (-16321);
33446 });
33447 Clazz_defineMethod (c$, "getModifiersEx", 
33448 function () {
33449 return this.modifiers & -64;
33450 });
33451 Clazz_overrideMethod (c$, "consume", 
33452 function () {
33453 this.consumed = true;
33454 });
33455 Clazz_overrideMethod (c$, "isConsumed", 
33456 function () {
33457 return this.consumed;
33458 });
33459 c$.getModifiersExText = Clazz_defineMethod (c$, "getModifiersExText", 
33460 function (modifiers) {
33461 var buf =  new StringBuilder ();
33462 if ((modifiers & 256) != 0) {
33463 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33464 buf.append ("+");
33465 }if ((modifiers & 128) != 0) {
33466 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33467 buf.append ("+");
33468 }if ((modifiers & 512) != 0) {
33469 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33470 buf.append ("+");
33471 }if ((modifiers & 64) != 0) {
33472 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33473 buf.append ("+");
33474 }if ((modifiers & 8192) != 0) {
33475 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33476 buf.append ("+");
33477 }if ((modifiers & 1024) != 0) {
33478 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33479 buf.append ("+");
33480 }if ((modifiers & 2048) != 0) {
33481 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33482 buf.append ("+");
33483 }if ((modifiers & 4096) != 0) {
33484 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33485 buf.append ("+");
33486 }if (buf.length () > 0) {
33487 buf.setLength (buf.length () - 1);
33488 }return buf.toString ();
33489 }, "~N");
33490 Clazz_defineStatics (c$,
33491 "SHIFT_MASK", 1,
33492 "CTRL_MASK", 2,
33493 "META_MASK", 4,
33494 "ALT_MASK", 8,
33495 "ALT_GRAPH_MASK", 32,
33496 "BUTTON1_MASK", 16,
33497 "BUTTON2_MASK", 8,
33498 "BUTTON3_MASK", 4,
33499 "SHIFT_DOWN_MASK", 64,
33500 "CTRL_DOWN_MASK", 128,
33501 "META_DOWN_MASK", 256,
33502 "ALT_DOWN_MASK", 512,
33503 "BUTTON1_DOWN_MASK", 1024,
33504 "BUTTON2_DOWN_MASK", 2048,
33505 "BUTTON3_DOWN_MASK", 4096,
33506 "ALT_GRAPH_DOWN_MASK", 8192,
33507 "FIRST_HIGH_BIT", 16384,
33508 "JDK_1_3_MODIFIERS", 63,
33509 "HIGH_MODIFIERS", -16384);
33510 });
33511 Clazz_declarePackage ("java.awt");
33512 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 () {
33513 c$ = Clazz_decorateAsClass (function () {
33514 this.desktopProperties = null;
33515 this.desktopPropsSupport = null;
33516 this.calls = null;
33517 this.eventListener = null;
33518 this.listener2SelectiveListener = null;
33519 if (!Clazz_isClassDefined ("java.awt.Toolkit.SelectiveAWTEventListener")) {
33520 java.awt.Toolkit.$Toolkit$SelectiveAWTEventListener$ ();
33521 }
33522 Clazz_instantialize (this, arguments);
33523 }, java.awt, "Toolkit");
33524 Clazz_prepareFields (c$, function () {
33525 this.desktopProperties =  new java.util.HashMap ();
33526 this.desktopPropsSupport = java.awt.Toolkit.createPropertyChangeSupport (this);
33527 this.calls =  Clazz_newIntArray (32, 0);
33528 this.listener2SelectiveListener =  new java.util.HashMap ();
33529 });
33530 Clazz_defineMethod (c$, "createComponent", 
33531 function (target) {
33532 if (java.awt.Toolkit.lightweightMarker == null) {
33533 java.awt.Toolkit.lightweightMarker =  new jssun.awt.NullComponentPeer ();
33534 }return java.awt.Toolkit.lightweightMarker;
33535 }, "java.awt.Component");
33536 Clazz_defineMethod (c$, "loadSystemColors", 
33537 function (systemColors) {
33538 }, "~A");
33539 Clazz_defineMethod (c$, "setDynamicLayout", 
33540 function (dynamic) {
33541 }, "~B");
33542 Clazz_defineMethod (c$, "isDynamicLayoutSet", 
33543 function () {
33544 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33545 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutSet ();
33546 } else {
33547 return false;
33548 }});
33549 Clazz_defineMethod (c$, "isDynamicLayoutActive", 
33550 function () {
33551 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33552 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutActive ();
33553 } else {
33554 return false;
33555 }});
33556 Clazz_defineMethod (c$, "getScreenInsets", 
33557 function (gc) {
33558 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33559 return java.awt.Toolkit.getDefaultToolkit ().getScreenInsets (gc);
33560 } else {
33561 return  new java.awt.Insets (0, 0, 0, 0);
33562 }}, "java.awt.GraphicsConfiguration");
33563 c$.getDefaultToolkit = Clazz_defineMethod (c$, "getDefaultToolkit", 
33564 function () {
33565 return (java.awt.Toolkit.toolkit == null ? java.awt.Toolkit.toolkit =  new swingjs.JSToolkit () : java.awt.Toolkit.toolkit);
33566 });
33567 Clazz_defineMethod (c$, "createImage", 
33568 function (imagedata) {
33569 return this.createImage (imagedata, 0, imagedata.length);
33570 }, "~A");
33571 Clazz_defineMethod (c$, "getMenuShortcutKeyMask", 
33572 function () {
33573 return 2;
33574 });
33575 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
33576 function (c) {
33577 return null;
33578 }, "java.awt.Component");
33579 Clazz_defineMethod (c$, "createCustomCursor", 
33580 function (cursor, hotSpot, name) {
33581 return  new java.awt.Cursor (0);
33582 }, "java.awt.Image,java.awt.Point,~S");
33583 Clazz_defineMethod (c$, "isFrameStateSupported", 
33584 function (state) {
33585 return (state == 0);
33586 }, "~N");
33587 c$.getProperty = Clazz_defineMethod (c$, "getProperty", 
33588 function (key, defaultValue) {
33589 if (java.awt.Toolkit.resources != null) {
33590 try {
33591 return java.awt.Toolkit.resources.getString (key);
33592 } catch (e) {
33593 if (Clazz_exceptionOf (e, java.util.MissingResourceException)) {
33594 } else {
33595 throw e;
33596 }
33597 }
33598 }return defaultValue;
33599 }, "~S,~S");
33600 Clazz_defineMethod (c$, "getSystemEventQueue", 
33601 function () {
33602 return this.getSystemEventQueueImpl ();
33603 });
33604 c$.getEventQueue = Clazz_defineMethod (c$, "getEventQueue", 
33605 function () {
33606 return java.awt.Toolkit.getDefaultToolkit ().getSystemEventQueueImpl ();
33607 });
33608 Clazz_defineMethod (c$, "getDesktopProperty", 
33609 function (propertyName) {
33610 if (this.desktopProperties.isEmpty ()) {
33611 this.initializeDesktopProperties ();
33612 }var value;
33613 if (propertyName.equals ("awt.dynamicLayoutSupported")) {
33614 value = this.lazilyLoadDesktopProperty (propertyName);
33615 return value;
33616 }value = this.desktopProperties.get (propertyName);
33617 if (value == null) {
33618 value = this.lazilyLoadDesktopProperty (propertyName);
33619 if (value != null) {
33620 this.setDesktopProperty (propertyName, value);
33621 }}if (Clazz_instanceOf (value, java.awt.RenderingHints)) {
33622 value = (value).clone ();
33623 }return value;
33624 }, "~S");
33625 Clazz_defineMethod (c$, "setDesktopProperty", 
33626 function (name, newValue) {
33627 var oldValue;
33628 {
33629 oldValue = this.desktopProperties.get (name);
33630 this.desktopProperties.put (name, newValue);
33631 }this.desktopPropsSupport.firePropertyChange (name, oldValue, newValue);
33632 }, "~S,~O");
33633 Clazz_defineMethod (c$, "lazilyLoadDesktopProperty", 
33634 function (name) {
33635 return null;
33636 }, "~S");
33637 Clazz_defineMethod (c$, "initializeDesktopProperties", 
33638 function () {
33639 });
33640 Clazz_defineMethod (c$, "addPropertyChangeListener", 
33641 function (name, pcl) {
33642 this.desktopPropsSupport.addPropertyChangeListener (name, pcl);
33643 }, "~S,java.beans.PropertyChangeListener");
33644 Clazz_defineMethod (c$, "removePropertyChangeListener", 
33645 function (name, pcl) {
33646 this.desktopPropsSupport.removePropertyChangeListener (name, pcl);
33647 }, "~S,java.beans.PropertyChangeListener");
33648 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33649 function () {
33650 return this.desktopPropsSupport.getPropertyChangeListeners ();
33651 });
33652 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33653 function (propertyName) {
33654 return this.desktopPropsSupport.getPropertyChangeListeners (propertyName);
33655 }, "~S");
33656 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
33657 function () {
33658 return true;
33659 });
33660 c$.deProxyAWTEventListener = Clazz_defineMethod (c$, "deProxyAWTEventListener", 
33661  function (l) {
33662 var localL = l;
33663 if (localL == null) {
33664 return null;
33665 }if (Clazz_instanceOf (l, java.awt.event.AWTEventListenerProxy)) {
33666 localL = (l).getListener ();
33667 }return localL;
33668 }, "java.awt.event.AWTEventListener");
33669 Clazz_defineMethod (c$, "addAWTEventListener", 
33670 function (listener, eventMask) {
33671 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33672 if (localL == null) {
33673 return;
33674 }{
33675 var selectiveListener = this.listener2SelectiveListener.get (localL);
33676 if (selectiveListener == null) {
33677 selectiveListener = Clazz_innerTypeInstance (java.awt.Toolkit.SelectiveAWTEventListener, this, null, localL, eventMask);
33678 this.listener2SelectiveListener.put (localL, selectiveListener);
33679 this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.add (this.eventListener, selectiveListener);
33680 }selectiveListener.orEventMasks (eventMask);
33681 java.awt.Toolkit.enabledOnToolkitMask |= eventMask;
33682 var mask = eventMask;
33683 for (var i = 0; i < 32; i++) {
33684 if (mask == 0) {
33685 break;
33686 }if ((mask & 1) != 0) {
33687 this.calls[i]++;
33688 }mask >>>= 1;
33689 }
33690 }}, "java.awt.event.AWTEventListener,~N");
33691 Clazz_defineMethod (c$, "removeAWTEventListener", 
33692 function (listener) {
33693 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33694 if (listener == null) {
33695 return;
33696 }{
33697 var selectiveListener = this.listener2SelectiveListener.get (localL);
33698 if (selectiveListener != null) {
33699 this.listener2SelectiveListener.remove (localL);
33700 var listenerCalls = selectiveListener.getCalls ();
33701 for (var i = 0; i < 32; i++) {
33702 this.calls[i] -= listenerCalls[i];
33703 if (this.calls[i] == 0) {
33704 java.awt.Toolkit.enabledOnToolkitMask &= ~(1 << i);
33705 }}
33706 }this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.remove (this.eventListener, (selectiveListener == null) ? localL : selectiveListener);
33707 }}, "java.awt.event.AWTEventListener");
33708 c$.enabledOnToolkit = Clazz_defineMethod (c$, "enabledOnToolkit", 
33709 function (eventMask) {
33710 return (java.awt.Toolkit.enabledOnToolkitMask & eventMask) != 0;
33711 }, "~N");
33712 Clazz_defineMethod (c$, "countAWTEventListeners", 
33713 function (eventMask) {
33714 var ci = 0;
33715 for (; eventMask != 0; eventMask >>>= 1, ci++) {
33716 }
33717 ci--;
33718 return this.calls[ci];
33719 }, "~N");
33720 Clazz_defineMethod (c$, "getAWTEventListeners", 
33721 function () {
33722 {
33723 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33724 var ret =  new Array (la.length);
33725 for (var i = 0; i < la.length; i++) {
33726 var sael = la[i];
33727 var tempL = sael.getListener ();
33728 ret[i] =  new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), tempL);
33729 }
33730 return ret;
33731 }});
33732 Clazz_defineMethod (c$, "getAWTEventListeners", 
33733 function (eventMask) {
33734 {
33735 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33736 var list =  new java.util.ArrayList (la.length);
33737 for (var i = 0; i < la.length; i++) {
33738 var sael = la[i];
33739 if ((sael.getEventMask () & eventMask) == eventMask) {
33740 list.add ( new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), sael.getListener ()));
33741 }}
33742 return list.toArray ( new Array (0));
33743 }}, "~N");
33744 Clazz_defineMethod (c$, "notifyAWTEventListeners", 
33745 function (theEvent) {
33746 var eventListener = this.eventListener;
33747 if (eventListener != null) {
33748 eventListener.eventDispatched (theEvent);
33749 }}, "java.awt.AWTEvent");
33750 c$.createPropertyChangeSupport = Clazz_defineMethod (c$, "createPropertyChangeSupport", 
33751  function (toolkit) {
33752 return  new java.beans.PropertyChangeSupport (toolkit);
33753 }, "java.awt.Toolkit");
33754 c$.$Toolkit$SelectiveAWTEventListener$ = function () {
33755 Clazz_pu$h(self.c$);
33756 c$ = Clazz_decorateAsClass (function () {
33757 Clazz_prepareCallback (this, arguments);
33758 this.listener = null;
33759 this.eventMask = 0;
33760 this.calls = null;
33761 Clazz_instantialize (this, arguments);
33762 }, java.awt.Toolkit, "SelectiveAWTEventListener", null, java.awt.event.AWTEventListener);
33763 Clazz_prepareFields (c$, function () {
33764 this.calls =  Clazz_newIntArray (32, 0);
33765 });
33766 Clazz_defineMethod (c$, "getListener", 
33767 function () {
33768 return this.listener;
33769 });
33770 Clazz_defineMethod (c$, "getEventMask", 
33771 function () {
33772 return this.eventMask;
33773 });
33774 Clazz_defineMethod (c$, "getCalls", 
33775 function () {
33776 return this.calls;
33777 });
33778 Clazz_defineMethod (c$, "orEventMasks", 
33779 function (a) {
33780 this.eventMask |= a;
33781 for (var b = 0; b < 32; b++) {
33782 if (a == 0) {
33783 break;
33784 }if ((a & 1) != 0) {
33785 this.calls[b]++;
33786 }a >>>= 1;
33787 }
33788 }, "~N");
33789 Clazz_makeConstructor (c$, 
33790 function (a, b) {
33791 this.listener = a;
33792 this.eventMask = b;
33793 }, "java.awt.event.AWTEventListener,~N");
33794 Clazz_defineMethod (c$, "eventDispatched", 
33795 function (a) {
33796 var b = 0;
33797 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))) {
33798 var c = 0;
33799 for (var d = b; d != 0; d >>>= 1, c++) {
33800 }
33801 c--;
33802 for (var e = 0; e < this.calls[c]; e++) {
33803 this.listener.eventDispatched (a);
33804 }
33805 }}, "java.awt.AWTEvent");
33806 c$ = Clazz_p0p ();
33807 };
33808 Clazz_pu$h(self.c$);
33809 c$ = Clazz_declareType (java.awt.Toolkit, "ToolkitEventMulticaster", java.awt.AWTEventMulticaster, java.awt.event.AWTEventListener);
33810 c$.add = Clazz_defineMethod (c$, "add", 
33811 function (a, b) {
33812 if (a == null) return b;
33813 if (b == null) return a;
33814 return  new java.awt.Toolkit.ToolkitEventMulticaster (a, b);
33815 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33816 c$.remove = Clazz_defineMethod (c$, "remove", 
33817 function (a, b) {
33818 return java.awt.AWTEventMulticaster.removeInternal (a, b);
33819 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33820 Clazz_defineMethod (c$, "remove", 
33821 function (a) {
33822 if (a === this.a) return this.b;
33823 if (a === this.b) return this.a;
33824 var b = java.awt.AWTEventMulticaster.removeInternal (this.a, a);
33825 var c = java.awt.AWTEventMulticaster.removeInternal (this.b, a);
33826 if (b === this.a && c === this.b) {
33827 return this;
33828 }return java.awt.Toolkit.ToolkitEventMulticaster.add (b, c);
33829 }, "java.util.EventListener");
33830 Clazz_defineMethod (c$, "eventDispatched", 
33831 function (a) {
33832 (this.a).eventDispatched (a);
33833 (this.b).eventDispatched (a);
33834 }, "java.awt.AWTEvent");
33835 c$ = Clazz_p0p ();
33836 Clazz_defineStatics (c$,
33837 "lightweightMarker", null,
33838 "toolkit", null,
33839 "resources", null,
33840 "LONG_BITS", 32,
33841 "enabledOnToolkitMask", 0);
33842 });
33843 Clazz_declarePackage ("java.lang");
33844 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 () {
33845 c$ = Clazz_decorateAsClass (function () {
33846 this.name = null;
33847 this.priority = 5;
33848 this.daemon = false;
33849 this.target = null;
33850 this.group = null;
33851 this.tid = 0;
33852 this.threadStatus = 0;
33853 this.parkBlocker = null;
33854 this.stopBeforeStart = false;
33855 this.throwableFromStop = null;
33856 this.me = null;
33857 this.uncaughtExceptionHandler = null;
33858 this.$interrupted = false;
33859 this.stopped = false;
33860 Clazz_instantialize (this, arguments);
33861 }, java.lang, "Thread", null, Runnable);
33862 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
33863  function () {
33864 return java.lang.Thread.threadInitNumber++;
33865 });
33866 c$.nextThreadID = Clazz_defineMethod (c$, "nextThreadID", 
33867  function () {
33868 return ++java.lang.Thread.threadSeqNumber;
33869 });
33870 c$.currentThread = Clazz_defineMethod (c$, "currentThread", 
33871 function () {
33872 if (java.lang.Thread.thisThread == null) {
33873 java.lang.Thread.thisThread =  new java.lang.Thread ("master");
33874 java.lang.Thread.thisThread.setPriority (5);
33875 }return java.lang.Thread.thisThread;
33876 });
33877 c$.yield = Clazz_defineMethod (c$, "yield", 
33878 function () {
33879 });
33880 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33881 function (millis) {
33882 }, "~N");
33883 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33884 function (millis, nanos) {
33885 if (millis < 0) {
33886 throw  new IllegalArgumentException ("timeout value is negative");
33887 }if (nanos < 0 || nanos > 999999) {
33888 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
33889 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
33890 millis++;
33891 }java.lang.Thread.sleep (millis);
33892 }, "~N,~N");
33893 Clazz_defineMethod (c$, "init", 
33894  function (g, target, name, stackSize) {
33895 this.init (g, target, name, stackSize, null);
33896 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33897 Clazz_defineMethod (c$, "init", 
33898  function (g, target, name, stackSize, acc) {
33899 var parent = (java.lang.Thread.thisThread == null ? null : java.lang.Thread.thisThread);
33900 if (g == null) {
33901 if (g == null && parent != null) {
33902 g = parent.getThreadGroup ();
33903 }}if (g == null) {
33904 g = this.newThreadGroup (null, name);
33905 parent = this;
33906 }g.checkAccess ();
33907 g.addUnstarted ();
33908 this.group = g;
33909 this.priority = parent.getPriority ();
33910 this.name = name;
33911 this.target = target;
33912 this.setPriority (this.priority);
33913 this.tid = java.lang.Thread.nextThreadID ();
33914 this.me = this;
33915 }, "java.lang.ThreadGroup,Runnable,~S,~N,~O");
33916 Clazz_defineMethod (c$, "newThreadGroup", 
33917 function (group, name) {
33918 return  new java.lang.ThreadGroup (group, name);
33919 }, "java.lang.ThreadGroup,~S");
33920 Clazz_makeConstructor (c$, 
33921 function () {
33922 this.init (null, null, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33923 });
33924 Clazz_makeConstructor (c$, 
33925 function (target) {
33926 this.init (null, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33927 }, "Runnable");
33928 Clazz_makeConstructor (c$, 
33929 function (group, target) {
33930 this.init (group, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33931 }, "java.lang.ThreadGroup,Runnable");
33932 Clazz_makeConstructor (c$, 
33933 function (name) {
33934 this.init (null, null, name, 0);
33935 }, "~S");
33936 Clazz_makeConstructor (c$, 
33937 function (group, name) {
33938 this.init (group, null, name, 0);
33939 }, "java.lang.ThreadGroup,~S");
33940 Clazz_makeConstructor (c$, 
33941 function (target, name) {
33942 this.init (null, target, name, 0);
33943 }, "Runnable,~S");
33944 Clazz_makeConstructor (c$, 
33945 function (group, target, name) {
33946 this.init (group, target, name, 0);
33947 }, "java.lang.ThreadGroup,Runnable,~S");
33948 Clazz_makeConstructor (c$, 
33949 function (group, target, name, stackSize) {
33950 this.init (group, target, name, stackSize);
33951 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33952 Clazz_defineMethod (c$, "start", 
33953 function () {
33954 if (this.threadStatus != 0 || this !== this.me) throw  new IllegalThreadStateException ();
33955 this.group.add (this);
33956 this.start0 ();
33957 if (this.stopBeforeStart) {
33958 this.stop0 (this.throwableFromStop);
33959 }});
33960 Clazz_defineMethod (c$, "start0", 
33961  function () {
33962 });
33963 Clazz_defineMethod (c$, "run", 
33964 function () {
33965 if (this.target != null) {
33966 this.target.run ();
33967 }});
33968 Clazz_defineMethod (c$, "stop", 
33969 function () {
33970 if ((this.threadStatus != 0) && !this.isAlive ()) {
33971 return;
33972 }this.stop1 ( new ThreadDeath ());
33973 });
33974 Clazz_defineMethod (c$, "stop", 
33975 function (obj) {
33976 this.stop1 (obj);
33977 }, "Throwable");
33978 Clazz_defineMethod (c$, "stop1", 
33979  function (th) {
33980 if (this.threadStatus != 0) {
33981 this.resume ();
33982 this.stop0 (th);
33983 } else {
33984 if (th == null) {
33985 throw  new NullPointerException ();
33986 }this.stopBeforeStart = true;
33987 this.throwableFromStop = th;
33988 }}, "Throwable");
33989 Clazz_defineMethod (c$, "interrupt", 
33990 function () {
33991 this.interrupt0 ();
33992 });
33993 c$.interrupted = Clazz_defineMethod (c$, "interrupted", 
33994 function () {
33995 return java.lang.Thread.currentThread ().isInterruptedB (true);
33996 });
33997 Clazz_defineMethod (c$, "isInterrupted", 
33998 function () {
33999 return this.isInterruptedB (false);
34000 });
34001 Clazz_defineMethod (c$, "isInterruptedB", 
34002  function (clearInterrupted) {
34003 var wasInt = this.$interrupted;
34004 if (clearInterrupted) this.$interrupted = false;
34005 return wasInt;
34006 }, "~B");
34007 Clazz_defineMethod (c$, "destroy", 
34008 function () {
34009 throw  new NoSuchMethodError ();
34010 });
34011 Clazz_defineMethod (c$, "isAlive", 
34012 function () {
34013 return true;
34014 });
34015 Clazz_defineMethod (c$, "suspend", 
34016 function () {
34017 this.checkAccess ();
34018 this.suspend0 ();
34019 });
34020 Clazz_defineMethod (c$, "resume", 
34021 function () {
34022 this.checkAccess ();
34023 this.resume0 ();
34024 });
34025 Clazz_defineMethod (c$, "setPriority", 
34026 function (newPriority) {
34027 var g;
34028 this.checkAccess ();
34029 if (newPriority > 10 || newPriority < 1) {
34030 throw  new IllegalArgumentException ();
34031 }if ((g = this.getThreadGroup ()) != null) {
34032 if (newPriority > g.getMaxPriority ()) {
34033 newPriority = g.getMaxPriority ();
34034 }this.setPriority0 (this.priority = newPriority);
34035 }}, "~N");
34036 Clazz_defineMethod (c$, "getPriority", 
34037 function () {
34038 return this.priority;
34039 });
34040 Clazz_defineMethod (c$, "setName", 
34041 function (name) {
34042 this.checkAccess ();
34043 this.name = name;
34044 }, "~S");
34045 Clazz_defineMethod (c$, "getName", 
34046 function () {
34047 return this.name;
34048 });
34049 Clazz_defineMethod (c$, "getThreadGroup", 
34050 function () {
34051 return this.group;
34052 });
34053 c$.activeCount = Clazz_defineMethod (c$, "activeCount", 
34054 function () {
34055 return java.lang.Thread.currentThread ().getThreadGroup ().activeCount ();
34056 });
34057 c$.enumerate = Clazz_defineMethod (c$, "enumerate", 
34058 function (tarray) {
34059 return java.lang.Thread.currentThread ().getThreadGroup ().enumerate (tarray);
34060 }, "~A");
34061 Clazz_defineMethod (c$, "countStackFrames", 
34062 function () {
34063 return 0;
34064 });
34065 Clazz_defineMethod (c$, "join", 
34066 function (millis) {
34067 var base = System.currentTimeMillis ();
34068 var now = 0;
34069 if (millis < 0) {
34070 throw  new IllegalArgumentException ("timeout value is negative");
34071 }swingjs.JSToolkit.warn ("Cannot wait in Thread");
34072 if (millis == 0) {
34073 while (this.isAlive ()) {
34074 this.wait (0);
34075 }
34076 } else {
34077 while (this.isAlive ()) {
34078 var delay = millis - now;
34079 if (delay <= 0) {
34080 break;
34081 }this.wait (delay);
34082 now = System.currentTimeMillis () - base;
34083 }
34084 }}, "~N");
34085 Clazz_defineMethod (c$, "join", 
34086 function (millis, nanos) {
34087 if (millis < 0) {
34088 throw  new IllegalArgumentException ("timeout value is negative");
34089 }if (nanos < 0 || nanos > 999999) {
34090 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
34091 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
34092 millis++;
34093 }this.join (millis);
34094 }, "~N,~N");
34095 Clazz_defineMethod (c$, "join", 
34096 function () {
34097 this.join (0);
34098 });
34099 c$.dumpStack = Clazz_defineMethod (c$, "dumpStack", 
34100 function () {
34101  new Exception ("Stack trace").printStackTrace ();
34102 });
34103 Clazz_defineMethod (c$, "setDaemon", 
34104 function (on) {
34105 this.checkAccess ();
34106 if (this.isAlive ()) {
34107 throw  new IllegalThreadStateException ();
34108 }this.daemon = on;
34109 }, "~B");
34110 Clazz_defineMethod (c$, "isDaemon", 
34111 function () {
34112 return this.daemon;
34113 });
34114 Clazz_defineMethod (c$, "checkAccess", 
34115 function () {
34116 });
34117 Clazz_overrideMethod (c$, "toString", 
34118 function () {
34119 var group = this.getThreadGroup ();
34120 if (group != null) {
34121 return "Thread[" + this.getName () + "," + this.getPriority () + "," + group.getName () + "]";
34122 } else {
34123 return "Thread[" + this.getName () + "," + this.getPriority () + "," + "" + "]";
34124 }});
34125 Clazz_defineMethod (c$, "getContextClassLoader", 
34126 function () {
34127 return null;
34128 });
34129 Clazz_defineMethod (c$, "setContextClassLoader", 
34130 function (cl) {
34131 }, "ClassLoader");
34132 c$.holdsLock = Clazz_defineMethod (c$, "holdsLock", 
34133 function (obj) {
34134 return false;
34135 }, "~O");
34136 Clazz_defineMethod (c$, "getStackTrace", 
34137 function () {
34138 return ( new Exception ()).getStackTrace ();
34139 });
34140 c$.getAllStackTraces = Clazz_defineMethod (c$, "getAllStackTraces", 
34141 function () {
34142 var threads = java.lang.Thread.getThreads ();
34143 var traces = java.lang.Thread.dumpThreads (threads);
34144 var m =  new java.util.HashMap (threads.length);
34145 for (var i = 0; i < threads.length; i++) {
34146 var stackTrace = traces[i];
34147 if (stackTrace != null) {
34148 m.put (threads[i], stackTrace);
34149 }}
34150 return m;
34151 });
34152 c$.dumpThreads = Clazz_defineMethod (c$, "dumpThreads", 
34153  function (threads) {
34154 return null;
34155 }, "~A");
34156 c$.getThreads = Clazz_defineMethod (c$, "getThreads", 
34157  function () {
34158 return null;
34159 });
34160 Clazz_defineMethod (c$, "getId", 
34161 function () {
34162 return this.tid;
34163 });
34164 Clazz_defineMethod (c$, "getState", 
34165 function () {
34166 switch (this.threadStatus) {
34167 case 0:
34168 return java.lang.Thread.State.NEW;
34169 case 1:
34170 return java.lang.Thread.State.RUNNABLE;
34171 case 2:
34172 default:
34173 return java.lang.Thread.State.TERMINATED;
34174 case 3:
34175 return java.lang.Thread.State.TIMED_WAITING;
34176 case 4:
34177 return java.lang.Thread.State.WAITING;
34178 }
34179 });
34180 c$.setDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "setDefaultUncaughtExceptionHandler", 
34181 function (eh) {
34182 java.lang.Thread.defaultUncaughtExceptionHandler = eh;
34183 }, "java.lang.Thread.UncaughtExceptionHandler");
34184 c$.getDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "getDefaultUncaughtExceptionHandler", 
34185 function () {
34186 return java.lang.Thread.defaultUncaughtExceptionHandler;
34187 });
34188 Clazz_defineMethod (c$, "getUncaughtExceptionHandler", 
34189 function () {
34190 return this.uncaughtExceptionHandler != null ? this.uncaughtExceptionHandler : this.group;
34191 });
34192 Clazz_defineMethod (c$, "setUncaughtExceptionHandler", 
34193 function (eh) {
34194 this.checkAccess ();
34195 this.uncaughtExceptionHandler = eh;
34196 }, "java.lang.Thread.UncaughtExceptionHandler");
34197 Clazz_defineMethod (c$, "setPriority0", 
34198  function (newPriority) {
34199 }, "~N");
34200 Clazz_defineMethod (c$, "stop0", 
34201  function (o) {
34202 this.stopped = true;
34203 }, "~O");
34204 Clazz_defineMethod (c$, "suspend0", 
34205  function () {
34206 });
34207 Clazz_defineMethod (c$, "resume0", 
34208  function () {
34209 });
34210 Clazz_defineMethod (c$, "interrupt0", 
34211  function () {
34212 this.$interrupted = true;
34213 });
34214 Clazz_pu$h(self.c$);
34215 c$ = Clazz_declareType (java.lang.Thread, "State", Enum);
34216 Clazz_defineEnumConstant (c$, "NEW", 0, []);
34217 Clazz_defineEnumConstant (c$, "RUNNABLE", 1, []);
34218 Clazz_defineEnumConstant (c$, "BLOCKED", 2, []);
34219 Clazz_defineEnumConstant (c$, "WAITING", 3, []);
34220 Clazz_defineEnumConstant (c$, "TIMED_WAITING", 4, []);
34221 Clazz_defineEnumConstant (c$, "TERMINATED", 5, []);
34222 c$ = Clazz_p0p ();
34223 Clazz_declareInterface (java.lang.Thread, "UncaughtExceptionHandler");
34224 Clazz_defineStatics (c$,
34225 "threadInitNumber", 0,
34226 "threadSeqNumber", 0,
34227 "thisThread", null,
34228 "MIN_PRIORITY", 1,
34229 "NORM_PRIORITY", 5,
34230 "MAX_PRIORITY", 10,
34231 "defaultUncaughtExceptionHandler", null);
34232 });
34233 Clazz_declarePackage ("java.lang");
34234 Clazz_load (["java.lang.Thread"], "java.lang.ThreadGroup", ["java.lang.IllegalThreadStateException", "$.ThreadDeath", "java.util.Arrays"], function () {
34235 c$ = Clazz_decorateAsClass (function () {
34236 this.parent = null;
34237 this.name = null;
34238 this.maxPriority = 10;
34239 this.destroyed = false;
34240 this.daemon = false;
34241 this.vmAllowSuspension = false;
34242 this.nUnstartedThreads = 0;
34243 this.nthreads = 0;
34244 this.threads = null;
34245 this.ngroups = 0;
34246 this.groups = null;
34247 this.html5Applet = null;
34248 Clazz_instantialize (this, arguments);
34249 }, java.lang, "ThreadGroup", null, java.lang.Thread.UncaughtExceptionHandler);
34250 Clazz_makeConstructor (c$, 
34251 function (name) {
34252 this.construct (java.lang.Thread.currentThread ().getThreadGroup (), name);
34253 }, "~S");
34254 Clazz_makeConstructor (c$, 
34255 function (parent, name) {
34256 this.name = name;
34257 this.parent = parent;
34258 if (parent != null) {
34259 this.maxPriority = parent.maxPriority;
34260 this.daemon = parent.daemon;
34261 this.vmAllowSuspension = parent.vmAllowSuspension;
34262 parent.add (this);
34263 }}, "java.lang.ThreadGroup,~S");
34264 Clazz_defineMethod (c$, "getName", 
34265 function () {
34266 return this.name;
34267 });
34268 Clazz_defineMethod (c$, "getParent", 
34269 function () {
34270 if (this.parent != null) this.parent.checkAccess ();
34271 return this.parent;
34272 });
34273 Clazz_defineMethod (c$, "getMaxPriority", 
34274 function () {
34275 return this.maxPriority;
34276 });
34277 Clazz_defineMethod (c$, "isDaemon", 
34278 function () {
34279 return this.daemon;
34280 });
34281 Clazz_defineMethod (c$, "isDestroyed", 
34282 function () {
34283 return this.destroyed;
34284 });
34285 Clazz_defineMethod (c$, "setDaemon", 
34286 function (daemon) {
34287 this.checkAccess ();
34288 this.daemon = daemon;
34289 }, "~B");
34290 Clazz_defineMethod (c$, "setMaxPriority", 
34291 function (pri) {
34292 var ngroupsSnapshot;
34293 var groupsSnapshot;
34294 {
34295 this.checkAccess ();
34296 if (pri < 1 || pri > 10) {
34297 return;
34298 }this.maxPriority = (this.parent != null) ? Math.min (pri, this.parent.maxPriority) : pri;
34299 ngroupsSnapshot = this.ngroups;
34300 if (this.groups != null) {
34301 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34302 } else {
34303 groupsSnapshot = null;
34304 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34305 groupsSnapshot[i].setMaxPriority (pri);
34306 }
34307 }, "~N");
34308 Clazz_defineMethod (c$, "parentOf", 
34309 function (g) {
34310 for (; g != null; g = g.parent) {
34311 if (g === this) {
34312 return true;
34313 }}
34314 return false;
34315 }, "java.lang.ThreadGroup");
34316 Clazz_defineMethod (c$, "checkAccess", 
34317 function () {
34318 });
34319 Clazz_defineMethod (c$, "activeCount", 
34320 function () {
34321 var result;
34322 var ngroupsSnapshot;
34323 var groupsSnapshot;
34324 {
34325 if (this.destroyed) {
34326 return 0;
34327 }result = this.nthreads;
34328 ngroupsSnapshot = this.ngroups;
34329 if (this.groups != null) {
34330 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34331 } else {
34332 groupsSnapshot = null;
34333 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34334 result += groupsSnapshot[i].activeCount ();
34335 }
34336 return result;
34337 });
34338 Clazz_defineMethod (c$, "enumerate", 
34339 function (list) {
34340 this.checkAccess ();
34341 return this.enumerate (list, 0, true);
34342 }, "~A");
34343 Clazz_defineMethod (c$, "enumerate", 
34344 function (list, recurse) {
34345 this.checkAccess ();
34346 return this.enumerate (list, 0, recurse);
34347 }, "~A,~B");
34348 Clazz_defineMethod (c$, "enumerate", 
34349  function (list, n, recurse) {
34350 var ngroupsSnapshot = 0;
34351 var groupsSnapshot = null;
34352 {
34353 if (this.destroyed) {
34354 return 0;
34355 }var nt = this.nthreads;
34356 if (nt > list.length - n) {
34357 nt = list.length - n;
34358 }for (var i = 0; i < nt; i++) {
34359 if (this.threads[i].isAlive ()) {
34360 list[n++] = this.threads[i];
34361 }}
34362 if (recurse) {
34363 ngroupsSnapshot = this.ngroups;
34364 if (this.groups != null) {
34365 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34366 } else {
34367 groupsSnapshot = null;
34368 }}}if (recurse) {
34369 for (var i = 0; i < ngroupsSnapshot; i++) {
34370 n = groupsSnapshot[i].enumerate (list, n, true);
34371 }
34372 }return n;
34373 }, "~A,~N,~B");
34374 Clazz_defineMethod (c$, "activeGroupCount", 
34375 function () {
34376 var ngroupsSnapshot;
34377 var groupsSnapshot;
34378 {
34379 if (this.destroyed) {
34380 return 0;
34381 }ngroupsSnapshot = this.ngroups;
34382 if (this.groups != null) {
34383 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34384 } else {
34385 groupsSnapshot = null;
34386 }}var n = ngroupsSnapshot;
34387 for (var i = 0; i < ngroupsSnapshot; i++) {
34388 n += groupsSnapshot[i].activeGroupCount ();
34389 }
34390 return n;
34391 });
34392 Clazz_defineMethod (c$, "enumerate", 
34393 function (list) {
34394 this.checkAccess ();
34395 return this.enumerate (list, 0, true);
34396 }, "~A");
34397 Clazz_defineMethod (c$, "enumerate", 
34398 function (list, recurse) {
34399 this.checkAccess ();
34400 return this.enumerate (list, 0, recurse);
34401 }, "~A,~B");
34402 Clazz_defineMethod (c$, "enumerate", 
34403  function (list, n, recurse) {
34404 var ngroupsSnapshot = 0;
34405 var groupsSnapshot = null;
34406 {
34407 if (this.destroyed) {
34408 return 0;
34409 }var ng = this.ngroups;
34410 if (ng > list.length - n) {
34411 ng = list.length - n;
34412 }if (ng > 0) {
34413 System.arraycopy (this.groups, 0, list, n, ng);
34414 n += ng;
34415 }if (recurse) {
34416 ngroupsSnapshot = this.ngroups;
34417 if (this.groups != null) {
34418 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34419 } else {
34420 groupsSnapshot = null;
34421 }}}if (recurse) {
34422 for (var i = 0; i < ngroupsSnapshot; i++) {
34423 n = groupsSnapshot[i].enumerate (list, n, true);
34424 }
34425 }return n;
34426 }, "~A,~N,~B");
34427 Clazz_defineMethod (c$, "stop", 
34428 function () {
34429 if (this.stopOrSuspend (false)) java.lang.Thread.currentThread ().stop ();
34430 });
34431 Clazz_defineMethod (c$, "interrupt", 
34432 function () {
34433 var ngroupsSnapshot;
34434 var groupsSnapshot;
34435 {
34436 this.checkAccess ();
34437 for (var i = 0; i < this.nthreads; i++) {
34438 this.threads[i].interrupt ();
34439 }
34440 ngroupsSnapshot = this.ngroups;
34441 if (this.groups != null) {
34442 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34443 } else {
34444 groupsSnapshot = null;
34445 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34446 groupsSnapshot[i].interrupt ();
34447 }
34448 });
34449 Clazz_defineMethod (c$, "suspend", 
34450 function () {
34451 if (this.stopOrSuspend (true)) java.lang.Thread.currentThread ().suspend ();
34452 });
34453 Clazz_defineMethod (c$, "stopOrSuspend", 
34454  function (suspend) {
34455 var suicide = false;
34456 var us = java.lang.Thread.currentThread ();
34457 var ngroupsSnapshot;
34458 var groupsSnapshot = null;
34459 {
34460 this.checkAccess ();
34461 for (var i = 0; i < this.nthreads; i++) {
34462 if (this.threads[i] === us) suicide = true;
34463  else if (suspend) this.threads[i].suspend ();
34464  else this.threads[i].stop ();
34465 }
34466 ngroupsSnapshot = this.ngroups;
34467 if (this.groups != null) {
34468 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34469 }}for (var i = 0; i < ngroupsSnapshot; i++) suicide = groupsSnapshot[i].stopOrSuspend (suspend) || suicide;
34470
34471 return suicide;
34472 }, "~B");
34473 Clazz_defineMethod (c$, "resume", 
34474 function () {
34475 var ngroupsSnapshot;
34476 var groupsSnapshot;
34477 {
34478 this.checkAccess ();
34479 for (var i = 0; i < this.nthreads; i++) {
34480 this.threads[i].resume ();
34481 }
34482 ngroupsSnapshot = this.ngroups;
34483 if (this.groups != null) {
34484 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34485 } else {
34486 groupsSnapshot = null;
34487 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34488 groupsSnapshot[i].resume ();
34489 }
34490 });
34491 Clazz_defineMethod (c$, "destroy", 
34492 function () {
34493 var ngroupsSnapshot;
34494 var groupsSnapshot;
34495 {
34496 this.checkAccess ();
34497 if (this.destroyed || (this.nthreads > 0)) {
34498 throw  new IllegalThreadStateException ();
34499 }ngroupsSnapshot = this.ngroups;
34500 if (this.groups != null) {
34501 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34502 } else {
34503 groupsSnapshot = null;
34504 }if (this.parent != null) {
34505 this.destroyed = true;
34506 this.ngroups = 0;
34507 this.groups = null;
34508 this.nthreads = 0;
34509 this.threads = null;
34510 }}for (var i = 0; i < ngroupsSnapshot; i += 1) {
34511 groupsSnapshot[i].destroy ();
34512 }
34513 if (this.parent != null) {
34514 this.parent.remove (this);
34515 }});
34516 Clazz_defineMethod (c$, "add", 
34517  function (g) {
34518 {
34519 if (this.destroyed) {
34520 throw  new IllegalThreadStateException ();
34521 }if (this.groups == null) {
34522 this.groups =  new Array (4);
34523 } else if (this.ngroups == this.groups.length) {
34524 this.groups = java.util.Arrays.copyOf (this.groups, this.ngroups * 2);
34525 }this.groups[this.ngroups] = g;
34526 this.ngroups++;
34527 }}, "java.lang.ThreadGroup");
34528 Clazz_defineMethod (c$, "remove", 
34529  function (g) {
34530 {
34531 if (this.destroyed) {
34532 return;
34533 }for (var i = 0; i < this.ngroups; i++) {
34534 if (this.groups[i] === g) {
34535 this.ngroups -= 1;
34536 System.arraycopy (this.groups, i + 1, this.groups, i, this.ngroups - i);
34537 this.groups[this.ngroups] = null;
34538 break;
34539 }}
34540 if (this.nthreads == 0) {
34541 this.notifyAll ();
34542 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34543 this.destroy ();
34544 }}}, "java.lang.ThreadGroup");
34545 Clazz_defineMethod (c$, "addUnstarted", 
34546 function () {
34547 {
34548 if (this.destroyed) {
34549 throw  new IllegalThreadStateException ();
34550 }this.nUnstartedThreads++;
34551 }});
34552 Clazz_defineMethod (c$, "add", 
34553 function (t) {
34554 {
34555 if (this.destroyed) {
34556 throw  new IllegalThreadStateException ();
34557 }if (this.threads == null) {
34558 this.threads =  new Array (4);
34559 } else if (this.nthreads == this.threads.length) {
34560 this.threads = java.util.Arrays.copyOf (this.threads, this.nthreads * 2);
34561 }this.threads[this.nthreads] = t;
34562 this.nthreads++;
34563 this.nUnstartedThreads--;
34564 }}, "java.lang.Thread");
34565 Clazz_defineMethod (c$, "remove", 
34566 function (t) {
34567 {
34568 if (this.destroyed) {
34569 return;
34570 }for (var i = 0; i < this.nthreads; i++) {
34571 if (this.threads[i] === t) {
34572 System.arraycopy (this.threads, i + 1, this.threads, i, --this.nthreads - i);
34573 this.threads[this.nthreads] = null;
34574 break;
34575 }}
34576 if (this.nthreads == 0) {
34577 this.notifyAll ();
34578 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34579 this.destroy ();
34580 }}}, "java.lang.Thread");
34581 Clazz_defineMethod (c$, "uncaughtException", 
34582 function (t, e) {
34583 if (this.parent != null) {
34584 this.parent.uncaughtException (t, e);
34585 } else {
34586 var ueh = java.lang.Thread.getDefaultUncaughtExceptionHandler ();
34587 if (ueh != null) {
34588 ueh.uncaughtException (t, e);
34589 } else if (!(Clazz_instanceOf (e, ThreadDeath))) {
34590 System.err.print ("Exception in thread \"" + t.getName () + "\" ");
34591 e.printStackTrace (System.err);
34592 }}}, "java.lang.Thread,Throwable");
34593 Clazz_overrideMethod (c$, "toString", 
34594 function () {
34595 return this.getClass ().getName () + "[name=" + this.getName () + ",maxpri=" + this.maxPriority + ",html5Applet=" + this.html5Applet + "]";
34596 });
34597 });
34598 Clazz_declarePackage ("java.awt");
34599 Clazz_load (["java.awt.LayoutManager"], "java.awt.FlowLayout", ["java.awt.Dimension"], function () {
34600 c$ = Clazz_decorateAsClass (function () {
34601 this.align = 0;
34602 this.newAlign = 0;
34603 this.hgap = 0;
34604 this.vgap = 0;
34605 this.alignOnBaseline = false;
34606 Clazz_instantialize (this, arguments);
34607 }, java.awt, "FlowLayout", null, [java.awt.LayoutManager, java.io.Serializable]);
34608 Clazz_makeConstructor (c$, 
34609 function () {
34610 this.construct (1, 5, 5);
34611 });
34612 Clazz_makeConstructor (c$, 
34613 function (align) {
34614 this.construct (align, 5, 5);
34615 }, "~N");
34616 Clazz_makeConstructor (c$, 
34617 function (align, hgap, vgap) {
34618 this.hgap = hgap;
34619 this.vgap = vgap;
34620 this.setAlignment (align);
34621 }, "~N,~N,~N");
34622 Clazz_defineMethod (c$, "getAlignment", 
34623 function () {
34624 return this.newAlign;
34625 });
34626 Clazz_defineMethod (c$, "setAlignment", 
34627 function (align) {
34628 this.newAlign = align;
34629 switch (align) {
34630 case 3:
34631 this.align = 0;
34632 break;
34633 case 4:
34634 this.align = 2;
34635 break;
34636 default:
34637 this.align = align;
34638 break;
34639 }
34640 }, "~N");
34641 Clazz_defineMethod (c$, "getHgap", 
34642 function () {
34643 return this.hgap;
34644 });
34645 Clazz_defineMethod (c$, "setHgap", 
34646 function (hgap) {
34647 this.hgap = hgap;
34648 }, "~N");
34649 Clazz_defineMethod (c$, "getVgap", 
34650 function () {
34651 return this.vgap;
34652 });
34653 Clazz_defineMethod (c$, "setVgap", 
34654 function (vgap) {
34655 this.vgap = vgap;
34656 }, "~N");
34657 Clazz_defineMethod (c$, "setAlignOnBaseline", 
34658 function (alignOnBaseline) {
34659 this.alignOnBaseline = alignOnBaseline;
34660 }, "~B");
34661 Clazz_defineMethod (c$, "getAlignOnBaseline", 
34662 function () {
34663 return this.alignOnBaseline;
34664 });
34665 Clazz_overrideMethod (c$, "addLayoutComponent", 
34666 function (name, comp) {
34667 }, "~S,java.awt.Component");
34668 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34669 function (comp) {
34670 }, "java.awt.Component");
34671 Clazz_overrideMethod (c$, "preferredLayoutSize", 
34672 function (target) {
34673 {
34674 var dim =  new java.awt.Dimension (0, 0);
34675 var nmembers = target.getComponentCount ();
34676 var firstVisibleComponent = true;
34677 var useBaseline = this.getAlignOnBaseline ();
34678 var maxAscent = 0;
34679 var maxDescent = 0;
34680 for (var i = 0; i < nmembers; i++) {
34681 var m = target.getComponent (i);
34682 if (m.isVisible ()) {
34683 var d = m.getPreferredSize ();
34684 dim.height = Math.max (dim.height, d.height);
34685 if (firstVisibleComponent) {
34686 firstVisibleComponent = false;
34687 } else {
34688 dim.width += this.hgap;
34689 }dim.width += d.width;
34690 if (useBaseline) {
34691 var baseline = m.getBaseline (d.width, d.height);
34692 if (baseline >= 0) {
34693 maxAscent = Math.max (maxAscent, baseline);
34694 maxDescent = Math.max (maxDescent, d.height - baseline);
34695 }}}}
34696 if (useBaseline) {
34697 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34698 }var insets = target.getInsets ();
34699 dim.width += insets.left + insets.right + this.hgap * 2;
34700 dim.height += insets.top + insets.bottom + this.vgap * 2;
34701 return dim;
34702 }}, "java.awt.Container");
34703 Clazz_overrideMethod (c$, "minimumLayoutSize", 
34704 function (target) {
34705 {
34706 var useBaseline = this.getAlignOnBaseline ();
34707 var dim =  new java.awt.Dimension (0, 0);
34708 var nmembers = target.getComponentCount ();
34709 var maxAscent = 0;
34710 var maxDescent = 0;
34711 var firstVisibleComponent = true;
34712 for (var i = 0; i < nmembers; i++) {
34713 var m = target.getComponent (i);
34714 if (m.visible) {
34715 var d = m.getMinimumSize ();
34716 dim.height = Math.max (dim.height, d.height);
34717 if (firstVisibleComponent) {
34718 firstVisibleComponent = false;
34719 } else {
34720 dim.width += this.hgap;
34721 }dim.width += d.width;
34722 if (useBaseline) {
34723 var baseline = m.getBaseline (d.width, d.height);
34724 if (baseline >= 0) {
34725 maxAscent = Math.max (maxAscent, baseline);
34726 maxDescent = Math.max (maxDescent, dim.height - baseline);
34727 }}}}
34728 if (useBaseline) {
34729 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34730 }var insets = target.getInsets ();
34731 dim.width += insets.left + insets.right + this.hgap * 2;
34732 dim.height += insets.top + insets.bottom + this.vgap * 2;
34733 return dim;
34734 }}, "java.awt.Container");
34735 Clazz_defineMethod (c$, "moveComponents", 
34736  function (target, x, y, width, height, rowStart, rowEnd, ltr, useBaseline, ascent, descent) {
34737 switch (this.newAlign) {
34738 case 0:
34739 x += ltr ? 0 : width;
34740 break;
34741 case 1:
34742 x += Clazz_doubleToInt (width / 2);
34743 break;
34744 case 2:
34745 x += ltr ? width : 0;
34746 break;
34747 case 3:
34748 break;
34749 case 4:
34750 x += width;
34751 break;
34752 }
34753 var maxAscent = 0;
34754 var nonbaselineHeight = 0;
34755 var baselineOffset = 0;
34756 if (useBaseline) {
34757 var maxDescent = 0;
34758 for (var i = rowStart; i < rowEnd; i++) {
34759 var m = target.getComponent (i);
34760 if (m.visible) {
34761 if (ascent[i] >= 0) {
34762 maxAscent = Math.max (maxAscent, ascent[i]);
34763 maxDescent = Math.max (maxDescent, descent[i]);
34764 } else {
34765 nonbaselineHeight = Math.max (m.getHeight (), nonbaselineHeight);
34766 }}}
34767 height = Math.max (maxAscent + maxDescent, nonbaselineHeight);
34768 baselineOffset = Clazz_doubleToInt ((height - maxAscent - maxDescent) / 2);
34769 }for (var i = rowStart; i < rowEnd; i++) {
34770 var m = target.getComponent (i);
34771 if (m.isVisible ()) {
34772 var cy;
34773 if (useBaseline && ascent[i] >= 0) {
34774 cy = y + baselineOffset + maxAscent - ascent[i];
34775 } else {
34776 cy = y + Clazz_doubleToInt ((height - m.height) / 2);
34777 }if (ltr) {
34778 m.setLocation (x, cy);
34779 } else {
34780 m.setLocation (target.width - x - m.width, cy);
34781 }x += m.width + this.hgap;
34782 }}
34783 return height;
34784 }, "java.awt.Container,~N,~N,~N,~N,~N,~N,~B,~B,~A,~A");
34785 Clazz_overrideMethod (c$, "layoutContainer", 
34786 function (target) {
34787 System.out.println ("FlowLayout laying out " + target);
34788 {
34789 var insets = target.getInsets ();
34790 var maxwidth = target.width - (insets.left + insets.right + this.hgap * 2);
34791 var nmembers = target.getComponentCount ();
34792 var x = 0;
34793 var y = insets.top + this.vgap;
34794 var rowh = 0;
34795 var start = 0;
34796 var ltr = target.getComponentOrientation ().isLeftToRight ();
34797 var useBaseline = this.getAlignOnBaseline ();
34798 var ascent = null;
34799 var descent = null;
34800 if (useBaseline) {
34801 ascent =  Clazz_newIntArray (nmembers, 0);
34802 descent =  Clazz_newIntArray (nmembers, 0);
34803 }for (var i = 0; i < nmembers; i++) {
34804 var m = target.getComponent (i);
34805 if (m.isVisible ()) {
34806 var d = m.getPreferredSize ();
34807 m.setSize (d.width, d.height);
34808 if (useBaseline) {
34809 var baseline = m.getBaseline (d.width, d.height);
34810 if (baseline >= 0) {
34811 ascent[i] = baseline;
34812 descent[i] = d.height - baseline;
34813 } else {
34814 ascent[i] = -1;
34815 }}if ((x == 0) || ((x + d.width) <= maxwidth)) {
34816 if (x > 0) {
34817 x += this.hgap;
34818 }x += d.width;
34819 rowh = Math.max (rowh, d.height);
34820 } else {
34821 rowh = this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, i, ltr, useBaseline, ascent, descent);
34822 x = d.width;
34823 y += this.vgap + rowh;
34824 rowh = d.height;
34825 start = i;
34826 }}}
34827 this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, nmembers, ltr, useBaseline, ascent, descent);
34828 }}, "java.awt.Container");
34829 Clazz_overrideMethod (c$, "toString", 
34830 function () {
34831 var str = "";
34832 switch (this.align) {
34833 case 0:
34834 str = ",align=left";
34835 break;
34836 case 1:
34837 str = ",align=center";
34838 break;
34839 case 2:
34840 str = ",align=right";
34841 break;
34842 case 3:
34843 str = ",align=leading";
34844 break;
34845 case 4:
34846 str = ",align=trailing";
34847 break;
34848 }
34849 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + str + "]";
34850 });
34851 Clazz_defineStatics (c$,
34852 "LEFT", 0,
34853 "CENTER", 1,
34854 "RIGHT", 2,
34855 "LEADING", 3,
34856 "TRAILING", 4);
34857 });
34858 Clazz_declarePackage ("java.awt");
34859 Clazz_load (["java.awt.LayoutManager2"], "java.awt.BorderLayout", ["java.lang.IllegalArgumentException", "java.awt.Dimension"], function () {
34860 c$ = Clazz_decorateAsClass (function () {
34861 this.hgap = 0;
34862 this.vgap = 0;
34863 this.north = null;
34864 this.west = null;
34865 this.east = null;
34866 this.south = null;
34867 this.center = null;
34868 this.firstLine = null;
34869 this.lastLine = null;
34870 this.firstItem = null;
34871 this.lastItem = null;
34872 Clazz_instantialize (this, arguments);
34873 }, java.awt, "BorderLayout", null, [java.awt.LayoutManager2, java.io.Serializable]);
34874 Clazz_makeConstructor (c$, 
34875 function () {
34876 this.construct (0, 0);
34877 });
34878 Clazz_makeConstructor (c$, 
34879 function (hgap, vgap) {
34880 this.hgap = hgap;
34881 this.vgap = vgap;
34882 }, "~N,~N");
34883 Clazz_defineMethod (c$, "getHgap", 
34884 function () {
34885 return this.hgap;
34886 });
34887 Clazz_defineMethod (c$, "setHgap", 
34888 function (hgap) {
34889 this.hgap = hgap;
34890 }, "~N");
34891 Clazz_defineMethod (c$, "getVgap", 
34892 function () {
34893 return this.vgap;
34894 });
34895 Clazz_defineMethod (c$, "setVgap", 
34896 function (vgap) {
34897 this.vgap = vgap;
34898 }, "~N");
34899 Clazz_defineMethod (c$, "addLayoutComponent", 
34900 function (comp, constraints) {
34901 {
34902 if ((constraints == null) || (Clazz_instanceOf (constraints, String))) {
34903 this.addLayoutComponent (constraints, comp);
34904 } else {
34905 throw  new IllegalArgumentException ("cannot add to layout: constraint must be a string (or null)");
34906 }}}, "java.awt.Component,~O");
34907 Clazz_defineMethod (c$, "addLayoutComponent", 
34908 function (name, comp) {
34909 {
34910 if (name == null) {
34911 name = "Center";
34912 }System.out.println ("BorderLayout adding " + name + " " + comp);
34913 if ("Center".equals (name)) {
34914 this.center = comp;
34915 } else if ("North".equals (name)) {
34916 this.north = comp;
34917 } else if ("South".equals (name)) {
34918 this.south = comp;
34919 } else if ("East".equals (name)) {
34920 this.east = comp;
34921 } else if ("West".equals (name)) {
34922 this.west = comp;
34923 } else if ("First".equals (name)) {
34924 this.firstLine = comp;
34925 } else if ("Last".equals (name)) {
34926 this.lastLine = comp;
34927 } else if ("Before".equals (name)) {
34928 this.firstItem = comp;
34929 } else if ("After".equals (name)) {
34930 this.lastItem = comp;
34931 } else {
34932 throw  new IllegalArgumentException ("cannot add to layout: unknown constraint: " + name);
34933 }}}, "~S,java.awt.Component");
34934 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34935 function (comp) {
34936 {
34937 if (comp === this.center) {
34938 this.center = null;
34939 } else if (comp === this.north) {
34940 this.north = null;
34941 } else if (comp === this.south) {
34942 this.south = null;
34943 } else if (comp === this.east) {
34944 this.east = null;
34945 } else if (comp === this.west) {
34946 this.west = null;
34947 }if (comp === this.firstLine) {
34948 this.firstLine = null;
34949 } else if (comp === this.lastLine) {
34950 this.lastLine = null;
34951 } else if (comp === this.firstItem) {
34952 this.firstItem = null;
34953 } else if (comp === this.lastItem) {
34954 this.lastItem = null;
34955 }}}, "java.awt.Component");
34956 Clazz_defineMethod (c$, "getLayoutComponent", 
34957 function (constraints) {
34958 if ("Center".equals (constraints)) {
34959 return this.center;
34960 } else if ("North".equals (constraints)) {
34961 return this.north;
34962 } else if ("South".equals (constraints)) {
34963 return this.south;
34964 } else if ("West".equals (constraints)) {
34965 return this.west;
34966 } else if ("East".equals (constraints)) {
34967 return this.east;
34968 } else if ("First".equals (constraints)) {
34969 return this.firstLine;
34970 } else if ("Last".equals (constraints)) {
34971 return this.lastLine;
34972 } else if ("Before".equals (constraints)) {
34973 return this.firstItem;
34974 } else if ("After".equals (constraints)) {
34975 return this.lastItem;
34976 } else {
34977 throw  new IllegalArgumentException ("cannot get component: unknown constraint: " + constraints);
34978 }}, "~O");
34979 Clazz_defineMethod (c$, "getLayoutComponent", 
34980 function (target, constraints) {
34981 var ltr = target.getComponentOrientation ().isLeftToRight ();
34982 var result = null;
34983 if ("North".equals (constraints)) {
34984 result = (this.firstLine != null) ? this.firstLine : this.north;
34985 } else if ("South".equals (constraints)) {
34986 result = (this.lastLine != null) ? this.lastLine : this.south;
34987 } else if ("West".equals (constraints)) {
34988 result = ltr ? this.firstItem : this.lastItem;
34989 if (result == null) {
34990 result = this.west;
34991 }} else if ("East".equals (constraints)) {
34992 result = ltr ? this.lastItem : this.firstItem;
34993 if (result == null) {
34994 result = this.east;
34995 }} else if ("Center".equals (constraints)) {
34996 result = this.center;
34997 } else {
34998 throw  new IllegalArgumentException ("cannot get component: invalid constraint: " + constraints);
34999 }return result;
35000 }, "java.awt.Container,~O");
35001 Clazz_defineMethod (c$, "getConstraints", 
35002 function (comp) {
35003 if (comp == null) {
35004 return null;
35005 }if (comp === this.center) {
35006 return "Center";
35007 } else if (comp === this.north) {
35008 return "North";
35009 } else if (comp === this.south) {
35010 return "South";
35011 } else if (comp === this.west) {
35012 return "West";
35013 } else if (comp === this.east) {
35014 return "East";
35015 } else if (comp === this.firstLine) {
35016 return "First";
35017 } else if (comp === this.lastLine) {
35018 return "Last";
35019 } else if (comp === this.firstItem) {
35020 return "Before";
35021 } else if (comp === this.lastItem) {
35022 return "After";
35023 }return null;
35024 }, "java.awt.Component");
35025 Clazz_overrideMethod (c$, "minimumLayoutSize", 
35026 function (target) {
35027 {
35028 var dim =  new java.awt.Dimension (0, 0);
35029 var ltr = target.getComponentOrientation ().isLeftToRight ();
35030 var c = null;
35031 if ((c = this.getChild ("East", ltr)) != null) {
35032 var d = c.getMinimumSize ();
35033 dim.width += d.width + this.hgap;
35034 dim.height = Math.max (d.height, dim.height);
35035 }if ((c = this.getChild ("West", ltr)) != null) {
35036 var d = c.getMinimumSize ();
35037 dim.width += d.width + this.hgap;
35038 dim.height = Math.max (d.height, dim.height);
35039 }if ((c = this.getChild ("Center", ltr)) != null) {
35040 var d = c.getMinimumSize ();
35041 dim.width += d.width;
35042 dim.height = Math.max (d.height, dim.height);
35043 }if ((c = this.getChild ("North", ltr)) != null) {
35044 var d = c.getMinimumSize ();
35045 dim.width = Math.max (d.width, dim.width);
35046 dim.height += d.height + this.vgap;
35047 }if ((c = this.getChild ("South", ltr)) != null) {
35048 var d = c.getMinimumSize ();
35049 dim.width = Math.max (d.width, dim.width);
35050 dim.height += d.height + this.vgap;
35051 }var insets = target.getInsets ();
35052 dim.width += insets.left + insets.right;
35053 dim.height += insets.top + insets.bottom;
35054 return dim;
35055 }}, "java.awt.Container");
35056 Clazz_overrideMethod (c$, "preferredLayoutSize", 
35057 function (target) {
35058 {
35059 var dim =  new java.awt.Dimension (0, 0);
35060 var ltr = target.getComponentOrientation ().isLeftToRight ();
35061 var c = null;
35062 if ((c = this.getChild ("East", ltr)) != null) {
35063 var d = c.getPreferredSize ();
35064 dim.width += d.width + this.hgap;
35065 dim.height = Math.max (d.height, dim.height);
35066 }if ((c = this.getChild ("West", ltr)) != null) {
35067 var d = c.getPreferredSize ();
35068 dim.width += d.width + this.hgap;
35069 dim.height = Math.max (d.height, dim.height);
35070 }if ((c = this.getChild ("Center", ltr)) != null) {
35071 var d = c.getPreferredSize ();
35072 dim.width += d.width;
35073 dim.height = Math.max (d.height, dim.height);
35074 }if ((c = this.getChild ("North", ltr)) != null) {
35075 var d = c.getPreferredSize ();
35076 dim.width = Math.max (d.width, dim.width);
35077 dim.height += d.height + this.vgap;
35078 }if ((c = this.getChild ("South", ltr)) != null) {
35079 var d = c.getPreferredSize ();
35080 dim.width = Math.max (d.width, dim.width);
35081 dim.height += d.height + this.vgap;
35082 }var insets = target.getInsets ();
35083 dim.width += insets.left + insets.right;
35084 dim.height += insets.top + insets.bottom;
35085 return dim;
35086 }}, "java.awt.Container");
35087 Clazz_overrideMethod (c$, "maximumLayoutSize", 
35088 function (target) {
35089 return  new java.awt.Dimension (2147483647, 2147483647);
35090 }, "java.awt.Container");
35091 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
35092 function (parent) {
35093 return 0.5;
35094 }, "java.awt.Container");
35095 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
35096 function (parent) {
35097 return 0.5;
35098 }, "java.awt.Container");
35099 Clazz_overrideMethod (c$, "invalidateLayout", 
35100 function (target) {
35101 }, "java.awt.Container");
35102 Clazz_overrideMethod (c$, "layoutContainer", 
35103 function (target) {
35104 System.out.println ("BorderLayout laying out " + target);
35105 {
35106 var insets = target.getInsets ();
35107 var top = insets.top;
35108 var bottom = target.height - insets.bottom;
35109 var left = insets.left;
35110 var right = target.width - insets.right;
35111 var ltr = target.getComponentOrientation ().isLeftToRight ();
35112 var c = null;
35113 if ((c = this.getChild ("North", ltr)) != null) {
35114 c.setSize (right - left, c.height);
35115 var d = c.getPreferredSize ();
35116 c.setBounds (left, top, right - left, d.height);
35117 top += d.height + this.vgap;
35118 }if ((c = this.getChild ("South", ltr)) != null) {
35119 c.setSize (right - left, c.height);
35120 var d = c.getPreferredSize ();
35121 c.setBounds (left, bottom - d.height, right - left, d.height);
35122 bottom -= d.height + this.vgap;
35123 }if ((c = this.getChild ("East", ltr)) != null) {
35124 c.setSize (c.width, bottom - top);
35125 var d = c.getPreferredSize ();
35126 c.setBounds (right - d.width, top, d.width, bottom - top);
35127 right -= d.width + this.hgap;
35128 }if ((c = this.getChild ("West", ltr)) != null) {
35129 c.setSize (c.width, bottom - top);
35130 var d = c.getPreferredSize ();
35131 c.setBounds (left, top, d.width, bottom - top);
35132 left += d.width + this.hgap;
35133 }if ((c = this.getChild ("Center", ltr)) != null) {
35134 c.setBounds (left, top, right - left, bottom - top);
35135 }}}, "java.awt.Container");
35136 Clazz_defineMethod (c$, "getChild", 
35137  function (key, ltr) {
35138 var result = null;
35139 if (key === "North") {
35140 result = (this.firstLine != null) ? this.firstLine : this.north;
35141 } else if (key === "South") {
35142 result = (this.lastLine != null) ? this.lastLine : this.south;
35143 } else if (key === "West") {
35144 result = ltr ? this.firstItem : this.lastItem;
35145 if (result == null) {
35146 result = this.west;
35147 }} else if (key === "East") {
35148 result = ltr ? this.lastItem : this.firstItem;
35149 if (result == null) {
35150 result = this.east;
35151 }} else if (key === "Center") {
35152 result = this.center;
35153 }if (result != null && !result.visible) {
35154 result = null;
35155 }return result;
35156 }, "~S,~B");
35157 Clazz_overrideMethod (c$, "toString", 
35158 function () {
35159 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + "]";
35160 });
35161 Clazz_defineStatics (c$,
35162 "NORTH", "North",
35163 "SOUTH", "South",
35164 "EAST", "East",
35165 "WEST", "West",
35166 "CENTER", "Center",
35167 "BEFORE_FIRST_LINE", "First",
35168 "AFTER_LAST_LINE", "Last",
35169 "BEFORE_LINE_BEGINS", "Before",
35170 "AFTER_LINE_ENDS", "After");
35171 c$.PAGE_START = c$.prototype.PAGE_START = "First";
35172 c$.PAGE_END = c$.prototype.PAGE_END = "Last";
35173 c$.LINE_START = c$.prototype.LINE_START = "Before";
35174 c$.LINE_END = c$.prototype.LINE_END = "After";
35175 });
35176 Clazz_declarePackage ("java.awt");
35177 Clazz_load (["java.awt.LayoutManager"], "java.awt.LayoutManager2", null, function () {
35178 Clazz_declareInterface (java.awt, "LayoutManager2", java.awt.LayoutManager);
35179 });
35180 Clazz_declarePackage ("java.awt");
35181 Clazz_declareInterface (java.awt, "LayoutManager");
35182 Clazz_declarePackage ("java.awt");
35183 Clazz_load (["jssun.awt.SunGraphicsCallback"], "java.awt.GraphicsCallback", null, function () {
35184 c$ = Clazz_declareType (java.awt, "GraphicsCallback", jssun.awt.SunGraphicsCallback);
35185 Clazz_pu$h(self.c$);
35186 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintCallback", java.awt.GraphicsCallback);
35187 Clazz_makeConstructor (c$, 
35188  function () {
35189 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintCallback, []);
35190 });
35191 Clazz_overrideMethod (c$, "run", 
35192 function (a, b) {
35193 a.paint (b);
35194 }, "java.awt.Component,java.awt.Graphics");
35195 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35196 function () {
35197 return java.awt.GraphicsCallback.PaintCallback.instance;
35198 });
35199 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintCallback ();
35200 c$ = Clazz_p0p ();
35201 Clazz_pu$h(self.c$);
35202 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintAllCallback", java.awt.GraphicsCallback);
35203 Clazz_makeConstructor (c$, 
35204  function () {
35205 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintAllCallback, []);
35206 });
35207 Clazz_overrideMethod (c$, "run", 
35208 function (a, b) {
35209 a.paintAll (b);
35210 }, "java.awt.Component,java.awt.Graphics");
35211 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35212 function () {
35213 return java.awt.GraphicsCallback.PaintAllCallback.instance;
35214 });
35215 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintAllCallback ();
35216 c$ = Clazz_p0p ();
35217 Clazz_pu$h(self.c$);
35218 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintHeavyweightComponentsCallback", java.awt.GraphicsCallback);
35219 Clazz_makeConstructor (c$, 
35220  function () {
35221 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback, []);
35222 });
35223 Clazz_overrideMethod (c$, "run", 
35224 function (a, b) {
35225 if (a.isLightweight ()) {
35226 a.paintHeavyweightComponents (b);
35227 } else {
35228 a.paintAll (b);
35229 }}, "java.awt.Component,java.awt.Graphics");
35230 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35231 function () {
35232 return java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.instance;
35233 });
35234 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback ();
35235 c$ = Clazz_p0p ();
35236 });
35237 Clazz_declarePackage ("java.awt");
35238 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 () {
35239 c$ = Clazz_decorateAsClass (function () {
35240 this.component = null;
35241 this.layoutMgr = null;
35242 this.dispatcher = null;
35243 this.focusCycleRoot = false;
35244 this.focusTraversalPolicyProvider = false;
35245 this.containerListener = null;
35246 this.listeningChildren = 0;
35247 this.listeningBoundsChildren = 0;
35248 this.descendantsCount = 0;
35249 this.preserveBackgroundColor = null;
35250 this.numOfHWComponents = 0;
35251 this.numOfLWComponents = 0;
35252 this.modalComp = null;
35253 this.modalAppContext = null;
35254 Clazz_instantialize (this, arguments);
35255 }, java.awt, "Container", java.awt.Component);
35256 Clazz_makeConstructor (c$, 
35257 function () {
35258 Clazz_superConstructor (this, java.awt.Container, []);
35259 this.component =  new java.util.ArrayList ();
35260 });
35261 Clazz_defineMethod (c$, "initializeFocusTraversalKeys", 
35262 function () {
35263 });
35264 Clazz_defineMethod (c$, "getComponentCount", 
35265 function () {
35266 return this.countComponents ();
35267 });
35268 Clazz_defineMethod (c$, "countComponents", 
35269 function () {
35270 return this.component.size ();
35271 });
35272 Clazz_defineMethod (c$, "getComponent", 
35273 function (n) {
35274 if ((n < 0) || (n >= this.component.size ())) {
35275 throw  new ArrayIndexOutOfBoundsException ("No such child: " + n);
35276 }return this.component.get (n);
35277 }, "~N");
35278 Clazz_defineMethod (c$, "getComponents", 
35279 function () {
35280 return this.getComponents_NoClientCode ();
35281 });
35282 Clazz_defineMethod (c$, "getComponents_NoClientCode", 
35283 function () {
35284 return this.component.toArray (java.awt.Container.EMPTY_ARRAY);
35285 });
35286 Clazz_defineMethod (c$, "getInsets", 
35287 function () {
35288 var peer = this.peer;
35289 if (Clazz_instanceOf (peer, java.awt.peer.ContainerPeer)) {
35290 var cpeer = peer;
35291 return cpeer.getInsets ().clone ();
35292 }return  new java.awt.Insets (0, 0, 0, 0);
35293 });
35294 Clazz_defineMethod (c$, "add", 
35295 function (comp) {
35296 return this.addImpl (comp, null, -1);
35297 }, "java.awt.Component");
35298 Clazz_defineMethod (c$, "add", 
35299 function (name, comp) {
35300 return this.addImpl (comp, name, -1);
35301 }, "~S,java.awt.Component");
35302 Clazz_defineMethod (c$, "add", 
35303 function (comp, index) {
35304 return this.addImpl (comp, null, index);
35305 }, "java.awt.Component,~N");
35306 Clazz_defineMethod (c$, "checkAddToSelf", 
35307  function (comp) {
35308 if (Clazz_instanceOf (comp, java.awt.Container)) {
35309 for (var cn = this; cn != null; cn = cn.parent) {
35310 if (cn === comp) {
35311 throw  new IllegalArgumentException ("adding container's parent to itself");
35312 }}
35313 }}, "java.awt.Component");
35314 Clazz_defineMethod (c$, "checkNotAWindow", 
35315  function (comp) {
35316 if (Clazz_instanceOf (comp, java.awt.Window)) {
35317 throw  new IllegalArgumentException ("adding a window to a container");
35318 }}, "java.awt.Component");
35319 Clazz_defineMethod (c$, "removeDelicately", 
35320  function (comp, newParent, newIndex) {
35321 var index = this.getComponentZOrder (comp);
35322 var needRemoveNotify = java.awt.Container.isRemoveNotifyNeeded (comp, this, newParent);
35323 if (needRemoveNotify) {
35324 comp.removeNotify ();
35325 }if (newParent !== this) {
35326 if (this.layoutMgr != null) {
35327 this.layoutMgr.removeLayoutComponent (comp);
35328 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35329 this.adjustListeningChildren (65536, -comp.numListening (65536));
35330 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35331 comp.parent = null;
35332 this.component.remove (index);
35333 this.invalidateIfValid ();
35334 } else {
35335 this.component.remove (index);
35336 this.component.add (newIndex, comp);
35337 }if (comp.parent == null) {
35338 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35339 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35340 this.dispatchEvent (e);
35341 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35342 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35343 this.updateCursorImmediately ();
35344 }}return needRemoveNotify;
35345 }, "java.awt.Component,java.awt.Container,~N");
35346 Clazz_defineMethod (c$, "canContainFocusOwner", 
35347 function (focusOwnerCandidate) {
35348 if (!(this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ())) {
35349 return false;
35350 }{
35351 if (this.parent != null) {
35352 return this.parent.canContainFocusOwner (focusOwnerCandidate);
35353 }}return true;
35354 }, "java.awt.Component");
35355 Clazz_defineMethod (c$, "hasHeavyweightDescendants", 
35356 function () {
35357 return this.numOfHWComponents > 0;
35358 });
35359 Clazz_defineMethod (c$, "hasLightweightDescendants", 
35360 function () {
35361 return this.numOfLWComponents > 0;
35362 });
35363 Clazz_defineMethod (c$, "getHeavyweightContainer", 
35364 function () {
35365 if (this.peer != null && !(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35366 return this;
35367 } else {
35368 return this.getNativeContainer ();
35369 }});
35370 c$.isRemoveNotifyNeeded = Clazz_defineMethod (c$, "isRemoveNotifyNeeded", 
35371  function (comp, oldContainer, newContainer) {
35372 return false;
35373 }, "java.awt.Component,java.awt.Container,java.awt.Container");
35374 Clazz_defineMethod (c$, "setComponentZOrder", 
35375 function (comp, index) {
35376 {
35377 var curParent = comp.parent;
35378 var oldZindex = this.getComponentZOrder (comp);
35379 if (curParent === this && index == oldZindex) {
35380 return;
35381 }var peerRecreated = (curParent != null) ? curParent.removeDelicately (comp, this, index) : false;
35382 this.addDelicately (comp, curParent, index);
35383 if (!peerRecreated && oldZindex != -1) {
35384 comp.mixOnZOrderChanging (oldZindex, index);
35385 }}}, "java.awt.Component,~N");
35386 Clazz_defineMethod (c$, "reparentTraverse", 
35387  function (parentPeer, child) {
35388 this.checkTreeLock ();
35389 for (var i = 0; i < child.getComponentCount (); i++) {
35390 var comp = child.getComponent (i);
35391 if (comp.isLightweight ()) {
35392 if (Clazz_instanceOf (comp, java.awt.Container)) {
35393 this.reparentTraverse (parentPeer, comp);
35394 }} else {
35395 comp.getPeer ().reparent (parentPeer);
35396 }}
35397 }, "java.awt.peer.ContainerPeer,java.awt.Container");
35398 Clazz_defineMethod (c$, "reparentChild", 
35399  function (comp) {
35400 if (comp == null) {
35401 return;
35402 }if (comp.isLightweight ()) {
35403 if (Clazz_instanceOf (comp, java.awt.Container)) {
35404 this.reparentTraverse (this.getPeer (), comp);
35405 }} else {
35406 comp.getPeer ().reparent (this.getPeer ());
35407 }}, "java.awt.Component");
35408 Clazz_defineMethod (c$, "addDelicately", 
35409  function (comp, curParent, index) {
35410 this.checkTreeLock ();
35411 if (curParent !== this) {
35412 if (index == -1) {
35413 this.component.add (comp);
35414 } else {
35415 this.component.add (index, comp);
35416 }comp.parent = this;
35417 this.adjustListeningChildren (32768, comp.numListening (32768));
35418 this.adjustListeningChildren (65536, comp.numListening (65536));
35419 this.adjustDescendants (comp.countHierarchyMembers ());
35420 } else {
35421 if (index < this.component.size ()) {
35422 this.component.set (index, comp);
35423 }}this.invalidateIfValid ();
35424 if (this.peer != null) {
35425 if (comp.peer == null) {
35426 comp.addNotify ();
35427 } else {
35428 var newNativeContainer = this.getHeavyweightContainer ();
35429 var oldNativeContainer = curParent.getHeavyweightContainer ();
35430 if (oldNativeContainer !== newNativeContainer) {
35431 newNativeContainer.reparentChild (comp);
35432 }if (!comp.isLightweight () && this.isLightweight ()) {
35433 comp.relocateComponent ();
35434 }}}if (curParent !== this) {
35435 if (this.layoutMgr != null) {
35436 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35437 (this.layoutMgr).addLayoutComponent (comp, null);
35438 } else {
35439 this.layoutMgr.addLayoutComponent (null, comp);
35440 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35441 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35442 this.dispatchEvent (e);
35443 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35444 } else {
35445 comp.createHierarchyEvents (1400, comp, this, 1400, java.awt.Toolkit.enabledOnToolkit (32768));
35446 }if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35447 this.updateCursorImmediately ();
35448 }}, "java.awt.Component,java.awt.Container,~N");
35449 Clazz_defineMethod (c$, "checkTreeLock", 
35450  function () {
35451 });
35452 Clazz_defineMethod (c$, "getComponentZOrder", 
35453 function (comp) {
35454 if (comp == null) {
35455 return -1;
35456 }{
35457 if (comp.parent !== this) {
35458 return -1;
35459 }return this.component.indexOf (comp);
35460 }}, "java.awt.Component");
35461 Clazz_defineMethod (c$, "add", 
35462 function (comp, constraints) {
35463 this.addImpl (comp, constraints, -1);
35464 }, "java.awt.Component,~O");
35465 Clazz_defineMethod (c$, "add", 
35466 function (comp, constraints, index) {
35467 return this.addImpl (comp, constraints, index);
35468 }, "java.awt.Component,~O,~N");
35469 Clazz_defineMethod (c$, "addImpl", 
35470 function (comp, constraints, index) {
35471 return this.addImplSAEM (comp, constraints, index);
35472 }, "java.awt.Component,~O,~N");
35473 Clazz_defineMethod (c$, "addImplSAEM", 
35474 function (comp, constraints, index) {
35475 {
35476 if (index > this.component.size () || (index < 0 && index != -1)) {
35477 throw  new IllegalArgumentException ("illegal component position");
35478 }this.checkAddToSelf (comp);
35479 this.checkNotAWindow (comp);
35480 if (comp.parent != null) {
35481 comp.parent.remove (comp);
35482 if (index > this.component.size ()) {
35483 throw  new IllegalArgumentException ("illegal component position");
35484 }}if (index == -1) {
35485 this.component.add (comp);
35486 } else {
35487 this.component.add (index, comp);
35488 }comp.parent = this;
35489 this.adjustListeningChildren (32768, comp.numListening (32768));
35490 this.adjustListeningChildren (65536, comp.numListening (65536));
35491 this.adjustDescendants (comp.countHierarchyMembers ());
35492 this.invalidateIfValid ();
35493 if (this.peer != null) {
35494 comp.addNotify ();
35495 }if (this.layoutMgr != null) {
35496 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35497 (this.layoutMgr).addLayoutComponent (comp, constraints);
35498 } else if (Clazz_instanceOf (constraints, String)) {
35499 this.layoutMgr.addLayoutComponent (constraints, comp);
35500 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35501 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35502 this.dispatchEvent (e);
35503 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35504 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35505 this.updateCursorImmediately ();
35506 }}return comp;
35507 }, "java.awt.Component,~O,~N");
35508 Clazz_defineMethod (c$, "checkGD", 
35509 function (stringID) {
35510 }, "~S");
35511 Clazz_defineMethod (c$, "remove", 
35512 function (index) {
35513 this.removeInt (index);
35514 }, "~N");
35515 Clazz_defineMethod (c$, "removeInt", 
35516 function (index) {
35517 {
35518 if (index < 0 || index >= this.component.size ()) {
35519 throw  new ArrayIndexOutOfBoundsException (index);
35520 }var comp = this.component.get (index);
35521 if (this.peer != null) {
35522 comp.removeNotify ();
35523 }if (this.layoutMgr != null) {
35524 this.layoutMgr.removeLayoutComponent (comp);
35525 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35526 this.adjustListeningChildren (65536, -comp.numListening (65536));
35527 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35528 comp.parent = null;
35529 this.component.remove (index);
35530 this.invalidateIfValid ();
35531 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35532 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35533 this.dispatchEvent (e);
35534 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35535 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35536 this.updateCursorImmediately ();
35537 }}}, "~N");
35538 Clazz_defineMethod (c$, "remove", 
35539 function (comp) {
35540 this.removeChild (comp);
35541 }, "java.awt.Component");
35542 Clazz_defineMethod (c$, "removeChild", 
35543 function (comp) {
35544 {
35545 if (comp.parent === this) {
35546 var index = this.component.indexOf (comp);
35547 if (index >= 0) {
35548 this.remove (index);
35549 }}}}, "java.awt.Component");
35550 Clazz_defineMethod (c$, "removeAll", 
35551 function () {
35552 {
35553 this.adjustListeningChildren (32768, -this.listeningChildren);
35554 this.adjustListeningChildren (65536, -this.listeningBoundsChildren);
35555 this.adjustDescendants (-this.descendantsCount);
35556 while (!this.component.isEmpty ()) {
35557 var comp = this.component.remove (this.component.size () - 1);
35558 if (this.peer != null) {
35559 comp.removeNotify ();
35560 }if (this.layoutMgr != null) {
35561 this.layoutMgr.removeLayoutComponent (comp);
35562 }comp.parent = null;
35563 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35564 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35565 this.dispatchEvent (e);
35566 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35567 }
35568 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35569 this.updateCursorImmediately ();
35570 }this.invalidateIfValid ();
35571 }});
35572 Clazz_defineMethod (c$, "numListening", 
35573 function (mask) {
35574 var superListening = this.numListeningMask (mask);
35575 if (mask == 32768) {
35576 return this.listeningChildren + superListening;
35577 } else if (mask == 65536) {
35578 return this.listeningBoundsChildren + superListening;
35579 } else {
35580 return superListening;
35581 }}, "~N");
35582 Clazz_defineMethod (c$, "adjustListeningChildren", 
35583 function (mask, num) {
35584 if (num == 0) return;
35585 if ((mask & 32768) != 0) {
35586 this.listeningChildren += num;
35587 }if ((mask & 65536) != 0) {
35588 this.listeningBoundsChildren += num;
35589 }this.adjustListeningChildrenOnParent (mask, num);
35590 }, "~N,~N");
35591 Clazz_defineMethod (c$, "adjustDescendants", 
35592 function (num) {
35593 if (num == 0) return;
35594 this.descendantsCount += num;
35595 this.adjustDecendantsOnParent (num);
35596 }, "~N");
35597 Clazz_defineMethod (c$, "adjustDecendantsOnParent", 
35598 function (num) {
35599 if (this.parent != null) {
35600 this.parent.adjustDescendants (num);
35601 }}, "~N");
35602 Clazz_defineMethod (c$, "countHierarchyMembers", 
35603 function () {
35604 return this.descendantsCount + 1;
35605 });
35606 Clazz_defineMethod (c$, "getListenersCount", 
35607  function (id, enabledOnToolkit) {
35608 if (enabledOnToolkit) {
35609 return this.descendantsCount;
35610 }switch (id) {
35611 case 1400:
35612 return this.listeningChildren;
35613 case 1401:
35614 case 1402:
35615 return this.listeningBoundsChildren;
35616 default:
35617 return 0;
35618 }
35619 }, "~N,~B");
35620 Clazz_defineMethod (c$, "createHierarchyEvents", 
35621 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
35622 var listeners = this.getListenersCount (id, enabledOnToolkit);
35623 for (var count = listeners, i = 0; count > 0; i++) {
35624 count -= this.component.get (i).createHierarchyEvents (id, changed, changedParent, changeFlags, enabledOnToolkit);
35625 }
35626 return listeners + this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
35627 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
35628 Clazz_defineMethod (c$, "createChildHierarchyEvents", 
35629 function (id, changeFlags, enabledOnToolkit) {
35630 if (this.component.isEmpty ()) {
35631 return;
35632 }var listeners = this.getListenersCount (id, enabledOnToolkit);
35633 for (var count = listeners, i = 0; count > 0; i++) {
35634 count -= this.component.get (i).createHierarchyEvents (id, this, this.parent, changeFlags, enabledOnToolkit);
35635 }
35636 }, "~N,~N,~B");
35637 Clazz_defineMethod (c$, "getLayout", 
35638 function () {
35639 return this.layoutMgr;
35640 });
35641 Clazz_defineMethod (c$, "setLayout", 
35642 function (mgr) {
35643 this.layoutMgr = mgr;
35644 this.invalidateIfValid ();
35645 }, "java.awt.LayoutManager");
35646 Clazz_overrideMethod (c$, "doLayout", 
35647 function () {
35648 this.layout ();
35649 });
35650 Clazz_overrideMethod (c$, "layout", 
35651 function () {
35652 var layoutMgr = this.layoutMgr;
35653 if (layoutMgr != null) {
35654 layoutMgr.layoutContainer (this);
35655 }});
35656 Clazz_overrideMethod (c$, "invalidate", 
35657 function () {
35658 var layoutMgr = this.layoutMgr;
35659 if (Clazz_instanceOf (layoutMgr, java.awt.LayoutManager2)) {
35660 var lm = layoutMgr;
35661 lm.invalidateLayout (this);
35662 }this.invalidateComp ();
35663 });
35664 Clazz_overrideMethod (c$, "validate", 
35665 function () {
35666 if (!this.isValid ()) {
35667 var updateCur = false;
35668 {
35669 if (!this.isValid () && this.peer != null) {
35670 var p = null;
35671 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35672 p = this.peer;
35673 }if (p != null) {
35674 p.beginValidate ();
35675 }this.validateTree ();
35676 if (p != null) {
35677 p.endValidate ();
35678 updateCur = this.isVisible ();
35679 }}}if (updateCur) {
35680 this.updateCursorImmediately ();
35681 }}});
35682 Clazz_defineMethod (c$, "validateTree", 
35683 function () {
35684 if (!this.isValid ()) {
35685 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35686 (this.peer).beginLayout ();
35687 }this.doLayout ();
35688 for (var i = 0; i < this.component.size (); i++) {
35689 var comp = this.component.get (i);
35690 if ((Clazz_instanceOf (comp, java.awt.Container)) && !(Clazz_instanceOf (comp, java.awt.Window)) && !comp.isValid ()) {
35691 (comp).validateTree ();
35692 } else {
35693 comp.validate ();
35694 }}
35695 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35696 (this.peer).endLayout ();
35697 }}this.validateComponent ();
35698 });
35699 Clazz_defineMethod (c$, "invalidateTree", 
35700 function () {
35701 {
35702 for (var i = 0; i < this.component.size (); i++) {
35703 var comp = this.component.get (i);
35704 if (Clazz_instanceOf (comp, java.awt.Container)) {
35705 (comp).invalidateTree ();
35706 } else {
35707 comp.invalidateIfValid ();
35708 }}
35709 this.invalidateIfValid ();
35710 }});
35711 Clazz_overrideMethod (c$, "setFont", 
35712 function (f) {
35713 var oldfont = this.getFont ();
35714 this.setFontComp (f);
35715 var newfont = this.getFont ();
35716 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
35717 this.invalidateTree ();
35718 }}, "java.awt.Font");
35719 Clazz_overrideMethod (c$, "getPreferredSize", 
35720 function () {
35721 return this.preferredSize ();
35722 });
35723 Clazz_overrideMethod (c$, "preferredSize", 
35724 function () {
35725 var dim = this.prefSize;
35726 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
35727 {
35728 this.prefSize = (this.layoutMgr != null) ? this.layoutMgr.preferredLayoutSize (this) : this.prefSizeComp ();
35729 dim = this.prefSize;
35730 }}return (dim == null ? null :  new java.awt.Dimension (dim));
35731 });
35732 Clazz_overrideMethod (c$, "getMinimumSize", 
35733 function () {
35734 var dim = this.minSize;
35735 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
35736 {
35737 this.minSize = (this.layoutMgr != null) ? this.layoutMgr.minimumLayoutSize (this) : this.minimumSize ();
35738 dim = this.minSize;
35739 }}if (dim != null) {
35740 return  new java.awt.Dimension (dim);
35741 } else {
35742 return dim;
35743 }});
35744 Clazz_overrideMethod (c$, "getMaximumSize", 
35745 function () {
35746 var dim = this.maxSize;
35747 if (dim == null || !(this.isMaximumSizeSet () || this.isValid ())) {
35748 {
35749 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35750 var lm = this.layoutMgr;
35751 this.maxSize = lm.maximumLayoutSize (this);
35752 } else {
35753 this.maxSize = this.getMaxSizeComp ();
35754 }dim = this.maxSize;
35755 }}if (dim != null) {
35756 return  new java.awt.Dimension (dim);
35757 } else {
35758 return dim;
35759 }});
35760 Clazz_overrideMethod (c$, "getAlignmentX", 
35761 function () {
35762 var xAlign;
35763 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35764 {
35765 var lm = this.layoutMgr;
35766 xAlign = lm.getLayoutAlignmentX (this);
35767 }} else {
35768 xAlign = this.getAlignmentXComp ();
35769 }return xAlign;
35770 });
35771 Clazz_overrideMethod (c$, "getAlignmentY", 
35772 function () {
35773 var yAlign;
35774 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35775 {
35776 var lm = this.layoutMgr;
35777 yAlign = lm.getLayoutAlignmentY (this);
35778 }} else {
35779 yAlign = this.getAlignmentYComp ();
35780 }return yAlign;
35781 });
35782 Clazz_overrideMethod (c$, "paint", 
35783 function (g) {
35784 java.awt.GraphicsCallback.PaintCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 2);
35785 }, "java.awt.Graphics");
35786 Clazz_overrideMethod (c$, "update", 
35787 function (g) {
35788 if (this.isShowing ()) {
35789 g.clearRect (0, 0, this.width, this.height);
35790 this.paint (g);
35791 }}, "java.awt.Graphics");
35792 Clazz_defineMethod (c$, "paintComponents", 
35793 function (g) {
35794 if (this.isShowing ()) {
35795 java.awt.GraphicsCallback.PaintAllCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 4);
35796 }}, "java.awt.Graphics");
35797 Clazz_overrideMethod (c$, "lightweightPaint", 
35798 function (g) {
35799 this.lwPaintComp (g);
35800 this.paintHeavyweightComponents (g);
35801 }, "java.awt.Graphics");
35802 Clazz_overrideMethod (c$, "paintHeavyweightComponents", 
35803 function (g) {
35804 if (this.isShowing ()) {
35805 java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 3);
35806 }}, "java.awt.Graphics");
35807 Clazz_defineMethod (c$, "addContainerListener", 
35808 function (l) {
35809 if (l == null) {
35810 return;
35811 }this.containerListener = java.awt.AWTEventMulticaster.add (this.containerListener, l);
35812 this.newEventsOnly = true;
35813 }, "java.awt.event.ContainerListener");
35814 Clazz_defineMethod (c$, "removeContainerListener", 
35815 function (l) {
35816 if (l == null) {
35817 return;
35818 }this.containerListener = java.awt.AWTEventMulticaster.remove (this.containerListener, l);
35819 }, "java.awt.event.ContainerListener");
35820 Clazz_defineMethod (c$, "getContainerListeners", 
35821 function () {
35822 return (this.getListeners (java.awt.event.ContainerListener));
35823 });
35824 Clazz_overrideMethod (c$, "getListeners", 
35825 function (listenerType) {
35826 var l = null;
35827 if (listenerType === java.awt.event.ContainerListener) {
35828 l = this.containerListener;
35829 } else {
35830 return this.getListenersComp (listenerType);
35831 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
35832 }, "Class");
35833 Clazz_overrideMethod (c$, "eventEnabled", 
35834 function (e) {
35835 var id = e.getID ();
35836 if (id == 300 || id == 301) {
35837 if ((this.eventMask & 2) != 0 || this.containerListener != null) {
35838 return true;
35839 }return false;
35840 }return this.eventTypeEnabled (e.id);
35841 }, "java.awt.AWTEvent");
35842 Clazz_overrideMethod (c$, "processEvent", 
35843 function (e) {
35844 this.processEventCont (e);
35845 }, "java.awt.AWTEvent");
35846 Clazz_defineMethod (c$, "processEventCont", 
35847 function (e) {
35848 if (Clazz_instanceOf (e, java.awt.event.ContainerEvent)) {
35849 this.processContainerEvent (e);
35850 return;
35851 }this.processEventComp (e);
35852 }, "java.awt.AWTEvent");
35853 Clazz_defineMethod (c$, "processContainerEvent", 
35854 function (e) {
35855 var listener = this.containerListener;
35856 if (listener != null) {
35857 switch (e.getID ()) {
35858 case 300:
35859 listener.componentAdded (e);
35860 break;
35861 case 301:
35862 listener.componentRemoved (e);
35863 break;
35864 }
35865 }}, "java.awt.event.ContainerEvent");
35866 Clazz_overrideMethod (c$, "dispatchEventImpl", 
35867 function (e) {
35868 if ((this.dispatcher != null) && this.dispatcher.dispatchEvent (e)) {
35869 e.consume ();
35870 if (this.peer != null) {
35871 this.peer.handleEvent (e);
35872 }return;
35873 }this.dispatchEventImplComp (e);
35874 {
35875 switch (e.getID ()) {
35876 case 101:
35877 break;
35878 case 100:
35879 break;
35880 default:
35881 break;
35882 }
35883 }}, "java.awt.AWTEvent");
35884 Clazz_defineMethod (c$, "dispatchEventToSelf", 
35885 function (e) {
35886 this.dispatchEventImplComp (e);
35887 }, "java.awt.AWTEvent");
35888 Clazz_defineMethod (c$, "getMouseEventTarget", 
35889  function (x, y, includeSelf, filter, searchHeavyweights) {
35890 {
35891 if (arguments.length == 3) {
35892 filter = java.awt.Container.MouseEventTargetFilter.FILTER;
35893 searchHeavyWeights = false;
35894 }
35895 }var comp = null;
35896 if (comp == null || comp === this) {
35897 comp = this.getMouseEventTargetImpl (x, y, includeSelf, filter, false, searchHeavyweights);
35898 }return comp;
35899 }, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B");
35900 Clazz_defineMethod (c$, "getMouseEventTargetImpl", 
35901  function (x, y, includeSelf, filter, searchHeavyweightChildren, searchHeavyweightDescendants) {
35902 {
35903 for (var i = 0; i < this.component.size (); i++) {
35904 var comp = this.component.get (i);
35905 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)) {
35906 if (Clazz_instanceOf (comp, java.awt.Container)) {
35907 var child = comp;
35908 var deeper = child.getMouseEventTarget (x - child.x, y - child.y, includeSelf, filter, searchHeavyweightDescendants);
35909 if (deeper != null) {
35910 return deeper;
35911 }} else {
35912 if (filter.accept (comp)) {
35913 return comp;
35914 }}}}
35915 var isPeerOK;
35916 var isMouseOverMe;
35917 isPeerOK = includeSelf;
35918 isMouseOverMe = this.contains (x, y);
35919 if (isMouseOverMe && isPeerOK && filter.accept (this)) {
35920 return this;
35921 }return null;
35922 }}, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B,~B");
35923 Clazz_defineMethod (c$, "proxyEnableEvents", 
35924 function (events) {
35925 if (this.parent != null) {
35926 this.parent.proxyEnableEvents (events);
35927 }if (this.dispatcher != null) {
35928 this.dispatcher.enableEvents (events);
35929 }}, "~N");
35930 Clazz_defineMethod (c$, "deliverEvent", 
35931 function (e) {
35932 var comp = this.getComponentAt (e.x, e.y);
35933 if ((comp != null) && (comp !== this)) {
35934 e.translate (-comp.x, -comp.y);
35935 comp.deliverEvent (e);
35936 } else {
35937 this.postEvent (e);
35938 }}, "java.awt.Event");
35939 Clazz_defineMethod (c$, "getComponentAt", 
35940 function (x, y) {
35941 return this.locate (x, y);
35942 }, "~N,~N");
35943 Clazz_overrideMethod (c$, "locate", 
35944 function (x, y) {
35945 return this;
35946 }, "~N,~N");
35947 Clazz_defineMethod (c$, "getComponentAt", 
35948 function (p) {
35949 return this.getComponentAt (p.x, p.y);
35950 }, "java.awt.Point");
35951 Clazz_defineMethod (c$, "getMousePosition", 
35952 function (allowChildren) {
35953 return null;
35954 }, "~B");
35955 Clazz_overrideMethod (c$, "isSameOrAncestorOf", 
35956 function (comp, allowChildren) {
35957 return this === comp || (allowChildren && this.isParentOf (comp));
35958 }, "java.awt.Component,~B");
35959 Clazz_defineMethod (c$, "findComponentAt", 
35960 function (x, y) {
35961 {
35962 return this.findComponentAt (x, y, true);
35963 }}, "~N,~N");
35964 Clazz_defineMethod (c$, "findComponentAt", 
35965 function (x, y, ignoreEnabled) {
35966 return null;
35967 }, "~N,~N,~B");
35968 Clazz_defineMethod (c$, "findComponentAt", 
35969 function (p) {
35970 return this.findComponentAt (p.x, p.y);
35971 }, "java.awt.Point");
35972 Clazz_defineMethod (c$, "addNotify", 
35973 function () {
35974 {
35975 this.addNotifyComp ();
35976 if (!(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35977 this.setDispatcher ();
35978 }for (var i = 0; i < this.component.size (); i++) {
35979 this.component.get (i).addNotify ();
35980 }
35981 }});
35982 Clazz_defineMethod (c$, "setDispatcher", 
35983 function () {
35984 this.dispatcher =  new java.awt.LightweightDispatcher (this);
35985 });
35986 Clazz_defineMethod (c$, "removeNotify", 
35987 function () {
35988 for (var i = this.component.size () - 1; i >= 0; i--) {
35989 var comp = this.component.get (i);
35990 if (comp != null) {
35991 comp.setAutoFocusTransferOnDisposal (false);
35992 comp.removeNotify ();
35993 comp.setAutoFocusTransferOnDisposal (true);
35994 }}
35995 if (this.dispatcher != null) {
35996 this.dispatcher.dispose ();
35997 this.dispatcher = null;
35998 }this.removeNotifyComp ();
35999 });
36000 Clazz_defineMethod (c$, "isAncestorOf", 
36001 function (c) {
36002 var p;
36003 if (c == null || ((p = c.getParent ()) == null)) {
36004 return false;
36005 }while (p != null) {
36006 if (p === this) {
36007 return true;
36008 }p = p.getParent ();
36009 }
36010 return false;
36011 }, "java.awt.Component");
36012 Clazz_overrideMethod (c$, "paramString", 
36013 function () {
36014 var str = this.paramStringComp ();
36015 var layoutMgr = this.layoutMgr;
36016 if (layoutMgr != null) {
36017 str += ",layout=" + layoutMgr.getClass ().getName ();
36018 }return str;
36019 });
36020 Clazz_defineMethod (c$, "setFocusTraversalKeys", 
36021 function (id, keystrokes) {
36022 }, "~N,java.util.Set");
36023 Clazz_defineMethod (c$, "getFocusTraversalKeys", 
36024 function (id) {
36025 return null;
36026 }, "~N");
36027 Clazz_defineMethod (c$, "areFocusTraversalKeysSet", 
36028 function (id) {
36029 return false;
36030 }, "~N");
36031 Clazz_defineMethod (c$, "isFocusCycleRoot", 
36032 function (container) {
36033 if (this.isFocusCycleRoot () && container === this) {
36034 return true;
36035 } else {
36036 return this.isFocusCycleRootComp (container);
36037 }}, "java.awt.Container");
36038 Clazz_overrideMethod (c$, "containsFocus", 
36039 function () {
36040 return false;
36041 });
36042 Clazz_defineMethod (c$, "isParentOf", 
36043  function (comp) {
36044 {
36045 while (comp != null && comp !== this && !(Clazz_instanceOf (comp, java.awt.Window))) {
36046 comp = comp.getParent ();
36047 }
36048 return (comp === this);
36049 }}, "java.awt.Component");
36050 Clazz_defineMethod (c$, "clearMostRecentFocusOwnerOnHide", 
36051 function () {
36052 });
36053 Clazz_overrideMethod (c$, "clearCurrentFocusCycleRootOnHide", 
36054 function () {
36055 });
36056 Clazz_defineMethod (c$, "getTraversalRoot", 
36057 function () {
36058 return null;
36059 });
36060 Clazz_defineMethod (c$, "isFocusCycleRoot", 
36061 function () {
36062 return this.focusCycleRoot;
36063 });
36064 Clazz_defineMethod (c$, "setFocusTraversalPolicyProvider", 
36065 function (provider) {
36066 var oldProvider;
36067 {
36068 oldProvider = this.focusTraversalPolicyProvider;
36069 this.focusTraversalPolicyProvider = provider;
36070 }this.firePropertyChangeBool ("focusTraversalPolicyProvider", oldProvider, provider);
36071 }, "~B");
36072 Clazz_defineMethod (c$, "isFocusTraversalPolicyProvider", 
36073 function () {
36074 return this.focusTraversalPolicyProvider;
36075 });
36076 Clazz_defineMethod (c$, "transferFocusDownCycle", 
36077 function () {
36078 });
36079 Clazz_defineMethod (c$, "preProcessKeyEvent", 
36080 function (e) {
36081 var parent = this.parent;
36082 if (parent != null) {
36083 parent.preProcessKeyEvent (e);
36084 }}, "java.awt.event.KeyEvent");
36085 Clazz_defineMethod (c$, "postProcessKeyEvent", 
36086 function (e) {
36087 var parent = this.parent;
36088 if (parent != null) {
36089 parent.postProcessKeyEvent (e);
36090 }}, "java.awt.event.KeyEvent");
36091 Clazz_overrideMethod (c$, "postsOldMouseEvents", 
36092 function () {
36093 return true;
36094 });
36095 Clazz_defineMethod (c$, "applyComponentOrientation", 
36096 function (o) {
36097 this.applyCompOrientComp (o);
36098 {
36099 for (var i = 0; i < this.component.size (); i++) {
36100 var comp = this.component.get (i);
36101 comp.applyComponentOrientation (o);
36102 }
36103 }}, "java.awt.ComponentOrientation");
36104 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36105 function (listener) {
36106 this.addPropChangeListenerComp (listener);
36107 }, "java.beans.PropertyChangeListener");
36108 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36109 function (propertyName, listener) {
36110 this.addPropChangeListComp (propertyName, listener);
36111 }, "~S,java.beans.PropertyChangeListener");
36112 Clazz_defineMethod (c$, "increaseComponentCount", 
36113 function (c) {
36114 if (!c.isDisplayable ()) {
36115 throw  new IllegalStateException ("Peer does not exist while invoking the increaseComponentCount() method");
36116 }var addHW = 0;
36117 var addLW = 0;
36118 if (Clazz_instanceOf (c, java.awt.Container)) {
36119 addLW = (c).numOfLWComponents;
36120 addHW = (c).numOfHWComponents;
36121 }if (c.isLightweight ()) {
36122 addLW++;
36123 } else {
36124 addHW++;
36125 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36126 cont.numOfLWComponents += addLW;
36127 cont.numOfHWComponents += addHW;
36128 }
36129 }, "java.awt.Component");
36130 Clazz_defineMethod (c$, "decreaseComponentCount", 
36131 function (c) {
36132 if (!c.isDisplayable ()) {
36133 throw  new IllegalStateException ("Peer does not exist while invoking the decreaseComponentCount() method");
36134 }var subHW = 0;
36135 var subLW = 0;
36136 if (Clazz_instanceOf (c, java.awt.Container)) {
36137 subLW = (c).numOfLWComponents;
36138 subHW = (c).numOfHWComponents;
36139 }if (c.isLightweight ()) {
36140 subLW++;
36141 } else {
36142 subHW++;
36143 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36144 cont.numOfLWComponents -= subLW;
36145 cont.numOfHWComponents -= subHW;
36146 }
36147 }, "java.awt.Component");
36148 Clazz_declareInterface (java.awt.Container, "EventTargetFilter");
36149 Clazz_pu$h(self.c$);
36150 c$ = Clazz_declareType (java.awt.Container, "MouseEventTargetFilter", null, java.awt.Container.EventTargetFilter);
36151 Clazz_makeConstructor (c$, 
36152  function () {
36153 });
36154 Clazz_overrideMethod (c$, "accept", 
36155 function (a) {
36156 return (a.eventMask & 32) != 0 || (a.eventMask & 16) != 0 || (a.eventMask & 131072) != 0 || a.mouseListener != null || a.mouseMotionListener != null || a.mouseWheelListener != null;
36157 }, "java.awt.Component");
36158 c$.FILTER = c$.prototype.FILTER =  new java.awt.Container.MouseEventTargetFilter ();
36159 c$ = Clazz_p0p ();
36160 c$.EMPTY_ARRAY = c$.prototype.EMPTY_ARRAY =  new Array (0);
36161 Clazz_defineStatics (c$,
36162 "INCLUDE_SELF", true,
36163 "SEARCH_HEAVYWEIGHTS", true);
36164 c$ = Clazz_decorateAsClass (function () {
36165 this.nativeContainer = null;
36166 this.mouseEventTarget = null;
36167 this.targetLastEntered = null;
36168 this.isMouseInNativeContainer = false;
36169 this.eventMask = 0;
36170 Clazz_instantialize (this, arguments);
36171 }, java.awt, "LightweightDispatcher", null, java.awt.event.AWTEventListener);
36172 Clazz_makeConstructor (c$, 
36173 function (nativeContainer) {
36174 this.nativeContainer = nativeContainer;
36175 this.mouseEventTarget = null;
36176 this.eventMask = 0;
36177 }, "java.awt.Container");
36178 Clazz_defineMethod (c$, "dispose", 
36179 function () {
36180 this.stopListeningForOtherDrags ();
36181 this.mouseEventTarget = null;
36182 });
36183 Clazz_defineMethod (c$, "enableEvents", 
36184 function (events) {
36185 this.eventMask |= events;
36186 }, "~N");
36187 Clazz_defineMethod (c$, "dispatchEvent", 
36188 function (e) {
36189 var ret = false;
36190 if (Clazz_instanceOf (e, java.awt.event.MouseEvent) && (this.eventMask & 131120) != 0) {
36191 var me = e;
36192 ret = this.processMouseEvent (me);
36193 }return ret;
36194 }, "java.awt.AWTEvent");
36195 Clazz_defineMethod (c$, "isMouseGrab", 
36196  function (e) {
36197 var modifiers = e.getModifiersEx ();
36198 if (e.getID () == 501 || e.getID () == 502) {
36199 switch (e.getButton ()) {
36200 case 1:
36201 modifiers ^= 1024;
36202 break;
36203 case 2:
36204 modifiers ^= 2048;
36205 break;
36206 case 3:
36207 modifiers ^= 4096;
36208 break;
36209 }
36210 }return ((modifiers & (7168)) != 0);
36211 }, "java.awt.event.MouseEvent");
36212 Clazz_defineMethod (c$, "processMouseEvent", 
36213  function (e) {
36214 var id = e.getID ();
36215 var mouseOver = this.nativeContainer.getMouseEventTarget (e.getX (), e.getY (), true);
36216 this.trackMouseEnterExit (mouseOver, e);
36217 if (!this.isMouseGrab (e) && id != 500) {
36218 this.mouseEventTarget = (mouseOver !== this.nativeContainer) ? mouseOver : null;
36219 }if (this.mouseEventTarget != null) {
36220 switch (id) {
36221 case 504:
36222 case 505:
36223 break;
36224 case 501:
36225 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36226 break;
36227 case 502:
36228 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36229 break;
36230 case 500:
36231 if (mouseOver === this.mouseEventTarget) {
36232 this.retargetMouseEvent (mouseOver, id, e);
36233 }break;
36234 case 503:
36235 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36236 break;
36237 case 506:
36238 if (this.isMouseGrab (e)) {
36239 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36240 }break;
36241 case 507:
36242 this.retargetMouseEvent (mouseOver, id, e);
36243 break;
36244 }
36245 e.consume ();
36246 }return e.isConsumed ();
36247 }, "java.awt.event.MouseEvent");
36248 Clazz_defineMethod (c$, "trackMouseEnterExit", 
36249  function (targetOver, e) {
36250 var targetEnter = null;
36251 var id = e.getID ();
36252 if (id != 505 && id != 506 && id != 1500 && this.isMouseInNativeContainer == false) {
36253 this.isMouseInNativeContainer = true;
36254 this.startListeningForOtherDrags ();
36255 } else if (id == 505) {
36256 this.isMouseInNativeContainer = false;
36257 this.stopListeningForOtherDrags ();
36258 }if (this.isMouseInNativeContainer) {
36259 targetEnter = targetOver;
36260 }if (this.targetLastEntered === targetEnter) {
36261 return;
36262 }if (this.targetLastEntered != null) {
36263 this.retargetMouseEvent (this.targetLastEntered, 505, e);
36264 }if (id == 505) {
36265 e.consume ();
36266 }if (targetEnter != null) {
36267 this.retargetMouseEvent (targetEnter, 504, e);
36268 }if (id == 504) {
36269 e.consume ();
36270 }this.targetLastEntered = targetEnter;
36271 }, "java.awt.Component,java.awt.event.MouseEvent");
36272 Clazz_defineMethod (c$, "startListeningForOtherDrags", 
36273  function () {
36274 });
36275 Clazz_defineMethod (c$, "stopListeningForOtherDrags", 
36276  function () {
36277 });
36278 Clazz_overrideMethod (c$, "eventDispatched", 
36279 function (e) {
36280 var isForeignDrag = (Clazz_instanceOf (e, java.awt.event.MouseEvent)) && (e.id == 506) && (e.getSource () !== this.nativeContainer);
36281 if (!isForeignDrag) {
36282 return;
36283 }var srcEvent = e;
36284 var me;
36285 {
36286 var srcComponent = srcEvent.getComponent ();
36287 if (!srcComponent.isShowing ()) {
36288 return;
36289 }var c = this.nativeContainer;
36290 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
36291 c = c.getParent_NoClientCode ();
36292 }
36293 if ((c == null) || (c).isModalBlocked ()) {
36294 return;
36295 }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 ());
36296 (srcEvent).copyPrivateDataInto (me);
36297 }var targetOver = this.nativeContainer.getMouseEventTarget (me.getX (), me.getY (), true);
36298 this.trackMouseEnterExit (targetOver, me);
36299 }, "java.awt.AWTEvent");
36300 Clazz_defineMethod (c$, "retargetMouseEvent", 
36301 function (target, id, e) {
36302 if (target == null) {
36303 return;
36304 }var x = e.getX ();
36305 var y = e.getY ();
36306 var component;
36307 for (component = target; component != null && component !== this.nativeContainer; component = component.getParent ()) {
36308 x -= component.x;
36309 y -= component.y;
36310 }
36311 var retargeted;
36312 if (component != null) {
36313 if (id == 507) {
36314 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 ());
36315 } else {
36316 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 ());
36317 }(e).copyPrivateDataInto (retargeted);
36318 if (target === this.nativeContainer) {
36319 (target).dispatchEventToSelf (retargeted);
36320 } else {
36321 if (this.nativeContainer.modalComp != null) {
36322 if ((this.nativeContainer.modalComp).isAncestorOf (target)) {
36323 target.dispatchEvent (retargeted);
36324 } else {
36325 e.consume ();
36326 }} else {
36327 target.dispatchEvent (retargeted);
36328 }}}}, "java.awt.Component,~N,java.awt.event.MouseEvent");
36329 Clazz_defineStatics (c$,
36330 "LWD_MOUSE_DRAGGED_OVER", 1500,
36331 "MOUSE_MASK", 131120);
36332 });
36333 Clazz_declarePackage ("java.awt");
36334 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 () {
36335 c$ = Clazz_decorateAsClass (function () {
36336 this.threadGroup = null;
36337 this.myThread = null;
36338 this.peer = null;
36339 this.parent = null;
36340 this.appContext = null;
36341 this.x = 0;
36342 this.y = 0;
36343 this.width = 0;
36344 this.height = 0;
36345 this.foreground = null;
36346 this.background = null;
36347 this.font = null;
36348 this.peerFont = null;
36349 this.cursor = null;
36350 this.locale = null;
36351 this.visible = true;
36352 this.enabled = true;
36353 this.valid = false;
36354 this.popups = null;
36355 this.name = null;
36356 this.nameExplicitlySet = false;
36357 this.focusable = true;
36358 this.$isFocusTraversableOverridden = 0;
36359 this.focusTraversalKeysEnabled = false;
36360 this.minSize = null;
36361 this.minSizeSet = false;
36362 this.prefSize = null;
36363 this.prefSizeSet = false;
36364 this.maxSize = null;
36365 this.maxSizeSet = false;
36366 this.componentOrientation = null;
36367 this.newEventsOnly = false;
36368 this.componentListener = null;
36369 this.focusListener = null;
36370 this.hierarchyListener = null;
36371 this.hierarchyBoundsListener = null;
36372 this.keyListener = null;
36373 this.mouseListener = null;
36374 this.mouseMotionListener = null;
36375 this.mouseWheelListener = null;
36376 this.inputMethodListener = null;
36377 this.windowClosingException = null;
36378 this.eventMask = 4096;
36379 this.changeSupport = null;
36380 this.changeSupportLock = null;
36381 this.isPacked = false;
36382 this.boundsOp = 3;
36383 this.isAddNotifyComplete = false;
36384 this.backgroundEraseDisabled = false;
36385 this.htmlName = null;
36386 this.num = 0;
36387 this.graphicsConfig = null;
36388 this.eventCache = null;
36389 this.coalescingEnabled = false;
36390 this.autoFocusTransferOnDisposal = true;
36391 Clazz_instantialize (this, arguments);
36392 }, java.awt, "Component", null, java.awt.image.ImageObserver);
36393 Clazz_prepareFields (c$, function () {
36394 this.componentOrientation = java.awt.ComponentOrientation.UNKNOWN;
36395 this.changeSupportLock =  new Clazz._O ();
36396 this.coalescingEnabled = this.checkCoalescing ();
36397 });
36398 Clazz_defineMethod (c$, "getAppContext", 
36399 function () {
36400 return this.appContext;
36401 });
36402 Clazz_defineMethod (c$, "getChangeSupportLock", 
36403  function () {
36404 return this.changeSupportLock;
36405 });
36406 Clazz_defineMethod (c$, "getBoundsOp", 
36407 function () {
36408 return this.boundsOp;
36409 });
36410 Clazz_defineMethod (c$, "setBoundsOp", 
36411 function (op) {
36412 if (op == 5) {
36413 this.boundsOp = 3;
36414 } else if (this.boundsOp == 3) {
36415 this.boundsOp = op;
36416 }}, "~N");
36417 Clazz_makeConstructor (c$, 
36418 function () {
36419 this.setAppContext ();
36420 });
36421 Clazz_defineMethod (c$, "setAppContext", 
36422 function () {
36423 this.appContext = jssun.awt.AppContext.getAppContext ();
36424 this.num = ++java.awt.Component.incr;
36425 });
36426 Clazz_defineMethod (c$, "getHTMLName", 
36427 function (uid) {
36428 return (this.htmlName == null ? this.htmlName = this.appContext.getThreadGroup ().getName () + "_" + uid + "_" + this.num : this.htmlName);
36429 }, "~S");
36430 Clazz_defineMethod (c$, "constructComponentName", 
36431 function () {
36432 return null;
36433 });
36434 Clazz_defineMethod (c$, "getName", 
36435 function () {
36436 if (this.name == null && !this.nameExplicitlySet) {
36437 {
36438 if (this.name == null && !this.nameExplicitlySet) this.name = this.constructComponentName ();
36439 }}return this.name;
36440 });
36441 Clazz_defineMethod (c$, "setName", 
36442 function (name) {
36443 var oldName;
36444 {
36445 oldName = this.name;
36446 this.name = name;
36447 this.nameExplicitlySet = true;
36448 }this.firePropertyChangeObject ("name", oldName, name);
36449 }, "~S");
36450 Clazz_defineMethod (c$, "getParent", 
36451 function () {
36452 return this.getParent_NoClientCode ();
36453 });
36454 Clazz_defineMethod (c$, "getParent_NoClientCode", 
36455 function () {
36456 return this.parent;
36457 });
36458 Clazz_defineMethod (c$, "getContainer", 
36459 function () {
36460 return this.getParent ();
36461 });
36462 Clazz_defineMethod (c$, "getPeer", 
36463 function () {
36464 return this.peer;
36465 });
36466 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
36467 function () {
36468 return swingjs.JSToolkit.getGraphicsConfiguration ();
36469 });
36470 Clazz_defineMethod (c$, "resetGC", 
36471 function () {
36472 });
36473 Clazz_defineMethod (c$, "getToolkit", 
36474 function () {
36475 return this.getToolkitImpl ();
36476 });
36477 Clazz_defineMethod (c$, "getToolkitImpl", 
36478 function () {
36479 var peer = this.peer;
36480 if ((peer != null) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
36481 return peer.getToolkit ();
36482 }var parent = this.parent;
36483 if (parent != null) {
36484 return parent.getToolkitImpl ();
36485 }return java.awt.Toolkit.getDefaultToolkit ();
36486 });
36487 Clazz_defineMethod (c$, "isValid", 
36488 function () {
36489 return this.valid;
36490 });
36491 Clazz_defineMethod (c$, "isDisplayable", 
36492 function () {
36493 return true;
36494 });
36495 Clazz_defineMethod (c$, "isVisible", 
36496 function () {
36497 return this.isVisible_NoClientCode ();
36498 });
36499 Clazz_defineMethod (c$, "isVisible_NoClientCode", 
36500 function () {
36501 return this.visible;
36502 });
36503 Clazz_defineMethod (c$, "isRecursivelyVisible", 
36504 function () {
36505 return this.visible && (this.parent == null || this.parent.isRecursivelyVisible ());
36506 });
36507 Clazz_defineMethod (c$, "pointRelativeToComponent", 
36508 function (absolute) {
36509 var compCoords = this.getLocationOnScreen ();
36510 return  new java.awt.Point (absolute.x - compCoords.x, absolute.y - compCoords.y);
36511 }, "java.awt.Point");
36512 Clazz_defineMethod (c$, "getMousePosition", 
36513 function () {
36514 return null;
36515 });
36516 Clazz_defineMethod (c$, "isSameOrAncestorOf", 
36517 function (comp, allowChildren) {
36518 return comp === this;
36519 }, "java.awt.Component,~B");
36520 Clazz_defineMethod (c$, "isShowing", 
36521 function () {
36522 if (this.visible) {
36523 var parent = this.parent;
36524 return (parent == null) || parent.isShowing ();
36525 }return false;
36526 });
36527 Clazz_defineMethod (c$, "isEnabled", 
36528 function () {
36529 return this.isEnabledImpl ();
36530 });
36531 Clazz_defineMethod (c$, "isEnabledImpl", 
36532 function () {
36533 return this.enabled;
36534 });
36535 Clazz_defineMethod (c$, "setEnabled", 
36536 function (b) {
36537 this.enable (b);
36538 }, "~B");
36539 Clazz_defineMethod (c$, "enable", 
36540 function () {
36541 if (!this.enabled) {
36542 this.enabled = true;
36543 var peer = this.peer;
36544 if (peer != null) {
36545 peer.setEnabled (true);
36546 if (this.visible) {
36547 this.updateCursorImmediately ();
36548 }}}});
36549 Clazz_defineMethod (c$, "enable", 
36550 function (b) {
36551 if (b) {
36552 this.enable ();
36553 } else {
36554 this.disable ();
36555 }}, "~B");
36556 Clazz_defineMethod (c$, "disable", 
36557 function () {
36558 if (this.enabled) {
36559 this.enabled = false;
36560 var peer = this.peer;
36561 if (peer != null) {
36562 peer.setEnabled (false);
36563 if (this.visible) {
36564 this.updateCursorImmediately ();
36565 }}}});
36566 Clazz_defineMethod (c$, "isDoubleBuffered", 
36567 function () {
36568 return false;
36569 });
36570 Clazz_defineMethod (c$, "setVisible", 
36571 function (b) {
36572 this.show (b);
36573 }, "~B");
36574 Clazz_defineMethod (c$, "show", 
36575 function () {
36576 if (!this.visible) {
36577 this.visible = true;
36578 var peer = this.peer;
36579 if (peer != null) {
36580 peer.setVisible (true);
36581 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36582 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36583 this.repaint ();
36584 }this.updateCursorImmediately ();
36585 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36586 var e =  new java.awt.event.ComponentEvent (this, 102);
36587 java.awt.Toolkit.getEventQueue ().postEvent (e);
36588 }}var parent = this.parent;
36589 if (parent != null) {
36590 parent.invalidate ();
36591 }});
36592 Clazz_defineMethod (c$, "containsFocus", 
36593 function () {
36594 return this.isFocusOwner ();
36595 });
36596 Clazz_defineMethod (c$, "clearCurrentFocusCycleRootOnHide", 
36597 function () {
36598 });
36599 Clazz_defineMethod (c$, "hide", 
36600 function () {
36601 this.isPacked = false;
36602 if (this.visible) {
36603 this.clearCurrentFocusCycleRootOnHide ();
36604 this.visible = false;
36605 this.mixOnHiding (this.isLightweight ());
36606 var peer = this.peer;
36607 if (peer != null) {
36608 peer.setVisible (false);
36609 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36610 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36611 this.repaint ();
36612 }this.updateCursorImmediately ();
36613 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36614 var e =  new java.awt.event.ComponentEvent (this, 103);
36615 java.awt.Toolkit.getEventQueue ().postEvent (e);
36616 }}var parent = this.parent;
36617 if (parent != null) {
36618 parent.invalidate ();
36619 }});
36620 Clazz_defineMethod (c$, "getForeground", 
36621 function () {
36622 var foreground = this.foreground;
36623 if (foreground != null) {
36624 return foreground;
36625 }var parent = this.parent;
36626 return (parent != null) ? parent.getForeground () : null;
36627 });
36628 Clazz_defineMethod (c$, "setForeground", 
36629 function (c) {
36630 var oldColor = this.foreground;
36631 var peer = this.peer;
36632 this.foreground = c;
36633 if (peer != null) {
36634 c = this.getForeground ();
36635 if (c != null) {
36636 peer.setForeground (c);
36637 }}this.firePropertyChangeObject ("foreground", oldColor, c);
36638 }, "java.awt.Color");
36639 Clazz_defineMethod (c$, "isForegroundSet", 
36640 function () {
36641 return (this.foreground != null);
36642 });
36643 Clazz_defineMethod (c$, "getBackground", 
36644 function () {
36645 var background = this.background;
36646 if (background != null) {
36647 return background;
36648 }var parent = this.parent;
36649 return (parent != null) ? parent.getBackground () : null;
36650 });
36651 Clazz_defineMethod (c$, "setBackground", 
36652 function (c) {
36653 var oldColor = this.background;
36654 var peer = this.peer;
36655 this.background = c;
36656 if (peer != null) {
36657 c = this.getBackground ();
36658 if (c != null) {
36659 peer.setBackground (c);
36660 }}this.firePropertyChangeObject ("background", oldColor, c);
36661 }, "java.awt.Color");
36662 Clazz_defineMethod (c$, "isBackgroundSet", 
36663 function () {
36664 return (this.background != null);
36665 });
36666 Clazz_defineMethod (c$, "getFont", 
36667 function () {
36668 return this.getFont_NoClientCode ();
36669 });
36670 Clazz_defineMethod (c$, "getFont_NoClientCode", 
36671 function () {
36672 var font = this.font;
36673 if (font != null) {
36674 return font;
36675 }var parent = this.parent;
36676 return (parent != null) ? parent.getFont_NoClientCode () : null;
36677 });
36678 Clazz_defineMethod (c$, "setFont", 
36679 function (f) {
36680 this.setFontComp (f);
36681 }, "java.awt.Font");
36682 Clazz_defineMethod (c$, "setFontComp", 
36683 function (f) {
36684 var oldFont;
36685 var newFont;
36686 oldFont = this.font;
36687 newFont = this.font = f;
36688 {
36689 {
36690 }var peer = this.peer;
36691 if (peer != null) {
36692 f = this.getFont ();
36693 if (f != null) {
36694 peer.setFont (f);
36695 this.peerFont = f;
36696 }}}this.firePropertyChangeObject ("font", oldFont, newFont);
36697 if (f !== oldFont && (oldFont == null || !oldFont.equals (f))) {
36698 this.invalidateIfValid ();
36699 }}, "java.awt.Font");
36700 Clazz_defineMethod (c$, "isFontSet", 
36701 function () {
36702 return (this.font != null);
36703 });
36704 Clazz_defineMethod (c$, "getLocale", 
36705 function () {
36706 var locale = this.locale;
36707 if (locale != null) {
36708 return locale;
36709 }var parent = this.parent;
36710 if (parent == null) {
36711 throw  new java.awt.IllegalComponentStateException ("This component must have a parent in order to determine its locale");
36712 } else {
36713 return parent.getLocale ();
36714 }});
36715 Clazz_defineMethod (c$, "setLocale", 
36716 function (l) {
36717 var oldValue = this.locale;
36718 this.locale = l;
36719 this.firePropertyChangeObject ("locale", oldValue, l);
36720 this.invalidateIfValid ();
36721 }, "java.util.Locale");
36722 Clazz_defineMethod (c$, "getLocation", 
36723 function () {
36724 return this.location ();
36725 });
36726 Clazz_defineMethod (c$, "getLocationOnScreen", 
36727 function () {
36728 return this.getLocationOnScreen_NoTreeLock ();
36729 });
36730 Clazz_defineMethod (c$, "getLocationOnScreen_NoTreeLock", 
36731 function () {
36732 if (this.isShowing ()) {
36733 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
36734 var host = this.getNativeContainer ();
36735 var pt = host.peer.getLocationOnScreen ();
36736 for (var c = this; c !== host; c = c.getParent ()) {
36737 pt.x += c.x;
36738 pt.y += c.y;
36739 }
36740 return pt;
36741 } else {
36742 var pt = this.peer.getLocationOnScreen ();
36743 return pt;
36744 }} else {
36745 throw  new java.awt.IllegalComponentStateException ("component must be showing on the screen to determine its location");
36746 }});
36747 Clazz_defineMethod (c$, "location", 
36748 function () {
36749 return this.location_NoClientCode ();
36750 });
36751 Clazz_defineMethod (c$, "location_NoClientCode", 
36752  function () {
36753 return  new java.awt.Point (this.x, this.y);
36754 });
36755 Clazz_defineMethod (c$, "setLocation", 
36756 function (x, y) {
36757 this.setBoundsOp (1);
36758 this.setBounds (x, y, this.width, this.height);
36759 }, "~N,~N");
36760 Clazz_defineMethod (c$, "setLocation", 
36761 function (p) {
36762 this.setLocation (p.x, p.y);
36763 }, "java.awt.Point");
36764 Clazz_defineMethod (c$, "getSize", 
36765 function () {
36766 return this.size ();
36767 });
36768 Clazz_defineMethod (c$, "size", 
36769 function () {
36770 return  new java.awt.Dimension (this.width, this.height);
36771 });
36772 Clazz_defineMethod (c$, "setSize", 
36773 function (width, height) {
36774 {
36775 if (arguments.length == 1) {
36776 var d = arguments[0];
36777 width = d.width;
36778 height = d.height;
36779 }
36780 }this.resize (width, height);
36781 }, "~N,~N");
36782 Clazz_defineMethod (c$, "resize", 
36783 function (width, height) {
36784 this.setBoundsOp (2);
36785 this.setBounds (this.x, this.y, width, height);
36786 }, "~N,~N");
36787 Clazz_defineMethod (c$, "setBounds", 
36788 function (x, y, width, height) {
36789 this.reshape (x, y, width, height);
36790 }, "~N,~N,~N,~N");
36791 Clazz_defineMethod (c$, "setBounds", 
36792 function (r) {
36793 this.setBounds (r.x, r.y, r.width, r.height);
36794 }, "java.awt.Rectangle");
36795 Clazz_defineMethod (c$, "reshape", 
36796 function (x, y, width, height) {
36797 try {
36798 this.setBoundsOp (3);
36799 var resized = (this.width != width) || (this.height != height);
36800 var moved = (this.x != x) || (this.y != y);
36801 if (!resized && !moved) {
36802 return;
36803 }var oldX = this.x;
36804 var oldY = this.y;
36805 var oldWidth = this.width;
36806 var oldHeight = this.height;
36807 this.x = x;
36808 this.y = y;
36809 this.width = width;
36810 this.height = height;
36811 if (resized) {
36812 this.isPacked = false;
36813 System.out.println ("C " + swingjs.JSToolkit.getClassName (this) + " resized to " + this.getBounds ());
36814 }var needNotify = true;
36815 this.mixOnReshaping ();
36816 if (this.peer != null) {
36817 this.reshapeNativePeer (x, y, width, height, this.getBoundsOp ());
36818 resized = (oldWidth != this.width) || (oldHeight != this.height);
36819 moved = (oldX != this.x) || (oldY != this.y);
36820 if (Clazz_instanceOf (this, java.awt.Window)) {
36821 needNotify = false;
36822 }if (resized) {
36823 this.invalidate ();
36824 }if (this.parent != null) {
36825 this.parent.invalidateIfValid ();
36826 }}if (needNotify) {
36827 this.notifyNewBounds (resized, moved);
36828 }this.repaintParentIfNeeded (oldX, oldY, oldWidth, oldHeight);
36829 } finally {
36830 this.setBoundsOp (5);
36831 }
36832 }, "~N,~N,~N,~N");
36833 Clazz_defineMethod (c$, "repaintParentIfNeeded", 
36834  function (oldX, oldY, oldWidth, oldHeight) {
36835 if (this.parent != null && Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer) && this.isShowing ()) {
36836 this.parent.repaint (oldX, oldY, oldWidth, oldHeight);
36837 this.repaint ();
36838 }}, "~N,~N,~N,~N");
36839 Clazz_defineMethod (c$, "reshapeNativePeer", 
36840  function (x, y, width, height, op) {
36841 var nativeX = x;
36842 var nativeY = y;
36843 for (var c = this.parent; (c != null) && (Clazz_instanceOf (c.peer, java.awt.peer.LightweightPeer)); c = c.parent) {
36844 nativeX += c.x;
36845 nativeY += c.y;
36846 }
36847 this.peer.setBounds (nativeX, nativeY, width, height, op);
36848 }, "~N,~N,~N,~N,~N");
36849 Clazz_defineMethod (c$, "notifyNewBounds", 
36850  function (resized, moved) {
36851 if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36852 if (resized) {
36853 var e =  new java.awt.event.ComponentEvent (this, 101);
36854 java.awt.Toolkit.getEventQueue ().postEvent (e);
36855 }if (moved) {
36856 var e =  new java.awt.event.ComponentEvent (this, 100);
36857 java.awt.Toolkit.getEventQueue ().postEvent (e);
36858 }} else {
36859 if (Clazz_instanceOf (this, java.awt.Container) && (this).countComponents () > 0) {
36860 var enabledOnToolkit = java.awt.Toolkit.enabledOnToolkit (65536);
36861 if (resized) {
36862 (this).createChildHierarchyEvents (1402, 0, enabledOnToolkit);
36863 }if (moved) {
36864 (this).createChildHierarchyEvents (1401, 0, enabledOnToolkit);
36865 }}}}, "~B,~B");
36866 Clazz_defineMethod (c$, "getX", 
36867 function () {
36868 return this.x;
36869 });
36870 Clazz_defineMethod (c$, "getY", 
36871 function () {
36872 return this.y;
36873 });
36874 Clazz_defineMethod (c$, "getWidth", 
36875 function () {
36876 return this.width;
36877 });
36878 Clazz_defineMethod (c$, "getHeight", 
36879 function () {
36880 return this.height;
36881 });
36882 Clazz_defineMethod (c$, "getBounds", 
36883 function (rv) {
36884 if (rv == null) return  new java.awt.Rectangle (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36885 rv.reshape (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36886 return rv;
36887 }, "java.awt.Rectangle");
36888 Clazz_defineMethod (c$, "getSize", 
36889 function (rv) {
36890 if (rv == null) {
36891 return  new java.awt.Dimension (this.getWidth (), this.getHeight ());
36892 } else {
36893 rv.setSize (this.getWidth (), this.getHeight ());
36894 return rv;
36895 }}, "java.awt.Dimension");
36896 Clazz_defineMethod (c$, "getLocation", 
36897 function (rv) {
36898 if (rv == null) {
36899 return  new java.awt.Point (this.getX (), this.getY ());
36900 } else {
36901 rv.setLocation (this.getX (), this.getY ());
36902 return rv;
36903 }}, "java.awt.Point");
36904 Clazz_defineMethod (c$, "isOpaque", 
36905 function () {
36906 return true;
36907 });
36908 Clazz_defineMethod (c$, "isLightweight", 
36909 function () {
36910 return false;
36911 });
36912 Clazz_defineMethod (c$, "setPreferredSize", 
36913 function (preferredSize) {
36914 this.setPrefSizeComp (preferredSize);
36915 }, "java.awt.Dimension");
36916 Clazz_defineMethod (c$, "setPrefSizeComp", 
36917 function (preferredSize) {
36918 var old = (this.prefSizeSet ? this.prefSize : null);
36919 this.prefSize = preferredSize;
36920 this.prefSizeSet = (preferredSize != null);
36921 this.firePropertyChangeObject ("preferredSize", old, preferredSize);
36922 }, "java.awt.Dimension");
36923 Clazz_defineMethod (c$, "isPreferredSizeSet", 
36924 function () {
36925 return this.prefSizeSet;
36926 });
36927 Clazz_defineMethod (c$, "getPreferredSize", 
36928 function () {
36929 return this.preferredSize ();
36930 });
36931 Clazz_defineMethod (c$, "preferredSize", 
36932 function () {
36933 return this.prefSizeComp ();
36934 });
36935 Clazz_defineMethod (c$, "prefSizeComp", 
36936 function () {
36937 var dim = this.prefSize;
36938 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
36939 this.prefSize = this.getMinimumSize ();
36940 dim = this.prefSize;
36941 }return  new java.awt.Dimension (dim);
36942 });
36943 Clazz_defineMethod (c$, "setMinimumSize", 
36944 function (minimumSize) {
36945 var old;
36946 if (this.minSizeSet) {
36947 old = this.minSize;
36948 } else {
36949 old = null;
36950 }this.minSize = minimumSize;
36951 this.minSizeSet = (minimumSize != null);
36952 this.firePropertyChangeObject ("minimumSize", old, minimumSize);
36953 }, "java.awt.Dimension");
36954 Clazz_defineMethod (c$, "isMinimumSizeSet", 
36955 function () {
36956 return this.minSizeSet;
36957 });
36958 Clazz_defineMethod (c$, "getMinimumSize", 
36959 function () {
36960 return this.minimumSize ();
36961 });
36962 Clazz_defineMethod (c$, "minimumSize", 
36963 function () {
36964 var dim = this.minSize;
36965 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
36966 this.minSize = this.getSize ();
36967 dim = this.minSize;
36968 }return  new java.awt.Dimension (dim);
36969 });
36970 Clazz_defineMethod (c$, "setMaximumSize", 
36971 function (maximumSize) {
36972 var old;
36973 if (this.maxSizeSet) {
36974 old = this.maxSize;
36975 } else {
36976 old = null;
36977 }this.maxSize = maximumSize;
36978 this.maxSizeSet = (maximumSize != null);
36979 this.firePropertyChangeObject ("maximumSize", old, maximumSize);
36980 }, "java.awt.Dimension");
36981 Clazz_defineMethod (c$, "isMaximumSizeSet", 
36982 function () {
36983 return this.maxSizeSet;
36984 });
36985 Clazz_defineMethod (c$, "getMaximumSize", 
36986 function () {
36987 return this.getMaxSizeComp ();
36988 });
36989 Clazz_defineMethod (c$, "getMaxSizeComp", 
36990 function () {
36991 if (this.isMaximumSizeSet ()) {
36992 return  new java.awt.Dimension (this.maxSize);
36993 }return  new java.awt.Dimension (32767, 32767);
36994 });
36995 Clazz_defineMethod (c$, "getAlignmentX", 
36996 function () {
36997 return this.getAlignmentXComp ();
36998 });
36999 Clazz_defineMethod (c$, "getAlignmentXComp", 
37000 function () {
37001 return 0.5;
37002 });
37003 Clazz_defineMethod (c$, "getAlignmentY", 
37004 function () {
37005 return this.getAlignmentYComp ();
37006 });
37007 Clazz_defineMethod (c$, "getAlignmentYComp", 
37008 function () {
37009 return 0.5;
37010 });
37011 Clazz_defineMethod (c$, "getBaseline", 
37012 function (width, height) {
37013 if (width < 0 || height < 0) {
37014 throw  new IllegalArgumentException ("Width and height must be >= 0");
37015 }return -1;
37016 }, "~N,~N");
37017 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
37018 function () {
37019 return java.awt.Component.BaselineResizeBehavior.OTHER;
37020 });
37021 Clazz_defineMethod (c$, "doLayout", 
37022 function () {
37023 this.layout ();
37024 });
37025 Clazz_defineMethod (c$, "layout", 
37026 function () {
37027 });
37028 Clazz_defineMethod (c$, "validate", 
37029 function () {
37030 this.validateComponent ();
37031 });
37032 Clazz_defineMethod (c$, "validateComponent", 
37033 function () {
37034 {
37035 var peer = this.peer;
37036 var wasValid = this.isValid ();
37037 if (!wasValid && peer != null) {
37038 var newfont = this.getFont ();
37039 var oldfont = this.peerFont;
37040 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
37041 peer.setFont (newfont);
37042 this.peerFont = newfont;
37043 }peer.layout ();
37044 }this.valid = true;
37045 if (!wasValid) {
37046 this.mixOnValidating ();
37047 }}});
37048 Clazz_defineMethod (c$, "invalidate", 
37049 function () {
37050 this.invalidateComp ();
37051 });
37052 Clazz_defineMethod (c$, "invalidateComp", 
37053 function () {
37054 this.valid = false;
37055 if (!this.isPreferredSizeSet ()) {
37056 this.prefSize = null;
37057 }if (!this.isMinimumSizeSet ()) {
37058 this.minSize = null;
37059 }if (!this.isMaximumSizeSet ()) {
37060 this.maxSize = null;
37061 }if (this.parent != null) {
37062 this.parent.invalidateIfValid ();
37063 }});
37064 Clazz_defineMethod (c$, "invalidateIfValid", 
37065 function () {
37066 if (this.isValid ()) {
37067 this.invalidate ();
37068 }});
37069 Clazz_defineMethod (c$, "getGraphics", 
37070 function () {
37071 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37072 if (this.parent == null) return null;
37073 var g = this.parent.getGraphics ();
37074 if (g == null) return null;
37075 g.setFont (this.getFont ());
37076 return g;
37077 } else {
37078 var peer = this.peer;
37079 return (peer != null) ? peer.getGraphics () : null;
37080 }});
37081 Clazz_defineMethod (c$, "getTreeLock", 
37082 function () {
37083 return this;
37084 });
37085 Clazz_defineMethod (c$, "getFontMetrics", 
37086 function (font) {
37087 return jssun.font.FontDesignMetrics.getMetrics (font);
37088 }, "java.awt.Font");
37089 Clazz_defineMethod (c$, "setCursor", 
37090 function (cursor) {
37091 this.cursor = cursor;
37092 this.updateCursorImmediately ();
37093 }, "java.awt.Cursor");
37094 Clazz_defineMethod (c$, "updateCursorImmediately", 
37095 function () {
37096 });
37097 Clazz_defineMethod (c$, "getCursor", 
37098 function () {
37099 return this.getCursor_NoClientCode ();
37100 });
37101 Clazz_defineMethod (c$, "getCursor_NoClientCode", 
37102 function () {
37103 var cursor = this.cursor;
37104 if (cursor != null) {
37105 return cursor;
37106 }var parent = this.parent;
37107 if (parent != null) {
37108 return parent.getCursor_NoClientCode ();
37109 } else {
37110 return java.awt.Cursor.getPredefinedCursor (0);
37111 }});
37112 Clazz_defineMethod (c$, "isCursorSet", 
37113 function () {
37114 return (this.cursor != null);
37115 });
37116 Clazz_defineMethod (c$, "paint", 
37117 function (g) {
37118 }, "java.awt.Graphics");
37119 Clazz_defineMethod (c$, "update", 
37120 function (g) {
37121 this.paint (g);
37122 }, "java.awt.Graphics");
37123 Clazz_defineMethod (c$, "paintAll", 
37124 function (g) {
37125 }, "java.awt.Graphics");
37126 Clazz_defineMethod (c$, "lightweightPaint", 
37127 function (g) {
37128 this.lwPaintComp (g);
37129 }, "java.awt.Graphics");
37130 Clazz_defineMethod (c$, "lwPaintComp", 
37131 function (g) {
37132 this.paint (g);
37133 }, "java.awt.Graphics");
37134 Clazz_defineMethod (c$, "paintHeavyweightComponents", 
37135 function (g) {
37136 }, "java.awt.Graphics");
37137 Clazz_defineMethod (c$, "repaint", 
37138 function () {
37139 this.repaintImpl (0, 0, 0, this.width, this.height);
37140 });
37141 Clazz_defineMethod (c$, "repaint", 
37142 function (tm) {
37143 this.repaintImpl (tm, 0, 0, this.width, this.height);
37144 }, "~N");
37145 Clazz_defineMethod (c$, "repaint", 
37146 function (x, y, width, height) {
37147 this.repaintImpl (0, x, y, width, height);
37148 }, "~N,~N,~N,~N");
37149 Clazz_defineMethod (c$, "repaint", 
37150 function (tm, x, y, width, height) {
37151 this.repaintImpl (tm, x, y, width, height);
37152 }, "~N,~N,~N,~N,~N");
37153 Clazz_defineMethod (c$, "repaintImpl", 
37154 function (tm, x, y, width, height) {
37155 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37156 if (this.parent != null) {
37157 var px = this.x + ((x < 0) ? 0 : x);
37158 var py = this.y + ((y < 0) ? 0 : y);
37159 var pwidth = (width > this.width) ? this.width : width;
37160 var pheight = (height > this.height) ? this.height : height;
37161 this.parent.repaint (tm, px, py, pwidth, pheight);
37162 }} else {
37163 if (this.isVisible () && (this.peer != null) && (width > 0) && (height > 0)) {
37164 var e =  new java.awt.event.PaintEvent (this, 801,  new java.awt.Rectangle (x, y, width, height));
37165 java.awt.Toolkit.getEventQueue ().postEvent (e);
37166 }}}, "~N,~N,~N,~N,~N");
37167 Clazz_defineMethod (c$, "print", 
37168 function (g) {
37169 this.paint (g);
37170 }, "java.awt.Graphics");
37171 Clazz_defineMethod (c$, "printAll", 
37172 function (g) {
37173 }, "java.awt.Graphics");
37174 Clazz_defineMethod (c$, "printHeavyweightComponents", 
37175 function (g) {
37176 }, "java.awt.Graphics");
37177 Clazz_overrideMethod (c$, "imageUpdate", 
37178 function (img, infoflags, x, y, w, h) {
37179 return false;
37180 }, "java.awt.Image,~N,~N,~N,~N,~N");
37181 Clazz_defineMethod (c$, "createImage", 
37182 function (producer) {
37183 return this.getToolkit ().createImage (producer);
37184 }, "java.awt.image.ImageProducer");
37185 Clazz_defineMethod (c$, "createImage", 
37186 function (width, height) {
37187 return java.awt.Toolkit.getDefaultToolkit ().createImage (null, width, height);
37188 }, "~N,~N");
37189 Clazz_defineMethod (c$, "createVolatileImage", 
37190 function (width, height) {
37191 return null;
37192 }, "~N,~N");
37193 Clazz_defineMethod (c$, "createVolatileImage", 
37194 function (width, height, caps) {
37195 return this.createVolatileImage (width, height);
37196 }, "~N,~N,java.awt.ImageCapabilities");
37197 Clazz_defineMethod (c$, "prepareImage", 
37198 function (image, observer) {
37199 return this.prepareImage (image, -1, -1, observer);
37200 }, "java.awt.Image,java.awt.image.ImageObserver");
37201 Clazz_defineMethod (c$, "prepareImage", 
37202 function (image, width, height, observer) {
37203 return false;
37204 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37205 Clazz_defineMethod (c$, "checkImage", 
37206 function (image, observer) {
37207 return this.checkImage (image, -1, -1, observer);
37208 }, "java.awt.Image,java.awt.image.ImageObserver");
37209 Clazz_defineMethod (c$, "checkImage", 
37210 function (image, width, height, observer) {
37211 return 0;
37212 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37213 Clazz_defineMethod (c$, "setIgnoreRepaint", 
37214 function (ignoreRepaint) {
37215 }, "~B");
37216 Clazz_defineMethod (c$, "getIgnoreRepaint", 
37217 function () {
37218 return false;
37219 });
37220 Clazz_defineMethod (c$, "contains", 
37221 function (x, y) {
37222 return this.inside (x, y);
37223 }, "~N,~N");
37224 Clazz_defineMethod (c$, "inside", 
37225 function (x, y) {
37226 return (x >= 0) && (x < this.width) && (y >= 0) && (y < this.height);
37227 }, "~N,~N");
37228 Clazz_defineMethod (c$, "getComponentAt", 
37229 function (x, y) {
37230 return this.locate (x, y);
37231 }, "~N,~N");
37232 Clazz_defineMethod (c$, "locate", 
37233 function (x, y) {
37234 return this.contains (x, y) ? this : null;
37235 }, "~N,~N");
37236 Clazz_defineMethod (c$, "getComponentAt", 
37237 function (p) {
37238 return this.getComponentAt (p.x, p.y);
37239 }, "java.awt.Point");
37240 Clazz_defineMethod (c$, "deliverEvent", 
37241 function (e) {
37242 this.postEvent (e);
37243 }, "java.awt.Event");
37244 Clazz_defineMethod (c$, "dispatchEvent", 
37245 function (e) {
37246 this.dispatchEventImpl (e);
37247 }, "java.awt.AWTEvent");
37248 Clazz_defineMethod (c$, "dispatchEventImpl", 
37249 function (e) {
37250 this.dispatchEventImplComp (e);
37251 }, "java.awt.AWTEvent");
37252 Clazz_defineMethod (c$, "dispatchEventImplComp", 
37253 function (e) {
37254 var id = e.getID ();
37255 java.awt.EventQueue.setCurrentEventAndMostRecentTime (e);
37256 if (!e.focusManagerIsDispatching) {
37257 if (e.isPosted) {
37258 e.isPosted = true;
37259 }}if (!e.isConsumed ()) {
37260 if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37261 if (e.isConsumed ()) {
37262 return;
37263 }}}if (this.areInputMethodsEnabled ()) {
37264 if ((Clazz_instanceOf (e, java.awt.event.InputEvent)) || (Clazz_instanceOf (e, java.awt.event.FocusEvent))) {
37265 }} else {
37266 if (id == 1004) {
37267 }}switch (id) {
37268 case 401:
37269 case 402:
37270 var p = ((Clazz_instanceOf (this, java.awt.Container)) ? this : this.parent);
37271 if (p != null) {
37272 p.preProcessKeyEvent (e);
37273 }break;
37274 case 201:
37275 break;
37276 default:
37277 break;
37278 }
37279 if (this.newEventsOnly) {
37280 if (this.eventEnabled (e)) {
37281 this.processEvent (e);
37282 }} else if (id == 507) {
37283 this.autoProcessMouseWheel (e);
37284 } else if (!(Clazz_instanceOf (e, java.awt.event.MouseEvent) && !this.postsOldMouseEvents ())) {
37285 }if (id == 201 && !e.isConsumed ()) {
37286 }if (!(Clazz_instanceOf (e, java.awt.event.KeyEvent))) {
37287 }}, "java.awt.AWTEvent");
37288 Clazz_defineMethod (c$, "autoProcessMouseWheel", 
37289 function (e) {
37290 }, "java.awt.event.MouseWheelEvent");
37291 Clazz_defineMethod (c$, "dispatchMouseWheelToAncestor", 
37292 function (e) {
37293 var newX;
37294 var newY;
37295 newX = e.getX () + this.getX ();
37296 newY = e.getY () + this.getY ();
37297 var newMWE;
37298 {
37299 var anc = this.getParent ();
37300 while (anc != null && !anc.eventEnabled (e)) {
37301 newX += anc.getX ();
37302 newY += anc.getY ();
37303 if (!(Clazz_instanceOf (anc, java.awt.Window))) {
37304 anc = anc.getParent ();
37305 } else {
37306 break;
37307 }}
37308 if (anc != null && anc.eventEnabled (e)) {
37309 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 ());
37310 (e).copyPrivateDataInto (newMWE);
37311 anc.dispatchEventToSelf (newMWE);
37312 }}return true;
37313 }, "java.awt.event.MouseWheelEvent");
37314 Clazz_defineMethod (c$, "checkWindowClosingException", 
37315 function () {
37316 if (this.windowClosingException != null) {
37317 if (Clazz_instanceOf (this, java.awt.Dialog)) {
37318 (this).interruptBlocking ();
37319 } else {
37320 this.windowClosingException.fillInStackTrace ();
37321 this.windowClosingException.printStackTrace ();
37322 this.windowClosingException = null;
37323 }return true;
37324 }return false;
37325 });
37326 Clazz_defineMethod (c$, "areInputMethodsEnabled", 
37327 function () {
37328 return ((this.eventMask & 4096) != 0) && ((this.eventMask & 8) != 0 || this.keyListener != null);
37329 });
37330 Clazz_defineMethod (c$, "eventEnabled", 
37331 function (e) {
37332 return this.eventTypeEnabled (e.id);
37333 }, "java.awt.AWTEvent");
37334 Clazz_defineMethod (c$, "eventTypeEnabled", 
37335 function (type) {
37336 switch (type) {
37337 case 100:
37338 case 101:
37339 case 102:
37340 case 103:
37341 if ((this.eventMask & 1) != 0 || this.componentListener != null) {
37342 return true;
37343 }break;
37344 case 1004:
37345 case 1005:
37346 if ((this.eventMask & 4) != 0 || this.focusListener != null) {
37347 return true;
37348 }break;
37349 case 401:
37350 case 402:
37351 case 400:
37352 if ((this.eventMask & 8) != 0 || this.keyListener != null) {
37353 return true;
37354 }break;
37355 case 501:
37356 case 502:
37357 case 504:
37358 case 505:
37359 case 500:
37360 if ((this.eventMask & 16) != 0 || this.mouseListener != null) {
37361 return true;
37362 }break;
37363 case 503:
37364 case 506:
37365 if ((this.eventMask & 32) != 0 || this.mouseMotionListener != null) {
37366 return true;
37367 }break;
37368 case 507:
37369 if ((this.eventMask & 131072) != 0 || this.mouseWheelListener != null) {
37370 return true;
37371 }break;
37372 case 1100:
37373 case 1101:
37374 if ((this.eventMask & 2048) != 0 || this.inputMethodListener != null) {
37375 return true;
37376 }break;
37377 case 1400:
37378 if ((this.eventMask & 32768) != 0 || this.hierarchyListener != null) {
37379 return true;
37380 }break;
37381 case 1401:
37382 case 1402:
37383 if ((this.eventMask & 65536) != 0 || this.hierarchyBoundsListener != null) {
37384 return true;
37385 }break;
37386 case 1001:
37387 if ((this.eventMask & 128) != 0) {
37388 return true;
37389 }break;
37390 case 900:
37391 if ((this.eventMask & 1024) != 0) {
37392 return true;
37393 }break;
37394 case 701:
37395 if ((this.eventMask & 512) != 0) {
37396 return true;
37397 }break;
37398 case 601:
37399 if ((this.eventMask & 256) != 0) {
37400 return true;
37401 }break;
37402 default:
37403 break;
37404 }
37405 if (type > 1999) {
37406 return true;
37407 }return false;
37408 }, "~N");
37409 Clazz_defineMethod (c$, "postEvent", 
37410 function (e) {
37411 if (this.handleEvent (e)) {
37412 e.consume ();
37413 return true;
37414 }var parent = this.parent;
37415 var eventx = e.x;
37416 var eventy = e.y;
37417 if (parent != null) {
37418 e.translate (this.x, this.y);
37419 if (parent.postEvent (e)) {
37420 e.consume ();
37421 return true;
37422 }e.x = eventx;
37423 e.y = eventy;
37424 }return false;
37425 }, "java.awt.Event");
37426 Clazz_defineMethod (c$, "addComponentListener", 
37427 function (l) {
37428 if (l == null) {
37429 return;
37430 }this.componentListener = java.awt.AWTEventMulticaster.add (this.componentListener, l);
37431 this.newEventsOnly = true;
37432 }, "java.awt.event.ComponentListener");
37433 Clazz_defineMethod (c$, "removeComponentListener", 
37434 function (l) {
37435 if (l == null) {
37436 return;
37437 }this.componentListener = java.awt.AWTEventMulticaster.remove (this.componentListener, l);
37438 }, "java.awt.event.ComponentListener");
37439 Clazz_defineMethod (c$, "getComponentListeners", 
37440 function () {
37441 return (this.getListeners (java.awt.event.ComponentListener));
37442 });
37443 Clazz_defineMethod (c$, "addFocusListener", 
37444 function (l) {
37445 if (l == null) {
37446 return;
37447 }this.focusListener = java.awt.AWTEventMulticaster.add (this.focusListener, l);
37448 this.newEventsOnly = true;
37449 }, "java.awt.event.FocusListener");
37450 Clazz_defineMethod (c$, "removeFocusListener", 
37451 function (l) {
37452 if (l == null) {
37453 return;
37454 }this.focusListener = java.awt.AWTEventMulticaster.remove (this.focusListener, l);
37455 }, "java.awt.event.FocusListener");
37456 Clazz_defineMethod (c$, "getFocusListeners", 
37457 function () {
37458 return (this.getListeners (java.awt.event.FocusListener));
37459 });
37460 Clazz_defineMethod (c$, "addHierarchyListener", 
37461 function (l) {
37462 }, "java.awt.event.HierarchyListener");
37463 Clazz_defineMethod (c$, "removeHierarchyListener", 
37464 function (l) {
37465 }, "java.awt.event.HierarchyListener");
37466 Clazz_defineMethod (c$, "getHierarchyListeners", 
37467 function () {
37468 return (this.getListeners (java.awt.event.HierarchyListener));
37469 });
37470 Clazz_defineMethod (c$, "addHierarchyBoundsListener", 
37471 function (l) {
37472 if (l == null) {
37473 return;
37474 }var notifyAncestors;
37475 {
37476 notifyAncestors = (this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0);
37477 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.add (this.hierarchyBoundsListener, l);
37478 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener != null);
37479 this.newEventsOnly = true;
37480 }if (notifyAncestors) {
37481 {
37482 this.adjustListeningChildrenOnParent (65536, 1);
37483 }}}, "java.awt.event.HierarchyBoundsListener");
37484 Clazz_defineMethod (c$, "removeHierarchyBoundsListener", 
37485 function (l) {
37486 if (l == null) {
37487 return;
37488 }var notifyAncestors;
37489 {
37490 notifyAncestors = (this.hierarchyBoundsListener != null && (this.eventMask & 65536) == 0);
37491 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.remove (this.hierarchyBoundsListener, l);
37492 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener == null);
37493 }if (notifyAncestors) {
37494 {
37495 this.adjustListeningChildrenOnParent (65536, -1);
37496 }}}, "java.awt.event.HierarchyBoundsListener");
37497 Clazz_defineMethod (c$, "numListening", 
37498 function (mask) {
37499 return this.numListeningMask (mask);
37500 }, "~N");
37501 Clazz_defineMethod (c$, "numListeningMask", 
37502 function (mask) {
37503 if ((mask == 32768 && (this.hierarchyListener != null || (this.eventMask & 32768) != 0)) || (mask == 65536 && (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0))) {
37504 return 1;
37505 } else {
37506 return 0;
37507 }}, "~N");
37508 Clazz_defineMethod (c$, "countHierarchyMembers", 
37509 function () {
37510 return 1;
37511 });
37512 Clazz_defineMethod (c$, "createHierarchyEvents", 
37513 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37514 return this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
37515 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37516 Clazz_defineMethod (c$, "createHierEventsComp", 
37517 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37518 switch (id) {
37519 case 1400:
37520 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || enabledOnToolkit) {
37521 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent, changeFlags);
37522 this.dispatchEvent (e);
37523 return 1;
37524 }break;
37525 case 1401:
37526 case 1402:
37527 if (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0 || enabledOnToolkit) {
37528 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent);
37529 this.dispatchEvent (e);
37530 return 1;
37531 }break;
37532 default:
37533 break;
37534 }
37535 return 0;
37536 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37537 Clazz_defineMethod (c$, "getHierarchyBoundsListeners", 
37538 function () {
37539 return (this.getListeners (java.awt.event.HierarchyBoundsListener));
37540 });
37541 Clazz_defineMethod (c$, "adjustListeningChildrenOnParent", 
37542 function (mask, num) {
37543 if (this.parent != null) {
37544 this.parent.adjustListeningChildren (mask, num);
37545 }}, "~N,~N");
37546 Clazz_defineMethod (c$, "addKeyListener", 
37547 function (l) {
37548 if (l == null) {
37549 return;
37550 }this.keyListener = java.awt.AWTEventMulticaster.add (this.keyListener, l);
37551 this.newEventsOnly = true;
37552 }, "java.awt.event.KeyListener");
37553 Clazz_defineMethod (c$, "removeKeyListener", 
37554 function (l) {
37555 if (l == null) {
37556 return;
37557 }this.keyListener = java.awt.AWTEventMulticaster.remove (this.keyListener, l);
37558 }, "java.awt.event.KeyListener");
37559 Clazz_defineMethod (c$, "getKeyListeners", 
37560 function () {
37561 return (this.getListeners (java.awt.event.KeyListener));
37562 });
37563 Clazz_defineMethod (c$, "addMouseListener", 
37564 function (l) {
37565 if (l == null) {
37566 return;
37567 }System.out.println ("C adding mouse listener " + l);
37568 this.mouseListener = java.awt.AWTEventMulticaster.add (this.mouseListener, l);
37569 this.newEventsOnly = true;
37570 }, "java.awt.event.MouseListener");
37571 Clazz_defineMethod (c$, "removeMouseListener", 
37572 function (l) {
37573 if (l == null) {
37574 return;
37575 }this.mouseListener = java.awt.AWTEventMulticaster.remove (this.mouseListener, l);
37576 }, "java.awt.event.MouseListener");
37577 Clazz_defineMethod (c$, "getMouseListeners", 
37578 function () {
37579 return (this.getListeners (java.awt.event.MouseListener));
37580 });
37581 Clazz_defineMethod (c$, "addMouseMotionListener", 
37582 function (l) {
37583 if (l == null) {
37584 return;
37585 }this.mouseMotionListener = java.awt.AWTEventMulticaster.add (this.mouseMotionListener, l);
37586 this.newEventsOnly = true;
37587 }, "java.awt.event.MouseMotionListener");
37588 Clazz_defineMethod (c$, "removeMouseMotionListener", 
37589 function (l) {
37590 if (l == null) {
37591 return;
37592 }this.mouseMotionListener = java.awt.AWTEventMulticaster.remove (this.mouseMotionListener, l);
37593 }, "java.awt.event.MouseMotionListener");
37594 Clazz_defineMethod (c$, "getMouseMotionListeners", 
37595 function () {
37596 return (this.getListeners (java.awt.event.MouseMotionListener));
37597 });
37598 Clazz_defineMethod (c$, "addMouseWheelListener", 
37599 function (l) {
37600 if (l == null) {
37601 return;
37602 }this.mouseWheelListener = java.awt.AWTEventMulticaster.add (this.mouseWheelListener, l);
37603 this.newEventsOnly = true;
37604 }, "java.awt.event.MouseWheelListener");
37605 Clazz_defineMethod (c$, "removeMouseWheelListener", 
37606 function (l) {
37607 if (l == null) {
37608 return;
37609 }this.mouseWheelListener = java.awt.AWTEventMulticaster.remove (this.mouseWheelListener, l);
37610 }, "java.awt.event.MouseWheelListener");
37611 Clazz_defineMethod (c$, "getMouseWheelListeners", 
37612 function () {
37613 return (this.getListeners (java.awt.event.MouseWheelListener));
37614 });
37615 Clazz_defineMethod (c$, "addInputMethodListener", 
37616 function (l) {
37617 if (l == null) {
37618 return;
37619 }this.inputMethodListener = java.awt.AWTEventMulticaster.add (this.inputMethodListener, l);
37620 this.newEventsOnly = true;
37621 }, "java.awt.event.InputMethodListener");
37622 Clazz_defineMethod (c$, "removeInputMethodListener", 
37623 function (l) {
37624 if (l == null) {
37625 return;
37626 }this.inputMethodListener = java.awt.AWTEventMulticaster.remove (this.inputMethodListener, l);
37627 }, "java.awt.event.InputMethodListener");
37628 Clazz_defineMethod (c$, "getInputMethodListeners", 
37629 function () {
37630 return (this.getListeners (java.awt.event.InputMethodListener));
37631 });
37632 Clazz_defineMethod (c$, "getListeners", 
37633 function (listenerType) {
37634 return this.getListenersComp (listenerType);
37635 }, "Class");
37636 Clazz_defineMethod (c$, "getListenersComp", 
37637 function (listenerType) {
37638 var l = null;
37639 if (listenerType === java.awt.event.ComponentListener) {
37640 l = this.componentListener;
37641 } else if (listenerType === java.awt.event.FocusListener) {
37642 l = this.focusListener;
37643 } else if (listenerType === java.awt.event.HierarchyListener) {
37644 l = this.hierarchyListener;
37645 } else if (listenerType === java.awt.event.HierarchyBoundsListener) {
37646 l = this.hierarchyBoundsListener;
37647 } else if (listenerType === java.awt.event.KeyListener) {
37648 l = this.keyListener;
37649 } else if (listenerType === java.awt.event.MouseListener) {
37650 l = this.mouseListener;
37651 } else if (listenerType === java.awt.event.MouseMotionListener) {
37652 l = this.mouseMotionListener;
37653 } else if (listenerType === java.awt.event.MouseWheelListener) {
37654 l = this.mouseWheelListener;
37655 } else if (listenerType === java.awt.event.InputMethodListener) {
37656 l = this.inputMethodListener;
37657 } else if (listenerType === java.beans.PropertyChangeListener) {
37658 return this.getPropertyChangeListeners ();
37659 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
37660 }, "Class");
37661 Clazz_defineMethod (c$, "enableEvents", 
37662 function (eventsToEnable) {
37663 var notifyAncestors = 0;
37664 {
37665 if ((eventsToEnable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) == 0) {
37666 notifyAncestors |= 32768;
37667 }if ((eventsToEnable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0) {
37668 notifyAncestors |= 65536;
37669 }this.eventMask |= eventsToEnable;
37670 this.newEventsOnly = true;
37671 }if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37672 this.parent.proxyEnableEvents (this.eventMask);
37673 }if (notifyAncestors != 0) {
37674 {
37675 this.adjustListeningChildrenOnParent (notifyAncestors, 1);
37676 }}}, "~N");
37677 Clazz_defineMethod (c$, "disableEvents", 
37678 function (eventsToDisable) {
37679 var notifyAncestors = 0;
37680 {
37681 if ((eventsToDisable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) != 0) {
37682 notifyAncestors |= 32768;
37683 }if ((eventsToDisable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) != 0) {
37684 notifyAncestors |= 65536;
37685 }this.eventMask &= ~eventsToDisable;
37686 }if (notifyAncestors != 0) {
37687 {
37688 this.adjustListeningChildrenOnParent (notifyAncestors, -1);
37689 }}}, "~N");
37690 Clazz_defineMethod (c$, "checkCoalescing", 
37691  function () {
37692 if (this.getClass ().getClassLoader () == null) {
37693 return false;
37694 }var clazz = this.getClass ();
37695 {
37696 var value = java.awt.Component.coalesceMap.get (clazz);
37697 if (value != null) {
37698 return value;
37699 }var enabled = Boolean.$valueOf (swingjs.JSToolkit.checkClassMethod (this, "coalesceEvents", "\\java.awt.AWTEvent\\java.awt.AWTEvent"));
37700 java.awt.Component.coalesceMap.put (clazz, enabled);
37701 return enabled;
37702 }});
37703 Clazz_defineMethod (c$, "isCoalescingEnabled", 
37704 function () {
37705 return this.coalescingEnabled;
37706 });
37707 Clazz_defineMethod (c$, "coalesceEvents", 
37708 function (existingEvent, newEvent) {
37709 return null;
37710 }, "java.awt.AWTEvent,java.awt.AWTEvent");
37711 Clazz_defineMethod (c$, "processEvent", 
37712 function (e) {
37713 this.processEventComp (e);
37714 }, "java.awt.AWTEvent");
37715 Clazz_defineMethod (c$, "processEventComp", 
37716 function (e) {
37717 if (Clazz_instanceOf (e, java.awt.event.FocusEvent)) {
37718 this.processFocusEvent (e);
37719 } else if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
37720 switch (e.getID ()) {
37721 case 501:
37722 case 502:
37723 case 500:
37724 case 504:
37725 case 505:
37726 this.processMouseEvent (e);
37727 break;
37728 case 503:
37729 case 506:
37730 this.processMouseMotionEvent (e);
37731 break;
37732 case 507:
37733 this.processMouseWheelEvent (e);
37734 break;
37735 }
37736 } else if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37737 this.processKeyEvent (e);
37738 } else if (Clazz_instanceOf (e, java.awt.event.ComponentEvent)) {
37739 this.processComponentEvent (e);
37740 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
37741 this.processInputMethodEvent (e);
37742 } else if (Clazz_instanceOf (e, java.awt.event.HierarchyEvent)) {
37743 switch (e.getID ()) {
37744 case 1400:
37745 this.processHierarchyEvent (e);
37746 break;
37747 case 1401:
37748 case 1402:
37749 this.processHierarchyBoundsEvent (e);
37750 break;
37751 }
37752 }}, "java.awt.AWTEvent");
37753 Clazz_defineMethod (c$, "processComponentEvent", 
37754 function (e) {
37755 var listener = this.componentListener;
37756 if (listener != null) {
37757 var id = e.getID ();
37758 switch (id) {
37759 case 101:
37760 listener.componentResized (e);
37761 break;
37762 case 100:
37763 listener.componentMoved (e);
37764 break;
37765 case 102:
37766 listener.componentShown (e);
37767 break;
37768 case 103:
37769 listener.componentHidden (e);
37770 break;
37771 }
37772 }}, "java.awt.event.ComponentEvent");
37773 Clazz_defineMethod (c$, "processFocusEvent", 
37774 function (e) {
37775 var listener = this.focusListener;
37776 if (listener != null) {
37777 var id = e.getID ();
37778 switch (id) {
37779 case 1004:
37780 listener.focusGained (e);
37781 break;
37782 case 1005:
37783 listener.focusLost (e);
37784 break;
37785 }
37786 }}, "java.awt.event.FocusEvent");
37787 Clazz_defineMethod (c$, "processKeyEvent", 
37788 function (e) {
37789 var listener = this.keyListener;
37790 if (listener != null) {
37791 var id = e.getID ();
37792 switch (id) {
37793 case 400:
37794 listener.keyTyped (e);
37795 break;
37796 case 401:
37797 listener.keyPressed (e);
37798 break;
37799 case 402:
37800 listener.keyReleased (e);
37801 break;
37802 }
37803 }}, "java.awt.event.KeyEvent");
37804 Clazz_defineMethod (c$, "processMouseEvent", 
37805 function (e) {
37806 var listener = this.mouseListener;
37807 if (listener != null) {
37808 var id = e.getID ();
37809 switch (id) {
37810 case 501:
37811 listener.mousePressed (e);
37812 break;
37813 case 502:
37814 listener.mouseReleased (e);
37815 break;
37816 case 500:
37817 listener.mouseClicked (e);
37818 break;
37819 case 505:
37820 listener.mouseExited (e);
37821 break;
37822 case 504:
37823 listener.mouseEntered (e);
37824 break;
37825 }
37826 }}, "java.awt.event.MouseEvent");
37827 Clazz_defineMethod (c$, "processMouseMotionEvent", 
37828 function (e) {
37829 var listener = this.mouseMotionListener;
37830 if (listener != null) {
37831 var id = e.getID ();
37832 switch (id) {
37833 case 503:
37834 listener.mouseMoved (e);
37835 break;
37836 case 506:
37837 listener.mouseDragged (e);
37838 break;
37839 }
37840 }}, "java.awt.event.MouseEvent");
37841 Clazz_defineMethod (c$, "processMouseWheelEvent", 
37842 function (e) {
37843 var listener = this.mouseWheelListener;
37844 if (listener != null) {
37845 var id = e.getID ();
37846 switch (id) {
37847 case 507:
37848 listener.mouseWheelMoved (e);
37849 break;
37850 }
37851 }}, "java.awt.event.MouseWheelEvent");
37852 Clazz_defineMethod (c$, "postsOldMouseEvents", 
37853 function () {
37854 return false;
37855 });
37856 Clazz_defineMethod (c$, "processInputMethodEvent", 
37857 function (e) {
37858 var listener = this.inputMethodListener;
37859 if (listener != null) {
37860 var id = e.getID ();
37861 switch (id) {
37862 case 1100:
37863 listener.inputMethodTextChanged (e);
37864 break;
37865 case 1101:
37866 listener.caretPositionChanged (e);
37867 break;
37868 }
37869 }}, "java.awt.event.InputMethodEvent");
37870 Clazz_defineMethod (c$, "processHierarchyEvent", 
37871 function (e) {
37872 var listener = this.hierarchyListener;
37873 if (listener != null) {
37874 var id = e.getID ();
37875 switch (id) {
37876 case 1400:
37877 listener.hierarchyChanged (e);
37878 break;
37879 }
37880 }}, "java.awt.event.HierarchyEvent");
37881 Clazz_defineMethod (c$, "processHierarchyBoundsEvent", 
37882 function (e) {
37883 var listener = this.hierarchyBoundsListener;
37884 if (listener != null) {
37885 var id = e.getID ();
37886 switch (id) {
37887 case 1401:
37888 listener.ancestorMoved (e);
37889 break;
37890 case 1402:
37891 listener.ancestorResized (e);
37892 break;
37893 }
37894 }}, "java.awt.event.HierarchyEvent");
37895 Clazz_defineMethod (c$, "handleEvent", 
37896 function (evt) {
37897 switch (evt.id) {
37898 case 504:
37899 return this.mouseEnter (evt, evt.x, evt.y);
37900 case 505:
37901 return this.mouseExit (evt, evt.x, evt.y);
37902 case 503:
37903 return this.mouseMove (evt, evt.x, evt.y);
37904 case 501:
37905 return this.mouseDown (evt, evt.x, evt.y);
37906 case 506:
37907 return this.mouseDrag (evt, evt.x, evt.y);
37908 case 502:
37909 return this.mouseUp (evt, evt.x, evt.y);
37910 case 401:
37911 case 403:
37912 return this.keyDown (evt, evt.key);
37913 case 402:
37914 case 404:
37915 return this.keyUp (evt, evt.key);
37916 case 1001:
37917 return this.action (evt, evt.arg);
37918 case 1004:
37919 return this.gotFocus (evt, evt.arg);
37920 case 1005:
37921 return this.lostFocus (evt, evt.arg);
37922 }
37923 return false;
37924 }, "java.awt.Event");
37925 Clazz_defineMethod (c$, "mouseDown", 
37926 function (evt, x, y) {
37927 return false;
37928 }, "java.awt.Event,~N,~N");
37929 Clazz_defineMethod (c$, "mouseDrag", 
37930 function (evt, x, y) {
37931 return false;
37932 }, "java.awt.Event,~N,~N");
37933 Clazz_defineMethod (c$, "mouseUp", 
37934 function (evt, x, y) {
37935 return false;
37936 }, "java.awt.Event,~N,~N");
37937 Clazz_defineMethod (c$, "mouseMove", 
37938 function (evt, x, y) {
37939 return false;
37940 }, "java.awt.Event,~N,~N");
37941 Clazz_defineMethod (c$, "mouseEnter", 
37942 function (evt, x, y) {
37943 return false;
37944 }, "java.awt.Event,~N,~N");
37945 Clazz_defineMethod (c$, "mouseExit", 
37946 function (evt, x, y) {
37947 return false;
37948 }, "java.awt.Event,~N,~N");
37949 Clazz_defineMethod (c$, "keyDown", 
37950 function (evt, key) {
37951 return false;
37952 }, "java.awt.Event,~N");
37953 Clazz_defineMethod (c$, "keyUp", 
37954 function (evt, key) {
37955 return false;
37956 }, "java.awt.Event,~N");
37957 Clazz_defineMethod (c$, "action", 
37958 function (evt, what) {
37959 return false;
37960 }, "java.awt.Event,~O");
37961 Clazz_defineMethod (c$, "addNotify", 
37962 function () {
37963 this.addNotifyComp ();
37964 });
37965 Clazz_defineMethod (c$, "addNotifyComp", 
37966 function () {
37967 {
37968 var peer = this.peer;
37969 if (peer == null || Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
37970 if (peer == null) {
37971 this.peer = peer = this.getToolkit ().createComponent (this);
37972 }if (this.parent != null) {
37973 var mask = 0;
37974 if ((this.mouseListener != null) || ((this.eventMask & 16) != 0)) {
37975 mask |= 16;
37976 }if ((this.mouseMotionListener != null) || ((this.eventMask & 32) != 0)) {
37977 mask |= 32;
37978 }if ((this.mouseWheelListener != null) || ((this.eventMask & 131072) != 0)) {
37979 mask |= 131072;
37980 }if (this.focusListener != null || (this.eventMask & 4) != 0) {
37981 mask |= 4;
37982 }if (this.keyListener != null || (this.eventMask & 8) != 0) {
37983 mask |= 8;
37984 }if (mask != 0) {
37985 this.parent.proxyEnableEvents (mask);
37986 }}} else {
37987 var parent = this.parent;
37988 if (parent != null && Clazz_instanceOf (parent.peer, java.awt.peer.LightweightPeer)) {
37989 this.relocateComponent ();
37990 }}this.invalidate ();
37991 this.peerFont = this.getFont ();
37992 if (this.getContainer () != null && !this.isAddNotifyComplete) {
37993 this.getContainer ().increaseComponentCount (this);
37994 }if (this.parent != null && this.parent.peer != null) {
37995 var parentContPeer = this.parent.peer;
37996 if (Clazz_instanceOf (parentContPeer, java.awt.peer.LightweightPeer) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
37997 var hwParent = this.getNativeContainer ();
37998 if (hwParent != null && hwParent.peer != null) {
37999 parentContPeer = hwParent.peer;
38000 }}}if (!this.isAddNotifyComplete) {
38001 this.mixOnShowing ();
38002 }this.isAddNotifyComplete = true;
38003 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
38004 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
38005 this.dispatchEvent (e);
38006 }}});
38007 Clazz_defineMethod (c$, "getNativeContainer", 
38008 function () {
38009 var p = this.parent;
38010 while (p != null && Clazz_instanceOf (p.peer, java.awt.peer.LightweightPeer)) {
38011 p = p.getParent ();
38012 }
38013 return p;
38014 });
38015 Clazz_defineMethod (c$, "removeNotify", 
38016 function () {
38017 this.removeNotifyComp ();
38018 });
38019 Clazz_defineMethod (c$, "removeNotifyComp", 
38020 function () {
38021 {
38022 if (this.getContainer () != null && this.isAddNotifyComplete) {
38023 this.getContainer ().decreaseComponentCount (this);
38024 }var p = this.peer;
38025 if (p != null) {
38026 var isLightweight = this.isLightweight ();
38027 this.peer = null;
38028 this.peerFont = null;
38029 java.awt.Toolkit.getEventQueue ().removeSourceEvents (this, false);
38030 p.dispose ();
38031 this.mixOnHiding (isLightweight);
38032 this.isAddNotifyComplete = false;
38033 }if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
38034 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
38035 this.dispatchEvent (e);
38036 }}});
38037 Clazz_defineMethod (c$, "gotFocus", 
38038 function (evt, what) {
38039 return false;
38040 }, "java.awt.Event,~O");
38041 Clazz_defineMethod (c$, "lostFocus", 
38042 function (evt, what) {
38043 return false;
38044 }, "java.awt.Event,~O");
38045 Clazz_defineMethod (c$, "isFocusTraversable", 
38046 function () {
38047 if (this.$isFocusTraversableOverridden == 0) {
38048 this.$isFocusTraversableOverridden = 1;
38049 }return this.focusable;
38050 });
38051 Clazz_defineMethod (c$, "isFocusable", 
38052 function () {
38053 return this.isFocusTraversable ();
38054 });
38055 Clazz_defineMethod (c$, "setFocusable", 
38056 function (focusable) {
38057 var oldFocusable;
38058 {
38059 oldFocusable = this.focusable;
38060 this.focusable = focusable;
38061 }this.$isFocusTraversableOverridden = 2;
38062 this.firePropertyChangeObject ("focusable", new Boolean (oldFocusable), new Boolean (focusable));
38063 }, "~B");
38064 Clazz_defineMethod (c$, "isFocusTraversableOverridden", 
38065 function () {
38066 return (this.$isFocusTraversableOverridden != 1);
38067 });
38068 Clazz_defineMethod (c$, "getFocusTraversalKeysEnabled", 
38069 function () {
38070 return this.focusTraversalKeysEnabled;
38071 });
38072 Clazz_defineMethod (c$, "requestFocus", 
38073 function () {
38074 swingjs.JSToolkit.requestFocus (this);
38075 });
38076 Clazz_defineMethod (c$, "requestFocus", 
38077 function (temporary) {
38078 return swingjs.JSToolkit.requestFocus (this);
38079 }, "~B");
38080 Clazz_defineMethod (c$, "requestFocusInWindow", 
38081 function () {
38082 return swingjs.JSToolkit.requestFocus (this);
38083 });
38084 Clazz_defineMethod (c$, "requestFocusInWindow", 
38085 function (temporary) {
38086 return swingjs.JSToolkit.requestFocus (this);
38087 }, "~B");
38088 Clazz_defineMethod (c$, "getFocusCycleRootAncestor", 
38089 function () {
38090 var rootAncestor = this.parent;
38091 while (rootAncestor != null && !rootAncestor.isFocusCycleRoot ()) {
38092 rootAncestor = rootAncestor.parent;
38093 }
38094 return rootAncestor;
38095 });
38096 Clazz_defineMethod (c$, "isFocusCycleRoot", 
38097 function (container) {
38098 return this.isFocusCycleRootComp (container);
38099 }, "java.awt.Container");
38100 Clazz_defineMethod (c$, "isFocusCycleRootComp", 
38101 function (container) {
38102 var rootAncestor = this.getFocusCycleRootAncestor ();
38103 return (rootAncestor === container);
38104 }, "java.awt.Container");
38105 Clazz_defineMethod (c$, "hasFocus", 
38106 function () {
38107 return swingjs.JSToolkit.hasFocus (this);
38108 });
38109 Clazz_defineMethod (c$, "isFocusOwner", 
38110 function () {
38111 return this.hasFocus ();
38112 });
38113 Clazz_defineMethod (c$, "setAutoFocusTransferOnDisposal", 
38114 function (value) {
38115 this.autoFocusTransferOnDisposal = value;
38116 }, "~B");
38117 Clazz_defineMethod (c$, "isAutoFocusTransferOnDisposal", 
38118 function () {
38119 return this.autoFocusTransferOnDisposal;
38120 });
38121 Clazz_defineMethod (c$, "paramString", 
38122 function () {
38123 return this.paramStringComp ();
38124 });
38125 Clazz_defineMethod (c$, "paramStringComp", 
38126 function () {
38127 var thisName = this.getName ();
38128 var str = (thisName != null ? thisName : "");
38129 if (!this.isValid ()) {
38130 str += ",invalid";
38131 }if (!this.visible) {
38132 str += ",hidden";
38133 }if (!this.enabled) {
38134 str += ",disabled";
38135 }str += ",parent:" + (this.parent == null ? null : this.parent.getName ()) + "," + this.x + "," + this.y + "," + this.width + "x" + this.height;
38136 return str;
38137 });
38138 Clazz_overrideMethod (c$, "toString", 
38139 function () {
38140 return this.getClass ().getName () + "[" + this.paramString () + "]";
38141 });
38142 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38143 function (listener) {
38144 this.addPropChangeListenerComp (listener);
38145 }, "java.beans.PropertyChangeListener");
38146 Clazz_defineMethod (c$, "addPropChangeListenerComp", 
38147 function (listener) {
38148 {
38149 if (listener == null) {
38150 return;
38151 }if (this.changeSupport == null) {
38152 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38153 }this.changeSupport.addPropertyChangeListener1 (listener);
38154 }}, "java.beans.PropertyChangeListener");
38155 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38156 function (listener) {
38157 {
38158 if (listener == null || this.changeSupport == null) {
38159 return;
38160 }this.changeSupport.removePropertyChangeListener (listener);
38161 }}, "java.beans.PropertyChangeListener");
38162 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38163 function () {
38164 {
38165 if (this.changeSupport == null) {
38166 return  new Array (0);
38167 }return this.changeSupport.getPropertyChangeListeners ();
38168 }});
38169 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38170 function (propertyName, listener) {
38171 this.addPropChangeListComp (propertyName, listener);
38172 }, "~S,java.beans.PropertyChangeListener");
38173 Clazz_defineMethod (c$, "addPropChangeListComp", 
38174 function (propertyName, listener) {
38175 {
38176 if (arguments.length == 1) {
38177 addPropertyChangeListener1(propertyName); return; }
38178 }{
38179 if (listener == null) {
38180 return;
38181 }if (this.changeSupport == null) {
38182 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38183 }this.changeSupport.addPropertyChangeListener2 (propertyName, listener);
38184 }}, "~S,java.beans.PropertyChangeListener");
38185 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38186 function (propertyName, listener) {
38187 {
38188 if (listener == null || this.changeSupport == null) {
38189 return;
38190 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
38191 }}, "~S,java.beans.PropertyChangeListener");
38192 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38193 function (propertyName) {
38194 {
38195 if (this.changeSupport == null) {
38196 return  new Array (0);
38197 }return this.changeSupport.getPropertyChangeListeners (propertyName);
38198 }}, "~S");
38199 Clazz_defineMethod (c$, "firePropertyChange", 
38200 function (propertyName, oldValue, newValue) {
38201 this.firePropertyChangeObject (propertyName, oldValue, newValue);
38202 }, "~S,~O,~O");
38203 Clazz_defineMethod (c$, "firePropertyChangeObject", 
38204 function (propertyName, oldValue, newValue) {
38205 var changeSupport;
38206 {
38207 changeSupport = this.changeSupport;
38208 }if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
38209 return;
38210 }changeSupport.firePropertyChange (propertyName, oldValue, newValue);
38211 }, "~S,~O,~O");
38212 Clazz_defineMethod (c$, "firePropertyChange", 
38213 function (propertyName, oldValue, newValue) {
38214 this.firePropertyChangeBool (propertyName, oldValue, newValue);
38215 }, "~S,~B,~B");
38216 Clazz_defineMethod (c$, "firePropertyChangeBool", 
38217 function (propertyName, oldValue, newValue) {
38218 var changeSupport = this.changeSupport;
38219 if (changeSupport == null || oldValue == newValue) {
38220 return;
38221 }changeSupport.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
38222 }, "~S,~B,~B");
38223 Clazz_defineMethod (c$, "firePropertyChange", 
38224 function (propertyName, oldValue, newValue) {
38225 this.firePropertyChangeInt (propertyName, oldValue, newValue);
38226 }, "~S,~N,~N");
38227 Clazz_defineMethod (c$, "firePropertyChangeInt", 
38228 function (propertyName, oldValue, newValue) {
38229 var changeSupport = this.changeSupport;
38230 if (changeSupport == null || oldValue == newValue) {
38231 return;
38232 }changeSupport.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
38233 }, "~S,~N,~N");
38234 Clazz_defineMethod (c$, "firePropertyChange", 
38235 function (propertyName, oldValue, newValue) {
38236 this.firePropertyChangeChar (propertyName, oldValue, newValue);
38237 }, "~S,~S,~S");
38238 Clazz_defineMethod (c$, "firePropertyChangeChar", 
38239 function (propertyName, oldValue, newValue) {
38240 if (this.changeSupport == null || oldValue == newValue) {
38241 return;
38242 }this.firePropertyChangeObject (propertyName,  new Character (oldValue),  new Character (newValue));
38243 }, "~S,~S,~S");
38244 Clazz_defineMethod (c$, "firePropertyChangeShort", 
38245 function (propertyName, oldValue, newValue) {
38246 if (this.changeSupport == null || oldValue == newValue) {
38247 return;
38248 }this.firePropertyChangeObject (propertyName, Short.$valueOf (oldValue), Short.$valueOf (newValue));
38249 }, "~S,~N,~N");
38250 Clazz_defineMethod (c$, "firePropertyChangeLong", 
38251 function (propertyName, oldValue, newValue) {
38252 if (this.changeSupport == null || oldValue == newValue) {
38253 return;
38254 }this.firePropertyChangeObject (propertyName, Long.$valueOf (oldValue), Long.$valueOf (newValue));
38255 }, "~S,~N,~N");
38256 Clazz_defineMethod (c$, "firePropertyChangeFloat", 
38257 function (propertyName, oldValue, newValue) {
38258 if (this.changeSupport == null || oldValue == newValue) {
38259 return;
38260 }this.firePropertyChangeObject (propertyName, Float.$valueOf (oldValue), Float.$valueOf (newValue));
38261 }, "~S,~N,~N");
38262 Clazz_defineMethod (c$, "firePropertyChangeDouble", 
38263 function (propertyName, oldValue, newValue) {
38264 if (this.changeSupport == null || oldValue == newValue) {
38265 return;
38266 }this.firePropertyChangeObject (propertyName, Double.$valueOf (oldValue), Double.$valueOf (newValue));
38267 }, "~S,~N,~N");
38268 Clazz_defineMethod (c$, "setComponentOrientation", 
38269 function (o) {
38270 var oldValue = this.componentOrientation;
38271 this.componentOrientation = o;
38272 this.firePropertyChangeObject ("componentOrientation", oldValue, o);
38273 this.invalidateIfValid ();
38274 }, "java.awt.ComponentOrientation");
38275 Clazz_defineMethod (c$, "getComponentOrientation", 
38276 function () {
38277 return this.componentOrientation;
38278 });
38279 Clazz_defineMethod (c$, "applyComponentOrientation", 
38280 function (orientation) {
38281 this.applyCompOrientComp (orientation);
38282 }, "java.awt.ComponentOrientation");
38283 Clazz_defineMethod (c$, "applyCompOrientComp", 
38284 function (orientation) {
38285 if (orientation == null) {
38286 throw  new NullPointerException ();
38287 }this.setComponentOrientation (orientation);
38288 }, "java.awt.ComponentOrientation");
38289 Clazz_defineMethod (c$, "canBeFocusOwner", 
38290 function () {
38291 if (this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ()) {
38292 return true;
38293 }return false;
38294 });
38295 Clazz_defineMethod (c$, "canBeFocusOwnerRecursively", 
38296 function () {
38297 if (!this.canBeFocusOwner ()) {
38298 return false;
38299 }if (this.parent != null) {
38300 return this.parent.canContainFocusOwner (this);
38301 }return true;
38302 });
38303 Clazz_defineMethod (c$, "relocateComponent", 
38304 function () {
38305 });
38306 Clazz_defineMethod (c$, "getContainingWindow", 
38307 function () {
38308 return jssun.awt.SunToolkit.getContainingWindow (this);
38309 });
38310 c$.isInstanceOf = Clazz_defineMethod (c$, "isInstanceOf", 
38311 function (obj, className) {
38312 if (obj == null) return false;
38313 if (className == null) return false;
38314 var cls = obj.getClass ();
38315 while (cls != null) {
38316 if (cls.getName ().equals (className)) {
38317 return true;
38318 }cls = cls.getSuperclass ();
38319 }
38320 return false;
38321 }, "~O,~S");
38322 Clazz_defineMethod (c$, "areBoundsValid", 
38323 function () {
38324 var cont = this.getContainer ();
38325 return cont == null || cont.isValid () || cont.getLayout () == null;
38326 });
38327 Clazz_defineMethod (c$, "getLocationOnWindow", 
38328 function () {
38329 var curLocation = this.getLocation ();
38330 for (var parent = this.getContainer (); parent != null && !(Clazz_instanceOf (parent, java.awt.Window)); parent = parent.getContainer ()) {
38331 curLocation.x += parent.getX ();
38332 curLocation.y += parent.getY ();
38333 }
38334 return curLocation;
38335 });
38336 Clazz_defineMethod (c$, "getSiblingIndexAbove", 
38337 function () {
38338 var parent = this.getContainer ();
38339 if (parent == null) {
38340 return -1;
38341 }var nextAbove = parent.getComponentZOrder (this) - 1;
38342 return nextAbove < 0 ? -1 : nextAbove;
38343 });
38344 Clazz_defineMethod (c$, "getSiblingIndexBelow", 
38345 function () {
38346 var parent = this.getContainer ();
38347 if (parent == null) {
38348 return -1;
38349 }var nextBelow = parent.getComponentZOrder (this) + 1;
38350 return nextBelow >= parent.getComponentCount () ? -1 : nextBelow;
38351 });
38352 Clazz_defineMethod (c$, "mixOnShowing", 
38353 function () {
38354 });
38355 Clazz_defineMethod (c$, "mixOnHiding", 
38356 function (isLightweight) {
38357 }, "~B");
38358 Clazz_defineMethod (c$, "mixOnReshaping", 
38359 function () {
38360 swingjs.JSToolkit.taintUI (this);
38361 });
38362 Clazz_defineMethod (c$, "mixOnZOrderChanging", 
38363 function (oldZorder, newZorder) {
38364 }, "~N,~N");
38365 Clazz_defineMethod (c$, "mixOnValidating", 
38366 function () {
38367 });
38368 c$.doesClassImplement = Clazz_defineMethod (c$, "doesClassImplement", 
38369  function (cls, interfaceName) {
38370 if (cls == null) return false;
38371 for (var c, $c = 0, $$c = cls.getInterfaces (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
38372 if (c.getName ().equals (interfaceName)) {
38373 return true;
38374 }}
38375 return java.awt.Component.doesClassImplement (cls.getSuperclass (), interfaceName);
38376 }, "Class,~S");
38377 c$.doesImplement = Clazz_defineMethod (c$, "doesImplement", 
38378 function (obj, interfaceName) {
38379 if (obj == null) return false;
38380 if (interfaceName == null) return false;
38381 return java.awt.Component.doesClassImplement (obj.getClass (), interfaceName);
38382 }, "~O,~S");
38383 Clazz_pu$h(self.c$);
38384 c$ = Clazz_declareType (java.awt.Component, "BaselineResizeBehavior", Enum);
38385 Clazz_defineEnumConstant (c$, "CONSTANT_ASCENT", 0, []);
38386 Clazz_defineEnumConstant (c$, "CONSTANT_DESCENT", 1, []);
38387 Clazz_defineEnumConstant (c$, "CENTER_OFFSET", 2, []);
38388 Clazz_defineEnumConstant (c$, "OTHER", 3, []);
38389 c$ = Clazz_p0p ();
38390 Clazz_pu$h(self.c$);
38391 c$ = Clazz_declareType (java.awt.Component, "AWTTreeLock");
38392 c$ = Clazz_p0p ();
38393 Clazz_defineStatics (c$,
38394 "FOCUS_TRAVERSABLE_UNKNOWN", 0,
38395 "FOCUS_TRAVERSABLE_DEFAULT", 1,
38396 "FOCUS_TRAVERSABLE_SET", 2,
38397 "actionListenerK", "actionL",
38398 "adjustmentListenerK", "adjustmentL",
38399 "componentListenerK", "componentL",
38400 "containerListenerK", "containerL",
38401 "focusListenerK", "focusL",
38402 "itemListenerK", "itemL",
38403 "keyListenerK", "keyL",
38404 "mouseListenerK", "mouseL",
38405 "mouseMotionListenerK", "mouseMotionL",
38406 "mouseWheelListenerK", "mouseWheelL",
38407 "textListenerK", "textL",
38408 "ownedWindowK", "ownedL",
38409 "windowListenerK", "windowL",
38410 "inputMethodListenerK", "inputMethodL",
38411 "hierarchyListenerK", "hierarchyL",
38412 "hierarchyBoundsListenerK", "hierarchyBoundsL",
38413 "windowStateListenerK", "windowStateL",
38414 "windowFocusListenerK", "windowFocusL",
38415 "isInc", false,
38416 "incRate", 0,
38417 "TOP_ALIGNMENT", 0.0,
38418 "CENTER_ALIGNMENT", 0.5,
38419 "BOTTOM_ALIGNMENT", 1.0,
38420 "LEFT_ALIGNMENT", 0.0,
38421 "RIGHT_ALIGNMENT", 1.0,
38422 "incr", 0);
38423 c$.coalesceMap = c$.prototype.coalesceMap =  new java.util.HashMap ();
38424 });
38425 Clazz_declarePackage ("jssun.awt");
38426 Clazz_load (null, "jssun.awt.SunGraphicsCallback", ["java.awt.Container", "$.Graphics2D", "jssun.awt.ConstrainableGraphics", "$.Graphics2Delegate"], function () {
38427 c$ = Clazz_declareType (jssun.awt, "SunGraphicsCallback");
38428 Clazz_defineMethod (c$, "constrainGraphics", 
38429 function (g, bounds) {
38430 if (Clazz_instanceOf (g, jssun.awt.ConstrainableGraphics)) {
38431 (g).constrain (bounds.x, bounds.y, bounds.width, bounds.height);
38432 } else {
38433 g.translate (bounds.x, bounds.y);
38434 }g.clipRect (0, 0, bounds.width, bounds.height);
38435 }, "java.awt.Graphics,java.awt.Rectangle");
38436 Clazz_defineMethod (c$, "runOneComponent", 
38437 function (comp, bounds, g, clip, weightFlags) {
38438 if (comp == null || !comp.isLightweight () || !comp.isVisible ()) {
38439 return;
38440 }var lightweight = comp.isLightweight ();
38441 if ((lightweight && (weightFlags & 2) == 0) || (!lightweight && (weightFlags & 1) == 0)) {
38442 return;
38443 }if (bounds == null) {
38444 bounds = comp.getBounds ();
38445 }if (clip == null || clip.intersects (bounds)) {
38446 var cg = g.createSwingJS ();
38447 try {
38448 this.constrainGraphics (cg, bounds);
38449 cg.setFont (comp.getFont ());
38450 cg.setColor (comp.getForeground ());
38451 if (Clazz_instanceOf (cg, java.awt.Graphics2D)) {
38452 (cg).setBackground (comp.getBackground ());
38453 } else if (Clazz_instanceOf (cg, jssun.awt.Graphics2Delegate)) {
38454 (cg).setBackground (comp.getBackground ());
38455 }this.run (comp, cg);
38456 } finally {
38457 cg.dispose ();
38458 }
38459 }}, "java.awt.Component,java.awt.Rectangle,java.awt.Graphics,java.awt.Shape,~N");
38460 Clazz_defineMethod (c$, "runComponents", 
38461 function (comps, g, weightFlags) {
38462 var ncomponents = comps.length;
38463 var clip = g.getClip ();
38464 for (var i = ncomponents - 1; i >= 0; i--) {
38465 this.runOneComponent (comps[i], null, g, clip, weightFlags);
38466 }
38467 }, "~A,java.awt.Graphics,~N");
38468 Clazz_pu$h(self.c$);
38469 c$ = Clazz_declareType (jssun.awt.SunGraphicsCallback, "PaintHeavyweightComponentsCallback", jssun.awt.SunGraphicsCallback);
38470 Clazz_makeConstructor (c$, 
38471  function () {
38472 Clazz_superConstructor (this, jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback, []);
38473 });
38474 Clazz_overrideMethod (c$, "run", 
38475 function (a, b) {
38476 if (!a.isLightweight ()) {
38477 a.paintAll (b);
38478 } else if (Clazz_instanceOf (a, java.awt.Container)) {
38479 this.runComponents ((a).getComponents (), b, 3);
38480 }}, "java.awt.Component,java.awt.Graphics");
38481 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
38482 function () {
38483 return jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback.instance;
38484 });
38485 c$.instance = c$.prototype.instance =  new jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback ();
38486 c$ = Clazz_p0p ();
38487 Clazz_defineStatics (c$,
38488 "HEAVYWEIGHTS", 0x1,
38489 "LIGHTWEIGHTS", 0x2,
38490 "TWO_PASSES", 0x4);
38491 });
38492 Clazz_declarePackage ("javax.swing");
38493 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 () {
38494 c$ = Clazz_decorateAsClass (function () {
38495 this.volatileMap = null;
38496 this.hwDirtyComponents = null;
38497 this.dirtyComponents = null;
38498 this.tmpDirtyComponents = null;
38499 this.invalidComponents = null;
38500 this.runnableList = null;
38501 this.paintDepth = 0;
38502 this.painting = false;
38503 this.repaintRoot = null;
38504 this.paintThread = null;
38505 this.processingRunnable = null;
38506 this.myComponent = null;
38507 this.tmp = null;
38508 if (!Clazz_isClassDefined ("javax.swing.RepaintManager.ProcessingRunnable")) {
38509 javax.swing.RepaintManager.$RepaintManager$ProcessingRunnable$ ();
38510 }
38511 Clazz_instantialize (this, arguments);
38512 }, javax.swing, "RepaintManager");
38513 Clazz_prepareFields (c$, function () {
38514 this.volatileMap =  new java.util.HashMap (1);
38515 this.tmp =  new java.awt.Rectangle ();
38516 });
38517 c$.currentManager = Clazz_defineMethod (c$, "currentManager", 
38518 function (c) {
38519 var appContext = jssun.awt.AppContext.getAppContext ();
38520 var rm = appContext.get (javax.swing.RepaintManager.repaintManagerKey);
38521 if (rm == null) {
38522 rm =  new javax.swing.RepaintManager ();
38523 rm.set (c);
38524 appContext.put (javax.swing.RepaintManager.repaintManagerKey, rm);
38525 }return rm;
38526 }, "java.awt.Component");
38527 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
38528 function (aRepaintManager) {
38529 if (aRepaintManager != null) {
38530 javax.swing.SwingUtilities.appContextPut (javax.swing.RepaintManager.repaintManagerKey, aRepaintManager);
38531 } else {
38532 javax.swing.SwingUtilities.appContextRemove (javax.swing.RepaintManager.repaintManagerKey);
38533 }}, "javax.swing.RepaintManager");
38534 Clazz_makeConstructor (c$, 
38535  function () {
38536 this.processingRunnable = Clazz_innerTypeInstance (javax.swing.RepaintManager.ProcessingRunnable, this, null);
38537 });
38538 Clazz_defineMethod (c$, "set", 
38539  function (c) {
38540 this.myComponent = c;
38541 this.dirtyComponents =  new java.util.IdentityHashMap ();
38542 this.tmpDirtyComponents =  new java.util.IdentityHashMap ();
38543 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38544 }, "java.awt.Component");
38545 Clazz_defineMethod (c$, "addInvalidComponent", 
38546 function (invalidComponent) {
38547 var validateRoot = null;
38548 for (var c = invalidComponent; c != null; c = c.getParent ()) {
38549 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane))) {
38550 return;
38551 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
38552 validateRoot = c;
38553 break;
38554 }}
38555 if (validateRoot == null) {
38556 return;
38557 }var root = null;
38558 for (var c = validateRoot; c != null; c = c.getParent ()) {
38559 if (!c.isVisible ()) {
38560 return;
38561 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
38562 root = c;
38563 break;
38564 }}
38565 if (root == null) {
38566 return;
38567 }if (this.invalidComponents == null) {
38568 this.invalidComponents =  new java.util.ArrayList ();
38569 } else {
38570 var n = this.invalidComponents.size ();
38571 for (var i = 0; i < n; i++) {
38572 if (validateRoot === this.invalidComponents.get (i)) {
38573 return;
38574 }}
38575 }this.invalidComponents.add (validateRoot);
38576 this.scheduleProcessingRunnable (root);
38577 }, "javax.swing.JComponent");
38578 Clazz_defineMethod (c$, "removeInvalidComponent", 
38579 function (component) {
38580 if (this.invalidComponents != null) {
38581 var index = this.invalidComponents.indexOf (component);
38582 if (index != -1) {
38583 this.invalidComponents.remove (index);
38584 }}}, "javax.swing.JComponent");
38585 Clazz_defineMethod (c$, "addDirtyRegion0", 
38586  function (c, x, y, w, h) {
38587 {
38588 var g = c.getGraphics();
38589 if (g == null || g.gc == null)return;
38590 }if ((w <= 0) || (h <= 0) || (c == null)) {
38591 return;
38592 }if ((c.getWidth () <= 0) || (c.getHeight () <= 0)) {
38593 return;
38594 }if (this.extendDirtyRegion (c, x, y, w, h)) {
38595 return;
38596 }var root = null;
38597 for (var p = c; p != null; p = p.getParent ()) {
38598 if (!p.isVisible () || p.getPeer () == null) {
38599 return;
38600 }if ((Clazz_instanceOf (p, java.awt.Window)) || (Clazz_instanceOf (p, java.applet.Applet))) {
38601 if (Clazz_instanceOf (p, java.awt.Frame) && ((p).getExtendedState () & 1) == 1) {
38602 return;
38603 }root = p;
38604 break;
38605 }}
38606 if (root == null) return;
38607 {
38608 if (this.extendDirtyRegion (c, x, y, w, h)) {
38609 return;
38610 }this.dirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38611 }this.scheduleProcessingRunnable (c);
38612 }, "java.awt.Container,~N,~N,~N,~N");
38613 Clazz_defineMethod (c$, "addDirtyRegion", 
38614 function (c, x, y, w, h) {
38615 this.addDirtyRegion0 (c, x, y, w, h);
38616 }, "javax.swing.JComponent,~N,~N,~N,~N");
38617 Clazz_defineMethod (c$, "addDirtyRegion", 
38618 function (window, x, y, w, h) {
38619 this.addDirtyRegion0 (window, x, y, w, h);
38620 }, "java.awt.Window,~N,~N,~N,~N");
38621 Clazz_defineMethod (c$, "addDirtyRegion", 
38622 function (applet, x, y, w, h) {
38623 this.addDirtyRegion0 (applet, x, y, w, h);
38624 }, "java.applet.Applet,~N,~N,~N,~N");
38625 Clazz_defineMethod (c$, "scheduleHeavyWeightPaints", 
38626 function () {
38627 var hws;
38628 {
38629 if (this.hwDirtyComponents.size () == 0) {
38630 return;
38631 }hws = this.hwDirtyComponents;
38632 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38633 }for (var hw, $hw = hws.keySet ().iterator (); $hw.hasNext () && ((hw = $hw.next ()) || true);) {
38634 var dirty = hws.get (hw);
38635 if (Clazz_instanceOf (hw, java.awt.Window)) {
38636 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38637 } else if (Clazz_instanceOf (hw, java.applet.Applet)) {
38638 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38639 } else {
38640 this.addDirtyRegion0 (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38641 }}
38642 });
38643 Clazz_defineMethod (c$, "nativeAddDirtyRegion", 
38644 function (appContext, c, x, y, w, h) {
38645 if (w > 0 && h > 0) {
38646 {
38647 var dirty = this.hwDirtyComponents.get (c);
38648 if (dirty == null) {
38649 this.hwDirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38650 } else {
38651 this.hwDirtyComponents.put (c, javax.swing.SwingUtilities.computeUnion (x, y, w, h, dirty));
38652 }}this.scheduleProcessingRunnable (appContext);
38653 }}, "jssun.awt.AppContext,java.awt.Container,~N,~N,~N,~N");
38654 Clazz_defineMethod (c$, "extendDirtyRegion", 
38655  function (c, x, y, w, h) {
38656 var r = this.dirtyComponents.get (c);
38657 if (r != null) {
38658 javax.swing.SwingUtilities.computeUnion (x, y, w, h, r);
38659 return true;
38660 }return false;
38661 }, "java.awt.Component,~N,~N,~N,~N");
38662 Clazz_defineMethod (c$, "getDirtyRegion", 
38663 function (aComponent) {
38664 var r = null;
38665 {
38666 r = this.dirtyComponents.get (aComponent);
38667 }if (r == null) return  new java.awt.Rectangle (0, 0, 0, 0);
38668  else return  new java.awt.Rectangle (r);
38669 }, "javax.swing.JComponent");
38670 Clazz_defineMethod (c$, "markCompletelyDirty", 
38671 function (aComponent) {
38672 this.addDirtyRegion (aComponent, 0, 0, 2147483647, 2147483647);
38673 }, "javax.swing.JComponent");
38674 Clazz_defineMethod (c$, "markCompletelyClean", 
38675 function (aComponent) {
38676 {
38677 this.dirtyComponents.remove (aComponent);
38678 }}, "javax.swing.JComponent");
38679 Clazz_defineMethod (c$, "isCompletelyDirty", 
38680 function (aComponent) {
38681 var r;
38682 r = this.getDirtyRegion (aComponent);
38683 if (r.width == 2147483647 && r.height == 2147483647) return true;
38684  else return false;
38685 }, "javax.swing.JComponent");
38686 Clazz_defineMethod (c$, "validateInvalidComponents", 
38687 function () {
38688 var ic;
38689 {
38690 if (this.invalidComponents == null) {
38691 return;
38692 }ic = this.invalidComponents;
38693 this.invalidComponents = null;
38694 }var n = ic.size ();
38695 for (var i = 0; i < n; i++) {
38696 var c = ic.get (i);
38697 c.validate ();
38698 }
38699 });
38700 Clazz_defineMethod (c$, "prePaintDirtyRegions", 
38701  function () {
38702 var dirtyComponents;
38703 var runnableList;
38704 {
38705 dirtyComponents = this.dirtyComponents;
38706 runnableList = this.runnableList;
38707 this.runnableList = null;
38708 }if (runnableList != null) {
38709 for (var runnable, $runnable = runnableList.iterator (); $runnable.hasNext () && ((runnable = $runnable.next ()) || true);) {
38710 runnable.run ();
38711 }
38712 }this.paintDirtyRegions ();
38713 if (dirtyComponents.size () > 0) {
38714 this.paintDirtyRegions1 (dirtyComponents);
38715 }});
38716 Clazz_defineMethod (c$, "updateWindows", 
38717  function (dirtyComponents) {
38718 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
38719 if (!(Clazz_instanceOf (toolkit, jssun.awt.SunToolkit) && (toolkit).needUpdateWindow ())) {
38720 return dirtyComponents;
38721 }var windows =  new java.util.HashSet ();
38722 var dirtyComps = dirtyComponents.keySet ();
38723 for (var it = dirtyComps.iterator (); it.hasNext (); ) {
38724 var dirty = it.next ();
38725 var window = Clazz_instanceOf (dirty, java.awt.Window) ? dirty : javax.swing.SwingUtilities.getWindowAncestor (dirty);
38726 if (window != null && !jssun.awt.AWTAccessor.getWindowAccessor ().isOpaque (window)) {
38727 it.remove ();
38728 windows.add (window);
38729 }}
38730 for (var window, $window = windows.iterator (); $window.hasNext () && ((window = $window.next ()) || true);) {
38731 jssun.awt.AWTAccessor.getWindowAccessor ().updateWindow (window, null);
38732 }
38733 return dirtyComponents;
38734 }, "java.util.Map");
38735 Clazz_defineMethod (c$, "paintDirtyRegions", 
38736 function () {
38737 {
38738 var tmp = this.tmpDirtyComponents;
38739 this.tmpDirtyComponents = this.dirtyComponents;
38740 this.dirtyComponents = tmp;
38741 this.dirtyComponents.clear ();
38742 }this.paintDirtyRegions1 (this.tmpDirtyComponents);
38743 });
38744 Clazz_defineMethod (c$, "paintDirtyRegions1", 
38745  function (tmpDirtyComponents) {
38746 if (tmpDirtyComponents.isEmpty ()) {
38747 return;
38748 }this.updateWindows (tmpDirtyComponents);
38749 var roots =  new java.util.ArrayList (tmpDirtyComponents.size ());
38750 for (var dirty, $dirty = tmpDirtyComponents.keySet ().iterator (); $dirty.hasNext () && ((dirty = $dirty.next ()) || true);) {
38751 this.collectDirtyComponents (tmpDirtyComponents, dirty, roots);
38752 }
38753 var count = roots.size ();
38754 this.painting = true;
38755 try {
38756 for (var j = 0; j < count; j++) {
38757 var i = j;
38758 var dirtyComponent = roots.get (j);
38759 var rect = tmpDirtyComponents.get (dirtyComponent);
38760 var localBoundsH = dirtyComponent.getHeight ();
38761 var localBoundsW = dirtyComponent.getWidth ();
38762 javax.swing.SwingUtilities.computeIntersection (0, 0, localBoundsW, localBoundsH, rect);
38763 if (Clazz_instanceOf (dirtyComponent, javax.swing.JComponent)) {
38764 (dirtyComponent).paintImmediately (rect.x, rect.y, rect.width, rect.height);
38765 } else if (dirtyComponent.isShowing ()) {
38766 var g = javax.swing.JComponent.safelyGetGraphics (dirtyComponent, dirtyComponent);
38767 if (g != null) {
38768 try {
38769 dirtyComponent.paint (g);
38770 } finally {
38771 g.dispose ();
38772 }
38773 }}if (this.repaintRoot != null) {
38774 this.adjustRoots (this.repaintRoot, roots, i + 1);
38775 count = roots.size ();
38776 this.repaintRoot.paintImmediately (0, 0, this.repaintRoot.getWidth (), this.repaintRoot.getHeight ());
38777 this.repaintRoot = null;
38778 }}
38779 } finally {
38780 this.painting = false;
38781 }
38782 tmpDirtyComponents.clear ();
38783 }, "java.util.Map");
38784 Clazz_defineMethod (c$, "adjustRoots", 
38785  function (root, roots, index) {
38786 for (var i = roots.size () - 1; i >= index; i--) {
38787 var c = roots.get (i);
38788 for (; ; ) {
38789 if (c === root || c == null || !(Clazz_instanceOf (c, javax.swing.JComponent))) {
38790 break;
38791 }c = c.getParent ();
38792 }
38793 if (c === root) {
38794 roots.remove (i);
38795 }}
38796 }, "javax.swing.JComponent,java.util.List,~N");
38797 Clazz_defineMethod (c$, "collectDirtyComponents", 
38798 function (dirtyComponents, dirtyComponent, roots) {
38799 var dx;
38800 var dy;
38801 var rootDx;
38802 var rootDy;
38803 var component;
38804 var rootDirtyComponent;
38805 var parent;
38806 component = rootDirtyComponent = dirtyComponent;
38807 var x = dirtyComponent.getX ();
38808 var y = dirtyComponent.getY ();
38809 var w = dirtyComponent.getWidth ();
38810 var h = dirtyComponent.getHeight ();
38811 dx = rootDx = 0;
38812 dy = rootDy = 0;
38813 this.tmp.setBounds (dirtyComponents.get (dirtyComponent));
38814 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38815 if (this.tmp.isEmpty ()) {
38816 return;
38817 }for (; ; ) {
38818 if (!(Clazz_instanceOf (component, javax.swing.JComponent))) break;
38819 parent = component.getParent ();
38820 if (parent == null) break;
38821 component = parent;
38822 dx += x;
38823 dy += y;
38824 this.tmp.setLocation (this.tmp.x + x, this.tmp.y + y);
38825 x = component.getX ();
38826 y = component.getY ();
38827 w = component.getWidth ();
38828 h = component.getHeight ();
38829 this.tmp = javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38830 if (this.tmp.isEmpty ()) {
38831 return;
38832 }if (dirtyComponents.get (component) != null) {
38833 rootDirtyComponent = component;
38834 rootDx = dx;
38835 rootDy = dy;
38836 }}
38837 if (dirtyComponent !== rootDirtyComponent) {
38838 var r;
38839 this.tmp.setLocation (this.tmp.x + rootDx - dx, this.tmp.y + rootDy - dy);
38840 r = dirtyComponents.get (rootDirtyComponent);
38841 javax.swing.SwingUtilities.computeUnion (this.tmp.x, this.tmp.y, this.tmp.width, this.tmp.height, r);
38842 }if (!roots.contains (rootDirtyComponent)) roots.add (rootDirtyComponent);
38843 }, "java.util.Map,java.awt.Component,java.util.List");
38844 Clazz_overrideMethod (c$, "toString", 
38845 function () {
38846 var sb =  new StringBuffer ();
38847 if (this.dirtyComponents != null) sb.append ("" + this.dirtyComponents);
38848 return sb.toString ();
38849 });
38850 Clazz_defineMethod (c$, "getOffscreenBuffer", 
38851 function (c, proposedWidth, proposedHeight) {
38852 return null;
38853 }, "java.awt.Component,~N,~N");
38854 Clazz_defineMethod (c$, "getVolatileOffscreenBuffer", 
38855 function (c, proposedWidth, proposedHeight) {
38856 var config = c.getGraphicsConfiguration ();
38857 var maxSize = this.getDoubleBufferMaximumSize ();
38858 var width = proposedWidth < 1 ? 1 : (proposedWidth > maxSize.width ? maxSize.width : proposedWidth);
38859 var height = proposedHeight < 1 ? 1 : (proposedHeight > maxSize.height ? maxSize.height : proposedHeight);
38860 var image = this.volatileMap.get (config);
38861 if (image == null || image.getWidth () < width || image.getHeight () < height) {
38862 if (image != null) {
38863 image.flush ();
38864 }image = config.createCompatibleVolatileImage (width, height);
38865 this.volatileMap.put (config, image);
38866 }return image;
38867 }, "java.awt.Component,~N,~N");
38868 Clazz_defineMethod (c$, "setDoubleBufferMaximumSize", 
38869 function (d) {
38870 }, "java.awt.Dimension");
38871 Clazz_defineMethod (c$, "getDoubleBufferMaximumSize", 
38872 function () {
38873 return null;
38874 });
38875 Clazz_defineMethod (c$, "setDoubleBufferingEnabled", 
38876 function (aFlag) {
38877 }, "~B");
38878 Clazz_defineMethod (c$, "resetDoubleBuffer", 
38879 function () {
38880 });
38881 Clazz_defineMethod (c$, "resetVolatileDoubleBuffer", 
38882 function (gc) {
38883 var image = this.volatileMap.remove (gc);
38884 if (image != null) {
38885 image.flush ();
38886 }}, "java.awt.GraphicsConfiguration");
38887 Clazz_defineMethod (c$, "useVolatileDoubleBuffer", 
38888 function () {
38889 return javax.swing.RepaintManager.volatileImageBufferEnabled;
38890 });
38891 Clazz_defineMethod (c$, "isPaintingThread", 
38892  function () {
38893 return (Thread.currentThread () === this.paintThread);
38894 });
38895 Clazz_defineMethod (c$, "paint", 
38896 function (paintingComponent, bufferComponent, g, x, y, w, h) {
38897 paintingComponent.paintToOffscreen (g, x, y, w, h, x + w, y + h);
38898 }, "javax.swing.JComponent,javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N");
38899 Clazz_defineMethod (c$, "beginPaint", 
38900 function () {
38901 var multiThreadedPaint = false;
38902 var paintDepth = 0;
38903 var currentThread = Thread.currentThread ();
38904 {
38905 paintDepth = this.paintDepth;
38906 if (this.paintThread == null || currentThread === this.paintThread) {
38907 this.paintThread = currentThread;
38908 this.paintDepth++;
38909 } else {
38910 multiThreadedPaint = true;
38911 }}});
38912 Clazz_defineMethod (c$, "endPaint", 
38913 function () {
38914 if (this.isPaintingThread ()) {
38915 }});
38916 Clazz_defineMethod (c$, "doubleBufferingChanged", 
38917 function (rootPane) {
38918 }, "javax.swing.JRootPane");
38919 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38920  function (c) {
38921 this.scheduleProcessingRunnable (c.getAppContext ());
38922 }, "java.awt.Component");
38923 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38924  function (context) {
38925 if (this.processingRunnable.markPending ()) {
38926 jssun.awt.SunToolkit.getSystemEventQueueImplPP (context).postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), this.processingRunnable));
38927 }}, "jssun.awt.AppContext");
38928 c$.$RepaintManager$ProcessingRunnable$ = function () {
38929 Clazz_pu$h(self.c$);
38930 c$ = Clazz_decorateAsClass (function () {
38931 Clazz_prepareCallback (this, arguments);
38932 this.pending = false;
38933 Clazz_instantialize (this, arguments);
38934 }, javax.swing.RepaintManager, "ProcessingRunnable", null, Runnable);
38935 Clazz_defineMethod (c$, "markPending", 
38936 function () {
38937 if (!this.pending) {
38938 this.pending = true;
38939 return true;
38940 }return false;
38941 });
38942 Clazz_overrideMethod (c$, "run", 
38943 function () {
38944 {
38945 this.pending = false;
38946 }this.b$["javax.swing.RepaintManager"].scheduleHeavyWeightPaints ();
38947 this.b$["javax.swing.RepaintManager"].validateInvalidComponents ();
38948 this.b$["javax.swing.RepaintManager"].prePaintDirtyRegions ();
38949 swingjs.JSToolkit.forceRepaint (this.b$["javax.swing.RepaintManager"].myComponent);
38950 });
38951 c$ = Clazz_p0p ();
38952 };
38953 Clazz_defineStatics (c$,
38954 "HANDLE_TOP_LEVEL_PAINT", false);
38955 c$.repaintManagerKey = c$.prototype.repaintManagerKey = javax.swing.RepaintManager;
38956 Clazz_defineStatics (c$,
38957 "volatileImageBufferEnabled", true);
38958 {
38959 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38960 var headless = false;
38961 if (javax.swing.RepaintManager.volatileImageBufferEnabled && headless) {
38962 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38963 }javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT = true;
38964 }});
38965 Clazz_declarePackage ("jssun.awt");
38966 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 () {
38967 c$ = Clazz_decorateAsClass (function () {
38968 this.windowClosingListener = null;
38969 Clazz_instantialize (this, arguments);
38970 }, jssun.awt, "SunToolkit", java.awt.Toolkit, [jssun.awt.WindowClosingSupport, jssun.awt.WindowClosingListener, jssun.awt.ComponentFactory]);
38971 Clazz_makeConstructor (c$, 
38972 function () {
38973 Clazz_superConstructor (this, jssun.awt.SunToolkit, []);
38974 var eventQueue;
38975 eventQueue =  new java.awt.EventQueue ();
38976 var appContext = jssun.awt.AppContext.getAppContext ();
38977 if (appContext != null) {
38978 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
38979 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
38980 appContext.put ("PostEventQueue", postEventQueue);
38981 }});
38982 Clazz_defineMethod (c$, "useBufferPerWindow", 
38983 function () {
38984 return false;
38985 });
38986 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
38987 function () {
38988 var threadGroup = Thread.currentThread ().getThreadGroup ();
38989 return jssun.awt.SunToolkit.createNewAppContext (threadGroup);
38990 });
38991 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
38992 function (threadGroup) {
38993 var eventQueue;
38994 var eqName = System.getProperty ("AWT.EventQueueClass", "java.awt.EventQueue");
38995 try {
38996 eventQueue = Clazz._4Name (eqName).newInstance ();
38997 } catch (e) {
38998 if (Clazz_exceptionOf (e, Exception)) {
38999 System.err.println ("Failed loading " + eqName + ": " + e);
39000 eventQueue =  new java.awt.EventQueue ();
39001 } else {
39002 throw e;
39003 }
39004 }
39005 var appContext =  new jssun.awt.AppContext (threadGroup);
39006 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
39007 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
39008 appContext.put ("PostEventQueue", postEventQueue);
39009 return appContext;
39010 }, "ThreadGroup");
39011 c$.wakeupEventQueue = Clazz_defineMethod (c$, "wakeupEventQueue", 
39012 function (q, isShutdown) {
39013 q.wakeup (isShutdown);
39014 }, "java.awt.EventQueue,~B");
39015 c$.targetToPeer = Clazz_defineMethod (c$, "targetToPeer", 
39016 function (target) {
39017 if (target != null) {
39018 return jssun.awt.AWTAutoShutdown.getInstance ().getPeer (target);
39019 }return null;
39020 }, "~O");
39021 c$.targetCreatedPeer = Clazz_defineMethod (c$, "targetCreatedPeer", 
39022 function (target, peer) {
39023 if (target != null && peer != null) {
39024 jssun.awt.AWTAutoShutdown.getInstance ().registerPeer (target, peer);
39025 }}, "~O,~O");
39026 c$.targetDisposedPeer = Clazz_defineMethod (c$, "targetDisposedPeer", 
39027 function (target, peer) {
39028 if (target != null && peer != null) {
39029 jssun.awt.AWTAutoShutdown.getInstance ().unregisterPeer (target, peer);
39030 }}, "~O,~O");
39031 c$.setAppContext = Clazz_defineMethod (c$, "setAppContext", 
39032  function (target, context) {
39033 if (Clazz_instanceOf (target, java.awt.Component)) {
39034 jssun.awt.AWTAccessor.getComponentAccessor ().setAppContext (target, context);
39035 } else {
39036 return false;
39037 }return true;
39038 }, "~O,jssun.awt.AppContext");
39039 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
39040  function (target) {
39041 if (Clazz_instanceOf (target, java.awt.Component)) {
39042 {
39043 return target.appContext;
39044 }} else {
39045 return null;
39046 }}, "~O");
39047 c$.targetToAppContext = Clazz_defineMethod (c$, "targetToAppContext", 
39048 function (target) {
39049 if (target == null) {
39050 return null;
39051 }var context = jssun.awt.SunToolkit.getAppContext (target);
39052 if (context == null) {
39053 context = jssun.awt.SunToolkit.appContextMap.get (target);
39054 }return context;
39055 }, "~O");
39056 c$.setLWRequestStatus = Clazz_defineMethod (c$, "setLWRequestStatus", 
39057 function (changed, status) {
39058 jssun.awt.AWTAccessor.getWindowAccessor ().setLWRequestStatus (changed, status);
39059 }, "java.awt.Window,~B");
39060 c$.checkAndSetPolicy = Clazz_defineMethod (c$, "checkAndSetPolicy", 
39061 function (cont, isSwingCont) {
39062 }, "java.awt.Container,~B");
39063 c$.insertTargetMapping = Clazz_defineMethod (c$, "insertTargetMapping", 
39064 function (target, appContext) {
39065 if (!jssun.awt.SunToolkit.setAppContext (target, appContext)) {
39066 jssun.awt.SunToolkit.appContextMap.put (target, appContext);
39067 }}, "~O,jssun.awt.AppContext");
39068 c$.postEvent = Clazz_defineMethod (c$, "postEvent", 
39069 function (appContext, event) {
39070 if (event == null) {
39071 throw  new NullPointerException ();
39072 }var postEventQueue = appContext.get ("PostEventQueue");
39073 if (postEventQueue != null) {
39074 postEventQueue.postEvent (event);
39075 }}, "jssun.awt.AppContext,java.awt.AWTEvent");
39076 c$.postPriorityEvent = Clazz_defineMethod (c$, "postPriorityEvent", 
39077 function (e) {
39078 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);
39079 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (e.getSource ()), pe);
39080 }, "java.awt.AWTEvent");
39081 c$.flushPendingEvents = Clazz_defineMethod (c$, "flushPendingEvents", 
39082 function () {
39083 var appContext = jssun.awt.AppContext.getAppContext ();
39084 var postEventQueue = appContext.get ("PostEventQueue");
39085 if (postEventQueue != null) {
39086 postEventQueue.flush ();
39087 }});
39088 c$.isPostEventQueueEmpty = Clazz_defineMethod (c$, "isPostEventQueueEmpty", 
39089 function () {
39090 var appContext = jssun.awt.AppContext.getAppContext ();
39091 var postEventQueue = appContext.get ("PostEventQueue");
39092 return (postEventQueue == null || postEventQueue.noEvents ());
39093 });
39094 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39095 function (target, runnable) {
39096 jssun.awt.SunToolkit.executeOnEventHandlerThread ( new jssun.awt.PeerEvent (target, runnable, 1));
39097 }, "~O,Runnable");
39098 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39099 function (target, runnable, when) {
39100 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)));
39101 }, "~O,Runnable,~N");
39102 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39103 function (peerEvent) {
39104 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (peerEvent.getSource ()), peerEvent);
39105 }, "jssun.awt.PeerEvent");
39106 c$.invokeLaterOnAppContext = Clazz_defineMethod (c$, "invokeLaterOnAppContext", 
39107 function (appContext, dispatcher) {
39108 jssun.awt.SunToolkit.postEvent (appContext,  new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), dispatcher, 1));
39109 }, "jssun.awt.AppContext,Runnable");
39110 c$.isDispatchThreadForAppContext = Clazz_defineMethod (c$, "isDispatchThreadForAppContext", 
39111 function (target) {
39112 var appContext = jssun.awt.SunToolkit.targetToAppContext (target);
39113 var eq = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39114 var next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39115 while (next != null) {
39116 eq = next;
39117 next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39118 }
39119 return (Thread.currentThread () === jssun.awt.AWTAccessor.getEventQueueAccessor ().getDispatchThread (eq));
39120 }, "~O");
39121 Clazz_overrideMethod (c$, "getScreenSize", 
39122 function () {
39123 return  new java.awt.Dimension (this.getScreenWidth (), this.getScreenHeight ());
39124 });
39125 Clazz_overrideMethod (c$, "getFontMetrics", 
39126 function (font) {
39127 return jssun.font.FontDesignMetrics.getMetrics (font);
39128 }, "java.awt.Font");
39129 Clazz_overrideMethod (c$, "getFontList", 
39130 function () {
39131 var hardwiredFontList =  Clazz_newArray (-1, ["Dialog", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
39132 return hardwiredFontList;
39133 });
39134 Clazz_overrideMethod (c$, "createPanel", 
39135 function (target) {
39136 return this.createComponent (target);
39137 }, "java.awt.Panel");
39138 Clazz_defineMethod (c$, "disableBackgroundErase", 
39139 function (component) {
39140 this.disableBackgroundEraseImpl (component);
39141 }, "java.awt.Component");
39142 Clazz_defineMethod (c$, "disableBackgroundEraseImpl", 
39143  function (component) {
39144 jssun.awt.AWTAccessor.getComponentAccessor ().setBackgroundEraseDisabled (component, true);
39145 }, "java.awt.Component");
39146 c$.getSunAwtNoerasebackground = Clazz_defineMethod (c$, "getSunAwtNoerasebackground", 
39147 function () {
39148 return false;
39149 });
39150 c$.getSunAwtErasebackgroundonresize = Clazz_defineMethod (c$, "getSunAwtErasebackgroundonresize", 
39151 function () {
39152 return true;
39153 });
39154 Clazz_defineMethod (c$, "setOverrideRedirect", 
39155 function (target) {
39156 }, "java.awt.Window");
39157 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39158 function (tk, url) {
39159 var img = jssun.awt.SunToolkit.imgCache.get (url);
39160 if (img == null) {
39161 try {
39162 img = tk.createImage (url);
39163 jssun.awt.SunToolkit.imgCache.put (url, img);
39164 } catch (e) {
39165 if (Clazz_exceptionOf (e, Exception)) {
39166 } else {
39167 throw e;
39168 }
39169 }
39170 }return img;
39171 }, "java.awt.Toolkit,java.net.URL");
39172 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39173 function (tk, filename) {
39174 var img = jssun.awt.SunToolkit.imgCache.get (filename);
39175 if (img == null) {
39176 try {
39177 tk.createImage (filename);
39178 jssun.awt.SunToolkit.imgCache.put (filename, img);
39179 } catch (e) {
39180 if (Clazz_exceptionOf (e, Exception)) {
39181 } else {
39182 throw e;
39183 }
39184 }
39185 }return img;
39186 }, "java.awt.Toolkit,~S");
39187 Clazz_defineMethod (c$, "getImage", 
39188 function (filename) {
39189 return jssun.awt.SunToolkit.getImageFromHash (this, filename);
39190 }, "~S");
39191 Clazz_defineMethod (c$, "getImage", 
39192 function (url) {
39193 return jssun.awt.SunToolkit.getImageFromHash (this, url);
39194 }, "java.net.URL");
39195 Clazz_overrideMethod (c$, "checkImage", 
39196 function (img, w, h, o) {
39197 return 0;
39198 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39199 Clazz_overrideMethod (c$, "prepareImage", 
39200 function (img, w, h, o) {
39201 if (w == 0 || h == 0) {
39202 return true;
39203 }return true;
39204 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39205 Clazz_overrideMethod (c$, "getSystemEventQueueImpl", 
39206 function () {
39207 return jssun.awt.SunToolkit.getSystemEventQueueImplPP ();
39208 });
39209 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39210 function () {
39211 return jssun.awt.SunToolkit.getSystemEventQueueImplPP (jssun.awt.AppContext.getAppContext ());
39212 });
39213 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39214 function (appContext) {
39215 var theEventQueue = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39216 return theEventQueue;
39217 }, "jssun.awt.AppContext");
39218 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
39219 function (c) {
39220 return java.awt.Toolkit.getNativeContainer (c);
39221 }, "java.awt.Component");
39222 Clazz_defineMethod (c$, "enableInputMethodsForTextComponent", 
39223 function () {
39224 return false;
39225 });
39226 c$.getStartupLocale = Clazz_defineMethod (c$, "getStartupLocale", 
39227 function () {
39228 if (jssun.awt.SunToolkit.startupLocale == null) {
39229 {
39230 }}return jssun.awt.SunToolkit.startupLocale;
39231 });
39232 Clazz_defineMethod (c$, "getDefaultKeyboardLocale", 
39233 function () {
39234 return jssun.awt.SunToolkit.getStartupLocale ();
39235 });
39236 c$.setDataTransfererClassName = Clazz_defineMethod (c$, "setDataTransfererClassName", 
39237 function (className) {
39238 jssun.awt.SunToolkit.dataTransfererClassName = className;
39239 }, "~S");
39240 c$.getDataTransfererClassName = Clazz_defineMethod (c$, "getDataTransfererClassName", 
39241 function () {
39242 if (jssun.awt.SunToolkit.dataTransfererClassName == null) {
39243 java.awt.Toolkit.getDefaultToolkit ();
39244 }return jssun.awt.SunToolkit.dataTransfererClassName;
39245 });
39246 Clazz_overrideMethod (c$, "getWindowClosingListener", 
39247 function () {
39248 return this.windowClosingListener;
39249 });
39250 Clazz_overrideMethod (c$, "setWindowClosingListener", 
39251 function (wcl) {
39252 this.windowClosingListener = wcl;
39253 }, "jssun.awt.WindowClosingListener");
39254 Clazz_defineMethod (c$, "windowClosingNotify", 
39255 function (event) {
39256 if (this.windowClosingListener != null) {
39257 return this.windowClosingListener.windowClosingNotify (event);
39258 } else {
39259 return null;
39260 }}, "java.awt.event.WindowEvent");
39261 Clazz_defineMethod (c$, "windowClosingDelivered", 
39262 function (event) {
39263 if (this.windowClosingListener != null) {
39264 return this.windowClosingListener.windowClosingDelivered (event);
39265 } else {
39266 return null;
39267 }}, "java.awt.event.WindowEvent");
39268 c$.isModalExcluded = Clazz_defineMethod (c$, "isModalExcluded", 
39269 function (window) {
39270 return true;
39271 }, "java.awt.Window");
39272 c$.isLightweightOrUnknown = Clazz_defineMethod (c$, "isLightweightOrUnknown", 
39273 function (comp) {
39274 if (comp.isLightweight () || !(Clazz_instanceOf (java.awt.Toolkit.getDefaultToolkit (), jssun.awt.SunToolkit))) {
39275 return true;
39276 }return !(Clazz_instanceOf (comp, java.awt.Panel) || Clazz_instanceOf (comp, java.awt.Window));
39277 }, "java.awt.Component");
39278 Clazz_defineMethod (c$, "getDesktopAAHints", 
39279 function () {
39280 return null;
39281 });
39282 c$.getContainingWindow = Clazz_defineMethod (c$, "getContainingWindow", 
39283 function (comp) {
39284 while (comp != null && !(Clazz_instanceOf (comp, java.awt.Window))) {
39285 comp = comp.getParent ();
39286 }
39287 return comp;
39288 }, "java.awt.Component");
39289 Clazz_defineMethod (c$, "isNativeGTKAvailable", 
39290 function () {
39291 return false;
39292 });
39293 Clazz_defineMethod (c$, "isWindowOpacitySupported", 
39294 function () {
39295 return false;
39296 });
39297 Clazz_defineMethod (c$, "isWindowShapingSupported", 
39298 function () {
39299 return false;
39300 });
39301 Clazz_defineMethod (c$, "isWindowTranslucencySupported", 
39302 function () {
39303 return false;
39304 });
39305 Clazz_defineMethod (c$, "isTranslucencyCapable", 
39306 function (gc) {
39307 return false;
39308 }, "java.awt.GraphicsConfiguration");
39309 Clazz_defineMethod (c$, "needUpdateWindow", 
39310 function () {
39311 return false;
39312 });
39313 c$.$SunToolkit$1$ = function () {
39314 Clazz_pu$h(self.c$);
39315 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$1", null, Runnable);
39316 Clazz_overrideMethod (c$, "run", 
39317 function () {
39318 jssun.awt.AWTAccessor.getAWTEventAccessor ().setPosted (this.f$.e);
39319 (this.f$.e.getSource ()).dispatchEvent (this.f$.e);
39320 });
39321 c$ = Clazz_p0p ();
39322 };
39323 c$.$SunToolkit$2$ = function () {
39324 Clazz_pu$h(self.c$);
39325 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$2", jssun.awt.PeerEvent);
39326 Clazz_overrideMethod (c$, "getWhen", 
39327 function () {
39328 return this.f$.when;
39329 });
39330 c$ = Clazz_p0p ();
39331 };
39332 Clazz_defineStatics (c$,
39333 "GRAB_EVENT_MASK", 0x80000000,
39334 "POST_EVENT_QUEUE_KEY", "PostEventQueue");
39335 c$.appContextMap = c$.prototype.appContextMap =  new java.util.HashMap ();
39336 c$.imgCache = c$.prototype.imgCache =  new java.util.HashMap ();
39337 Clazz_defineStatics (c$,
39338 "startupLocale", null,
39339 "dataTransfererClassName", null,
39340 "DESKTOPFONTHINTS", "awt.font.desktophints");
39341 });
39342 Clazz_declarePackage ("java.awt");
39343 Clazz_declareInterface (java.awt, "Conditional");
39344 Clazz_declarePackage ("java.awt.event");
39345 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.PaintEvent", null, function () {
39346 c$ = Clazz_decorateAsClass (function () {
39347 this.updateRect = null;
39348 Clazz_instantialize (this, arguments);
39349 }, java.awt.event, "PaintEvent", java.awt.event.ComponentEvent);
39350 Clazz_makeConstructor (c$, 
39351 function (source, id, updateRect) {
39352 Clazz_superConstructor (this, java.awt.event.PaintEvent, [source, id]);
39353 this.updateRect = updateRect;
39354 }, "java.awt.Component,~N,java.awt.Rectangle");
39355 Clazz_defineMethod (c$, "getUpdateRect", 
39356 function () {
39357 return this.updateRect;
39358 });
39359 Clazz_defineMethod (c$, "setUpdateRect", 
39360 function (updateRect) {
39361 this.updateRect = updateRect;
39362 }, "java.awt.Rectangle");
39363 Clazz_overrideMethod (c$, "paramString", 
39364 function () {
39365 var typeStr;
39366 switch (this.id) {
39367 case 800:
39368 typeStr = "PAINT";
39369 break;
39370 case 801:
39371 typeStr = "UPDATE";
39372 break;
39373 default:
39374 typeStr = "unknown type";
39375 }
39376 return typeStr + ",updateRect=" + (this.updateRect != null ? this.updateRect.toString () : "null");
39377 });
39378 Clazz_defineStatics (c$,
39379 "PAINT_FIRST", 800,
39380 "PAINT_LAST", 801,
39381 "PAINT", 800,
39382 "UPDATE", 801);
39383 });
39384 Clazz_declarePackage ("java.awt");
39385 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 () {
39386 c$ = Clazz_decorateAsClass (function () {
39387 this.theQueue = null;
39388 this.eventFilters = null;
39389 this.modalFiltersCount = 0;
39390 this.filter = null;
39391 this.cond = null;
39392 this.id = 0;
39393 this.doDispatch = true;
39394 if (!Clazz_isClassDefined ("java.awt.EventDispatchThread.StopDispatchEvent")) {
39395 java.awt.EventDispatchThread.$EventDispatchThread$StopDispatchEvent$ ();
39396 }
39397 Clazz_instantialize (this, arguments);
39398 }, java.awt, "EventDispatchThread", swingjs.JSThread);
39399 Clazz_prepareFields (c$, function () {
39400 this.eventFilters =  new java.util.Vector ();
39401 });
39402 Clazz_makeConstructor (c$, 
39403 function (group, name, queue) {
39404 Clazz_superConstructor (this, java.awt.EventDispatchThread, [group, name]);
39405 this.theQueue = queue;
39406 }, "ThreadGroup,~S,java.awt.EventQueue");
39407 Clazz_defineMethod (c$, "stopDispatchingImpl", 
39408 function (wait) {
39409 var stopEvent = Clazz_innerTypeInstance (java.awt.EventDispatchThread.StopDispatchEvent, this, null);
39410 if (Thread.currentThread () !== this) {
39411 this.theQueue.postEventPrivate (stopEvent);
39412 if (wait) {
39413 try {
39414 this.join ();
39415 } catch (e) {
39416 if (Clazz_exceptionOf (e, InterruptedException)) {
39417 } else {
39418 throw e;
39419 }
39420 }
39421 }} else {
39422 stopEvent.dispatch ();
39423 }{
39424 if (this.theQueue.getDispatchThread () === this) {
39425 this.theQueue.detachDispatchThread ();
39426 }}}, "~B");
39427 Clazz_defineMethod (c$, "stopDispatching", 
39428 function () {
39429 this.stopDispatchingImpl (true);
39430 });
39431 Clazz_defineMethod (c$, "stopDispatchingLater", 
39432 function () {
39433 this.stopDispatchingImpl (false);
39434 });
39435 Clazz_overrideMethod (c$, "run", 
39436 function () {
39437 this.pumpEvents (-1, null);
39438 });
39439 Clazz_defineMethod (c$, "pumpEvents", 
39440 function (id, cond) {
39441 this.pumpEventsForHierarchy (id, cond, null);
39442 }, "~N,java.awt.Conditional");
39443 Clazz_defineMethod (c$, "pumpEventsForHierarchy", 
39444 function (id, cond, modalComponent) {
39445 this.pumpEventsForFilter (id, cond,  new java.awt.EventDispatchThread.HierarchyEventFilter (modalComponent));
39446 }, "~N,java.awt.Conditional,java.awt.Component");
39447 Clazz_defineMethod (c$, "pumpEventsForFilter", 
39448 function (id, cond, filter) {
39449 this.filter = filter;
39450 this.cond = cond;
39451 this.id = id;
39452 this.run1 (0);
39453 }, "~N,java.awt.Conditional,java.awt.EventFilter");
39454 Clazz_overrideMethod (c$, "run1", 
39455 function (mode) {
39456 try {
39457 while (true) switch (mode) {
39458 case 0:
39459 this.addEventFilter (this.filter);
39460 mode = 1;
39461 case 1:
39462 if (!this.doDispatch || this.cond != null && !this.cond.evaluate () || this.isInterrupted ()) {
39463 this.doDispatch = false;
39464 return;
39465 }var myid = this.id;
39466 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)));
39467 this.dispatchAndReturn (r, mode);
39468 if (this.isJS) return;
39469 break;
39470 case 2:
39471 this.doDispatch = false;
39472 return;
39473 }
39474
39475 } finally {
39476 if (!this.doDispatch) this.finish ();
39477 }
39478 }, "~N");
39479 Clazz_defineMethod (c$, "dispatchAndReturn", 
39480 function (r, mode) {
39481 var f = null;
39482 var me = this;
39483 {
39484 f = function() {r.run();me.run1(mode)
39485 };
39486 }swingjs.JSToolkit.setTimeout (f, 0, 0);
39487 }, "Runnable,~N");
39488 Clazz_defineMethod (c$, "finish", 
39489  function () {
39490 this.doDispatch = false;
39491 this.removeEventFilter (this.filter);
39492 {
39493 if (this.theQueue.getDispatchThread () === this) {
39494 this.theQueue.detachDispatchThread ();
39495 }if (this.theQueue.peekEvent () != null || !jssun.awt.SunToolkit.isPostEventQueueEmpty ()) {
39496 this.theQueue.initDispatchThread ();
39497 }jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this);
39498 }});
39499 Clazz_defineMethod (c$, "addEventFilter", 
39500 function (filter) {
39501 {
39502 if (!this.eventFilters.contains (filter)) {
39503 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39504 var newFilter = filter;
39505 var k = 0;
39506 for (k = 0; k < this.eventFilters.size (); k++) {
39507 var f = this.eventFilters.get (k);
39508 if (Clazz_instanceOf (f, java.awt.ModalEventFilter)) {
39509 var cf = f;
39510 if (cf.compareTo (newFilter) > 0) {
39511 break;
39512 }}}
39513 this.eventFilters.add (k, filter);
39514 this.modalFiltersCount++;
39515 } else {
39516 this.eventFilters.add (filter);
39517 }}}}, "java.awt.EventFilter");
39518 Clazz_defineMethod (c$, "removeEventFilter", 
39519 function (filter) {
39520 {
39521 if (this.eventFilters.contains (filter)) {
39522 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39523 this.modalFiltersCount--;
39524 }this.eventFilters.remove (filter);
39525 }}}, "java.awt.EventFilter");
39526 Clazz_defineMethod (c$, "pumpOneEventForFilters", 
39527 function (id) {
39528 try {
39529 var event;
39530 var eventOK;
39531 do {
39532 event = (id == -1) ? this.theQueue.getNextEvent () : this.theQueue.getNextEventForID (id);
39533 if (event == null) return (this.doDispatch = false);
39534 eventOK = true;
39535 {
39536 for (var i = this.eventFilters.size () - 1; i >= 0; i--) {
39537 var f = this.eventFilters.get (i);
39538 var accept = f.acceptEvent (event);
39539 if (accept === java.awt.EventFilter.FilterAction.REJECT) {
39540 eventOK = false;
39541 break;
39542 } else if (accept === java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY) {
39543 break;
39544 }}
39545 }if (!eventOK) {
39546 event.consume ();
39547 }} while (eventOK == false);
39548 this.theQueue.dispatchEvent (event);
39549 return this.doDispatch = true;
39550 } catch (e$$) {
39551 if (Clazz_exceptionOf (e$$, ThreadDeath)) {
39552 var death = e$$;
39553 {
39554 return this.doDispatch = false;
39555 }
39556 } else if (Clazz_exceptionOf (e$$, InterruptedException)) {
39557 var interruptedException = e$$;
39558 {
39559 return this.doDispatch = false;
39560 }
39561 } else {
39562 var e = e$$;
39563 {
39564 this.processException (e, this.modalFiltersCount > 0);
39565 }
39566 }
39567 }
39568 return this.doDispatch = true;
39569 }, "~N");
39570 Clazz_defineMethod (c$, "processException", 
39571  function (e, isModal) {
39572 if (!this.handleException (e)) {
39573 if (isModal) {
39574 System.err.println ("Exception occurred during event dispatching:");
39575 e.printStackTrace ();
39576 } else if (Clazz_instanceOf (e, RuntimeException)) {
39577 throw e;
39578 } else if (Clazz_instanceOf (e, Error)) {
39579 throw e;
39580 }}}, "Throwable,~B");
39581 Clazz_defineMethod (c$, "handleException", 
39582  function (thrown) {
39583 return false;
39584 }, "Throwable");
39585 Clazz_defineMethod (c$, "isDispatching", 
39586 function (eq) {
39587 return this.theQueue.equals (eq);
39588 }, "java.awt.EventQueue");
39589 Clazz_defineMethod (c$, "getEventQueue", 
39590 function () {
39591 return this.theQueue;
39592 });
39593 c$.$EventDispatchThread$StopDispatchEvent$ = function () {
39594 Clazz_pu$h(self.c$);
39595 c$ = Clazz_decorateAsClass (function () {
39596 Clazz_prepareCallback (this, arguments);
39597 Clazz_instantialize (this, arguments);
39598 }, java.awt.EventDispatchThread, "StopDispatchEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39599 Clazz_makeConstructor (c$, 
39600 function () {
39601 Clazz_superConstructor (this, java.awt.EventDispatchThread.StopDispatchEvent, [this.b$["java.awt.EventDispatchThread"], 0]);
39602 });
39603 Clazz_overrideMethod (c$, "dispatch", 
39604 function () {
39605 this.b$["java.awt.EventDispatchThread"].doDispatch = false;
39606 });
39607 c$ = Clazz_p0p ();
39608 };
39609 c$.$EventDispatchThread$1$ = function () {
39610 Clazz_pu$h(self.c$);
39611 c$ = Clazz_declareAnonymous (java.awt, "EventDispatchThread$1", null, Runnable);
39612 Clazz_overrideMethod (c$, "run", 
39613 function () {
39614 this.b$["java.awt.EventDispatchThread"].pumpOneEventForFilters (this.f$.myid);
39615 });
39616 c$ = Clazz_p0p ();
39617 };
39618 Clazz_pu$h(self.c$);
39619 c$ = Clazz_decorateAsClass (function () {
39620 this.modalComponent = null;
39621 Clazz_instantialize (this, arguments);
39622 }, java.awt.EventDispatchThread, "HierarchyEventFilter", null, java.awt.EventFilter);
39623 Clazz_makeConstructor (c$, 
39624 function (a) {
39625 this.modalComponent = a;
39626 }, "java.awt.Component");
39627 Clazz_overrideMethod (c$, "acceptEvent", 
39628 function (a) {
39629 if (this.modalComponent != null) {
39630 var b = a.getID ();
39631 var c = (b >= 500) && (b <= 507);
39632 var d = (b >= 1001) && (b <= 1001);
39633 var e = (b == 201);
39634 if (java.awt.Component.isInstanceOf (this.modalComponent, "javax.swing.JInternalFrame")) {
39635 return e ? java.awt.EventFilter.FilterAction.REJECT : java.awt.EventFilter.FilterAction.ACCEPT;
39636 }if (c || d || e) {
39637 var f = a.getSource ();
39638 if (Clazz_instanceOf (f, jssun.awt.ModalExclude)) {
39639 return java.awt.EventFilter.FilterAction.ACCEPT;
39640 } else if (Clazz_instanceOf (f, java.awt.Component)) {
39641 var g = f;
39642 var h = false;
39643 if (Clazz_instanceOf (this.modalComponent, java.awt.Container)) {
39644 while (g !== this.modalComponent && g != null) {
39645 if ((Clazz_instanceOf (g, java.awt.Window)) && (jssun.awt.SunToolkit.isModalExcluded (g))) {
39646 h = true;
39647 break;
39648 }g = g.getParent ();
39649 }
39650 }if (!h && (g !== this.modalComponent)) {
39651 return java.awt.EventFilter.FilterAction.REJECT;
39652 }}}}return java.awt.EventFilter.FilterAction.ACCEPT;
39653 }, "java.awt.AWTEvent");
39654 c$ = Clazz_p0p ();
39655 Clazz_defineStatics (c$,
39656 "ANY_EVENT", -1);
39657 });
39658 Clazz_declarePackage ("java.awt");
39659 Clazz_load (["java.lang.Enum"], "java.awt.EventFilter", null, function () {
39660 Clazz_declareInterface (java.awt, "EventFilter");
39661 Clazz_pu$h(self.c$);
39662 c$ = Clazz_declareType (java.awt.EventFilter, "FilterAction", Enum);
39663 Clazz_defineEnumConstant (c$, "ACCEPT", 0, []);
39664 Clazz_defineEnumConstant (c$, "REJECT", 1, []);
39665 Clazz_defineEnumConstant (c$, "ACCEPT_IMMEDIATELY", 2, []);
39666 c$ = Clazz_p0p ();
39667 });
39668 Clazz_declarePackage ("java.awt");
39669 Clazz_load (["java.awt.EventFilter"], "java.awt.ModalEventFilter", ["java.awt.Component", "$.Dialog", "$.Window", "jssun.awt.ModalExclude"], function () {
39670 c$ = Clazz_decorateAsClass (function () {
39671 this.modalDialog = null;
39672 this.disabled = false;
39673 Clazz_instantialize (this, arguments);
39674 }, java.awt, "ModalEventFilter", null, java.awt.EventFilter);
39675 Clazz_makeConstructor (c$, 
39676 function (modalDialog) {
39677 this.modalDialog = modalDialog;
39678 this.disabled = false;
39679 }, "java.awt.Dialog");
39680 Clazz_defineMethod (c$, "getModalDialog", 
39681 function () {
39682 return this.modalDialog;
39683 });
39684 Clazz_overrideMethod (c$, "acceptEvent", 
39685 function (event) {
39686 if (this.disabled || !this.modalDialog.isVisible ()) {
39687 return java.awt.EventFilter.FilterAction.ACCEPT;
39688 }var eventID = event.getID ();
39689 if ((eventID >= 500 && eventID <= 507) || (eventID >= 1001 && eventID <= 1001) || eventID == 201) {
39690 var o = event.getSource ();
39691 if (Clazz_instanceOf (o, jssun.awt.ModalExclude)) {
39692 } else if (Clazz_instanceOf (o, java.awt.Component)) {
39693 var c = o;
39694 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
39695 c = c.getParent_NoClientCode ();
39696 }
39697 if (c != null) {
39698 return this.acceptWindow (c);
39699 }}}return java.awt.EventFilter.FilterAction.ACCEPT;
39700 }, "java.awt.AWTEvent");
39701 Clazz_defineMethod (c$, "disable", 
39702 function () {
39703 this.disabled = true;
39704 });
39705 Clazz_defineMethod (c$, "compareTo", 
39706 function (another) {
39707 var anotherDialog = another.getModalDialog ();
39708 var c = this.modalDialog;
39709 while (c != null) {
39710 if (c === anotherDialog) {
39711 return 1;
39712 }c = c.getParent_NoClientCode ();
39713 }
39714 c = anotherDialog;
39715 while (c != null) {
39716 if (c === this.modalDialog) {
39717 return -1;
39718 }c = c.getParent_NoClientCode ();
39719 }
39720 var blocker = this.modalDialog.getModalBlocker ();
39721 while (blocker != null) {
39722 if (blocker === anotherDialog) {
39723 return -1;
39724 }blocker = blocker.getModalBlocker ();
39725 }
39726 blocker = anotherDialog.getModalBlocker ();
39727 while (blocker != null) {
39728 if (blocker === this.modalDialog) {
39729 return 1;
39730 }blocker = blocker.getModalBlocker ();
39731 }
39732 return this.modalDialog.getModalityType ().compareTo (anotherDialog.getModalityType ());
39733 }, "java.awt.ModalEventFilter");
39734 c$.createFilterForDialog = Clazz_defineMethod (c$, "createFilterForDialog", 
39735 function (modalDialog) {
39736 switch (modalDialog.getModalityType ()) {
39737 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
39738 return  new java.awt.ModalEventFilter.DocumentModalEventFilter (modalDialog);
39739 case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
39740 return  new java.awt.ModalEventFilter.ApplicationModalEventFilter (modalDialog);
39741 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
39742 return  new java.awt.ModalEventFilter.ToolkitModalEventFilter (modalDialog);
39743 }
39744 return null;
39745 }, "java.awt.Dialog");
39746 Clazz_pu$h(self.c$);
39747 c$ = Clazz_decorateAsClass (function () {
39748 this.appContext = null;
39749 Clazz_instantialize (this, arguments);
39750 }, java.awt.ModalEventFilter, "ToolkitModalEventFilter", java.awt.ModalEventFilter);
39751 Clazz_makeConstructor (c$, 
39752 function (a) {
39753 Clazz_superConstructor (this, java.awt.ModalEventFilter.ToolkitModalEventFilter, [a]);
39754 this.appContext = a.appContext;
39755 }, "java.awt.Dialog");
39756 Clazz_overrideMethod (c$, "acceptWindow", 
39757 function (a) {
39758 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE)) {
39759 return java.awt.EventFilter.FilterAction.ACCEPT;
39760 }if (a.appContext !== this.appContext) {
39761 return java.awt.EventFilter.FilterAction.REJECT;
39762 }while (a != null) {
39763 if (a === this.modalDialog) {
39764 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39765 }a = a.getOwner ();
39766 }
39767 return java.awt.EventFilter.FilterAction.REJECT;
39768 }, "java.awt.Window");
39769 c$ = Clazz_p0p ();
39770 Clazz_pu$h(self.c$);
39771 c$ = Clazz_decorateAsClass (function () {
39772 this.appContext = null;
39773 Clazz_instantialize (this, arguments);
39774 }, java.awt.ModalEventFilter, "ApplicationModalEventFilter", java.awt.ModalEventFilter);
39775 Clazz_makeConstructor (c$, 
39776 function (a) {
39777 Clazz_superConstructor (this, java.awt.ModalEventFilter.ApplicationModalEventFilter, [a]);
39778 this.appContext = a.appContext;
39779 }, "java.awt.Dialog");
39780 Clazz_overrideMethod (c$, "acceptWindow", 
39781 function (a) {
39782 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39783 return java.awt.EventFilter.FilterAction.ACCEPT;
39784 }if (a.appContext === this.appContext) {
39785 while (a != null) {
39786 if (a === this.modalDialog) {
39787 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39788 }a = a.getOwner ();
39789 }
39790 return java.awt.EventFilter.FilterAction.REJECT;
39791 }return java.awt.EventFilter.FilterAction.ACCEPT;
39792 }, "java.awt.Window");
39793 c$ = Clazz_p0p ();
39794 Clazz_pu$h(self.c$);
39795 c$ = Clazz_decorateAsClass (function () {
39796 this.documentRoot = null;
39797 Clazz_instantialize (this, arguments);
39798 }, java.awt.ModalEventFilter, "DocumentModalEventFilter", java.awt.ModalEventFilter);
39799 Clazz_makeConstructor (c$, 
39800 function (a) {
39801 Clazz_superConstructor (this, java.awt.ModalEventFilter.DocumentModalEventFilter, [a]);
39802 this.documentRoot = a.getDocumentRoot ();
39803 }, "java.awt.Dialog");
39804 Clazz_overrideMethod (c$, "acceptWindow", 
39805 function (a) {
39806 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39807 var b = this.modalDialog.getOwner ();
39808 while (b != null) {
39809 if (b === a) {
39810 return java.awt.EventFilter.FilterAction.REJECT;
39811 }b = b.getOwner ();
39812 }
39813 return java.awt.EventFilter.FilterAction.ACCEPT;
39814 }while (a != null) {
39815 if (a === this.modalDialog) {
39816 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39817 }if (a === this.documentRoot) {
39818 return java.awt.EventFilter.FilterAction.REJECT;
39819 }a = a.getOwner ();
39820 }
39821 return java.awt.EventFilter.FilterAction.ACCEPT;
39822 }, "java.awt.Window");
39823 c$ = Clazz_p0p ();
39824 });
39825 Clazz_declarePackage ("java.awt.peer");
39826 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.CanvasPeer", null, function () {
39827 Clazz_declareInterface (java.awt.peer, "CanvasPeer", java.awt.peer.ComponentPeer);
39828 });
39829 Clazz_declarePackage ("java.awt.peer");
39830 c$ = Clazz_declareInterface (java.awt.peer, "ComponentPeer");
39831 Clazz_defineStatics (c$,
39832 "SET_LOCATION", 1,
39833 "SET_SIZE", 2,
39834 "SET_BOUNDS", 3,
39835 "SET_CLIENT_SIZE", 4,
39836 "RESET_OPERATION", 5,
39837 "NO_EMBEDDED_CHECK", (16384),
39838 "DEFAULT_OPERATION", 3);
39839 Clazz_declarePackage ("java.awt.peer");
39840 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.ContainerPeer", null, function () {
39841 Clazz_declareInterface (java.awt.peer, "ContainerPeer", java.awt.peer.ComponentPeer);
39842 });
39843 Clazz_declarePackage ("java.awt.peer");
39844 Clazz_load (["java.awt.peer.WindowPeer"], "java.awt.peer.FramePeer", null, function () {
39845 Clazz_declareInterface (java.awt.peer, "FramePeer", java.awt.peer.WindowPeer);
39846 });
39847 Clazz_declarePackage ("java.awt.peer");
39848 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.LightweightPeer", null, function () {
39849 Clazz_declareInterface (java.awt.peer, "LightweightPeer", java.awt.peer.ComponentPeer);
39850 });
39851 Clazz_declarePackage ("java.awt.peer");
39852 Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.PanelPeer", null, function () {
39853 Clazz_declareInterface (java.awt.peer, "PanelPeer", java.awt.peer.ContainerPeer);
39854 });
39855 Clazz_declarePackage ("java.awt.peer");
39856 Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.WindowPeer", null, function () {
39857 Clazz_declareInterface (java.awt.peer, "WindowPeer", java.awt.peer.ContainerPeer);
39858 });
39859 Clazz_declarePackage ("java.awt");
39860 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.SentEvent", ["java.awt.Toolkit", "jssun.awt.SunToolkit"], function () {
39861 c$ = Clazz_decorateAsClass (function () {
39862 this.$dispatched = false;
39863 this.nested = null;
39864 this.toNotify = null;
39865 Clazz_instantialize (this, arguments);
39866 }, java.awt, "SentEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39867 Clazz_makeConstructor (c$, 
39868 function () {
39869 this.construct (null);
39870 });
39871 Clazz_makeConstructor (c$, 
39872 function (nested) {
39873 this.construct (nested, null);
39874 }, "java.awt.AWTEvent");
39875 Clazz_makeConstructor (c$, 
39876 function (nested, toNotify) {
39877 Clazz_superConstructor (this, java.awt.SentEvent, [(nested != null) ? nested.getSource () : java.awt.Toolkit.getDefaultToolkit (), 1007]);
39878 this.nested = nested;
39879 this.toNotify = toNotify;
39880 }, "java.awt.AWTEvent,jssun.awt.AppContext");
39881 Clazz_overrideMethod (c$, "dispatch", 
39882 function () {
39883 try {
39884 if (this.nested != null) {
39885 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39886 }} finally {
39887 this.$dispatched = true;
39888 if (this.toNotify != null) {
39889 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39890 }{
39891 this.notifyAll ();
39892 }}
39893 });
39894 Clazz_defineMethod (c$, "dispose", 
39895 function () {
39896 this.$dispatched = true;
39897 if (this.toNotify != null) {
39898 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39899 }{
39900 this.notifyAll ();
39901 }});
39902 Clazz_defineStatics (c$,
39903 "ID", 1007);
39904 });
39905 Clazz_declarePackage ("java.awt");
39906 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 () {
39907 c$ = Clazz_decorateAsClass (function () {
39908 this.nested = null;
39909 this.appContext = null;
39910 this.disposed = false;
39911 Clazz_instantialize (this, arguments);
39912 }, java.awt, "SequencedEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39913 Clazz_makeConstructor (c$, 
39914 function (nested) {
39915 Clazz_superConstructor (this, java.awt.SequencedEvent, [nested.getSource (), 1006]);
39916 this.nested = nested;
39917 {
39918 java.awt.SequencedEvent.list.add (this);
39919 }}, "java.awt.AWTEvent");
39920 Clazz_overrideMethod (c$, "dispatch", 
39921 function () {
39922 try {
39923 this.appContext = jssun.awt.AppContext.getAppContext ();
39924 if (java.awt.SequencedEvent.getFirst () !== this) {
39925 if (java.awt.EventQueue.isDispatchThread ()) {
39926 var edt = Thread.currentThread ();
39927 edt.pumpEvents (1007, ((Clazz_isClassDefined ("java.awt.SequencedEvent$1") ? 0 : java.awt.SequencedEvent.$SequencedEvent$1$ ()), Clazz_innerTypeInstance (java.awt.SequencedEvent$1, this, null)));
39928 } else {
39929 while (!this.isFirstOrDisposed ()) {
39930 {
39931 try {
39932 swingjs.JSToolkit.warn ("Cannot wait in SequenceEvent");
39933 java.awt.SequencedEvent.wait (1000);
39934 } catch (e) {
39935 if (Clazz_exceptionOf (e, InterruptedException)) {
39936 break;
39937 } else {
39938 throw e;
39939 }
39940 }
39941 }}
39942 }}if (!this.disposed) {
39943 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39944 }} finally {
39945 this.dispose ();
39946 }
39947 });
39948 c$.isOwnerAppContextDisposed = Clazz_defineMethod (c$, "isOwnerAppContextDisposed", 
39949  function (se) {
39950 if (se != null) {
39951 var target = se.nested.getSource ();
39952 if (Clazz_instanceOf (target, java.awt.Component)) {
39953 return (target).appContext.isDisposed ();
39954 }}return false;
39955 }, "java.awt.SequencedEvent");
39956 Clazz_defineMethod (c$, "isFirstOrDisposed", 
39957 function () {
39958 if (this.disposed) {
39959 return true;
39960 }return this === java.awt.SequencedEvent.getFirstWithContext () || this.disposed;
39961 });
39962 c$.getFirst = Clazz_defineMethod (c$, "getFirst", 
39963  function () {
39964 return java.awt.SequencedEvent.list.getFirst ();
39965 });
39966 c$.getFirstWithContext = Clazz_defineMethod (c$, "getFirstWithContext", 
39967  function () {
39968 var first = java.awt.SequencedEvent.getFirst ();
39969 while (java.awt.SequencedEvent.isOwnerAppContextDisposed (first)) {
39970 first.dispose ();
39971 first = java.awt.SequencedEvent.getFirst ();
39972 }
39973 return first;
39974 });
39975 Clazz_defineMethod (c$, "dispose", 
39976 function () {
39977 {
39978 if (this.disposed) {
39979 return;
39980 }this.disposed = true;
39981 }if (this.appContext != null) {
39982 jssun.awt.SunToolkit.postEvent (this.appContext,  new java.awt.SentEvent ());
39983 }var next = null;
39984 {
39985 java.awt.SequencedEvent.notifyAll ();
39986 if (java.awt.SequencedEvent.list.getFirst () === this) {
39987 java.awt.SequencedEvent.list.removeFirst ();
39988 if (!java.awt.SequencedEvent.list.isEmpty ()) {
39989 next = java.awt.SequencedEvent.list.getFirst ();
39990 }} else {
39991 java.awt.SequencedEvent.list.remove (this);
39992 }}if (next != null && next.appContext != null) {
39993 jssun.awt.SunToolkit.postEvent (next.appContext,  new java.awt.SentEvent ());
39994 }});
39995 c$.$SequencedEvent$1$ = function () {
39996 Clazz_pu$h(self.c$);
39997 c$ = Clazz_declareAnonymous (java.awt, "SequencedEvent$1", null, java.awt.Conditional);
39998 Clazz_overrideMethod (c$, "evaluate", 
39999 function () {
40000 return !this.b$["java.awt.SequencedEvent"].isFirstOrDisposed ();
40001 });
40002 c$ = Clazz_p0p ();
40003 };
40004 Clazz_defineStatics (c$,
40005 "ID", 1006);
40006 c$.list = c$.prototype.list =  new java.util.LinkedList ();
40007 });
40008 Clazz_load(["java.util.AbstractList"],"java.util.AbstractSequentialList",["java.lang.IndexOutOfBoundsException"],function(){
40009 c$=Clazz_declareType(java.util,"AbstractSequentialList",java.util.AbstractList);
40010 Clazz_defineMethod(c$,"add",
40011 function(location,object){
40012 this.listIterator(location).add(object);
40013 },"~N,~O");
40014 Clazz_defineMethod(c$,"addAll",
40015 function(location,collection){
40016 var it=this.listIterator(location);
40017 var colIt=collection.iterator();
40018 var next=it.nextIndex();
40019 while(colIt.hasNext()){
40020 it.add(colIt.next());
40021 it.previous();
40022 }
40023 return next!=it.nextIndex();
40024 },"~N,java.util.Collection");
40025 Clazz_overrideMethod(c$,"get",
40026 function(location){
40027 try{
40028 return this.listIterator(location).next();
40029 }catch(e){
40030 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
40031 throw new IndexOutOfBoundsException();
40032 }else{
40033 throw e;
40034 }
40035 }
40036 },"~N");
40037 Clazz_overrideMethod(c$,"iterator",
40038 function(){
40039 return this.listIterator(0);
40040 });
40041 Clazz_defineMethod(c$,"remove",
40042 function(location){
40043 try{
40044 var it=this.listIterator(location);
40045 var result=it.next();
40046 it.remove();
40047 return result;
40048 }catch(e){
40049 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
40050 throw new IndexOutOfBoundsException();
40051 }else{
40052 throw e;
40053 }
40054 }
40055 },"~N");
40056 Clazz_overrideMethod(c$,"set",
40057 function(location,object){
40058 var it=this.listIterator(location);
40059 var result=it.next();
40060 it.set(object);
40061 return result;
40062 },"~N,~O");
40063 });
40064 Clazz_load(["java.util.AbstractSequentialList","$.List","$.ListIterator","$.Queue"],"java.util.LinkedList",["java.lang.IllegalStateException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.ConcurrentModificationException","$.NoSuchElementException"],function(){
40065 c$=Clazz_decorateAsClass(function(){
40066 this.$size=0;
40067 this.voidLink=null;
40068 Clazz_instantialize(this,arguments);
40069 },java.util,"LinkedList",java.util.AbstractSequentialList,[java.util.List,java.util.Queue,Cloneable,java.io.Serializable]);
40070 Clazz_makeConstructor(c$,
40071 function(){
40072 Clazz_superConstructor(this,java.util.LinkedList,[]);
40073 this.voidLink=new java.util.LinkedList.Link(null,null,null);
40074 this.voidLink.previous=this.voidLink;
40075 this.voidLink.next=this.voidLink;
40076 });
40077 Clazz_makeConstructor(c$,
40078 function(collection){
40079 this.construct();
40080 this.addAll(collection);
40081 },"java.util.Collection");
40082 Clazz_defineMethod(c$,"add",
40083 function(location,object){
40084 if(0<=location&&location<=this.$size){
40085 var link=this.voidLink;
40086 if(location<(Math.floor(this.$size/2))){
40087 for(var i=0;i<=location;i++){
40088 link=link.next;
40089 }
40090 }else{
40091 for(var i=this.$size;i>location;i--){
40092 link=link.previous;
40093 }
40094 }var previous=link.previous;
40095 var newLink=new java.util.LinkedList.Link(object,previous,link);
40096 previous.next=newLink;
40097 link.previous=newLink;
40098 this.$size++;
40099 this.modCount++;
40100 }else{
40101 throw new IndexOutOfBoundsException();
40102 }},"~N,~O");
40103 Clazz_defineMethod(c$,"add",
40104 function(object){
40105 var oldLast=this.voidLink.previous;
40106 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
40107 this.voidLink.previous=newLink;
40108 oldLast.next=newLink;
40109 this.$size++;
40110 this.modCount++;
40111 return true;
40112 },"~O");
40113 Clazz_defineMethod(c$,"addAll",
40114 function(location,collection){
40115 if(location<0||location>this.$size){
40116 throw new IndexOutOfBoundsException();
40117 }var adding=collection.size();
40118 if(adding==0){
40119 return false;
40120 }var previous=this.voidLink;
40121 if(location<(Math.floor(this.$size/2))){
40122 for(var i=0;i<location;i++){
40123 previous=previous.next;
40124 }
40125 }else{
40126 for(var i=this.$size;i>=location;i--){
40127 previous=previous.previous;
40128 }
40129 }var next=previous.next;
40130 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40131 var newLink=new java.util.LinkedList.Link(e,previous,null);
40132 previous.next=newLink;
40133 previous=newLink;
40134 }
40135 previous.next=next;
40136 next.previous=previous;
40137 this.$size+=adding;
40138 this.modCount++;
40139 return true;
40140 },"~N,java.util.Collection");
40141 Clazz_defineMethod(c$,"addAll",
40142 function(collection){
40143 var adding=collection.size();
40144 if(adding==0){
40145 return false;
40146 }var previous=this.voidLink.previous;
40147 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40148 var newLink=new java.util.LinkedList.Link(e,previous,null);
40149 previous.next=newLink;
40150 previous=newLink;
40151 }
40152 previous.next=this.voidLink;
40153 this.voidLink.previous=previous;
40154 this.$size+=adding;
40155 this.modCount++;
40156 return true;
40157 },"java.util.Collection");
40158 Clazz_defineMethod(c$,"addFirst",
40159 function(object){
40160 var oldFirst=this.voidLink.next;
40161 var newLink=new java.util.LinkedList.Link(object,this.voidLink,oldFirst);
40162 this.voidLink.next=newLink;
40163 oldFirst.previous=newLink;
40164 this.$size++;
40165 this.modCount++;
40166 },"~O");
40167 Clazz_defineMethod(c$,"addLast",
40168 function(object){
40169 var oldLast=this.voidLink.previous;
40170 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
40171 this.voidLink.previous=newLink;
40172 oldLast.next=newLink;
40173 this.$size++;
40174 this.modCount++;
40175 },"~O");
40176 Clazz_overrideMethod(c$,"clear",
40177 function(){
40178 if(this.$size>0){
40179 this.$size=0;
40180 this.voidLink.next=this.voidLink;
40181 this.voidLink.previous=this.voidLink;
40182 this.modCount++;
40183 }});
40184 Clazz_overrideMethod(c$,"clone",
40185 function(){
40186 return new java.util.LinkedList(this);
40187 });
40188 Clazz_overrideMethod(c$,"contains",
40189 function(object){
40190 var link=this.voidLink.next;
40191 if(object!=null){
40192 while(link!==this.voidLink){
40193 if(object.equals(link.data)){
40194 return true;
40195 }link=link.next;
40196 }
40197 }else{
40198 while(link!==this.voidLink){
40199 if(link.data==null){
40200 return true;
40201 }link=link.next;
40202 }
40203 }return false;
40204 },"~O");
40205 Clazz_overrideMethod(c$,"get",
40206 function(location){
40207 if(0<=location&&location<this.$size){
40208 var link=this.voidLink;
40209 if(location<(Math.floor(this.$size/2))){
40210 for(var i=0;i<=location;i++){
40211 link=link.next;
40212 }
40213 }else{
40214 for(var i=this.$size;i>location;i--){
40215 link=link.previous;
40216 }
40217 }return link.data;
40218 }throw new IndexOutOfBoundsException();
40219 },"~N");
40220 Clazz_defineMethod(c$,"getFirst",
40221 function(){
40222 var first=this.voidLink.next;
40223 if(first!==this.voidLink){
40224 return first.data;
40225 }throw new java.util.NoSuchElementException();
40226 });
40227 Clazz_defineMethod(c$,"getLast",
40228 function(){
40229 var last=this.voidLink.previous;
40230 if(last!==this.voidLink){
40231 return last.data;
40232 }throw new java.util.NoSuchElementException();
40233 });
40234 Clazz_overrideMethod(c$,"indexOf",
40235 function(object){
40236 var pos=0;
40237 var link=this.voidLink.next;
40238 if(object!=null){
40239 while(link!==this.voidLink){
40240 if(object.equals(link.data)){
40241 return pos;
40242 }link=link.next;
40243 pos++;
40244 }
40245 }else{
40246 while(link!==this.voidLink){
40247 if(link.data==null){
40248 return pos;
40249 }link=link.next;
40250 pos++;
40251 }
40252 }return-1;
40253 },"~O");
40254 Clazz_overrideMethod(c$,"lastIndexOf",
40255 function(object){
40256 var pos=this.$size;
40257 var link=this.voidLink.previous;
40258 if(object!=null){
40259 while(link!==this.voidLink){
40260 pos--;
40261 if(object.equals(link.data)){
40262 return pos;
40263 }link=link.previous;
40264 }
40265 }else{
40266 while(link!==this.voidLink){
40267 pos--;
40268 if(link.data==null){
40269 return pos;
40270 }link=link.previous;
40271 }
40272 }return-1;
40273 },"~O");
40274 Clazz_defineMethod(c$,"listIterator",
40275 function(location){
40276 return new java.util.LinkedList.LinkIterator(this,location);
40277 },"~N");
40278 Clazz_defineMethod(c$,"remove",
40279 function(location){
40280 if(0<=location&&location<this.$size){
40281 var link=this.voidLink;
40282 if(location<(Math.floor(this.$size/2))){
40283 for(var i=0;i<=location;i++){
40284 link=link.next;
40285 }
40286 }else{
40287 for(var i=this.$size;i>location;i--){
40288 link=link.previous;
40289 }
40290 }var previous=link.previous;
40291 var next=link.next;
40292 previous.next=next;
40293 next.previous=previous;
40294 this.$size--;
40295 this.modCount++;
40296 return link.data;
40297 }throw new IndexOutOfBoundsException();
40298 },"~N");
40299 Clazz_defineMethod(c$,"remove",
40300 function(object){
40301 var link=this.voidLink.next;
40302 if(object!=null){
40303 while(link!==this.voidLink&&!object.equals(link.data)){
40304 link=link.next;
40305 }
40306 }else{
40307 while(link!==this.voidLink&&link.data!=null){
40308 link=link.next;
40309 }
40310 }if(link===this.voidLink){
40311 return false;
40312 }var next=link.next;
40313 var previous=link.previous;
40314 previous.next=next;
40315 next.previous=previous;
40316 this.$size--;
40317 this.modCount++;
40318 return true;
40319 },"~O");
40320 Clazz_defineMethod(c$,"removeFirst",
40321 function(){
40322 var first=this.voidLink.next;
40323 if(first!==this.voidLink){
40324 var next=first.next;
40325 this.voidLink.next=next;
40326 next.previous=this.voidLink;
40327 this.$size--;
40328 this.modCount++;
40329 return first.data;
40330 }throw new java.util.NoSuchElementException();
40331 });
40332 Clazz_defineMethod(c$,"removeLast",
40333 function(){
40334 var last=this.voidLink.previous;
40335 if(last!==this.voidLink){
40336 var previous=last.previous;
40337 this.voidLink.previous=previous;
40338 previous.next=this.voidLink;
40339 this.$size--;
40340 this.modCount++;
40341 return last.data;
40342 }throw new java.util.NoSuchElementException();
40343 });
40344 Clazz_overrideMethod(c$,"set",
40345 function(location,object){
40346 if(0<=location&&location<this.$size){
40347 var link=this.voidLink;
40348 if(location<(Math.floor(this.$size/2))){
40349 for(var i=0;i<=location;i++){
40350 link=link.next;
40351 }
40352 }else{
40353 for(var i=this.$size;i>location;i--){
40354 link=link.previous;
40355 }
40356 }var result=link.data;
40357 link.data=object;
40358 return result;
40359 }throw new IndexOutOfBoundsException();
40360 },"~N,~O");
40361 Clazz_overrideMethod(c$,"size",
40362 function(){
40363 return this.$size;
40364 });
40365 Clazz_overrideMethod(c$,"offer",
40366 function(o){
40367 this.add(o);
40368 return true;
40369 },"~O");
40370 Clazz_overrideMethod(c$,"poll",
40371 function(){
40372 return this.$size==0?null:this.removeFirst();
40373 });
40374 Clazz_defineMethod(c$,"remove",
40375 function(){
40376 return this.removeFirst();
40377 });
40378 Clazz_overrideMethod(c$,"peek",
40379 function(){
40380 var first=this.voidLink.next;
40381 return first===this.voidLink?null:first.data;
40382 });
40383 Clazz_overrideMethod(c$,"element",
40384 function(){
40385 return this.getFirst();
40386 });
40387 Clazz_defineMethod(c$,"toArray",
40388 function(){
40389 var index=0;
40390 var contents=new Array(this.$size);
40391 var link=this.voidLink.next;
40392 while(link!==this.voidLink){
40393 contents[index++]=link.data;
40394 link=link.next;
40395 }
40396 return contents;
40397 });
40398 Clazz_defineMethod(c$,"toArray",
40399 function(contents){
40400 var index=0;
40401 if(this.$size>contents.length){
40402 var ct=contents.getClass().getComponentType();
40403 contents=java.lang.reflect.Array.newInstance(ct,this.$size);
40404 }var link=this.voidLink.next;
40405 while(link!==this.voidLink){
40406 contents[index++]=link.data;
40407 link=link.next;
40408 }
40409 if(index<contents.length){
40410 contents[index]=null;
40411 }return contents;
40412 },"~A");
40413 Clazz_pu$h(self.c$);
40414 c$=Clazz_decorateAsClass(function(){
40415 this.data=null;
40416 this.previous=null;
40417 this.next=null;
40418 Clazz_instantialize(this,arguments);
40419 },java.util.LinkedList,"Link");
40420 Clazz_makeConstructor(c$,
40421 function(a,b,c){
40422 this.data=a;
40423 this.previous=b;
40424 this.next=c;
40425 },"~O,java.util.LinkedList.Link,java.util.LinkedList.Link");
40426 c$=Clazz_p0p();
40427 Clazz_pu$h(self.c$);
40428 c$=Clazz_decorateAsClass(function(){
40429 this.pos=0;
40430 this.expectedModCount=0;
40431 this.list=null;
40432 this.link=null;
40433 this.lastLink=null;
40434 Clazz_instantialize(this,arguments);
40435 },java.util.LinkedList,"LinkIterator",null,java.util.ListIterator);
40436 Clazz_makeConstructor(c$,
40437 function(a,b){
40438 this.list=a;
40439 this.expectedModCount=this.list.modCount;
40440 if(0<=b&&b<=this.list.$size){
40441 this.link=this.list.voidLink;
40442 if(b<Math.floor(this.list.$size/2)){
40443 for(this.pos=-1;this.pos+1<b;this.pos++){
40444 this.link=this.link.next;
40445 }
40446 }else{
40447 for(this.pos=this.list.$size;this.pos>=b;this.pos--){
40448 this.link=this.link.previous;
40449 }
40450 }}else{
40451 throw new IndexOutOfBoundsException();
40452 }},"java.util.LinkedList,~N");
40453 Clazz_overrideMethod(c$,"add",
40454 function(a){
40455 if(this.expectedModCount==this.list.modCount){
40456 var b=this.link.next;
40457 var c=new java.util.LinkedList.Link(a,this.link,b);
40458 this.link.next=c;
40459 b.previous=c;
40460 this.link=c;
40461 this.lastLink=null;
40462 this.pos++;
40463 this.expectedModCount++;
40464 this.list.$size++;
40465 this.list.modCount++;
40466 }else{
40467 throw new java.util.ConcurrentModificationException();
40468 }},"~O");
40469 Clazz_overrideMethod(c$,"hasNext",
40470 function(){
40471 return this.link.next!==this.list.voidLink;
40472 });
40473 Clazz_overrideMethod(c$,"hasPrevious",
40474 function(){
40475 return this.link!==this.list.voidLink;
40476 });
40477 Clazz_overrideMethod(c$,"next",
40478 function(){
40479 if(this.expectedModCount==this.list.modCount){
40480 var a=this.link.next;
40481 if(a!==this.list.voidLink){
40482 this.lastLink=this.link=a;
40483 this.pos++;
40484 return this.link.data;
40485 }throw new java.util.NoSuchElementException();
40486 }throw new java.util.ConcurrentModificationException();
40487 });
40488 Clazz_overrideMethod(c$,"nextIndex",
40489 function(){
40490 return this.pos+1;
40491 });
40492 Clazz_overrideMethod(c$,"previous",
40493 function(){
40494 if(this.expectedModCount==this.list.modCount){
40495 if(this.link!==this.list.voidLink){
40496 this.lastLink=this.link;
40497 this.link=this.link.previous;
40498 this.pos--;
40499 return this.lastLink.data;
40500 }throw new java.util.NoSuchElementException();
40501 }throw new java.util.ConcurrentModificationException();
40502 });
40503 Clazz_overrideMethod(c$,"previousIndex",
40504 function(){
40505 return this.pos;
40506 });
40507 Clazz_overrideMethod(c$,"remove",
40508 function(){
40509 if(this.expectedModCount==this.list.modCount){
40510 if(this.lastLink!=null){
40511 var a=this.lastLink.next;
40512 var b=this.lastLink.previous;
40513 a.previous=b;
40514 b.next=a;
40515 if(this.lastLink===this.link){
40516 this.pos--;
40517 }this.link=b;
40518 this.lastLink=null;
40519 this.expectedModCount++;
40520 this.list.$size--;
40521 this.list.modCount++;
40522 }else{
40523 throw new IllegalStateException();
40524 }}else{
40525 throw new java.util.ConcurrentModificationException();
40526 }});
40527 Clazz_overrideMethod(c$,"set",
40528 function(a){
40529 if(this.expectedModCount==this.list.modCount){
40530 if(this.lastLink!=null){
40531 this.lastLink.data=a;
40532 }else{
40533 throw new IllegalStateException();
40534 }}else{
40535 throw new java.util.ConcurrentModificationException();
40536 }},"~O");
40537 c$=Clazz_p0p();
40538 });
40539 Clazz_declarePackage ("JU");
40540 Clazz_load (["JU.T3"], "JU.V3", null, function () {
40541 c$ = Clazz_declareType (JU, "V3", JU.T3);
40542 Clazz_makeConstructor (c$, 
40543 function () {
40544 });
40545 c$.newV = Clazz_defineMethod (c$, "newV", 
40546 function (t) {
40547 return JU.V3.new3 (t.x, t.y, t.z);
40548 }, "JU.T3");
40549 c$.newVsub = Clazz_defineMethod (c$, "newVsub", 
40550 function (t1, t2) {
40551 return JU.V3.new3 (t1.x - t2.x, t1.y - t2.y, t1.z - t2.z);
40552 }, "JU.T3,JU.T3");
40553 c$.new3 = Clazz_defineMethod (c$, "new3", 
40554 function (x, y, z) {
40555 var v =  new JU.V3 ();
40556 v.x = x;
40557 v.y = y;
40558 v.z = z;
40559 return v;
40560 }, "~N,~N,~N");
40561 Clazz_defineMethod (c$, "angle", 
40562 function (v1) {
40563 var xx = this.y * v1.z - this.z * v1.y;
40564 var yy = this.z * v1.x - this.x * v1.z;
40565 var zz = this.x * v1.y - this.y * v1.x;
40566 var cross = Math.sqrt (xx * xx + yy * yy + zz * zz);
40567 return Math.abs (Math.atan2 (cross, this.dot (v1)));
40568 }, "JU.V3");
40569 });
40570 Clazz_declarePackage ("javax.swing");
40571 Clazz_load (["java.util.Vector"], "javax.swing.ButtonGroup", null, function () {
40572 c$ = Clazz_decorateAsClass (function () {
40573 this.buttons = null;
40574 this.selection = null;
40575 Clazz_instantialize (this, arguments);
40576 }, javax.swing, "ButtonGroup");
40577 Clazz_prepareFields (c$, function () {
40578 this.buttons =  new java.util.Vector ();
40579 });
40580 Clazz_makeConstructor (c$, 
40581 function () {
40582 });
40583 Clazz_defineMethod (c$, "add", 
40584 function (b) {
40585 if (b == null) {
40586 return;
40587 }this.buttons.addElement (b);
40588 if (b.isSelected ()) {
40589 if (this.selection == null) {
40590 this.selection = b.getModel ();
40591 } else {
40592 b.setSelected (false);
40593 }}b.getModel ().setGroup (this);
40594 }, "javax.swing.AbstractButton");
40595 Clazz_defineMethod (c$, "remove", 
40596 function (b) {
40597 if (b == null) {
40598 return;
40599 }this.buttons.removeElement (b);
40600 if (b.getModel () === this.selection) {
40601 this.selection = null;
40602 }b.getModel ().setGroup (null);
40603 }, "javax.swing.AbstractButton");
40604 Clazz_defineMethod (c$, "clearSelection", 
40605 function () {
40606 if (this.selection != null) {
40607 var oldSelection = this.selection;
40608 this.selection = null;
40609 oldSelection.setSelected (false);
40610 }});
40611 Clazz_defineMethod (c$, "getElements", 
40612 function () {
40613 return this.buttons.elements ();
40614 });
40615 Clazz_defineMethod (c$, "getSelection", 
40616 function () {
40617 return this.selection;
40618 });
40619 Clazz_defineMethod (c$, "setSelected", 
40620 function (m, b) {
40621 if (b && m != null && m !== this.selection) {
40622 var oldSelection = this.selection;
40623 this.selection = m;
40624 if (oldSelection != null) {
40625 oldSelection.setSelected (false);
40626 }m.setSelected (true);
40627 }}, "javax.swing.ButtonModel,~B");
40628 Clazz_defineMethod (c$, "isSelected", 
40629 function (m) {
40630 return (m === this.selection);
40631 }, "javax.swing.ButtonModel");
40632 Clazz_defineMethod (c$, "getButtonCount", 
40633 function () {
40634 if (this.buttons == null) {
40635 return 0;
40636 } else {
40637 return this.buttons.size ();
40638 }});
40639 });
40640 Clazz_declarePackage ("javax.swing");
40641 Clazz_load (["jssun.awt.PaintEventDispatcher"], "javax.swing.SwingPaintEventDispatcher", ["javax.swing.RootPaneContainer", "jssun.awt.SunToolkit"], function () {
40642 c$ = Clazz_declareType (javax.swing, "SwingPaintEventDispatcher", jssun.awt.PaintEventDispatcher);
40643 Clazz_overrideMethod (c$, "shouldDoNativeBackgroundErase", 
40644 function (c) {
40645 return javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND || !(Clazz_instanceOf (c, javax.swing.RootPaneContainer));
40646 }, "java.awt.Component");
40647 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
40648 function (c, r) {
40649 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
40650 var appContext = jssun.awt.SunToolkit.targetToAppContext (c);
40651 return true;
40652 }return Clazz_superCall (this, javax.swing.SwingPaintEventDispatcher, "queueSurfaceDataReplacing", [c, r]);
40653 }, "java.awt.Component,Runnable");
40654 Clazz_defineStatics (c$,
40655 "SHOW_FROM_DOUBLE_BUFFER", false,
40656 "ERASE_BACKGROUND", false);
40657 {
40658 javax.swing.SwingPaintEventDispatcher.SHOW_FROM_DOUBLE_BUFFER = false;
40659 javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND = true;
40660 }});
40661 Clazz_declarePackage ("jssun.awt");
40662 Clazz_load (["java.util.HashSet", "$.IdentityHashMap"], "jssun.awt.AWTAutoShutdown", ["java.awt.AWTEvent"], function () {
40663 c$ = Clazz_decorateAsClass (function () {
40664 this.busyThreadSet = null;
40665 this.toolkitThreadBusy = false;
40666 this.peerMap = null;
40667 Clazz_instantialize (this, arguments);
40668 }, jssun.awt, "AWTAutoShutdown", null, Runnable);
40669 Clazz_prepareFields (c$, function () {
40670 this.busyThreadSet =  new java.util.HashSet (7);
40671 this.peerMap =  new java.util.IdentityHashMap ();
40672 });
40673 Clazz_makeConstructor (c$, 
40674  function () {
40675 });
40676 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
40677 function () {
40678 return (jssun.awt.AWTAutoShutdown.theInstance == null ? (jssun.awt.AWTAutoShutdown.theInstance =  new jssun.awt.AWTAutoShutdown ()) : jssun.awt.AWTAutoShutdown.theInstance);
40679 });
40680 c$.notifyToolkitThreadBusy = Clazz_defineMethod (c$, "notifyToolkitThreadBusy", 
40681 function () {
40682 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (true);
40683 });
40684 c$.notifyToolkitThreadFree = Clazz_defineMethod (c$, "notifyToolkitThreadFree", 
40685 function () {
40686 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (false);
40687 });
40688 Clazz_defineMethod (c$, "notifyThreadBusy", 
40689 function (thread) {
40690 this.busyThreadSet.add (thread);
40691 }, "Thread");
40692 Clazz_defineMethod (c$, "notifyThreadFree", 
40693 function (thread) {
40694 this.busyThreadSet.remove (thread);
40695 }, "Thread");
40696 Clazz_defineMethod (c$, "notifyPeerMapUpdated", 
40697 function () {
40698 if (!this.isReadyToShutdown ()) {
40699 this.activateBlockerThread ();
40700 }});
40701 Clazz_defineMethod (c$, "isReadyToShutdown", 
40702  function () {
40703 return (!this.toolkitThreadBusy && this.peerMap.isEmpty () && this.busyThreadSet.isEmpty ());
40704 });
40705 Clazz_defineMethod (c$, "setToolkitBusy", 
40706  function (busy) {
40707 if (busy != this.toolkitThreadBusy) {
40708 if (busy != this.toolkitThreadBusy) {
40709 if (busy) {
40710 this.toolkitThreadBusy = busy;
40711 } else {
40712 this.toolkitThreadBusy = busy;
40713 }}}}, "~B");
40714 Clazz_overrideMethod (c$, "run", 
40715 function () {
40716 });
40717 c$.getShutdownEvent = Clazz_defineMethod (c$, "getShutdownEvent", 
40718 function () {
40719 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));
40720 });
40721 Clazz_defineMethod (c$, "activateBlockerThread", 
40722  function () {
40723 });
40724 Clazz_defineMethod (c$, "registerPeer", 
40725 function (target, peer) {
40726 this.peerMap.put (target, peer);
40727 this.notifyPeerMapUpdated ();
40728 }, "~O,~O");
40729 Clazz_defineMethod (c$, "unregisterPeer", 
40730 function (target, peer) {
40731 if (this.peerMap.get (target) === peer) {
40732 this.peerMap.remove (target);
40733 }}, "~O,~O");
40734 Clazz_defineMethod (c$, "getPeer", 
40735 function (target) {
40736 return this.peerMap.get (target);
40737 }, "~O");
40738 Clazz_defineMethod (c$, "dumpPeers", 
40739 function (aLog) {
40740 aLog.fine ("Mapped peers:");
40741 for (var key, $key = this.peerMap.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
40742 aLog.fine (key + "->" + this.peerMap.get (key));
40743 }
40744 }, "java.util.logging.Logger");
40745 c$.$AWTAutoShutdown$1$ = function () {
40746 Clazz_pu$h(self.c$);
40747 c$ = Clazz_declareAnonymous (jssun.awt, "AWTAutoShutdown$1", java.awt.AWTEvent);
40748 c$ = Clazz_p0p ();
40749 };
40750 Clazz_defineStatics (c$,
40751 "theInstance", null);
40752 });
40753 Clazz_declarePackage ("jssun.awt");
40754 c$ = Clazz_decorateAsClass (function () {
40755 this.event = null;
40756 this.next = null;
40757 Clazz_instantialize (this, arguments);
40758 }, jssun.awt, "EventQueueItem");
40759 Clazz_makeConstructor (c$, 
40760 function (evt) {
40761 this.event = evt;
40762 }, "java.awt.AWTEvent");
40763 Clazz_declarePackage ("jssun.awt");
40764 Clazz_declareInterface (jssun.awt, "ModalExclude");
40765 Clazz_declarePackage ("jssun.awt");
40766 Clazz_load (["java.awt.peer.CanvasPeer", "$.LightweightPeer", "$.PanelPeer"], "jssun.awt.NullComponentPeer", ["java.lang.IllegalStateException", "$.UnsupportedOperationException", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle"], function () {
40767 c$ = Clazz_declareType (jssun.awt, "NullComponentPeer", null, [java.awt.peer.LightweightPeer, java.awt.peer.CanvasPeer, java.awt.peer.PanelPeer]);
40768 Clazz_overrideMethod (c$, "isObscured", 
40769 function () {
40770 return false;
40771 });
40772 Clazz_overrideMethod (c$, "canDetermineObscurity", 
40773 function () {
40774 return false;
40775 });
40776 Clazz_overrideMethod (c$, "isFocusable", 
40777 function () {
40778 return false;
40779 });
40780 Clazz_overrideMethod (c$, "setVisible", 
40781 function (b) {
40782 }, "~B");
40783 Clazz_defineMethod (c$, "show", 
40784 function () {
40785 });
40786 Clazz_defineMethod (c$, "hide", 
40787 function () {
40788 });
40789 Clazz_overrideMethod (c$, "setEnabled", 
40790 function (b) {
40791 }, "~B");
40792 Clazz_defineMethod (c$, "enable", 
40793 function () {
40794 });
40795 Clazz_defineMethod (c$, "disable", 
40796 function () {
40797 });
40798 Clazz_overrideMethod (c$, "paint", 
40799 function (g) {
40800 }, "java.awt.Graphics");
40801 Clazz_overrideMethod (c$, "repaint", 
40802 function (tm, x, y, width, height) {
40803 }, "~N,~N,~N,~N,~N");
40804 Clazz_overrideMethod (c$, "print", 
40805 function (g) {
40806 }, "java.awt.Graphics");
40807 Clazz_overrideMethod (c$, "setBounds", 
40808 function (x, y, width, height, op) {
40809 }, "~N,~N,~N,~N,~N");
40810 Clazz_defineMethod (c$, "reshape", 
40811 function (x, y, width, height) {
40812 }, "~N,~N,~N,~N");
40813 Clazz_overrideMethod (c$, "coalescePaintEvent", 
40814 function (e) {
40815 }, "java.awt.event.PaintEvent");
40816 Clazz_defineMethod (c$, "handleEvent", 
40817 function (e) {
40818 return false;
40819 }, "java.awt.Event");
40820 Clazz_defineMethod (c$, "handleEvent", 
40821 function (arg0) {
40822 }, "java.awt.AWTEvent");
40823 Clazz_overrideMethod (c$, "getPreferredSize", 
40824 function () {
40825 return  new java.awt.Dimension (1, 1);
40826 });
40827 Clazz_overrideMethod (c$, "getMinimumSize", 
40828 function () {
40829 return  new java.awt.Dimension (1, 1);
40830 });
40831 Clazz_overrideMethod (c$, "getToolkit", 
40832 function () {
40833 return null;
40834 });
40835 Clazz_overrideMethod (c$, "getColorModel", 
40836 function () {
40837 return null;
40838 });
40839 Clazz_overrideMethod (c$, "getGraphics", 
40840 function () {
40841 return null;
40842 });
40843 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
40844 function () {
40845 return null;
40846 });
40847 Clazz_overrideMethod (c$, "getFontMetrics", 
40848 function (font) {
40849 return null;
40850 }, "java.awt.Font");
40851 Clazz_overrideMethod (c$, "dispose", 
40852 function () {
40853 });
40854 Clazz_overrideMethod (c$, "setForeground", 
40855 function (c) {
40856 }, "java.awt.Color");
40857 Clazz_overrideMethod (c$, "setBackground", 
40858 function (c) {
40859 }, "java.awt.Color");
40860 Clazz_overrideMethod (c$, "setFont", 
40861 function (f) {
40862 }, "java.awt.Font");
40863 Clazz_overrideMethod (c$, "updateCursorImmediately", 
40864 function () {
40865 });
40866 Clazz_defineMethod (c$, "setCursor", 
40867 function (cursor) {
40868 }, "java.awt.Cursor");
40869 Clazz_overrideMethod (c$, "requestFocus", 
40870 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
40871 return false;
40872 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
40873 Clazz_defineMethod (c$, "createImage", 
40874 function (producer) {
40875 return null;
40876 }, "java.awt.image.ImageProducer");
40877 Clazz_defineMethod (c$, "createImage", 
40878 function (width, height) {
40879 return null;
40880 }, "~N,~N");
40881 Clazz_overrideMethod (c$, "prepareImage", 
40882 function (img, w, h, o) {
40883 return false;
40884 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40885 Clazz_overrideMethod (c$, "checkImage", 
40886 function (img, w, h, o) {
40887 return 0;
40888 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40889 Clazz_defineMethod (c$, "preferredSize", 
40890 function () {
40891 return this.getPreferredSize ();
40892 });
40893 Clazz_defineMethod (c$, "minimumSize", 
40894 function () {
40895 return this.getMinimumSize ();
40896 });
40897 Clazz_overrideMethod (c$, "getLocationOnScreen", 
40898 function () {
40899 return  new java.awt.Point (0, 0);
40900 });
40901 Clazz_overrideMethod (c$, "getInsets", 
40902 function () {
40903 return this.insets ();
40904 });
40905 Clazz_overrideMethod (c$, "beginValidate", 
40906 function () {
40907 });
40908 Clazz_overrideMethod (c$, "endValidate", 
40909 function () {
40910 });
40911 Clazz_defineMethod (c$, "insets", 
40912 function () {
40913 return  new java.awt.Insets (0, 0, 0, 0);
40914 });
40915 Clazz_defineMethod (c$, "isPaintPending", 
40916 function () {
40917 return false;
40918 });
40919 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
40920 function () {
40921 return false;
40922 });
40923 Clazz_overrideMethod (c$, "createVolatileImage", 
40924 function (width, height) {
40925 return null;
40926 }, "~N,~N");
40927 Clazz_overrideMethod (c$, "beginLayout", 
40928 function () {
40929 });
40930 Clazz_overrideMethod (c$, "endLayout", 
40931 function () {
40932 });
40933 Clazz_overrideMethod (c$, "getBackBuffer", 
40934 function () {
40935 throw  new IllegalStateException ("Page-flipping is not allowed on a lightweight component");
40936 });
40937 Clazz_overrideMethod (c$, "destroyBuffers", 
40938 function () {
40939 });
40940 Clazz_overrideMethod (c$, "isReparentSupported", 
40941 function () {
40942 return false;
40943 });
40944 Clazz_overrideMethod (c$, "reparent", 
40945 function (newNativeParent) {
40946 throw  new UnsupportedOperationException ();
40947 }, "java.awt.peer.ContainerPeer");
40948 Clazz_defineMethod (c$, "restack", 
40949 function () {
40950 throw  new UnsupportedOperationException ();
40951 });
40952 Clazz_defineMethod (c$, "isRestackSupported", 
40953 function () {
40954 return false;
40955 });
40956 Clazz_overrideMethod (c$, "layout", 
40957 function () {
40958 });
40959 Clazz_overrideMethod (c$, "getBounds", 
40960 function () {
40961 return  new java.awt.Rectangle (0, 0, 0, 0);
40962 });
40963 });
40964 Clazz_declarePackage ("jssun.awt");
40965 Clazz_load (null, "jssun.awt.PaintEventDispatcher", ["java.awt.Rectangle", "java.awt.event.PaintEvent"], function () {
40966 c$ = Clazz_declareType (jssun.awt, "PaintEventDispatcher");
40967 c$.setPaintEventDispatcher = Clazz_defineMethod (c$, "setPaintEventDispatcher", 
40968 function (dispatcher) {
40969 {
40970 jssun.awt.PaintEventDispatcher.dispatcher = dispatcher;
40971 }}, "jssun.awt.PaintEventDispatcher");
40972 c$.getPaintEventDispatcher = Clazz_defineMethod (c$, "getPaintEventDispatcher", 
40973 function () {
40974 {
40975 if (jssun.awt.PaintEventDispatcher.dispatcher == null) {
40976 jssun.awt.PaintEventDispatcher.dispatcher =  new jssun.awt.PaintEventDispatcher ();
40977 }return jssun.awt.PaintEventDispatcher.dispatcher;
40978 }});
40979 Clazz_defineMethod (c$, "createPaintEvent", 
40980 function (target, x, y, w, h) {
40981 return  new java.awt.event.PaintEvent (target, 800,  new java.awt.Rectangle (x, y, w, h));
40982 }, "java.awt.Component,~N,~N,~N,~N");
40983 Clazz_defineMethod (c$, "shouldDoNativeBackgroundErase", 
40984 function (c) {
40985 return true;
40986 }, "java.awt.Component");
40987 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
40988 function (c, r) {
40989 return false;
40990 }, "java.awt.Component,Runnable");
40991 Clazz_defineStatics (c$,
40992 "dispatcher", null);
40993 });
40994 Clazz_declarePackage ("jssun.awt");
40995 Clazz_load (null, "jssun.awt.PostEventQueue", ["jssun.awt.EventQueueItem", "$.SunToolkit", "swingjs.JSToolkit"], function () {
40996 c$ = Clazz_decorateAsClass (function () {
40997 this.queueHead = null;
40998 this.queueTail = null;
40999 this.eventQueue = null;
41000 Clazz_instantialize (this, arguments);
41001 }, jssun.awt, "PostEventQueue");
41002 Clazz_makeConstructor (c$, 
41003 function (eq) {
41004 this.eventQueue = eq;
41005 }, "java.awt.EventQueue");
41006 Clazz_defineMethod (c$, "noEvents", 
41007 function () {
41008 return this.queueHead == null;
41009 });
41010 Clazz_defineMethod (c$, "flush", 
41011 function () {
41012 if (this.queueHead != null) {
41013 var tempQueue;
41014 {
41015 tempQueue = this.queueHead;
41016 this.queueHead = this.queueTail = null;
41017 while (tempQueue != null) {
41018 swingjs.JSToolkit.alert ("postevent IS NOT IMPLEMENTED " + tempQueue.event);
41019 this.eventQueue.postEvent (tempQueue.event);
41020 tempQueue = tempQueue.next;
41021 }
41022 }}});
41023 Clazz_defineMethod (c$, "postEvent", 
41024 function (event) {
41025 var item =  new jssun.awt.EventQueueItem (event);
41026 {
41027 if (this.queueHead == null) {
41028 this.queueHead = this.queueTail = item;
41029 } else {
41030 this.queueTail.next = item;
41031 this.queueTail = item;
41032 }}jssun.awt.SunToolkit.wakeupEventQueue (this.eventQueue, false);
41033 }, "java.awt.AWTEvent");
41034 });
41035 Clazz_declarePackage ("jssun.java2d");
41036 Clazz_load (["java.awt.Graphics2D"], "jssun.java2d.SunGraphics2D", ["java.awt.geom.AffineTransform"], function () {
41037 c$ = Clazz_decorateAsClass (function () {
41038 this.transformState = 0;
41039 this.foregroundColor = null;
41040 this.backgroundColor = null;
41041 this.$transform = null;
41042 this.transX = 0;
41043 this.transY = 0;
41044 this.hints = null;
41045 Clazz_instantialize (this, arguments);
41046 }, jssun.java2d, "SunGraphics2D", java.awt.Graphics2D);
41047 Clazz_defineMethod (c$, "clone", 
41048 function () {
41049 return this.clone0 ();
41050 });
41051 Clazz_defineMethod (c$, "clone0", 
41052 function () {
41053 try {
41054 var g;
41055 {
41056 g = Clazz_clone(this);
41057 }g.$transform =  new java.awt.geom.AffineTransform (this.$transform);
41058 if (this.hints != null) {
41059 g.hints = this.hints.clone ();
41060 }return g;
41061 } catch (e) {
41062 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
41063 } else {
41064 throw e;
41065 }
41066 }
41067 return null;
41068 });
41069 Clazz_defineMethod (c$, "create", 
41070 function () {
41071 return this.clone0 ();
41072 });
41073 Clazz_defineStatics (c$,
41074 "TRANSFORM_GENERIC", 4,
41075 "TRANSFORM_TRANSLATESCALE", 3,
41076 "TRANSFORM_ANY_TRANSLATE", 2,
41077 "TRANSFORM_INT_TRANSLATE", 1,
41078 "TRANSFORM_ISIDENT", 0);
41079 });
41080 Clazz_declarePackage ("javax.swing");
41081 Clazz_load (null, "javax.swing.UIManager", ["java.util.ArrayList", "java.util.Locale", "javax.swing.RepaintManager", "$.SwingPaintEventDispatcher", "$.SwingUtilities", "jssun.awt.PaintEventDispatcher", "swingjs.JSToolkit"], function () {
41082 c$ = Clazz_declareType (javax.swing, "UIManager");
41083 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
41084 function () {
41085 return javax.swing.UIManager.uid;
41086 });
41087 c$.getInstalledLookAndFeels = Clazz_defineMethod (c$, "getInstalledLookAndFeels", 
41088 function () {
41089 return javax.swing.UIManager.installedLAFs;
41090 });
41091 c$.setInstalledLookAndFeels = Clazz_defineMethod (c$, "setInstalledLookAndFeels", 
41092 function (infos) {
41093 swingjs.JSToolkit.notImplemented (null);
41094 }, "~A");
41095 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
41096 function (info) {
41097 swingjs.JSToolkit.notImplemented (null);
41098 }, "javax.swing.UIManager.LookAndFeelInfo");
41099 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
41100 function (name, className) {
41101 swingjs.JSToolkit.notImplemented (null);
41102 }, "~S,~S");
41103 c$.getLookAndFeel = Clazz_defineMethod (c$, "getLookAndFeel", 
41104 function () {
41105 return (javax.swing.UIManager.laf == null ? (javax.swing.UIManager.laf = swingjs.JSToolkit.getInstance ("swingjs.plaf.HTML5LookAndFeel")) : javax.swing.UIManager.laf);
41106 });
41107 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
41108 function (newLookAndFeel) {
41109 }, "javax.swing.LookAndFeel");
41110 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
41111 function (className) {
41112 var lnfClass = javax.swing.SwingUtilities.loadSystemClass (className);
41113 javax.swing.UIManager.setLookAndFeel ((lnfClass.newInstance ()));
41114 }, "~S");
41115 c$.getSystemLookAndFeelClassName = Clazz_defineMethod (c$, "getSystemLookAndFeelClassName", 
41116 function () {
41117 return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName ();
41118 });
41119 c$.getCrossPlatformLookAndFeelClassName = Clazz_defineMethod (c$, "getCrossPlatformLookAndFeelClassName", 
41120 function () {
41121 return "swingjs.plaf.HTML5LookAndFeel";
41122 });
41123 c$.getDefaults = Clazz_defineMethod (c$, "getDefaults", 
41124 function () {
41125 javax.swing.UIManager.maybeInitialize ();
41126 return javax.swing.UIManager.uid;
41127 });
41128 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41129 function (key) {
41130 return javax.swing.UIManager.getDefaults ().getFont (key);
41131 }, "~O");
41132 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41133 function (key, l) {
41134 return javax.swing.UIManager.getDefaults ().getFont (key, l);
41135 }, "~O,java.util.Locale");
41136 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41137 function (key) {
41138 return javax.swing.UIManager.getDefaults ().getColor (key);
41139 }, "~O");
41140 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41141 function (key, l) {
41142 return javax.swing.UIManager.getDefaults ().getColor (key, l);
41143 }, "~O,java.util.Locale");
41144 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41145 function (key) {
41146 return javax.swing.UIManager.getDefaults ().getIcon (key);
41147 }, "~O");
41148 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41149 function (key, l) {
41150 return javax.swing.UIManager.getDefaults ().getIcon (key, l);
41151 }, "~O,java.util.Locale");
41152 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41153 function (key) {
41154 return javax.swing.UIManager.getDefaults ().getBorder (key);
41155 }, "~O");
41156 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41157 function (key, l) {
41158 return javax.swing.UIManager.getDefaults ().getBorder (key, l);
41159 }, "~O,java.util.Locale");
41160 c$.getString = Clazz_defineMethod (c$, "getString", 
41161 function (key) {
41162 return javax.swing.UIManager.getDefaults ().getString (key);
41163 }, "~O");
41164 c$.getString = Clazz_defineMethod (c$, "getString", 
41165 function (key, l) {
41166 return javax.swing.UIManager.getDefaults ().getString (key, l);
41167 }, "~O,java.util.Locale");
41168 c$.getString = Clazz_defineMethod (c$, "getString", 
41169 function (key, c) {
41170 var l = (c == null) ? java.util.Locale.getDefault () : c.getLocale ();
41171 return javax.swing.UIManager.getString (key, l);
41172 }, "~O,java.awt.Component");
41173 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41174 function (key) {
41175 return javax.swing.UIManager.getDefaults ().getInt (key);
41176 }, "~O");
41177 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41178 function (key, l) {
41179 return javax.swing.UIManager.getDefaults ().getInt (key, l);
41180 }, "~O,java.util.Locale");
41181 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41182 function (key) {
41183 return javax.swing.UIManager.getDefaults ().getBoolean (key);
41184 }, "~O");
41185 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41186 function (key, l) {
41187 return javax.swing.UIManager.getDefaults ().getBoolean (key, l);
41188 }, "~O,java.util.Locale");
41189 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41190 function (key) {
41191 return javax.swing.UIManager.getDefaults ().getInsets (key);
41192 }, "~O");
41193 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41194 function (key, l) {
41195 return javax.swing.UIManager.getDefaults ().getInsets (key, l);
41196 }, "~O,java.util.Locale");
41197 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41198 function (key) {
41199 return javax.swing.UIManager.getDefaults ().getDimension (key);
41200 }, "~O");
41201 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41202 function (key, l) {
41203 return javax.swing.UIManager.getDefaults ().getDimension (key, l);
41204 }, "~O,java.util.Locale");
41205 c$.get = Clazz_defineMethod (c$, "get", 
41206 function (key) {
41207 return javax.swing.UIManager.getDefaults ().get (key);
41208 }, "~O");
41209 c$.get = Clazz_defineMethod (c$, "get", 
41210 function (key, l) {
41211 return javax.swing.UIManager.getDefaults ().get (key, l);
41212 }, "~O,java.util.Locale");
41213 c$.put = Clazz_defineMethod (c$, "put", 
41214 function (key, value) {
41215 return javax.swing.UIManager.getDefaults ().put (key, value);
41216 }, "~O,~O");
41217 c$.getUI = Clazz_defineMethod (c$, "getUI", 
41218 function (target) {
41219 javax.swing.UIManager.maybeInitialize ();
41220 var ui = null;
41221 ui = javax.swing.UIManager.getDefaults ().getUI (target);
41222 if (ui == null) System.out.println (target.getUIClassID () + " has not been implemented");
41223 return ui;
41224 }, "javax.swing.JComponent");
41225 c$.addPropertyChangeListener = Clazz_defineMethod (c$, "addPropertyChangeListener", 
41226 function (listener) {
41227 }, "java.beans.PropertyChangeListener");
41228 c$.removePropertyChangeListener = Clazz_defineMethod (c$, "removePropertyChangeListener", 
41229 function (listener) {
41230 }, "java.beans.PropertyChangeListener");
41231 c$.getPropertyChangeListeners = Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41232 function () {
41233 return  new Array (0);
41234 });
41235 c$.maybeInitialize = Clazz_defineMethod (c$, "maybeInitialize", 
41236  function () {
41237 if (javax.swing.UIManager.uid == null) {
41238 javax.swing.UIManager.uid = swingjs.JSToolkit.getLookAndFeelDefaults ();
41239 javax.swing.UIManager.initialize ();
41240 }});
41241 c$.initialize = Clazz_defineMethod (c$, "initialize", 
41242  function () {
41243 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
41244 jssun.awt.PaintEventDispatcher.setPaintEventDispatcher ( new javax.swing.SwingPaintEventDispatcher ());
41245 }});
41246 Clazz_pu$h(self.c$);
41247 c$ = Clazz_decorateAsClass (function () {
41248 this.name = null;
41249 this.className = null;
41250 Clazz_instantialize (this, arguments);
41251 }, javax.swing.UIManager, "LookAndFeelInfo");
41252 Clazz_makeConstructor (c$, 
41253 function (a, b) {
41254 this.name = a;
41255 this.className = b;
41256 }, "~S,~S");
41257 Clazz_defineMethod (c$, "getName", 
41258 function () {
41259 return this.name;
41260 });
41261 Clazz_defineMethod (c$, "getClassName", 
41262 function () {
41263 return this.className;
41264 });
41265 Clazz_overrideMethod (c$, "toString", 
41266 function () {
41267 return this.getClass ().getName () + "[" + this.getName () + " " + this.getClassName () + "]";
41268 });
41269 c$ = Clazz_p0p ();
41270 Clazz_defineStatics (c$,
41271 "installedLAFs", null);
41272 {
41273 var iLAFs =  new java.util.ArrayList (4);
41274 iLAFs.add ( new javax.swing.UIManager.LookAndFeelInfo ("HTML5", "swingjs.plaf.HTML5LookAndFeel"));
41275 javax.swing.UIManager.installedLAFs = iLAFs.toArray ( new Array (iLAFs.size ()));
41276 }Clazz_defineStatics (c$,
41277 "laf", null,
41278 "uid", null);
41279 });
41280 Clazz_declarePackage ("javax.swing");
41281 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 () {
41282 c$ = Clazz_decorateAsClass (function () {
41283 this.changeSupport = null;
41284 this.resourceBundles = null;
41285 this.defaultLocale = null;
41286 this.resourceCache = null;
41287 Clazz_instantialize (this, arguments);
41288 }, javax.swing, "UIDefaults", java.util.Hashtable);
41289 Clazz_prepareFields (c$, function () {
41290 this.defaultLocale = java.util.Locale.getDefault ();
41291 });
41292 Clazz_makeConstructor (c$, 
41293 function () {
41294 this.construct (700, .75);
41295 });
41296 Clazz_makeConstructor (c$, 
41297 function (initialCapacity, loadFactor) {
41298 Clazz_superConstructor (this, javax.swing.UIDefaults, [initialCapacity, loadFactor]);
41299 this.resourceCache =  new java.util.HashMap ();
41300 }, "~N,~N");
41301 Clazz_makeConstructor (c$, 
41302 function (keyValueList) {
41303 Clazz_superConstructor (this, javax.swing.UIDefaults, [Clazz_doubleToInt (keyValueList.length / 2)]);
41304 for (var i = 0; i < keyValueList.length; i += 2) {
41305 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], keyValueList[i + 1]]);
41306 }
41307 }, "~A");
41308 Clazz_defineMethod (c$, "get", 
41309 function (key) {
41310 var value = this.getFromHashtable (key);
41311 return (value != null) ? value : this.getFromResourceBundle (key, null);
41312 }, "~O");
41313 Clazz_defineMethod (c$, "getFromHashtable", 
41314  function (key) {
41315 var value = Clazz_superCall (this, javax.swing.UIDefaults, "get", [key]);
41316 if (value == null && (Clazz_instanceOf (key, String))) {
41317 var skey = key;
41318 if (skey.endsWith (".font") || skey.endsWith (".background") || skey.endsWith (".foreground")) value = Clazz_superCall (this, javax.swing.UIDefaults, "get", ["*" + skey.substring (skey.lastIndexOf ("."))]);
41319 }if ((value !== javax.swing.UIDefaults.PENDING) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue)) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue))) {
41320 return value;
41321 }if (!(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue))) {
41322 return value;
41323 }if (Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue)) {
41324 try {
41325 value = (value).createValue (this);
41326 } finally {
41327 if (value == null) {
41328 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]);
41329 } else {
41330 Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41331 }}
41332 } else {
41333 value = (value).createValue (this);
41334 }return value;
41335 }, "~O");
41336 Clazz_defineMethod (c$, "get", 
41337 function (key, l) {
41338 var value = this.getFromHashtable (key);
41339 return (value != null) ? value : this.getFromResourceBundle (key, l);
41340 }, "~O,java.util.Locale");
41341 Clazz_defineMethod (c$, "getFromResourceBundle", 
41342  function (key, l) {
41343 if (this.resourceBundles == null || this.resourceBundles.isEmpty () || !(Clazz_instanceOf (key, String))) {
41344 return null;
41345 }if (l == null) {
41346 if (this.defaultLocale == null) return null;
41347  else l = this.defaultLocale;
41348 }{
41349 return this.getResourceCache (l).get (key);
41350 }}, "~O,java.util.Locale");
41351 Clazz_defineMethod (c$, "getResourceCache", 
41352  function (l) {
41353 return null;
41354 }, "java.util.Locale");
41355 Clazz_defineMethod (c$, "put", 
41356 function (key, value) {
41357 var oldValue = (value == null) ? Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]) : Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41358 if (Clazz_instanceOf (key, String)) {
41359 this.firePropertyChange (key, oldValue, value);
41360 }return oldValue;
41361 }, "~O,~O");
41362 Clazz_defineMethod (c$, "putDefaults", 
41363 function (keyValueList) {
41364 for (var i = 0, max = keyValueList.length; i < max; i += 2) {
41365 var value = keyValueList[i + 1];
41366 if (value == null) {
41367 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [keyValueList[i]]);
41368 } else {
41369 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], value]);
41370 }}
41371 this.firePropertyChange ("UIDefaults", null, null);
41372 }, "~A");
41373 Clazz_defineMethod (c$, "getFont", 
41374 function (key) {
41375 var value = this.get (key);
41376 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41377 }, "~O");
41378 Clazz_defineMethod (c$, "getFont", 
41379 function (key, l) {
41380 var value = this.get (key, l);
41381 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41382 }, "~O,java.util.Locale");
41383 Clazz_defineMethod (c$, "getColor", 
41384 function (key) {
41385 var value = this.get (key);
41386 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41387 }, "~O");
41388 Clazz_defineMethod (c$, "getColor", 
41389 function (key, l) {
41390 var value = this.get (key, l);
41391 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41392 }, "~O,java.util.Locale");
41393 Clazz_defineMethod (c$, "getIcon", 
41394 function (key) {
41395 var value = this.get (key);
41396 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41397 }, "~O");
41398 Clazz_defineMethod (c$, "getIcon", 
41399 function (key, l) {
41400 var value = this.get (key, l);
41401 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41402 }, "~O,java.util.Locale");
41403 Clazz_defineMethod (c$, "getBorder", 
41404 function (key) {
41405 var value = this.get (key);
41406 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41407 }, "~O");
41408 Clazz_defineMethod (c$, "getBorder", 
41409 function (key, l) {
41410 var value = this.get (key, l);
41411 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41412 }, "~O,java.util.Locale");
41413 Clazz_defineMethod (c$, "getString", 
41414 function (key) {
41415 var value = this.get (key);
41416 return (Clazz_instanceOf (value, String)) ? value : null;
41417 }, "~O");
41418 Clazz_defineMethod (c$, "getString", 
41419 function (key, l) {
41420 var value = this.get (key, l);
41421 return (Clazz_instanceOf (value, String)) ? value : null;
41422 }, "~O,java.util.Locale");
41423 Clazz_defineMethod (c$, "getInt", 
41424 function (key) {
41425 var value = this.get (key);
41426 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41427 }, "~O");
41428 Clazz_defineMethod (c$, "getInt", 
41429 function (key, l) {
41430 var value = this.get (key, l);
41431 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41432 }, "~O,java.util.Locale");
41433 Clazz_defineMethod (c$, "getBoolean", 
41434 function (key) {
41435 var value = this.get (key);
41436 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41437 }, "~O");
41438 Clazz_defineMethod (c$, "getBoolean", 
41439 function (key, l) {
41440 var value = this.get (key, l);
41441 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41442 }, "~O,java.util.Locale");
41443 Clazz_defineMethod (c$, "getInsets", 
41444 function (key) {
41445 var value = this.get (key);
41446 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41447 }, "~O");
41448 Clazz_defineMethod (c$, "getInsets", 
41449 function (key, l) {
41450 var value = this.get (key, l);
41451 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41452 }, "~O,java.util.Locale");
41453 Clazz_defineMethod (c$, "getDimension", 
41454 function (key) {
41455 var value = this.get (key);
41456 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41457 }, "~O");
41458 Clazz_defineMethod (c$, "getDimension", 
41459 function (key, l) {
41460 var value = this.get (key, l);
41461 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41462 }, "~O,java.util.Locale");
41463 Clazz_defineMethod (c$, "getUIClass", 
41464 function (uiClassID, uiClassLoader) {
41465 try {
41466 var className = this.get (uiClassID);
41467 if (className != null) {
41468 var cls = this.get (className);
41469 if (cls == null) {
41470 if (uiClassLoader == null) {
41471 cls = javax.swing.SwingUtilities.loadSystemClass (className);
41472 } else {
41473 cls = uiClassLoader.loadClass (className);
41474 }if (cls != null) {
41475 this.put (className, cls);
41476 }}return cls;
41477 }} catch (e$$) {
41478 if (Clazz_exceptionOf (e$$, ClassNotFoundException)) {
41479 var e = e$$;
41480 {
41481 return null;
41482 }
41483 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
41484 var e = e$$;
41485 {
41486 return null;
41487 }
41488 } else {
41489 throw e$$;
41490 }
41491 }
41492 return null;
41493 }, "~S,ClassLoader");
41494 Clazz_defineMethod (c$, "getUIClass", 
41495 function (uiClassID) {
41496 return this.getUIClass (uiClassID, null);
41497 }, "~S");
41498 Clazz_defineMethod (c$, "getUIError", 
41499 function (msg) {
41500 System.err.println ("UIDefaults.getUI() failed: " + msg);
41501 try {
41502 throw  new Error ();
41503 } catch (e) {
41504 e.printStackTrace ();
41505 }
41506 }, "~S");
41507 Clazz_defineMethod (c$, "getUI", 
41508 function (target) {
41509 return swingjs.JSToolkit.getComponentUI (target);
41510 }, "javax.swing.JComponent");
41511 Clazz_defineMethod (c$, "addPropertyChangeListener", 
41512 function (listener) {
41513 if (this.changeSupport == null) {
41514 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
41515 }this.changeSupport.addPropertyChangeListener (listener);
41516 }, "java.beans.PropertyChangeListener");
41517 Clazz_defineMethod (c$, "removePropertyChangeListener", 
41518 function (listener) {
41519 if (this.changeSupport != null) {
41520 this.changeSupport.removePropertyChangeListener (listener);
41521 }}, "java.beans.PropertyChangeListener");
41522 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41523 function () {
41524 if (this.changeSupport == null) {
41525 return  new Array (0);
41526 }return this.changeSupport.getPropertyChangeListeners ();
41527 });
41528 Clazz_defineMethod (c$, "firePropertyChange", 
41529 function (propertyName, oldValue, newValue) {
41530 if (this.changeSupport != null) {
41531 this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
41532 }}, "~S,~O,~O");
41533 Clazz_defineMethod (c$, "addResourceBundle", 
41534 function (bundleName) {
41535 if (bundleName == null) {
41536 return;
41537 }if (this.resourceBundles == null) {
41538 this.resourceBundles =  new java.util.Vector (5);
41539 }if (!this.resourceBundles.contains (bundleName)) {
41540 this.resourceBundles.add (bundleName);
41541 this.resourceCache.clear ();
41542 }}, "~S");
41543 Clazz_defineMethod (c$, "removeResourceBundle", 
41544 function (bundleName) {
41545 if (this.resourceBundles != null) {
41546 this.resourceBundles.remove (bundleName);
41547 }this.resourceCache.clear ();
41548 }, "~S");
41549 Clazz_defineMethod (c$, "setDefaultLocale", 
41550 function (l) {
41551 this.defaultLocale = l;
41552 }, "java.util.Locale");
41553 Clazz_defineMethod (c$, "getDefaultLocale", 
41554 function () {
41555 return this.defaultLocale;
41556 });
41557 Clazz_declareInterface (javax.swing.UIDefaults, "LazyValue");
41558 Clazz_declareInterface (javax.swing.UIDefaults, "ActiveValue");
41559 c$.PENDING = c$.prototype.PENDING =  String.instantialize ("Pending");
41560 });
41561 Clazz_declarePackage ("javax.swing");
41562 Clazz_load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () {
41563 c$ = Clazz_declareType (javax.swing, "LookAndFeel");
41564 c$.installColors = Clazz_defineMethod (c$, "installColors", 
41565 function (c, defaultBgName, defaultFgName) {
41566 var bg = c.getBackground ();
41567 if (bg == null || Clazz_instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName));
41568 var fg = c.getForeground ();
41569 if (fg == null || Clazz_instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName));
41570 }, "javax.swing.JComponent,~S,~S");
41571 c$.installColorsAndFont = Clazz_defineMethod (c$, "installColorsAndFont", 
41572 function (c, defaultBgName, defaultFgName, defaultFontName) {
41573 var f = c.getFont ();
41574 if (f == null || Clazz_instanceOf (f, javax.swing.plaf.UIResource)) {
41575 c.setFont (javax.swing.UIManager.getFont (defaultFontName));
41576 }javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName);
41577 }, "javax.swing.JComponent,~S,~S,~S");
41578 c$.installBorder = Clazz_defineMethod (c$, "installBorder", 
41579 function (c, defaultBorderName) {
41580 swingjs.JSToolkit.notImplemented (null);
41581 }, "javax.swing.JComponent,~S");
41582 c$.uninstallBorder = Clazz_defineMethod (c$, "uninstallBorder", 
41583 function (c) {
41584 swingjs.JSToolkit.notImplemented (null);
41585 }, "javax.swing.JComponent");
41586 c$.installProperty = Clazz_defineMethod (c$, "installProperty", 
41587 function (c, propertyName, propertyValue) {
41588 if (Clazz_instanceOf (c, javax.swing.JPasswordField)) {
41589 if (!(c).customSetUIProperty (propertyName, propertyValue)) {
41590 c.setUIProperty (propertyName, propertyValue);
41591 }} else {
41592 c.setUIProperty (propertyName, propertyValue);
41593 }}, "javax.swing.JComponent,~S,~O");
41594 c$.makeKeyBindings = Clazz_defineMethod (c$, "makeKeyBindings", 
41595 function (keyBindingList) {
41596 swingjs.JSToolkit.notImplemented (null);
41597 return null;
41598 }, "~A");
41599 c$.makeInputMap = Clazz_defineMethod (c$, "makeInputMap", 
41600 function (keys) {
41601 swingjs.JSToolkit.notImplemented (null);
41602 return null;
41603 }, "~A");
41604 c$.makeComponentInputMap = Clazz_defineMethod (c$, "makeComponentInputMap", 
41605 function (c, keys) {
41606 swingjs.JSToolkit.notImplemented (null);
41607 return null;
41608 }, "javax.swing.JComponent,~A");
41609 c$.loadKeyBindings = Clazz_defineMethod (c$, "loadKeyBindings", 
41610 function (retMap, keys) {
41611 swingjs.JSToolkit.notImplemented (null);
41612 }, "javax.swing.InputMap,~A");
41613 c$.makeIcon = Clazz_defineMethod (c$, "makeIcon", 
41614 function (baseClass, gifFile) {
41615 swingjs.JSToolkit.notImplemented (null);
41616 return null;
41617 }, "Class,~S");
41618 Clazz_defineMethod (c$, "getLayoutStyle", 
41619 function () {
41620 return jssun.swing.DefaultLayoutStyle.getInstance ();
41621 });
41622 Clazz_defineMethod (c$, "provideErrorFeedback", 
41623 function (component) {
41624 swingjs.JSToolkit.notImplemented (null);
41625 }, "java.awt.Component");
41626 c$.getDesktopPropertyValue = Clazz_defineMethod (c$, "getDesktopPropertyValue", 
41627 function (systemPropertyName, fallbackValue) {
41628 swingjs.JSToolkit.notImplemented (null);
41629 return fallbackValue;
41630 }, "~S,~O");
41631 Clazz_defineMethod (c$, "getDisabledIcon", 
41632 function (component, icon) {
41633 swingjs.JSToolkit.notImplemented (null);
41634 return null;
41635 }, "javax.swing.JComponent,javax.swing.Icon");
41636 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
41637 function (component, icon) {
41638 return this.getDisabledIcon (component, icon);
41639 }, "javax.swing.JComponent,javax.swing.Icon");
41640 Clazz_defineMethod (c$, "getSupportsWindowDecorations", 
41641 function () {
41642 return false;
41643 });
41644 Clazz_defineMethod (c$, "initialize", 
41645 function () {
41646 });
41647 Clazz_defineMethod (c$, "uninitialize", 
41648 function () {
41649 });
41650 Clazz_defineMethod (c$, "getDefaults", 
41651 function () {
41652 return null;
41653 });
41654 Clazz_overrideMethod (c$, "toString", 
41655 function () {
41656 return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]";
41657 });
41658 });
41659 Clazz_declarePackage ("javax.swing");
41660 Clazz_load (["java.lang.Enum"], "javax.swing.DropMode", null, function () {
41661 c$ = Clazz_declareType (javax.swing, "DropMode", Enum);
41662 Clazz_defineEnumConstant (c$, "USE_SELECTION", 0, []);
41663 Clazz_defineEnumConstant (c$, "ON", 1, []);
41664 Clazz_defineEnumConstant (c$, "INSERT", 2, []);
41665 Clazz_defineEnumConstant (c$, "INSERT_ROWS", 3, []);
41666 Clazz_defineEnumConstant (c$, "INSERT_COLS", 4, []);
41667 Clazz_defineEnumConstant (c$, "ON_OR_INSERT", 5, []);
41668 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_ROWS", 6, []);
41669 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_COLS", 7, []);
41670 });
41671 Clazz_declarePackage ("java.awt.font");
41672 Clazz_load (null, "java.awt.font.FontRenderContext", ["java.awt.RenderingHints", "java.awt.geom.AffineTransform"], function () {
41673 c$ = Clazz_decorateAsClass (function () {
41674 this.tx = null;
41675 this.aaHintValue = null;
41676 this.fmHintValue = null;
41677 this.defaulting = false;
41678 Clazz_instantialize (this, arguments);
41679 }, java.awt.font, "FontRenderContext");
41680 Clazz_makeConstructor (c$, 
41681 function () {
41682 this.defaulting = true;
41683 });
41684 Clazz_makeConstructor (c$, 
41685 function (tx, isAntiAliased, usesFractionalMetrics) {
41686 if (tx != null && !tx.isIdentity ()) {
41687 this.tx =  new java.awt.geom.AffineTransform (tx);
41688 }}, "java.awt.geom.AffineTransform,~B,~B");
41689 Clazz_makeConstructor (c$, 
41690 function (tx, aaHint, fmHint) {
41691 if (tx != null && !tx.isIdentity ()) {
41692 this.tx =  new java.awt.geom.AffineTransform (tx);
41693 }this.aaHintValue = aaHint;
41694 this.fmHintValue = fmHint;
41695 }, "java.awt.geom.AffineTransform,~O,~O");
41696 Clazz_defineMethod (c$, "isTransformed", 
41697 function () {
41698 if (!this.defaulting) {
41699 return this.tx != null;
41700 } else {
41701 return !this.getTransform ().isIdentity ();
41702 }});
41703 Clazz_defineMethod (c$, "getTransformType", 
41704 function () {
41705 if (!this.defaulting) {
41706 if (this.tx == null) {
41707 return 0;
41708 } else {
41709 return this.tx.getType ();
41710 }} else {
41711 return this.getTransform ().getType ();
41712 }});
41713 Clazz_defineMethod (c$, "getTransform", 
41714 function () {
41715 return (this.tx == null) ?  new java.awt.geom.AffineTransform () :  new java.awt.geom.AffineTransform (this.tx);
41716 });
41717 Clazz_defineMethod (c$, "isAntiAliased", 
41718 function () {
41719 return !(this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF || this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
41720 });
41721 Clazz_defineMethod (c$, "usesFractionalMetrics", 
41722 function () {
41723 return !(this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF || this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT);
41724 });
41725 Clazz_defineMethod (c$, "getAntiAliasingHint", 
41726 function () {
41727 if (this.defaulting) {
41728 if (this.isAntiAliased ()) {
41729 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON;
41730 } else {
41731 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF;
41732 }}return this.aaHintValue;
41733 });
41734 Clazz_defineMethod (c$, "getFractionalMetricsHint", 
41735 function () {
41736 if (this.defaulting) {
41737 if (this.usesFractionalMetrics ()) {
41738 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_ON;
41739 } else {
41740 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF;
41741 }}return this.fmHintValue;
41742 });
41743 Clazz_defineMethod (c$, "equals", 
41744 function (obj) {
41745 try {
41746 return this.equals (obj);
41747 } catch (e) {
41748 if (Clazz_exceptionOf (e, ClassCastException)) {
41749 return false;
41750 } else {
41751 throw e;
41752 }
41753 }
41754 }, "~O");
41755 Clazz_defineMethod (c$, "equals", 
41756 function (rhs) {
41757 if (this === rhs) {
41758 return true;
41759 }if (rhs == null) {
41760 return false;
41761 }if (!rhs.defaulting && !this.defaulting) {
41762 if (rhs.aaHintValue === this.aaHintValue && rhs.fmHintValue === this.fmHintValue) {
41763 return this.tx == null ? rhs.tx == null : this.tx.equals (rhs.tx);
41764 }return false;
41765 } else {
41766 return rhs.getAntiAliasingHint () === this.getAntiAliasingHint () && rhs.getFractionalMetricsHint () === this.getFractionalMetricsHint () && rhs.getTransform ().equals (this.getTransform ());
41767 }}, "java.awt.font.FontRenderContext");
41768 Clazz_defineMethod (c$, "hashCode", 
41769 function () {
41770 var hash = this.tx == null ? 0 : this.tx.hashCode ();
41771 if (this.defaulting) {
41772 hash += this.getAntiAliasingHint ().hashCode ();
41773 hash += this.getFractionalMetricsHint ().hashCode ();
41774 } else {
41775 hash += this.aaHintValue.hashCode ();
41776 hash += this.fmHintValue.hashCode ();
41777 }return hash;
41778 });
41779 });
41780 Clazz_declarePackage ("java.awt.event");
41781 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.InputMethodEvent", null, function () {
41782 c$ = Clazz_decorateAsClass (function () {
41783 this.when = 0;
41784 this.text = null;
41785 this.committedCharacterCount = 0;
41786 Clazz_instantialize (this, arguments);
41787 }, java.awt.event, "InputMethodEvent", java.awt.AWTEvent);
41788 Clazz_defineMethod (c$, "getText", 
41789 function () {
41790 return this.text;
41791 });
41792 Clazz_defineMethod (c$, "getCommittedCharacterCount", 
41793 function () {
41794 return this.committedCharacterCount;
41795 });
41796 Clazz_defineMethod (c$, "getWhen", 
41797 function () {
41798 return this.when;
41799 });
41800 Clazz_defineStatics (c$,
41801 "INPUT_METHOD_FIRST", 1100,
41802 "INPUT_METHOD_TEXT_CHANGED", 1100,
41803 "CARET_POSITION_CHANGED", 1101,
41804 "INPUT_METHOD_LAST", 1101);
41805 });
41806 Clazz_declarePackage ("javax.swing");
41807 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 () {
41808 c$ = Clazz_decorateAsClass (function () {
41809 this.isViewSizeSet = false;
41810 this.lastPaintPosition = null;
41811 this.backingStore = false;
41812 this.backingStoreImage = null;
41813 this.scrollUnderway = false;
41814 this.viewListener = null;
41815 this.changeEvent = null;
41816 this.scrollMode = 1;
41817 this.repaintAll = false;
41818 this.waitingForRepaint = false;
41819 this.inBlitPaint = false;
41820 this.hasHadValidView = false;
41821 if (!Clazz_isClassDefined ("javax.swing.JViewport.ViewListener")) {
41822 javax.swing.JViewport.$JViewport$ViewListener$ ();
41823 }
41824 Clazz_instantialize (this, arguments);
41825 }, javax.swing, "JViewport", javax.swing.JComponent);
41826 Clazz_makeConstructor (c$, 
41827 function () {
41828 Clazz_superConstructor (this, javax.swing.JViewport);
41829 this.setLayout (this.createLayoutManager ());
41830 this.setOpaque (true);
41831 this.updateUI ();
41832 this.setInheritsPopupMenu (true);
41833 });
41834 Clazz_overrideMethod (c$, "getUI", 
41835 function () {
41836 return this.ui;
41837 });
41838 Clazz_overrideMethod (c$, "updateUI", 
41839 function () {
41840 this.setUI (javax.swing.UIManager.getUI (this));
41841 });
41842 Clazz_overrideMethod (c$, "getUIClassID", 
41843 function () {
41844 return "ViewportUI";
41845 });
41846 Clazz_overrideMethod (c$, "addImpl", 
41847 function (child, constraints, index) {
41848 this.setView (child);
41849 return child;
41850 }, "java.awt.Component,~O,~N");
41851 Clazz_defineMethod (c$, "remove", 
41852 function (child) {
41853 child.removeComponentListener (this.viewListener);
41854 this.removeChild (child);
41855 }, "java.awt.Component");
41856 Clazz_overrideMethod (c$, "scrollRectToVisible", 
41857 function (contentRect) {
41858 var view = this.getView ();
41859 if (view == null) {
41860 return;
41861 } else {
41862 if (!view.isValid ()) {
41863 this.validateView ();
41864 }var dx = 0;
41865 var dy = 0;
41866 dx = this.positionAdjustment (this.getWidth (), contentRect.width, contentRect.x);
41867 dy = this.positionAdjustment (this.getHeight (), contentRect.height, contentRect.y);
41868 if (dx != 0 || dy != 0) {
41869 var viewPosition = this.getViewPosition ();
41870 var viewSize = view.getSize ();
41871 var startX = viewPosition.x;
41872 var startY = viewPosition.y;
41873 var extent = this.getExtentSize ();
41874 viewPosition.x -= dx;
41875 viewPosition.y -= dy;
41876 if (view.isValid ()) {
41877 if (this.getParent ().getComponentOrientation ().isLeftToRight ()) {
41878 if (viewPosition.x + extent.width > viewSize.width) {
41879 viewPosition.x = Math.max (0, viewSize.width - extent.width);
41880 } else if (viewPosition.x < 0) {
41881 viewPosition.x = 0;
41882 }} else {
41883 if (extent.width > viewSize.width) {
41884 viewPosition.x = viewSize.width - extent.width;
41885 } else {
41886 viewPosition.x = Math.max (0, Math.min (viewSize.width - extent.width, viewPosition.x));
41887 }}if (viewPosition.y + extent.height > viewSize.height) {
41888 viewPosition.y = Math.max (0, viewSize.height - extent.height);
41889 } else if (viewPosition.y < 0) {
41890 viewPosition.y = 0;
41891 }}if (viewPosition.x != startX || viewPosition.y != startY) {
41892 this.setViewPosition (viewPosition);
41893 this.scrollUnderway = false;
41894 }}}}, "java.awt.Rectangle");
41895 Clazz_defineMethod (c$, "validateView", 
41896  function () {
41897 var validateRoot = null;
41898 for (var c = this; c != null; c = c.getParent ()) {
41899 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane)) || !c.isLightweight ()) {
41900 return;
41901 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
41902 validateRoot = c;
41903 break;
41904 }}
41905 if (validateRoot == null) {
41906 return;
41907 }var root = null;
41908 for (var c = validateRoot; c != null; c = c.getParent ()) {
41909 if (!c.isLightweight ()) {
41910 return;
41911 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
41912 root = c;
41913 break;
41914 }}
41915 if (root == null) {
41916 return;
41917 }validateRoot.validate ();
41918 var rm = javax.swing.RepaintManager.currentManager (this);
41919 if (rm != null) {
41920 rm.removeInvalidComponent (validateRoot);
41921 }});
41922 Clazz_defineMethod (c$, "positionAdjustment", 
41923  function (parentWidth, childWidth, childAt) {
41924 if (childAt >= 0 && childWidth + childAt <= parentWidth) {
41925 return 0;
41926 }if (childAt <= 0 && childWidth + childAt >= parentWidth) {
41927 return 0;
41928 }if (childAt > 0 && childWidth <= parentWidth) {
41929 return -childAt + parentWidth - childWidth;
41930 }if (childAt >= 0 && childWidth >= parentWidth) {
41931 return -childAt;
41932 }if (childAt <= 0 && childWidth <= parentWidth) {
41933 return -childAt;
41934 }if (childAt < 0 && childWidth >= parentWidth) {
41935 return -childAt + parentWidth - childWidth;
41936 }return 0;
41937 }, "~N,~N,~N");
41938 Clazz_overrideMethod (c$, "setBorder", 
41939 function (border) {
41940 if (border != null) {
41941 throw  new IllegalArgumentException ("JViewport.setBorder() not supported");
41942 }}, "javax.swing.border.Border");
41943 Clazz_defineMethod (c$, "getInsets", 
41944 function () {
41945 return  new java.awt.Insets (0, 0, 0, 0);
41946 });
41947 Clazz_defineMethod (c$, "getInsets", 
41948 function (insets) {
41949 insets.left = insets.top = insets.right = insets.bottom = 0;
41950 return insets;
41951 }, "java.awt.Insets");
41952 Clazz_defineMethod (c$, "getBackingStoreGraphics", 
41953  function (g) {
41954 var bsg = this.backingStoreImage.getGraphics ();
41955 bsg.setColor (g.getColor ());
41956 bsg.setFont (g.getFont ());
41957 bsg.setClip (g.getClipBounds ());
41958 return bsg;
41959 }, "java.awt.Graphics");
41960 Clazz_defineMethod (c$, "paintViaBackingStore", 
41961  function (g) {
41962 var bsg = this.getBackingStoreGraphics (g);
41963 try {
41964 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41965 g.drawImage (this.backingStoreImage, 0, 0, this);
41966 } finally {
41967 bsg.dispose ();
41968 }
41969 }, "java.awt.Graphics");
41970 Clazz_defineMethod (c$, "paintViaBackingStore", 
41971  function (g, oClip) {
41972 var bsg = this.getBackingStoreGraphics (g);
41973 try {
41974 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41975 g.setClip (oClip);
41976 g.drawImage (this.backingStoreImage, 0, 0, this);
41977 } finally {
41978 bsg.dispose ();
41979 }
41980 }, "java.awt.Graphics,java.awt.Rectangle");
41981 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
41982 function () {
41983 return false;
41984 });
41985 Clazz_overrideMethod (c$, "isPaintingOrigin", 
41986 function () {
41987 if (this.scrollMode == 2) {
41988 return true;
41989 }return false;
41990 });
41991 Clazz_defineMethod (c$, "getViewLocation", 
41992  function () {
41993 var view = this.getView ();
41994 if (view != null) {
41995 return view.getLocation ();
41996 } else {
41997 return  new java.awt.Point (0, 0);
41998 }});
41999 Clazz_defineMethod (c$, "paint", 
42000 function (g) {
42001 var width = this.getWidth ();
42002 var height = this.getHeight ();
42003 if ((width <= 0) || (height <= 0)) {
42004 return;
42005 }if (this.inBlitPaint) {
42006 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
42007 return;
42008 }if (this.repaintAll) {
42009 this.repaintAll = false;
42010 var clipB = g.getClipBounds ();
42011 } else if (this.waitingForRepaint) {
42012 var clipB = g.getClipBounds ();
42013 if (clipB.width >= this.getWidth () && clipB.height >= this.getHeight ()) {
42014 this.waitingForRepaint = false;
42015 }}if (!this.backingStore || this.isBlitting () || this.getView () == null) {
42016 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
42017 this.lastPaintPosition = this.getViewLocation ();
42018 return;
42019 }var viewBounds = this.getView ().getBounds ();
42020 if (!this.isOpaque ()) {
42021 g.clipRect (0, 0, viewBounds.width, viewBounds.height);
42022 }if (this.backingStoreImage == null) {
42023 this.backingStoreImage = this.createImage (width, height);
42024 var clip = g.getClipBounds ();
42025 if (clip.width != width || clip.height != height) {
42026 if (!this.isOpaque ()) {
42027 g.setClip (0, 0, Math.min (viewBounds.width, width), Math.min (viewBounds.height, height));
42028 } else {
42029 g.setClip (0, 0, width, height);
42030 }this.paintViaBackingStore (g, clip);
42031 } else {
42032 this.paintViaBackingStore (g);
42033 }} else {
42034 if (!this.scrollUnderway || this.lastPaintPosition.equals (this.getViewLocation ())) {
42035 this.paintViaBackingStore (g);
42036 } else {
42037 var blitFrom =  new java.awt.Point ();
42038 var blitTo =  new java.awt.Point ();
42039 var blitSize =  new java.awt.Dimension ();
42040 var blitPaint =  new java.awt.Rectangle ();
42041 var newLocation = this.getViewLocation ();
42042 var dx = newLocation.x - this.lastPaintPosition.x;
42043 var dy = newLocation.y - this.lastPaintPosition.y;
42044 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
42045 if (!canBlit) {
42046 this.paintViaBackingStore (g);
42047 } else {
42048 var bdx = blitTo.x - blitFrom.x;
42049 var bdy = blitTo.y - blitFrom.y;
42050 var clip = g.getClipBounds ();
42051 g.setClip (0, 0, width, height);
42052 var bsg = this.getBackingStoreGraphics (g);
42053 try {
42054 bsg.copyArea (blitFrom.x, blitFrom.y, blitSize.width, blitSize.height, bdx, bdy);
42055 g.setClip (clip.x, clip.y, clip.width, clip.height);
42056 var r = viewBounds.intersection (blitPaint);
42057 bsg.setClip (r);
42058 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
42059 g.drawImage (this.backingStoreImage, 0, 0, this);
42060 } finally {
42061 bsg.dispose ();
42062 }
42063 }}}this.lastPaintPosition = this.getViewLocation ();
42064 this.scrollUnderway = false;
42065 }, "java.awt.Graphics");
42066 Clazz_defineMethod (c$, "reshape", 
42067 function (x, y, w, h) {
42068 var sizeChanged = (this.getWidth () != w) || (this.getHeight () != h);
42069 if (sizeChanged) {
42070 this.backingStoreImage = null;
42071 }Clazz_superCall (this, javax.swing.JViewport, "reshape", [x, y, w, h]);
42072 if (sizeChanged) {
42073 this.fireStateChanged ();
42074 }}, "~N,~N,~N,~N");
42075 Clazz_defineMethod (c$, "setScrollMode", 
42076 function (mode) {
42077 this.scrollMode = mode;
42078 if (mode == 2) {
42079 this.backingStore = true;
42080 } else {
42081 this.backingStore = false;
42082 }}, "~N");
42083 Clazz_defineMethod (c$, "getScrollMode", 
42084 function () {
42085 return this.scrollMode;
42086 });
42087 Clazz_defineMethod (c$, "isBackingStoreEnabled", 
42088 function () {
42089 return this.scrollMode == 2;
42090 });
42091 Clazz_defineMethod (c$, "setBackingStoreEnabled", 
42092 function (enabled) {
42093 if (enabled) {
42094 this.setScrollMode (2);
42095 } else {
42096 this.setScrollMode (1);
42097 }}, "~B");
42098 Clazz_defineMethod (c$, "isBlitting", 
42099  function () {
42100 var view = this.getView ();
42101 return (this.scrollMode == 1) && (Clazz_instanceOf (view, javax.swing.JComponent)) && (view).isOpaque ();
42102 });
42103 Clazz_defineMethod (c$, "getView", 
42104 function () {
42105 return (this.getComponentCount () > 0) ? this.getComponent (0) : null;
42106 });
42107 Clazz_defineMethod (c$, "setView", 
42108 function (view) {
42109 var n = this.getComponentCount ();
42110 for (var i = n - 1; i >= 0; i--) {
42111 this.remove (this.getComponent (i));
42112 }
42113 this.isViewSizeSet = false;
42114 if (view != null) {
42115 this.addImplSAEM (view, null, -1);
42116 this.viewListener = this.createViewListener ();
42117 view.addComponentListener (this.viewListener);
42118 }if (this.hasHadValidView) {
42119 this.fireStateChanged ();
42120 } else if (view != null) {
42121 this.hasHadValidView = true;
42122 }this.revalidate ();
42123 this.repaint ();
42124 }, "java.awt.Component");
42125 Clazz_defineMethod (c$, "getViewSize", 
42126 function () {
42127 var view = this.getView ();
42128 if (view == null) {
42129 return  new java.awt.Dimension (0, 0);
42130 } else if (this.isViewSizeSet) {
42131 return view.getSize ();
42132 } else {
42133 return view.getPreferredSize ();
42134 }});
42135 Clazz_defineMethod (c$, "setViewSize", 
42136 function (newSize) {
42137 var view = this.getView ();
42138 if (view != null) {
42139 var oldSize = view.getSize ();
42140 if (!newSize.equals (oldSize)) {
42141 this.scrollUnderway = false;
42142 view.setSize (newSize);
42143 this.isViewSizeSet = true;
42144 this.fireStateChanged ();
42145 }}}, "java.awt.Dimension");
42146 Clazz_defineMethod (c$, "getViewPosition", 
42147 function () {
42148 var view = this.getView ();
42149 if (view != null) {
42150 var p = view.getLocation ();
42151 p.x = -p.x;
42152 p.y = -p.y;
42153 return p;
42154 } else {
42155 return  new java.awt.Point (0, 0);
42156 }});
42157 Clazz_defineMethod (c$, "setViewPosition", 
42158 function (p) {
42159 var view = this.getView ();
42160 if (view == null) {
42161 return;
42162 }var oldX;
42163 var oldY;
42164 var x = p.x;
42165 var y = p.y;
42166 if (Clazz_instanceOf (view, javax.swing.JComponent)) {
42167 var c = view;
42168 oldX = c.getX ();
42169 oldY = c.getY ();
42170 } else {
42171 var r = view.getBounds ();
42172 oldX = r.x;
42173 oldY = r.y;
42174 }var newX = -x;
42175 var newY = -y;
42176 if ((oldX != newX) || (oldY != newY)) {
42177 if (!this.waitingForRepaint && this.isBlitting () && this.canUseWindowBlitter ()) {
42178 var rm = javax.swing.RepaintManager.currentManager (this);
42179 var jview = view;
42180 var dirty = rm.getDirtyRegion (jview);
42181 if (dirty == null || !dirty.contains (jview.getVisibleRect ())) {
42182 rm.beginPaint ();
42183 try {
42184 var g = javax.swing.JComponent.safelyGetGraphics (this, javax.swing.SwingUtilities.getRoot (this));
42185 this.flushViewDirtyRegion (g, dirty);
42186 view.setLocation (newX, newY);
42187 g.setClip (0, 0, this.getWidth (), Math.min (this.getHeight (), jview.getHeight ()));
42188 this.repaintAll = (this.windowBlitPaint (g) && this.needsRepaintAfterBlit ());
42189 g.dispose ();
42190 rm.markCompletelyClean (this.getParent ());
42191 rm.markCompletelyClean (this);
42192 rm.markCompletelyClean (jview);
42193 } finally {
42194 rm.endPaint ();
42195 }
42196 } else {
42197 view.setLocation (newX, newY);
42198 this.repaintAll = false;
42199 }} else {
42200 this.scrollUnderway = true;
42201 view.setLocation (newX, newY);
42202 this.repaintAll = false;
42203 }this.fireStateChanged ();
42204 }}, "java.awt.Point");
42205 Clazz_defineMethod (c$, "getViewRect", 
42206 function () {
42207 return  new java.awt.Rectangle (this.getViewPosition (), this.getExtentSize ());
42208 });
42209 Clazz_defineMethod (c$, "computeBlit", 
42210 function (dx, dy, blitFrom, blitTo, blitSize, blitPaint) {
42211 var dxAbs = Math.abs (dx);
42212 var dyAbs = Math.abs (dy);
42213 var extentSize = this.getExtentSize ();
42214 if ((dx == 0) && (dy != 0) && (dyAbs < extentSize.height)) {
42215 if (dy < 0) {
42216 blitFrom.y = -dy;
42217 blitTo.y = 0;
42218 blitPaint.y = extentSize.height + dy;
42219 } else {
42220 blitFrom.y = 0;
42221 blitTo.y = dy;
42222 blitPaint.y = 0;
42223 }blitPaint.x = blitFrom.x = blitTo.x = 0;
42224 blitSize.width = extentSize.width;
42225 blitSize.height = extentSize.height - dyAbs;
42226 blitPaint.width = extentSize.width;
42227 blitPaint.height = dyAbs;
42228 return true;
42229 } else if ((dy == 0) && (dx != 0) && (dxAbs < extentSize.width)) {
42230 if (dx < 0) {
42231 blitFrom.x = -dx;
42232 blitTo.x = 0;
42233 blitPaint.x = extentSize.width + dx;
42234 } else {
42235 blitFrom.x = 0;
42236 blitTo.x = dx;
42237 blitPaint.x = 0;
42238 }blitPaint.y = blitFrom.y = blitTo.y = 0;
42239 blitSize.width = extentSize.width - dxAbs;
42240 blitSize.height = extentSize.height;
42241 blitPaint.width = dxAbs;
42242 blitPaint.height = extentSize.height;
42243 return true;
42244 } else {
42245 return false;
42246 }}, "~N,~N,java.awt.Point,java.awt.Point,java.awt.Dimension,java.awt.Rectangle");
42247 Clazz_defineMethod (c$, "getExtentSize", 
42248 function () {
42249 return this.getSize ();
42250 });
42251 Clazz_defineMethod (c$, "toViewCoordinates", 
42252 function (size) {
42253 return  new java.awt.Dimension (size);
42254 }, "java.awt.Dimension");
42255 Clazz_defineMethod (c$, "toViewCoordinates", 
42256 function (p) {
42257 return  new java.awt.Point (p);
42258 }, "java.awt.Point");
42259 Clazz_defineMethod (c$, "setExtentSize", 
42260 function (newExtent) {
42261 var oldExtent = this.getExtentSize ();
42262 if (!newExtent.equals (oldExtent)) {
42263 this.setSize (newExtent);
42264 this.fireStateChanged ();
42265 }}, "java.awt.Dimension");
42266 Clazz_defineMethod (c$, "createViewListener", 
42267 function () {
42268 return Clazz_innerTypeInstance (javax.swing.JViewport.ViewListener, this, null);
42269 });
42270 Clazz_defineMethod (c$, "createLayoutManager", 
42271 function () {
42272 return javax.swing.ViewportLayout.SHARED_INSTANCE;
42273 });
42274 Clazz_defineMethod (c$, "addChangeListener", 
42275 function (l) {
42276 this.listenerList.add (javax.swing.event.ChangeListener, l);
42277 }, "javax.swing.event.ChangeListener");
42278 Clazz_defineMethod (c$, "removeChangeListener", 
42279 function (l) {
42280 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42281 }, "javax.swing.event.ChangeListener");
42282 Clazz_defineMethod (c$, "getChangeListeners", 
42283 function () {
42284 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42285 });
42286 Clazz_defineMethod (c$, "fireStateChanged", 
42287 function () {
42288 var listeners = this.listenerList.getListenerList ();
42289 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42290 if (listeners[i] === javax.swing.event.ChangeListener) {
42291 if (this.changeEvent == null) {
42292 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42293 }(listeners[i + 1]).stateChanged (this.changeEvent);
42294 }}
42295 });
42296 Clazz_defineMethod (c$, "repaint", 
42297 function (tm, x, y, w, h) {
42298 var parent = this.getParent ();
42299 if (parent != null) parent.repaint (tm, x + this.getX (), y + this.getY (), w, h);
42300  else Clazz_superCall (this, javax.swing.JViewport, "repaint", [tm, x, y, w, h]);
42301 }, "~N,~N,~N,~N,~N");
42302 Clazz_defineMethod (c$, "paramString", 
42303 function () {
42304 var isViewSizeSetString = (this.isViewSizeSet ? "true" : "false");
42305 var lastPaintPositionString = (this.lastPaintPosition != null ? this.lastPaintPosition.toString () : "");
42306 var scrollUnderwayString = (this.scrollUnderway ? "true" : "false");
42307 return Clazz_superCall (this, javax.swing.JViewport, "paramString", []) + ",isViewSizeSet=" + isViewSizeSetString + ",lastPaintPosition=" + lastPaintPositionString + ",scrollUnderway=" + scrollUnderwayString;
42308 });
42309 Clazz_defineMethod (c$, "firePropertyChangeObject", 
42310 function (propertyName, oldValue, newValue) {
42311 Clazz_superCall (this, javax.swing.JViewport, "firePropertyChangeObject", [propertyName, oldValue, newValue]);
42312 if (propertyName.equals (javax.swing.JViewport.EnableWindowBlit)) {
42313 if (newValue != null) {
42314 this.setScrollMode (1);
42315 } else {
42316 this.setScrollMode (0);
42317 }}}, "~S,~O,~O");
42318 Clazz_defineMethod (c$, "needsRepaintAfterBlit", 
42319  function () {
42320 var heavyParent = this.getParent ();
42321 while (heavyParent != null && heavyParent.isLightweight ()) {
42322 heavyParent = heavyParent.getParent ();
42323 }
42324 if (heavyParent != null) {
42325 }return true;
42326 });
42327 Clazz_defineMethod (c$, "flushViewDirtyRegion", 
42328  function (g, dirty) {
42329 var view = this.getView ();
42330 if (dirty != null && dirty.width > 0 && dirty.height > 0) {
42331 dirty.x += view.getX ();
42332 dirty.y += view.getY ();
42333 var clip = g.getClipBounds ();
42334 if (clip == null) {
42335 g.setClip (0, 0, this.getWidth (), this.getHeight ());
42336 }g.clipRect (dirty.x, dirty.y, dirty.width, dirty.height);
42337 clip = g.getClipBounds ();
42338 if (clip.width > 0 && clip.height > 0) {
42339 this.paintView (g);
42340 }}}, "java.awt.Graphics,java.awt.Rectangle");
42341 Clazz_defineMethod (c$, "windowBlitPaint", 
42342  function (g) {
42343 var width = this.getWidth ();
42344 var height = this.getHeight ();
42345 if ((width == 0) || (height == 0)) {
42346 return false;
42347 }var retValue;
42348 var rm = javax.swing.RepaintManager.currentManager (this);
42349 var view = this.getView ();
42350 if (this.lastPaintPosition == null || this.lastPaintPosition.equals (this.getViewLocation ())) {
42351 this.paintView (g);
42352 retValue = false;
42353 } else {
42354 var blitFrom =  new java.awt.Point ();
42355 var blitTo =  new java.awt.Point ();
42356 var blitSize =  new java.awt.Dimension ();
42357 var blitPaint =  new java.awt.Rectangle ();
42358 var newLocation = this.getViewLocation ();
42359 var dx = newLocation.x - this.lastPaintPosition.x;
42360 var dy = newLocation.y - this.lastPaintPosition.y;
42361 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
42362 if (!canBlit) {
42363 this.paintView (g);
42364 retValue = false;
42365 } else {
42366 var r = view.getBounds ().intersection (blitPaint);
42367 r.x -= view.getX ();
42368 r.y -= view.getY ();
42369 this.blitDoubleBuffered (view, g, r.x, r.y, r.width, r.height, blitFrom.x, blitFrom.y, blitTo.x, blitTo.y, blitSize.width, blitSize.height);
42370 retValue = true;
42371 }}this.lastPaintPosition = this.getViewLocation ();
42372 return retValue;
42373 }, "java.awt.Graphics");
42374 Clazz_defineMethod (c$, "blitDoubleBuffered", 
42375  function (view, g, clipX, clipY, clipW, clipH, blitFromX, blitFromY, blitToX, blitToY, blitW, blitH) {
42376 var rm = javax.swing.RepaintManager.currentManager (this);
42377 var bdx = blitToX - blitFromX;
42378 var bdy = blitToY - blitFromY;
42379 var x = view.getX ();
42380 var y = view.getY ();
42381 g.translate (x, y);
42382 g.setClip (clipX, clipY, clipW, clipH);
42383 view.paintForceDoubleBuffered (g);
42384 g.translate (-x, -y);
42385 }, "javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
42386 Clazz_defineMethod (c$, "paintView", 
42387  function (g) {
42388 var clip = g.getClipBounds ();
42389 var view = this.getView ();
42390 if (view.getWidth () >= this.getWidth ()) {
42391 var x = view.getX ();
42392 var y = view.getY ();
42393 g.translate (x, y);
42394 g.setClip (clip.x - x, clip.y - y, clip.width, clip.height);
42395 view.paintForceDoubleBuffered (g);
42396 g.translate (-x, -y);
42397 g.setClip (clip.x, clip.y, clip.width, clip.height);
42398 } else {
42399 try {
42400 this.inBlitPaint = true;
42401 this.paintForceDoubleBuffered (g);
42402 } finally {
42403 this.inBlitPaint = false;
42404 }
42405 }}, "java.awt.Graphics");
42406 Clazz_defineMethod (c$, "canUseWindowBlitter", 
42407  function () {
42408 if (!this.isShowing () || (!(Clazz_instanceOf (this.getParent (), javax.swing.JComponent)) && !(Clazz_instanceOf (this.getView (), javax.swing.JComponent)))) {
42409 return false;
42410 }if (this.isPainting ()) {
42411 return false;
42412 }var dirtyRegion = javax.swing.RepaintManager.currentManager (this).getDirtyRegion (this.getParent ());
42413 if (dirtyRegion != null && dirtyRegion.width > 0 && dirtyRegion.height > 0) {
42414 return false;
42415 }var clip =  new java.awt.Rectangle (0, 0, this.getWidth (), this.getHeight ());
42416 var oldClip =  new java.awt.Rectangle ();
42417 var tmp2 = null;
42418 var parent;
42419 var lastParent = null;
42420 var x;
42421 var y;
42422 var w;
42423 var h;
42424 for (parent = this; parent != null && javax.swing.JComponent.isLightweightComponent (parent); parent = parent.getParent ()) {
42425 x = parent.getX ();
42426 y = parent.getY ();
42427 w = parent.getWidth ();
42428 h = parent.getHeight ();
42429 oldClip.setBounds (clip);
42430 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, clip);
42431 if (!clip.equals (oldClip)) return false;
42432 if (lastParent != null && Clazz_instanceOf (parent, javax.swing.JComponent) && !(parent).isOptimizedDrawingEnabled ()) {
42433 var comps = parent.getComponents ();
42434 var index = 0;
42435 for (var i = comps.length - 1; i >= 0; i--) {
42436 if (comps[i] === lastParent) {
42437 index = i - 1;
42438 break;
42439 }}
42440 while (index >= 0) {
42441 tmp2 = comps[index].getBounds (tmp2);
42442 if (tmp2.intersects (clip)) return false;
42443 index--;
42444 }
42445 }clip.x += x;
42446 clip.y += y;
42447 lastParent = parent;
42448 }
42449 if (parent == null) {
42450 return false;
42451 }return true;
42452 });
42453 c$.$JViewport$ViewListener$ = function () {
42454 Clazz_pu$h(self.c$);
42455 c$ = Clazz_decorateAsClass (function () {
42456 Clazz_prepareCallback (this, arguments);
42457 Clazz_instantialize (this, arguments);
42458 }, javax.swing.JViewport, "ViewListener", java.awt.event.ComponentAdapter);
42459 Clazz_overrideMethod (c$, "componentResized", 
42460 function (a) {
42461 this.b$["javax.swing.JViewport"].fireStateChanged ();
42462 this.b$["javax.swing.JViewport"].revalidate ();
42463 }, "java.awt.event.ComponentEvent");
42464 c$ = Clazz_p0p ();
42465 };
42466 Clazz_defineStatics (c$,
42467 "$uiClassID", "ViewportUI",
42468 "EnableWindowBlit", "EnableWindowBlit",
42469 "BLIT_SCROLL_MODE", 1,
42470 "BACKINGSTORE_SCROLL_MODE", 2,
42471 "SIMPLE_SCROLL_MODE", 0);
42472 });
42473 Clazz_declarePackage ("java.awt.event");
42474 Clazz_load (["java.awt.event.ComponentListener"], "java.awt.event.ComponentAdapter", null, function () {
42475 c$ = Clazz_declareType (java.awt.event, "ComponentAdapter", null, java.awt.event.ComponentListener);
42476 Clazz_overrideMethod (c$, "componentResized", 
42477 function (e) {
42478 }, "java.awt.event.ComponentEvent");
42479 Clazz_overrideMethod (c$, "componentMoved", 
42480 function (e) {
42481 }, "java.awt.event.ComponentEvent");
42482 Clazz_overrideMethod (c$, "componentShown", 
42483 function (e) {
42484 }, "java.awt.event.ComponentEvent");
42485 Clazz_overrideMethod (c$, "componentHidden", 
42486 function (e) {
42487 }, "java.awt.event.ComponentEvent");
42488 });
42489 Clazz_declarePackage ("javax.swing");
42490 Clazz_load (["java.awt.Container"], "javax.swing.CellRendererPane", null, function () {
42491 c$ = Clazz_declareType (javax.swing, "CellRendererPane", java.awt.Container);
42492 Clazz_makeConstructor (c$, 
42493 function () {
42494 Clazz_superConstructor (this, javax.swing.CellRendererPane);
42495 this.setLayout (null);
42496 this.setVisible (false);
42497 });
42498 Clazz_overrideMethod (c$, "invalidate", 
42499 function () {
42500 });
42501 Clazz_overrideMethod (c$, "paint", 
42502 function (g) {
42503 }, "java.awt.Graphics");
42504 Clazz_overrideMethod (c$, "update", 
42505 function (g) {
42506 }, "java.awt.Graphics");
42507 Clazz_overrideMethod (c$, "addImpl", 
42508 function (x, constraints, index) {
42509 if (x.getParent () === this) {
42510 return null;
42511 } else {
42512 return this.addImplSAEM (x, constraints, index);
42513 }}, "java.awt.Component,~O,~N");
42514 Clazz_defineMethod (c$, "paintComponent", 
42515 function (g, c, p, x, y, w, h, shouldValidate) {
42516 if (c == null) {
42517 if (p != null) {
42518 var oldColor = g.getColor ();
42519 g.setColor (p.getBackground ());
42520 g.fillRect (x, y, w, h);
42521 g.setColor (oldColor);
42522 }return;
42523 }if (c.getParent () !== this) {
42524 this.add (c);
42525 }c.setBounds (x, y, w, h);
42526 if (shouldValidate) {
42527 c.validate ();
42528 }var cg = g.create4 (x, y, w, h);
42529 try {
42530 c.paint (cg);
42531 } finally {
42532 cg.dispose ();
42533 }
42534 c.setBounds (-w, -h, 0, 0);
42535 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N,~B");
42536 Clazz_defineMethod (c$, "paintComponent", 
42537 function (g, c, p, x, y, w, h) {
42538 this.paintComponent (g, c, p, x, y, w, h, false);
42539 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
42540 Clazz_defineMethod (c$, "paintComponent", 
42541 function (g, c, p, r) {
42542 this.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
42543 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
42544 });
42545 Clazz_declarePackage ("jssun.awt");
42546 c$ = Clazz_declareType (jssun.awt, "AWTAccessor");
42547 c$.setWindowAccessor = Clazz_defineMethod (c$, "setWindowAccessor", 
42548 function (wa) {
42549 jssun.awt.AWTAccessor.windowAccessor = wa;
42550 }, "jssun.awt.AWTAccessor.WindowAccessor");
42551 c$.getWindowAccessor = Clazz_defineMethod (c$, "getWindowAccessor", 
42552 function () {
42553 return jssun.awt.AWTAccessor.windowAccessor;
42554 });
42555 c$.setComponentAccessor = Clazz_defineMethod (c$, "setComponentAccessor", 
42556 function (ca) {
42557 jssun.awt.AWTAccessor.componentAccessor = ca;
42558 }, "jssun.awt.AWTAccessor.ComponentAccessor");
42559 c$.getComponentAccessor = Clazz_defineMethod (c$, "getComponentAccessor", 
42560 function () {
42561 return jssun.awt.AWTAccessor.componentAccessor;
42562 });
42563 c$.setAWTEventAccessor = Clazz_defineMethod (c$, "setAWTEventAccessor", 
42564 function (aea) {
42565 jssun.awt.AWTAccessor.awtEventAccessor = aea;
42566 }, "jssun.awt.AWTAccessor.AWTEventAccessor");
42567 c$.getAWTEventAccessor = Clazz_defineMethod (c$, "getAWTEventAccessor", 
42568 function () {
42569 return jssun.awt.AWTAccessor.awtEventAccessor;
42570 });
42571 c$.setEventQueueAccessor = Clazz_defineMethod (c$, "setEventQueueAccessor", 
42572 function (eqa) {
42573 jssun.awt.AWTAccessor.eventQueueAccessor = eqa;
42574 }, "jssun.awt.AWTAccessor.EventQueueAccessor");
42575 c$.getEventQueueAccessor = Clazz_defineMethod (c$, "getEventQueueAccessor", 
42576 function () {
42577 return jssun.awt.AWTAccessor.eventQueueAccessor;
42578 });
42579 Clazz_declareInterface (jssun.awt.AWTAccessor, "WindowAccessor");
42580 Clazz_declareInterface (jssun.awt.AWTAccessor, "ComponentAccessor");
42581 Clazz_declareInterface (jssun.awt.AWTAccessor, "KeyboardFocusManagerAccessor");
42582 Clazz_declareInterface (jssun.awt.AWTAccessor, "AWTEventAccessor");
42583 Clazz_declareInterface (jssun.awt.AWTAccessor, "EventQueueAccessor");
42584 Clazz_declareInterface (jssun.awt.AWTAccessor, "CursorAccessor");
42585 Clazz_declareInterface (jssun.awt.AWTAccessor, "ClientPropertyKeyAccessor");
42586 Clazz_defineStatics (c$,
42587 "componentAccessor", null,
42588 "windowAccessor", null,
42589 "awtEventAccessor", null,
42590 "eventQueueAccessor", null);
42591 Clazz_declarePackage ("javax.swing");
42592 Clazz_load (["java.awt.LayoutManager"], "javax.swing.ViewportLayout", ["java.awt.Dimension", "javax.swing.Scrollable"], function () {
42593 c$ = Clazz_declareType (javax.swing, "ViewportLayout", null, java.awt.LayoutManager);
42594 Clazz_overrideMethod (c$, "addLayoutComponent", 
42595 function (name, c) {
42596 }, "~S,java.awt.Component");
42597 Clazz_overrideMethod (c$, "removeLayoutComponent", 
42598 function (c) {
42599 }, "java.awt.Component");
42600 Clazz_overrideMethod (c$, "preferredLayoutSize", 
42601 function (parent) {
42602 var view = (parent).getView ();
42603 if (view == null) {
42604 return  new java.awt.Dimension (0, 0);
42605 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42606 return (view).getPreferredScrollableViewportSize ();
42607 } else {
42608 return view.getPreferredSize ();
42609 }}, "java.awt.Container");
42610 Clazz_overrideMethod (c$, "minimumLayoutSize", 
42611 function (parent) {
42612 return  new java.awt.Dimension (4, 4);
42613 }, "java.awt.Container");
42614 Clazz_overrideMethod (c$, "layoutContainer", 
42615 function (parent) {
42616 var vp = parent;
42617 var view = vp.getView ();
42618 var scrollableView = null;
42619 if (view == null) {
42620 return;
42621 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42622 scrollableView = view;
42623 }var insets = vp.getInsets ();
42624 var viewPrefSize = view.getPreferredSize ();
42625 var vpSize = vp.getSize ();
42626 var extentSize = vp.toViewCoordinates (vpSize);
42627 var viewSize =  new java.awt.Dimension (viewPrefSize);
42628 if (scrollableView != null) {
42629 if (scrollableView.getScrollableTracksViewportWidth ()) {
42630 viewSize.width = vpSize.width;
42631 }if (scrollableView.getScrollableTracksViewportHeight ()) {
42632 viewSize.height = vpSize.height;
42633 }}var viewPosition = vp.getViewPosition ();
42634 if (scrollableView == null || vp.getParent () == null || vp.getParent ().getComponentOrientation ().isLeftToRight ()) {
42635 if ((viewPosition.x + extentSize.width) > viewSize.width) {
42636 viewPosition.x = Math.max (0, viewSize.width - extentSize.width);
42637 }} else {
42638 if (extentSize.width > viewSize.width) {
42639 viewPosition.x = viewSize.width - extentSize.width;
42640 } else {
42641 viewPosition.x = Math.max (0, Math.min (viewSize.width - extentSize.width, viewPosition.x));
42642 }}if ((viewPosition.y + extentSize.height) > viewSize.height) {
42643 viewPosition.y = Math.max (0, viewSize.height - extentSize.height);
42644 }if (scrollableView == null) {
42645 if ((viewPosition.x == 0) && (vpSize.width > viewPrefSize.width)) {
42646 viewSize.width = vpSize.width;
42647 }if ((viewPosition.y == 0) && (vpSize.height > viewPrefSize.height)) {
42648 viewSize.height = vpSize.height;
42649 }}vp.setViewPosition (viewPosition);
42650 vp.setViewSize (viewSize);
42651 }, "java.awt.Container");
42652 c$.SHARED_INSTANCE = c$.prototype.SHARED_INSTANCE =  new javax.swing.ViewportLayout ();
42653 });
42654 Clazz_declarePackage ("javax.swing.event");
42655 Clazz_load (["java.util.EventListener"], "javax.swing.event.CaretListener", null, function () {
42656 Clazz_declareInterface (javax.swing.event, "CaretListener", java.util.EventListener);
42657 });
42658 Clazz_declarePackage ("javax.swing");
42659 Clazz_load (["javax.swing.BoundedRangeModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultBoundedRangeModel", ["java.lang.IllegalArgumentException", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
42660 c$ = Clazz_decorateAsClass (function () {
42661 this.changeEvent = null;
42662 this.listenerList = null;
42663 this.value = 0;
42664 this.extent = 0;
42665 this.min = 0;
42666 this.max = 100;
42667 this.isAdjusting = false;
42668 Clazz_instantialize (this, arguments);
42669 }, javax.swing, "DefaultBoundedRangeModel", null, javax.swing.BoundedRangeModel);
42670 Clazz_prepareFields (c$, function () {
42671 this.listenerList =  new javax.swing.event.EventListenerList ();
42672 });
42673 Clazz_makeConstructor (c$, 
42674 function () {
42675 });
42676 Clazz_makeConstructor (c$, 
42677 function (value, extent, min, max) {
42678 if ((max >= min) && (value >= min) && ((value + extent) >= value) && ((value + extent) <= max)) {
42679 this.value = value;
42680 this.extent = extent;
42681 this.min = min;
42682 this.max = max;
42683 } else {
42684 throw  new IllegalArgumentException ("invalid range properties");
42685 }}, "~N,~N,~N,~N");
42686 Clazz_overrideMethod (c$, "getValue", 
42687 function () {
42688 return this.value;
42689 });
42690 Clazz_overrideMethod (c$, "getExtent", 
42691 function () {
42692 return this.extent;
42693 });
42694 Clazz_overrideMethod (c$, "getMinimum", 
42695 function () {
42696 return this.min;
42697 });
42698 Clazz_overrideMethod (c$, "getMaximum", 
42699 function () {
42700 return this.max;
42701 });
42702 Clazz_overrideMethod (c$, "setValue", 
42703 function (n) {
42704 n = Math.min (n, 2147483647 - this.extent);
42705 var newValue = Math.max (n, this.min);
42706 if (newValue + this.extent > this.max) {
42707 newValue = this.max - this.extent;
42708 }this.setRangeProperties (newValue, this.extent, this.min, this.max, this.isAdjusting);
42709 }, "~N");
42710 Clazz_overrideMethod (c$, "setExtent", 
42711 function (n) {
42712 var newExtent = Math.max (0, n);
42713 if (this.value + newExtent > this.max) {
42714 newExtent = this.max - this.value;
42715 }this.setRangeProperties (this.value, newExtent, this.min, this.max, this.isAdjusting);
42716 }, "~N");
42717 Clazz_overrideMethod (c$, "setMinimum", 
42718 function (n) {
42719 var newMax = Math.max (n, this.max);
42720 var newValue = Math.max (n, this.value);
42721 var newExtent = Math.min (newMax - newValue, this.extent);
42722 this.setRangeProperties (newValue, newExtent, n, newMax, this.isAdjusting);
42723 }, "~N");
42724 Clazz_overrideMethod (c$, "setMaximum", 
42725 function (n) {
42726 var newMin = Math.min (n, this.min);
42727 var newExtent = Math.min (n - newMin, this.extent);
42728 var newValue = Math.min (n - newExtent, this.value);
42729 this.setRangeProperties (newValue, newExtent, newMin, n, this.isAdjusting);
42730 }, "~N");
42731 Clazz_overrideMethod (c$, "setValueIsAdjusting", 
42732 function (b) {
42733 this.setRangeProperties (this.value, this.extent, this.min, this.max, b);
42734 }, "~B");
42735 Clazz_overrideMethod (c$, "getValueIsAdjusting", 
42736 function () {
42737 return this.isAdjusting;
42738 });
42739 Clazz_overrideMethod (c$, "setRangeProperties", 
42740 function (newValue, newExtent, newMin, newMax, adjusting) {
42741 if (newMin > newMax) {
42742 newMin = newMax;
42743 }if (newValue > newMax) {
42744 newMax = newValue;
42745 }if (newValue < newMin) {
42746 newMin = newValue;
42747 }if ((newExtent + newValue) > newMax) {
42748 newExtent = newMax - newValue;
42749 }if (newExtent < 0) {
42750 newExtent = 0;
42751 }var isChange = (newValue != this.value) || (newExtent != this.extent) || (newMin != this.min) || (newMax != this.max) || (adjusting != this.isAdjusting);
42752 if (isChange) {
42753 this.value = newValue;
42754 this.extent = newExtent;
42755 this.min = newMin;
42756 this.max = newMax;
42757 this.isAdjusting = adjusting;
42758 this.fireStateChanged ();
42759 }}, "~N,~N,~N,~N,~B");
42760 Clazz_overrideMethod (c$, "addChangeListener", 
42761 function (l) {
42762 this.listenerList.add (javax.swing.event.ChangeListener, l);
42763 }, "javax.swing.event.ChangeListener");
42764 Clazz_overrideMethod (c$, "removeChangeListener", 
42765 function (l) {
42766 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42767 }, "javax.swing.event.ChangeListener");
42768 Clazz_defineMethod (c$, "getChangeListeners", 
42769 function () {
42770 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42771 });
42772 Clazz_defineMethod (c$, "fireStateChanged", 
42773 function () {
42774 var listeners = this.listenerList.getListenerList ();
42775 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42776 if (listeners[i] === javax.swing.event.ChangeListener) {
42777 if (this.changeEvent == null) {
42778 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42779 }(listeners[i + 1]).stateChanged (this.changeEvent);
42780 }}
42781 });
42782 Clazz_overrideMethod (c$, "toString", 
42783 function () {
42784 var modelString = "value=" + this.getValue () + ", " + "extent=" + this.getExtent () + ", " + "min=" + this.getMinimum () + ", " + "max=" + this.getMaximum () + ", " + "adj=" + this.getValueIsAdjusting ();
42785 return this.getClass ().getName () + "[" + modelString + "]";
42786 });
42787 Clazz_defineMethod (c$, "getListeners", 
42788 function (listenerType) {
42789 return this.listenerList.getListeners (listenerType);
42790 }, "Class");
42791 });
42792 Clazz_declarePackage ("javax.swing");
42793 Clazz_declareInterface (javax.swing, "BoundedRangeModel");
42794 Clazz_declarePackage ("javax.swing");
42795 Clazz_load (["java.awt.AWTKeyStroke"], "javax.swing.KeyStroke", null, function () {
42796 c$ = Clazz_declareType (javax.swing, "KeyStroke", java.awt.AWTKeyStroke);
42797 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42798 function (keyChar) {
42799 {
42800 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42801 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar);
42802 }}, "~S");
42803 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42804 function (keyChar, onKeyRelease) {
42805 return  new javax.swing.KeyStroke (keyChar, 0, 0, onKeyRelease);
42806 }, "~S,~B");
42807 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42808 function (keyChar, modifiers) {
42809 {
42810 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42811 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar, modifiers);
42812 }}, "Character,~N");
42813 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42814 function (keyCode, modifiers, onKeyRelease) {
42815 {
42816 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42817 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers, onKeyRelease);
42818 }}, "~N,~N,~B");
42819 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42820 function (keyCode, modifiers) {
42821 {
42822 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42823 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers);
42824 }}, "~N,~N");
42825 c$.getKeyStrokeForEvent = Clazz_defineMethod (c$, "getKeyStrokeForEvent", 
42826 function (anEvent) {
42827 {
42828 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42829 return java.awt.AWTKeyStroke.getAWTKeyStrokeForEvent (anEvent);
42830 }}, "java.awt.event.KeyEvent");
42831 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42832 function (s) {
42833 if (s == null || s.length == 0) {
42834 return null;
42835 }{
42836 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42837 try {
42838 return java.awt.AWTKeyStroke.getAWTKeyStroke (s);
42839 } catch (e) {
42840 if (Clazz_exceptionOf (e, IllegalArgumentException)) {
42841 return null;
42842 } else {
42843 throw e;
42844 }
42845 }
42846 }}, "~S");
42847 });
42848 Clazz_declarePackage ("java.awt");
42849 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 () {
42850 c$ = Clazz_decorateAsClass (function () {
42851 this.keyChar = '\uffff';
42852 this.keyCode = 0;
42853 this.modifiers = 0;
42854 this.onKeyRelease = false;
42855 Clazz_instantialize (this, arguments);
42856 }, java.awt, "AWTKeyStroke");
42857 c$.getAWTKeyStrokeClass = Clazz_defineMethod (c$, "getAWTKeyStrokeClass", 
42858  function () {
42859 var clazz = jssun.awt.AppContext.getAppContext ().get (java.awt.AWTKeyStroke);
42860 if (clazz == null) {
42861 clazz = java.awt.AWTKeyStroke;
42862 jssun.awt.AppContext.getAppContext ().put (java.awt.AWTKeyStroke, java.awt.AWTKeyStroke);
42863 }return clazz;
42864 });
42865 Clazz_makeConstructor (c$, 
42866 function () {
42867 });
42868 Clazz_makeConstructor (c$, 
42869 function (keyChar, keyCode, modifiers, onKeyRelease) {
42870 this.keyChar = keyChar;
42871 this.keyCode = keyCode;
42872 this.modifiers = modifiers;
42873 this.onKeyRelease = onKeyRelease;
42874 }, "~S,~N,~N,~B");
42875 c$.registerSubclass = Clazz_defineMethod (c$, "registerSubclass", 
42876 function (subclass) {
42877 }, "Class");
42878 c$.getCachedStroke = Clazz_defineMethod (c$, "getCachedStroke", 
42879  function (keyChar, keyCode, modifiers, onKeyRelease) {
42880 return null;
42881 }, "~S,~N,~N,~B");
42882 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42883 function (keyChar) {
42884 return java.awt.AWTKeyStroke.getCachedStroke (keyChar, 0, 0, false);
42885 }, "~S");
42886 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42887 function (keyChar, modifiers) {
42888 if (keyChar == null) {
42889 throw  new IllegalArgumentException ("keyChar cannot be null");
42890 }return java.awt.AWTKeyStroke.getCachedStroke (keyChar.charValue (), 0, modifiers, false);
42891 }, "Character,~N");
42892 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42893 function (keyCode, modifiers, onKeyRelease) {
42894 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, onKeyRelease);
42895 }, "~N,~N,~B");
42896 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42897 function (keyCode, modifiers) {
42898 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, false);
42899 }, "~N,~N");
42900 c$.getAWTKeyStrokeForEvent = Clazz_defineMethod (c$, "getAWTKeyStrokeForEvent", 
42901 function (anEvent) {
42902 var id = anEvent.getID ();
42903 switch (id) {
42904 case 401:
42905 case 402:
42906 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', anEvent.getKeyCode (), anEvent.getModifiers (), (id == 402));
42907 case 400:
42908 return java.awt.AWTKeyStroke.getCachedStroke (anEvent.getKeyChar (), 0, anEvent.getModifiers (), false);
42909 default:
42910 return null;
42911 }
42912 }, "java.awt.event.KeyEvent");
42913 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42914 function (s) {
42915 if (s == null) {
42916 throw  new IllegalArgumentException ("String cannot be null");
42917 }var errmsg = "String formatted incorrectly";
42918 var st =  new java.util.StringTokenizer (s, " ");
42919 var mask = 0;
42920 var released = false;
42921 var typed = false;
42922 var pressed = false;
42923 {
42924 if (java.awt.AWTKeyStroke.modifierKeywords == null) {
42925 var uninitializedMap =  new java.util.HashMap (8, 1.0);
42926 uninitializedMap.put ("shift", Integer.$valueOf (65));
42927 uninitializedMap.put ("control", Integer.$valueOf (130));
42928 uninitializedMap.put ("ctrl", Integer.$valueOf (130));
42929 uninitializedMap.put ("meta", Integer.$valueOf (260));
42930 uninitializedMap.put ("alt", Integer.$valueOf (520));
42931 uninitializedMap.put ("altGraph", Integer.$valueOf (8224));
42932 uninitializedMap.put ("button1", Integer.$valueOf (1024));
42933 uninitializedMap.put ("button2", Integer.$valueOf (2048));
42934 uninitializedMap.put ("button3", Integer.$valueOf (4096));
42935 java.awt.AWTKeyStroke.modifierKeywords = java.util.Collections.synchronizedMap (uninitializedMap);
42936 }}var count = st.countTokens ();
42937 for (var i = 1; i <= count; i++) {
42938 var token = st.nextToken ();
42939 if (typed) {
42940 if (token.length != 1 || i != count) {
42941 throw  new IllegalArgumentException ("String formatted incorrectly");
42942 }return java.awt.AWTKeyStroke.getCachedStroke (token.charAt (0), 0, mask, false);
42943 }if (pressed || released || i == count) {
42944 if (i != count) {
42945 throw  new IllegalArgumentException ("String formatted incorrectly");
42946 }var keyCodeName = "VK_" + token;
42947 var keyCode = java.awt.AWTKeyStroke.getVKValue (keyCodeName);
42948 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, mask, released);
42949 }if (token.equals ("released")) {
42950 released = true;
42951 continue;
42952 }if (token.equals ("pressed")) {
42953 pressed = true;
42954 continue;
42955 }if (token.equals ("typed")) {
42956 typed = true;
42957 continue;
42958 }var tokenMask = java.awt.AWTKeyStroke.modifierKeywords.get (token);
42959 if (tokenMask != null) {
42960 mask |= tokenMask.intValue ();
42961 } else {
42962 throw  new IllegalArgumentException ("String formatted incorrectly");
42963 }}
42964 throw  new IllegalArgumentException ("String formatted incorrectly");
42965 }, "~S");
42966 c$.getVKCollection = Clazz_defineMethod (c$, "getVKCollection", 
42967  function () {
42968 if (java.awt.AWTKeyStroke.vks == null) {
42969 java.awt.AWTKeyStroke.vks =  new java.awt.VKCollection ();
42970 }return java.awt.AWTKeyStroke.vks;
42971 });
42972 c$.getVKValue = Clazz_defineMethod (c$, "getVKValue", 
42973  function (key) {
42974 var vkCollect = java.awt.AWTKeyStroke.getVKCollection ();
42975 var value = vkCollect.findCode (key);
42976 if (value == null) {
42977 var keyCode = 0;
42978 var errmsg = "String formatted incorrectly";
42979 try {
42980 keyCode = java.awt.event.KeyEvent.getField (key).getInt (java.awt.event.KeyEvent);
42981 } catch (e$$) {
42982 if (Clazz_exceptionOf (e$$, NoSuchFieldException)) {
42983 var nsfe = e$$;
42984 {
42985 throw  new IllegalArgumentException ("String formatted incorrectly");
42986 }
42987 } else if (Clazz_exceptionOf (e$$, IllegalAccessException)) {
42988 var iae = e$$;
42989 {
42990 throw  new IllegalArgumentException ("String formatted incorrectly");
42991 }
42992 } else {
42993 throw e$$;
42994 }
42995 }
42996 value = Integer.$valueOf (keyCode);
42997 vkCollect.put (key, value);
42998 }return value.intValue ();
42999 }, "~S");
43000 Clazz_defineMethod (c$, "getKeyChar", 
43001 function () {
43002 return this.keyChar;
43003 });
43004 Clazz_defineMethod (c$, "getKeyCode", 
43005 function () {
43006 return this.keyCode;
43007 });
43008 Clazz_defineMethod (c$, "getModifiers", 
43009 function () {
43010 return this.modifiers;
43011 });
43012 Clazz_defineMethod (c$, "isOnKeyRelease", 
43013 function () {
43014 return this.onKeyRelease;
43015 });
43016 Clazz_defineMethod (c$, "getKeyEventType", 
43017 function () {
43018 if (this.keyCode == 0) {
43019 return 400;
43020 } else {
43021 return (this.onKeyRelease) ? 402 : 401;
43022 }});
43023 Clazz_overrideMethod (c$, "hashCode", 
43024 function () {
43025 return (((this.keyChar).charCodeAt (0)) + 1) * (2 * (this.keyCode + 1)) * (this.modifiers + 1) + (this.onKeyRelease ? 1 : 2);
43026 });
43027 Clazz_defineMethod (c$, "equals", 
43028 function (anObject) {
43029 if (Clazz_instanceOf (anObject, java.awt.AWTKeyStroke)) {
43030 var ks = anObject;
43031 return (ks.keyChar == this.keyChar && ks.keyCode == this.keyCode && ks.onKeyRelease == this.onKeyRelease && ks.modifiers == this.modifiers);
43032 }return false;
43033 }, "~O");
43034 Clazz_overrideMethod (c$, "toString", 
43035 function () {
43036 if (this.keyCode == 0) {
43037 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + "typed " + this.keyChar;
43038 } else {
43039 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + (this.onKeyRelease ? "released" : "pressed") + " " + java.awt.AWTKeyStroke.getVKText (this.keyCode);
43040 }});
43041 c$.getModifiersText = Clazz_defineMethod (c$, "getModifiersText", 
43042 function (modifiers) {
43043 var buf =  new StringBuilder ();
43044 if ((modifiers & 64) != 0) {
43045 buf.append ("shift ");
43046 }if ((modifiers & 128) != 0) {
43047 buf.append ("ctrl ");
43048 }if ((modifiers & 256) != 0) {
43049 buf.append ("meta ");
43050 }if ((modifiers & 512) != 0) {
43051 buf.append ("alt ");
43052 }if ((modifiers & 8192) != 0) {
43053 buf.append ("altGraph ");
43054 }if ((modifiers & 1024) != 0) {
43055 buf.append ("button1 ");
43056 }if ((modifiers & 2048) != 0) {
43057 buf.append ("button2 ");
43058 }if ((modifiers & 4096) != 0) {
43059 buf.append ("button3 ");
43060 }return buf.toString ();
43061 }, "~N");
43062 c$.getVKText = Clazz_defineMethod (c$, "getVKText", 
43063 function (keyCode) {
43064 return "UNKNOWN";
43065 }, "~N");
43066 Clazz_defineMethod (c$, "readResolve", 
43067 function () {
43068 {
43069 var newClass = this.getClass ();
43070 var awtKeyStrokeClass = java.awt.AWTKeyStroke.getAWTKeyStrokeClass ();
43071 if (!newClass.equals (awtKeyStrokeClass)) {
43072 java.awt.AWTKeyStroke.registerSubclass (newClass);
43073 }return java.awt.AWTKeyStroke.getCachedStroke (this.keyChar, this.keyCode, this.modifiers, this.onKeyRelease);
43074 }});
43075 Clazz_defineStatics (c$,
43076 "modifierKeywords", null,
43077 "vks", null);
43078 c$ = Clazz_decorateAsClass (function () {
43079 this.code2name = null;
43080 this.name2code = null;
43081 Clazz_instantialize (this, arguments);
43082 }, java.awt, "VKCollection");
43083 Clazz_makeConstructor (c$, 
43084 function () {
43085 this.code2name =  new java.util.HashMap ();
43086 this.name2code =  new java.util.HashMap ();
43087 });
43088 Clazz_defineMethod (c$, "put", 
43089 function (name, code) {
43090 this.code2name.put (code, name);
43091 this.name2code.put (name, code);
43092 }, "~S,Integer");
43093 Clazz_defineMethod (c$, "findCode", 
43094 function (name) {
43095 return this.name2code.get (name);
43096 }, "~S");
43097 Clazz_defineMethod (c$, "findName", 
43098 function (code) {
43099 return this.code2name.get (code);
43100 }, "Integer");
43101 });
43102 Clazz_load(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){
43103 c$=Clazz_decorateAsClass(function(){
43104 this.string=null;
43105 this.delimiters=null;
43106 this.returnDelimiters=false;
43107 this.position=0;
43108 Clazz_instantialize(this,arguments);
43109 },java.util,"StringTokenizer",null,java.util.Enumeration);
43110 Clazz_makeConstructor(c$,
43111 function(string){
43112 this.construct(string," \t\n\r\f",false);
43113 },"~S");
43114 Clazz_makeConstructor(c$,
43115 function(string,delimiters){
43116 this.construct(string,delimiters,false);
43117 },"~S,~S");
43118 Clazz_makeConstructor(c$,
43119 function(string,delimiters,returnDelimiters){
43120 if(string!=null){
43121 this.string=string;
43122 this.delimiters=delimiters;
43123 this.returnDelimiters=returnDelimiters;
43124 this.position=0;
43125 }else throw new NullPointerException();
43126 },"~S,~S,~B");
43127 Clazz_defineMethod(c$,"countTokens",
43128 function(){
43129 var count=0;
43130 var inToken=false;
43131 for(var i=this.position,length=this.string.length;i<length;i++){
43132 if(this.delimiters.indexOf(this.string.charAt(i),0)>=0){
43133 if(this.returnDelimiters)count++;
43134 if(inToken){
43135 count++;
43136 inToken=false;
43137 }}else{
43138 inToken=true;
43139 }}
43140 if(inToken)count++;
43141 return count;
43142 });
43143 Clazz_overrideMethod(c$,"hasMoreElements",
43144 function(){
43145 return this.hasMoreTokens();
43146 });
43147 Clazz_defineMethod(c$,"hasMoreTokens",
43148 function(){
43149 var length=this.string.length;
43150 if(this.position<length){
43151 if(this.returnDelimiters)return true;
43152 for(var i=this.position;i<length;i++)if(this.delimiters.indexOf(this.string.charAt(i),0)==-1)return true;
43153
43154 }return false;
43155 });
43156 Clazz_overrideMethod(c$,"nextElement",
43157 function(){
43158 return this.nextToken();
43159 });
43160 Clazz_defineMethod(c$,"nextToken",
43161 function(){
43162 var i=this.position;
43163 var length=this.string.length;
43164 if(i<length){
43165 if(this.returnDelimiters){
43166 if(this.delimiters.indexOf(this.string.charAt(this.position),0)>=0)return String.valueOf(this.string.charAt(this.position++));
43167 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);
43168
43169 return this.string.substring(i);
43170 }while(i<length&&this.delimiters.indexOf(this.string.charAt(i),0)>=0)i++;
43171
43172 this.position=i;
43173 if(i<length){
43174 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);
43175
43176 return this.string.substring(i);
43177 }}throw new java.util.NoSuchElementException();
43178 });
43179 Clazz_defineMethod(c$,"nextToken",
43180 function(delims){
43181 this.delimiters=delims;
43182 return this.nextToken();
43183 },"~S");
43184 });
43185 Clazz_declarePackage ("javax.swing");
43186 Clazz_load (["javax.swing.InputMap"], "javax.swing.ComponentInputMap", ["java.lang.IllegalArgumentException"], function () {
43187 c$ = Clazz_decorateAsClass (function () {
43188 this.component = null;
43189 Clazz_instantialize (this, arguments);
43190 }, javax.swing, "ComponentInputMap", javax.swing.InputMap);
43191 Clazz_makeConstructor (c$, 
43192 function (component) {
43193 Clazz_superConstructor (this, javax.swing.ComponentInputMap, []);
43194 this.component = component;
43195 if (component == null) {
43196 throw  new IllegalArgumentException ("ComponentInputMaps must be associated with a non-null JComponent");
43197 }}, "javax.swing.JComponent");
43198 Clazz_defineMethod (c$, "setParent", 
43199 function (map) {
43200 if (this.getParent () === map) {
43201 return;
43202 }if (map != null && (!(Clazz_instanceOf (map, javax.swing.ComponentInputMap)) || (map).getComponent () !== this.getComponent ())) {
43203 throw  new IllegalArgumentException ("ComponentInputMaps must have a parent ComponentInputMap associated with the same component");
43204 }Clazz_superCall (this, javax.swing.ComponentInputMap, "setParent", [map]);
43205 this.getComponent ().componentInputMapChanged (this);
43206 }, "javax.swing.InputMap");
43207 Clazz_defineMethod (c$, "getComponent", 
43208 function () {
43209 return this.component;
43210 });
43211 Clazz_defineMethod (c$, "put", 
43212 function (keyStroke, actionMapKey) {
43213 Clazz_superCall (this, javax.swing.ComponentInputMap, "put", [keyStroke, actionMapKey]);
43214 if (this.getComponent () != null) {
43215 this.getComponent ().componentInputMapChanged (this);
43216 }}, "javax.swing.KeyStroke,~O");
43217 Clazz_defineMethod (c$, "remove", 
43218 function (key) {
43219 Clazz_superCall (this, javax.swing.ComponentInputMap, "remove", [key]);
43220 if (this.getComponent () != null) {
43221 this.getComponent ().componentInputMapChanged (this);
43222 }}, "javax.swing.KeyStroke");
43223 Clazz_defineMethod (c$, "clear", 
43224 function () {
43225 var oldSize = this.size ();
43226 Clazz_superCall (this, javax.swing.ComponentInputMap, "clear", []);
43227 if (oldSize > 0 && this.getComponent () != null) {
43228 this.getComponent ().componentInputMapChanged (this);
43229 }});
43230 });
43231 Clazz_declarePackage ("jssun.swing");
43232 Clazz_load (["javax.swing.LayoutStyle"], "jssun.swing.DefaultLayoutStyle", ["java.lang.IllegalArgumentException", "$.NullPointerException", "javax.swing.Icon", "$.JCheckBox", "$.JLabel", "$.JRadioButton", "$.UIManager", "javax.swing.plaf.UIResource"], function () {
43233 c$ = Clazz_declareType (jssun.swing, "DefaultLayoutStyle", javax.swing.LayoutStyle);
43234 c$.getInstance = Clazz_overrideMethod (c$, "getInstance", 
43235 function () {
43236 return jssun.swing.DefaultLayoutStyle.INSTANCE;
43237 });
43238 Clazz_overrideMethod (c$, "getPreferredGap", 
43239 function (component1, component2, type, position, parent) {
43240 if (component1 == null || component2 == null || type == null) {
43241 throw  new NullPointerException ();
43242 }this.checkPosition (position);
43243 if (type === javax.swing.LayoutStyle.ComponentPlacement.INDENT && (position == 3 || position == 7)) {
43244 var indent = this.getIndent (component1, position);
43245 if (indent > 0) {
43246 return indent;
43247 }}return (type === javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) ? 12 : 6;
43248 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,java.awt.Container");
43249 Clazz_overrideMethod (c$, "getContainerGap", 
43250 function (component, position, parent) {
43251 if (component == null) {
43252 throw  new NullPointerException ();
43253 }this.checkPosition (position);
43254 return 6;
43255 }, "javax.swing.JComponent,~N,java.awt.Container");
43256 Clazz_defineMethod (c$, "isLabelAndNonlabel", 
43257 function (c1, c2, position) {
43258 if (position == 3 || position == 7) {
43259 var c1Label = (Clazz_instanceOf (c1, javax.swing.JLabel));
43260 var c2Label = (Clazz_instanceOf (c2, javax.swing.JLabel));
43261 return ((c1Label || c2Label) && (c1Label != c2Label));
43262 }return false;
43263 }, "javax.swing.JComponent,javax.swing.JComponent,~N");
43264 Clazz_defineMethod (c$, "getButtonGap", 
43265 function (source, target, position, offset) {
43266 offset -= this.getButtonGap (source, position);
43267 if (offset > 0) {
43268 offset -= this.getButtonGap (target, this.flipDirection (position));
43269 }if (offset < 0) {
43270 return 0;
43271 }return offset;
43272 }, "javax.swing.JComponent,javax.swing.JComponent,~N,~N");
43273 Clazz_defineMethod (c$, "getButtonGap", 
43274 function (source, position, offset) {
43275 offset -= this.getButtonGap (source, position);
43276 return Math.max (offset, 0);
43277 }, "javax.swing.JComponent,~N,~N");
43278 Clazz_defineMethod (c$, "getButtonGap", 
43279 function (c, position) {
43280 var classID = c.getUIClassID ();
43281 if ((classID === "CheckBoxUI" || classID === "RadioButtonUI") && !(c).isBorderPainted ()) {
43282 var border = c.getBorder ();
43283 if (Clazz_instanceOf (border, javax.swing.plaf.UIResource)) {
43284 return this.getInset (c, position);
43285 }}return 0;
43286 }, "javax.swing.JComponent,~N");
43287 Clazz_defineMethod (c$, "checkPosition", 
43288  function (position) {
43289 if (position != 1 && position != 5 && position != 7 && position != 3) {
43290 throw  new IllegalArgumentException ();
43291 }}, "~N");
43292 Clazz_defineMethod (c$, "flipDirection", 
43293 function (position) {
43294 switch (position) {
43295 case 1:
43296 return 5;
43297 case 5:
43298 return 1;
43299 case 3:
43300 return 7;
43301 case 7:
43302 return 3;
43303 }
43304 return 0;
43305 }, "~N");
43306 Clazz_defineMethod (c$, "getIndent", 
43307 function (c, position) {
43308 var classID = c.getUIClassID ();
43309 if (classID === "CheckBoxUI" || classID === "RadioButtonUI") {
43310 var button = c;
43311 var insets = c.getInsets ();
43312 var icon = this.getIcon (button);
43313 var gap = button.getIconTextGap ();
43314 if (this.isLeftAligned (button, position)) {
43315 return insets.left + icon.getIconWidth () + gap;
43316 } else if (this.isRightAligned (button, position)) {
43317 return insets.right + icon.getIconWidth () + gap;
43318 }}return 0;
43319 }, "javax.swing.JComponent,~N");
43320 Clazz_defineMethod (c$, "getIcon", 
43321  function (button) {
43322 var icon = button.getIcon ();
43323 if (icon != null) {
43324 return icon;
43325 }var key = null;
43326 if (Clazz_instanceOf (button, javax.swing.JCheckBox)) {
43327 key = "CheckBox.icon";
43328 } else if (Clazz_instanceOf (button, javax.swing.JRadioButton)) {
43329 key = "RadioButton.icon";
43330 }if (key != null) {
43331 var oIcon = javax.swing.UIManager.get (key);
43332 if (Clazz_instanceOf (oIcon, javax.swing.Icon)) {
43333 return oIcon;
43334 }}return null;
43335 }, "javax.swing.AbstractButton");
43336 Clazz_defineMethod (c$, "isLeftAligned", 
43337  function (button, position) {
43338 if (position == 7) {
43339 var ltr = button.getComponentOrientation ().isLeftToRight ();
43340 var hAlign = button.getHorizontalAlignment ();
43341 return ((ltr && (hAlign == 2 || hAlign == 10)) || (!ltr && (hAlign == 11)));
43342 }return false;
43343 }, "javax.swing.AbstractButton,~N");
43344 Clazz_defineMethod (c$, "isRightAligned", 
43345  function (button, position) {
43346 if (position == 3) {
43347 var ltr = button.getComponentOrientation ().isLeftToRight ();
43348 var hAlign = button.getHorizontalAlignment ();
43349 return ((ltr && (hAlign == 4 || hAlign == 11)) || (!ltr && (hAlign == 10)));
43350 }return false;
43351 }, "javax.swing.AbstractButton,~N");
43352 Clazz_defineMethod (c$, "getInset", 
43353  function (c, position) {
43354 return this.getInset (c.getInsets (), position);
43355 }, "javax.swing.JComponent,~N");
43356 Clazz_defineMethod (c$, "getInset", 
43357  function (insets, position) {
43358 if (insets == null) {
43359 return 0;
43360 }switch (position) {
43361 case 1:
43362 return insets.top;
43363 case 5:
43364 return insets.bottom;
43365 case 3:
43366 return insets.right;
43367 case 7:
43368 return insets.left;
43369 }
43370 return 0;
43371 }, "java.awt.Insets,~N");
43372 c$.INSTANCE = c$.prototype.INSTANCE =  new jssun.swing.DefaultLayoutStyle ();
43373 });
43374 Clazz_declarePackage ("javax.swing");
43375 Clazz_load (["java.lang.Enum"], "javax.swing.LayoutStyle", ["javax.swing.UIManager", "jssun.awt.AppContext"], function () {
43376 c$ = Clazz_declareType (javax.swing, "LayoutStyle");
43377 c$.setInstance = Clazz_defineMethod (c$, "setInstance", 
43378 function (style) {
43379 {
43380 if (style == null) {
43381 jssun.awt.AppContext.getAppContext ().remove (javax.swing.LayoutStyle);
43382 } else {
43383 jssun.awt.AppContext.getAppContext ().put (javax.swing.LayoutStyle, style);
43384 }}}, "javax.swing.LayoutStyle");
43385 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
43386 function () {
43387 var style;
43388 {
43389 style = jssun.awt.AppContext.getAppContext ().get (javax.swing.LayoutStyle);
43390 }if (style == null) {
43391 return javax.swing.UIManager.getLookAndFeel ().getLayoutStyle ();
43392 }return style;
43393 });
43394 Clazz_makeConstructor (c$, 
43395 function () {
43396 });
43397 Clazz_pu$h(self.c$);
43398 c$ = Clazz_declareType (javax.swing.LayoutStyle, "ComponentPlacement", Enum);
43399 Clazz_defineEnumConstant (c$, "RELATED", 0, []);
43400 Clazz_defineEnumConstant (c$, "UNRELATED", 1, []);
43401 Clazz_defineEnumConstant (c$, "INDENT", 2, []);
43402 c$ = Clazz_p0p ();
43403 });
43404 Clazz_declarePackage ("javax.swing");
43405 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JCheckBox", ["java.lang.Boolean", "javax.swing.UIManager"], function () {
43406 c$ = Clazz_decorateAsClass (function () {
43407 this.flat = false;
43408 Clazz_instantialize (this, arguments);
43409 }, javax.swing, "JCheckBox", javax.swing.JToggleButton);
43410 Clazz_makeConstructor (c$, 
43411 function () {
43412 this.construct (null, null, false);
43413 });
43414 Clazz_makeConstructor (c$, 
43415 function (icon) {
43416 this.construct (null, icon, false);
43417 }, "javax.swing.Icon");
43418 Clazz_makeConstructor (c$, 
43419 function (icon, selected) {
43420 this.construct (null, icon, selected);
43421 }, "javax.swing.Icon,~B");
43422 Clazz_makeConstructor (c$, 
43423 function (text) {
43424 this.construct (text, null, false);
43425 }, "~S");
43426 Clazz_makeConstructor (c$, 
43427 function (a) {
43428 this.construct ();
43429 this.setAction (a);
43430 }, "javax.swing.Action");
43431 Clazz_makeConstructor (c$, 
43432 function (text, selected) {
43433 this.construct (text, null, selected);
43434 }, "~S,~B");
43435 Clazz_makeConstructor (c$, 
43436 function (text, icon) {
43437 this.construct (text, icon, false);
43438 }, "~S,javax.swing.Icon");
43439 Clazz_makeConstructor (c$, 
43440 function (text, icon, selected) {
43441 Clazz_superConstructor (this, javax.swing.JCheckBox, [text, icon, selected]);
43442 this.setUIProperty ("borderPainted", Boolean.FALSE);
43443 this.setHorizontalAlignment (10);
43444 }, "~S,javax.swing.Icon,~B");
43445 Clazz_defineMethod (c$, "setBorderPaintedFlat", 
43446 function (b) {
43447 var oldValue = this.flat;
43448 this.flat = b;
43449 this.firePropertyChangeBool ("borderPaintedFlat", oldValue, this.flat);
43450 if (b != oldValue) {
43451 this.revalidate ();
43452 this.repaint ();
43453 }}, "~B");
43454 Clazz_defineMethod (c$, "isBorderPaintedFlat", 
43455 function () {
43456 return this.flat;
43457 });
43458 Clazz_overrideMethod (c$, "updateUI", 
43459 function () {
43460 this.setUI (javax.swing.UIManager.getUI (this));
43461 });
43462 Clazz_overrideMethod (c$, "getUIClassID", 
43463 function () {
43464 return "CheckBoxUI";
43465 });
43466 Clazz_overrideMethod (c$, "setIconFromAction", 
43467 function (a) {
43468 }, "javax.swing.Action");
43469 Clazz_defineStatics (c$,
43470 "BORDER_PAINTED_FLAT_CHANGED_PROPERTY", "borderPaintedFlat",
43471 "$$uiClassID", "CheckBoxUI");
43472 });
43473 Clazz_declarePackage ("java.awt");
43474 Clazz_declareInterface (java.awt, "ItemSelectable");
43475 Clazz_declarePackage ("java.awt.event");
43476 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ItemEvent", null, function () {
43477 c$ = Clazz_decorateAsClass (function () {
43478 this.item = null;
43479 this.stateChange = 0;
43480 Clazz_instantialize (this, arguments);
43481 }, java.awt.event, "ItemEvent", java.awt.AWTEvent);
43482 Clazz_makeConstructor (c$, 
43483 function (source, id, item, stateChange) {
43484 Clazz_superConstructor (this, java.awt.event.ItemEvent, [source, id]);
43485 this.item = item;
43486 this.stateChange = stateChange;
43487 }, "java.awt.ItemSelectable,~N,~O,~N");
43488 Clazz_defineMethod (c$, "getItemSelectable", 
43489 function () {
43490 return this.source;
43491 });
43492 Clazz_defineMethod (c$, "getItem", 
43493 function () {
43494 return this.item;
43495 });
43496 Clazz_defineMethod (c$, "getStateChange", 
43497 function () {
43498 return this.stateChange;
43499 });
43500 Clazz_overrideMethod (c$, "paramString", 
43501 function () {
43502 var typeStr;
43503 switch (this.id) {
43504 case 701:
43505 typeStr = "ITEM_STATE_CHANGED";
43506 break;
43507 default:
43508 typeStr = "unknown type";
43509 }
43510 var stateStr;
43511 switch (this.stateChange) {
43512 case 1:
43513 stateStr = "SELECTED";
43514 break;
43515 case 2:
43516 stateStr = "DESELECTED";
43517 break;
43518 default:
43519 stateStr = "unknown type";
43520 }
43521 return typeStr + ",item=" + this.item + ",stateChange=" + stateStr;
43522 });
43523 Clazz_defineStatics (c$,
43524 "ITEM_FIRST", 701,
43525 "ITEM_LAST", 701,
43526 "ITEM_STATE_CHANGED", 701,
43527 "SELECTED", 1,
43528 "DESELECTED", 2);
43529 });
43530 Clazz_declarePackage ("javax.swing");
43531 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 () {
43532 c$ = Clazz_decorateAsClass (function () {
43533 this.stateMask = 0;
43534 this.actionCommand = null;
43535 this.group = null;
43536 this.mnemonic = 0;
43537 this.changeEvent = null;
43538 this.listenerList = null;
43539 this.menuItem = false;
43540 Clazz_instantialize (this, arguments);
43541 }, javax.swing, "DefaultButtonModel", null, javax.swing.ButtonModel);
43542 Clazz_prepareFields (c$, function () {
43543 this.listenerList =  new javax.swing.event.EventListenerList ();
43544 });
43545 Clazz_makeConstructor (c$, 
43546 function () {
43547 this.stateMask = 0;
43548 this.setEnabled (true);
43549 });
43550 Clazz_overrideMethod (c$, "setActionCommand", 
43551 function (actionCommand) {
43552 this.actionCommand = actionCommand;
43553 }, "~S");
43554 Clazz_overrideMethod (c$, "getActionCommand", 
43555 function () {
43556 return this.actionCommand;
43557 });
43558 Clazz_overrideMethod (c$, "isArmed", 
43559 function () {
43560 return (this.stateMask & 1) != 0;
43561 });
43562 Clazz_overrideMethod (c$, "isSelected", 
43563 function () {
43564 return (this.stateMask & 2) != 0;
43565 });
43566 Clazz_overrideMethod (c$, "isEnabled", 
43567 function () {
43568 return (this.stateMask & 8) != 0;
43569 });
43570 Clazz_overrideMethod (c$, "isPressed", 
43571 function () {
43572 return (this.stateMask & 4) != 0;
43573 });
43574 Clazz_overrideMethod (c$, "isRollover", 
43575 function () {
43576 return (this.stateMask & 16) != 0;
43577 });
43578 Clazz_overrideMethod (c$, "setArmed", 
43579 function (b) {
43580 if (this.isMenuItem () && javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
43581 if ((this.isArmed () == b)) {
43582 return;
43583 }} else {
43584 if ((this.isArmed () == b) || !this.isEnabled ()) {
43585 return;
43586 }}if (b) {
43587 this.stateMask |= 1;
43588 } else {
43589 this.stateMask &= -2;
43590 }this.fireStateChanged ();
43591 }, "~B");
43592 Clazz_overrideMethod (c$, "setEnabled", 
43593 function (b) {
43594 if (this.isEnabled () == b) {
43595 return;
43596 }if (b) {
43597 this.stateMask |= 8;
43598 } else {
43599 this.stateMask &= -9;
43600 this.stateMask &= -2;
43601 this.stateMask &= -5;
43602 }this.fireStateChanged ();
43603 }, "~B");
43604 Clazz_overrideMethod (c$, "setSelected", 
43605 function (b) {
43606 if (this.isSelected () == b) {
43607 return;
43608 }if (b) {
43609 this.stateMask |= 2;
43610 } else {
43611 this.stateMask &= -3;
43612 }this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, b ? 1 : 2));
43613 this.fireStateChanged ();
43614 }, "~B");
43615 Clazz_overrideMethod (c$, "setPressed", 
43616 function (b) {
43617 if ((this.isPressed () == b) || !this.isEnabled ()) {
43618 return;
43619 }if (b) {
43620 this.stateMask |= 4;
43621 } else {
43622 this.stateMask &= -5;
43623 }if (!this.isPressed () && this.isArmed ()) {
43624 var modifiers = 0;
43625 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
43626 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
43627 modifiers = (currentEvent).getModifiers ();
43628 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
43629 modifiers = (currentEvent).getModifiers ();
43630 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), modifiers));
43631 }this.fireStateChanged ();
43632 }, "~B");
43633 Clazz_overrideMethod (c$, "setRollover", 
43634 function (b) {
43635 if ((this.isRollover () == b) || !this.isEnabled ()) {
43636 return;
43637 }if (b) {
43638 this.stateMask |= 16;
43639 } else {
43640 this.stateMask &= -17;
43641 }this.fireStateChanged ();
43642 }, "~B");
43643 Clazz_overrideMethod (c$, "setMnemonic", 
43644 function (key) {
43645 this.mnemonic = key;
43646 this.fireStateChanged ();
43647 }, "~N");
43648 Clazz_overrideMethod (c$, "getMnemonic", 
43649 function () {
43650 return this.mnemonic;
43651 });
43652 Clazz_overrideMethod (c$, "addChangeListener", 
43653 function (l) {
43654 this.listenerList.add (javax.swing.event.ChangeListener, l);
43655 }, "javax.swing.event.ChangeListener");
43656 Clazz_overrideMethod (c$, "removeChangeListener", 
43657 function (l) {
43658 this.listenerList.remove (javax.swing.event.ChangeListener, l);
43659 }, "javax.swing.event.ChangeListener");
43660 Clazz_defineMethod (c$, "getChangeListeners", 
43661 function () {
43662 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
43663 });
43664 Clazz_defineMethod (c$, "fireStateChanged", 
43665 function () {
43666 var listeners = this.listenerList.getListenerList ();
43667 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43668 if (listeners[i] === javax.swing.event.ChangeListener) {
43669 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
43670 (listeners[i + 1]).stateChanged (this.changeEvent);
43671 }}
43672 });
43673 Clazz_overrideMethod (c$, "addActionListener", 
43674 function (l) {
43675 this.listenerList.add (java.awt.event.ActionListener, l);
43676 }, "java.awt.event.ActionListener");
43677 Clazz_overrideMethod (c$, "removeActionListener", 
43678 function (l) {
43679 this.listenerList.remove (java.awt.event.ActionListener, l);
43680 }, "java.awt.event.ActionListener");
43681 Clazz_defineMethod (c$, "getActionListeners", 
43682 function () {
43683 return this.listenerList.getListeners (java.awt.event.ActionListener);
43684 });
43685 Clazz_defineMethod (c$, "fireActionPerformed", 
43686 function (e) {
43687 var listeners = this.listenerList.getListenerList ();
43688 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43689 if (listeners[i] === java.awt.event.ActionListener) {
43690 (listeners[i + 1]).actionPerformed (e);
43691 }}
43692 }, "java.awt.event.ActionEvent");
43693 Clazz_overrideMethod (c$, "addItemListener", 
43694 function (l) {
43695 this.listenerList.add (java.awt.event.ItemListener, l);
43696 }, "java.awt.event.ItemListener");
43697 Clazz_overrideMethod (c$, "removeItemListener", 
43698 function (l) {
43699 this.listenerList.remove (java.awt.event.ItemListener, l);
43700 }, "java.awt.event.ItemListener");
43701 Clazz_defineMethod (c$, "getItemListeners", 
43702 function () {
43703 return this.listenerList.getListeners (java.awt.event.ItemListener);
43704 });
43705 Clazz_defineMethod (c$, "fireItemStateChanged", 
43706 function (e) {
43707 var listeners = this.listenerList.getListenerList ();
43708 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43709 if (listeners[i] === java.awt.event.ItemListener) {
43710 (listeners[i + 1]).itemStateChanged (e);
43711 }}
43712 }, "java.awt.event.ItemEvent");
43713 Clazz_defineMethod (c$, "getListeners", 
43714 function (listenerType) {
43715 return this.listenerList.getListeners (listenerType);
43716 }, "Class");
43717 Clazz_overrideMethod (c$, "getSelectedObjects", 
43718 function () {
43719 return null;
43720 });
43721 Clazz_overrideMethod (c$, "setGroup", 
43722 function (group) {
43723 this.group = group;
43724 }, "javax.swing.ButtonGroup");
43725 Clazz_defineMethod (c$, "getGroup", 
43726 function () {
43727 return this.group;
43728 });
43729 Clazz_defineMethod (c$, "isMenuItem", 
43730 function () {
43731 return this.menuItem;
43732 });
43733 Clazz_defineMethod (c$, "setMenuItem", 
43734 function (menuItem) {
43735 this.menuItem = menuItem;
43736 }, "~B");
43737 Clazz_defineStatics (c$,
43738 "ARMED", 1,
43739 "SELECTED", 2,
43740 "PRESSED", 4,
43741 "ENABLED", 8,
43742 "ROLLOVER", 16);
43743 });
43744 Clazz_declarePackage ("javax.swing");
43745 Clazz_load (["java.awt.LayoutManager2"], "javax.swing.OverlayLayout", ["java.awt.AWTError", "$.Dimension", "javax.swing.SizeRequirements"], function () {
43746 c$ = Clazz_decorateAsClass (function () {
43747 this.target = null;
43748 this.xChildren = null;
43749 this.yChildren = null;
43750 this.xTotal = null;
43751 this.yTotal = null;
43752 Clazz_instantialize (this, arguments);
43753 }, javax.swing, "OverlayLayout", null, java.awt.LayoutManager2);
43754 Clazz_makeConstructor (c$, 
43755 function (target) {
43756 this.target = target;
43757 }, "java.awt.Container");
43758 Clazz_defineMethod (c$, "getTarget", 
43759 function () {
43760 return this.target;
43761 });
43762 Clazz_overrideMethod (c$, "invalidateLayout", 
43763 function (target) {
43764 this.checkContainer (target);
43765 this.xChildren = null;
43766 this.yChildren = null;
43767 this.xTotal = null;
43768 this.yTotal = null;
43769 }, "java.awt.Container");
43770 Clazz_defineMethod (c$, "addLayoutComponent", 
43771 function (name, comp) {
43772 this.invalidateLayout (comp.getParent ());
43773 }, "~S,java.awt.Component");
43774 Clazz_overrideMethod (c$, "removeLayoutComponent", 
43775 function (comp) {
43776 this.invalidateLayout (comp.getParent ());
43777 }, "java.awt.Component");
43778 Clazz_defineMethod (c$, "addLayoutComponent", 
43779 function (comp, constraints) {
43780 this.invalidateLayout (comp.getParent ());
43781 }, "java.awt.Component,~O");
43782 Clazz_overrideMethod (c$, "preferredLayoutSize", 
43783 function (target) {
43784 this.checkContainer (target);
43785 this.checkRequests ();
43786 var size =  new java.awt.Dimension (this.xTotal.preferred, this.yTotal.preferred);
43787 var insets = target.getInsets ();
43788 size.width += insets.left + insets.right;
43789 size.height += insets.top + insets.bottom;
43790 return size;
43791 }, "java.awt.Container");
43792 Clazz_overrideMethod (c$, "minimumLayoutSize", 
43793 function (target) {
43794 this.checkContainer (target);
43795 this.checkRequests ();
43796 var size =  new java.awt.Dimension (this.xTotal.minimum, this.yTotal.minimum);
43797 var insets = target.getInsets ();
43798 size.width += insets.left + insets.right;
43799 size.height += insets.top + insets.bottom;
43800 return size;
43801 }, "java.awt.Container");
43802 Clazz_overrideMethod (c$, "maximumLayoutSize", 
43803 function (target) {
43804 this.checkContainer (target);
43805 this.checkRequests ();
43806 var size =  new java.awt.Dimension (this.xTotal.maximum, this.yTotal.maximum);
43807 var insets = target.getInsets ();
43808 size.width += insets.left + insets.right;
43809 size.height += insets.top + insets.bottom;
43810 return size;
43811 }, "java.awt.Container");
43812 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
43813 function (target) {
43814 this.checkContainer (target);
43815 this.checkRequests ();
43816 return this.xTotal.alignment;
43817 }, "java.awt.Container");
43818 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
43819 function (target) {
43820 this.checkContainer (target);
43821 this.checkRequests ();
43822 return this.yTotal.alignment;
43823 }, "java.awt.Container");
43824 Clazz_overrideMethod (c$, "layoutContainer", 
43825 function (target) {
43826 this.checkContainer (target);
43827 this.checkRequests ();
43828 var nChildren = target.getComponentCount ();
43829 var xOffsets =  Clazz_newIntArray (nChildren, 0);
43830 var xSpans =  Clazz_newIntArray (nChildren, 0);
43831 var yOffsets =  Clazz_newIntArray (nChildren, 0);
43832 var ySpans =  Clazz_newIntArray (nChildren, 0);
43833 var alloc = target.getSize ();
43834 var $in = target.getInsets ();
43835 alloc.width -= $in.left + $in.right;
43836 alloc.height -= $in.top + $in.bottom;
43837 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.width, this.xTotal, this.xChildren, xOffsets, xSpans);
43838 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.height, this.yTotal, this.yChildren, yOffsets, ySpans);
43839 for (var i = 0; i < nChildren; i++) {
43840 var c = target.getComponent (i);
43841 c.setBounds ($in.left + xOffsets[i], $in.top + yOffsets[i], xSpans[i], ySpans[i]);
43842 }
43843 }, "java.awt.Container");
43844 Clazz_defineMethod (c$, "checkContainer", 
43845 function (target) {
43846 if (this.target !== target) {
43847 throw  new java.awt.AWTError ("OverlayLayout can't be shared");
43848 }}, "java.awt.Container");
43849 Clazz_defineMethod (c$, "checkRequests", 
43850 function () {
43851 if (this.xChildren == null || this.yChildren == null) {
43852 var n = this.target.getComponentCount ();
43853 this.xChildren =  new Array (n);
43854 this.yChildren =  new Array (n);
43855 for (var i = 0; i < n; i++) {
43856 var c = this.target.getComponent (i);
43857 var min = c.getMinimumSize ();
43858 var typ = c.getPreferredSize ();
43859 var max = c.getMaximumSize ();
43860 this.xChildren[i] =  new javax.swing.SizeRequirements (min.width, typ.width, max.width, c.getAlignmentX ());
43861 this.yChildren[i] =  new javax.swing.SizeRequirements (min.height, typ.height, max.height, c.getAlignmentY ());
43862 }
43863 this.xTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.xChildren);
43864 this.yTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.yChildren);
43865 }});
43866 });
43867 Clazz_declarePackage ("javax.swing");
43868 c$ = Clazz_decorateAsClass (function () {
43869 this.minimum = 0;
43870 this.preferred = 0;
43871 this.maximum = 0;
43872 this.alignment = 0;
43873 Clazz_instantialize (this, arguments);
43874 }, javax.swing, "SizeRequirements");
43875 Clazz_makeConstructor (c$, 
43876 function () {
43877 this.minimum = 0;
43878 this.preferred = 0;
43879 this.maximum = 0;
43880 this.alignment = 0.5;
43881 });
43882 Clazz_makeConstructor (c$, 
43883 function (min, pref, max, a) {
43884 this.minimum = min;
43885 this.preferred = pref;
43886 this.maximum = max;
43887 this.alignment = a > 1.0 ? 1.0 : a < 0.0 ? 0.0 : a;
43888 }, "~N,~N,~N,~N");
43889 Clazz_overrideMethod (c$, "toString", 
43890 function () {
43891 return "[" + this.minimum + "," + this.preferred + "," + this.maximum + "]@" + this.alignment;
43892 });
43893 c$.getTiledSizeRequirements = Clazz_defineMethod (c$, "getTiledSizeRequirements", 
43894 function (children) {
43895 var total =  new javax.swing.SizeRequirements ();
43896 for (var i = 0; i < children.length; i++) {
43897 var req = children[i];
43898 total.minimum = Math.min (total.minimum + req.minimum, 2147483647);
43899 total.preferred = Math.min (total.preferred + req.preferred, 2147483647);
43900 total.maximum = Math.min (total.maximum + req.maximum, 2147483647);
43901 }
43902 return total;
43903 }, "~A");
43904 c$.getAlignedSizeRequirements = Clazz_defineMethod (c$, "getAlignedSizeRequirements", 
43905 function (children) {
43906 var totalAscent =  new javax.swing.SizeRequirements ();
43907 var totalDescent =  new javax.swing.SizeRequirements ();
43908 for (var i = 0; i < children.length; i++) {
43909 var req = children[i];
43910 var ascent = Clazz_floatToInt (req.alignment * req.minimum);
43911 var descent = req.minimum - ascent;
43912 totalAscent.minimum = Math.max (ascent, totalAscent.minimum);
43913 totalDescent.minimum = Math.max (descent, totalDescent.minimum);
43914 ascent = Clazz_floatToInt (req.alignment * req.preferred);
43915 descent = req.preferred - ascent;
43916 totalAscent.preferred = Math.max (ascent, totalAscent.preferred);
43917 totalDescent.preferred = Math.max (descent, totalDescent.preferred);
43918 ascent = Clazz_floatToInt (req.alignment * req.maximum);
43919 descent = req.maximum - ascent;
43920 totalAscent.maximum = Math.max (ascent, totalAscent.maximum);
43921 totalDescent.maximum = Math.max (descent, totalDescent.maximum);
43922 }
43923 var min = Math.min (totalAscent.minimum + totalDescent.minimum, 2147483647);
43924 var pref = Math.min (totalAscent.preferred + totalDescent.preferred, 2147483647);
43925 var max = Math.min (totalAscent.maximum + totalDescent.maximum, 2147483647);
43926 var alignment = 0.0;
43927 if (min > 0) {
43928 alignment = totalAscent.minimum / min;
43929 alignment = alignment > 1.0 ? 1.0 : alignment < 0.0 ? 0.0 : alignment;
43930 }return  new javax.swing.SizeRequirements (min, pref, max, alignment);
43931 }, "~A");
43932 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43933 function (allocated, total, children, offsets, spans) {
43934 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, true);
43935 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
43936 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43937 function (allocated, total, children, offsets, spans, forward) {
43938 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, forward);
43939 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43940 c$.calcTiled = Clazz_defineMethod (c$, "calcTiled", 
43941 function (allocated, total, children, offsets, spans, forward) {
43942 var min = 0;
43943 var pref = 0;
43944 var max = 0;
43945 for (var i = 0; i < children.length; i++) {
43946 min += children[i].minimum;
43947 pref += children[i].preferred;
43948 max += children[i].maximum;
43949 }
43950 if (allocated >= pref) {
43951 javax.swing.SizeRequirements.expandedTile (allocated, min, pref, max, children, offsets, spans, forward);
43952 } else {
43953 javax.swing.SizeRequirements.compressedTile (allocated, min, pref, max, children, offsets, spans, forward);
43954 }}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43955 c$.compressedTile = Clazz_defineMethod (c$, "compressedTile", 
43956  function (allocated, min, pref, max, request, offsets, spans, forward) {
43957 var totalPlay = Math.min (pref - allocated, pref - min);
43958 var factor = (pref - min == 0) ? 0.0 : totalPlay / (pref - min);
43959 var totalOffset;
43960 if (forward) {
43961 totalOffset = 0;
43962 for (var i = 0; i < spans.length; i++) {
43963 offsets[i] = totalOffset;
43964 var req = request[i];
43965 var play = factor * (req.preferred - req.minimum);
43966 spans[i] = Clazz_floatToInt (req.preferred - play);
43967 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
43968 }
43969 } else {
43970 totalOffset = allocated;
43971 for (var i = 0; i < spans.length; i++) {
43972 var req = request[i];
43973 var play = factor * (req.preferred - req.minimum);
43974 spans[i] = Clazz_floatToInt (req.preferred - play);
43975 offsets[i] = totalOffset - spans[i];
43976 totalOffset = Math.max (totalOffset - spans[i], 0);
43977 }
43978 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
43979 c$.expandedTile = Clazz_defineMethod (c$, "expandedTile", 
43980  function (allocated, min, pref, max, request, offsets, spans, forward) {
43981 var totalPlay = Math.min (allocated - pref, max - pref);
43982 var factor = (max - pref == 0) ? 0.0 : totalPlay / (max - pref);
43983 var totalOffset;
43984 if (forward) {
43985 totalOffset = 0;
43986 for (var i = 0; i < spans.length; i++) {
43987 offsets[i] = totalOffset;
43988 var req = request[i];
43989 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
43990 spans[i] = Math.min (req.preferred + play, 2147483647);
43991 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
43992 }
43993 } else {
43994 totalOffset = allocated;
43995 for (var i = 0; i < spans.length; i++) {
43996 var req = request[i];
43997 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
43998 spans[i] = Math.min (req.preferred + play, 2147483647);
43999 offsets[i] = totalOffset - spans[i];
44000 totalOffset = Math.max (totalOffset - spans[i], 0);
44001 }
44002 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
44003 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
44004 function (allocated, total, children, offsets, spans) {
44005 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, true);
44006 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
44007 c$.calcAligned = Clazz_defineMethod (c$, "calcAligned", 
44008 function (allocated, total, children, offsets, spans, normal) {
44009 var totalAlignment = normal ? total.alignment : 1.0 - total.alignment;
44010 var totalAscent = Clazz_floatToInt (allocated * totalAlignment);
44011 var totalDescent = allocated - totalAscent;
44012 for (var i = 0; i < children.length; i++) {
44013 var req = children[i];
44014 var alignment = normal ? req.alignment : 1.0 - req.alignment;
44015 var maxAscent = Clazz_floatToInt (req.maximum * alignment);
44016 var maxDescent = req.maximum - maxAscent;
44017 var ascent = Math.min (totalAscent, maxAscent);
44018 var descent = Math.min (totalDescent, maxDescent);
44019 offsets[i] = totalAscent - ascent;
44020 spans[i] = Math.min (ascent + descent, 2147483647);
44021 }
44022 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
44023 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
44024 function (allocated, total, children, offsets, spans, normal) {
44025 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, normal);
44026 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
44027 c$.adjustSizes = Clazz_defineMethod (c$, "adjustSizes", 
44028 function (delta, children) {
44029 return  Clazz_newIntArray (0, 0);
44030 }, "~N,~A");
44031 Clazz_declarePackage ("javax.swing");
44032 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JLabel", ["java.lang.IllegalArgumentException", "javax.swing.SwingUtilities", "$.UIManager"], function () {
44033 c$ = Clazz_decorateAsClass (function () {
44034 this.mnemonic = '\0';
44035 this.mnemonicIndex = -1;
44036 this.text = "";
44037 this.defaultIcon = null;
44038 this.disabledIcon = null;
44039 this.disabledIconSet = false;
44040 this.verticalAlignment = 0;
44041 this.horizontalAlignment = 10;
44042 this.verticalTextPosition = 0;
44043 this.horizontalTextPosition = 11;
44044 this.iconTextGap = 4;
44045 this.labelFor = null;
44046 Clazz_instantialize (this, arguments);
44047 }, javax.swing, "JLabel", javax.swing.JComponent, javax.swing.SwingConstants);
44048 Clazz_makeConstructor (c$, 
44049 function (text, icon, horizontalAlignment) {
44050 Clazz_superConstructor (this, javax.swing.JLabel, []);
44051 this.setText (text);
44052 this.setIcon (icon);
44053 this.setHorizontalAlignment (horizontalAlignment);
44054 this.updateUI ();
44055 this.setAlignmentX (0.0);
44056 }, "~S,javax.swing.Icon,~N");
44057 Clazz_makeConstructor (c$, 
44058 function (text, horizontalAlignment) {
44059 this.construct (text, null, horizontalAlignment);
44060 }, "~S,~N");
44061 Clazz_makeConstructor (c$, 
44062 function (text) {
44063 this.construct (text, null, 10);
44064 }, "~S");
44065 Clazz_makeConstructor (c$, 
44066 function (image, horizontalAlignment) {
44067 this.construct (null, image, horizontalAlignment);
44068 }, "javax.swing.Icon,~N");
44069 Clazz_makeConstructor (c$, 
44070 function (image) {
44071 this.construct (null, image, 0);
44072 }, "javax.swing.Icon");
44073 Clazz_makeConstructor (c$, 
44074 function () {
44075 this.construct ("", null, 10);
44076 });
44077 Clazz_overrideMethod (c$, "getUI", 
44078 function () {
44079 return this.ui;
44080 });
44081 Clazz_defineMethod (c$, "setUI", 
44082 function (ui) {
44083 Clazz_superCall (this, javax.swing.JLabel, "setUI", [ui]);
44084 if (!this.disabledIconSet && this.disabledIcon != null) {
44085 this.setDisabledIcon (null);
44086 }}, "javax.swing.plaf.LabelUI");
44087 Clazz_overrideMethod (c$, "updateUI", 
44088 function () {
44089 this.setUI (javax.swing.UIManager.getUI (this));
44090 });
44091 Clazz_overrideMethod (c$, "getUIClassID", 
44092 function () {
44093 return "LabelUI";
44094 });
44095 Clazz_defineMethod (c$, "getText", 
44096 function () {
44097 return this.text;
44098 });
44099 Clazz_defineMethod (c$, "setText", 
44100 function (text) {
44101 var oldValue = this.text;
44102 this.text = text;
44103 this.firePropertyChangeObject ("text", oldValue, text);
44104 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, this.getDisplayedMnemonic ()));
44105 if (text == null || oldValue == null || !text.equals (oldValue)) {
44106 this.revalidate ();
44107 this.repaint ();
44108 }}, "~S");
44109 Clazz_defineMethod (c$, "getIcon", 
44110 function () {
44111 return this.defaultIcon;
44112 });
44113 Clazz_defineMethod (c$, "setIcon", 
44114 function (icon) {
44115 var oldValue = this.defaultIcon;
44116 this.defaultIcon = icon;
44117 if ((this.defaultIcon !== oldValue) && !this.disabledIconSet) {
44118 this.disabledIcon = null;
44119 }this.firePropertyChangeObject ("icon", oldValue, this.defaultIcon);
44120 if (this.defaultIcon !== oldValue) {
44121 if ((this.defaultIcon == null) || (oldValue == null) || (this.defaultIcon.getIconWidth () != oldValue.getIconWidth ()) || (this.defaultIcon.getIconHeight () != oldValue.getIconHeight ())) {
44122 this.revalidate ();
44123 }this.repaint ();
44124 }}, "javax.swing.Icon");
44125 Clazz_defineMethod (c$, "getDisabledIcon", 
44126 function () {
44127 if (!this.disabledIconSet && this.disabledIcon == null && this.defaultIcon != null) {
44128 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.defaultIcon);
44129 if (this.disabledIcon != null) {
44130 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
44131 }}return this.disabledIcon;
44132 });
44133 Clazz_defineMethod (c$, "setDisabledIcon", 
44134 function (disabledIcon) {
44135 var oldValue = this.disabledIcon;
44136 this.disabledIcon = disabledIcon;
44137 this.disabledIconSet = (disabledIcon != null);
44138 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
44139 if (disabledIcon !== oldValue) {
44140 if (disabledIcon == null || oldValue == null || disabledIcon.getIconWidth () != oldValue.getIconWidth () || disabledIcon.getIconHeight () != oldValue.getIconHeight ()) {
44141 this.revalidate ();
44142 }if (!this.isEnabled ()) {
44143 this.repaint ();
44144 }}}, "javax.swing.Icon");
44145 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44146 function (key) {
44147 var oldKey = this.mnemonic;
44148 this.mnemonic = key;
44149 this.firePropertyChangeInt ("displayedMnemonic", oldKey, this.mnemonic);
44150 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (this.getText (), this.mnemonic));
44151 if (key != oldKey) {
44152 this.revalidate ();
44153 this.repaint ();
44154 }}, "~N");
44155 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44156 function (aChar) {
44157 var vk = (aChar).charCodeAt (0);
44158 if (vk >= 97 && vk <= 122) vk -= (32);
44159 this.setDisplayedMnemonic (vk);
44160 }, "~S");
44161 Clazz_defineMethod (c$, "getDisplayedMnemonic", 
44162 function () {
44163 return this.mnemonic;
44164 });
44165 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
44166 function (index) {
44167 var oldValue = this.mnemonicIndex;
44168 if (index == -1) {
44169 this.mnemonicIndex = -1;
44170 } else {
44171 var text = this.getText ();
44172 var textLength = (text == null) ? 0 : text.length;
44173 if (index < -1 || index >= textLength) {
44174 throw  new IllegalArgumentException ("index == " + index);
44175 }}this.mnemonicIndex = index;
44176 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
44177 if (index != oldValue) {
44178 this.revalidate ();
44179 this.repaint ();
44180 }}, "~N");
44181 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
44182 function () {
44183 return this.mnemonicIndex;
44184 });
44185 Clazz_defineMethod (c$, "checkHorizontalKey", 
44186 function (key, message) {
44187 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
44188 return key;
44189 } else {
44190 throw  new IllegalArgumentException (message);
44191 }}, "~N,~S");
44192 Clazz_defineMethod (c$, "checkVerticalKey", 
44193 function (key, message) {
44194 if ((key == 1) || (key == 0) || (key == 3)) {
44195 return key;
44196 } else {
44197 throw  new IllegalArgumentException (message);
44198 }}, "~N,~S");
44199 Clazz_defineMethod (c$, "getIconTextGap", 
44200 function () {
44201 return this.iconTextGap;
44202 });
44203 Clazz_defineMethod (c$, "setIconTextGap", 
44204 function (iconTextGap) {
44205 var oldValue = this.iconTextGap;
44206 this.iconTextGap = iconTextGap;
44207 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
44208 if (iconTextGap != oldValue) {
44209 this.revalidate ();
44210 this.repaint ();
44211 }}, "~N");
44212 Clazz_defineMethod (c$, "getVerticalAlignment", 
44213 function () {
44214 return this.verticalAlignment;
44215 });
44216 Clazz_defineMethod (c$, "setVerticalAlignment", 
44217 function (alignment) {
44218 if (alignment == this.verticalAlignment) return;
44219 var oldValue = this.verticalAlignment;
44220 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
44221 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
44222 this.repaint ();
44223 }, "~N");
44224 Clazz_defineMethod (c$, "getHorizontalAlignment", 
44225 function () {
44226 return this.horizontalAlignment;
44227 });
44228 Clazz_defineMethod (c$, "setHorizontalAlignment", 
44229 function (alignment) {
44230 if (alignment == this.horizontalAlignment) return;
44231 var oldValue = this.horizontalAlignment;
44232 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
44233 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
44234 this.repaint ();
44235 }, "~N");
44236 Clazz_defineMethod (c$, "getVerticalTextPosition", 
44237 function () {
44238 return this.verticalTextPosition;
44239 });
44240 Clazz_defineMethod (c$, "setVerticalTextPosition", 
44241 function (textPosition) {
44242 if (textPosition == this.verticalTextPosition) return;
44243 var old = this.verticalTextPosition;
44244 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
44245 this.firePropertyChangeInt ("verticalTextPosition", old, this.verticalTextPosition);
44246 this.revalidate ();
44247 this.repaint ();
44248 }, "~N");
44249 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
44250 function () {
44251 return this.horizontalTextPosition;
44252 });
44253 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
44254 function (textPosition) {
44255 var old = this.horizontalTextPosition;
44256 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
44257 this.firePropertyChangeInt ("horizontalTextPosition", old, this.horizontalTextPosition);
44258 this.revalidate ();
44259 this.repaint ();
44260 }, "~N");
44261 Clazz_defineMethod (c$, "imageUpdate", 
44262 function (img, infoflags, x, y, w, h) {
44263 if (!this.isShowing () || !javax.swing.SwingUtilities.doesIconReferenceImage (this.getIcon (), img) && !javax.swing.SwingUtilities.doesIconReferenceImage (this.disabledIcon, img)) {
44264 return false;
44265 }return Clazz_superCall (this, javax.swing.JLabel, "imageUpdate", [img, infoflags, x, y, w, h]);
44266 }, "java.awt.Image,~N,~N,~N,~N,~N");
44267 Clazz_defineMethod (c$, "paramString", 
44268 function () {
44269 var textString = (this.text != null ? this.text : "");
44270 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
44271 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
44272 var labelForString = (this.labelFor != null ? this.labelFor.toString () : "");
44273 var verticalAlignmentString;
44274 if (this.verticalAlignment == 1) {
44275 verticalAlignmentString = "TOP";
44276 } else if (this.verticalAlignment == 0) {
44277 verticalAlignmentString = "CENTER";
44278 } else if (this.verticalAlignment == 3) {
44279 verticalAlignmentString = "BOTTOM";
44280 } else verticalAlignmentString = "";
44281 var horizontalAlignmentString;
44282 if (this.horizontalAlignment == 2) {
44283 horizontalAlignmentString = "LEFT";
44284 } else if (this.horizontalAlignment == 0) {
44285 horizontalAlignmentString = "CENTER";
44286 } else if (this.horizontalAlignment == 4) {
44287 horizontalAlignmentString = "RIGHT";
44288 } else if (this.horizontalAlignment == 10) {
44289 horizontalAlignmentString = "LEADING";
44290 } else if (this.horizontalAlignment == 11) {
44291 horizontalAlignmentString = "TRAILING";
44292 } else horizontalAlignmentString = "";
44293 var verticalTextPositionString;
44294 if (this.verticalTextPosition == 1) {
44295 verticalTextPositionString = "TOP";
44296 } else if (this.verticalTextPosition == 0) {
44297 verticalTextPositionString = "CENTER";
44298 } else if (this.verticalTextPosition == 3) {
44299 verticalTextPositionString = "BOTTOM";
44300 } else verticalTextPositionString = "";
44301 var horizontalTextPositionString;
44302 if (this.horizontalTextPosition == 2) {
44303 horizontalTextPositionString = "LEFT";
44304 } else if (this.horizontalTextPosition == 0) {
44305 horizontalTextPositionString = "CENTER";
44306 } else if (this.horizontalTextPosition == 4) {
44307 horizontalTextPositionString = "RIGHT";
44308 } else if (this.horizontalTextPosition == 10) {
44309 horizontalTextPositionString = "LEADING";
44310 } else if (this.horizontalTextPosition == 11) {
44311 horizontalTextPositionString = "TRAILING";
44312 } else horizontalTextPositionString = "";
44313 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;
44314 });
44315 Clazz_defineMethod (c$, "getLabelFor", 
44316 function () {
44317 return this.labelFor;
44318 });
44319 Clazz_defineMethod (c$, "setLabelFor", 
44320 function (c) {
44321 var oldC = this.labelFor;
44322 this.labelFor = c;
44323 this.firePropertyChangeObject ("labelFor", oldC, c);
44324 if (Clazz_instanceOf (oldC, javax.swing.JComponent)) {
44325 (oldC).putClientProperty ("labeledBy", null);
44326 }if (Clazz_instanceOf (c, javax.swing.JComponent)) {
44327 (c).putClientProperty ("labeledBy", this);
44328 }}, "java.awt.Component");
44329 Clazz_defineStatics (c$,
44330 "$uiClassID", "LabelUI",
44331 "LABELED_BY_PROPERTY", "labeledBy");
44332 });
44333 Clazz_declarePackage ("javax.swing.border");
44334 Clazz_declareInterface (javax.swing.border, "Border");
44335 Clazz_declarePackage ("javax.swing");
44336 Clazz_declareInterface (javax.swing, "RootPaneContainer");
44337 Clazz_declarePackage ("javax.swing.event");
44338 Clazz_load (["java.awt.event.MouseEvent"], "javax.swing.event.MenuDragMouseEvent", null, function () {
44339 c$ = Clazz_decorateAsClass (function () {
44340 this.path = null;
44341 this.manager = null;
44342 Clazz_instantialize (this, arguments);
44343 }, javax.swing.event, "MenuDragMouseEvent", java.awt.event.MouseEvent);
44344 Clazz_makeConstructor (c$, 
44345 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, p, m) {
44346 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, clickCount, popupTrigger]);
44347 this.path = p;
44348 this.manager = m;
44349 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44350 Clazz_makeConstructor (c$, 
44351 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, p, m) {
44352 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
44353 this.path = p;
44354 this.manager = m;
44355 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44356 Clazz_defineMethod (c$, "getPath", 
44357 function () {
44358 return this.path;
44359 });
44360 Clazz_defineMethod (c$, "getMenuSelectionManager", 
44361 function () {
44362 return this.manager;
44363 });
44364 });
44365 Clazz_declarePackage ("jssun.swing");
44366 Clazz_load (["javax.swing.Action"], "jssun.swing.UIAction", null, function () {
44367 c$ = Clazz_decorateAsClass (function () {
44368 this.name = null;
44369 Clazz_instantialize (this, arguments);
44370 }, jssun.swing, "UIAction", null, javax.swing.Action);
44371 Clazz_makeConstructor (c$, 
44372 function (name) {
44373 this.name = name;
44374 }, "~S");
44375 Clazz_defineMethod (c$, "getName", 
44376 function () {
44377 return this.name;
44378 });
44379 Clazz_overrideMethod (c$, "getValue", 
44380 function (key) {
44381 if (key === "Name") {
44382 return this.name;
44383 }return null;
44384 }, "~S");
44385 Clazz_overrideMethod (c$, "putValue", 
44386 function (key, value) {
44387 }, "~S,~O");
44388 Clazz_overrideMethod (c$, "setEnabled", 
44389 function (b) {
44390 }, "~B");
44391 Clazz_defineMethod (c$, "isEnabled", 
44392 function () {
44393 return this.isEnabled (null);
44394 });
44395 Clazz_defineMethod (c$, "isEnabled", 
44396 function (sender) {
44397 return true;
44398 }, "~O");
44399 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
44400 function (listener) {
44401 }, "java.beans.PropertyChangeListener");
44402 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
44403 function (listener) {
44404 }, "java.beans.PropertyChangeListener");
44405 });
44406 Clazz_declarePackage ("jssun.awt");
44407 Clazz_declareInterface (jssun.awt, "RequestFocusController");
44408 Clazz_declarePackage ("javax.swing");
44409 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 () {
44410 c$ = Clazz_decorateAsClass (function () {
44411 this.firstInvisibleAncestor = null;
44412 this.listenerList = null;
44413 this.root = null;
44414 Clazz_instantialize (this, arguments);
44415 }, javax.swing, "AncestorNotifier", null, [java.awt.event.ComponentListener, java.beans.PropertyChangeListener]);
44416 Clazz_prepareFields (c$, function () {
44417 this.listenerList =  new javax.swing.event.EventListenerList ();
44418 });
44419 Clazz_makeConstructor (c$, 
44420 function (root) {
44421 this.root = root;
44422 this.addListeners (root, true);
44423 }, "javax.swing.JComponent");
44424 Clazz_defineMethod (c$, "addAncestorListener", 
44425 function (l) {
44426 this.listenerList.add (javax.swing.event.AncestorListener, l);
44427 }, "javax.swing.event.AncestorListener");
44428 Clazz_defineMethod (c$, "removeAncestorListener", 
44429 function (l) {
44430 this.listenerList.remove (javax.swing.event.AncestorListener, l);
44431 }, "javax.swing.event.AncestorListener");
44432 Clazz_defineMethod (c$, "getAncestorListeners", 
44433 function () {
44434 return this.listenerList.getListeners (javax.swing.event.AncestorListener);
44435 });
44436 Clazz_defineMethod (c$, "fireAncestorAdded", 
44437 function (source, id, ancestor, ancestorParent) {
44438 var listeners = this.listenerList.getListenerList ();
44439 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44440 if (listeners[i] === javax.swing.event.AncestorListener) {
44441 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44442 (listeners[i + 1]).ancestorAdded (ancestorEvent);
44443 }}
44444 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44445 Clazz_defineMethod (c$, "fireAncestorRemoved", 
44446 function (source, id, ancestor, ancestorParent) {
44447 var listeners = this.listenerList.getListenerList ();
44448 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44449 if (listeners[i] === javax.swing.event.AncestorListener) {
44450 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44451 (listeners[i + 1]).ancestorRemoved (ancestorEvent);
44452 }}
44453 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44454 Clazz_defineMethod (c$, "fireAncestorMoved", 
44455 function (source, id, ancestor, ancestorParent) {
44456 var listeners = this.listenerList.getListenerList ();
44457 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44458 if (listeners[i] === javax.swing.event.AncestorListener) {
44459 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44460 (listeners[i + 1]).ancestorMoved (ancestorEvent);
44461 }}
44462 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44463 Clazz_defineMethod (c$, "removeAllListeners", 
44464 function () {
44465 this.removeListeners (this.root);
44466 });
44467 Clazz_defineMethod (c$, "addListeners", 
44468 function (ancestor, addToFirst) {
44469 var a;
44470 this.firstInvisibleAncestor = null;
44471 for (a = ancestor; this.firstInvisibleAncestor == null; a = a.getParent ()) {
44472 if (addToFirst || a !== ancestor) {
44473 a.addComponentListener (this);
44474 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44475 var jAncestor = a;
44476 jAncestor.addPropertyChangeListener (this);
44477 }}if (!a.isVisible () || a.getParent () == null || Clazz_instanceOf (a, java.awt.Window)) {
44478 this.firstInvisibleAncestor = a;
44479 }}
44480 if (Clazz_instanceOf (this.firstInvisibleAncestor, java.awt.Window) && this.firstInvisibleAncestor.isVisible ()) {
44481 this.firstInvisibleAncestor = null;
44482 }}, "java.awt.Component,~B");
44483 Clazz_defineMethod (c$, "removeListeners", 
44484 function (ancestor) {
44485 var a;
44486 for (a = ancestor; a != null; a = a.getParent ()) {
44487 a.removeComponentListener (this);
44488 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44489 var jAncestor = a;
44490 jAncestor.removePropertyChangeListener (this);
44491 }if (a === this.firstInvisibleAncestor || Clazz_instanceOf (a, java.awt.Window)) {
44492 break;
44493 }}
44494 }, "java.awt.Component");
44495 Clazz_overrideMethod (c$, "componentResized", 
44496 function (e) {
44497 }, "java.awt.event.ComponentEvent");
44498 Clazz_overrideMethod (c$, "componentMoved", 
44499 function (e) {
44500 var source = e.getComponent ();
44501 this.fireAncestorMoved (this.root, 3, source, source.getParent ());
44502 }, "java.awt.event.ComponentEvent");
44503 Clazz_overrideMethod (c$, "componentShown", 
44504 function (e) {
44505 var ancestor = e.getComponent ();
44506 if (ancestor === this.firstInvisibleAncestor) {
44507 this.addListeners (ancestor, false);
44508 if (this.firstInvisibleAncestor == null) {
44509 this.fireAncestorAdded (this.root, 1, ancestor, ancestor.getParent ());
44510 }}}, "java.awt.event.ComponentEvent");
44511 Clazz_overrideMethod (c$, "componentHidden", 
44512 function (e) {
44513 var ancestor = e.getComponent ();
44514 var needsNotify = this.firstInvisibleAncestor == null;
44515 if (!(Clazz_instanceOf (ancestor, java.awt.Window))) {
44516 this.removeListeners (ancestor.getParent ());
44517 }this.firstInvisibleAncestor = ancestor;
44518 if (needsNotify) {
44519 this.fireAncestorRemoved (this.root, 2, ancestor, ancestor.getParent ());
44520 }}, "java.awt.event.ComponentEvent");
44521 Clazz_overrideMethod (c$, "propertyChange", 
44522 function (evt) {
44523 var s = evt.getPropertyName ();
44524 if (s != null && (s.equals ("parent") || s.equals ("ancestor"))) {
44525 var component = evt.getSource ();
44526 if (evt.getNewValue () != null) {
44527 if (component === this.firstInvisibleAncestor) {
44528 this.addListeners (component, false);
44529 if (this.firstInvisibleAncestor == null) {
44530 this.fireAncestorAdded (this.root, 1, component, component.getParent ());
44531 }}} else {
44532 var needsNotify = this.firstInvisibleAncestor == null;
44533 var oldParent = evt.getOldValue ();
44534 this.removeListeners (oldParent);
44535 this.firstInvisibleAncestor = component;
44536 if (needsNotify) {
44537 this.fireAncestorRemoved (this.root, 2, component, oldParent);
44538 }}}}, "java.beans.PropertyChangeEvent");
44539 });
44540 Clazz_declarePackage ("javax.swing.event");
44541 Clazz_load (["java.awt.AWTEvent"], "javax.swing.event.AncestorEvent", null, function () {
44542 c$ = Clazz_decorateAsClass (function () {
44543 this.ancestor = null;
44544 this.ancestorParent = null;
44545 Clazz_instantialize (this, arguments);
44546 }, javax.swing.event, "AncestorEvent", java.awt.AWTEvent);
44547 Clazz_makeConstructor (c$, 
44548 function (source, id, ancestor, ancestorParent) {
44549 Clazz_superConstructor (this, javax.swing.event.AncestorEvent, [source, id]);
44550 this.ancestor = ancestor;
44551 this.ancestorParent = ancestorParent;
44552 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44553 Clazz_defineMethod (c$, "getAncestor", 
44554 function () {
44555 return this.ancestor;
44556 });
44557 Clazz_defineMethod (c$, "getAncestorParent", 
44558 function () {
44559 return this.ancestorParent;
44560 });
44561 Clazz_defineMethod (c$, "getComponent", 
44562 function () {
44563 return this.getSource ();
44564 });
44565 Clazz_defineStatics (c$,
44566 "ANCESTOR_ADDED", 1,
44567 "ANCESTOR_REMOVED", 2,
44568 "ANCESTOR_MOVED", 3);
44569 });
44570 Clazz_declarePackage ("javax.swing.event");
44571 Clazz_load (["java.util.EventListener"], "javax.swing.event.AncestorListener", null, function () {
44572 Clazz_declareInterface (javax.swing.event, "AncestorListener", java.util.EventListener);
44573 });
44574 Clazz_declarePackage ("javax.swing");
44575 Clazz_load (["java.lang.Enum"], "javax.swing.ClientPropertyKey", null, function () {
44576 c$ = Clazz_declareType (javax.swing, "ClientPropertyKey", Enum);
44577 Clazz_makeConstructor (c$, 
44578  function (reportValueNotSerializable) {
44579 }, "~B");
44580 Clazz_defineEnumConstant (c$, "JComponent_INPUT_VERIFIER", 0, [true]);
44581 Clazz_defineEnumConstant (c$, "JComponent_TRANSFER_HANDLER", 1, [true]);
44582 Clazz_defineEnumConstant (c$, "JComponent_ANCESTOR_NOTIFIER", 2, [true]);
44583 Clazz_defineEnumConstant (c$, "PopupFactory_FORCE_HEAVYWEIGHT_POPUP", 3, [true]);
44584 });
44585 Clazz_declarePackage ("javax.swing");
44586 Clazz_load (["java.awt.Dialog", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JDialog", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
44587 c$ = Clazz_decorateAsClass (function () {
44588 this.defaultCloseOperation = 1;
44589 this.rootPane = null;
44590 this.rootPaneCheckingEnabled = false;
44591 this.transferHandler = null;
44592 Clazz_instantialize (this, arguments);
44593 }, javax.swing, "JDialog", java.awt.Dialog, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
44594 Clazz_makeConstructor (c$, 
44595 function () {
44596 this.construct (Clazz_castNullAs ("java.awt.Frame"), false);
44597 });
44598 Clazz_makeConstructor (c$, 
44599 function (owner) {
44600 this.construct (owner, false);
44601 }, "java.awt.Frame");
44602 Clazz_makeConstructor (c$, 
44603 function (owner, modal) {
44604 this.construct (owner, null, modal);
44605 }, "java.awt.Frame,~B");
44606 Clazz_makeConstructor (c$, 
44607 function (owner, title) {
44608 this.construct (owner, title, false);
44609 }, "java.awt.Frame,~S");
44610 Clazz_makeConstructor (c$, 
44611 function (owner, title, modal) {
44612 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal]);
44613 if (owner == null) {
44614 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44615 this.addWindowListener (ownerShutdownListener);
44616 }this.dialogInit ();
44617 }, "java.awt.Frame,~S,~B");
44618 Clazz_makeConstructor (c$, 
44619 function (owner, title, modal, gc) {
44620 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal, gc]);
44621 if (owner == null) {
44622 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44623 this.addWindowListener (ownerShutdownListener);
44624 }this.dialogInit ();
44625 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44626 Clazz_makeConstructor (c$, 
44627 function (owner) {
44628 this.construct (owner, false);
44629 }, "java.awt.Dialog");
44630 Clazz_makeConstructor (c$, 
44631 function (owner, modal) {
44632 this.construct (owner, null, modal);
44633 }, "java.awt.Dialog,~B");
44634 Clazz_makeConstructor (c$, 
44635 function (owner, title) {
44636 this.construct (owner, title, false);
44637 }, "java.awt.Dialog,~S");
44638 Clazz_makeConstructor (c$, 
44639 function (owner, title, modal) {
44640 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal]);
44641 this.dialogInit ();
44642 }, "java.awt.Dialog,~S,~B");
44643 Clazz_makeConstructor (c$, 
44644 function (owner, title, modal, gc) {
44645 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal, gc]);
44646 this.dialogInit ();
44647 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44648 Clazz_makeConstructor (c$, 
44649 function (owner) {
44650 this.construct (owner, java.awt.Dialog.ModalityType.MODELESS);
44651 }, "java.awt.Window");
44652 Clazz_makeConstructor (c$, 
44653 function (owner, modalityType) {
44654 this.construct (owner, null, modalityType);
44655 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44656 Clazz_makeConstructor (c$, 
44657 function (owner, title) {
44658 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44659 }, "java.awt.Window,~S");
44660 Clazz_makeConstructor (c$, 
44661 function (owner, title, modalityType) {
44662 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType]);
44663 this.dialogInit ();
44664 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44665 Clazz_makeConstructor (c$, 
44666 function (owner, title, modalityType, gc) {
44667 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType, gc]);
44668 this.dialogInit ();
44669 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44670 Clazz_defineMethod (c$, "dialogInit", 
44671 function () {
44672 this.enableEvents (72);
44673 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
44674 this.setRootPane (this.createRootPane ());
44675 this.setRootPaneCheckingEnabled (true);
44676 if (javax.swing.JDialog.isDefaultLookAndFeelDecorated ()) {
44677 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
44678 if (supportsWindowDecorations) {
44679 this.setUndecorated (true);
44680 this.getRootPane ().setWindowDecorationStyle (2);
44681 }}});
44682 Clazz_defineMethod (c$, "createRootPane", 
44683 function () {
44684 var rp =  new javax.swing.JRootPane ();
44685 rp.setOpaque (true);
44686 return rp;
44687 });
44688 Clazz_defineMethod (c$, "processWindowEvent", 
44689 function (e) {
44690 Clazz_superCall (this, javax.swing.JDialog, "processWindowEvent", [e]);
44691 if (e.getID () == 201) {
44692 switch (this.defaultCloseOperation) {
44693 case 1:
44694 this.setVisible (false);
44695 break;
44696 case 2:
44697 this.dispose ();
44698 break;
44699 case 0:
44700 default:
44701 break;
44702 }
44703 }}, "java.awt.event.WindowEvent");
44704 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
44705 function (operation) {
44706 if (operation != 0 && operation != 1 && operation != 2) {
44707 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");
44708 }var oldValue = this.defaultCloseOperation;
44709 this.defaultCloseOperation = operation;
44710 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
44711 }, "~N");
44712 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
44713 function () {
44714 return this.defaultCloseOperation;
44715 });
44716 Clazz_defineMethod (c$, "setTransferHandler", 
44717 function (newHandler) {
44718 var oldHandler = this.transferHandler;
44719 this.transferHandler = newHandler;
44720 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
44721 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
44722 }, "javax.swing.TransferHandler");
44723 Clazz_defineMethod (c$, "getTransferHandler", 
44724 function () {
44725 return this.transferHandler;
44726 });
44727 Clazz_overrideMethod (c$, "update", 
44728 function (g) {
44729 this.paint (g);
44730 }, "java.awt.Graphics");
44731 Clazz_defineMethod (c$, "setJMenuBar", 
44732 function (menu) {
44733 this.getRootPane ().setMenuBar (menu);
44734 }, "javax.swing.JMenuBar");
44735 Clazz_defineMethod (c$, "getJMenuBar", 
44736 function () {
44737 return this.getRootPane ().getMenuBar ();
44738 });
44739 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
44740 function () {
44741 return this.rootPaneCheckingEnabled;
44742 });
44743 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
44744 function (enabled) {
44745 this.rootPaneCheckingEnabled = enabled;
44746 }, "~B");
44747 Clazz_overrideMethod (c$, "addImpl", 
44748 function (comp, constraints, index) {
44749 if (this.isRootPaneCheckingEnabled ()) {
44750 return this.getContentPane ().add (comp, constraints, index);
44751 }return this.addImplSAEM (comp, constraints, index);
44752 }, "java.awt.Component,~O,~N");
44753 Clazz_defineMethod (c$, "remove", 
44754 function (comp) {
44755 if (comp === this.rootPane) {
44756 this.removeChild (comp);
44757 } else {
44758 this.getContentPane ().removeChild (comp);
44759 }}, "java.awt.Component");
44760 Clazz_defineMethod (c$, "setLayout", 
44761 function (manager) {
44762 if (this.isRootPaneCheckingEnabled ()) {
44763 this.getContentPane ().setLayout (manager);
44764 } else {
44765 Clazz_superCall (this, javax.swing.JDialog, "setLayout", [manager]);
44766 }}, "java.awt.LayoutManager");
44767 Clazz_overrideMethod (c$, "getRootPane", 
44768 function () {
44769 return this.rootPane;
44770 });
44771 Clazz_defineMethod (c$, "setRootPane", 
44772 function (root) {
44773 if (this.rootPane != null) {
44774 this.remove (this.rootPane);
44775 }this.rootPane = root;
44776 if (this.rootPane != null) {
44777 var checkingEnabled = this.isRootPaneCheckingEnabled ();
44778 try {
44779 this.setRootPaneCheckingEnabled (false);
44780 this.add (this.rootPane, "Center");
44781 } finally {
44782 this.setRootPaneCheckingEnabled (checkingEnabled);
44783 }
44784 }}, "javax.swing.JRootPane");
44785 Clazz_overrideMethod (c$, "getContentPane", 
44786 function () {
44787 return this.getRootPane ().getContentPane ();
44788 });
44789 Clazz_overrideMethod (c$, "setContentPane", 
44790 function (contentPane) {
44791 this.getRootPane ().setContentPane (contentPane);
44792 }, "java.awt.Container");
44793 Clazz_overrideMethod (c$, "getLayeredPane", 
44794 function () {
44795 return this.getRootPane ().getLayeredPane ();
44796 });
44797 Clazz_overrideMethod (c$, "setLayeredPane", 
44798 function (layeredPane) {
44799 this.getRootPane ().setLayeredPane (layeredPane);
44800 }, "javax.swing.JLayeredPane");
44801 Clazz_overrideMethod (c$, "getGlassPane", 
44802 function () {
44803 return this.getRootPane ().getGlassPane ();
44804 });
44805 Clazz_overrideMethod (c$, "setGlassPane", 
44806 function (glassPane) {
44807 this.getRootPane ().setGlassPane (glassPane);
44808 }, "java.awt.Component");
44809 Clazz_defineMethod (c$, "getGraphics", 
44810 function () {
44811 javax.swing.JComponent.getGraphicsInvoked (this);
44812 return Clazz_superCall (this, javax.swing.JDialog, "getGraphics", []);
44813 });
44814 Clazz_defineMethod (c$, "repaint", 
44815 function (time, x, y, width, height) {
44816 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
44817 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
44818 } else {
44819 Clazz_superCall (this, javax.swing.JDialog, "repaint", [time, x, y, width, height]);
44820 }}, "~N,~N,~N,~N,~N");
44821 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
44822 function (defaultLookAndFeelDecorated) {
44823 if (defaultLookAndFeelDecorated) {
44824 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
44825 } else {
44826 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
44827 }}, "~B");
44828 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
44829 function () {
44830 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JDialog.defaultLookAndFeelDecoratedKey);
44831 if (defaultLookAndFeelDecorated == null) {
44832 defaultLookAndFeelDecorated = Boolean.FALSE;
44833 }return defaultLookAndFeelDecorated.booleanValue ();
44834 });
44835 Clazz_defineMethod (c$, "paramString", 
44836 function () {
44837 var defaultCloseOperationString;
44838 if (this.defaultCloseOperation == 1) {
44839 defaultCloseOperationString = "HIDE_ON_CLOSE";
44840 } else if (this.defaultCloseOperation == 2) {
44841 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
44842 } else if (this.defaultCloseOperation == 0) {
44843 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
44844 } else defaultCloseOperationString = "";
44845 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
44846 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
44847 return Clazz_superCall (this, javax.swing.JDialog, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
44848 });
44849 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
44850 });
44851 Clazz_declarePackage ("java.awt");
44852 Clazz_load (["java.lang.Enum", "java.awt.Window"], "java.awt.Dialog", ["java.lang.IllegalArgumentException", "java.awt.Frame", "$.IllegalComponentStateException"], function () {
44853 c$ = Clazz_decorateAsClass (function () {
44854 this.resizable = true;
44855 this.undecorated = false;
44856 this.modal = false;
44857 this.modalityType = null;
44858 this.title = null;
44859 this.isInHide = false;
44860 this.isInDispose = false;
44861 Clazz_instantialize (this, arguments);
44862 }, java.awt, "Dialog", java.awt.Window);
44863 Clazz_makeConstructor (c$, 
44864 function (owner) {
44865 this.construct (owner, "", false);
44866 }, "java.awt.Frame");
44867 Clazz_makeConstructor (c$, 
44868 function (owner, modal) {
44869 this.construct (owner, "", modal);
44870 }, "java.awt.Frame,~B");
44871 Clazz_makeConstructor (c$, 
44872 function (owner, title) {
44873 this.construct (owner, title, false);
44874 }, "java.awt.Frame,~S");
44875 Clazz_makeConstructor (c$, 
44876 function (owner, title, modal) {
44877 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44878 }, "java.awt.Frame,~S,~B");
44879 Clazz_makeConstructor (c$, 
44880 function (owner, title, modal, gc) {
44881 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44882 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44883 Clazz_makeConstructor (c$, 
44884 function (owner) {
44885 this.construct (owner, "", false);
44886 }, "java.awt.Dialog");
44887 Clazz_makeConstructor (c$, 
44888 function (owner, title) {
44889 this.construct (owner, title, false);
44890 }, "java.awt.Dialog,~S");
44891 Clazz_makeConstructor (c$, 
44892 function (owner, title, modal) {
44893 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44894 }, "java.awt.Dialog,~S,~B");
44895 Clazz_makeConstructor (c$, 
44896 function (owner, title, modal, gc) {
44897 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44898 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44899 Clazz_makeConstructor (c$, 
44900 function (owner) {
44901 this.construct (owner, null, java.awt.Dialog.ModalityType.MODELESS);
44902 }, "java.awt.Window");
44903 Clazz_makeConstructor (c$, 
44904 function (owner, title) {
44905 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44906 }, "java.awt.Window,~S");
44907 Clazz_makeConstructor (c$, 
44908 function (owner, modalityType) {
44909 this.construct (owner, null, modalityType);
44910 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44911 Clazz_makeConstructor (c$, 
44912 function (owner, title, modalityType) {
44913 Clazz_superConstructor (this, java.awt.Dialog, [owner]);
44914 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44915 throw  new IllegalArgumentException ("Wrong parent window");
44916 }this.title = title;
44917 this.setModalityType (modalityType);
44918 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44919 Clazz_makeConstructor (c$, 
44920 function (owner, title, modalityType, gc) {
44921 Clazz_superConstructor (this, java.awt.Dialog, [owner, gc]);
44922 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44923 throw  new IllegalArgumentException ("wrong owner window");
44924 }this.title = title;
44925 this.setModalityType (modalityType);
44926 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44927 Clazz_overrideMethod (c$, "constructComponentName", 
44928 function () {
44929 {
44930 return "dialog" + java.awt.Dialog.$nameCounter++;
44931 }});
44932 Clazz_defineMethod (c$, "addNotify", 
44933 function () {
44934 {
44935 if (this.parent != null) {
44936 this.parent.addNotify ();
44937 }Clazz_superCall (this, java.awt.Dialog, "addNotify", []);
44938 }});
44939 Clazz_defineMethod (c$, "isModal", 
44940 function () {
44941 return this.isModal_NoClientCode ();
44942 });
44943 Clazz_defineMethod (c$, "isModal_NoClientCode", 
44944 function () {
44945 return this.modalityType !== java.awt.Dialog.ModalityType.MODELESS;
44946 });
44947 Clazz_defineMethod (c$, "setModal", 
44948 function (modal) {
44949 this.modal = modal;
44950 this.setModalityType (modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44951 }, "~B");
44952 Clazz_defineMethod (c$, "getModalityType", 
44953 function () {
44954 return this.modalityType;
44955 });
44956 Clazz_defineMethod (c$, "setModalityType", 
44957 function (type) {
44958 if (type == null) {
44959 type = java.awt.Dialog.ModalityType.MODELESS;
44960 }if (this.modalityType === type) {
44961 return;
44962 }this.checkModalityPermission (type);
44963 this.modalityType = type;
44964 this.modal = (this.modalityType !== java.awt.Dialog.ModalityType.MODELESS);
44965 }, "java.awt.Dialog.ModalityType");
44966 Clazz_defineMethod (c$, "getTitle", 
44967 function () {
44968 return this.title;
44969 });
44970 Clazz_defineMethod (c$, "setTitle", 
44971 function (title) {
44972 var oldTitle = this.title;
44973 {
44974 this.title = title;
44975 }this.firePropertyChangeObject ("title", oldTitle, title);
44976 }, "~S");
44977 Clazz_defineMethod (c$, "show", 
44978 function () {
44979 });
44980 Clazz_defineMethod (c$, "modalityPushed", 
44981 function () {
44982 });
44983 Clazz_defineMethod (c$, "modalityPopped", 
44984 function () {
44985 });
44986 Clazz_defineMethod (c$, "interruptBlocking", 
44987 function () {
44988 if (this.isModal ()) {
44989 this.disposeImpl ();
44990 } else if (this.windowClosingException != null) {
44991 this.windowClosingException.fillInStackTrace ();
44992 this.windowClosingException.printStackTrace ();
44993 this.windowClosingException = null;
44994 }});
44995 Clazz_defineMethod (c$, "hideAndDisposePreHandler", 
44996  function () {
44997 this.isInHide = true;
44998 });
44999 Clazz_defineMethod (c$, "hideAndDisposeHandler", 
45000  function () {
45001 this.isInHide = false;
45002 });
45003 Clazz_defineMethod (c$, "hide", 
45004 function () {
45005 this.hideAndDisposePreHandler ();
45006 Clazz_superCall (this, java.awt.Dialog, "hide", []);
45007 if (!this.isInDispose) {
45008 this.hideAndDisposeHandler ();
45009 }});
45010 Clazz_defineMethod (c$, "doDispose", 
45011 function () {
45012 this.isInDispose = true;
45013 Clazz_superCall (this, java.awt.Dialog, "doDispose", []);
45014 this.hideAndDisposeHandler ();
45015 this.isInDispose = false;
45016 });
45017 Clazz_defineMethod (c$, "isResizable", 
45018 function () {
45019 return this.resizable;
45020 });
45021 Clazz_defineMethod (c$, "setResizable", 
45022 function (resizable) {
45023 var testvalid = false;
45024 {
45025 this.resizable = resizable;
45026 }if (testvalid) {
45027 this.invalidateIfValid ();
45028 }}, "~B");
45029 Clazz_defineMethod (c$, "setUndecorated", 
45030 function (undecorated) {
45031 {
45032 if (this.isDisplayable ()) {
45033 throw  new java.awt.IllegalComponentStateException ("The dialog is displayable.");
45034 }this.undecorated = undecorated;
45035 }}, "~B");
45036 Clazz_defineMethod (c$, "isUndecorated", 
45037 function () {
45038 return this.undecorated;
45039 });
45040 Clazz_defineMethod (c$, "paramString", 
45041 function () {
45042 var str = Clazz_superCall (this, java.awt.Dialog, "paramString", []) + "," + this.modalityType;
45043 if (this.title != null) {
45044 str += ",title=" + this.title;
45045 }return str;
45046 });
45047 Clazz_defineMethod (c$, "modalShow", 
45048 function () {
45049 });
45050 Clazz_defineMethod (c$, "modalHide", 
45051 function () {
45052 });
45053 Clazz_defineMethod (c$, "shouldBlock", 
45054 function (w) {
45055 if (!this.isVisible_NoClientCode () || (!w.isVisible_NoClientCode () && !w.isInShow) || this.isInHide || (w === this) || !this.isModal_NoClientCode ()) {
45056 return false;
45057 }if ((Clazz_instanceOf (w, java.awt.Dialog)) && (w).isInHide) {
45058 return false;
45059 }var blockerToCheck = this;
45060 while (blockerToCheck != null) {
45061 var c = w;
45062 while ((c != null) && (c !== blockerToCheck)) {
45063 c = c.getParent_NoClientCode ();
45064 }
45065 if (c === blockerToCheck) {
45066 return false;
45067 }blockerToCheck = blockerToCheck.getModalBlocker ();
45068 }
45069 switch (this.modalityType) {
45070 case java.awt.Dialog.ModalityType.MODELESS:
45071 return false;
45072 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
45073 if (w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
45074 var c = this;
45075 while ((c != null) && (c !== w)) {
45076 c = c.getParent_NoClientCode ();
45077 }
45078 return c === w;
45079 } else {
45080 return this.getDocumentRoot () === w.getDocumentRoot ();
45081 }case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
45082 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE) && (this.appContext === w.appContext);
45083 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
45084 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
45085 }
45086 return false;
45087 }, "java.awt.Window");
45088 Clazz_defineMethod (c$, "checkModalityPermission", 
45089  function (mt) {
45090 }, "java.awt.Dialog.ModalityType");
45091 Clazz_pu$h(self.c$);
45092 c$ = Clazz_declareType (java.awt.Dialog, "ModalityType", Enum);
45093 Clazz_defineEnumConstant (c$, "MODELESS", 0, []);
45094 Clazz_defineEnumConstant (c$, "DOCUMENT_MODAL", 1, []);
45095 Clazz_defineEnumConstant (c$, "APPLICATION_MODAL", 2, []);
45096 Clazz_defineEnumConstant (c$, "TOOLKIT_MODAL", 3, []);
45097 c$ = Clazz_p0p ();
45098 Clazz_pu$h(self.c$);
45099 c$ = Clazz_declareType (java.awt.Dialog, "ModalExclusionType", Enum);
45100 Clazz_defineEnumConstant (c$, "NO_EXCLUDE", 0, []);
45101 Clazz_defineEnumConstant (c$, "APPLICATION_EXCLUDE", 1, []);
45102 Clazz_defineEnumConstant (c$, "TOOLKIT_EXCLUDE", 2, []);
45103 c$ = Clazz_p0p ();
45104 c$.DEFAULT_MODALITY_TYPE = c$.prototype.DEFAULT_MODALITY_TYPE = java.awt.Dialog.ModalityType.APPLICATION_MODAL;
45105 Clazz_defineStatics (c$,
45106 "$base", "dialog",
45107 "$nameCounter", 0);
45108 });
45109 Clazz_declarePackage ("javax.swing");
45110 c$ = Clazz_declareInterface (javax.swing, "WindowConstants");
45111 Clazz_defineStatics (c$,
45112 "DO_NOTHING_ON_CLOSE", 0,
45113 "HIDE_ON_CLOSE", 1,
45114 "DISPOSE_ON_CLOSE", 2,
45115 "EXIT_ON_CLOSE", 3);
45116 Clazz_declarePackage ("javax.swing");
45117 Clazz_load (["java.awt.Frame", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JFrame", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
45118 c$ = Clazz_decorateAsClass (function () {
45119 this.defaultCloseOperation = 1;
45120 this.transferHandler = null;
45121 this.rootPane = null;
45122 this.rootPaneCheckingEnabled = false;
45123 Clazz_instantialize (this, arguments);
45124 }, javax.swing, "JFrame", java.awt.Frame, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
45125 Clazz_makeConstructor (c$, 
45126 function () {
45127 Clazz_superConstructor (this, javax.swing.JFrame);
45128 this.frameInit ();
45129 });
45130 Clazz_makeConstructor (c$, 
45131 function (gc) {
45132 Clazz_superConstructor (this, javax.swing.JFrame, [gc]);
45133 this.frameInit ();
45134 }, "java.awt.GraphicsConfiguration");
45135 Clazz_makeConstructor (c$, 
45136 function (title) {
45137 Clazz_superConstructor (this, javax.swing.JFrame, [title]);
45138 this.frameInit ();
45139 }, "~S");
45140 Clazz_makeConstructor (c$, 
45141 function (title, gc) {
45142 Clazz_superConstructor (this, javax.swing.JFrame, [title, gc]);
45143 this.frameInit ();
45144 }, "~S,java.awt.GraphicsConfiguration");
45145 Clazz_defineMethod (c$, "frameInit", 
45146 function () {
45147 this.enableEvents (72);
45148 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45149 this.setRootPane (this.createRootPane ());
45150 this.setBackground (javax.swing.UIManager.getColor ("control"));
45151 this.setRootPaneCheckingEnabled (true);
45152 if (javax.swing.JFrame.isDefaultLookAndFeelDecorated ()) {
45153 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
45154 if (supportsWindowDecorations) {
45155 this.setUndecorated (true);
45156 this.getRootPane ().setWindowDecorationStyle (1);
45157 }}});
45158 Clazz_defineMethod (c$, "createRootPane", 
45159 function () {
45160 var rp =  new javax.swing.JRootPane ();
45161 rp.setOpaque (true);
45162 return rp;
45163 });
45164 Clazz_defineMethod (c$, "processWindowEvent", 
45165 function (e) {
45166 Clazz_superCall (this, javax.swing.JFrame, "processWindowEvent", [e]);
45167 if (e.getID () == 201) {
45168 switch (this.defaultCloseOperation) {
45169 case 1:
45170 this.setVisible (false);
45171 break;
45172 case 2:
45173 this.dispose ();
45174 break;
45175 case 0:
45176 default:
45177 break;
45178 case 3:
45179 System.exit (0);
45180 break;
45181 }
45182 }}, "java.awt.event.WindowEvent");
45183 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
45184 function (operation) {
45185 if (operation != 0 && operation != 1 && operation != 2 && operation != 3) {
45186 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE");
45187 }if (this.defaultCloseOperation != operation) {
45188 if (operation == 3) {
45189 var security = System.getSecurityManager ();
45190 if (security != null) {
45191 security.checkExit (0);
45192 }}var oldValue = this.defaultCloseOperation;
45193 this.defaultCloseOperation = operation;
45194 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
45195 }}, "~N");
45196 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
45197 function () {
45198 return this.defaultCloseOperation;
45199 });
45200 Clazz_defineMethod (c$, "setTransferHandler", 
45201 function (newHandler) {
45202 var oldHandler = this.transferHandler;
45203 this.transferHandler = newHandler;
45204 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45205 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45206 }, "javax.swing.TransferHandler");
45207 Clazz_defineMethod (c$, "getTransferHandler", 
45208 function () {
45209 return this.transferHandler;
45210 });
45211 Clazz_overrideMethod (c$, "update", 
45212 function (g) {
45213 this.paint (g);
45214 }, "java.awt.Graphics");
45215 Clazz_defineMethod (c$, "setJMenuBar", 
45216 function (menubar) {
45217 this.getRootPane ().setMenuBar (menubar);
45218 }, "javax.swing.JMenuBar");
45219 Clazz_defineMethod (c$, "getJMenuBar", 
45220 function () {
45221 return this.getRootPane ().getMenuBar ();
45222 });
45223 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45224 function () {
45225 return this.rootPaneCheckingEnabled;
45226 });
45227 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45228 function (enabled) {
45229 this.rootPaneCheckingEnabled = enabled;
45230 }, "~B");
45231 Clazz_overrideMethod (c$, "addImpl", 
45232 function (comp, constraints, index) {
45233 if (this.isRootPaneCheckingEnabled ()) {
45234 return this.getContentPane ().add (comp, constraints, index);
45235 }return this.addImplSAEM (comp, constraints, index);
45236 }, "java.awt.Component,~O,~N");
45237 Clazz_defineMethod (c$, "remove", 
45238 function (comp) {
45239 if (comp === this.rootPane) {
45240 this.removeChild (comp);
45241 } else {
45242 this.getContentPane ().removeChild (comp);
45243 }}, "java.awt.Component");
45244 Clazz_defineMethod (c$, "setLayout", 
45245 function (manager) {
45246 if (this.isRootPaneCheckingEnabled ()) {
45247 this.getContentPane ().setLayout (manager);
45248 } else {
45249 Clazz_superCall (this, javax.swing.JFrame, "setLayout", [manager]);
45250 }}, "java.awt.LayoutManager");
45251 Clazz_overrideMethod (c$, "getRootPane", 
45252 function () {
45253 return this.rootPane;
45254 });
45255 Clazz_defineMethod (c$, "setRootPane", 
45256 function (root) {
45257 if (this.rootPane != null) {
45258 this.remove (this.rootPane);
45259 }this.rootPane = root;
45260 if (this.rootPane != null) {
45261 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45262 try {
45263 this.setRootPaneCheckingEnabled (false);
45264 this.add (this.rootPane, "Center");
45265 } finally {
45266 this.setRootPaneCheckingEnabled (checkingEnabled);
45267 }
45268 }}, "javax.swing.JRootPane");
45269 Clazz_overrideMethod (c$, "getContentPane", 
45270 function () {
45271 return this.getRootPane ().getContentPane ();
45272 });
45273 Clazz_overrideMethod (c$, "setContentPane", 
45274 function (contentPane) {
45275 this.getRootPane ().setContentPane (contentPane);
45276 }, "java.awt.Container");
45277 Clazz_overrideMethod (c$, "getLayeredPane", 
45278 function () {
45279 return this.getRootPane ().getLayeredPane ();
45280 });
45281 Clazz_overrideMethod (c$, "setLayeredPane", 
45282 function (layeredPane) {
45283 this.getRootPane ().setLayeredPane (layeredPane);
45284 }, "javax.swing.JLayeredPane");
45285 Clazz_overrideMethod (c$, "getGlassPane", 
45286 function () {
45287 return this.getRootPane ().getGlassPane ();
45288 });
45289 Clazz_overrideMethod (c$, "setGlassPane", 
45290 function (glassPane) {
45291 this.getRootPane ().setGlassPane (glassPane);
45292 }, "java.awt.Component");
45293 Clazz_defineMethod (c$, "getGraphics", 
45294 function () {
45295 javax.swing.JComponent.getGraphicsInvoked (this);
45296 return Clazz_superCall (this, javax.swing.JFrame, "getGraphics", []);
45297 });
45298 Clazz_defineMethod (c$, "repaint", 
45299 function (time, x, y, width, height) {
45300 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45301 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45302 } else {
45303 Clazz_superCall (this, javax.swing.JFrame, "repaint", [time, x, y, width, height]);
45304 }}, "~N,~N,~N,~N,~N");
45305 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
45306 function (defaultLookAndFeelDecorated) {
45307 if (defaultLookAndFeelDecorated) {
45308 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
45309 } else {
45310 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
45311 }}, "~B");
45312 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
45313 function () {
45314 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JFrame.defaultLookAndFeelDecoratedKey);
45315 if (defaultLookAndFeelDecorated == null) {
45316 defaultLookAndFeelDecorated = Boolean.FALSE;
45317 }return defaultLookAndFeelDecorated.booleanValue ();
45318 });
45319 Clazz_defineMethod (c$, "paramString", 
45320 function () {
45321 var defaultCloseOperationString;
45322 if (this.defaultCloseOperation == 1) {
45323 defaultCloseOperationString = "HIDE_ON_CLOSE";
45324 } else if (this.defaultCloseOperation == 2) {
45325 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
45326 } else if (this.defaultCloseOperation == 0) {
45327 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
45328 } else if (this.defaultCloseOperation == 3) {
45329 defaultCloseOperationString = "EXIT_ON_CLOSE";
45330 } else defaultCloseOperationString = "";
45331 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
45332 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45333 return Clazz_superCall (this, javax.swing.JFrame, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45334 });
45335 Clazz_defineStatics (c$,
45336 "EXIT_ON_CLOSE", 3);
45337 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
45338 });
45339 Clazz_declarePackage ("javax.swing");
45340 Clazz_load (["java.awt.Window", "javax.swing.RootPaneContainer"], "javax.swing.JWindow", ["javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
45341 c$ = Clazz_decorateAsClass (function () {
45342 this.rootPane = null;
45343 this.rootPaneCheckingEnabled = false;
45344 this.transferHandler = null;
45345 Clazz_instantialize (this, arguments);
45346 }, javax.swing, "JWindow", java.awt.Window, javax.swing.RootPaneContainer);
45347 Clazz_makeConstructor (c$, 
45348 function () {
45349 this.construct (Clazz_castNullAs ("java.awt.Frame"));
45350 });
45351 Clazz_makeConstructor (c$, 
45352 function (gc) {
45353 this.construct (null, gc);
45354 Clazz_superCall (this, javax.swing.JWindow, "setFocusableWindowState", [false]);
45355 }, "java.awt.GraphicsConfiguration");
45356 Clazz_makeConstructor (c$, 
45357 function (owner) {
45358 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45359 if (owner == null) {
45360 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45361 this.addWindowListener (ownerShutdownListener);
45362 }this.windowInit ();
45363 }, "java.awt.Frame");
45364 Clazz_makeConstructor (c$, 
45365 function (owner) {
45366 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45367 if (owner == null) {
45368 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45369 this.addWindowListener (ownerShutdownListener);
45370 }this.windowInit ();
45371 }, "java.awt.Window");
45372 Clazz_makeConstructor (c$, 
45373 function (owner, gc) {
45374 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, gc]);
45375 if (owner == null) {
45376 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45377 this.addWindowListener (ownerShutdownListener);
45378 }this.windowInit ();
45379 }, "java.awt.Window,java.awt.GraphicsConfiguration");
45380 Clazz_defineMethod (c$, "windowInit", 
45381 function () {
45382 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45383 this.setRootPane (this.createRootPane ());
45384 this.setRootPaneCheckingEnabled (true);
45385 });
45386 Clazz_defineMethod (c$, "createRootPane", 
45387 function () {
45388 var rp =  new javax.swing.JRootPane ();
45389 rp.setOpaque (true);
45390 return rp;
45391 });
45392 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45393 function () {
45394 return this.rootPaneCheckingEnabled;
45395 });
45396 Clazz_defineMethod (c$, "setTransferHandler", 
45397 function (newHandler) {
45398 var oldHandler = this.transferHandler;
45399 this.transferHandler = newHandler;
45400 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45401 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45402 }, "javax.swing.TransferHandler");
45403 Clazz_defineMethod (c$, "getTransferHandler", 
45404 function () {
45405 return this.transferHandler;
45406 });
45407 Clazz_overrideMethod (c$, "update", 
45408 function (g) {
45409 this.paint (g);
45410 }, "java.awt.Graphics");
45411 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45412 function (enabled) {
45413 this.rootPaneCheckingEnabled = enabled;
45414 }, "~B");
45415 Clazz_overrideMethod (c$, "addImpl", 
45416 function (comp, constraints, index) {
45417 if (this.isRootPaneCheckingEnabled ()) {
45418 return this.getContentPane ().add (comp, constraints, index);
45419 }return this.addImplSAEM (comp, constraints, index);
45420 }, "java.awt.Component,~O,~N");
45421 Clazz_defineMethod (c$, "remove", 
45422 function (comp) {
45423 if (comp === this.rootPane) {
45424 this.removeChild (comp);
45425 } else {
45426 this.getContentPane ().removeChild (comp);
45427 }}, "java.awt.Component");
45428 Clazz_defineMethod (c$, "setLayout", 
45429 function (manager) {
45430 if (this.isRootPaneCheckingEnabled ()) {
45431 this.getContentPane ().setLayout (manager);
45432 } else {
45433 Clazz_superCall (this, javax.swing.JWindow, "setLayout", [manager]);
45434 }}, "java.awt.LayoutManager");
45435 Clazz_overrideMethod (c$, "getRootPane", 
45436 function () {
45437 return this.rootPane;
45438 });
45439 Clazz_defineMethod (c$, "setRootPane", 
45440 function (root) {
45441 if (this.rootPane != null) {
45442 this.remove (this.rootPane);
45443 }this.rootPane = root;
45444 if (this.rootPane != null) {
45445 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45446 try {
45447 this.setRootPaneCheckingEnabled (false);
45448 this.add (this.rootPane, "Center");
45449 } finally {
45450 this.setRootPaneCheckingEnabled (checkingEnabled);
45451 }
45452 }}, "javax.swing.JRootPane");
45453 Clazz_overrideMethod (c$, "getContentPane", 
45454 function () {
45455 return this.getRootPane ().getContentPane ();
45456 });
45457 Clazz_overrideMethod (c$, "setContentPane", 
45458 function (contentPane) {
45459 this.getRootPane ().setContentPane (contentPane);
45460 }, "java.awt.Container");
45461 Clazz_overrideMethod (c$, "getLayeredPane", 
45462 function () {
45463 return this.getRootPane ().getLayeredPane ();
45464 });
45465 Clazz_overrideMethod (c$, "setLayeredPane", 
45466 function (layeredPane) {
45467 this.getRootPane ().setLayeredPane (layeredPane);
45468 }, "javax.swing.JLayeredPane");
45469 Clazz_overrideMethod (c$, "getGlassPane", 
45470 function () {
45471 return this.getRootPane ().getGlassPane ();
45472 });
45473 Clazz_overrideMethod (c$, "setGlassPane", 
45474 function (glassPane) {
45475 this.getRootPane ().setGlassPane (glassPane);
45476 }, "java.awt.Component");
45477 Clazz_defineMethod (c$, "getGraphics", 
45478 function () {
45479 javax.swing.JComponent.getGraphicsInvoked (this);
45480 return Clazz_superCall (this, javax.swing.JWindow, "getGraphics", []);
45481 });
45482 Clazz_defineMethod (c$, "repaint", 
45483 function (time, x, y, width, height) {
45484 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45485 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45486 } else {
45487 Clazz_superCall (this, javax.swing.JWindow, "repaint", [time, x, y, width, height]);
45488 }}, "~N,~N,~N,~N,~N");
45489 Clazz_defineMethod (c$, "paramString", 
45490 function () {
45491 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45492 return Clazz_superCall (this, javax.swing.JWindow, "paramString", []) + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45493 });
45494 });
45495 Clazz_declarePackage ("javax.swing");
45496 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 () {
45497 c$ = Clazz_decorateAsClass (function () {
45498 this.containerMap = null;
45499 this.componentKeyStrokeMap = null;
45500 if (!Clazz_isClassDefined ("javax.swing.KeyboardManager.ComponentKeyStrokePair")) {
45501 javax.swing.KeyboardManager.$KeyboardManager$ComponentKeyStrokePair$ ();
45502 }
45503 Clazz_instantialize (this, arguments);
45504 }, javax.swing, "KeyboardManager");
45505 Clazz_prepareFields (c$, function () {
45506 this.containerMap =  new java.util.Hashtable ();
45507 this.componentKeyStrokeMap =  new java.util.Hashtable ();
45508 });
45509 c$.getCurrentManager = Clazz_defineMethod (c$, "getCurrentManager", 
45510 function () {
45511 return javax.swing.KeyboardManager.currentManager;
45512 });
45513 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
45514 function (km) {
45515 javax.swing.KeyboardManager.currentManager = km;
45516 }, "javax.swing.KeyboardManager");
45517 Clazz_defineMethod (c$, "registerKeyStroke", 
45518 function (k, c) {
45519 var topContainer = javax.swing.KeyboardManager.getTopAncestor (c);
45520 if (topContainer == null) {
45521 return;
45522 }var keyMap = this.containerMap.get (topContainer);
45523 if (keyMap == null) {
45524 keyMap = this.registerNewTopContainer (topContainer);
45525 }var tmp = keyMap.get (k);
45526 if (tmp == null) {
45527 keyMap.put (k, c);
45528 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45529 var v = tmp;
45530 if (!v.contains (c)) {
45531 v.addElement (c);
45532 }} else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45533 if (tmp !== c) {
45534 var v =  new java.util.Vector ();
45535 v.addElement (tmp);
45536 v.addElement (c);
45537 keyMap.put (k, v);
45538 }} else {
45539 System.out.println ("Unexpected condition in registerKeyStroke");
45540 Thread.dumpStack ();
45541 }this.componentKeyStrokeMap.put (Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, k), topContainer);
45542 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45543 c$.getTopAncestor = Clazz_defineMethod (c$, "getTopAncestor", 
45544  function (c) {
45545 for (var p = c.getParent (); p != null; p = p.getParent ()) {
45546 if (Clazz_instanceOf (p, java.awt.Window) && (p).isFocusableWindow () || Clazz_instanceOf (p, java.applet.Applet)) {
45547 return p;
45548 }}
45549 return null;
45550 }, "javax.swing.JComponent");
45551 Clazz_defineMethod (c$, "unregisterKeyStroke", 
45552 function (ks, c) {
45553 var ckp = Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, ks);
45554 var topContainer = this.componentKeyStrokeMap.get (ckp);
45555 if (topContainer == null) {
45556 return;
45557 }var keyMap = this.containerMap.get (topContainer);
45558 if (keyMap == null) {
45559 Thread.dumpStack ();
45560 return;
45561 }var tmp = keyMap.get (ks);
45562 if (tmp == null) {
45563 Thread.dumpStack ();
45564 return;
45565 }if (Clazz_instanceOf (tmp, javax.swing.JComponent) && tmp === c) {
45566 keyMap.remove (ks);
45567 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45568 var v = tmp;
45569 v.removeElement (c);
45570 if (v.isEmpty ()) {
45571 keyMap.remove (ks);
45572 }}if (keyMap.isEmpty ()) {
45573 this.containerMap.remove (topContainer);
45574 }this.componentKeyStrokeMap.remove (ckp);
45575 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45576 Clazz_defineMethod (c$, "fireKeyboardAction", 
45577 function (e, pressed, topAncestor) {
45578 if (e.isConsumed ()) {
45579 System.out.println ("Aquired pre-used event!");
45580 Thread.dumpStack ();
45581 }var ks;
45582 if (e.getID () == 400) {
45583 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
45584 } else {
45585 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), !pressed);
45586 }var keyMap = this.containerMap.get (topAncestor);
45587 if (keyMap != null) {
45588 var tmp = keyMap.get (ks);
45589 if (tmp == null) {
45590 } else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45591 var c = tmp;
45592 if (c.isShowing () && c.isEnabled ()) {
45593 this.fireBinding (c, ks, e, pressed);
45594 }} else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45595 var v = tmp;
45596 for (var counter = v.size () - 1; counter >= 0; counter--) {
45597 var c = v.elementAt (counter);
45598 if (c.isShowing () && c.isEnabled ()) {
45599 this.fireBinding (c, ks, e, pressed);
45600 if (e.isConsumed ()) return true;
45601 }}
45602 } else {
45603 System.out.println ("Unexpected condition in fireKeyboardAction " + tmp);
45604 Thread.dumpStack ();
45605 }}if (e.isConsumed ()) {
45606 return true;
45607 }if (keyMap != null) {
45608 var v = keyMap.get (javax.swing.JMenuBar);
45609 if (v != null) {
45610 var iter = v.elements ();
45611 while (iter.hasMoreElements ()) {
45612 var mb = iter.nextElement ();
45613 if (mb.isShowing () && mb.isEnabled ()) {
45614 this.fireBinding (mb, ks, e, pressed);
45615 if (e.isConsumed ()) {
45616 return true;
45617 }}}
45618 }}return e.isConsumed ();
45619 }, "java.awt.event.KeyEvent,~B,java.awt.Container");
45620 Clazz_defineMethod (c$, "fireBinding", 
45621 function (c, ks, e, pressed) {
45622 if (c.processKeyBinding (ks, e, 2, pressed)) {
45623 e.consume ();
45624 }}, "javax.swing.JComponent,javax.swing.KeyStroke,java.awt.event.KeyEvent,~B");
45625 Clazz_defineMethod (c$, "registerMenuBar", 
45626 function (mb) {
45627 var top = javax.swing.KeyboardManager.getTopAncestor (mb);
45628 if (top == null) {
45629 return;
45630 }var keyMap = this.containerMap.get (top);
45631 if (keyMap == null) {
45632 keyMap = this.registerNewTopContainer (top);
45633 }var menuBars = keyMap.get (javax.swing.JMenuBar);
45634 if (menuBars == null) {
45635 menuBars =  new java.util.Vector ();
45636 keyMap.put (javax.swing.JMenuBar, menuBars);
45637 }if (!menuBars.contains (mb)) {
45638 menuBars.addElement (mb);
45639 }}, "javax.swing.JMenuBar");
45640 Clazz_defineMethod (c$, "unregisterMenuBar", 
45641 function (mb) {
45642 var topContainer = javax.swing.KeyboardManager.getTopAncestor (mb);
45643 if (topContainer == null) {
45644 return;
45645 }var keyMap = this.containerMap.get (topContainer);
45646 if (keyMap != null) {
45647 var v = keyMap.get (javax.swing.JMenuBar);
45648 if (v != null) {
45649 v.removeElement (mb);
45650 if (v.isEmpty ()) {
45651 keyMap.remove (javax.swing.JMenuBar);
45652 if (keyMap.isEmpty ()) {
45653 this.containerMap.remove (topContainer);
45654 }}}}}, "javax.swing.JMenuBar");
45655 Clazz_defineMethod (c$, "registerNewTopContainer", 
45656 function (topContainer) {
45657 var keyMap =  new java.util.Hashtable ();
45658 this.containerMap.put (topContainer, keyMap);
45659 return keyMap;
45660 }, "java.awt.Container");
45661 c$.$KeyboardManager$ComponentKeyStrokePair$ = function () {
45662 Clazz_pu$h(self.c$);
45663 c$ = Clazz_decorateAsClass (function () {
45664 Clazz_prepareCallback (this, arguments);
45665 this.component = null;
45666 this.keyStroke = null;
45667 Clazz_instantialize (this, arguments);
45668 }, javax.swing.KeyboardManager, "ComponentKeyStrokePair");
45669 Clazz_makeConstructor (c$, 
45670 function (a, b) {
45671 this.component = a;
45672 this.keyStroke = b;
45673 }, "~O,~O");
45674 Clazz_defineMethod (c$, "equals", 
45675 function (a) {
45676 if (!(Clazz_instanceOf (a, javax.swing.KeyboardManager.ComponentKeyStrokePair))) {
45677 return false;
45678 }var b = a;
45679 return ((this.component.equals (b.component)) && (this.keyStroke.equals (b.keyStroke)));
45680 }, "~O");
45681 Clazz_defineMethod (c$, "hashCode", 
45682 function () {
45683 return this.component.hashCode () * this.keyStroke.hashCode ();
45684 });
45685 c$ = Clazz_p0p ();
45686 };
45687 c$.currentManager = c$.prototype.currentManager =  new javax.swing.KeyboardManager ();
45688 });
45689 Clazz_declarePackage ("javax.swing");
45690 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 () {
45691 c$ = Clazz_decorateAsClass (function () {
45692 this.selectionModel = null;
45693 this.$paintBorder = true;
45694 this.margin = null;
45695 Clazz_instantialize (this, arguments);
45696 }, javax.swing, "JMenuBar", javax.swing.JComponent, javax.swing.MenuElement);
45697 Clazz_makeConstructor (c$, 
45698 function () {
45699 Clazz_superConstructor (this, javax.swing.JMenuBar);
45700 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
45701 this.updateUI ();
45702 });
45703 Clazz_overrideMethod (c$, "getUI", 
45704 function () {
45705 return this.ui;
45706 });
45707 Clazz_overrideMethod (c$, "updateUI", 
45708 function () {
45709 this.setUI (javax.swing.UIManager.getUI (this));
45710 });
45711 Clazz_overrideMethod (c$, "getUIClassID", 
45712 function () {
45713 return "MenuBarUI";
45714 });
45715 Clazz_defineMethod (c$, "getSelectionModel", 
45716 function () {
45717 return this.selectionModel;
45718 });
45719 Clazz_defineMethod (c$, "setSelectionModel", 
45720 function (model) {
45721 var oldValue = this.selectionModel;
45722 this.selectionModel = model;
45723 this.firePropertyChangeObject ("selectionModel", oldValue, this.selectionModel);
45724 }, "javax.swing.SingleSelectionModel");
45725 Clazz_defineMethod (c$, "add", 
45726 function (c) {
45727 Clazz_superCall (this, javax.swing.JMenuBar, "add", [c]);
45728 return c;
45729 }, "javax.swing.JMenu");
45730 Clazz_defineMethod (c$, "getMenu", 
45731 function (index) {
45732 var c = this.getComponentAtIndex (index);
45733 if (Clazz_instanceOf (c, javax.swing.JMenu)) return c;
45734 return null;
45735 }, "~N");
45736 Clazz_defineMethod (c$, "getMenuCount", 
45737 function () {
45738 return this.getComponentCount ();
45739 });
45740 Clazz_defineMethod (c$, "setHelpMenu", 
45741 function (menu) {
45742 throw  new Error ("setHelpMenu() not yet implemented.");
45743 }, "javax.swing.JMenu");
45744 Clazz_defineMethod (c$, "getHelpMenu", 
45745 function () {
45746 throw  new Error ("getHelpMenu() not yet implemented.");
45747 });
45748 Clazz_defineMethod (c$, "getComponentAtIndex", 
45749 function (i) {
45750 if (i < 0 || i >= this.getComponentCount ()) {
45751 return null;
45752 }return this.getComponent (i);
45753 }, "~N");
45754 Clazz_defineMethod (c$, "getComponentIndex", 
45755 function (c) {
45756 var ncomponents = this.getComponentCount ();
45757 var component = this.getComponents ();
45758 for (var i = 0; i < ncomponents; i++) {
45759 var comp = component[i];
45760 if (comp === c) return i;
45761 }
45762 return -1;
45763 }, "java.awt.Component");
45764 Clazz_defineMethod (c$, "setSelected", 
45765 function (sel) {
45766 var model = this.getSelectionModel ();
45767 var index = this.getComponentIndex (sel);
45768 model.setSelectedIndex (index);
45769 }, "java.awt.Component");
45770 Clazz_defineMethod (c$, "isSelected", 
45771 function () {
45772 return this.selectionModel.isSelected ();
45773 });
45774 Clazz_defineMethod (c$, "isBorderPainted", 
45775 function () {
45776 return this.$paintBorder;
45777 });
45778 Clazz_defineMethod (c$, "setBorderPainted", 
45779 function (b) {
45780 var oldValue = this.$paintBorder;
45781 this.$paintBorder = b;
45782 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
45783 if (b != oldValue) {
45784 this.revalidate ();
45785 this.repaint ();
45786 }}, "~B");
45787 Clazz_defineMethod (c$, "paintBorder", 
45788 function (g) {
45789 if (this.isBorderPainted ()) {
45790 Clazz_superCall (this, javax.swing.JMenuBar, "paintBorder", [g]);
45791 }}, "java.awt.Graphics");
45792 Clazz_defineMethod (c$, "setMargin", 
45793 function (m) {
45794 var old = this.margin;
45795 this.margin = m;
45796 this.firePropertyChangeObject ("margin", old, m);
45797 if (old == null || !old.equals (m)) {
45798 this.revalidate ();
45799 this.repaint ();
45800 }}, "java.awt.Insets");
45801 Clazz_defineMethod (c$, "getMargin", 
45802 function () {
45803 if (this.margin == null) {
45804 return  new java.awt.Insets (0, 0, 0, 0);
45805 } else {
45806 return this.margin;
45807 }});
45808 Clazz_defineMethod (c$, "processMouseEvent", 
45809 function (event, path, manager) {
45810 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
45811 Clazz_defineMethod (c$, "processKeyEvent", 
45812 function (e, path, manager) {
45813 }, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
45814 Clazz_overrideMethod (c$, "menuSelectionChanged", 
45815 function (isIncluded) {
45816 }, "~B");
45817 Clazz_defineMethod (c$, "getSubElements", 
45818 function () {
45819 var result;
45820 var tmp =  new java.util.Vector ();
45821 var c = this.getComponentCount ();
45822 var i;
45823 var m;
45824 for (i = 0; i < c; i++) {
45825 m = this.getComponent (i);
45826 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
45827 }
45828 result =  new Array (tmp.size ());
45829 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
45830
45831 return result;
45832 });
45833 Clazz_defineMethod (c$, "getComponent", 
45834 function () {
45835 return this;
45836 });
45837 Clazz_defineMethod (c$, "paramString", 
45838 function () {
45839 var paintBorderString = (this.$paintBorder ? "true" : "false");
45840 var marginString = (this.margin != null ? this.margin.toString () : "");
45841 return Clazz_superCall (this, javax.swing.JMenuBar, "paramString", []) + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
45842 });
45843 Clazz_defineMethod (c$, "processKeyBinding", 
45844 function (ks, e, condition, pressed) {
45845 var retValue = Clazz_superCall (this, javax.swing.JMenuBar, "processKeyBinding", [ks, e, condition, pressed]);
45846 if (!retValue) {
45847 var subElements = this.getSubElements ();
45848 for (var i = 0; i < subElements.length; i++) {
45849 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45850 return true;
45851 }}
45852 }return retValue;
45853 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45854 c$.processBindingForKeyStrokeRecursive = Clazz_defineMethod (c$, "processBindingForKeyStrokeRecursive", 
45855 function (elem, ks, e, condition, pressed) {
45856 if (elem == null) {
45857 return false;
45858 }var c = elem.getComponent ();
45859 if (!(c.isVisible () || (Clazz_instanceOf (c, javax.swing.JPopupMenu))) || !c.isEnabled ()) {
45860 return false;
45861 }if (c != null && Clazz_instanceOf (c, javax.swing.JComponent) && (c).processKeyBinding (ks, e, condition, pressed)) {
45862 return true;
45863 }var subElements = elem.getSubElements ();
45864 for (var i = 0; i < subElements.length; i++) {
45865 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45866 return true;
45867 }}
45868 return false;
45869 }, "javax.swing.MenuElement,javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45870 Clazz_defineMethod (c$, "addNotify", 
45871 function () {
45872 Clazz_superCall (this, javax.swing.JMenuBar, "addNotify", []);
45873 javax.swing.KeyboardManager.getCurrentManager ().registerMenuBar (this);
45874 });
45875 Clazz_defineMethod (c$, "removeNotify", 
45876 function () {
45877 Clazz_superCall (this, javax.swing.JMenuBar, "removeNotify", []);
45878 javax.swing.KeyboardManager.getCurrentManager ().unregisterMenuBar (this);
45879 });
45880 Clazz_defineStatics (c$,
45881 "$uiClassID", "MenuBarUI");
45882 });
45883 Clazz_declarePackage ("javax.swing");
45884 Clazz_declareInterface (javax.swing, "MenuElement");
45885 Clazz_declarePackage ("javax.swing");
45886 Clazz_load (["javax.swing.SingleSelectionModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultSingleSelectionModel", ["javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
45887 c$ = Clazz_decorateAsClass (function () {
45888 this.changeEvent = null;
45889 this.listenerList = null;
45890 this.index = -1;
45891 Clazz_instantialize (this, arguments);
45892 }, javax.swing, "DefaultSingleSelectionModel", null, javax.swing.SingleSelectionModel);
45893 Clazz_prepareFields (c$, function () {
45894 this.listenerList =  new javax.swing.event.EventListenerList ();
45895 });
45896 Clazz_overrideMethod (c$, "getSelectedIndex", 
45897 function () {
45898 return this.index;
45899 });
45900 Clazz_overrideMethod (c$, "setSelectedIndex", 
45901 function (index) {
45902 if (this.index != index) {
45903 this.index = index;
45904 this.fireStateChanged ();
45905 }}, "~N");
45906 Clazz_overrideMethod (c$, "clearSelection", 
45907 function () {
45908 this.setSelectedIndex (-1);
45909 });
45910 Clazz_overrideMethod (c$, "isSelected", 
45911 function () {
45912 var ret = false;
45913 if (this.getSelectedIndex () != -1) {
45914 ret = true;
45915 }return ret;
45916 });
45917 Clazz_overrideMethod (c$, "addChangeListener", 
45918 function (l) {
45919 this.listenerList.add (javax.swing.event.ChangeListener, l);
45920 }, "javax.swing.event.ChangeListener");
45921 Clazz_overrideMethod (c$, "removeChangeListener", 
45922 function (l) {
45923 this.listenerList.remove (javax.swing.event.ChangeListener, l);
45924 }, "javax.swing.event.ChangeListener");
45925 Clazz_defineMethod (c$, "getChangeListeners", 
45926 function () {
45927 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
45928 });
45929 Clazz_defineMethod (c$, "fireStateChanged", 
45930 function () {
45931 var listeners = this.listenerList.getListenerList ();
45932 for (var i = listeners.length - 2; i >= 0; i -= 2) {
45933 if (listeners[i] === javax.swing.event.ChangeListener) {
45934 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
45935 (listeners[i + 1]).stateChanged (this.changeEvent);
45936 }}
45937 });
45938 Clazz_defineMethod (c$, "getListeners", 
45939 function (listenerType) {
45940 return this.listenerList.getListeners (listenerType);
45941 }, "Class");
45942 });
45943 Clazz_declarePackage ("javax.swing");
45944 Clazz_declareInterface (javax.swing, "SingleSelectionModel");
45945 Clazz_declarePackage ("javax.swing");
45946 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 () {
45947 c$ = Clazz_decorateAsClass (function () {
45948 this.$popupMenu = null;
45949 this.menuChangeListener = null;
45950 this.menuEvent = null;
45951 this.delay = 0;
45952 this.customMenuLocation = null;
45953 this.popupListener = null;
45954 if (!Clazz_isClassDefined ("javax.swing.JMenu.MenuChangeListener")) {
45955 javax.swing.JMenu.$JMenu$MenuChangeListener$ ();
45956 }
45957 if (!Clazz_isClassDefined ("javax.swing.JMenu.WinListener")) {
45958 javax.swing.JMenu.$JMenu$WinListener$ ();
45959 }
45960 Clazz_instantialize (this, arguments);
45961 }, javax.swing, "JMenu", javax.swing.JMenuItem, javax.swing.MenuElement);
45962 Clazz_makeConstructor (c$, 
45963 function () {
45964 Clazz_superConstructor (this, javax.swing.JMenu, []);
45965 this.init0 ("", null, -2147483648);
45966 });
45967 Clazz_makeConstructor (c$, 
45968 function (s) {
45969 Clazz_superConstructor (this, javax.swing.JMenu, []);
45970 this.init0 (s, null, -2147483648);
45971 }, "~S");
45972 Clazz_makeConstructor (c$, 
45973 function (a) {
45974 Clazz_superConstructor (this, javax.swing.JMenu, []);
45975 this.init0 ("", null, -2147483648);
45976 this.setAction (a);
45977 }, "javax.swing.Action");
45978 Clazz_makeConstructor (c$, 
45979 function (s, b) {
45980 Clazz_superConstructor (this, javax.swing.JMenu, []);
45981 this.init0 (s, null, -2147483648);
45982 }, "~S,~B");
45983 Clazz_overrideMethod (c$, "initFocusability", 
45984 function () {
45985 });
45986 Clazz_overrideMethod (c$, "updateUI", 
45987 function () {
45988 this.setUI (javax.swing.UIManager.getUI (this));
45989 if (this.$popupMenu != null) {
45990 this.$popupMenu.setUI (javax.swing.UIManager.getUI (this.$popupMenu));
45991 }});
45992 Clazz_overrideMethod (c$, "getUIClassID", 
45993 function () {
45994 return "MenuUI";
45995 });
45996 Clazz_defineMethod (c$, "setModel", 
45997 function (newModel) {
45998 var oldModel = this.getModel ();
45999 Clazz_superCall (this, javax.swing.JMenu, "setModel", [newModel]);
46000 if (oldModel != null && this.menuChangeListener != null) {
46001 oldModel.removeChangeListener (this.menuChangeListener);
46002 this.menuChangeListener = null;
46003 }this.model = newModel;
46004 if (newModel != null) {
46005 this.menuChangeListener = this.createMenuChangeListener ();
46006 newModel.addChangeListener (this.menuChangeListener);
46007 }}, "javax.swing.ButtonModel");
46008 Clazz_overrideMethod (c$, "isSelected", 
46009 function () {
46010 return this.getModel ().isSelected ();
46011 });
46012 Clazz_overrideMethod (c$, "setSelected", 
46013 function (b) {
46014 var model = this.getModel ();
46015 if (b != model.isSelected ()) {
46016 this.getModel ().setSelected (b);
46017 }}, "~B");
46018 Clazz_defineMethod (c$, "isPopupMenuVisible", 
46019 function () {
46020 this.ensurePopupMenuCreated ();
46021 return this.$popupMenu.isVisible ();
46022 });
46023 Clazz_defineMethod (c$, "setPopupMenuVisible", 
46024 function (b) {
46025 var isVisible = this.isPopupMenuVisible ();
46026 if (b != isVisible && (this.isEnabled () || !b)) {
46027 this.ensurePopupMenuCreated ();
46028 if ((b == true) && this.isShowing ()) {
46029 var p = this.getCustomMenuLocation ();
46030 if (p == null) {
46031 p = this.getPopupMenuOrigin ();
46032 }this.getPopupMenu ().show (this, p.x, p.y);
46033 } else {
46034 this.getPopupMenu ().setVisible (false);
46035 }}}, "~B");
46036 Clazz_defineMethod (c$, "getPopupMenuOrigin", 
46037 function () {
46038 var x = 0;
46039 var y = 0;
46040 var pm = this.getPopupMenu ();
46041 var s = this.getSize ();
46042 var pmSize = pm.getSize ();
46043 if (pmSize.width == 0) {
46044 pmSize = pm.getPreferredSize ();
46045 }var position = this.getLocationOnScreen ();
46046 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
46047 var gc = this.getGraphicsConfiguration ();
46048 var screenBounds =  new java.awt.Rectangle (toolkit.getScreenSize ());
46049 if (gc != null) {
46050 screenBounds = gc.getBounds ();
46051 var screenInsets = toolkit.getScreenInsets (gc);
46052 screenBounds.width -= Math.abs (screenInsets.left + screenInsets.right);
46053 screenBounds.height -= Math.abs (screenInsets.top + screenInsets.bottom);
46054 position.x -= Math.abs (screenInsets.left);
46055 position.y -= Math.abs (screenInsets.top);
46056 }var parent = this.getParent ();
46057 if (Clazz_instanceOf (parent, javax.swing.JPopupMenu)) {
46058 var xOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetX");
46059 var yOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetY");
46060 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
46061 x = s.width + xOffset;
46062 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
46063 x = 0 - xOffset - pmSize.width;
46064 }} else {
46065 x = 0 - xOffset - pmSize.width;
46066 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
46067 x = s.width + xOffset;
46068 }}y = yOffset;
46069 if (position.y + y + pmSize.height >= screenBounds.height + screenBounds.y && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
46070 y = s.height - yOffset - pmSize.height;
46071 }} else {
46072 var xOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetX");
46073 var yOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetY");
46074 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
46075 x = xOffset;
46076 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
46077 x = s.width - xOffset - pmSize.width;
46078 }} else {
46079 x = s.width - xOffset - pmSize.width;
46080 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
46081 x = xOffset;
46082 }}y = s.height + yOffset;
46083 if (position.y + y + pmSize.height >= screenBounds.height && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
46084 y = 0 - yOffset - pmSize.height;
46085 }}return  new java.awt.Point (x, y);
46086 });
46087 Clazz_defineMethod (c$, "getDelay", 
46088 function () {
46089 return this.delay;
46090 });
46091 Clazz_defineMethod (c$, "setDelay", 
46092 function (d) {
46093 if (d < 0) throw  new IllegalArgumentException ("Delay must be a positive integer");
46094 this.delay = d;
46095 }, "~N");
46096 Clazz_defineMethod (c$, "ensurePopupMenuCreated", 
46097  function () {
46098 if (this.$popupMenu == null) {
46099 this.$popupMenu =  new javax.swing.JPopupMenu ();
46100 this.$popupMenu.setInvoker (this);
46101 this.popupListener = this.createWinListener (this.$popupMenu);
46102 }});
46103 Clazz_defineMethod (c$, "getCustomMenuLocation", 
46104  function () {
46105 return this.customMenuLocation;
46106 });
46107 Clazz_defineMethod (c$, "setMenuLocation", 
46108 function (x, y) {
46109 this.customMenuLocation =  new java.awt.Point (x, y);
46110 if (this.$popupMenu != null) this.$popupMenu.setLocation (x, y);
46111 }, "~N,~N");
46112 Clazz_defineMethod (c$, "add", 
46113 function (menuItem) {
46114 this.ensurePopupMenuCreated ();
46115 return this.$popupMenu.add (menuItem);
46116 }, "javax.swing.JMenuItem");
46117 Clazz_defineMethod (c$, "add", 
46118 function (c) {
46119 this.ensurePopupMenuCreated ();
46120 this.$popupMenu.add (c);
46121 return c;
46122 }, "java.awt.Component");
46123 Clazz_defineMethod (c$, "add", 
46124 function (c, index) {
46125 this.ensurePopupMenuCreated ();
46126 this.$popupMenu.add (c, index);
46127 return c;
46128 }, "java.awt.Component,~N");
46129 Clazz_defineMethod (c$, "add", 
46130 function (s) {
46131 return this.add ( new javax.swing.JMenuItem (s));
46132 }, "~S");
46133 Clazz_defineMethod (c$, "add", 
46134 function (a) {
46135 var mi = this.createActionComponent (a);
46136 mi.setAction (a);
46137 this.add (mi);
46138 return mi;
46139 }, "javax.swing.Action");
46140 Clazz_defineMethod (c$, "createActionComponent", 
46141 function (a) {
46142 var mi = ((Clazz_isClassDefined ("javax.swing.JMenu$1") ? 0 : javax.swing.JMenu.$JMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JMenu$1, this, null));
46143 mi.setHorizontalTextPosition (11);
46144 mi.setVerticalTextPosition (0);
46145 return mi;
46146 }, "javax.swing.Action");
46147 Clazz_defineMethod (c$, "createActionChangeListener", 
46148 function (b) {
46149 return b.createActionPropertyChangeListener0 (b.getAction ());
46150 }, "javax.swing.JMenuItem");
46151 Clazz_defineMethod (c$, "addSeparator", 
46152 function () {
46153 this.ensurePopupMenuCreated ();
46154 this.$popupMenu.addSeparator ();
46155 });
46156 Clazz_defineMethod (c$, "insert", 
46157 function (s, pos) {
46158 if (pos < 0) {
46159 throw  new IllegalArgumentException ("index less than zero.");
46160 }this.ensurePopupMenuCreated ();
46161 this.$popupMenu.insert ( new javax.swing.JMenuItem (s), pos);
46162 }, "~S,~N");
46163 Clazz_defineMethod (c$, "insert", 
46164 function (mi, pos) {
46165 if (pos < 0) {
46166 throw  new IllegalArgumentException ("index less than zero.");
46167 }this.ensurePopupMenuCreated ();
46168 this.$popupMenu.insert (mi, pos);
46169 return mi;
46170 }, "javax.swing.JMenuItem,~N");
46171 Clazz_defineMethod (c$, "insert", 
46172 function (a, pos) {
46173 if (pos < 0) {
46174 throw  new IllegalArgumentException ("index less than zero.");
46175 }this.ensurePopupMenuCreated ();
46176 var mi =  new javax.swing.JMenuItem (a);
46177 mi.setHorizontalTextPosition (11);
46178 mi.setVerticalTextPosition (0);
46179 this.$popupMenu.insert (mi, pos);
46180 return mi;
46181 }, "javax.swing.Action,~N");
46182 Clazz_defineMethod (c$, "insertSeparator", 
46183 function (index) {
46184 if (index < 0) {
46185 throw  new IllegalArgumentException ("index less than zero.");
46186 }this.ensurePopupMenuCreated ();
46187 this.$popupMenu.insert ( new javax.swing.JPopupMenu.Separator (), index);
46188 }, "~N");
46189 Clazz_defineMethod (c$, "getItem", 
46190 function (pos) {
46191 if (pos < 0) {
46192 throw  new IllegalArgumentException ("index less than zero.");
46193 }var c = this.getMenuComponent (pos);
46194 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) {
46195 var mi = c;
46196 return mi;
46197 }return null;
46198 }, "~N");
46199 Clazz_defineMethod (c$, "getItemCount", 
46200 function () {
46201 return this.getMenuComponentCount ();
46202 });
46203 Clazz_defineMethod (c$, "isTearOff", 
46204 function () {
46205 throw  new Error ("boolean isTearOff() {} not yet implemented");
46206 });
46207 Clazz_defineMethod (c$, "remove", 
46208 function (pos) {
46209 if (pos < 0) {
46210 throw  new IllegalArgumentException ("index less than zero.");
46211 }if (pos > this.getItemCount ()) {
46212 throw  new IllegalArgumentException ("index greater than the number of items.");
46213 }if (this.$popupMenu != null) this.$popupMenu.remove (pos);
46214 }, "~N");
46215 Clazz_defineMethod (c$, "remove", 
46216 function (c) {
46217 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) if (this.$popupMenu != null) this.$popupMenu.remove (c);
46218 if (this.$popupMenu != null) this.$popupMenu.remove (c);
46219 }, "java.awt.Component");
46220 Clazz_defineMethod (c$, "removeAll", 
46221 function () {
46222 if (this.$popupMenu != null) this.$popupMenu.removeAll ();
46223 });
46224 Clazz_defineMethod (c$, "getMenuComponentCount", 
46225 function () {
46226 var componentCount = 0;
46227 if (this.$popupMenu != null) componentCount = this.$popupMenu.getComponentCount ();
46228 return componentCount;
46229 });
46230 Clazz_defineMethod (c$, "getMenuComponent", 
46231 function (n) {
46232 if (this.$popupMenu != null) return this.$popupMenu.getComponent (n);
46233 return null;
46234 }, "~N");
46235 Clazz_defineMethod (c$, "getMenuComponents", 
46236 function () {
46237 if (this.$popupMenu != null) return this.$popupMenu.getComponents ();
46238 return  new Array (0);
46239 });
46240 Clazz_defineMethod (c$, "isTopLevelMenu", 
46241 function () {
46242 if (Clazz_instanceOf (this.getParent (), javax.swing.JMenuBar)) return true;
46243 return false;
46244 });
46245 Clazz_defineMethod (c$, "isMenuComponent", 
46246 function (c) {
46247 if (c === this) return true;
46248 if (Clazz_instanceOf (c, javax.swing.JPopupMenu)) {
46249 var comp = c;
46250 if (comp === this.getPopupMenu ()) return true;
46251 }var ncomponents = this.getMenuComponentCount ();
46252 var component = this.getMenuComponents ();
46253 for (var i = 0; i < ncomponents; i++) {
46254 var comp = component[i];
46255 if (comp === c) return true;
46256 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
46257 var subMenu = comp;
46258 if (subMenu.isMenuComponent (c)) return true;
46259 }}
46260 return false;
46261 }, "java.awt.Component");
46262 Clazz_defineMethod (c$, "getPopupMenu", 
46263 function () {
46264 this.ensurePopupMenuCreated ();
46265 return this.$popupMenu;
46266 });
46267 Clazz_defineMethod (c$, "addMenuListener", 
46268 function (l) {
46269 this.listenerList.add (javax.swing.event.MenuListener, l);
46270 }, "javax.swing.event.MenuListener");
46271 Clazz_defineMethod (c$, "removeMenuListener", 
46272 function (l) {
46273 this.listenerList.remove (javax.swing.event.MenuListener, l);
46274 }, "javax.swing.event.MenuListener");
46275 Clazz_defineMethod (c$, "getMenuListeners", 
46276 function () {
46277 return this.listenerList.getListeners (javax.swing.event.MenuListener);
46278 });
46279 Clazz_defineMethod (c$, "fireMenuSelected", 
46280 function () {
46281 var listeners = this.listenerList.getListenerList ();
46282 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46283 if (listeners[i] === javax.swing.event.MenuListener) {
46284 if (listeners[i + 1] == null) {
46285 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46286 } else {
46287 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46288 (listeners[i + 1]).menuSelected (this.menuEvent);
46289 }}}
46290 });
46291 Clazz_defineMethod (c$, "fireMenuDeselected", 
46292 function () {
46293 var listeners = this.listenerList.getListenerList ();
46294 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46295 if (listeners[i] === javax.swing.event.MenuListener) {
46296 if (listeners[i + 1] == null) {
46297 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46298 } else {
46299 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46300 (listeners[i + 1]).menuDeselected (this.menuEvent);
46301 }}}
46302 });
46303 Clazz_defineMethod (c$, "fireMenuCanceled", 
46304 function () {
46305 var listeners = this.listenerList.getListenerList ();
46306 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46307 if (listeners[i] === javax.swing.event.MenuListener) {
46308 if (listeners[i + 1] == null) {
46309 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46310 } else {
46311 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46312 (listeners[i + 1]).menuCanceled (this.menuEvent);
46313 }}}
46314 });
46315 Clazz_overrideMethod (c$, "configureAcceleratorFromAction", 
46316 function (a) {
46317 }, "javax.swing.Action");
46318 Clazz_defineMethod (c$, "createMenuChangeListener", 
46319  function () {
46320 return Clazz_innerTypeInstance (javax.swing.JMenu.MenuChangeListener, this, null);
46321 });
46322 Clazz_defineMethod (c$, "createWinListener", 
46323 function (p) {
46324 return Clazz_innerTypeInstance (javax.swing.JMenu.WinListener, this, null, p);
46325 }, "javax.swing.JPopupMenu");
46326 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46327 function (isIncluded) {
46328 this.setSelected (isIncluded);
46329 }, "~B");
46330 Clazz_overrideMethod (c$, "getSubElements", 
46331 function () {
46332 if (this.$popupMenu == null) return  new Array (0);
46333  else {
46334 var result =  new Array (1);
46335 result[0] = this.$popupMenu;
46336 return result;
46337 }});
46338 Clazz_defineMethod (c$, "getComponent", 
46339 function () {
46340 return this;
46341 });
46342 Clazz_defineMethod (c$, "applyComponentOrientation", 
46343 function (o) {
46344 Clazz_superCall (this, javax.swing.JMenu, "applyComponentOrientation", [o]);
46345 if (this.$popupMenu != null) {
46346 var ncomponents = this.getMenuComponentCount ();
46347 for (var i = 0; i < ncomponents; ++i) {
46348 this.getMenuComponent (i).applyComponentOrientation (o);
46349 }
46350 this.$popupMenu.setComponentOrientation (o);
46351 }}, "java.awt.ComponentOrientation");
46352 Clazz_defineMethod (c$, "setComponentOrientation", 
46353 function (o) {
46354 Clazz_superCall (this, javax.swing.JMenu, "setComponentOrientation", [o]);
46355 if (this.$popupMenu != null) {
46356 this.$popupMenu.setComponentOrientation (o);
46357 }}, "java.awt.ComponentOrientation");
46358 Clazz_overrideMethod (c$, "setAccelerator", 
46359 function (keyStroke) {
46360 throw  new Error ("setAccelerator() is not defined for JMenu.  Use setMnemonic() instead.");
46361 }, "javax.swing.KeyStroke");
46362 Clazz_defineMethod (c$, "processKeyEvent", 
46363 function (evt) {
46364 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46365 if (evt.isConsumed ()) return;
46366 Clazz_superCall (this, javax.swing.JMenu, "processKeyEvent", [evt]);
46367 }, "java.awt.event.KeyEvent");
46368 Clazz_defineMethod (c$, "doClick", 
46369 function (pressTime) {
46370 var me = this.buildMenuElementArray (this);
46371 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
46372 }, "~N");
46373 Clazz_defineMethod (c$, "buildMenuElementArray", 
46374  function (leaf) {
46375 var elements =  new java.util.Vector ();
46376 var current = leaf.getPopupMenu ();
46377 var pop;
46378 var menu;
46379 var bar;
46380 while (true) {
46381 if (Clazz_instanceOf (current, javax.swing.JPopupMenu)) {
46382 pop = current;
46383 elements.insertElementAt (pop, 0);
46384 current = pop.getInvoker ();
46385 } else if (Clazz_instanceOf (current, javax.swing.JMenu)) {
46386 menu = current;
46387 elements.insertElementAt (menu, 0);
46388 current = menu.getParent ();
46389 } else if (Clazz_instanceOf (current, javax.swing.JMenuBar)) {
46390 bar = current;
46391 elements.insertElementAt (bar, 0);
46392 var me =  new Array (elements.size ());
46393 elements.copyInto (me);
46394 return me;
46395 }}
46396 }, "javax.swing.JMenu");
46397 c$.$JMenu$MenuChangeListener$ = function () {
46398 Clazz_pu$h(self.c$);
46399 c$ = Clazz_decorateAsClass (function () {
46400 Clazz_prepareCallback (this, arguments);
46401 this.isSelected = false;
46402 Clazz_instantialize (this, arguments);
46403 }, javax.swing.JMenu, "MenuChangeListener", null, javax.swing.event.ChangeListener);
46404 Clazz_overrideMethod (c$, "stateChanged", 
46405 function (a) {
46406 var b = a.getSource ();
46407 var c = b.isSelected ();
46408 if (c != this.isSelected) {
46409 if (c == true) {
46410 this.b$["javax.swing.JMenu"].fireMenuSelected ();
46411 } else {
46412 this.b$["javax.swing.JMenu"].fireMenuDeselected ();
46413 }this.isSelected = c;
46414 }}, "javax.swing.event.ChangeEvent");
46415 c$ = Clazz_p0p ();
46416 };
46417 c$.$JMenu$WinListener$ = function () {
46418 Clazz_pu$h(self.c$);
46419 c$ = Clazz_decorateAsClass (function () {
46420 Clazz_prepareCallback (this, arguments);
46421 this.popupMenu = null;
46422 Clazz_instantialize (this, arguments);
46423 }, javax.swing.JMenu, "WinListener", java.awt.event.WindowAdapter);
46424 Clazz_makeConstructor (c$, 
46425 function (a) {
46426 Clazz_superConstructor (this, javax.swing.JMenu.WinListener, []);
46427 this.popupMenu = a;
46428 }, "javax.swing.JPopupMenu");
46429 Clazz_overrideMethod (c$, "windowClosing", 
46430 function (a) {
46431 this.b$["javax.swing.JMenu"].setSelected (false);
46432 }, "java.awt.event.WindowEvent");
46433 c$ = Clazz_p0p ();
46434 };
46435 c$.$JMenu$1$ = function () {
46436 Clazz_pu$h(self.c$);
46437 c$ = Clazz_declareAnonymous (javax.swing, "JMenu$1", javax.swing.JMenuItem);
46438 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
46439 function (a) {
46440 var pcl = this.b$["javax.swing.JMenu"].createActionChangeListener (this);
46441 if (pcl == null) {
46442 pcl = Clazz_superCall (this, javax.swing.JMenu$1, "createActionPropertyChangeListener", [a]);
46443 }return pcl;
46444 }, "javax.swing.Action");
46445 c$ = Clazz_p0p ();
46446 };
46447 Clazz_defineStatics (c$,
46448 "$$uiClassID", "MenuUI");
46449 });
46450 Clazz_declarePackage ("java.awt.event");
46451 Clazz_load (["java.awt.event.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.event.WindowAdapter", null, function () {
46452 c$ = Clazz_declareType (java.awt.event, "WindowAdapter", null, [java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.awt.event.WindowFocusListener]);
46453 Clazz_overrideMethod (c$, "windowOpened", 
46454 function (e) {
46455 }, "java.awt.event.WindowEvent");
46456 Clazz_overrideMethod (c$, "windowClosing", 
46457 function (e) {
46458 }, "java.awt.event.WindowEvent");
46459 Clazz_overrideMethod (c$, "windowClosed", 
46460 function (e) {
46461 }, "java.awt.event.WindowEvent");
46462 Clazz_overrideMethod (c$, "windowIconified", 
46463 function (e) {
46464 }, "java.awt.event.WindowEvent");
46465 Clazz_overrideMethod (c$, "windowDeiconified", 
46466 function (e) {
46467 }, "java.awt.event.WindowEvent");
46468 Clazz_overrideMethod (c$, "windowActivated", 
46469 function (e) {
46470 }, "java.awt.event.WindowEvent");
46471 Clazz_overrideMethod (c$, "windowDeactivated", 
46472 function (e) {
46473 }, "java.awt.event.WindowEvent");
46474 Clazz_overrideMethod (c$, "windowStateChanged", 
46475 function (e) {
46476 }, "java.awt.event.WindowEvent");
46477 Clazz_overrideMethod (c$, "windowGainedFocus", 
46478 function (e) {
46479 }, "java.awt.event.WindowEvent");
46480 Clazz_overrideMethod (c$, "windowLostFocus", 
46481 function (e) {
46482 }, "java.awt.event.WindowEvent");
46483 });
46484 Clazz_declarePackage ("javax.swing");
46485 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 () {
46486 c$ = Clazz_decorateAsClass (function () {
46487 this.isMouseDragged = false;
46488 this.accelerator = null;
46489 Clazz_instantialize (this, arguments);
46490 }, javax.swing, "JMenuItem", javax.swing.AbstractButton, javax.swing.MenuElement);
46491 Clazz_makeConstructor (c$, 
46492 function () {
46493 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46494 this.init0 (null, null, -2147483648);
46495 });
46496 Clazz_makeConstructor (c$, 
46497 function (icon) {
46498 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46499 this.init0 (null, icon, -2147483648);
46500 }, "javax.swing.Icon");
46501 Clazz_makeConstructor (c$, 
46502 function (text) {
46503 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46504 this.init0 (text, null, -2147483648);
46505 }, "~S");
46506 Clazz_makeConstructor (c$, 
46507 function (a) {
46508 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46509 this.init0 (null, null, -2147483648);
46510 this.setAction (a);
46511 }, "javax.swing.Action");
46512 Clazz_makeConstructor (c$, 
46513 function (text, icon) {
46514 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46515 this.init0 (text, icon, -2147483648);
46516 }, "~S,javax.swing.Icon");
46517 Clazz_makeConstructor (c$, 
46518 function (text, mnemonic) {
46519 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46520 this.init0 (text, null, mnemonic);
46521 }, "~S,~N");
46522 Clazz_defineMethod (c$, "setModel", 
46523 function (newModel) {
46524 Clazz_superCall (this, javax.swing.JMenuItem, "setModel", [newModel]);
46525 if (Clazz_instanceOf (newModel, javax.swing.DefaultButtonModel)) {
46526 (newModel).setMenuItem (true);
46527 }}, "javax.swing.ButtonModel");
46528 Clazz_defineMethod (c$, "initFocusability", 
46529 function () {
46530 this.setFocusable (false);
46531 });
46532 Clazz_defineMethod (c$, "init0", 
46533 function (text, icon, mnemonic) {
46534 this.setModel ( new javax.swing.DefaultButtonModel ());
46535 this.init (text, icon);
46536 if (mnemonic >= 0) this.setMnemonic (mnemonic);
46537 this.initFocusability ();
46538 }, "~S,javax.swing.Icon,~N");
46539 Clazz_overrideMethod (c$, "init", 
46540 function (text, icon) {
46541 this.updateUI ();
46542 if (text != null) this.setText (text);
46543 if (icon != null) this.setIcon (icon);
46544 this.addFocusListener ( new javax.swing.JMenuItem.MenuItemFocusListener ());
46545 this.setUIProperty ("borderPainted", Boolean.FALSE);
46546 this.setFocusPainted (false);
46547 this.setHorizontalTextPosition (11);
46548 this.setHorizontalAlignment (10);
46549 }, "~S,javax.swing.Icon");
46550 Clazz_overrideMethod (c$, "updateUI", 
46551 function () {
46552 this.setUI (javax.swing.UIManager.getUI (this));
46553 });
46554 Clazz_overrideMethod (c$, "getUIClassID", 
46555 function () {
46556 return "MenuItemUI";
46557 });
46558 Clazz_defineMethod (c$, "setArmed", 
46559 function (b) {
46560 var model = this.getModel ();
46561 if (model.isArmed () != b) {
46562 model.setArmed (b);
46563 }}, "~B");
46564 Clazz_defineMethod (c$, "isArmed", 
46565 function () {
46566 var model = this.getModel ();
46567 return model.isArmed ();
46568 });
46569 Clazz_defineMethod (c$, "setEnabled", 
46570 function (b) {
46571 if (!b && !javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
46572 this.setArmed (false);
46573 }Clazz_superCall (this, javax.swing.JMenuItem, "setEnabled", [b]);
46574 }, "~B");
46575 Clazz_overrideMethod (c$, "alwaysOnTop", 
46576 function () {
46577 return true;
46578 });
46579 Clazz_defineMethod (c$, "setAccelerator", 
46580 function (keyStroke) {
46581 var oldAccelerator = this.accelerator;
46582 this.accelerator = keyStroke;
46583 this.repaint ();
46584 this.revalidate ();
46585 this.firePropertyChangeObject ("accelerator", oldAccelerator, this.accelerator);
46586 }, "javax.swing.KeyStroke");
46587 Clazz_defineMethod (c$, "getAccelerator", 
46588 function () {
46589 return this.accelerator;
46590 });
46591 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
46592 function (a) {
46593 Clazz_superCall (this, javax.swing.JMenuItem, "configurePropertiesFromAction", [a]);
46594 this.configureAcceleratorFromAction (a);
46595 }, "javax.swing.Action");
46596 Clazz_overrideMethod (c$, "setIconFromAction", 
46597 function (a) {
46598 var icon = null;
46599 if (a != null) {
46600 icon = a.getValue ("SmallIcon");
46601 }this.setIcon (icon);
46602 }, "javax.swing.Action");
46603 Clazz_overrideMethod (c$, "largeIconChanged", 
46604 function (a) {
46605 }, "javax.swing.Action");
46606 Clazz_overrideMethod (c$, "smallIconChanged", 
46607 function (a) {
46608 this.setIconFromAction (a);
46609 }, "javax.swing.Action");
46610 Clazz_defineMethod (c$, "configureAcceleratorFromAction", 
46611 function (a) {
46612 var ks = (a == null) ? null : a.getValue ("AcceleratorKey");
46613 this.setAccelerator (ks);
46614 }, "javax.swing.Action");
46615 Clazz_defineMethod (c$, "actionPropertyChanged", 
46616 function (action, propertyName) {
46617 if (propertyName === "AcceleratorKey") {
46618 this.configureAcceleratorFromAction (action);
46619 } else {
46620 Clazz_superCall (this, javax.swing.JMenuItem, "actionPropertyChanged", [action, propertyName]);
46621 }}, "javax.swing.Action,~S");
46622 Clazz_defineMethod (c$, "processMouseEvent", 
46623 function (e, path, manager) {
46624 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));
46625 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
46626 Clazz_defineMethod (c$, "processKeyEvent", 
46627 function (e, path, manager) {
46628 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
46629 this.processMenuKeyEvent (mke);
46630 if (mke.isConsumed ()) {
46631 e.consume ();
46632 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
46633 Clazz_defineMethod (c$, "processMenuDragMouseEvent", 
46634 function (e) {
46635 switch (e.getID ()) {
46636 case 504:
46637 this.isMouseDragged = false;
46638 this.fireMenuDragMouseEntered (e);
46639 break;
46640 case 505:
46641 this.isMouseDragged = false;
46642 this.fireMenuDragMouseExited (e);
46643 break;
46644 case 506:
46645 this.isMouseDragged = true;
46646 this.fireMenuDragMouseDragged (e);
46647 break;
46648 case 502:
46649 if (this.isMouseDragged) this.fireMenuDragMouseReleased (e);
46650 break;
46651 default:
46652 break;
46653 }
46654 }, "javax.swing.event.MenuDragMouseEvent");
46655 Clazz_defineMethod (c$, "processMenuKeyEvent", 
46656 function (e) {
46657 switch (e.getID ()) {
46658 case 401:
46659 this.fireMenuKeyPressed (e);
46660 break;
46661 case 402:
46662 this.fireMenuKeyReleased (e);
46663 break;
46664 case 400:
46665 this.fireMenuKeyTyped (e);
46666 break;
46667 default:
46668 break;
46669 }
46670 }, "javax.swing.event.MenuKeyEvent");
46671 Clazz_defineMethod (c$, "fireMenuDragMouseEntered", 
46672 function (event) {
46673 var listeners = this.listenerList.getListenerList ();
46674 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46675 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46676 (listeners[i + 1]).menuDragMouseEntered (event);
46677 }}
46678 }, "javax.swing.event.MenuDragMouseEvent");
46679 Clazz_defineMethod (c$, "fireMenuDragMouseExited", 
46680 function (event) {
46681 var listeners = this.listenerList.getListenerList ();
46682 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46683 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46684 (listeners[i + 1]).menuDragMouseExited (event);
46685 }}
46686 }, "javax.swing.event.MenuDragMouseEvent");
46687 Clazz_defineMethod (c$, "fireMenuDragMouseDragged", 
46688 function (event) {
46689 var listeners = this.listenerList.getListenerList ();
46690 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46691 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46692 (listeners[i + 1]).menuDragMouseDragged (event);
46693 }}
46694 }, "javax.swing.event.MenuDragMouseEvent");
46695 Clazz_defineMethod (c$, "fireMenuDragMouseReleased", 
46696 function (event) {
46697 var listeners = this.listenerList.getListenerList ();
46698 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46699 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46700 (listeners[i + 1]).menuDragMouseReleased (event);
46701 }}
46702 }, "javax.swing.event.MenuDragMouseEvent");
46703 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
46704 function (event) {
46705 var listeners = this.listenerList.getListenerList ();
46706 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46707 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46708 (listeners[i + 1]).menuKeyPressed (event);
46709 }}
46710 }, "javax.swing.event.MenuKeyEvent");
46711 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
46712 function (event) {
46713 var listeners = this.listenerList.getListenerList ();
46714 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46715 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46716 (listeners[i + 1]).menuKeyReleased (event);
46717 }}
46718 }, "javax.swing.event.MenuKeyEvent");
46719 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
46720 function (event) {
46721 var listeners = this.listenerList.getListenerList ();
46722 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46723 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46724 (listeners[i + 1]).menuKeyTyped (event);
46725 }}
46726 }, "javax.swing.event.MenuKeyEvent");
46727 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46728 function (isIncluded) {
46729 this.setArmed (isIncluded);
46730 }, "~B");
46731 Clazz_overrideMethod (c$, "getSubElements", 
46732 function () {
46733 return  new Array (0);
46734 });
46735 Clazz_defineMethod (c$, "getComponent", 
46736 function () {
46737 return this;
46738 });
46739 Clazz_defineMethod (c$, "addMenuDragMouseListener", 
46740 function (l) {
46741 this.listenerList.add (javax.swing.event.MenuDragMouseListener, l);
46742 }, "javax.swing.event.MenuDragMouseListener");
46743 Clazz_defineMethod (c$, "removeMenuDragMouseListener", 
46744 function (l) {
46745 this.listenerList.remove (javax.swing.event.MenuDragMouseListener, l);
46746 }, "javax.swing.event.MenuDragMouseListener");
46747 Clazz_defineMethod (c$, "getMenuDragMouseListeners", 
46748 function () {
46749 return this.listenerList.getListeners (javax.swing.event.MenuDragMouseListener);
46750 });
46751 Clazz_defineMethod (c$, "addMenuKeyListener", 
46752 function (l) {
46753 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
46754 }, "javax.swing.event.MenuKeyListener");
46755 Clazz_defineMethod (c$, "removeMenuKeyListener", 
46756 function (l) {
46757 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
46758 }, "javax.swing.event.MenuKeyListener");
46759 Clazz_defineMethod (c$, "getMenuKeyListeners", 
46760 function () {
46761 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
46762 });
46763 Clazz_pu$h(self.c$);
46764 c$ = Clazz_declareType (javax.swing.JMenuItem, "MenuItemFocusListener", null, java.awt.event.FocusListener);
46765 Clazz_overrideMethod (c$, "focusGained", 
46766 function (a) {
46767 }, "java.awt.event.FocusEvent");
46768 Clazz_overrideMethod (c$, "focusLost", 
46769 function (a) {
46770 var b = a.getSource ();
46771 if (b.isFocusPainted ()) {
46772 b.repaint ();
46773 }}, "java.awt.event.FocusEvent");
46774 c$ = Clazz_p0p ();
46775 Clazz_defineStatics (c$,
46776 "$uiClassID", "MenuItemUI");
46777 });
46778 Clazz_declarePackage ("javax.swing");
46779 Clazz_load (["javax.swing.JMenuItem", "$.SwingConstants"], "javax.swing.JCheckBoxMenuItem", ["javax.swing.JToggleButton"], function () {
46780 c$ = Clazz_declareType (javax.swing, "JCheckBoxMenuItem", javax.swing.JMenuItem, javax.swing.SwingConstants);
46781 Clazz_makeConstructor (c$, 
46782 function () {
46783 this.construct (null, null, false);
46784 });
46785 Clazz_makeConstructor (c$, 
46786 function (icon) {
46787 this.construct (null, icon, false);
46788 }, "javax.swing.Icon");
46789 Clazz_makeConstructor (c$, 
46790 function (text) {
46791 this.construct (text, null, false);
46792 }, "~S");
46793 Clazz_makeConstructor (c$, 
46794 function (a) {
46795 this.construct ();
46796 this.setAction (a);
46797 }, "javax.swing.Action");
46798 Clazz_makeConstructor (c$, 
46799 function (text, icon) {
46800 this.construct (text, icon, false);
46801 }, "~S,javax.swing.Icon");
46802 Clazz_makeConstructor (c$, 
46803 function (text, b) {
46804 this.construct (text, null, b);
46805 }, "~S,~B");
46806 Clazz_makeConstructor (c$, 
46807 function (text, icon, b) {
46808 Clazz_superConstructor (this, javax.swing.JCheckBoxMenuItem, [text, icon]);
46809 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
46810 this.setSelected (b);
46811 this.setFocusable (false);
46812 }, "~S,javax.swing.Icon,~B");
46813 Clazz_overrideMethod (c$, "getUIClassID", 
46814 function () {
46815 return "CheckBoxMenuItemUI";
46816 });
46817 Clazz_defineMethod (c$, "getState", 
46818 function () {
46819 return this.isSelected ();
46820 });
46821 Clazz_defineMethod (c$, "setState", 
46822 function (b) {
46823 this.setSelected (b);
46824 }, "~B");
46825 Clazz_overrideMethod (c$, "getSelectedObjects", 
46826 function () {
46827 if (this.isSelected () == false) return null;
46828 var selectedObjects =  new Array (1);
46829 selectedObjects[0] = this.getText ();
46830 return selectedObjects;
46831 });
46832 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
46833 function () {
46834 return true;
46835 });
46836 Clazz_defineStatics (c$,
46837 "$$uiClassID", "CheckBoxMenuItemUI");
46838 });
46839 Clazz_declarePackage ("javax.swing");
46840 Clazz_load (["javax.swing.JMenuItem"], "javax.swing.JRadioButtonMenuItem", ["javax.swing.JToggleButton"], function () {
46841 c$ = Clazz_declareType (javax.swing, "JRadioButtonMenuItem", javax.swing.JMenuItem);
46842 Clazz_makeConstructor (c$, 
46843 function () {
46844 this.construct (null, null, false);
46845 });
46846 Clazz_makeConstructor (c$, 
46847 function (icon) {
46848 this.construct (null, icon, false);
46849 }, "javax.swing.Icon");
46850 Clazz_makeConstructor (c$, 
46851 function (text) {
46852 this.construct (text, null, false);
46853 }, "~S");
46854 Clazz_makeConstructor (c$, 
46855 function (a) {
46856 this.construct ();
46857 this.setAction (a);
46858 }, "javax.swing.Action");
46859 Clazz_makeConstructor (c$, 
46860 function (text, icon) {
46861 this.construct (text, icon, false);
46862 }, "~S,javax.swing.Icon");
46863 Clazz_makeConstructor (c$, 
46864 function (text, selected) {
46865 this.construct (text);
46866 this.setSelected (selected);
46867 }, "~S,~B");
46868 Clazz_makeConstructor (c$, 
46869 function (icon, selected) {
46870 this.construct (null, icon, selected);
46871 }, "javax.swing.Icon,~B");
46872 Clazz_makeConstructor (c$, 
46873 function (text, icon, selected) {
46874 Clazz_superConstructor (this, javax.swing.JRadioButtonMenuItem, [text, icon]);
46875 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
46876 this.setSelected (selected);
46877 this.setFocusable (false);
46878 }, "~S,javax.swing.Icon,~B");
46879 Clazz_overrideMethod (c$, "getUIClassID", 
46880 function () {
46881 return "RadioButtonMenuItemUI";
46882 });
46883 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
46884 function () {
46885 return true;
46886 });
46887 Clazz_defineStatics (c$,
46888 "$$uiClassID", "RadioButtonMenuItemUI");
46889 });
46890 Clazz_declarePackage ("javax.swing.event");
46891 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuDragMouseListener", null, function () {
46892 Clazz_declareInterface (javax.swing.event, "MenuDragMouseListener", java.util.EventListener);
46893 });
46894 Clazz_declarePackage ("javax.swing.event");
46895 Clazz_load (["java.awt.event.KeyEvent"], "javax.swing.event.MenuKeyEvent", null, function () {
46896 c$ = Clazz_decorateAsClass (function () {
46897 this.path = null;
46898 this.manager = null;
46899 Clazz_instantialize (this, arguments);
46900 }, javax.swing.event, "MenuKeyEvent", java.awt.event.KeyEvent);
46901 Clazz_makeConstructor (c$, 
46902 function (source, id, when, modifiers, keyCode, keyChar, p, m) {
46903 Clazz_superConstructor (this, javax.swing.event.MenuKeyEvent, [source, id, when, modifiers, keyCode, keyChar]);
46904 this.path = p;
46905 this.manager = m;
46906 }, "java.awt.Component,~N,~N,~N,~N,~S,~A,javax.swing.MenuSelectionManager");
46907 Clazz_defineMethod (c$, "getPath", 
46908 function () {
46909 return this.path;
46910 });
46911 Clazz_defineMethod (c$, "getMenuSelectionManager", 
46912 function () {
46913 return this.manager;
46914 });
46915 });
46916 Clazz_declarePackage ("javax.swing.event");
46917 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuKeyListener", null, function () {
46918 Clazz_declareInterface (javax.swing.event, "MenuKeyListener", java.util.EventListener);
46919 });
46920 Clazz_declarePackage ("javax.swing");
46921 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 () {
46922 c$ = Clazz_decorateAsClass (function () {
46923 this.invoker = null;
46924 this.popup = null;
46925 this.frame = null;
46926 this.desiredLocationX = 0;
46927 this.desiredLocationY = 0;
46928 this.label = null;
46929 this.$paintBorder = true;
46930 this.margin = null;
46931 this.lightWeightPopup = true;
46932 this.selectionModel = null;
46933 Clazz_instantialize (this, arguments);
46934 }, javax.swing, "JPopupMenu", javax.swing.JComponent, javax.swing.MenuElement);
46935 c$.setDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "setDefaultLightWeightPopupEnabled", 
46936 function (aFlag) {
46937 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.$valueOf (aFlag));
46938 }, "~B");
46939 c$.getDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "getDefaultLightWeightPopupEnabled", 
46940 function () {
46941 var b = javax.swing.SwingUtilities.appContextGet (javax.swing.JPopupMenu.defaultLWPopupEnabledKey);
46942 if (b == null) {
46943 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.TRUE);
46944 return true;
46945 }return b.booleanValue ();
46946 });
46947 Clazz_makeConstructor (c$, 
46948 function () {
46949 this.construct (null);
46950 });
46951 Clazz_makeConstructor (c$, 
46952 function (label) {
46953 Clazz_superConstructor (this, javax.swing.JPopupMenu, []);
46954 this.label = label;
46955 this.lightWeightPopup = javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled ();
46956 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
46957 this.enableEvents (16);
46958 this.updateUI ();
46959 }, "~S");
46960 Clazz_overrideMethod (c$, "getUI", 
46961 function () {
46962 return this.ui;
46963 });
46964 Clazz_overrideMethod (c$, "updateUI", 
46965 function () {
46966 this.setUI (javax.swing.UIManager.getUI (this));
46967 });
46968 Clazz_overrideMethod (c$, "getUIClassID", 
46969 function () {
46970 return "PopupMenuUI";
46971 });
46972 Clazz_defineMethod (c$, "processKeyEvent", 
46973 function (evt) {
46974 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46975 if (evt.isConsumed ()) {
46976 return;
46977 }Clazz_superCall (this, javax.swing.JPopupMenu, "processKeyEvent", [evt]);
46978 }, "java.awt.event.KeyEvent");
46979 Clazz_defineMethod (c$, "getSelectionModel", 
46980 function () {
46981 return this.selectionModel;
46982 });
46983 Clazz_defineMethod (c$, "setSelectionModel", 
46984 function (model) {
46985 this.selectionModel = model;
46986 }, "javax.swing.SingleSelectionModel");
46987 Clazz_defineMethod (c$, "add", 
46988 function (menuItem) {
46989 Clazz_superCall (this, javax.swing.JPopupMenu, "add", [menuItem]);
46990 return menuItem;
46991 }, "javax.swing.JMenuItem");
46992 Clazz_defineMethod (c$, "add", 
46993 function (s) {
46994 return this.add ( new javax.swing.JMenuItem (s));
46995 }, "~S");
46996 Clazz_defineMethod (c$, "add", 
46997 function (a) {
46998 var mi = this.createActionComponent (a);
46999 mi.setAction (a);
47000 this.add (mi);
47001 return mi;
47002 }, "javax.swing.Action");
47003 Clazz_defineMethod (c$, "adjustPopupLocationToFitScreen", 
47004 function (xposition, yposition) {
47005 var p =  new java.awt.Point (xposition, yposition);
47006 if (javax.swing.JPopupMenu.popupPostionFixDisabled == true || java.awt.GraphicsEnvironment.isHeadless ()) return p;
47007 return p;
47008 }, "~N,~N");
47009 Clazz_defineMethod (c$, "createActionComponent", 
47010 function (a) {
47011 var mi = ((Clazz_isClassDefined ("javax.swing.JPopupMenu$1") ? 0 : javax.swing.JPopupMenu.$JPopupMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JPopupMenu$1, this, null));
47012 mi.setHorizontalTextPosition (11);
47013 mi.setVerticalTextPosition (0);
47014 return mi;
47015 }, "javax.swing.Action");
47016 Clazz_defineMethod (c$, "createActionChangeListener", 
47017 function (b) {
47018 return b.createActionPropertyChangeListener0 (b.getAction ());
47019 }, "javax.swing.JMenuItem");
47020 Clazz_defineMethod (c$, "remove", 
47021 function (pos) {
47022 if (pos < 0) {
47023 throw  new IllegalArgumentException ("index less than zero.");
47024 }if (pos > this.getComponentCount () - 1) {
47025 throw  new IllegalArgumentException ("index greater than the number of items.");
47026 }Clazz_superCall (this, javax.swing.JPopupMenu, "remove", [pos]);
47027 }, "~N");
47028 Clazz_defineMethod (c$, "setLightWeightPopupEnabled", 
47029 function (aFlag) {
47030 this.lightWeightPopup = aFlag;
47031 }, "~B");
47032 Clazz_defineMethod (c$, "isLightWeightPopupEnabled", 
47033 function () {
47034 return this.lightWeightPopup;
47035 });
47036 Clazz_defineMethod (c$, "getLabel", 
47037 function () {
47038 return this.label;
47039 });
47040 Clazz_defineMethod (c$, "setLabel", 
47041 function (label) {
47042 var oldValue = this.label;
47043 this.label = label;
47044 this.firePropertyChangeObject ("label", oldValue, label);
47045 this.invalidate ();
47046 this.repaint ();
47047 }, "~S");
47048 Clazz_defineMethod (c$, "addSeparator", 
47049 function () {
47050 this.add ( new javax.swing.JPopupMenu.Separator ());
47051 });
47052 Clazz_defineMethod (c$, "insert", 
47053 function (a, index) {
47054 var mi = this.createActionComponent (a);
47055 mi.setAction (a);
47056 this.insert (mi, index);
47057 }, "javax.swing.Action,~N");
47058 Clazz_defineMethod (c$, "insert", 
47059 function (component, index) {
47060 if (index < 0) {
47061 throw  new IllegalArgumentException ("index less than zero.");
47062 }var nitems = this.getComponentCount ();
47063 var tempItems =  new java.util.Vector ();
47064 for (var i = index; i < nitems; i++) {
47065 tempItems.addElement (this.getComponent (index));
47066 this.remove (index);
47067 }
47068 this.add (component);
47069 for (var i = 0; i < tempItems.size (); i++) {
47070 this.add (tempItems.elementAt (i));
47071 }
47072 }, "java.awt.Component,~N");
47073 Clazz_defineMethod (c$, "addPopupMenuListener", 
47074 function (l) {
47075 this.listenerList.add (javax.swing.event.PopupMenuListener, l);
47076 }, "javax.swing.event.PopupMenuListener");
47077 Clazz_defineMethod (c$, "removePopupMenuListener", 
47078 function (l) {
47079 this.listenerList.remove (javax.swing.event.PopupMenuListener, l);
47080 }, "javax.swing.event.PopupMenuListener");
47081 Clazz_defineMethod (c$, "getPopupMenuListeners", 
47082 function () {
47083 return this.listenerList.getListeners (javax.swing.event.PopupMenuListener);
47084 });
47085 Clazz_defineMethod (c$, "addMenuKeyListener", 
47086 function (l) {
47087 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
47088 }, "javax.swing.event.MenuKeyListener");
47089 Clazz_defineMethod (c$, "removeMenuKeyListener", 
47090 function (l) {
47091 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
47092 }, "javax.swing.event.MenuKeyListener");
47093 Clazz_defineMethod (c$, "getMenuKeyListeners", 
47094 function () {
47095 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
47096 });
47097 Clazz_defineMethod (c$, "firePopupMenuWillBecomeVisible", 
47098 function () {
47099 var listeners = this.listenerList.getListenerList ();
47100 var e = null;
47101 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47102 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47103 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47104 (listeners[i + 1]).popupMenuWillBecomeVisible (e);
47105 }}
47106 });
47107 Clazz_defineMethod (c$, "firePopupMenuWillBecomeInvisible", 
47108 function () {
47109 var listeners = this.listenerList.getListenerList ();
47110 var e = null;
47111 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47112 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47113 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47114 (listeners[i + 1]).popupMenuWillBecomeInvisible (e);
47115 }}
47116 });
47117 Clazz_defineMethod (c$, "firePopupMenuCanceled", 
47118 function () {
47119 var listeners = this.listenerList.getListenerList ();
47120 var e = null;
47121 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47122 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47123 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47124 (listeners[i + 1]).popupMenuCanceled (e);
47125 }}
47126 });
47127 Clazz_overrideMethod (c$, "alwaysOnTop", 
47128 function () {
47129 return true;
47130 });
47131 Clazz_defineMethod (c$, "pack", 
47132 function () {
47133 if (this.popup != null) {
47134 var pref = this.getPreferredSize ();
47135 if (pref == null || pref.width != this.getWidth () || pref.height != this.getHeight ()) {
47136 this.popup = this.getPopup ();
47137 } else {
47138 this.validate ();
47139 }}});
47140 Clazz_overrideMethod (c$, "setVisible", 
47141 function (b) {
47142 if (b == this.isVisible ()) return;
47143 if (b == false) {
47144 var doCanceled = this.getClientProperty ("JPopupMenu.firePopupMenuCanceled");
47145 if (doCanceled != null && doCanceled === Boolean.TRUE) {
47146 this.putClientProperty ("JPopupMenu.firePopupMenuCanceled", Boolean.FALSE);
47147 this.firePopupMenuCanceled ();
47148 }this.getSelectionModel ().clearSelection ();
47149 } else {
47150 if (this.isPopupMenu ()) {
47151 var me =  new Array (1);
47152 me[0] = this;
47153 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
47154 }}if (b) {
47155 this.firePopupMenuWillBecomeVisible ();
47156 this.popup = this.getPopup ();
47157 this.firePropertyChangeObject ("visible", Boolean.FALSE, Boolean.TRUE);
47158 } else if (this.popup != null) {
47159 this.firePopupMenuWillBecomeInvisible ();
47160 this.popup.hide ();
47161 this.popup = null;
47162 this.firePropertyChangeObject ("visible", Boolean.TRUE, Boolean.FALSE);
47163 if (this.isPopupMenu ()) {
47164 javax.swing.MenuSelectionManager.defaultManager ().clearSelectedPath ();
47165 }}}, "~B");
47166 Clazz_defineMethod (c$, "getPopup", 
47167  function () {
47168 var oldPopup = this.popup;
47169 if (oldPopup != null) {
47170 oldPopup.hide ();
47171 }var popupFactory = javax.swing.PopupFactory.getSharedInstance ();
47172 if (this.isLightWeightPopupEnabled ()) {
47173 popupFactory.setPopupType (0);
47174 } else {
47175 popupFactory.setPopupType (1);
47176 }var p = this.adjustPopupLocationToFitScreen (this.desiredLocationX, this.desiredLocationY);
47177 this.desiredLocationX = p.x;
47178 this.desiredLocationY = p.y;
47179 var newPopup = this.getUI ().getPopup (this, this.desiredLocationX, this.desiredLocationY);
47180 popupFactory.setPopupType (0);
47181 newPopup.show ();
47182 return newPopup;
47183 });
47184 Clazz_overrideMethod (c$, "isVisible", 
47185 function () {
47186 if (this.popup != null) return true;
47187  else return false;
47188 });
47189 Clazz_defineMethod (c$, "setLocation", 
47190 function (x, y) {
47191 var oldX = this.desiredLocationX;
47192 var oldY = this.desiredLocationY;
47193 this.desiredLocationX = x;
47194 this.desiredLocationY = y;
47195 if (this.popup != null && (x != oldX || y != oldY)) {
47196 this.popup = this.getPopup ();
47197 }}, "~N,~N");
47198 Clazz_defineMethod (c$, "isPopupMenu", 
47199  function () {
47200 return ((this.invoker != null) && !(Clazz_instanceOf (this.invoker, javax.swing.JMenu)));
47201 });
47202 Clazz_defineMethod (c$, "getInvoker", 
47203 function () {
47204 return this.invoker;
47205 });
47206 Clazz_defineMethod (c$, "setInvoker", 
47207 function (invoker) {
47208 var oldInvoker = this.invoker;
47209 this.invoker = invoker;
47210 if ((oldInvoker !== this.invoker) && (this.ui != null)) {
47211 this.ui.uninstallUI (this);
47212 this.ui.installUI (this);
47213 }this.invalidate ();
47214 }, "java.awt.Component");
47215 Clazz_defineMethod (c$, "show", 
47216 function (invoker, x, y) {
47217 this.setInvoker (invoker);
47218 var newFrame = javax.swing.JPopupMenu.getFrame (invoker);
47219 if (newFrame !== this.frame) {
47220 if (newFrame != null) {
47221 this.frame = newFrame;
47222 if (this.popup != null) {
47223 this.setVisible (false);
47224 }}}var invokerOrigin;
47225 if (invoker != null) {
47226 invokerOrigin = invoker.getLocationOnScreen ();
47227 var lx;
47228 var ly;
47229 lx = (invokerOrigin.x) + (x);
47230 ly = (invokerOrigin.y) + (y);
47231 if (lx > 2147483647) lx = 2147483647;
47232 if (lx < -2147483648) lx = -2147483648;
47233 if (ly > 2147483647) ly = 2147483647;
47234 if (ly < -2147483648) ly = -2147483648;
47235 this.setLocation (lx, ly);
47236 } else {
47237 this.setLocation (x, y);
47238 }this.setVisible (true);
47239 }, "java.awt.Component,~N,~N");
47240 Clazz_defineMethod (c$, "getRootPopupMenu", 
47241 function () {
47242 var mp = this;
47243 while ((mp != null) && (mp.isPopupMenu () != true) && (mp.getInvoker () != null) && (mp.getInvoker ().getParent () != null) && (Clazz_instanceOf (mp.getInvoker ().getParent (), javax.swing.JPopupMenu))) {
47244 mp = mp.getInvoker ().getParent ();
47245 }
47246 return mp;
47247 });
47248 Clazz_defineMethod (c$, "getComponentAtIndex", 
47249 function (i) {
47250 return this.getComponent (i);
47251 }, "~N");
47252 Clazz_defineMethod (c$, "getComponentIndex", 
47253 function (c) {
47254 var ncomponents = this.getComponentCount ();
47255 var component = this.getComponents ();
47256 for (var i = 0; i < ncomponents; i++) {
47257 var comp = component[i];
47258 if (comp === c) return i;
47259 }
47260 return -1;
47261 }, "java.awt.Component");
47262 Clazz_defineMethod (c$, "setPopupSize", 
47263 function (d) {
47264 var oldSize = this.getPreferredSize ();
47265 this.setPreferredSize (d);
47266 if (this.popup != null) {
47267 var newSize = this.getPreferredSize ();
47268 if (!oldSize.equals (newSize)) {
47269 this.popup = this.getPopup ();
47270 }}}, "java.awt.Dimension");
47271 Clazz_defineMethod (c$, "setPopupSize", 
47272 function (width, height) {
47273 this.setPopupSize ( new java.awt.Dimension (width, height));
47274 }, "~N,~N");
47275 Clazz_defineMethod (c$, "setSelected", 
47276 function (sel) {
47277 var model = this.getSelectionModel ();
47278 var index = this.getComponentIndex (sel);
47279 model.setSelectedIndex (index);
47280 }, "java.awt.Component");
47281 Clazz_defineMethod (c$, "isBorderPainted", 
47282 function () {
47283 return this.$paintBorder;
47284 });
47285 Clazz_defineMethod (c$, "setBorderPainted", 
47286 function (b) {
47287 this.$paintBorder = b;
47288 this.repaint ();
47289 }, "~B");
47290 Clazz_defineMethod (c$, "paintBorder", 
47291 function (g) {
47292 if (this.isBorderPainted ()) {
47293 Clazz_superCall (this, javax.swing.JPopupMenu, "paintBorder", [g]);
47294 }}, "java.awt.Graphics");
47295 Clazz_defineMethod (c$, "getMargin", 
47296 function () {
47297 if (this.margin == null) {
47298 return  new java.awt.Insets (0, 0, 0, 0);
47299 } else {
47300 return this.margin;
47301 }});
47302 Clazz_defineMethod (c$, "isSubPopupMenu", 
47303 function (popup) {
47304 var ncomponents = this.getComponentCount ();
47305 var component = this.getComponents ();
47306 for (var i = 0; i < ncomponents; i++) {
47307 var comp = component[i];
47308 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
47309 var menu = comp;
47310 var subPopup = menu.getPopupMenu ();
47311 if (subPopup === popup) return true;
47312 if (subPopup.isSubPopupMenu (popup)) return true;
47313 }}
47314 return false;
47315 }, "javax.swing.JPopupMenu");
47316 c$.getFrame = Clazz_defineMethod (c$, "getFrame", 
47317  function (c) {
47318 var w = c;
47319 while (!(Clazz_instanceOf (w, java.awt.Frame)) && (w != null)) {
47320 w = w.getParent ();
47321 }
47322 return w;
47323 }, "java.awt.Component");
47324 Clazz_defineMethod (c$, "paramString", 
47325 function () {
47326 var labelString = (this.label != null ? this.label : "");
47327 var paintBorderString = (this.$paintBorder ? "true" : "false");
47328 var marginString = (this.margin != null ? this.margin.toString () : "");
47329 var lightWeightPopupEnabledString = (this.isLightWeightPopupEnabled () ? "true" : "false");
47330 return Clazz_superCall (this, javax.swing.JPopupMenu, "paramString", []) + ",desiredLocationX=" + this.desiredLocationX + ",desiredLocationY=" + this.desiredLocationY + ",label=" + labelString + ",lightWeightPopupEnabled=" + lightWeightPopupEnabledString + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
47331 });
47332 Clazz_defineMethod (c$, "processMouseEvent", 
47333 function (event, path, manager) {
47334 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
47335 Clazz_defineMethod (c$, "processKeyEvent", 
47336 function (e, path, manager) {
47337 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
47338 this.processMenuKeyEvent (mke);
47339 if (mke.isConsumed ()) {
47340 e.consume ();
47341 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
47342 Clazz_defineMethod (c$, "processMenuKeyEvent", 
47343  function (e) {
47344 switch (e.getID ()) {
47345 case 401:
47346 this.fireMenuKeyPressed (e);
47347 break;
47348 case 402:
47349 this.fireMenuKeyReleased (e);
47350 break;
47351 case 400:
47352 this.fireMenuKeyTyped (e);
47353 break;
47354 default:
47355 break;
47356 }
47357 }, "javax.swing.event.MenuKeyEvent");
47358 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
47359  function (event) {
47360 var listeners = this.listenerList.getListenerList ();
47361 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47362 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47363 (listeners[i + 1]).menuKeyPressed (event);
47364 }}
47365 }, "javax.swing.event.MenuKeyEvent");
47366 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
47367  function (event) {
47368 var listeners = this.listenerList.getListenerList ();
47369 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47370 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47371 (listeners[i + 1]).menuKeyReleased (event);
47372 }}
47373 }, "javax.swing.event.MenuKeyEvent");
47374 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
47375  function (event) {
47376 var listeners = this.listenerList.getListenerList ();
47377 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47378 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47379 (listeners[i + 1]).menuKeyTyped (event);
47380 }}
47381 }, "javax.swing.event.MenuKeyEvent");
47382 Clazz_overrideMethod (c$, "menuSelectionChanged", 
47383 function (isIncluded) {
47384 if (Clazz_instanceOf (this.invoker, javax.swing.JMenu)) {
47385 var m = this.invoker;
47386 if (isIncluded) m.setPopupMenuVisible (true);
47387  else m.setPopupMenuVisible (false);
47388 }if (this.isPopupMenu () && !isIncluded) this.setVisible (false);
47389 }, "~B");
47390 Clazz_overrideMethod (c$, "getSubElements", 
47391 function () {
47392 var result;
47393 var tmp =  new java.util.Vector ();
47394 var c = this.getComponentCount ();
47395 var i;
47396 var m;
47397 for (i = 0; i < c; i++) {
47398 m = this.getComponent (i);
47399 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
47400 }
47401 result =  new Array (tmp.size ());
47402 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
47403
47404 return result;
47405 });
47406 Clazz_defineMethod (c$, "getComponent", 
47407 function () {
47408 return this;
47409 });
47410 Clazz_defineMethod (c$, "isPopupTrigger", 
47411 function (e) {
47412 return this.getUI ().isPopupTrigger (e);
47413 }, "java.awt.event.MouseEvent");
47414 c$.$JPopupMenu$1$ = function () {
47415 Clazz_pu$h(self.c$);
47416 c$ = Clazz_declareAnonymous (javax.swing, "JPopupMenu$1", javax.swing.JMenuItem);
47417 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
47418 function (a) {
47419 var pcl = this.b$["javax.swing.JPopupMenu"].createActionChangeListener (this);
47420 if (pcl == null) {
47421 pcl = Clazz_superCall (this, javax.swing.JPopupMenu$1, "createActionPropertyChangeListener", [a]);
47422 }return pcl;
47423 }, "javax.swing.Action");
47424 c$ = Clazz_p0p ();
47425 };
47426 Clazz_pu$h(self.c$);
47427 c$ = Clazz_declareType (javax.swing.JPopupMenu, "Separator", javax.swing.JSeparator);
47428 Clazz_makeConstructor (c$, 
47429 function () {
47430 Clazz_superConstructor (this, javax.swing.JPopupMenu.Separator, [0]);
47431 });
47432 Clazz_overrideMethod (c$, "getUIClassID", 
47433 function () {
47434 return "PopupMenuSeparatorUI";
47435 });
47436 c$ = Clazz_p0p ();
47437 Clazz_defineStatics (c$,
47438 "$uiClassID", "PopupMenuUI");
47439 c$.defaultLWPopupEnabledKey = c$.prototype.defaultLWPopupEnabledKey =  new Clazz._O ();
47440 Clazz_defineStatics (c$,
47441 "popupPostionFixDisabled", false);
47442 });
47443 Clazz_declarePackage ("javax.swing");
47444 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JSeparator", ["java.lang.IllegalArgumentException", "javax.swing.UIManager"], function () {
47445 c$ = Clazz_decorateAsClass (function () {
47446 this.orientation = 0;
47447 Clazz_instantialize (this, arguments);
47448 }, javax.swing, "JSeparator", javax.swing.JComponent, javax.swing.SwingConstants);
47449 Clazz_makeConstructor (c$, 
47450 function () {
47451 this.construct (0);
47452 });
47453 Clazz_makeConstructor (c$, 
47454 function (orientation) {
47455 Clazz_superConstructor (this, javax.swing.JSeparator, []);
47456 this.checkOrientation (orientation);
47457 this.orientation = orientation;
47458 this.setFocusable (false);
47459 this.updateUI ();
47460 }, "~N");
47461 Clazz_overrideMethod (c$, "getUI", 
47462 function () {
47463 return this.ui;
47464 });
47465 Clazz_overrideMethod (c$, "updateUI", 
47466 function () {
47467 this.setUI (javax.swing.UIManager.getUI (this));
47468 });
47469 Clazz_overrideMethod (c$, "getUIClassID", 
47470 function () {
47471 return "SeparatorUI";
47472 });
47473 Clazz_defineMethod (c$, "getOrientation", 
47474 function () {
47475 return this.orientation;
47476 });
47477 Clazz_defineMethod (c$, "setOrientation", 
47478 function (orientation) {
47479 if (this.orientation == orientation) {
47480 return;
47481 }var oldValue = this.orientation;
47482 this.checkOrientation (orientation);
47483 this.orientation = orientation;
47484 this.firePropertyChangeInt ("orientation", oldValue, orientation);
47485 this.revalidate ();
47486 this.repaint ();
47487 }, "~N");
47488 Clazz_defineMethod (c$, "checkOrientation", 
47489  function (orientation) {
47490 switch (orientation) {
47491 case 1:
47492 case 0:
47493 break;
47494 default:
47495 throw  new IllegalArgumentException ("orientation must be one of: VERTICAL, HORIZONTAL");
47496 }
47497 }, "~N");
47498 Clazz_defineMethod (c$, "paramString", 
47499 function () {
47500 var orientationString = (this.orientation == 0 ? "HORIZONTAL" : "VERTICAL");
47501 return Clazz_superCall (this, javax.swing.JSeparator, "paramString", []) + ",orientation=" + orientationString;
47502 });
47503 Clazz_defineStatics (c$,
47504 "$uiClassID", "SeparatorUI");
47505 });
47506 Clazz_declarePackage ("javax.swing");
47507 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 () {
47508 c$ = Clazz_decorateAsClass (function () {
47509 this.selection = null;
47510 this.changeEvent = null;
47511 this.listenerList = null;
47512 Clazz_instantialize (this, arguments);
47513 }, javax.swing, "MenuSelectionManager");
47514 Clazz_prepareFields (c$, function () {
47515 this.selection =  new java.util.Vector ();
47516 this.listenerList =  new javax.swing.event.EventListenerList ();
47517 });
47518 c$.defaultManager = Clazz_defineMethod (c$, "defaultManager", 
47519 function () {
47520 {
47521 var context = jssun.awt.AppContext.getAppContext ();
47522 var msm = context.get (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY);
47523 if (msm == null) {
47524 msm =  new javax.swing.MenuSelectionManager ();
47525 context.put (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY, msm);
47526 }return msm;
47527 }});
47528 Clazz_defineMethod (c$, "setSelectedPath", 
47529 function (path) {
47530 var i;
47531 var c;
47532 var currentSelectionCount = this.selection.size ();
47533 var firstDifference = 0;
47534 if (path == null) {
47535 path =  new Array (0);
47536 }for (i = 0, c = path.length; i < c; i++) {
47537 if (i < currentSelectionCount && this.selection.elementAt (i) === path[i]) firstDifference++;
47538  else break;
47539 }
47540 for (i = currentSelectionCount - 1; i >= firstDifference; i--) {
47541 var me = this.selection.elementAt (i);
47542 this.selection.removeElementAt (i);
47543 me.menuSelectionChanged (false);
47544 }
47545 for (i = firstDifference, c = path.length; i < c; i++) {
47546 if (path[i] != null) {
47547 this.selection.addElement (path[i]);
47548 path[i].menuSelectionChanged (true);
47549 }}
47550 this.fireStateChanged ();
47551 }, "~A");
47552 Clazz_defineMethod (c$, "getSelectedPath", 
47553 function () {
47554 var res =  new Array (this.selection.size ());
47555 var i;
47556 var c;
47557 for (i = 0, c = this.selection.size (); i < c; i++) res[i] = this.selection.elementAt (i);
47558
47559 return res;
47560 });
47561 Clazz_defineMethod (c$, "clearSelectedPath", 
47562 function () {
47563 if (this.selection.size () > 0) {
47564 this.setSelectedPath (null);
47565 }});
47566 Clazz_defineMethod (c$, "addChangeListener", 
47567 function (l) {
47568 this.listenerList.add (javax.swing.event.ChangeListener, l);
47569 }, "javax.swing.event.ChangeListener");
47570 Clazz_defineMethod (c$, "removeChangeListener", 
47571 function (l) {
47572 this.listenerList.remove (javax.swing.event.ChangeListener, l);
47573 }, "javax.swing.event.ChangeListener");
47574 Clazz_defineMethod (c$, "getChangeListeners", 
47575 function () {
47576 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
47577 });
47578 Clazz_defineMethod (c$, "fireStateChanged", 
47579 function () {
47580 var listeners = this.listenerList.getListenerList ();
47581 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47582 if (listeners[i] === javax.swing.event.ChangeListener) {
47583 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
47584 (listeners[i + 1]).stateChanged (this.changeEvent);
47585 }}
47586 });
47587 Clazz_defineMethod (c$, "processMouseEvent", 
47588 function (event) {
47589 var screenX;
47590 var screenY;
47591 var p;
47592 var i;
47593 var j;
47594 var d;
47595 var mc;
47596 var r2;
47597 var cWidth;
47598 var cHeight;
47599 var menuElement;
47600 var subElements;
47601 var path;
47602 var tmp;
47603 var selectionSize;
47604 p = event.getPoint ();
47605 var source = event.getSource ();
47606 if (!source.isShowing ()) {
47607 return;
47608 }var type = event.getID ();
47609 var modifiers = event.getModifiers ();
47610 if ((type == 504 || type == 505) && ((modifiers & (28)) != 0)) {
47611 return;
47612 }javax.swing.SwingUtilities.convertPointToScreen (p, source);
47613 screenX = p.x;
47614 screenY = p.y;
47615 tmp = this.selection.clone ();
47616 selectionSize = tmp.size ();
47617 var success = false;
47618 for (i = selectionSize - 1; i >= 0 && success == false; i--) {
47619 menuElement = tmp.elementAt (i);
47620 subElements = menuElement.getSubElements ();
47621 path = null;
47622 for (j = 0, d = subElements.length; j < d && success == false; j++) {
47623 if (subElements[j] == null) continue;
47624 mc = subElements[j].getComponent ();
47625 if (!mc.isShowing ()) continue;
47626 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47627 cWidth = (mc).getWidth ();
47628 cHeight = (mc).getHeight ();
47629 } else {
47630 r2 = mc.getBounds ();
47631 cWidth = r2.width;
47632 cHeight = r2.height;
47633 }p.x = screenX;
47634 p.y = screenY;
47635 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47636 if ((p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight)) {
47637 var k;
47638 if (path == null) {
47639 path =  new Array (i + 2);
47640 for (k = 0; k <= i; k++) path[k] = tmp.elementAt (k);
47641
47642 }path[i + 1] = subElements[j];
47643 var currentSelection = this.getSelectedPath ();
47644 if (currentSelection[currentSelection.length - 1] !== path[i + 1] && (currentSelection.length < 2 || currentSelection[currentSelection.length - 2] !== path[i + 1])) {
47645 var oldMC = currentSelection[currentSelection.length - 1].getComponent ();
47646 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);
47647 currentSelection[currentSelection.length - 1].processMouseEvent (exitEvent, path, this);
47648 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);
47649 subElements[j].processMouseEvent (enterEvent, path, this);
47650 }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);
47651 subElements[j].processMouseEvent (mouseEvent, path, this);
47652 success = true;
47653 event.consume ();
47654 }}
47655 }
47656 }, "java.awt.event.MouseEvent");
47657 Clazz_defineMethod (c$, "componentForPoint", 
47658 function (source, sourcePoint) {
47659 var screenX;
47660 var screenY;
47661 var p = sourcePoint;
47662 var i;
47663 var j;
47664 var d;
47665 var mc;
47666 var r2;
47667 var cWidth;
47668 var cHeight;
47669 var menuElement;
47670 var subElements;
47671 var tmp;
47672 var selectionSize;
47673 javax.swing.SwingUtilities.convertPointToScreen (p, source);
47674 screenX = p.x;
47675 screenY = p.y;
47676 tmp = this.selection.clone ();
47677 selectionSize = tmp.size ();
47678 for (i = selectionSize - 1; i >= 0; i--) {
47679 menuElement = tmp.elementAt (i);
47680 subElements = menuElement.getSubElements ();
47681 for (j = 0, d = subElements.length; j < d; j++) {
47682 if (subElements[j] == null) continue;
47683 mc = subElements[j].getComponent ();
47684 if (!mc.isShowing ()) continue;
47685 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47686 cWidth = (mc).getWidth ();
47687 cHeight = (mc).getHeight ();
47688 } else {
47689 r2 = mc.getBounds ();
47690 cWidth = r2.width;
47691 cHeight = r2.height;
47692 }p.x = screenX;
47693 p.y = screenY;
47694 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47695 if (p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight) {
47696 return mc;
47697 }}
47698 }
47699 return null;
47700 }, "java.awt.Component,java.awt.Point");
47701 Clazz_defineMethod (c$, "processKeyEvent", 
47702 function (e) {
47703 var sel2 =  new Array (0);
47704 sel2 = this.selection.toArray (sel2);
47705 var selSize = sel2.length;
47706 var path;
47707 if (selSize < 1) {
47708 return;
47709 }for (var i = selSize - 1; i >= 0; i--) {
47710 var elem = sel2[i];
47711 var subs = elem.getSubElements ();
47712 path = null;
47713 for (var j = 0; j < subs.length; j++) {
47714 if (subs[j] == null || !subs[j].getComponent ().isShowing () || !subs[j].getComponent ().isEnabled ()) {
47715 continue;
47716 }if (path == null) {
47717 path =  new Array (i + 2);
47718 System.arraycopy (sel2, 0, path, 0, i + 1);
47719 }path[i + 1] = subs[j];
47720 subs[j].processKeyEvent (e, path, this);
47721 if (e.isConsumed ()) {
47722 return;
47723 }}
47724 }
47725 path =  new Array (1);
47726 path[0] = sel2[0];
47727 path[0].processKeyEvent (e, path, this);
47728 if (e.isConsumed ()) {
47729 return;
47730 }}, "java.awt.event.KeyEvent");
47731 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47732 function (c) {
47733 if (this.selection.size () > 0) {
47734 var me = this.selection.elementAt (0);
47735 return this.isComponentPartOfCurrentMenu (me, c);
47736 } else return false;
47737 }, "java.awt.Component");
47738 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47739  function (root, c) {
47740 var children;
47741 var i;
47742 var d;
47743 if (root == null) return false;
47744 if (root.getComponent () === c) return true;
47745  else {
47746 children = root.getSubElements ();
47747 for (i = 0, d = children.length; i < d; i++) {
47748 if (this.isComponentPartOfCurrentMenu (children[i], c)) return true;
47749 }
47750 }return false;
47751 }, "javax.swing.MenuElement,java.awt.Component");
47752 c$.MENU_SELECTION_MANAGER_KEY = c$.prototype.MENU_SELECTION_MANAGER_KEY =  new Clazz._O ();
47753 });
47754 Clazz_declarePackage ("javax.swing");
47755 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 () {
47756 c$ = Clazz_decorateAsClass (function () {
47757 this.popupType = 0;
47758 Clazz_instantialize (this, arguments);
47759 }, javax.swing, "PopupFactory");
47760 c$.setSharedInstance = Clazz_defineMethod (c$, "setSharedInstance", 
47761 function (factory) {
47762 if (factory == null) {
47763 throw  new IllegalArgumentException ("PopupFactory can not be null");
47764 }javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.SharedInstanceKey, factory);
47765 }, "javax.swing.PopupFactory");
47766 c$.getSharedInstance = Clazz_defineMethod (c$, "getSharedInstance", 
47767 function () {
47768 var factory = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.SharedInstanceKey);
47769 if (factory == null) {
47770 factory =  new javax.swing.PopupFactory ();
47771 javax.swing.PopupFactory.setSharedInstance (factory);
47772 }return factory;
47773 });
47774 Clazz_defineMethod (c$, "setPopupType", 
47775 function (type) {
47776 this.popupType = type;
47777 }, "~N");
47778 Clazz_defineMethod (c$, "getPopupType", 
47779 function () {
47780 return this.popupType;
47781 });
47782 Clazz_defineMethod (c$, "getPopup", 
47783 function (owner, contents, x, y) {
47784 if (contents == null) {
47785 throw  new IllegalArgumentException ("Popup.getPopup must be passed non-null contents");
47786 }var popupType = this.getPopupType (owner, contents, x, y);
47787 var popup = this.getPopup (owner, contents, x, y, popupType);
47788 if (popup == null) {
47789 popup = this.getPopup (owner, contents, x, y, 2);
47790 }return popup;
47791 }, "java.awt.Component,java.awt.Component,~N,~N");
47792 Clazz_defineMethod (c$, "getPopupType", 
47793  function (owner, contents, ownerX, ownerY) {
47794 var popupType = this.getPopupType ();
47795 if (owner == null || this.invokerInHeavyWeightPopup (owner)) {
47796 popupType = 2;
47797 } else if (popupType == 0 && !(Clazz_instanceOf (contents, javax.swing.JToolTip)) && !(Clazz_instanceOf (contents, javax.swing.JPopupMenu))) {
47798 popupType = 1;
47799 }var c = owner;
47800 while (c != null) {
47801 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
47802 if ((c).getClientProperty (javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP) === Boolean.TRUE) {
47803 popupType = 2;
47804 break;
47805 }}c = c.getParent ();
47806 }
47807 return popupType;
47808 }, "java.awt.Component,java.awt.Component,~N,~N");
47809 Clazz_defineMethod (c$, "getPopup", 
47810  function (owner, contents, ownerX, ownerY, popupType) {
47811 switch (popupType) {
47812 case 0:
47813 return this.getLightWeightPopup (owner, contents, ownerX, ownerY);
47814 case 1:
47815 return this.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47816 case 2:
47817 return this.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47818 }
47819 return null;
47820 }, "java.awt.Component,java.awt.Component,~N,~N,~N");
47821 Clazz_defineMethod (c$, "getLightWeightPopup", 
47822  function (owner, contents, ownerX, ownerY) {
47823 return javax.swing.PopupFactory.LightWeightPopup.getLightWeightPopup (owner, contents, ownerX, ownerY);
47824 }, "java.awt.Component,java.awt.Component,~N,~N");
47825 Clazz_defineMethod (c$, "getMediumWeightPopup", 
47826  function (owner, contents, ownerX, ownerY) {
47827 return javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47828 }, "java.awt.Component,java.awt.Component,~N,~N");
47829 Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47830  function (owner, contents, ownerX, ownerY) {
47831 return javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47832 }, "java.awt.Component,java.awt.Component,~N,~N");
47833 Clazz_defineMethod (c$, "invokerInHeavyWeightPopup", 
47834  function (i) {
47835 if (i != null) {
47836 var parent;
47837 for (parent = i.getParent (); parent != null; parent = parent.getParent ()) {
47838 if (Clazz_instanceOf (parent, javax.swing.Popup.HeavyWeightWindow)) {
47839 return true;
47840 }}
47841 }return false;
47842 }, "java.awt.Component");
47843 Clazz_pu$h(self.c$);
47844 c$ = Clazz_declareType (javax.swing.PopupFactory, "HeavyWeightPopup", javax.swing.Popup);
47845 c$.getHeavyWeightPopup = Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47846 function (a, b, c, d) {
47847 var e = (a != null) ? javax.swing.SwingUtilities.getWindowAncestor (a) : null;
47848 var f = null;
47849 if (e != null) {
47850 f = javax.swing.PopupFactory.HeavyWeightPopup.getRecycledHeavyWeightPopup (e);
47851 }var g = false;
47852 if (b != null && b.isFocusable ()) {
47853 if (Clazz_instanceOf (b, javax.swing.JPopupMenu)) {
47854 var h = b;
47855 var i = h.getComponents ();
47856 for (var j = 0; j < i.length; j++) {
47857 if (!(Clazz_instanceOf (i[j], javax.swing.MenuElement)) && !(Clazz_instanceOf (i[j], javax.swing.JSeparator))) {
47858 g = true;
47859 break;
47860 }}
47861 }}if (f == null || (f.getComponent ()).getFocusableWindowState () != g) {
47862 if (f != null) {
47863 f._dispose ();
47864 }f =  new javax.swing.PopupFactory.HeavyWeightPopup ();
47865 }f.reset (a, b, c, d);
47866 if (g) {
47867 var h = f.getComponent ();
47868 h.setFocusableWindowState (true);
47869 h.setName ("###focusableSwingPopup###");
47870 }return f;
47871 }, "java.awt.Component,java.awt.Component,~N,~N");
47872 c$.getRecycledHeavyWeightPopup = Clazz_defineMethod (c$, "getRecycledHeavyWeightPopup", 
47873  function (a) {
47874 {
47875 var b;
47876 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47877 if (c.containsKey (a)) {
47878 b = c.get (a);
47879 } else {
47880 return null;
47881 }var d;
47882 if ((d = b.size ()) > 0) {
47883 var e = b.get (0);
47884 b.remove (0);
47885 return e;
47886 }return null;
47887 }}, "java.awt.Window");
47888 c$.getHeavyWeightPopupCache = Clazz_defineMethod (c$, "getHeavyWeightPopupCache", 
47889  function () {
47890 {
47891 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey);
47892 if (a == null) {
47893 a =  new java.util.HashMap (2);
47894 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey, a);
47895 }return a;
47896 }});
47897 c$.recycleHeavyWeightPopup = Clazz_defineMethod (c$, "recycleHeavyWeightPopup", 
47898  function (a) {
47899 {
47900 var b;
47901 var c = javax.swing.SwingUtilities.getWindowAncestor (a.getComponent ());
47902 var d = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47903 if (Clazz_instanceOf (c, javax.swing.Popup.DefaultFrame) || !(c).isVisible ()) {
47904 a._dispose ();
47905 return;
47906 } else if (d.containsKey (c)) {
47907 b = d.get (c);
47908 } else {
47909 b =  new java.util.ArrayList ();
47910 d.put (c, b);
47911 var e = c;
47912 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))));
47913 }if (b.size () < 5) {
47914 b.add (a);
47915 } else {
47916 a._dispose ();
47917 }}}, "javax.swing.PopupFactory.HeavyWeightPopup");
47918 Clazz_defineMethod (c$, "hide", 
47919 function () {
47920 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "hide", []);
47921 javax.swing.PopupFactory.HeavyWeightPopup.recycleHeavyWeightPopup (this);
47922 });
47923 Clazz_defineMethod (c$, "dispose", 
47924 function () {
47925 });
47926 Clazz_defineMethod (c$, "_dispose", 
47927 function () {
47928 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "dispose", []);
47929 });
47930 c$.$PopupFactory$HeavyWeightPopup$1$ = function () {
47931 Clazz_pu$h(self.c$);
47932 c$ = Clazz_declareAnonymous (javax.swing, "PopupFactory$HeavyWeightPopup$1", java.awt.event.WindowAdapter);
47933 Clazz_overrideMethod (c$, "windowClosed", 
47934 function (a) {
47935 var b;
47936 {
47937 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47938 b = c.remove (this.f$.e);
47939 }if (b != null) {
47940 for (var c = b.size () - 1; c >= 0; c--) {
47941 (b.get (c))._dispose ();
47942 }
47943 }}, "java.awt.event.WindowEvent");
47944 c$ = Clazz_p0p ();
47945 };
47946 c$.heavyWeightPopupCacheKey = c$.prototype.heavyWeightPopupCacheKey =  new Clazz._O ();
47947 c$ = Clazz_p0p ();
47948 Clazz_pu$h(self.c$);
47949 c$ = Clazz_decorateAsClass (function () {
47950 this.owner = null;
47951 this.x = 0;
47952 this.y = 0;
47953 Clazz_instantialize (this, arguments);
47954 }, javax.swing.PopupFactory, "ContainerPopup", javax.swing.Popup);
47955 Clazz_overrideMethod (c$, "hide", 
47956 function () {
47957 var a = this.getComponent ();
47958 if (a != null) {
47959 var b = a.getParent ();
47960 if (b != null) {
47961 var c = a.getBounds ();
47962 b.remove (a);
47963 b.repaint (c.x, c.y, c.width, c.height);
47964 }}this.owner = null;
47965 });
47966 Clazz_overrideMethod (c$, "pack", 
47967 function () {
47968 var a = this.getComponent ();
47969 if (a != null) {
47970 a.setSize (a.getPreferredSize ());
47971 }});
47972 Clazz_defineMethod (c$, "reset", 
47973 function (a, b, c, d) {
47974 if ((Clazz_instanceOf (a, javax.swing.JFrame)) || (Clazz_instanceOf (a, javax.swing.JDialog)) || (Clazz_instanceOf (a, javax.swing.JWindow))) {
47975 a = (a).getLayeredPane ();
47976 }Clazz_superCall (this, javax.swing.PopupFactory.ContainerPopup, "reset", [a, b, c, d]);
47977 this.x = c;
47978 this.y = d;
47979 this.owner = a;
47980 }, "java.awt.Component,java.awt.Component,~N,~N");
47981 Clazz_defineMethod (c$, "overlappedByOwnedWindow", 
47982 function () {
47983 var a = this.getComponent ();
47984 if (this.owner != null && a != null) {
47985 var b = javax.swing.SwingUtilities.getWindowAncestor (this.owner);
47986 if (b == null) {
47987 return false;
47988 }var c = b.getOwnedWindows ();
47989 if (c != null) {
47990 var d = a.getBounds ();
47991 for (var e = 0; e < c.length; e++) {
47992 var f = c[e];
47993 if (f.isVisible () && d.intersects (f.getBounds ())) {
47994 return true;
47995 }}
47996 }}return false;
47997 });
47998 Clazz_defineMethod (c$, "fitsOnScreen", 
47999 function () {
48000 var a = this.getComponent ();
48001 if (this.owner != null && a != null) {
48002 var b;
48003 var c = a.getWidth ();
48004 var d = a.getHeight ();
48005 for (b = this.owner.getParent (); b != null; b = b.getParent ()) {
48006 if (Clazz_instanceOf (b, javax.swing.JFrame) || Clazz_instanceOf (b, javax.swing.JDialog) || Clazz_instanceOf (b, javax.swing.JWindow)) {
48007 var e = b.getBounds ();
48008 var f = b.getInsets ();
48009 e.x += f.left;
48010 e.y += f.top;
48011 e.width -= (f.left + f.right);
48012 e.height -= (f.top + f.bottom);
48013 var g = b.getGraphicsConfiguration ();
48014 var h = this.getContainerPopupArea (g);
48015 return e.intersection (h).contains (this.x, this.y, c, d);
48016 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
48017 var e = b.getBounds ();
48018 var f = b.getLocationOnScreen ();
48019 e.x = f.x;
48020 e.y = f.y;
48021 return e.contains (this.x, this.y, c, d);
48022 } else if (Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) {
48023 break;
48024 }}
48025 }return false;
48026 });
48027 Clazz_defineMethod (c$, "getContainerPopupArea", 
48028 function (a) {
48029 var b;
48030 var c = java.awt.Toolkit.getDefaultToolkit ();
48031 var d;
48032 if (a != null) {
48033 b = a.getBounds ();
48034 d = c.getScreenInsets (a);
48035 } else {
48036 b =  new java.awt.Rectangle (c.getScreenSize ());
48037 d =  new java.awt.Insets (0, 0, 0, 0);
48038 }b.x += d.left;
48039 b.y += d.top;
48040 b.width -= (d.left + d.right);
48041 b.height -= (d.top + d.bottom);
48042 return b;
48043 }, "java.awt.GraphicsConfiguration");
48044 c$ = Clazz_p0p ();
48045 Clazz_pu$h(self.c$);
48046 c$ = Clazz_declareType (javax.swing.PopupFactory, "LightWeightPopup", javax.swing.PopupFactory.ContainerPopup);
48047 c$.getLightWeightPopup = Clazz_defineMethod (c$, "getLightWeightPopup", 
48048 function (a, b, c, d) {
48049 var e = null;
48050 if (e == null) {
48051 e =  new javax.swing.PopupFactory.LightWeightPopup ();
48052 }e.reset (a, b, c, d);
48053 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
48054 e.hide ();
48055 return null;
48056 }return e;
48057 }, "java.awt.Component,java.awt.Component,~N,~N");
48058 Clazz_defineMethod (c$, "hide", 
48059 function () {
48060 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "hide", []);
48061 var a = this.getComponent ();
48062 a.removeAll ();
48063 });
48064 Clazz_overrideMethod (c$, "show", 
48065 function () {
48066 var a = null;
48067 if (this.owner != null) {
48068 a = (Clazz_instanceOf (this.owner, java.awt.Container) ? this.owner : this.owner.getParent ());
48069 }for (var b = a; b != null; b = b.getParent ()) {
48070 if (Clazz_instanceOf (b, javax.swing.JRootPane)) {
48071 a = (b).getLayeredPane ();
48072 } else if (Clazz_instanceOf (b, java.awt.Window)) {
48073 if (a == null) {
48074 a = b;
48075 }break;
48076 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
48077 break;
48078 }}
48079 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (a, this.x, this.y);
48080 var d = this.getComponent ();
48081 d.setLocation (c.x, c.y);
48082 if (Clazz_instanceOf (a, javax.swing.JLayeredPane)) {
48083 (a).add (d, javax.swing.JLayeredPane.POPUP_LAYER, 0);
48084 } else {
48085 a.add (d);
48086 }});
48087 Clazz_overrideMethod (c$, "createComponent", 
48088 function (a) {
48089 var b =  new javax.swing.JPanel ( new java.awt.BorderLayout (), true);
48090 b.setOpaque (true);
48091 return b;
48092 }, "java.awt.Component");
48093 Clazz_defineMethod (c$, "reset", 
48094 function (a, b, c, d) {
48095 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "reset", [a, b, c, d]);
48096 var e = this.getComponent ();
48097 e.setOpaque (b.isOpaque ());
48098 e.setLocation (c, d);
48099 e.add (b, "Center");
48100 b.invalidate ();
48101 this.pack ();
48102 }, "java.awt.Component,java.awt.Component,~N,~N");
48103 c$.lightWeightPopupCacheKey = c$.prototype.lightWeightPopupCacheKey =  new Clazz._O ();
48104 c$ = Clazz_p0p ();
48105 Clazz_pu$h(self.c$);
48106 c$ = Clazz_decorateAsClass (function () {
48107 this.rootPane = null;
48108 Clazz_instantialize (this, arguments);
48109 }, javax.swing.PopupFactory, "MediumWeightPopup", javax.swing.PopupFactory.ContainerPopup);
48110 c$.getMediumWeightPopup = Clazz_defineMethod (c$, "getMediumWeightPopup", 
48111 function (a, b, c, d) {
48112 var e = javax.swing.PopupFactory.MediumWeightPopup.getRecycledMediumWeightPopup ();
48113 if (e == null) {
48114 e =  new javax.swing.PopupFactory.MediumWeightPopup ();
48115 }e.reset (a, b, c, d);
48116 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
48117 e.hide ();
48118 return null;
48119 }return e;
48120 }, "java.awt.Component,java.awt.Component,~N,~N");
48121 c$.getMediumWeightPopupCache = Clazz_defineMethod (c$, "getMediumWeightPopupCache", 
48122  function () {
48123 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey);
48124 if (a == null) {
48125 a =  new java.util.ArrayList ();
48126 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey, a);
48127 }return a;
48128 });
48129 c$.recycleMediumWeightPopup = Clazz_defineMethod (c$, "recycleMediumWeightPopup", 
48130  function (a) {
48131 {
48132 var b = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
48133 if (b.size () < 5) {
48134 b.add (a);
48135 }}}, "javax.swing.PopupFactory.MediumWeightPopup");
48136 c$.getRecycledMediumWeightPopup = Clazz_defineMethod (c$, "getRecycledMediumWeightPopup", 
48137  function () {
48138 {
48139 var a = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
48140 var b;
48141 if ((b = a.size ()) > 0) {
48142 var c = a.get (0);
48143 a.remove (0);
48144 return c;
48145 }return null;
48146 }});
48147 Clazz_defineMethod (c$, "hide", 
48148 function () {
48149 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "hide", []);
48150 this.rootPane.getContentPane ().removeAll ();
48151 javax.swing.PopupFactory.MediumWeightPopup.recycleMediumWeightPopup (this);
48152 });
48153 Clazz_overrideMethod (c$, "show", 
48154 function () {
48155 var a = this.getComponent ();
48156 var b = null;
48157 if (this.owner != null) {
48158 b = this.owner.getParent ();
48159 }while (!(Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) && (b != null)) {
48160 b = b.getParent ();
48161 }
48162 if (Clazz_instanceOf (b, javax.swing.RootPaneContainer)) {
48163 b = (b).getLayeredPane ();
48164 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
48165 a.setVisible (false);
48166 a.setLocation (c.x, c.y);
48167 (b).add (a, javax.swing.JLayeredPane.POPUP_LAYER, 0);
48168 } else {
48169 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
48170 a.setLocation (c.x, c.y);
48171 a.setVisible (false);
48172 b.add (a);
48173 }a.setVisible (true);
48174 });
48175 Clazz_overrideMethod (c$, "createComponent", 
48176 function (a) {
48177 var b =  new javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent ();
48178 this.rootPane =  new javax.swing.JRootPane ();
48179 this.rootPane.setOpaque (true);
48180 b.add (this.rootPane, "Center");
48181 return b;
48182 }, "java.awt.Component");
48183 Clazz_defineMethod (c$, "reset", 
48184 function (a, b, c, d) {
48185 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "reset", [a, b, c, d]);
48186 var e = this.getComponent ();
48187 e.setLocation (c, d);
48188 this.rootPane.getContentPane ().add (b, "Center");
48189 b.invalidate ();
48190 e.validate ();
48191 this.pack ();
48192 }, "java.awt.Component,java.awt.Component,~N,~N");
48193 Clazz_pu$h(self.c$);
48194 c$ = Clazz_declareType (javax.swing.PopupFactory.MediumWeightPopup, "MediumWeightComponent", java.awt.Panel, javax.swing.SwingHeavyWeight);
48195 Clazz_makeConstructor (c$, 
48196 function () {
48197 Clazz_superConstructor (this, javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent, [ new java.awt.BorderLayout ()]);
48198 });
48199 c$ = Clazz_p0p ();
48200 c$.mediumWeightPopupCacheKey = c$.prototype.mediumWeightPopupCacheKey =  new Clazz._O ();
48201 c$ = Clazz_p0p ();
48202 c$.SharedInstanceKey = c$.prototype.SharedInstanceKey =  new Clazz._O ();
48203 Clazz_defineStatics (c$,
48204 "MAX_CACHE_SIZE", 5,
48205 "LIGHT_WEIGHT_POPUP", 0,
48206 "MEDIUM_WEIGHT_POPUP", 1,
48207 "HEAVY_WEIGHT_POPUP", 2);
48208 });
48209 Clazz_declarePackage ("javax.swing");
48210 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 () {
48211 c$ = Clazz_decorateAsClass (function () {
48212 this.component = null;
48213 Clazz_instantialize (this, arguments);
48214 }, javax.swing, "Popup");
48215 Clazz_makeConstructor (c$, 
48216 function (owner, contents, x, y) {
48217 this.construct ();
48218 if (contents == null) {
48219 throw  new IllegalArgumentException ("Contents must be non-null");
48220 }this.reset (owner, contents, x, y);
48221 }, "java.awt.Component,java.awt.Component,~N,~N");
48222 Clazz_makeConstructor (c$, 
48223 function () {
48224 });
48225 Clazz_defineMethod (c$, "show", 
48226 function () {
48227 var component = this.getComponent ();
48228 if (component != null) {
48229 component.show ();
48230 }});
48231 Clazz_defineMethod (c$, "hide", 
48232 function () {
48233 var component = this.getComponent ();
48234 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48235 component.hide ();
48236 (component).getContentPane ().removeAll ();
48237 }this.dispose ();
48238 });
48239 Clazz_defineMethod (c$, "dispose", 
48240 function () {
48241 var component = this.getComponent ();
48242 var window = javax.swing.SwingUtilities.getWindowAncestor (component);
48243 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48244 (component).dispose ();
48245 component = null;
48246 }if (Clazz_instanceOf (window, javax.swing.Popup.DefaultFrame)) {
48247 window.dispose ();
48248 }});
48249 Clazz_defineMethod (c$, "reset", 
48250 function (owner, contents, ownerX, ownerY) {
48251 if (this.getComponent () == null) {
48252 this.component = this.createComponent (owner);
48253 }var c = this.getComponent ();
48254 if (Clazz_instanceOf (c, javax.swing.JWindow)) {
48255 var component = this.getComponent ();
48256 component.setLocation (ownerX, ownerY);
48257 component.getContentPane ().add (contents, "Center");
48258 contents.invalidate ();
48259 if (component.isVisible ()) {
48260 this.pack ();
48261 }}}, "java.awt.Component,java.awt.Component,~N,~N");
48262 Clazz_defineMethod (c$, "pack", 
48263 function () {
48264 var component = this.getComponent ();
48265 if (Clazz_instanceOf (component, java.awt.Window)) {
48266 (component).pack ();
48267 }});
48268 Clazz_defineMethod (c$, "getParentWindow", 
48269  function (owner) {
48270 var window = null;
48271 if (Clazz_instanceOf (owner, java.awt.Window)) {
48272 window = owner;
48273 } else if (owner != null) {
48274 window = javax.swing.SwingUtilities.getWindowAncestor (owner);
48275 }if (window == null) {
48276 window =  new javax.swing.Popup.DefaultFrame ();
48277 }return window;
48278 }, "java.awt.Component");
48279 Clazz_defineMethod (c$, "createComponent", 
48280 function (owner) {
48281 return  new javax.swing.Popup.HeavyWeightWindow (this.getParentWindow (owner));
48282 }, "java.awt.Component");
48283 Clazz_defineMethod (c$, "getComponent", 
48284 function () {
48285 return this.component;
48286 });
48287 Clazz_pu$h(self.c$);
48288 c$ = Clazz_declareType (javax.swing.Popup, "HeavyWeightWindow", javax.swing.JWindow);
48289 Clazz_makeConstructor (c$, 
48290 function (a) {
48291 Clazz_superConstructor (this, javax.swing.Popup.HeavyWeightWindow, [a]);
48292 this.setFocusableWindowState (false);
48293 var b = java.awt.Toolkit.getDefaultToolkit ();
48294 if (Clazz_instanceOf (b, jssun.awt.SunToolkit)) {
48295 (b).setOverrideRedirect (this);
48296 }this.getRootPane ().setUseTrueDoubleBuffering (false);
48297 try {
48298 this.setAlwaysOnTop (true);
48299 } catch (se) {
48300 if (Clazz_exceptionOf (se, SecurityException)) {
48301 } else {
48302 throw se;
48303 }
48304 }
48305 }, "java.awt.Window");
48306 Clazz_overrideMethod (c$, "update", 
48307 function (a) {
48308 this.paint (a);
48309 }, "java.awt.Graphics");
48310 Clazz_defineMethod (c$, "show", 
48311 function () {
48312 this.pack ();
48313 if (this.getWidth () > 0 && this.getHeight () > 0) {
48314 Clazz_superCall (this, javax.swing.Popup.HeavyWeightWindow, "show", []);
48315 }});
48316 c$ = Clazz_p0p ();
48317 Clazz_pu$h(self.c$);
48318 c$ = Clazz_declareType (javax.swing.Popup, "DefaultFrame", java.awt.Frame);
48319 c$ = Clazz_p0p ();
48320 });
48321 Clazz_declarePackage ("javax.swing");
48322 Clazz_declareInterface (javax.swing, "SwingHeavyWeight");
48323 Clazz_declarePackage ("javax.swing");
48324 Clazz_load (["javax.swing.JComponent"], "javax.swing.JToolTip", ["javax.swing.UIManager"], function () {
48325 c$ = Clazz_decorateAsClass (function () {
48326 this.tipText = null;
48327 this.$component = null;
48328 Clazz_instantialize (this, arguments);
48329 }, javax.swing, "JToolTip", javax.swing.JComponent);
48330 Clazz_makeConstructor (c$, 
48331 function () {
48332 Clazz_superConstructor (this, javax.swing.JToolTip, []);
48333 this.setOpaque (true);
48334 this.updateUI ();
48335 });
48336 Clazz_overrideMethod (c$, "getUI", 
48337 function () {
48338 return this.ui;
48339 });
48340 Clazz_overrideMethod (c$, "updateUI", 
48341 function () {
48342 this.setUI (javax.swing.UIManager.getUI (this));
48343 });
48344 Clazz_overrideMethod (c$, "getUIClassID", 
48345 function () {
48346 return "ToolTipUI";
48347 });
48348 Clazz_defineMethod (c$, "setTipText", 
48349 function (tipText) {
48350 var oldValue = this.tipText;
48351 this.tipText = tipText;
48352 this.firePropertyChangeObject ("tiptext", oldValue, tipText);
48353 }, "~S");
48354 Clazz_defineMethod (c$, "getTipText", 
48355 function () {
48356 return this.tipText;
48357 });
48358 Clazz_defineMethod (c$, "setComponent", 
48359 function (c) {
48360 var oldValue = this.$component;
48361 this.$component = c;
48362 this.firePropertyChangeObject ("component", oldValue, c);
48363 }, "javax.swing.JComponent");
48364 Clazz_defineMethod (c$, "getComponent", 
48365 function () {
48366 return this.$component;
48367 });
48368 Clazz_overrideMethod (c$, "alwaysOnTop", 
48369 function () {
48370 return true;
48371 });
48372 Clazz_defineMethod (c$, "paramString", 
48373 function () {
48374 var tipTextString = (this.tipText != null ? this.tipText : "");
48375 return Clazz_superCall (this, javax.swing.JToolTip, "paramString", []) + ",tipText=" + tipTextString;
48376 });
48377 Clazz_defineStatics (c$,
48378 "$uiClassID", "ToolTipUI");
48379 });
48380 Clazz_declarePackage ("javax.swing.event");
48381 Clazz_load (["java.util.EventObject"], "javax.swing.event.PopupMenuEvent", null, function () {
48382 c$ = Clazz_declareType (javax.swing.event, "PopupMenuEvent", java.util.EventObject);
48383 });
48384 Clazz_declarePackage ("javax.swing.event");
48385 Clazz_load (["java.util.EventListener"], "javax.swing.event.PopupMenuListener", null, function () {
48386 Clazz_declareInterface (javax.swing.event, "PopupMenuListener", java.util.EventListener);
48387 });
48388 Clazz_declarePackage ("javax.swing.event");
48389 Clazz_load (["java.util.EventObject"], "javax.swing.event.MenuEvent", null, function () {
48390 c$ = Clazz_declareType (javax.swing.event, "MenuEvent", java.util.EventObject);
48391 });
48392 Clazz_declarePackage ("javax.swing.event");
48393 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuListener", null, function () {
48394 Clazz_declareInterface (javax.swing.event, "MenuListener", java.util.EventListener);
48395 });
48396 Clazz_declarePackage ("javax.swing.border");
48397 Clazz_load (["javax.swing.border.Border"], "javax.swing.border.AbstractBorder", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Component", "$.Insets", "$.Rectangle"], function () {
48398 c$ = Clazz_declareType (javax.swing.border, "AbstractBorder", null, javax.swing.border.Border);
48399 Clazz_overrideMethod (c$, "paintBorder", 
48400 function (c, g, x, y, width, height) {
48401 }, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N");
48402 Clazz_defineMethod (c$, "getBorderInsets", 
48403 function (c) {
48404 return  new java.awt.Insets (0, 0, 0, 0);
48405 }, "java.awt.Component");
48406 Clazz_defineMethod (c$, "getBorderInsets", 
48407 function (c, insets) {
48408 insets.left = insets.top = insets.right = insets.bottom = 0;
48409 return insets;
48410 }, "java.awt.Component,java.awt.Insets");
48411 Clazz_overrideMethod (c$, "isBorderOpaque", 
48412 function () {
48413 return false;
48414 });
48415 Clazz_defineMethod (c$, "getInteriorRectangle", 
48416 function (c, x, y, width, height) {
48417 return javax.swing.border.AbstractBorder.getInteriorRectangle (c, this, x, y, width, height);
48418 }, "java.awt.Component,~N,~N,~N,~N");
48419 c$.getInteriorRectangle = Clazz_defineMethod (c$, "getInteriorRectangle", 
48420 function (c, b, x, y, width, height) {
48421 var insets;
48422 if (b != null) insets = b.getBorderInsets (c);
48423  else insets =  new java.awt.Insets (0, 0, 0, 0);
48424 return  new java.awt.Rectangle (x + insets.left, y + insets.top, width - insets.right - insets.left, height - insets.top - insets.bottom);
48425 }, "java.awt.Component,javax.swing.border.Border,~N,~N,~N,~N");
48426 Clazz_defineMethod (c$, "getBaseline", 
48427 function (c, width, height) {
48428 if (width < 0 || height < 0) {
48429 throw  new IllegalArgumentException ("Width and height must be >= 0");
48430 }return -1;
48431 }, "java.awt.Component,~N,~N");
48432 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
48433 function (c) {
48434 if (c == null) {
48435 throw  new NullPointerException ("Component must be non-null");
48436 }return java.awt.Component.BaselineResizeBehavior.OTHER;
48437 }, "java.awt.Component");
48438 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
48439 function (c) {
48440 return c.getComponentOrientation ().isLeftToRight ();
48441 }, "java.awt.Component");
48442 });
48443 Clazz_declarePackage ("jssun.awt");
48444 Clazz_load (["java.awt.event.InvocationEvent"], "jssun.awt.PeerEvent", null, function () {
48445 c$ = Clazz_decorateAsClass (function () {
48446 this.flags = 0;
48447 Clazz_instantialize (this, arguments);
48448 }, jssun.awt, "PeerEvent", java.awt.event.InvocationEvent);
48449 Clazz_makeConstructor (c$, 
48450 function (source, runnable, flags) {
48451 this.construct (source, runnable, null, false, flags);
48452 }, "~O,Runnable,~N");
48453 Clazz_makeConstructor (c$, 
48454 function (source, runnable, notifier, catchExceptions, flags) {
48455 Clazz_superConstructor (this, jssun.awt.PeerEvent, [source, runnable, notifier, catchExceptions]);
48456 this.flags = flags;
48457 }, "~O,Runnable,~O,~B,~N");
48458 Clazz_defineMethod (c$, "getFlags", 
48459 function () {
48460 return this.flags;
48461 });
48462 Clazz_defineMethod (c$, "coalesceEvents", 
48463 function (newEvent) {
48464 return null;
48465 }, "jssun.awt.PeerEvent");
48466 Clazz_defineStatics (c$,
48467 "PRIORITY_EVENT", 0x01,
48468 "ULTIMATE_PRIORITY_EVENT", 0x02,
48469 "LOW_PRIORITY_EVENT", 0x04);
48470 });
48471 Clazz_declarePackage ("jssun.awt.image");
48472 Clazz_load (["jssun.awt.image.InputStreamImageSource"], "jssun.awt.image.URLImageSource", ["java.net.URL"], function () {
48473 c$ = Clazz_decorateAsClass (function () {
48474 this.url = null;
48475 this.conn = null;
48476 this.actualHost = null;
48477 this.actualPort = 0;
48478 Clazz_instantialize (this, arguments);
48479 }, jssun.awt.image, "URLImageSource", jssun.awt.image.InputStreamImageSource);
48480 Clazz_makeConstructor (c$, 
48481 function (u) {
48482 Clazz_superConstructor (this, jssun.awt.image.URLImageSource, []);
48483 this.url = u;
48484 }, "java.net.URL");
48485 Clazz_makeConstructor (c$, 
48486 function (href) {
48487 this.construct ( new java.net.URL (null, href));
48488 }, "~S");
48489 Clazz_makeConstructor (c$, 
48490 function (u, uc) {
48491 this.construct (u);
48492 this.conn = uc;
48493 }, "java.net.URL,java.net.URLConnection");
48494 Clazz_makeConstructor (c$, 
48495 function (uc) {
48496 this.construct (uc.getURL (), uc);
48497 }, "java.net.URLConnection");
48498 Clazz_overrideMethod (c$, "checkSecurity", 
48499 function (context, quiet) {
48500 if (this.actualHost != null) {
48501 try {
48502 var security = System.getSecurityManager ();
48503 if (security != null) {
48504 security.checkConnect (this.actualHost, this.actualPort, context);
48505 }} catch (e) {
48506 if (Clazz_exceptionOf (e, SecurityException)) {
48507 if (!quiet) {
48508 throw e;
48509 }return false;
48510 } else {
48511 throw e;
48512 }
48513 }
48514 }return true;
48515 }, "~O,~B");
48516 Clazz_defineMethod (c$, "getDecoder", 
48517 function () {
48518 return null;
48519 });
48520 });
48521 Clazz_declarePackage ("jssun.awt.image");
48522 Clazz_load (["java.awt.image.ImageProducer", "jssun.awt.image.ImageFetchable"], "jssun.awt.image.InputStreamImageSource", ["java.lang.SecurityException", "$.Thread", "jssun.awt.image.ImageConsumerQueue", "$.ImageFetcher"], function () {
48523 c$ = Clazz_decorateAsClass (function () {
48524 this.consumers = null;
48525 this.decoder = null;
48526 this.decoders = null;
48527 this.awaitingFetch = false;
48528 Clazz_instantialize (this, arguments);
48529 }, jssun.awt.image, "InputStreamImageSource", null, [java.awt.image.ImageProducer, jssun.awt.image.ImageFetchable]);
48530 Clazz_defineMethod (c$, "countConsumers", 
48531 function (cq) {
48532 var i = 0;
48533 while (cq != null) {
48534 i++;
48535 cq = cq.next;
48536 }
48537 return i;
48538 }, "jssun.awt.image.ImageConsumerQueue");
48539 Clazz_defineMethod (c$, "countConsumers", 
48540 function () {
48541 var id = this.decoders;
48542 var i = this.countConsumers (this.consumers);
48543 while (id != null) {
48544 i += this.countConsumers (id.queue);
48545 id = id.next;
48546 }
48547 return i;
48548 });
48549 Clazz_defineMethod (c$, "addConsumer", 
48550 function (ic) {
48551 this.addConsumer (ic, false);
48552 }, "java.awt.image.ImageConsumer");
48553 Clazz_defineMethod (c$, "printQueue", 
48554 function (cq, prefix) {
48555 while (cq != null) {
48556 System.out.println (prefix + cq);
48557 cq = cq.next;
48558 }
48559 }, "jssun.awt.image.ImageConsumerQueue,~S");
48560 Clazz_defineMethod (c$, "printQueues", 
48561 function (title) {
48562 System.out.println (title + "[ -----------");
48563 this.printQueue (this.consumers, "  ");
48564 for (var id = this.decoders; id != null; id = id.next) {
48565 System.out.println ("    " + id);
48566 this.printQueue (id.queue, "      ");
48567 }
48568 System.out.println ("----------- ]" + title);
48569 }, "~S");
48570 Clazz_defineMethod (c$, "addConsumer", 
48571 function (ic, produce) {
48572 for (var id = this.decoders; id != null; id = id.next) {
48573 if (id.isConsumer (ic)) {
48574 return;
48575 }}
48576 var cq = this.consumers;
48577 while (cq != null && cq.consumer !== ic) {
48578 cq = cq.next;
48579 }
48580 if (cq == null) {
48581 cq =  new jssun.awt.image.ImageConsumerQueue (this, ic);
48582 cq.next = this.consumers;
48583 this.consumers = cq;
48584 } else {
48585 if (!cq.secure) {
48586 var context = null;
48587 var security = System.getSecurityManager ();
48588 if (security != null) {
48589 context = security.getSecurityContext ();
48590 }if (cq.securityContext == null) {
48591 cq.securityContext = context;
48592 } else if (!cq.securityContext.equals (context)) {
48593 this.errorConsumer (cq, false);
48594 throw  new SecurityException ("Applets are trading image data!");
48595 }}cq.interested = true;
48596 }if (produce && this.decoder == null) {
48597 this.startProduction ();
48598 }}, "java.awt.image.ImageConsumer,~B");
48599 Clazz_overrideMethod (c$, "isConsumer", 
48600 function (ic) {
48601 for (var id = this.decoders; id != null; id = id.next) {
48602 if (id.isConsumer (ic)) {
48603 return true;
48604 }}
48605 return jssun.awt.image.ImageConsumerQueue.isConsumer (this.consumers, ic);
48606 }, "java.awt.image.ImageConsumer");
48607 Clazz_defineMethod (c$, "errorAllConsumers", 
48608  function (cq, needReload) {
48609 while (cq != null) {
48610 if (cq.interested) {
48611 this.errorConsumer (cq, needReload);
48612 }cq = cq.next;
48613 }
48614 }, "jssun.awt.image.ImageConsumerQueue,~B");
48615 Clazz_defineMethod (c$, "errorConsumer", 
48616  function (cq, needReload) {
48617 cq.consumer.imageComplete (1);
48618 this.removeConsumer (cq.consumer);
48619 }, "jssun.awt.image.ImageConsumerQueue,~B");
48620 Clazz_overrideMethod (c$, "removeConsumer", 
48621 function (ic) {
48622 for (var id = this.decoders; id != null; id = id.next) {
48623 id.removeConsumer (ic);
48624 }
48625 this.consumers = jssun.awt.image.ImageConsumerQueue.removeConsumer (this.consumers, ic, false);
48626 }, "java.awt.image.ImageConsumer");
48627 Clazz_defineMethod (c$, "startProduction", 
48628 function (ic) {
48629 this.addConsumer (ic, true);
48630 }, "java.awt.image.ImageConsumer");
48631 Clazz_defineMethod (c$, "startProduction", 
48632  function () {
48633 if (!this.awaitingFetch) {
48634 jssun.awt.image.ImageFetcher.add (this);
48635 this.awaitingFetch = true;
48636 }});
48637 Clazz_overrideMethod (c$, "requestTopDownLeftRightResend", 
48638 function (ic) {
48639 }, "java.awt.image.ImageConsumer");
48640 Clazz_defineMethod (c$, "decoderForType", 
48641 function (is, content_type) {
48642 return null;
48643 }, "java.io.InputStream,~S");
48644 Clazz_defineMethod (c$, "getDecoder", 
48645 function (is) {
48646 return null;
48647 }, "java.io.InputStream");
48648 Clazz_overrideMethod (c$, "doFetch", 
48649 function () {
48650 {
48651 if (this.consumers == null) {
48652 this.awaitingFetch = false;
48653 return;
48654 }}var imgd = this.getDecoder ();
48655 if (imgd == null) {
48656 this.badDecoder ();
48657 } else {
48658 this.setDecoder (imgd);
48659 try {
48660 imgd.produceImage ();
48661 } catch (e$$) {
48662 if (Clazz_exceptionOf (e$$, java.io.IOException)) {
48663 var e = e$$;
48664 {
48665 e.printStackTrace ();
48666 }
48667 } else if (Clazz_exceptionOf (e$$, jssun.awt.image.ImageFormatException)) {
48668 var e = e$$;
48669 {
48670 e.printStackTrace ();
48671 }
48672 } else {
48673 throw e$$;
48674 }
48675 } finally {
48676 this.removeDecoder (imgd);
48677 if (Thread.currentThread ().isInterrupted () || !Thread.currentThread ().isAlive ()) {
48678 this.errorAllConsumers (imgd.queue, true);
48679 } else {
48680 this.errorAllConsumers (imgd.queue, false);
48681 }}
48682 }});
48683 Clazz_defineMethod (c$, "badDecoder", 
48684  function () {
48685 var cq;
48686 {
48687 cq = this.consumers;
48688 this.consumers = null;
48689 this.awaitingFetch = false;
48690 }this.errorAllConsumers (cq, false);
48691 });
48692 Clazz_defineMethod (c$, "setDecoder", 
48693  function (mydecoder) {
48694 var cq;
48695 {
48696 mydecoder.next = this.decoders;
48697 this.decoders = mydecoder;
48698 this.decoder = mydecoder;
48699 cq = this.consumers;
48700 mydecoder.queue = cq;
48701 this.consumers = null;
48702 this.awaitingFetch = false;
48703 }}, "jssun.awt.image.ImageDecoder");
48704 Clazz_defineMethod (c$, "removeDecoder", 
48705  function (mydecoder) {
48706 this.doneDecoding (mydecoder);
48707 var idprev = null;
48708 for (var id = this.decoders; id != null; id = id.next) {
48709 if (id === mydecoder) {
48710 if (idprev == null) {
48711 this.decoders = id.next;
48712 } else {
48713 idprev.next = id.next;
48714 }break;
48715 }idprev = id;
48716 }
48717 }, "jssun.awt.image.ImageDecoder");
48718 Clazz_defineMethod (c$, "doneDecoding", 
48719 function (mydecoder) {
48720 if (this.decoder === mydecoder) {
48721 this.decoder = null;
48722 if (this.consumers != null) {
48723 this.startProduction ();
48724 }}}, "jssun.awt.image.ImageDecoder");
48725 Clazz_defineMethod (c$, "latchConsumers", 
48726 function (id) {
48727 this.doneDecoding (id);
48728 }, "jssun.awt.image.ImageDecoder");
48729 Clazz_defineMethod (c$, "flush", 
48730 function () {
48731 this.decoder = null;
48732 });
48733 });
48734 Clazz_declarePackage ("java.awt.image");
48735 Clazz_declareInterface (java.awt.image, "ImageProducer");
48736 Clazz_declarePackage ("jssun.awt.image");
48737 Clazz_declareInterface (jssun.awt.image, "ImageFetchable");
48738 Clazz_declarePackage ("jssun.awt.image");
48739 c$ = Clazz_decorateAsClass (function () {
48740 this.next = null;
48741 this.consumer = null;
48742 this.interested = false;
48743 this.securityContext = null;
48744 this.secure = false;
48745 Clazz_instantialize (this, arguments);
48746 }, jssun.awt.image, "ImageConsumerQueue");
48747 c$.removeConsumer = Clazz_defineMethod (c$, "removeConsumer", 
48748 function (cqbase, ic, stillinterested) {
48749 var cqprev = null;
48750 for (var cq = cqbase; cq != null; cq = cq.next) {
48751 if (cq.consumer === ic) {
48752 if (cqprev == null) {
48753 cqbase = cq.next;
48754 } else {
48755 cqprev.next = cq.next;
48756 }cq.interested = stillinterested;
48757 break;
48758 }cqprev = cq;
48759 }
48760 return cqbase;
48761 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer,~B");
48762 c$.isConsumer = Clazz_defineMethod (c$, "isConsumer", 
48763 function (cqbase, ic) {
48764 for (var cq = cqbase; cq != null; cq = cq.next) {
48765 if (cq.consumer === ic) {
48766 return true;
48767 }}
48768 return false;
48769 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer");
48770 Clazz_makeConstructor (c$, 
48771 function (src, ic) {
48772 this.consumer = ic;
48773 this.interested = true;
48774 this.secure = true;
48775 }, "jssun.awt.image.InputStreamImageSource,java.awt.image.ImageConsumer");
48776 Clazz_overrideMethod (c$, "toString", 
48777 function () {
48778 return ("[" + this.consumer + ", " + (this.interested ? "" : "not ") + "interested" + (this.securityContext != null ? ", " + this.securityContext : "") + "]");
48779 });
48780 Clazz_declarePackage ("jssun.awt.image");
48781 Clazz_load (["java.lang.Thread", "$.StringBuffer"], ["jssun.awt.image.FetcherInfo", "$.ImageFetcher"], ["java.util.Vector", "jssun.awt.AppContext"], function () {
48782 c$ = Clazz_declareType (jssun.awt.image, "ImageFetcher", Thread);
48783 Clazz_makeConstructor (c$, 
48784  function (threadGroup, index) {
48785 Clazz_superConstructor (this, jssun.awt.image.ImageFetcher, [threadGroup, "Image Fetcher " + index]);
48786 this.setDaemon (true);
48787 }, "ThreadGroup,~N");
48788 c$.add = Clazz_defineMethod (c$, "add", 
48789 function (src) {
48790 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48791 {
48792 if (!info.waitList.contains (src)) {
48793 info.waitList.addElement (src);
48794 if (info.numWaiting == 0 && info.numFetchers < info.fetchers.length) {
48795 jssun.awt.image.ImageFetcher.createFetchers (info);
48796 }info.waitList.notify ();
48797 }}}, "jssun.awt.image.ImageFetchable");
48798 c$.remove = Clazz_defineMethod (c$, "remove", 
48799 function (src) {
48800 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48801 {
48802 if (info.waitList.contains (src)) {
48803 info.waitList.removeElement (src);
48804 }}}, "jssun.awt.image.ImageFetchable");
48805 c$.isFetcher = Clazz_defineMethod (c$, "isFetcher", 
48806 function (t) {
48807 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48808 {
48809 for (var i = 0; i < info.fetchers.length; i++) {
48810 if (info.fetchers[i] === t) {
48811 return true;
48812 }}
48813 }return false;
48814 }, "Thread");
48815 c$.amFetcher = Clazz_defineMethod (c$, "amFetcher", 
48816 function () {
48817 return jssun.awt.image.ImageFetcher.isFetcher (Thread.currentThread ());
48818 });
48819 c$.nextImage = Clazz_defineMethod (c$, "nextImage", 
48820  function () {
48821 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48822 {
48823 var src = null;
48824 var end = System.currentTimeMillis () + 5000;
48825 while (src == null) {
48826 while (info.waitList.size () == 0) {
48827 var now = System.currentTimeMillis ();
48828 if (now >= end) {
48829 return null;
48830 }try {
48831 info.numWaiting++;
48832 info.waitList.wait (end - now);
48833 } catch (e) {
48834 if (Clazz_exceptionOf (e, InterruptedException)) {
48835 return null;
48836 } else {
48837 throw e;
48838 }
48839 } finally {
48840 info.numWaiting--;
48841 }
48842 }
48843 src = info.waitList.elementAt (0);
48844 info.waitList.removeElement (src);
48845 }
48846 return src;
48847 }});
48848 Clazz_overrideMethod (c$, "run", 
48849 function () {
48850 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48851 try {
48852 this.fetchloop ();
48853 } catch (e) {
48854 if (Clazz_exceptionOf (e, Exception)) {
48855 e.printStackTrace ();
48856 } else {
48857 throw e;
48858 }
48859 } finally {
48860 {
48861 var me = Thread.currentThread ();
48862 for (var i = 0; i < info.fetchers.length; i++) {
48863 if (info.fetchers[i] === me) {
48864 info.fetchers[i] = null;
48865 info.numFetchers--;
48866 }}
48867 }}
48868 });
48869 Clazz_defineMethod (c$, "fetchloop", 
48870  function () {
48871 var me = Thread.currentThread ();
48872 while (jssun.awt.image.ImageFetcher.isFetcher (me)) {
48873 Thread.interrupted ();
48874 me.setPriority (8);
48875 var src = jssun.awt.image.ImageFetcher.nextImage ();
48876 if (src == null) {
48877 return;
48878 }try {
48879 src.doFetch ();
48880 } catch (e) {
48881 if (Clazz_exceptionOf (e, Exception)) {
48882 System.err.println ("Uncaught error fetching image:");
48883 e.printStackTrace ();
48884 } else {
48885 throw e;
48886 }
48887 }
48888 jssun.awt.image.ImageFetcher.stoppingAnimation (me);
48889 }
48890 });
48891 c$.startingAnimation = Clazz_defineMethod (c$, "startingAnimation", 
48892 function () {
48893 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48894 var me = Thread.currentThread ();
48895 {
48896 for (var i = 0; i < info.fetchers.length; i++) {
48897 if (info.fetchers[i] === me) {
48898 info.fetchers[i] = null;
48899 info.numFetchers--;
48900 me.setName ("Image Animator " + i);
48901 if (info.waitList.size () > info.numWaiting) {
48902 jssun.awt.image.ImageFetcher.createFetchers (info);
48903 }return;
48904 }}
48905 }me.setPriority (2);
48906 me.setName ("Image Animator");
48907 });
48908 c$.stoppingAnimation = Clazz_defineMethod (c$, "stoppingAnimation", 
48909  function (me) {
48910 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48911 {
48912 var index = -1;
48913 for (var i = 0; i < info.fetchers.length; i++) {
48914 if (info.fetchers[i] === me) {
48915 return;
48916 }if (info.fetchers[i] == null) {
48917 index = i;
48918 }}
48919 if (index >= 0) {
48920 info.fetchers[index] = me;
48921 info.numFetchers++;
48922 me.setName ("Image Fetcher " + index);
48923 return;
48924 }}}, "Thread");
48925 c$.createFetchers = Clazz_defineMethod (c$, "createFetchers", 
48926  function (info) {
48927 var appContext = jssun.awt.AppContext.getAppContext ();
48928 var threadGroup = appContext.getThreadGroup ();
48929 var fetcherThreadGroup;
48930 try {
48931 if (threadGroup.getParent () != null) {
48932 fetcherThreadGroup = threadGroup;
48933 } else {
48934 threadGroup = Thread.currentThread ().getThreadGroup ();
48935 var parent = threadGroup.getParent ();
48936 while ((parent != null) && (parent.getParent () != null)) {
48937 threadGroup = parent;
48938 parent = threadGroup.getParent ();
48939 }
48940 fetcherThreadGroup = threadGroup;
48941 }} catch (e) {
48942 if (Clazz_exceptionOf (e, SecurityException)) {
48943 fetcherThreadGroup = appContext.getThreadGroup ();
48944 } else {
48945 throw e;
48946 }
48947 }
48948 var fetcherGroup = fetcherThreadGroup;
48949 for (var i = 0; i < info.fetchers.length; i++) {
48950 if (info.fetchers[i] == null) {
48951 info.fetchers[i] =  new jssun.awt.image.ImageFetcher (fetcherGroup, i);
48952 info.fetchers[i].start ();
48953 info.numFetchers++;
48954 break;
48955 }}
48956 return;
48957 }, "jssun.awt.image.FetcherInfo");
48958 Clazz_defineStatics (c$,
48959 "HIGH_PRIORITY", 8,
48960 "LOW_PRIORITY", 3,
48961 "ANIM_PRIORITY", 2,
48962 "TIMEOUT", 5000);
48963 c$ = Clazz_decorateAsClass (function () {
48964 this.fetchers = null;
48965 this.numFetchers = 0;
48966 this.numWaiting = 0;
48967 this.waitList = null;
48968 Clazz_instantialize (this, arguments);
48969 }, jssun.awt.image, "FetcherInfo");
48970 Clazz_makeConstructor (c$, 
48971  function () {
48972 this.fetchers =  new Array (4);
48973 this.numFetchers = 0;
48974 this.numWaiting = 0;
48975 this.waitList =  new java.util.Vector ();
48976 });
48977 c$.getFetcherInfo = Clazz_defineMethod (c$, "getFetcherInfo", 
48978 function () {
48979 var appContext = jssun.awt.AppContext.getAppContext ();
48980 {
48981 var info = appContext.get (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY);
48982 if (info == null) {
48983 info =  new jssun.awt.image.FetcherInfo ();
48984 appContext.put (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY, info);
48985 }return info;
48986 }});
48987 Clazz_defineStatics (c$,
48988 "MAX_NUM_FETCHERS_PER_APPCONTEXT", 4);
48989 c$.FETCHER_INFO_KEY = c$.prototype.FETCHER_INFO_KEY =  new StringBuffer ("FetcherInfo");
48990 });
48991 Clazz_declarePackage ("java.awt.event");
48992 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.FocusEvent", ["jssun.awt.AppContext", "$.SunToolkit"], function () {
48993 c$ = Clazz_decorateAsClass (function () {
48994 this.temporary = false;
48995 this.opposite = null;
48996 Clazz_instantialize (this, arguments);
48997 }, java.awt.event, "FocusEvent", java.awt.event.ComponentEvent);
48998 Clazz_makeConstructor (c$, 
48999 function (source, id, temporary, opposite) {
49000 Clazz_superConstructor (this, java.awt.event.FocusEvent, [source, id]);
49001 this.temporary = temporary;
49002 this.opposite = opposite;
49003 }, "java.awt.Component,~N,~B,java.awt.Component");
49004 Clazz_makeConstructor (c$, 
49005 function (source, id, temporary) {
49006 this.construct (source, id, temporary, null);
49007 }, "java.awt.Component,~N,~B");
49008 Clazz_makeConstructor (c$, 
49009 function (source, id) {
49010 this.construct (source, id, false);
49011 }, "java.awt.Component,~N");
49012 Clazz_defineMethod (c$, "isTemporary", 
49013 function () {
49014 return this.temporary;
49015 });
49016 Clazz_defineMethod (c$, "getOppositeComponent", 
49017 function () {
49018 if (this.opposite == null) {
49019 return null;
49020 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
49021 });
49022 Clazz_overrideMethod (c$, "paramString", 
49023 function () {
49024 var typeStr;
49025 switch (this.id) {
49026 case 1004:
49027 typeStr = "FOCUS_GAINED";
49028 break;
49029 case 1005:
49030 typeStr = "FOCUS_LOST";
49031 break;
49032 default:
49033 typeStr = "unknown type";
49034 }
49035 return typeStr + (this.temporary ? ",temporary" : ",permanent") + ",opposite=" + this.getOppositeComponent ();
49036 });
49037 Clazz_defineStatics (c$,
49038 "FOCUS_FIRST", 1004,
49039 "FOCUS_LAST", 1005,
49040 "FOCUS_GAINED", 1004,
49041 "FOCUS_LOST", 1005);
49042 });
49043 Clazz_declarePackage ("java.awt.event");
49044 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.HierarchyEvent", ["java.awt.Component"], function () {
49045 c$ = Clazz_decorateAsClass (function () {
49046 this.changed = null;
49047 this.changedParent = null;
49048 this.changeFlags = 0;
49049 Clazz_instantialize (this, arguments);
49050 }, java.awt.event, "HierarchyEvent", java.awt.AWTEvent);
49051 Clazz_makeConstructor (c$, 
49052 function (source, id, changed, changedParent) {
49053 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
49054 this.changed = changed;
49055 this.changedParent = changedParent;
49056 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container");
49057 Clazz_makeConstructor (c$, 
49058 function (source, id, changed, changedParent, changeFlags) {
49059 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
49060 this.changed = changed;
49061 this.changedParent = changedParent;
49062 this.changeFlags = changeFlags;
49063 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container,~N");
49064 Clazz_defineMethod (c$, "getComponent", 
49065 function () {
49066 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
49067 });
49068 Clazz_defineMethod (c$, "getChanged", 
49069 function () {
49070 return this.changed;
49071 });
49072 Clazz_defineMethod (c$, "getChangedParent", 
49073 function () {
49074 return this.changedParent;
49075 });
49076 Clazz_defineMethod (c$, "getChangeFlags", 
49077 function () {
49078 return this.changeFlags;
49079 });
49080 Clazz_overrideMethod (c$, "paramString", 
49081 function () {
49082 var typeStr;
49083 switch (this.id) {
49084 case 1401:
49085 typeStr = "ANCESTOR_MOVED (" + this.changed + "," + this.changedParent + ")";
49086 break;
49087 case 1402:
49088 typeStr = "ANCESTOR_RESIZED (" + this.changed + "," + this.changedParent + ")";
49089 break;
49090 case 1400:
49091 {
49092 typeStr = "HIERARCHY_CHANGED (";
49093 var first = true;
49094 if ((this.changeFlags & 1) != 0) {
49095 first = false;
49096 typeStr += "PARENT_CHANGED";
49097 }if ((this.changeFlags & 2) != 0) {
49098 if (first) {
49099 first = false;
49100 } else {
49101 typeStr += ",";
49102 }typeStr += "DISPLAYABILITY_CHANGED";
49103 }if ((this.changeFlags & 4) != 0) {
49104 if (first) {
49105 first = false;
49106 } else {
49107 typeStr += ",";
49108 }typeStr += "SHOWING_CHANGED";
49109 }if (!first) {
49110 typeStr += ",";
49111 }typeStr += this.changed + "," + this.changedParent + ")";
49112 break;
49113 }default:
49114 typeStr = "unknown type";
49115 }
49116 return typeStr;
49117 });
49118 Clazz_defineStatics (c$,
49119 "HIERARCHY_FIRST", 1400,
49120 "HIERARCHY_CHANGED", 1400,
49121 "ANCESTOR_MOVED", 1401,
49122 "ANCESTOR_RESIZED", 1402,
49123 "HIERARCHY_LAST", 1402,
49124 "PARENT_CHANGED", 0x1,
49125 "DISPLAYABILITY_CHANGED", 0x2,
49126 "SHOWING_CHANGED", 0x4);
49127 });
49128 Clazz_declarePackage ("jssun.awt");
49129 Clazz_declareInterface (jssun.awt, "ConstrainableGraphics");
49130 Clazz_declarePackage ("jssun.awt");
49131 Clazz_declareInterface (jssun.awt, "Graphics2Delegate");
49132 Clazz_declarePackage ("java.awt.event");
49133 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.ContainerEvent", ["java.awt.Container"], function () {
49134 c$ = Clazz_decorateAsClass (function () {
49135 this.child = null;
49136 Clazz_instantialize (this, arguments);
49137 }, java.awt.event, "ContainerEvent", java.awt.event.ComponentEvent);
49138 Clazz_makeConstructor (c$, 
49139 function (source, id, child) {
49140 Clazz_superConstructor (this, java.awt.event.ContainerEvent, [source, id]);
49141 this.child = child;
49142 }, "java.awt.Component,~N,java.awt.Component");
49143 Clazz_defineMethod (c$, "getContainer", 
49144 function () {
49145 return (Clazz_instanceOf (this.source, java.awt.Container)) ? this.source : null;
49146 });
49147 Clazz_defineMethod (c$, "getChild", 
49148 function () {
49149 return this.child;
49150 });
49151 Clazz_overrideMethod (c$, "paramString", 
49152 function () {
49153 var typeStr;
49154 switch (this.id) {
49155 case 300:
49156 typeStr = "COMPONENT_ADDED";
49157 break;
49158 case 301:
49159 typeStr = "COMPONENT_REMOVED";
49160 break;
49161 default:
49162 typeStr = "unknown type";
49163 }
49164 return typeStr + ",child=" + this.child.getName ();
49165 });
49166 Clazz_defineStatics (c$,
49167 "CONTAINER_FIRST", 300,
49168 "CONTAINER_LAST", 301,
49169 "COMPONENT_ADDED", 300,
49170 "COMPONENT_REMOVED", 301);
49171 });
49172 Clazz_declarePackage ("jssun.applet");
49173 Clazz_load (["java.util.EventObject"], "jssun.applet.AppletEvent", null, function () {
49174 c$ = Clazz_decorateAsClass (function () {
49175 this.arg = null;
49176 this.id = 0;
49177 Clazz_instantialize (this, arguments);
49178 }, jssun.applet, "AppletEvent", java.util.EventObject);
49179 Clazz_makeConstructor (c$, 
49180 function (source, id, argument) {
49181 Clazz_superConstructor (this, jssun.applet.AppletEvent, [source]);
49182 this.arg = argument;
49183 this.id = id;
49184 }, "~O,~N,~O");
49185 Clazz_defineMethod (c$, "getID", 
49186 function () {
49187 return this.id;
49188 });
49189 Clazz_defineMethod (c$, "getArgument", 
49190 function () {
49191 return this.arg;
49192 });
49193 Clazz_overrideMethod (c$, "toString", 
49194 function () {
49195 var str = this.getClass ().getName () + "[source=" + this.source + " + id=" + this.id;
49196 if (this.arg != null) {
49197 str += " + arg=" + this.arg;
49198 }str += " ]";
49199 return str;
49200 });
49201 });
49202 Clazz_declarePackage ("jssun.applet");
49203 Clazz_load (["jssun.applet.AppletListener"], "jssun.applet.AppletEventMulticaster", null, function () {
49204 c$ = Clazz_decorateAsClass (function () {
49205 this.a = null;
49206 this.b = null;
49207 Clazz_instantialize (this, arguments);
49208 }, jssun.applet, "AppletEventMulticaster", null, jssun.applet.AppletListener);
49209 Clazz_makeConstructor (c$, 
49210 function (a, b) {
49211 this.a = a;
49212 this.b = b;
49213 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49214 Clazz_defineMethod (c$, "appletStateChanged", 
49215 function (e) {
49216 this.a.appletStateChanged (e);
49217 this.b.appletStateChanged (e);
49218 }, "jssun.applet.AppletEvent");
49219 c$.add = Clazz_defineMethod (c$, "add", 
49220 function (a, b) {
49221 return jssun.applet.AppletEventMulticaster.addInternal (a, b);
49222 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49223 c$.remove = Clazz_defineMethod (c$, "remove", 
49224 function (l, oldl) {
49225 return jssun.applet.AppletEventMulticaster.removeInternal (l, oldl);
49226 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49227 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
49228  function (a, b) {
49229 if (a == null) return b;
49230 if (b == null) return a;
49231 return  new jssun.applet.AppletEventMulticaster (a, b);
49232 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49233 Clazz_defineMethod (c$, "remove", 
49234 function (oldl) {
49235 if (oldl === this.a) return this.b;
49236 if (oldl === this.b) return this.a;
49237 var a2 = jssun.applet.AppletEventMulticaster.removeInternal (this.a, oldl);
49238 var b2 = jssun.applet.AppletEventMulticaster.removeInternal (this.b, oldl);
49239 if (a2 === this.a && b2 === this.b) {
49240 return this;
49241 }return jssun.applet.AppletEventMulticaster.addInternal (a2, b2);
49242 }, "jssun.applet.AppletListener");
49243 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
49244  function (l, oldl) {
49245 if (l === oldl || l == null) {
49246 return null;
49247 } else if (Clazz_instanceOf (l, jssun.applet.AppletEventMulticaster)) {
49248 return (l).remove (oldl);
49249 } else {
49250 return l;
49251 }}, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49252 });
49253 Clazz_declarePackage ("jssun.applet");
49254 Clazz_load (["java.util.EventListener"], "jssun.applet.AppletListener", null, function () {
49255 Clazz_declareInterface (jssun.applet, "AppletListener", java.util.EventListener);
49256 });
49257 Clazz_declarePackage ("jssun.misc");
49258 Clazz_load (["java.util.Enumeration"], ["jssun.misc.Queue", "$.LIFOQueueEnumerator", "$.FIFOQueueEnumerator", "$.QueueElement"], ["java.util.NoSuchElementException", "swingjs.JSToolkit"], function () {
49259 c$ = Clazz_decorateAsClass (function () {
49260 this.length = 0;
49261 this.head = null;
49262 this.tail = null;
49263 Clazz_instantialize (this, arguments);
49264 }, jssun.misc, "Queue");
49265 Clazz_makeConstructor (c$, 
49266 function () {
49267 });
49268 Clazz_defineMethod (c$, "enqueue", 
49269 function (obj) {
49270 var newElt =  new jssun.misc.QueueElement (obj);
49271 if (this.head == null) {
49272 this.head = newElt;
49273 this.tail = newElt;
49274 this.length = 1;
49275 } else {
49276 newElt.next = this.head;
49277 this.head.prev = newElt;
49278 this.head = newElt;
49279 this.length++;
49280 }this.notify ();
49281 }, "~O");
49282 Clazz_defineMethod (c$, "dequeue", 
49283 function () {
49284 return this.dequeue (0);
49285 });
49286 Clazz_defineMethod (c$, "dequeue", 
49287 function (timeOut) {
49288 while (this.tail == null) {
49289 swingjs.JSToolkit.warn ("Cannot wait in Queue.java");
49290 this.wait (timeOut);
49291 }
49292 var elt = this.tail;
49293 this.tail = elt.prev;
49294 if (this.tail == null) {
49295 this.head = null;
49296 } else {
49297 this.tail.next = null;
49298 }this.length--;
49299 return elt.obj;
49300 }, "~N");
49301 Clazz_defineMethod (c$, "isEmpty", 
49302 function () {
49303 return (this.tail == null);
49304 });
49305 Clazz_defineMethod (c$, "elements", 
49306 function () {
49307 return  new jssun.misc.LIFOQueueEnumerator (this);
49308 });
49309 Clazz_defineMethod (c$, "reverseElements", 
49310 function () {
49311 return  new jssun.misc.FIFOQueueEnumerator (this);
49312 });
49313 Clazz_defineMethod (c$, "dump", 
49314 function (msg) {
49315 System.err.println (">> " + msg);
49316 System.err.println ("[" + this.length + " elt(s); head = " + (this.head == null ? "null" : (this.head.obj) + "") + " tail = " + (this.tail == null ? "null" : (this.tail.obj) + ""));
49317 var cursor = this.head;
49318 var last = null;
49319 while (cursor != null) {
49320 System.err.println ("  " + cursor);
49321 last = cursor;
49322 cursor = cursor.next;
49323 }
49324 if (last !== this.tail) {
49325 System.err.println ("  tail != last: " + this.tail + ", " + last);
49326 }System.err.println ("]");
49327 }, "~S");
49328 c$ = Clazz_decorateAsClass (function () {
49329 this.queue = null;
49330 this.cursor = null;
49331 Clazz_instantialize (this, arguments);
49332 }, jssun.misc, "FIFOQueueEnumerator", null, java.util.Enumeration);
49333 Clazz_makeConstructor (c$, 
49334 function (q) {
49335 this.queue = q;
49336 this.cursor = q.tail;
49337 }, "jssun.misc.Queue");
49338 Clazz_overrideMethod (c$, "hasMoreElements", 
49339 function () {
49340 return (this.cursor != null);
49341 });
49342 Clazz_overrideMethod (c$, "nextElement", 
49343 function () {
49344 {
49345 if (this.cursor != null) {
49346 var result = this.cursor;
49347 this.cursor = this.cursor.prev;
49348 return result.obj;
49349 }}throw  new java.util.NoSuchElementException ("FIFOQueueEnumerator");
49350 });
49351 c$ = Clazz_decorateAsClass (function () {
49352 this.queue = null;
49353 this.cursor = null;
49354 Clazz_instantialize (this, arguments);
49355 }, jssun.misc, "LIFOQueueEnumerator", null, java.util.Enumeration);
49356 Clazz_makeConstructor (c$, 
49357 function (q) {
49358 this.queue = q;
49359 this.cursor = q.head;
49360 }, "jssun.misc.Queue");
49361 Clazz_overrideMethod (c$, "hasMoreElements", 
49362 function () {
49363 return (this.cursor != null);
49364 });
49365 Clazz_overrideMethod (c$, "nextElement", 
49366 function () {
49367 {
49368 if (this.cursor != null) {
49369 var result = this.cursor;
49370 this.cursor = this.cursor.next;
49371 return result.obj;
49372 }}throw  new java.util.NoSuchElementException ("LIFOQueueEnumerator");
49373 });
49374 c$ = Clazz_decorateAsClass (function () {
49375 this.next = null;
49376 this.prev = null;
49377 this.obj = null;
49378 Clazz_instantialize (this, arguments);
49379 }, jssun.misc, "QueueElement");
49380 Clazz_makeConstructor (c$, 
49381 function (obj) {
49382 this.obj = obj;
49383 }, "~O");
49384 Clazz_overrideMethod (c$, "toString", 
49385 function () {
49386 return "QueueElement[obj=" + this.obj + (this.prev == null ? " null" : " prev") + (this.next == null ? " null" : " next") + "]";
49387 });
49388 });
49389 Clazz_declarePackage ("javax.swing.plaf");
49390 Clazz_declareInterface (javax.swing.plaf, "UIResource");
49391 Clazz_declarePackage ("javax.swing.plaf");
49392 Clazz_load (["javax.swing.InputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.InputMapUIResource", null, function () {
49393 c$ = Clazz_declareType (javax.swing.plaf, "InputMapUIResource", javax.swing.InputMap, javax.swing.plaf.UIResource);
49394 Clazz_makeConstructor (c$, 
49395 function () {
49396 Clazz_superConstructor (this, javax.swing.plaf.InputMapUIResource, []);
49397 });
49398 });
49399 Clazz_declarePackage ("javax.swing.plaf");
49400 Clazz_load (["javax.swing.ActionMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ActionMapUIResource", null, function () {
49401 c$ = Clazz_declareType (javax.swing.plaf, "ActionMapUIResource", javax.swing.ActionMap, javax.swing.plaf.UIResource);
49402 Clazz_makeConstructor (c$, 
49403 function () {
49404 Clazz_superConstructor (this, javax.swing.plaf.ActionMapUIResource, []);
49405 });
49406 });
49407 Clazz_declarePackage ("javax.swing.plaf");
49408 Clazz_load (["java.awt.peer.LightweightPeer"], "javax.swing.plaf.ComponentUI", ["java.lang.Error", "java.awt.Component"], function () {
49409 c$ = Clazz_declareType (javax.swing.plaf, "ComponentUI", null, java.awt.peer.LightweightPeer);
49410 Clazz_makeConstructor (c$, 
49411 function () {
49412 });
49413 Clazz_defineMethod (c$, "installUI", 
49414 function (c) {
49415 }, "javax.swing.JComponent");
49416 Clazz_defineMethod (c$, "uninstallUI", 
49417 function (c) {
49418 }, "javax.swing.JComponent");
49419 Clazz_defineMethod (c$, "paint", 
49420 function (g, c) {
49421 }, "java.awt.Graphics,javax.swing.JComponent");
49422 Clazz_defineMethod (c$, "update", 
49423 function (g, c) {
49424 }, "java.awt.Graphics,javax.swing.JComponent");
49425 Clazz_defineMethod (c$, "getPreferredSize", 
49426 function (c) {
49427 return null;
49428 }, "javax.swing.JComponent");
49429 Clazz_defineMethod (c$, "getMinimumSize", 
49430 function (c) {
49431 return this.getPreferredSize (c);
49432 }, "javax.swing.JComponent");
49433 Clazz_defineMethod (c$, "getMaximumSize", 
49434 function (c) {
49435 return null;
49436 }, "javax.swing.JComponent");
49437 Clazz_defineMethod (c$, "contains", 
49438 function (c, x, y) {
49439 return c.inside (x, y);
49440 }, "javax.swing.JComponent,~N,~N");
49441 c$.createUI = Clazz_defineMethod (c$, "createUI", 
49442 function (c) {
49443 throw  new Error ("ComponentUI.createUI not implemented.");
49444 }, "javax.swing.JComponent");
49445 Clazz_defineMethod (c$, "getBaseline", 
49446 function (c, width, height) {
49447 return -1;
49448 }, "javax.swing.JComponent,~N,~N");
49449 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
49450 function (c) {
49451 return java.awt.Component.BaselineResizeBehavior.OTHER;
49452 }, "javax.swing.JComponent");
49453 });
49454 Clazz_declarePackage ("javax.swing.plaf");
49455 Clazz_load (["java.awt.Font", "javax.swing.plaf.UIResource"], "javax.swing.plaf.FontUIResource", null, function () {
49456 c$ = Clazz_declareType (javax.swing.plaf, "FontUIResource", java.awt.Font, javax.swing.plaf.UIResource);
49457 });
49458 Clazz_declarePackage ("javax.swing.plaf");
49459 Clazz_load (["java.awt.Color", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ColorUIResource", null, function () {
49460 c$ = Clazz_declareType (javax.swing.plaf, "ColorUIResource", java.awt.Color, javax.swing.plaf.UIResource);
49461 });
49462 Clazz_declarePackage ("javax.swing.plaf");
49463 Clazz_load (["javax.swing.ComponentInputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ComponentInputMapUIResource", null, function () {
49464 c$ = Clazz_declareType (javax.swing.plaf, "ComponentInputMapUIResource", javax.swing.ComponentInputMap, javax.swing.plaf.UIResource);
49465 });
49466 Clazz_declarePackage ("swingjs.api");
49467 Clazz_declareInterface (swingjs.api, "JSFunction");
49468 Clazz_declarePackage ("swingjs.api");
49469 Clazz_declareInterface (swingjs.api, "JSInterface");
49470 Clazz_declarePackage ("swingjs.api");
49471 c$ = Clazz_declareType (swingjs.api, "Interface");
49472 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49473 function (name, isQuiet) {
49474 try {
49475 {
49476 Clazz._isQuiet = isQuiet;
49477 }System.out.println ("swingjs.api.Interface creating instance of " + name);
49478 var x = Clazz._4Name (name);
49479 {
49480 Clazz._isQuiet = false;
49481 }return (x == null ? null : x.newInstance ());
49482 } catch (e) {
49483 if (Clazz_exceptionOf (e, Exception)) {
49484 System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e);
49485 return null;
49486 } else {
49487 throw e;
49488 }
49489 }
49490 }, "~S,~B");
49491 Clazz_declarePackage ("swingjs.api");
49492 c$ = Clazz_declareType (swingjs.api, "DOMNode");
49493 c$.createElement = Clazz_defineMethod (c$, "createElement", 
49494 function (key, id) {
49495 var obj = null;
49496 {
49497 obj = document.createElement(key);
49498 obj.id = id;
49499 }return obj;
49500 }, "~S,~S");
49501 c$.getParent = Clazz_defineMethod (c$, "getParent", 
49502 function (obj) {
49503 {
49504 return obj.parentNode;
49505 }}, "swingjs.api.DOMNode");
49506 c$.remove = Clazz_defineMethod (c$, "remove", 
49507 function (obj) {
49508 {
49509 try {
49510 var p = obj.parentNode;
49511 p.removeNode(obj);
49512 } catch(e) {};
49513 return p;
49514 }}, "swingjs.api.DOMNode");
49515 c$.add = Clazz_defineMethod (c$, "add", 
49516 function (parent, child) {
49517 {
49518 parent && parent.appendChild(child);
49519 }}, "swingjs.api.DOMNode,swingjs.api.DOMNode");
49520 c$.getAttr = Clazz_defineMethod (c$, "getAttr", 
49521 function (obj, attr) {
49522 {
49523 if (obj)return obj[attr];
49524 }}, "swingjs.api.DOMNode,~S");
49525 Clazz_defineMethod (c$, "getStyle", 
49526 function (style) {
49527 {
49528 if (obj)return obj.style[style];
49529 }}, "~S");
49530 c$.setAttr = Clazz_defineMethod (c$, "setAttr", 
49531 function (obj, attr, val) {
49532 {
49533 obj[attr] = (val == "TRUE" ? true : val);
49534 }return obj;
49535 }, "swingjs.api.DOMNode,~S,~O");
49536 c$.setStyles = Clazz_defineMethod (c$, "setStyles", 
49537 function (obj, attr) {
49538 {
49539 for (var i = 0; i < attr.length;) {
49540 //System.out.println(["DOMNode.setStyles ",attr[i],attr[i+1]])
49541 ;
49542 obj.style[attr[i++]] = attr[i++]; }
49543 }return obj;
49544 }, "swingjs.api.DOMNode,~A");
49545 c$.setSize = Clazz_defineMethod (c$, "setSize", 
49546 function (obj, width, height) {
49547 return swingjs.api.DOMNode.setStyles (obj, ["width", width + "px", "height", height + "px"]);
49548 }, "swingjs.api.DOMNode,~N,~N");
49549 Clazz_declarePackage ("swingjs");
49550 c$ = Clazz_declareType (swingjs, "JSUtil");
49551 c$.split = Clazz_defineMethod (c$, "split", 
49552 function (text, run) {
49553 if (text.length == 0) return  new Array (0);
49554 var n = 1;
49555 var i = text.indexOf (run);
49556 var lines;
49557 var runLen = run.length;
49558 if (i < 0 || runLen == 0) {
49559 lines =  new Array (1);
49560 lines[0] = text;
49561 return lines;
49562 }var len = text.length - runLen;
49563 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
49564
49565 lines =  new Array (n);
49566 i = 0;
49567 var ipt = 0;
49568 var pt = 0;
49569 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
49570 lines[pt++] = text.substring (i, ipt);
49571 i = ipt + runLen;
49572 }
49573 if (text.indexOf (run, len) != len) len += runLen;
49574 lines[pt] = text.substring (i, len);
49575 return lines;
49576 }, "~S,~S");
49577 Clazz_declarePackage ("swingjs");
49578 Clazz_load (["jssun.awt.SunToolkit"], "swingjs.JSToolkit", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "$.InputStream", "java.lang.Boolean", "$.Thread", "java.util.Hashtable", "JU.AU", "$.Rdr", "$.SB", "java.awt.Dimension", "java.awt.image.ColorModel", "javax.swing.UIManager", "jssun.awt.AppContext", "swingjs.JSComponentPeer", "swingjs.api.Interface"], function () {
49579 c$ = Clazz_decorateAsClass (function () {
49580 this.imageKit = null;
49581 Clazz_instantialize (this, arguments);
49582 }, swingjs, "JSToolkit", jssun.awt.SunToolkit);
49583 Clazz_makeConstructor (c$, 
49584 function () {
49585 Clazz_superConstructor (this, swingjs.JSToolkit);
49586 System.out.println ("JSToolkit initialized");
49587 });
49588 c$.warn = Clazz_defineMethod (c$, "warn", 
49589 function (msg) {
49590 swingjs.JSToolkit.alert (msg);
49591 }, "~S");
49592 c$.alert = Clazz_defineMethod (c$, "alert", 
49593 function (object) {
49594 {
49595 console.log("[JSToolkit] " + object);
49596 alert("[JSToolkit] " + object);
49597 }}, "~O");
49598 c$.log = Clazz_defineMethod (c$, "log", 
49599 function (msg) {
49600 {
49601 System.out.println(msg);
49602 console.log(msg);
49603 }}, "~S");
49604 c$.confirm = Clazz_defineMethod (c$, "confirm", 
49605 function (msg) {
49606 {
49607 return confirm(msg);
49608 }}, "~S");
49609 c$.prompt = Clazz_defineMethod (c$, "prompt", 
49610 function (msg, defaultRet) {
49611 {
49612 return confirm(msg, defaultRet);
49613 }}, "~S,~S");
49614 c$.getPostEventQueue = Clazz_defineMethod (c$, "getPostEventQueue", 
49615 function (isPost) {
49616 return (isPost ? jssun.awt.AppContext.getAppContext ().get ("PostEventQueue") : jssun.awt.AppContext.getAppContext ().get (jssun.awt.AppContext.EVENT_QUEUE_KEY));
49617 }, "~B");
49618 Clazz_overrideMethod (c$, "getScreenSize", 
49619 function () {
49620 var d =  new java.awt.Dimension (0, 0);
49621 var jq = swingjs.JSToolkit.getJQuery ();
49622 {
49623 d.setSize(jq.$(window).width(), jq.$(window).height()); return
49624 d;
49625 }});
49626 Clazz_overrideMethod (c$, "getScreenResolution", 
49627 function () {
49628 return 0;
49629 });
49630 Clazz_overrideMethod (c$, "getColorModel", 
49631 function () {
49632 return java.awt.image.ColorModel.getRGBdefault ();
49633 });
49634 Clazz_overrideMethod (c$, "getFontList", 
49635 function () {
49636 var hardwiredFontList =  Clazz_newArray (-1, ["SansSerif", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
49637 return hardwiredFontList;
49638 });
49639 Clazz_overrideMethod (c$, "sync", 
49640 function () {
49641 });
49642 Clazz_overrideMethod (c$, "isModalExclusionTypeSupported", 
49643 function (modalExclusionType) {
49644 return true;
49645 }, "java.awt.Dialog.ModalExclusionType");
49646 Clazz_overrideMethod (c$, "isModalityTypeSupported", 
49647 function (modalityType) {
49648 return false;
49649 }, "java.awt.Dialog.ModalityType");
49650 Clazz_overrideMethod (c$, "isTraySupported", 
49651 function () {
49652 return false;
49653 });
49654 Clazz_overrideMethod (c$, "getScreenWidth", 
49655 function () {
49656 return 0;
49657 });
49658 Clazz_overrideMethod (c$, "getScreenHeight", 
49659 function () {
49660 return 0;
49661 });
49662 Clazz_overrideMethod (c$, "grab", 
49663 function (w) {
49664 }, "java.awt.Window");
49665 Clazz_overrideMethod (c$, "ungrab", 
49666 function (w) {
49667 }, "java.awt.Window");
49668 c$.getPropertyObject = Clazz_defineMethod (c$, "getPropertyObject", 
49669 function (t, key, def) {
49670 return def;
49671 }, "~O,~S,~O");
49672 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49673 function (className) {
49674 return swingjs.api.Interface.getInstance (className, false);
49675 }, "~S");
49676 c$.getGraphicsConfiguration = Clazz_defineMethod (c$, "getGraphicsConfiguration", 
49677 function () {
49678 return (swingjs.JSToolkit.gc == null ? swingjs.JSToolkit.gc = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsConfiguration") : swingjs.JSToolkit.gc);
49679 });
49680 c$.isFocused = Clazz_defineMethod (c$, "isFocused", 
49681 function (window) {
49682 return false;
49683 }, "java.awt.Window");
49684 c$.getCSSFont = Clazz_defineMethod (c$, "getCSSFont", 
49685 function (font) {
49686 var css = "";
49687 if (font.isItalic ()) css += "font-style:italic;";
49688 if (font.isBold ()) css += "font-weight:bold;";
49689 css += "font-size:" + font.getSize () + "px;";
49690 css += "font-family:" + font.getFamily () + ";";
49691 return css;
49692 }, "java.awt.Font");
49693 c$.getStringWidth = Clazz_defineMethod (c$, "getStringWidth", 
49694 function (context, font, text) {
49695 var fontInfo = swingjs.JSToolkit.getCanvasFont (font);
49696 if (context == null) context = swingjs.JSToolkit.getDefaultCanvasContext2d ();
49697 var w = 0;
49698 {
49699 context.font = fontInfo;
49700 w = Math.ceil(context.measureText(text).width);
49701 }return w;
49702 }, "swingjs.api.HTML5CanvasContext2D,java.awt.Font,~S");
49703 c$.getDefaultCanvasContext2d = Clazz_defineMethod (c$, "getDefaultCanvasContext2d", 
49704 function () {
49705 {
49706 if (this.defaultContext == null) this.defaultContext =
49707 document.createElement( 'canvas' ).getContext('2d');
49708 }return swingjs.JSToolkit.defaultContext;
49709 });
49710 c$.getCanvasFont = Clazz_defineMethod (c$, "getCanvasFont", 
49711 function (font) {
49712 var strStyle = "";
49713 if (font.isItalic ()) strStyle += "italic ";
49714 if (font.isBold ()) strStyle += "bold ";
49715 return strStyle + font.getSize () + "px " + font.getFamily ();
49716 }, "java.awt.Font");
49717 c$.getFontFamily = Clazz_defineMethod (c$, "getFontFamily", 
49718 function (font) {
49719 return font.getName ();
49720 }, "java.awt.Font");
49721 Clazz_overrideMethod (c$, "getFontMetrics", 
49722 function (font) {
49723 var fm = swingjs.JSToolkit.getInstance ("swingjs.JSFontMetrics");
49724 fm.setFont (font);
49725 return fm;
49726 }, "java.awt.Font");
49727 c$.getCSSColor = Clazz_defineMethod (c$, "getCSSColor", 
49728 function (c) {
49729 var s = "000000" + Integer.toHexString (c.getRGB () & 0xFFFFFF);
49730 return "#" + s.substring (s.length - 6);
49731 }, "java.awt.Color");
49732 c$.notImplemented = Clazz_defineMethod (c$, "notImplemented", 
49733 function (msg) {
49734 var s = null;
49735 if (swingjs.JSToolkit.mapNotImpl == null) swingjs.JSToolkit.mapNotImpl =  new java.util.Hashtable ();
49736 {
49737 s = arguments.callee.caller; s = s.__CLASS_NAME__ ||
49738 s.claxxOwner.__CLASS_NAME__; s += "." +
49739 arguments.callee.caller.exName;
49740 }if (swingjs.JSToolkit.mapNotImpl.containsKey (s)) return;
49741 swingjs.JSToolkit.mapNotImpl.put (s, Boolean.TRUE);
49742 System.out.println (s + " has not been implemented in SwingJS. " + (msg === "" ? "" : (msg == null ? "" : msg) + swingjs.JSToolkit.getStackTrace (-5)));
49743 }, "~S");
49744 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49745 function () {
49746 {
49747 return Clazz_getStackTrace();
49748 }});
49749 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49750 function (n) {
49751 {
49752 return Clazz_getStackTrace(n);
49753 }}, "~N");
49754 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
49755 function () {
49756 if (swingjs.JSToolkit.uid == null) swingjs.JSToolkit.uid = javax.swing.UIManager.getLookAndFeel ().getDefaults ();
49757 return swingjs.JSToolkit.uid;
49758 });
49759 c$.getComponentUI = Clazz_defineMethod (c$, "getComponentUI", 
49760 function (target) {
49761 var c = swingjs.api.Interface.getInstance ("swingjs.plaf.JS" + target.getUIClassID (), true);
49762 if (c != null) c.set (target);
49763 return c;
49764 }, "javax.swing.JComponent");
49765 c$.getSwingDivId = Clazz_defineMethod (c$, "getSwingDivId", 
49766 function () {
49767 return Thread.currentThread ().getName () + "_swingdiv";
49768 });
49769 c$.getJQuery = Clazz_defineMethod (c$, "getJQuery", 
49770 function () {
49771 {
49772 if (!window.jQuery) alert(
49773 "jQuery is required for SwingJS, but window.jQuery is not defined."
49774 ); jQuery.$ || (jQuery.$ = jQuery); return(jQuery);
49775 }});
49776 c$.getJavaResource = Clazz_defineMethod (c$, "getJavaResource", 
49777 function (resourceName) {
49778 System.out.println ("JSToolkit getting Java resource " + resourceName);
49779 {
49780 return SwingJS.getJavaResource(resourceName);
49781 }}, "~S");
49782 c$.dispatchSystemEvent = Clazz_defineMethod (c$, "dispatchSystemEvent", 
49783 function (runnable) {
49784 var f = null;
49785 {
49786 System.out.println("JST dispatchSystemEvent " +
49787 runnable.run.toString()); f =
49788 function(_JSToolkit_dispatchSystemEvent) {
49789 System.out.println("JST running " +
49790 runnable.run.toString());runnable.run()};
49791 }swingjs.JSToolkit.setTimeout (f, 0, 0);
49792 }, "Runnable");
49793 c$.dispatchEvent = Clazz_defineMethod (c$, "dispatchEvent", 
49794 function (event, src, andWait) {
49795 var f = null;
49796 var id = ++swingjs.JSToolkit.dispatchID;
49797 {
49798 f = function()
49799 {
49800 if
49801 (src == null) event.dispatch(); else src.dispatchEvent(event);
49802 };
49803 }if (andWait) swingjs.JSToolkit.invokeAndWait (f, id);
49804  else swingjs.JSToolkit.setTimeout (f, 0, id);
49805 }, "java.awt.AWTEvent,~O,~B");
49806 c$.setTimeout = Clazz_defineMethod (c$, "setTimeout", 
49807 function (f, msDelay, id) {
49808 {
49809 var thread = java.lang.Thread.thisThread;
49810 var thread0 = thread;
49811 var id0 = SwingJS.eventID || 0;
49812 setTimeout(function(_JSToolkit_setTimeout) {
49813 SwingJS.eventID = id;
49814 java.lang.Thread.thisThread = thread;
49815 try {
49816 if (f.run)
49817 f.run();
49818 else
49819 f();
49820 } catch (e) {
49821 var s = "JSToolkit.setTimeout(" + id +"): " + e;
49822 System.out.println(s);
49823 alert(s)}
49824 SwingJS.eventID = id0;
49825 java.lang.Thread.thisThread = thread0;
49826 }, msDelay);
49827 }}, "~O,~N,~N");
49828 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
49829  function (f, id) {
49830 {
49831 var thread = java.lang.Thread.thisThread;
49832 var thread0 = thread;
49833 (function(_JSToolkit_setTimeout) {
49834 var id0 = SwingJS.eventID || 0;
49835 System.out.println("runNow " + id); SwingJS.eventID = id;
49836 java.lang.Thread.thisThread = thread;
49837 if (f.run)
49838 f.run();
49839 else
49840 f();
49841 SwingJS.eventID = id0;
49842 java.lang.Thread.thisThread = thread0;
49843 })();
49844 }}, "swingjs.api.JSFunction,~N");
49845 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
49846 function () {
49847 {
49848 return (!!SwingJS.eventID);
49849 }});
49850 c$.checkClassMethod = Clazz_defineMethod (c$, "checkClassMethod", 
49851 function (component, fname, signature) {
49852 {
49853 return component[fname] && component[fname][signature];
49854 }}, "java.awt.Component,~S,~S");
49855 c$.readyCallback = Clazz_defineMethod (c$, "readyCallback", 
49856 function (aname, fname, a, me) {
49857 {
49858 Jmol._readyCallback(aname, fname, true,a, me);
49859 }}, "~S,~S,~O,~O");
49860 c$.forceRepaint = Clazz_defineMethod (c$, "forceRepaint", 
49861 function (c) {
49862 }, "java.awt.Component");
49863 c$.getHTML5Applet = Clazz_defineMethod (c$, "getHTML5Applet", 
49864 function (c) {
49865 return (c.getAppContext ().getThreadGroup ()).getHtmlApplet ();
49866 }, "javax.swing.JComponent");
49867 c$.taintUI = Clazz_defineMethod (c$, "taintUI", 
49868 function (c) {
49869 {
49870 c.getUI && c.getUI() && c.getUI().setTainted();
49871 }}, "java.awt.Component");
49872 Clazz_overrideMethod (c$, "createComponent", 
49873 function (target) {
49874 System.out.println ("JSToolkit creating LightweightPeer for " + target);
49875 var peer = swingjs.JSToolkit.getUI (target, true);
49876 return (peer == null ?  new swingjs.JSComponentPeer (target) : peer);
49877 }, "java.awt.Component");
49878 c$.getPlainDocument = Clazz_defineMethod (c$, "getPlainDocument", 
49879 function (c) {
49880 return swingjs.JSToolkit.getInstance ("swingjs.JSPlainDocument");
49881 }, "javax.swing.JComponent");
49882 c$.getClassName = Clazz_defineMethod (c$, "getClassName", 
49883 function (c) {
49884 {
49885 return c.__CLASS_NAME__;
49886 }}, "~O");
49887 c$.getSignedStreamBytes = Clazz_defineMethod (c$, "getSignedStreamBytes", 
49888 function (bis) {
49889 try {
49890 return JU.AU.ensureSignedBytes (JU.Rdr.getStreamAsBytes (bis, null));
49891 } catch (e) {
49892 if (Clazz_exceptionOf (e, java.io.IOException)) {
49893 return null;
49894 } else {
49895 throw e;
49896 }
49897 }
49898 }, "java.io.BufferedInputStream");
49899 c$.getFileContents = Clazz_defineMethod (c$, "getFileContents", 
49900 function (uri) {
49901 {
49902 return Jmol._getFileData(uri);
49903 }}, "~S");
49904 Clazz_defineMethod (c$, "getFileAsBytes", 
49905 function (filename) {
49906 var data = swingjs.JSToolkit.getFileContents (filename);
49907 var b = null;
49908 if (JU.AU.isAB (data)) b = data;
49909  else if (Clazz_instanceOf (data, String)) b = (data).getBytes ();
49910  else if (Clazz_instanceOf (data, JU.SB)) b = JU.Rdr.getBytesFromSB (data);
49911  else if (Clazz_instanceOf (data, java.io.InputStream)) try {
49912 b = JU.Rdr.getLimitedStreamBytes (data, -1);
49913 } catch (e) {
49914 if (Clazz_exceptionOf (e, java.io.IOException)) {
49915 } else {
49916 throw e;
49917 }
49918 }
49919 return JU.AU.ensureSignedBytes (b);
49920 }, "~S");
49921 Clazz_defineMethod (c$, "getImagekit", 
49922  function () {
49923 return (this.imageKit == null ? this.imageKit = swingjs.api.Interface.getInstance ("swingjs.JSImagekit", false) : this.imageKit);
49924 });
49925 Clazz_defineMethod (c$, "createImage", 
49926 function (producer) {
49927 producer.startProduction (null);
49928 return null;
49929 }, "java.awt.image.ImageProducer");
49930 Clazz_defineMethod (c$, "createImage", 
49931 function (filename) {
49932 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (this.getFileAsBytes (filename)))), 0, -1);
49933 }, "~S");
49934 Clazz_defineMethod (c$, "createImage", 
49935 function (url) {
49936 try {
49937 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream (url.openStream ())), 0, -1);
49938 } catch (e) {
49939 if (Clazz_exceptionOf (e, java.io.IOException)) {
49940 return null;
49941 } else {
49942 throw e;
49943 }
49944 }
49945 }, "java.net.URL");
49946 Clazz_defineMethod (c$, "createImage", 
49947 function (data, imageoffset, imagelength) {
49948 return this.getImagekit ().createImageFromBytes (data, imageoffset, imagelength);
49949 }, "~A,~N,~N");
49950 Clazz_overrideMethod (c$, "checkImage", 
49951 function (image, width, height, observer) {
49952 return 63;
49953 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49954 Clazz_overrideMethod (c$, "prepareImage", 
49955 function (image, width, height, observer) {
49956 return true;
49957 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49958 c$.hasFocus = Clazz_defineMethod (c$, "hasFocus", 
49959 function (c) {
49960 var ui = swingjs.JSToolkit.getUI (c, false);
49961 return (ui != null && ui.hasFocus ());
49962 }, "java.awt.Component");
49963 c$.getUI = Clazz_defineMethod (c$, "getUI", 
49964 function (c, isQuiet) {
49965 var ui = null;
49966 {
49967 ui = c.getUI && c.getUI();
49968 }if (ui == null) {
49969 var s = "[JSToolkit] Component " + c.getClass ().getName () + " has no cooresponding JSComponentUI.";
49970 System.out.println (s);
49971 }return ui;
49972 }, "java.awt.Component,~B");
49973 c$.requestFocus = Clazz_defineMethod (c$, "requestFocus", 
49974 function (c) {
49975 var ui = swingjs.JSToolkit.getUI (c, false);
49976 if (ui == null || !ui.isFocusable ()) return false;
49977 var r = ((Clazz_isClassDefined ("swingjs.JSToolkit$1") ? 0 : swingjs.JSToolkit.$JSToolkit$1$ ()), Clazz_innerTypeInstance (swingjs.JSToolkit$1, this, Clazz_cloneFinals ("ui", ui)));
49978 swingjs.JSToolkit.setTimeout (r, 50, 0);
49979 return true;
49980 }, "java.awt.Component");
49981 c$.getCompositor = Clazz_defineMethod (c$, "getCompositor", 
49982 function () {
49983 return (swingjs.JSToolkit.compositor == null ? swingjs.JSToolkit.compositor = swingjs.api.Interface.getInstance ("swingjs.JSGraphicsCompositor", false) : swingjs.JSToolkit.compositor);
49984 });
49985 c$.setGraphicsCompositeAlpha = Clazz_defineMethod (c$, "setGraphicsCompositeAlpha", 
49986 function (g, rule) {
49987 return swingjs.JSToolkit.getCompositor ().setGraphicsCompositeAlpha (g, rule);
49988 }, "swingjs.JSGraphics2D,~N");
49989 c$.drawImageOp = Clazz_defineMethod (c$, "drawImageOp", 
49990 function (g, img, op, x, y) {
49991 return swingjs.JSToolkit.getCompositor ().drawImageOp (g, img, op, x, y);
49992 }, "swingjs.JSGraphics2D,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
49993 c$.filterRaster = Clazz_defineMethod (c$, "filterRaster", 
49994 function (src, dst, op) {
49995 return swingjs.JSToolkit.getCompositor ().filterRaster (src, dst, op);
49996 }, "java.awt.image.Raster,java.awt.image.WritableRaster,java.awt.image.RasterOp");
49997 c$.filterImage = Clazz_defineMethod (c$, "filterImage", 
49998 function (src, dst, op) {
49999 return swingjs.JSToolkit.getCompositor ().filterImage (src, dst, op);
50000 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp");
50001 c$.getZIndex = Clazz_defineMethod (c$, "getZIndex", 
50002 function (ui, what) {
50003 {
50004 if (what) return getHTML5Applet(ui.c)._z[what];
50005 var c = ui.domNode; var z;
50006 while (c && !(z = c.style["z-index"])) {
50007 c = c.parentNode;
50008 }
50009 return z || 100000;
50010 }}, "swingjs.plaf.JSComponentUI,~S");
50011 Clazz_overrideMethod (c$, "createFrame", 
50012 function (target) {
50013 return this.createWindowPeer (target, true);
50014 }, "java.awt.Frame");
50015 Clazz_overrideMethod (c$, "createWindow", 
50016 function (target) {
50017 return this.createWindowPeer (target, false);
50018 }, "java.awt.Window");
50019 Clazz_defineMethod (c$, "createWindowPeer", 
50020  function (target, isFrame) {
50021 return (swingjs.JSToolkit.getInstance ("swingjs.JSWindowPeer")).setFrame (target, true);
50022 }, "java.awt.Window,~B");
50023 c$.$JSToolkit$1$ = function () {
50024 Clazz_pu$h(self.c$);
50025 c$ = Clazz_declareAnonymous (swingjs, "JSToolkit$1", null, Runnable);
50026 Clazz_overrideMethod (c$, "run", 
50027 function () {
50028 this.f$.ui.requestFocus (null, false, false, 0, null);
50029 });
50030 c$ = Clazz_p0p ();
50031 };
50032 Clazz_defineStatics (c$,
50033 "gc", null,
50034 "defaultContext", null,
50035 "mapNotImpl", null,
50036 "uid", null,
50037 "dispatchID", 0,
50038 "compositor", null);
50039 });
50040 Clazz_declarePackage ("swingjs");
50041 Clazz_load (["java.awt.event.InvocationEvent"], "swingjs.JSEvent", null, function () {
50042 c$ = Clazz_declareType (swingjs, "JSEvent", java.awt.event.InvocationEvent);
50043 Clazz_makeConstructor (c$, 
50044 function (t, r) {
50045 Clazz_superConstructor (this, swingjs.JSEvent, [t, 1201, r, null, false]);
50046 }, "swingjs.JSThread,Runnable");
50047 });
50048 Clazz_declarePackage ("swingjs");
50049 Clazz_load (["java.awt.FontMetrics"], "swingjs.JSFontMetrics", ["swingjs.JSToolkit"], function () {
50050 c$ = Clazz_decorateAsClass (function () {
50051 this.widths = null;
50052 this.iwidths = null;
50053 Clazz_instantialize (this, arguments);
50054 }, swingjs, "JSFontMetrics", java.awt.FontMetrics);
50055 Clazz_makeConstructor (c$, 
50056 function () {
50057 Clazz_superConstructor (this, swingjs.JSFontMetrics, [null]);
50058 });
50059 Clazz_defineMethod (c$, "setFont", 
50060 function (f) {
50061 this.font = f;
50062 }, "java.awt.Font");
50063 Clazz_overrideMethod (c$, "getLeading", 
50064 function () {
50065 return Clazz_doubleToInt (this.font.getSize () / 20) + 1;
50066 });
50067 Clazz_overrideMethod (c$, "getAscent", 
50068 function () {
50069 return this.font.getSize ();
50070 });
50071 Clazz_overrideMethod (c$, "getDescent", 
50072 function () {
50073 return Clazz_doubleToInt (this.font.getSize () / 4) + 1;
50074 });
50075 Clazz_defineMethod (c$, "charWidth", 
50076 function (pt) {
50077 return (pt.charCodeAt (0) < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt.charCodeAt (0)]) : this.stringWidth ("" + pt));
50078 }, "~S");
50079 Clazz_defineMethod (c$, "charWidth", 
50080 function (pt) {
50081 return (pt < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt]) : this.stringWidth ("" + String.fromCharCode (pt)));
50082 }, "~N");
50083 Clazz_overrideMethod (c$, "stringWidth", 
50084 function (s) {
50085 return Clazz_floatToInt (swingjs.JSToolkit.getStringWidth (null, this.font, s));
50086 }, "~S");
50087 Clazz_overrideMethod (c$, "getWidths", 
50088 function () {
50089 if (this.iwidths != null) return this.iwidths;
50090 this.iwidths =  Clazz_newIntArray (256, 0);
50091 this.getWidthsFloat ();
50092 for (var ch = 0; ch < 256; ch++) {
50093 this.iwidths[ch] = Clazz_floatToInt (this.widths[ch]);
50094 }
50095 return this.iwidths;
50096 });
50097 Clazz_defineMethod (c$, "getWidthsFloat", 
50098 function () {
50099 if (this.widths != null) return this.widths;
50100 this.widths =  Clazz_newFloatArray (256, 0);
50101 for (var ch = 0; ch < 256; ch++) {
50102 this.widths[ch] = swingjs.JSToolkit.getStringWidth (null, this.font, "" + String.fromCharCode (ch));
50103 }
50104 return this.widths;
50105 });
50106 });
50107 Clazz_declarePackage ("swingjs");
50108 Clazz_load (["java.lang.Thread", "swingjs.api.JSFunction"], "swingjs.JSThread", null, function () {
50109 c$ = Clazz_decorateAsClass (function () {
50110 this.isJS = false;
50111 Clazz_instantialize (this, arguments);
50112 }, swingjs, "JSThread", Thread, swingjs.api.JSFunction);
50113 Clazz_makeConstructor (c$, 
50114 function (group, name) {
50115 Clazz_superConstructor (this, swingjs.JSThread, [group, name]);
50116 {
50117 this.isJS = true;
50118 }}, "ThreadGroup,~S");
50119 Clazz_overrideMethod (c$, "run", 
50120 function () {
50121 this.run1 (0);
50122 });
50123 Clazz_defineMethod (c$, "start", 
50124 function () {
50125 {
50126 swingjs.JSToolkit.setTimeout(this, 1, 0);
50127 }});
50128 Clazz_defineMethod (c$, "sleepAndReturn", 
50129 function (delay, state) {
50130 if (!this.isJS) {
50131 Thread.sleep (delay);
50132 return false;
50133 }var me = this;
50134 var r = ((Clazz_isClassDefined ("swingjs.JSThread$1") ? 0 : swingjs.JSThread.$JSThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSThread$1, this, Clazz_cloneFinals ("me", me, "state", state)));
50135 {
50136 setTimeout(
50137 function() {java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new java.awt.event.InvocationEvent(me, r))},
50138 delay
50139 );
50140 }return true;
50141 }, "~N,~N");
50142 c$.$JSThread$1$ = function () {
50143 Clazz_pu$h(self.c$);
50144 c$ = Clazz_declareAnonymous (swingjs, "JSThread$1", null, Runnable);
50145 Clazz_overrideMethod (c$, "run", 
50146 function () {
50147 this.f$.me.run1 (this.f$.state);
50148 });
50149 c$ = Clazz_p0p ();
50150 };
50151 Clazz_defineStatics (c$,
50152 "INIT", 0,
50153 "LOOP", 1,
50154 "DONE", 2);
50155 });
50156 Clazz_declarePackage ("swingjs");
50157 Clazz_load (["java.lang.ThreadGroup"], "swingjs.JSThreadGroup", null, function () {
50158 c$ = Clazz_decorateAsClass (function () {
50159 this.html5Applet = null;
50160 Clazz_instantialize (this, arguments);
50161 }, swingjs, "JSThreadGroup", ThreadGroup);
50162 Clazz_defineMethod (c$, "setHtmlApplet", 
50163 function (html5Applet) {
50164 this.html5Applet = html5Applet;
50165 }, "swingjs.api.HTML5Applet");
50166 Clazz_defineMethod (c$, "getHtmlApplet", 
50167 function () {
50168 return this.html5Applet;
50169 });
50170 });
50171 Clazz_declarePackage ("swingjs");
50172 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 () {
50173 c$ = Clazz_decorateAsClass (function () {
50174 this.params = null;
50175 this.html5Applet = null;
50176 this.fullName = null;
50177 this.appletCodeBase = null;
50178 this.appletIdiomaBase = null;
50179 this.appletDocumentBase = null;
50180 this.maximumSize = 2147483647;
50181 this.appletName = null;
50182 this.syncId = null;
50183 this.testAsync = false;
50184 this.async = false;
50185 this.strJavaVersion = null;
50186 this.strJavaVendor = null;
50187 this.display = null;
50188 this.canvas = null;
50189 this.jsgraphics = null;
50190 this.applet = null;
50191 this.defaultAppletSize = null;
50192 this.currentAppletSize = null;
50193 this.nextStatus = 0;
50194 this.status = 0;
50195 this.listeners = null;
50196 this.mouse = null;
50197 Clazz_instantialize (this, arguments);
50198 }, swingjs, "JSAppletPanel", java.awt.Panel, [java.applet.AppletStub, java.applet.AppletContext, swingjs.api.JSInterface]);
50199 Clazz_prepareFields (c$, function () {
50200 this.defaultAppletSize =  new java.awt.Dimension (10, 10);
50201 this.currentAppletSize =  new java.awt.Dimension (10, 10);
50202 });
50203 Clazz_makeConstructor (c$, 
50204 function (params) {
50205 Clazz_superConstructor (this, swingjs.JSAppletPanel, []);
50206 this.setPanel ();
50207 this.set (params);
50208 }, "java.util.Hashtable");
50209 Clazz_defineMethod (c$, "set", 
50210  function (params) {
50211 System.out.println ("JSAppletPanel initializing");
50212 this.params = params;
50213 this.htmlName = swingjs.JSUtil.split ("" + this.getParameter ("name"), "_object")[0];
50214 this.appletName = swingjs.JSUtil.split (this.htmlName + "_", "_")[0];
50215 this.syncId = this.getParameter ("syncId");
50216 this.fullName = this.htmlName + "__" + this.syncId + "__";
50217 params.put ("fullName", this.fullName);
50218 var o = params.get ("codePath");
50219 if (o == null) o = "../java/";
50220 this.appletCodeBase = o.toString ();
50221 this.appletIdiomaBase = this.appletCodeBase.substring (0, this.appletCodeBase.lastIndexOf ("/", this.appletCodeBase.length - 2) + 1) + "idioma";
50222 o = params.get ("documentBase");
50223 this.appletDocumentBase = (o == null ? "" : o.toString ());
50224 if (params.containsKey ("maximumSize")) Math.max ((params.get ("maximumSize")).intValue (), 100);
50225 this.async = (this.testAsync || params.containsKey ("async"));
50226 var applet = null;
50227 var javaver = "?";
50228 {
50229 if(self.Jmol) { applet =
50230 Jmol._applets[this.htmlName.split("_object")[0]]; javaver =
50231 Jmol._version; }
50232 }this.html5Applet = applet;
50233 this.strJavaVersion = javaver;
50234 this.strJavaVendor = "Java2Script/Java 1.6 (HTML5)";
50235 this.display = params.get ("display");
50236 this.threadGroup =  new swingjs.JSThreadGroup (this.appletName);
50237 this.myThread =  new swingjs.JSAppletThread (this, this.threadGroup, this.appletName);
50238 (this.threadGroup).setHtmlApplet (this.html5Applet);
50239 {
50240 Jmol._applets[this.appletName + "_thread"] =
50241 java.lang.Thread.thisThread = this.myThread;
50242 }this.appContext = swingjs.JSToolkit.createNewAppContext ();
50243 java.awt.Toolkit.getDefaultToolkit ();
50244 try {
50245 java.net.URL.setURLStreamHandlerFactory (swingjs.api.Interface.getInstance ("JU.AjaxURLStreamHandlerFactory", false));
50246 } catch (e) {
50247 }
50248 System.out.println ("JSAppletPanel initialized");
50249 }, "java.util.Hashtable");
50250 Clazz_defineMethod (c$, "start", 
50251 function () {
50252 if (this.status == 0) this.myThread.start ();
50253  else this.showStatus ("already started");
50254 });
50255 Clazz_defineMethod (c$, "addAppletListener", 
50256 function (l) {
50257 this.listeners = jssun.applet.AppletEventMulticaster.add (this.listeners, l);
50258 }, "jssun.applet.AppletListener");
50259 Clazz_defineMethod (c$, "removeAppletListener", 
50260 function (l) {
50261 this.listeners = jssun.applet.AppletEventMulticaster.remove (this.listeners, l);
50262 }, "jssun.applet.AppletListener");
50263 Clazz_defineMethod (c$, "dispatchAppletEvent", 
50264 function (id, argument) {
50265 if (this.listeners != null) {
50266 var evt =  new jssun.applet.AppletEvent (this, id, argument);
50267 this.listeners.appletStateChanged (evt);
50268 }}, "~N,~O");
50269 Clazz_defineMethod (c$, "getCode", 
50270  function () {
50271 return this.getParameter ("code");
50272 });
50273 Clazz_defineMethod (c$, "getCanvas", 
50274  function () {
50275 return (this.canvas == null ? (this.canvas = this.html5Applet._getHtml5Canvas ()) : this.canvas);
50276 });
50277 Clazz_overrideMethod (c$, "isActive", 
50278 function () {
50279 return true;
50280 });
50281 Clazz_overrideMethod (c$, "appletResize", 
50282 function (width, height) {
50283 var currentSize =  new java.awt.Dimension (this.currentAppletSize.width, this.currentAppletSize.height);
50284 this.currentAppletSize.width = width;
50285 this.currentAppletSize.height = height;
50286 this.applet.setBounds (0, 0, this.getWidth (), this.getHeight ());
50287 this.applet.getRootPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
50288 this.applet.getContentPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
50289 (this.applet.getContentPane ()).revalidate ();
50290 this.dispatchAppletEvent (51234, currentSize);
50291 }, "~N,~N");
50292 Clazz_overrideMethod (c$, "getDocumentBase", 
50293 function () {
50294 try {
50295 return  new java.net.URL (this.params.get ("documentBase"));
50296 } catch (e) {
50297 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50298 return null;
50299 } else {
50300 throw e;
50301 }
50302 }
50303 });
50304 Clazz_overrideMethod (c$, "getCodeBase", 
50305 function () {
50306 try {
50307 return  new java.net.URL (this.params.get ("codePath"));
50308 } catch (e) {
50309 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50310 return null;
50311 } else {
50312 throw e;
50313 }
50314 }
50315 });
50316 Clazz_overrideMethod (c$, "getParameter", 
50317 function (name) {
50318 var s = this.params.get (name);
50319 System.out.println ("get parameter: " + name + " = " + s);
50320 return (s == null ? null : "" + s);
50321 }, "~S");
50322 Clazz_overrideMethod (c$, "getAppletContext", 
50323 function () {
50324 return this;
50325 });
50326 Clazz_defineMethod (c$, "getHeight", 
50327 function () {
50328 return this.html5Applet._getHeight ();
50329 });
50330 Clazz_defineMethod (c$, "getWidth", 
50331 function () {
50332 return this.html5Applet._getWidth ();
50333 });
50334 Clazz_defineMethod (c$, "setBounds", 
50335 function (x, y, width, height) {
50336 this.reshape (x, y, width, height);
50337 this.currentAppletSize.width = width;
50338 this.currentAppletSize.height = height;
50339 }, "~N,~N,~N,~N");
50340 Clazz_overrideMethod (c$, "getImage", 
50341 function (url) {
50342 return null;
50343 }, "java.net.URL");
50344 Clazz_overrideMethod (c$, "getApplet", 
50345 function (name) {
50346 var applet = null;
50347 {
50348 applet = Jmol._applets[name]; applet && (applet =
50349 applet._applet);
50350 }return applet;
50351 }, "~S");
50352 Clazz_overrideMethod (c$, "getApplets", 
50353 function () {
50354 return null;
50355 });
50356 Clazz_defineMethod (c$, "showDocument", 
50357 function (url) {
50358 {
50359 window.open(url.toString());
50360 }}, "java.net.URL");
50361 Clazz_defineMethod (c$, "showDocument", 
50362 function (url, target) {
50363 {
50364 window.open(url.toString(), target);
50365 }}, "java.net.URL,~S");
50366 Clazz_defineMethod (c$, "showStatus", 
50367 function (status) {
50368 swingjs.JSToolkit.log (status);
50369 {
50370 Clazz._LoaderProgressMonitor.showStatus(status, true);
50371 }}, "~S");
50372 Clazz_overrideMethod (c$, "cacheFileByName", 
50373 function (fileName, isAdd) {
50374 return 0;
50375 }, "~S,~B");
50376 Clazz_overrideMethod (c$, "cachePut", 
50377 function (key, data) {
50378 }, "~S,~O");
50379 Clazz_overrideMethod (c$, "destroy", 
50380 function () {
50381 });
50382 Clazz_overrideMethod (c$, "getFullName", 
50383 function () {
50384 return this.fullName;
50385 });
50386 Clazz_overrideMethod (c$, "openFileAsyncSpecial", 
50387 function (fileName, flags) {
50388 }, "~S,~N");
50389 Clazz_defineMethod (c$, "processMouseEvent", 
50390 function (id, x, y, modifiers, time) {
50391 this.getMouse ().processEvent (id, x, y, modifiers, time);
50392 return false;
50393 }, "~N,~N,~N,~N,~N");
50394 Clazz_defineMethod (c$, "getMouse", 
50395  function () {
50396 return (this.mouse == null ? this.mouse =  new swingjs.JSMouse (this) : this.mouse);
50397 });
50398 Clazz_overrideMethod (c$, "processTwoPointGesture", 
50399 function (touches) {
50400 this.getMouse ().processTwoPointGesture (touches);
50401 }, "~A");
50402 Clazz_overrideMethod (c$, "setDisplay", 
50403 function (canvas) {
50404 this.canvas = canvas;
50405 }, "swingjs.api.HTML5Canvas");
50406 Clazz_overrideMethod (c$, "setScreenDimension", 
50407 function (width, height) {
50408 this.setGraphics (this.jsgraphics = null);
50409 if (this.applet != null) this.applet.resize (width, height);
50410 }, "~N,~N");
50411 Clazz_overrideMethod (c$, "setStatusDragDropped", 
50412 function (mode, x, y, fileName) {
50413 return false;
50414 }, "~N,~N,~N,~S");
50415 Clazz_overrideMethod (c$, "startHoverWatcher", 
50416 function (enable) {
50417 }, "~B");
50418 Clazz_overrideMethod (c$, "paint", 
50419 function (g) {
50420 this.applet.paint (this.setGraphics (g));
50421 }, "java.awt.Graphics");
50422 Clazz_defineMethod (c$, "setGraphics", 
50423  function (g) {
50424 return (g == null ? this.getGraphics () : g);
50425 }, "java.awt.Graphics");
50426 Clazz_overrideMethod (c$, "getGraphics", 
50427 function () {
50428 if (this.jsgraphics == null) {
50429 this.jsgraphics =  new swingjs.JSGraphics2D (this.getCanvas ());
50430 this.jsgraphics.setWindowParameters (this.getWidth (), this.getHeight ());
50431 }return this.jsgraphics;
50432 });
50433 Clazz_defineMethod (c$, "showAppletStatus", 
50434  function (status) {
50435 this.getAppletContext ().showStatus (this.htmlName + " " + status);
50436 }, "~S");
50437 Clazz_defineMethod (c$, "showAppletException", 
50438  function (t) {
50439 {
50440 this.showAppletStatus("error " + (t.getMessage ?
50441 t.getMessage() : t)); t.printStackTrace &&
50442 t.printStackTrace();
50443 }this.repaint ();
50444 }, "Throwable");
50445 Clazz_defineMethod (c$, "run1", 
50446 function (mode) {
50447 var ok = false;
50448 switch (mode) {
50449 case 0:
50450 this.currentAppletSize.width = this.defaultAppletSize.width = this.getWidth ();
50451 this.currentAppletSize.height = this.defaultAppletSize.height = this.getHeight ();
50452 this.setLayout ( new java.awt.BorderLayout ());
50453 this.nextStatus = 1;
50454 ok = true;
50455 break;
50456 case 1:
50457 switch (this.nextStatus) {
50458 case 1:
50459 if (this.status != 0) {
50460 this.showAppletStatus ("notdisposed");
50461 this.status = 7;
50462 break;
50463 }System.out.println ("JSAppletPanel runloader");
50464 this.runLoader ();
50465 this.nextStatus = 2;
50466 ok = true;
50467 break;
50468 case 2:
50469 if (this.status != 1 && this.status != 5) {
50470 this.showAppletStatus ("notloaded");
50471 break;
50472 }System.out.println ("JSAppletPanel init");
50473 this.setFont ( new java.awt.Font ("Dialog", 0, 12));
50474 this.applet.resize (this.defaultAppletSize);
50475 this.applet.init ();
50476 this.validate ();
50477 this.status = 2;
50478 this.showAppletStatus ("initialized");
50479 this.nextStatus = 3;
50480 ok = true;
50481 break;
50482 case 3:
50483 if (this.status != 2 && this.status != 4) {
50484 this.showAppletStatus ("notstarted");
50485 this.status = 7;
50486 break;
50487 }this.applet.getRootPane ().addNotify ();
50488 System.out.println ("JSAppletPanel start" + this.currentAppletSize);
50489 this.applet.resize (this.currentAppletSize);
50490 this.applet.start ();
50491 this.status = 3;
50492 this.showAppletStatus ("started");
50493 this.nextStatus = 35;
50494 ok = true;
50495 break;
50496 case 35:
50497 swingjs.JSToolkit.readyCallback (this.appletName, this.fullName, this.applet, this);
50498 break;
50499 case 4:
50500 if (this.status == 3) {
50501 this.status = 4;
50502 this.applet.setVisible (false);
50503 this.applet.stop ();
50504 this.showAppletStatus ("stopped");
50505 } else {
50506 this.showAppletStatus ("notstopped");
50507 this.status = 7;
50508 }break;
50509 case 5:
50510 if (this.status == 4 || this.status == 2) {
50511 this.status = 5;
50512 this.applet.destroy ();
50513 this.showAppletStatus ("destroyed");
50514 } else {
50515 this.showAppletStatus ("notdestroyed");
50516 this.status = 7;
50517 }break;
50518 case 75:
50519 if (this.status == 5 || this.status == 1) {
50520 this.showAppletStatus ("notdisposed");
50521 this.status = 7;
50522 } else {
50523 this.status = 0;
50524 this.removeChild (this.applet);
50525 this.applet = null;
50526 this.showAppletStatus ("disposed");
50527 }break;
50528 case 6:
50529 break;
50530 default:
50531 System.out.println ("unrecognized JSAppletPanel status: " + this.nextStatus);
50532 break;
50533 }
50534 break;
50535 default:
50536 System.out.println ("unrecognized JSAppletThread mode: " + mode);
50537 break;
50538 }
50539 return (ok ? 1 : 2);
50540 }, "~N");
50541 Clazz_defineMethod (c$, "runLoader", 
50542  function () {
50543 this.dispatchAppletEvent (51235, null);
50544 this.status = 1;
50545 var code = this.getCode ();
50546 try {
50547 if (code == null) {
50548 System.err.println ("runloader.err-- \"code\" must be specified.");
50549 throw  new InstantiationException ("\"code\" must be specified.");
50550 }this.applet = swingjs.JSToolkit.getInstance (code);
50551 if (this.applet == null) {
50552 System.out.println (code + " could not be launched");
50553 this.status = 7;
50554 } else if (!(Clazz_instanceOf (this.applet, javax.swing.JApplet))) {
50555 System.out.println (code + " is not a JApplet!?");
50556 this.status = 7;
50557 }} catch (e$$) {
50558 if (Clazz_exceptionOf (e$$, InstantiationException)) {
50559 var e = e$$;
50560 {
50561 this.status = 7;
50562 this.showAppletException (e);
50563 return;
50564 }
50565 } else if (Clazz_exceptionOf (e$$, Exception)) {
50566 var e = e$$;
50567 {
50568 this.status = 7;
50569 this.showAppletException (e);
50570 return;
50571 }
50572 } else if (Clazz_exceptionOf (e$$, ThreadDeath)) {
50573 var e = e$$;
50574 {
50575 this.status = 7;
50576 this.showAppletStatus ("death");
50577 return;
50578 }
50579 } else if (Clazz_exceptionOf (e$$, Error)) {
50580 var e = e$$;
50581 {
50582 this.status = 7;
50583 this.showAppletException (e);
50584 return;
50585 }
50586 } else {
50587 throw e$$;
50588 }
50589 } finally {
50590 this.dispatchAppletEvent (51236, null);
50591 }
50592 if (this.applet != null) {
50593 this.applet.setStub (this);
50594 this.applet.setVisible (false);
50595 this.add ("Center", this.applet);
50596 this.applet.setDispatcher ();
50597 this.applet.addNotify ();
50598 this.showAppletStatus ("loaded");
50599 this.validate ();
50600 }});
50601 Clazz_defineMethod (c$, "getUI", 
50602 function () {
50603 return null;
50604 });
50605 Clazz_overrideMethod (c$, "repaintImpl", 
50606 function (tm, x, y, width, height) {
50607 if (this.applet.isVisible () && this.applet.getWidth () > 0 && this.applet.getHeight () > 0) {
50608 this.applet.getContentPane ().repaint (tm, x, y, width, height);
50609 }}, "~N,~N,~N,~N,~N");
50610 Clazz_defineStatics (c$,
50611 "APPLET_UNINITIALIZED", 0,
50612 "APPLET_LOAD", 1,
50613 "APPLET_INIT", 2,
50614 "APPLET_START", 3,
50615 "APPLET_READY", 35,
50616 "APPLET_STOP", 4,
50617 "APPLET_DESTROY", 5,
50618 "APPLET_QUIT", 6,
50619 "APPLET_ERROR", 7,
50620 "APPLET_DISPOSE", 75,
50621 "APPLET_RESIZE", 51234,
50622 "APPLET_LOADING", 51235,
50623 "APPLET_LOADING_COMPLETED", 51236);
50624 });
50625 Clazz_declarePackage ("swingjs");
50626 Clazz_load (["jssun.java2d.SunGraphics2D"], "swingjs.JSGraphics2D", ["java.util.HashMap", "java.awt.BasicStroke", "$.Rectangle", "$.RenderingHints", "$.Toolkit", "java.awt.geom.AffineTransform", "swingjs.JSToolkit", "swingjs.api.HTML5CanvasContext2D"], function () {
50627 c$ = Clazz_decorateAsClass (function () {
50628 this.constrainX = 0;
50629 this.constrainY = 0;
50630 this.windowWidth = 0;
50631 this.windowHeight = 0;
50632 this.canvas = null;
50633 this.ctx = null;
50634 this.gc = null;
50635 this.paintState = 0;
50636 this.compositeState = -2147483648;
50637 this.strokeState = 0;
50638 this.$transformState = 0;
50639 this.clipState = 0;
50640 this.isShifted = false;
50641 this.font = null;
50642 this.inPath = false;
50643 this.currentClip = null;
50644 Clazz_instantialize (this, arguments);
50645 }, swingjs, "JSGraphics2D", jssun.java2d.SunGraphics2D, Cloneable);
50646 Clazz_makeConstructor (c$, 
50647 function (canvas) {
50648 Clazz_superConstructor (this, swingjs.JSGraphics2D, []);
50649 this.hints =  new java.awt.RenderingHints ( new java.util.HashMap ());
50650 this.canvas = canvas;
50651 this.ctx = this.canvas.getContext ("2d");
50652 this.$transform =  new java.awt.geom.AffineTransform ();
50653 {
50654 this.gc = SwingJS;
50655 }}, "~O");
50656 Clazz_overrideMethod (c$, "getDeviceConfiguration", 
50657 function () {
50658 return this.gc;
50659 });
50660 Clazz_overrideMethod (c$, "drawLine", 
50661 function (x0, y0, x1, y1) {
50662 var inPath = this.inPath;
50663 if (!inPath) this.ctx.beginPath ();
50664 this.ctx.moveTo (x0, y0);
50665 this.ctx.lineTo (x1, y1);
50666 if (!inPath) this.ctx.stroke ();
50667 }, "~N,~N,~N,~N");
50668 Clazz_defineMethod (c$, "drawCircle", 
50669 function (x, y, diameter) {
50670 this.drawArc (x, y, diameter, diameter, 0, 360);
50671 }, "~N,~N,~N");
50672 Clazz_overrideMethod (c$, "fillArc", 
50673 function (x, y, width, height, startAngle, arcAngle) {
50674 this.doArc (x, y, width, height, startAngle, arcAngle, true);
50675 }, "~N,~N,~N,~N,~N,~N");
50676 Clazz_overrideMethod (c$, "drawArc", 
50677 function (x, y, width, height, startAngle, arcAngle) {
50678 this.doArc (x, y, width, height, startAngle, arcAngle, false);
50679 }, "~N,~N,~N,~N,~N,~N");
50680 Clazz_defineMethod (c$, "save", 
50681  function () {
50682 this.ctx.save ();
50683 });
50684 Clazz_defineMethod (c$, "restore", 
50685  function () {
50686 this.ctx.restore ();
50687 });
50688 Clazz_defineMethod (c$, "doArc", 
50689  function (x, y, width, height, startAngle, arcAngle, fill) {
50690 var isCircle = (arcAngle - startAngle == 360);
50691 this.save ();
50692 this.ctx.translate (x, y);
50693 this.ctx.scale (Clazz_doubleToInt (width / height), height);
50694 this.ctx.beginPath ();
50695 if (fill) {
50696 }this.ctx.arc (0.5, 0.5, 0.5, this.toRad (startAngle), this.toRad (arcAngle), false);
50697 if (isCircle) this.ctx.closePath ();
50698 this.ctx.stroke ();
50699 this.restore ();
50700 }, "~N,~N,~N,~N,~N,~N,~B");
50701 Clazz_defineMethod (c$, "toRad", 
50702  function (a) {
50703 return a * 3.141592653589793 / 180;
50704 }, "~N");
50705 Clazz_defineMethod (c$, "drawPolygon", 
50706 function (ayPoints, axPoints, nPoints) {
50707 this.doPoly (ayPoints, axPoints, nPoints, false);
50708 }, "~A,~A,~N");
50709 Clazz_defineMethod (c$, "doPoly", 
50710  function (axPoints, ayPoints, nPoints, doFill) {
50711 this.ctx.beginPath ();
50712 this.ctx.moveTo (axPoints[0], ayPoints[0]);
50713 for (var i = 1; i < nPoints; i++) this.ctx.lineTo (axPoints[i], ayPoints[i]);
50714
50715 if (doFill) this.ctx.fill ();
50716  else this.ctx.stroke ();
50717 }, "~A,~A,~N,~B");
50718 Clazz_overrideMethod (c$, "drawRect", 
50719 function (x, y, width, height) {
50720 this.ctx.beginPath ();
50721 this.ctx.rect (x, y, width, height);
50722 this.ctx.stroke ();
50723 }, "~N,~N,~N,~N");
50724 Clazz_defineMethod (c$, "drawString", 
50725 function (s, x, y) {
50726 this.ctx.fillText (s, x, y);
50727 }, "~S,~N,~N");
50728 Clazz_defineMethod (c$, "background", 
50729 function (bgcolor) {
50730 this.backgroundColor = bgcolor;
50731 if (bgcolor == null) {
50732 if (!this.isShifted) this.ctx.translate (-0.5, -0.5);
50733 this.isShifted = true;
50734 return;
50735 }this.ctx.clearRect (0, 0, this.windowWidth, this.windowHeight);
50736 this.setGraphicsColor (bgcolor);
50737 this.fillRect (0, 0, this.windowWidth, this.windowHeight);
50738 }, "java.awt.Color");
50739 Clazz_defineMethod (c$, "fillCircle", 
50740 function (x, y, diameter) {
50741 var r = diameter / 2;
50742 this.ctx.beginPath ();
50743 this.ctx.arc (x + r, y + r, r, 0, 6.283185307179586, false);
50744 this.ctx.fill ();
50745 }, "~N,~N,~N");
50746 Clazz_defineMethod (c$, "fillPolygon", 
50747 function (ayPoints, axPoints, nPoints) {
50748 this.doPoly (ayPoints, axPoints, nPoints, true);
50749 }, "~A,~A,~N");
50750 Clazz_overrideMethod (c$, "fillRect", 
50751 function (x, y, width, height) {
50752 this.ctx.fillRect (x, y, width, height);
50753 }, "~N,~N,~N,~N");
50754 Clazz_defineMethod (c$, "setGraphicsColor", 
50755 function (c) {
50756 var s = swingjs.JSToolkit.getCSSColor (c);
50757 {
50758 this.ctx.fillStyle = s; this.ctx.strokeStyle = s;
50759 }}, "java.awt.Color");
50760 Clazz_overrideMethod (c$, "setFont", 
50761 function (font) {
50762 this.font = font;
50763 if (this.ctx == null) return;
50764 var s = swingjs.JSToolkit.getCanvasFont (font);
50765 {
50766 this.ctx.font = s;
50767 }}, "java.awt.Font");
50768 Clazz_defineMethod (c$, "setStrokeBold", 
50769 function (tf) {
50770 this.setLineWidth (tf ? 2. : 1.);
50771 }, "~B");
50772 Clazz_defineMethod (c$, "setLineWidth", 
50773  function (d) {
50774 {
50775 this.ctx.lineWidth = d;
50776 }}, "~N");
50777 Clazz_defineMethod (c$, "setWindowParameters", 
50778 function (width, height) {
50779 this.windowWidth = width;
50780 this.windowHeight = height;
50781 }, "~N,~N");
50782 Clazz_defineMethod (c$, "canDoLineTo", 
50783 function () {
50784 return true;
50785 });
50786 Clazz_defineMethod (c$, "doStroke", 
50787 function (isBegin) {
50788 this.inPath = isBegin;
50789 if (isBegin) {
50790 this.ctx.beginPath ();
50791 } else {
50792 this.ctx.stroke ();
50793 }}, "~B");
50794 Clazz_defineMethod (c$, "lineTo", 
50795 function (x2, y2) {
50796 this.ctx.lineTo (x2, y2);
50797 }, "~N,~N");
50798 Clazz_overrideMethod (c$, "clip", 
50799 function (s) {
50800 this.doShape (s);
50801 this.ctx.clip ();
50802 }, "java.awt.Shape");
50803 Clazz_overrideMethod (c$, "draw", 
50804 function (s) {
50805 this.doShape (s);
50806 this.ctx.stroke ();
50807 }, "java.awt.Shape");
50808 Clazz_defineMethod (c$, "doShape", 
50809  function (s) {
50810 this.ctx.beginPath ();
50811 var pts =  Clazz_newDoubleArray (6, 0);
50812 var pi = s.getPathIterator (null);
50813 while (!pi.isDone ()) {
50814 switch (pi.currentSegment (pts)) {
50815 case 0:
50816 this.ctx.moveTo (pts[0], pts[1]);
50817 break;
50818 case 1:
50819 this.ctx.lineTo (pts[0], pts[1]);
50820 break;
50821 case 2:
50822 this.ctx.quadraticCurveTo (pts[0], pts[1], pts[2], pts[3]);
50823 break;
50824 case 3:
50825 this.ctx.bezeierCurveTo (pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
50826 break;
50827 case 4:
50828 this.ctx.closePath ();
50829 break;
50830 }
50831 pi.next ();
50832 }
50833 return pi.getWindingRule ();
50834 }, "java.awt.Shape");
50835 Clazz_overrideMethod (c$, "fill", 
50836 function (s) {
50837 if (this.doShape (s) == 0) {
50838 this.ctx.fill("evenodd");
50839 } else this.ctx.fill ();
50840 }, "java.awt.Shape");
50841 Clazz_defineMethod (c$, "drawImage", 
50842 function (img, x, y, observer) {
50843 System.out.println ("JSGraphics testing draw image");
50844 this.drawString ("JSGraphics testing draw img", 50, 50);
50845 if (img != null) {
50846 var imgNode = this.getImageNode (img);
50847 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, img.getWidth (observer), img.getHeight (observer));
50848 if (observer != null) this.observe (img, observer, imgNode != null);
50849 }return true;
50850 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
50851 Clazz_defineMethod (c$, "observe", 
50852  function (img, observer, isOK) {
50853 observer.imageUpdate (img, (isOK ? 0 : 192), -1, -1, -1, -1);
50854 }, "java.awt.Image,java.awt.image.ImageObserver,~B");
50855 Clazz_defineMethod (c$, "drawImage", 
50856 function (img, x, y, width, height, observer) {
50857 if (img != null) {
50858 var imgNode = this.getImageNode (img);
50859 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, width, height);
50860 if (observer != null) this.observe (img, observer, imgNode != null);
50861 }return true;
50862 }, "java.awt.Image,~N,~N,~N,~N,java.awt.image.ImageObserver");
50863 Clazz_defineMethod (c$, "drawImage", 
50864 function (img, x, y, bgcolor, observer) {
50865 swingjs.JSToolkit.notImplemented (null);
50866 return this.drawImage (img, x, y, null);
50867 }, "java.awt.Image,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50868 Clazz_defineMethod (c$, "drawImage", 
50869 function (img, x, y, width, height, bgcolor, observer) {
50870 swingjs.JSToolkit.notImplemented (null);
50871 return this.drawImage (img, x, y, width, height, null);
50872 }, "java.awt.Image,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50873 Clazz_defineMethod (c$, "drawImage", 
50874 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer) {
50875 if (img != null) {
50876 var imgNode = this.getImageNode (img);
50877 if (imgNode != null) swingjs.api.HTML5CanvasContext2D.stretchImage (this.ctx, imgNode, sx1, sy1, sx2 - sx1, sy2 - sy1, dx1, dy1, dx2 - dx1, dy2 - dy1);
50878 if (observer != null) this.observe (img, observer, imgNode != null);
50879 }return true;
50880 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.image.ImageObserver");
50881 Clazz_defineMethod (c$, "getImageNode", 
50882  function (img) {
50883 var imgNode = null;
50884 {
50885 imgNode = img._imgNode;
50886 }if (imgNode == null) imgNode = swingjs.JSToolkit.getCompositor ().createImageNode (img);
50887 return imgNode;
50888 }, "java.awt.Image");
50889 Clazz_defineMethod (c$, "drawImage", 
50890 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgcolor, observer) {
50891 swingjs.JSToolkit.notImplemented (null);
50892 return this.drawImage (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer);
50893 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50894 Clazz_defineMethod (c$, "drawImage", 
50895 function (img, xform, obs) {
50896 swingjs.JSToolkit.notImplemented (null);
50897 return false;
50898 }, "java.awt.Image,java.awt.geom.AffineTransform,java.awt.image.ImageObserver");
50899 Clazz_overrideMethod (c$, "drawRenderedImage", 
50900 function (img, xform) {
50901 swingjs.JSToolkit.notImplemented (null);
50902 }, "java.awt.image.RenderedImage,java.awt.geom.AffineTransform");
50903 Clazz_overrideMethod (c$, "drawRenderableImage", 
50904 function (img, xform) {
50905 swingjs.JSToolkit.notImplemented (null);
50906 }, "java.awt.image.renderable.RenderableImage,java.awt.geom.AffineTransform");
50907 Clazz_overrideMethod (c$, "hit", 
50908 function (rect, s, onStroke) {
50909 swingjs.JSToolkit.notImplemented (null);
50910 return false;
50911 }, "java.awt.Rectangle,java.awt.Shape,~B");
50912 Clazz_overrideMethod (c$, "setPaint", 
50913 function (paint) {
50914 swingjs.JSToolkit.notImplemented (null);
50915 }, "java.awt.Paint");
50916 Clazz_overrideMethod (c$, "setStroke", 
50917 function (s) {
50918 if (!(Clazz_instanceOf (s, java.awt.BasicStroke))) return;
50919 var b = s;
50920 var dash = b.getDashArray ();
50921 var idash =  Clazz_newIntArray (dash == null ? 0 : dash.length, 0);
50922 for (var i = idash.length; --i >= 0; ) idash[i] = Clazz_floatToInt (dash[i]);
50923
50924 this.ctx.setLineDash (idash);
50925 this.setLineWidth (b.getLineWidth ());
50926 var lineCap;
50927 var lineJoin;
50928 var miterLimit = -1;
50929 switch (b.getEndCap ()) {
50930 case 0:
50931 lineCap = "butt";
50932 break;
50933 case 2:
50934 lineCap = "square";
50935 break;
50936 case 1:
50937 default:
50938 lineCap = "round";
50939 }
50940 switch (b.getLineJoin ()) {
50941 case 2:
50942 lineJoin = "bevel";
50943 break;
50944 case 0:
50945 lineJoin = "miter";
50946 miterLimit = b.getMiterLimit ();
50947 break;
50948 case 1:
50949 lineJoin = "round";
50950 }
50951 {
50952 this.ctx.lineCap = lineCap; this.ctx.lineJoin = lineJoin; if
50953 (miterLimit >= 0) this.ctx.miterLimit = miterLimit;
50954 }}, "java.awt.Stroke");
50955 Clazz_overrideMethod (c$, "setRenderingHint", 
50956 function (hintKey, hintValue) {
50957 this.hints.put (hintKey, hintValue);
50958 }, "java.awt.RenderingHints.Key,~O");
50959 Clazz_overrideMethod (c$, "getRenderingHint", 
50960 function (hintKey) {
50961 return this.hints.get (hintKey);
50962 }, "java.awt.RenderingHints.Key");
50963 Clazz_overrideMethod (c$, "setRenderingHints", 
50964 function (hints) {
50965 this.hints =  new java.awt.RenderingHints (hints);
50966 }, "java.util.Map");
50967 Clazz_overrideMethod (c$, "addRenderingHints", 
50968 function (hints) {
50969 for (var e, $e = hints.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) this.hints.put (e.getKey (), e.getValue ());
50970
50971 }, "java.util.Map");
50972 Clazz_overrideMethod (c$, "getRenderingHints", 
50973 function () {
50974 return this.hints;
50975 });
50976 Clazz_defineMethod (c$, "translate", 
50977 function (x, y) {
50978 this.ctx.translate (x, y);
50979 }, "~N,~N");
50980 Clazz_overrideMethod (c$, "scale", 
50981 function (sx, sy) {
50982 this.ctx.scale (sx, sy);
50983 }, "~N,~N");
50984 Clazz_overrideMethod (c$, "setBackground", 
50985 function (color) {
50986 this.background (color);
50987 }, "java.awt.Color");
50988 Clazz_overrideMethod (c$, "getBackground", 
50989 function () {
50990 return this.backgroundColor;
50991 });
50992 Clazz_overrideMethod (c$, "createSwingJS", 
50993 function () {
50994 return this.clone ();
50995 });
50996 Clazz_overrideMethod (c$, "clone", 
50997 function () {
50998 this.save ();
50999 return this.clone0 ();
51000 });
51001 Clazz_overrideMethod (c$, "dispose", 
51002 function () {
51003 if (this.compositeState >= 0) this.setComposite (null);
51004 this.restore ();
51005 });
51006 Clazz_overrideMethod (c$, "getColor", 
51007 function () {
51008 return this.foregroundColor;
51009 });
51010 Clazz_overrideMethod (c$, "setColor", 
51011 function (c) {
51012 this.foregroundColor = c;
51013 this.setGraphicsColor (c);
51014 }, "java.awt.Color");
51015 Clazz_overrideMethod (c$, "getFont", 
51016 function () {
51017 return this.font;
51018 });
51019 Clazz_defineMethod (c$, "getFontMetrics", 
51020 function (f) {
51021 return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f);
51022 }, "java.awt.Font");
51023 Clazz_overrideMethod (c$, "clipRect", 
51024 function (x, y, width, height) {
51025 this.ctx.beginPath ();
51026 this.ctx.rect (x, y, width, height);
51027 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
51028 this.ctx.clip ();
51029 }, "~N,~N,~N,~N");
51030 Clazz_defineMethod (c$, "setClip", 
51031 function (x, y, width, height) {
51032 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
51033 {
51034 if (arguments.length == 1) { setClip1(x); return; }
51035 }this.ctx.beginPath ();
51036 this.ctx.rect (x, y, width, height);
51037 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
51038 this.ctx.clip ();
51039 }, "~N,~N,~N,~N");
51040 Clazz_defineMethod (c$, "setClip1", 
51041 function (clip) {
51042 this.ctx.beginPath ();
51043 this.doShape (clip);
51044 this.ctx.clip ();
51045 }, "java.awt.Shape");
51046 Clazz_overrideMethod (c$, "clearRect", 
51047 function (x, y, width, height) {
51048 this.ctx.clearRect (x, y, width, height);
51049 }, "~N,~N,~N,~N");
51050 Clazz_overrideMethod (c$, "drawPolyline", 
51051 function (xPoints, yPoints, nPoints) {
51052 if (nPoints < 2) return;
51053 this.ctx.moveTo (xPoints[0], yPoints[0]);
51054 for (var i = 1; i < nPoints; i++) {
51055 this.ctx.lineTo (xPoints[i], yPoints[i]);
51056 }
51057 }, "~A,~A,~N");
51058 Clazz_overrideMethod (c$, "copyArea", 
51059 function (x, y, width, height, dx, dy) {
51060 swingjs.JSToolkit.notImplemented (null);
51061 }, "~N,~N,~N,~N,~N,~N");
51062 Clazz_overrideMethod (c$, "drawRoundRect", 
51063 function (x, y, width, height, arcWidth, arcHeight) {
51064 swingjs.JSToolkit.notImplemented (null);
51065 this.drawRect (x, y, width, height);
51066 }, "~N,~N,~N,~N,~N,~N");
51067 Clazz_overrideMethod (c$, "fillRoundRect", 
51068 function (x, y, width, height, arcWidth, arcHeight) {
51069 swingjs.JSToolkit.notImplemented (null);
51070 this.fillRect (x, y, width, height);
51071 }, "~N,~N,~N,~N,~N,~N");
51072 Clazz_overrideMethod (c$, "drawOval", 
51073 function (x, y, width, height) {
51074 swingjs.JSToolkit.notImplemented (null);
51075 }, "~N,~N,~N,~N");
51076 Clazz_overrideMethod (c$, "fillOval", 
51077 function (x, y, width, height) {
51078 swingjs.JSToolkit.notImplemented (null);
51079 }, "~N,~N,~N,~N");
51080 Clazz_overrideMethod (c$, "getClip", 
51081 function () {
51082 swingjs.JSToolkit.notImplemented (null);
51083 return null;
51084 });
51085 Clazz_overrideMethod (c$, "drawStringTrans", 
51086 function (str, x, y) {
51087 swingjs.JSToolkit.notImplemented (null);
51088 }, "~S,~N,~N");
51089 Clazz_defineMethod (c$, "drawString", 
51090 function (iterator, x, y) {
51091 swingjs.JSToolkit.notImplemented (null);
51092 }, "java.text.AttributedCharacterIterator,~N,~N");
51093 Clazz_overrideMethod (c$, "drawStringAttrTrans", 
51094 function (iterator, x, y) {
51095 swingjs.JSToolkit.notImplemented (null);
51096 }, "java.text.AttributedCharacterIterator,~N,~N");
51097 Clazz_overrideMethod (c$, "translateTrans", 
51098 function (tx, ty) {
51099 swingjs.JSToolkit.notImplemented (null);
51100 }, "~N,~N");
51101 Clazz_defineMethod (c$, "rotate", 
51102 function (theta) {
51103 swingjs.JSToolkit.notImplemented (null);
51104 }, "~N");
51105 Clazz_defineMethod (c$, "rotate", 
51106 function (theta, x, y) {
51107 swingjs.JSToolkit.notImplemented (null);
51108 }, "~N,~N,~N");
51109 Clazz_overrideMethod (c$, "shear", 
51110 function (shx, shy) {
51111 swingjs.JSToolkit.notImplemented (null);
51112 }, "~N,~N");
51113 Clazz_overrideMethod (c$, "transform", 
51114 function (xform) {
51115 swingjs.JSToolkit.notImplemented (null);
51116 }, "java.awt.geom.AffineTransform");
51117 Clazz_overrideMethod (c$, "setTransform", 
51118 function (Tx) {
51119 swingjs.JSToolkit.notImplemented (null);
51120 }, "java.awt.geom.AffineTransform");
51121 Clazz_overrideMethod (c$, "getTransform", 
51122 function () {
51123 swingjs.JSToolkit.notImplemented (null);
51124 return null;
51125 });
51126 Clazz_defineMethod (c$, "cloneTransform", 
51127 function () {
51128 swingjs.JSToolkit.notImplemented (null);
51129 return null;
51130 });
51131 Clazz_overrideMethod (c$, "getPaint", 
51132 function () {
51133 swingjs.JSToolkit.notImplemented (null);
51134 return null;
51135 });
51136 Clazz_overrideMethod (c$, "getStroke", 
51137 function () {
51138 swingjs.JSToolkit.notImplemented (null);
51139 return null;
51140 });
51141 Clazz_overrideMethod (c$, "getFontRenderContext", 
51142 function () {
51143 swingjs.JSToolkit.notImplemented (null);
51144 return null;
51145 });
51146 Clazz_overrideMethod (c$, "setPaintMode", 
51147 function () {
51148 swingjs.JSToolkit.notImplemented (null);
51149 });
51150 Clazz_overrideMethod (c$, "setXORMode", 
51151 function (c1) {
51152 swingjs.JSToolkit.notImplemented (null);
51153 }, "java.awt.Color");
51154 Clazz_defineMethod (c$, "getClipBounds", 
51155 function () {
51156 var r = null;
51157 {
51158 if (arguments.length == 1) r = arguments[0];
51159 }var clipRect = this.getClipBoundsImpl ();
51160 if (r == null) {
51161 r = clipRect;
51162 } else {
51163 r.x = clipRect.x;
51164 r.y = clipRect.y;
51165 r.width = clipRect.width;
51166 r.height = clipRect.height;
51167 }return r;
51168 });
51169 Clazz_defineMethod (c$, "getClipBoundsImpl", 
51170  function () {
51171 if (this.currentClip == null) {
51172 this.currentClip =  new java.awt.Rectangle (0, 0, this.windowWidth, this.windowHeight);
51173 }return this.currentClip;
51174 });
51175 Clazz_overrideMethod (c$, "setComposite", 
51176 function (comp) {
51177 var newRule = 0;
51178 var isValid = (comp == null || (Clazz_instanceOf (comp, java.awt.AlphaComposite)) && (newRule = (comp).getRule ()) != this.compositeState);
51179 if (!isValid) return;
51180 if (swingjs.JSToolkit.setGraphicsCompositeAlpha (this, newRule)) this.compositeState = newRule;
51181 }, "java.awt.Composite");
51182 Clazz_defineMethod (c$, "drawImage", 
51183 function (img, op, x, y) {
51184 swingjs.JSToolkit.drawImageOp (this, img, op, x, y);
51185 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
51186 Clazz_defineMethod (c$, "setAlpha", 
51187 function (f) {
51188 {
51189 this.ctx.globalAlpha = f;
51190 }}, "~N");
51191 Clazz_defineStatics (c$,
51192 "saveLevel", 0);
51193 });
51194 Clazz_declarePackage ("swingjs");
51195 Clazz_load (["swingjs.JSThread"], "swingjs.JSAppletThread", ["javax.swing.SwingUtilities"], function () {
51196 c$ = Clazz_decorateAsClass (function () {
51197 this.ap = null;
51198 Clazz_instantialize (this, arguments);
51199 }, swingjs, "JSAppletThread", swingjs.JSThread);
51200 Clazz_makeConstructor (c$, 
51201 function (ap, group, name) {
51202 Clazz_superConstructor (this, swingjs.JSAppletThread, [group, name]);
51203 this.ap = ap;
51204 }, "swingjs.JSAppletPanel,ThreadGroup,~S");
51205 Clazz_overrideMethod (c$, "run1", 
51206 function (mode) {
51207 mode = this.ap.run1 (mode);
51208 if (mode != 2) this.dispatchAndReturn (null, mode);
51209 }, "~N");
51210 Clazz_defineMethod (c$, "dispatchAndReturn", 
51211 function (r, mode) {
51212 var m = mode;
51213 javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("swingjs.JSAppletThread$1") ? 0 : swingjs.JSAppletThread.$JSAppletThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSAppletThread$1, this, Clazz_cloneFinals ("m", m))));
51214 }, "Runnable,~N");
51215 c$.$JSAppletThread$1$ = function () {
51216 Clazz_pu$h(self.c$);
51217 c$ = Clazz_declareAnonymous (swingjs, "JSAppletThread$1", null, Runnable);
51218 Clazz_overrideMethod (c$, "run", 
51219 function () {
51220 this.b$["swingjs.JSAppletThread"].run1 (this.f$.m);
51221 });
51222 c$ = Clazz_p0p ();
51223 };
51224 });
51225 Clazz_declarePackage ("swingjs");
51226 Clazz_load (null, "swingjs.JSMouse", ["JU.V3", "java.awt.Toolkit", "java.awt.event.MouseEvent"], function () {
51227 c$ = Clazz_decorateAsClass (function () {
51228 this.ap = null;
51229 this.isMouseDown = false;
51230 this.wheeling = false;
51231 this.xWhenPressed = 0;
51232 this.yWhenPressed = 0;
51233 this.modifiersWhenPressed10 = 0;
51234 Clazz_instantialize (this, arguments);
51235 }, swingjs, "JSMouse");
51236 Clazz_makeConstructor (c$, 
51237 function (ap) {
51238 this.ap = ap;
51239 }, "swingjs.JSAppletPanel");
51240 Clazz_defineMethod (c$, "processEvent", 
51241 function (id, x, y, modifiers, time) {
51242 if (id != -1) modifiers = swingjs.JSMouse.applyLeftMouse (modifiers);
51243 switch (id) {
51244 case -1:
51245 this.wheeled (time, x, modifiers);
51246 break;
51247 case 501:
51248 this.xWhenPressed = x;
51249 this.yWhenPressed = y;
51250 this.modifiersWhenPressed10 = modifiers;
51251 this.pressed (time, x, y, modifiers, false);
51252 break;
51253 case 506:
51254 this.dragged (time, x, y, modifiers);
51255 break;
51256 case 504:
51257 this.entry (time, x, y, false);
51258 break;
51259 case 505:
51260 this.entry (time, x, y, true);
51261 break;
51262 case 503:
51263 this.moved (time, x, y, modifiers);
51264 break;
51265 case 502:
51266 this.released (time, x, y, modifiers);
51267 if (x == this.xWhenPressed && y == this.yWhenPressed && modifiers == this.modifiersWhenPressed10) {
51268 this.clicked (time, x, y, modifiers, 1);
51269 }break;
51270 default:
51271 return false;
51272 }
51273 return true;
51274 }, "~N,~N,~N,~N,~N");
51275 Clazz_defineMethod (c$, "processTwoPointGesture", 
51276 function (touches) {
51277 if (touches[0].length < 2) return;
51278 var t1 = touches[0];
51279 var t2 = touches[1];
51280 var t1first = t1[0];
51281 var t1last = t1[t2.length - 1];
51282 var x1first = t1first[0];
51283 var x1last = t1last[0];
51284 var dx1 = x1last - x1first;
51285 var y1first = t1first[1];
51286 var y1last = t1last[1];
51287 var dy1 = y1last - y1first;
51288 var v1 = JU.V3.new3 (dx1, dy1, 0);
51289 var d1 = v1.length ();
51290 var t2first = t2[0];
51291 var t2last = t2[t2.length - 1];
51292 var x2first = t2first[0];
51293 var x2last = t2last[0];
51294 var dx2 = x2last - x2first;
51295 var y2first = t2first[1];
51296 var y2last = t2last[1];
51297 var dy2 = y2last - y2first;
51298 var v2 = JU.V3.new3 (dx2, dy2, 0);
51299 var d2 = v2.length ();
51300 if (d1 < 1 || d2 < 1) return;
51301 v1.normalize ();
51302 v2.normalize ();
51303 var cos12 = (v1.dot (v2));
51304 if (cos12 > 0.8) {
51305 var deltaX = Clazz_floatToInt (x1last - t1[t1.length - 2][0]);
51306 var deltaY = Clazz_floatToInt (y1last - t1[t1.length - 2][1]);
51307 this.translateXYBy (deltaX, deltaY);
51308 } else if (cos12 < -0.8) {
51309 v1 = JU.V3.new3 (x2first - x1first, y2first - y1first, 0);
51310 v2 = JU.V3.new3 (x2last - x1last, y2last - y1last, 0);
51311 var dx = v2.length () - v1.length ();
51312 this.wheeled (System.currentTimeMillis (), dx < 0 ? -1 : 1, 32);
51313 }}, "~A");
51314 Clazz_defineMethod (c$, "translateXYBy", 
51315  function (deltaX, deltaY) {
51316 }, "~N,~N");
51317 Clazz_defineMethod (c$, "mouseClicked", 
51318 function (e) {
51319 this.clicked (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.getClickCount ());
51320 }, "java.awt.event.MouseEvent");
51321 Clazz_defineMethod (c$, "mouseEntered", 
51322 function (e) {
51323 this.entry (e.getWhen (), e.getX (), e.getY (), false);
51324 }, "java.awt.event.MouseEvent");
51325 Clazz_defineMethod (c$, "mouseExited", 
51326 function (e) {
51327 this.entry (e.getWhen (), e.getX (), e.getY (), true);
51328 }, "java.awt.event.MouseEvent");
51329 Clazz_defineMethod (c$, "mousePressed", 
51330 function (e) {
51331 this.pressed (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.isPopupTrigger ());
51332 }, "java.awt.event.MouseEvent");
51333 Clazz_defineMethod (c$, "mouseReleased", 
51334 function (e) {
51335 this.released (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51336 }, "java.awt.event.MouseEvent");
51337 Clazz_defineMethod (c$, "mouseDragged", 
51338 function (e) {
51339 var modifiers = e.getModifiers ();
51340 if ((modifiers & 28) == 0) modifiers |= 16;
51341 this.dragged (e.getWhen (), e.getX (), e.getY (), modifiers);
51342 }, "java.awt.event.MouseEvent");
51343 Clazz_defineMethod (c$, "mouseMoved", 
51344 function (e) {
51345 this.moved (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51346 }, "java.awt.event.MouseEvent");
51347 Clazz_defineMethod (c$, "mouseWheelMoved", 
51348 function (e) {
51349 e.consume ();
51350 this.wheeled (e.getWhen (), e.getWheelRotation (), e.getModifiers ());
51351 }, "java.awt.event.MouseWheelEvent");
51352 Clazz_defineMethod (c$, "entry", 
51353  function (time, x, y, isExit) {
51354 this.wheeling = false;
51355 this.mouseEnterExit (time, x, y, isExit);
51356 }, "~N,~N,~N,~B");
51357 Clazz_defineMethod (c$, "clicked", 
51358  function (time, x, y, modifiers, clickCount) {
51359 this.mouseAction (500, time, x, y, 1, modifiers);
51360 }, "~N,~N,~N,~N,~N");
51361 Clazz_defineMethod (c$, "moved", 
51362  function (time, x, y, modifiers) {
51363 if (this.isMouseDown) this.mouseAction (506, time, x, y, 0, swingjs.JSMouse.applyLeftMouse (modifiers));
51364  else this.mouseAction (503, time, x, y, 0, modifiers);
51365 }, "~N,~N,~N,~N");
51366 Clazz_defineMethod (c$, "wheeled", 
51367  function (time, rotation, modifiers) {
51368 this.wheeling = true;
51369 this.mouseAction (507, time, 0, rotation, 0, modifiers & -29 | 32);
51370 }, "~N,~N,~N");
51371 Clazz_defineMethod (c$, "pressed", 
51372  function (time, x, y, modifiers, isPopupTrigger) {
51373 this.isMouseDown = true;
51374 this.wheeling = false;
51375 this.mouseAction (501, time, x, y, 0, modifiers);
51376 }, "~N,~N,~N,~N,~B");
51377 Clazz_defineMethod (c$, "released", 
51378  function (time, x, y, modifiers) {
51379 this.isMouseDown = false;
51380 this.wheeling = false;
51381 this.mouseAction (502, time, x, y, 0, modifiers);
51382 }, "~N,~N,~N,~N");
51383 Clazz_defineMethod (c$, "dragged", 
51384  function (time, x, y, modifiers) {
51385 if (this.wheeling) return;
51386 if ((modifiers & 20) == 20) modifiers = modifiers & -5 | 2;
51387 this.mouseAction (506, time, x, y, 0, modifiers);
51388 }, "~N,~N,~N,~N");
51389 c$.applyLeftMouse = Clazz_defineMethod (c$, "applyLeftMouse", 
51390  function (modifiers) {
51391 return ((modifiers & 28) == 0) ? (modifiers | 16) : modifiers;
51392 }, "~N");
51393 Clazz_defineMethod (c$, "getButton", 
51394  function (modifiers) {
51395 switch (modifiers & 28) {
51396 case 16:
51397 return 1;
51398 case 8:
51399 return 2;
51400 case 4:
51401 return 3;
51402 default:
51403 return 0;
51404 }
51405 }, "~N");
51406 Clazz_defineMethod (c$, "mouseEnterExit", 
51407  function (time, x, y, isExit) {
51408 }, "~N,~N,~N,~B");
51409 Clazz_defineMethod (c$, "mouseAction", 
51410  function (id, time, x, y, count, modifiers) {
51411 var popupTrigger = false;
51412 var button = this.getButton (modifiers);
51413 var source = this.ap.applet;
51414 var e =  new java.awt.event.MouseEvent (source, id, time, modifiers, x, y, x, y, count, popupTrigger, button);
51415 java.awt.Toolkit.getEventQueue ().postEvent (e);
51416 }, "~N,~N,~N,~N,~N,~N");
51417 Clazz_defineStatics (c$,
51418 "MOUSE_LEFT", 16,
51419 "MOUSE_MIDDLE", 8,
51420 "MOUSE_RIGHT", 4,
51421 "MOUSE_WHEEL", 32,
51422 "MAC_COMMAND", 20,
51423 "BUTTON_MASK", 28);
51424 });
51425 Clazz_declarePackage ("swingjs");
51426 Clazz_load (["java.awt.peer.LightweightPeer"], "swingjs.JSComponentPeer", ["swingjs.JSToolkit"], function () {
51427 c$ = Clazz_decorateAsClass (function () {
51428 this.target = null;
51429 this.ui = null;
51430 Clazz_instantialize (this, arguments);
51431 }, swingjs, "JSComponentPeer", null, java.awt.peer.LightweightPeer);
51432 Clazz_makeConstructor (c$, 
51433 function (target) {
51434 this.target = target;
51435 this.ui = swingjs.JSToolkit.getUI (target, false);
51436 }, "java.awt.Component");
51437 Clazz_overrideMethod (c$, "isObscured", 
51438 function () {
51439 return false;
51440 });
51441 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51442 function () {
51443 return false;
51444 });
51445 Clazz_overrideMethod (c$, "setVisible", 
51446 function (b) {
51447 }, "~B");
51448 Clazz_overrideMethod (c$, "setEnabled", 
51449 function (b) {
51450 }, "~B");
51451 Clazz_overrideMethod (c$, "paint", 
51452 function (g) {
51453 }, "java.awt.Graphics");
51454 Clazz_overrideMethod (c$, "repaint", 
51455 function (tm, x, y, width, height) {
51456 }, "~N,~N,~N,~N,~N");
51457 Clazz_overrideMethod (c$, "print", 
51458 function (g) {
51459 }, "java.awt.Graphics");
51460 Clazz_overrideMethod (c$, "setBounds", 
51461 function (x, y, width, height, op) {
51462 }, "~N,~N,~N,~N,~N");
51463 Clazz_overrideMethod (c$, "handleEvent", 
51464 function (e) {
51465 }, "java.awt.AWTEvent");
51466 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51467 function (e) {
51468 }, "java.awt.event.PaintEvent");
51469 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51470 function () {
51471 return null;
51472 });
51473 Clazz_overrideMethod (c$, "getPreferredSize", 
51474 function () {
51475 return null;
51476 });
51477 Clazz_overrideMethod (c$, "getMinimumSize", 
51478 function () {
51479 return null;
51480 });
51481 Clazz_overrideMethod (c$, "getColorModel", 
51482 function () {
51483 return null;
51484 });
51485 Clazz_overrideMethod (c$, "getToolkit", 
51486 function () {
51487 return null;
51488 });
51489 Clazz_overrideMethod (c$, "getGraphics", 
51490 function () {
51491 return null;
51492 });
51493 Clazz_overrideMethod (c$, "getFontMetrics", 
51494 function (font) {
51495 return null;
51496 }, "java.awt.Font");
51497 Clazz_overrideMethod (c$, "dispose", 
51498 function () {
51499 });
51500 Clazz_overrideMethod (c$, "setForeground", 
51501 function (c) {
51502 }, "java.awt.Color");
51503 Clazz_overrideMethod (c$, "setBackground", 
51504 function (c) {
51505 }, "java.awt.Color");
51506 Clazz_overrideMethod (c$, "setFont", 
51507 function (f) {
51508 }, "java.awt.Font");
51509 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51510 function () {
51511 });
51512 Clazz_overrideMethod (c$, "requestFocus", 
51513 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51514 return false;
51515 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51516 Clazz_overrideMethod (c$, "isFocusable", 
51517 function () {
51518 return false;
51519 });
51520 Clazz_defineMethod (c$, "createImage", 
51521 function (producer) {
51522 return null;
51523 }, "java.awt.image.ImageProducer");
51524 Clazz_defineMethod (c$, "createImage", 
51525 function (width, height) {
51526 return null;
51527 }, "~N,~N");
51528 Clazz_overrideMethod (c$, "createVolatileImage", 
51529 function (width, height) {
51530 return null;
51531 }, "~N,~N");
51532 Clazz_overrideMethod (c$, "prepareImage", 
51533 function (img, w, h, o) {
51534 return false;
51535 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51536 Clazz_overrideMethod (c$, "checkImage", 
51537 function (img, w, h, o) {
51538 return 0;
51539 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51540 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51541 function () {
51542 return null;
51543 });
51544 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51545 function () {
51546 return false;
51547 });
51548 Clazz_overrideMethod (c$, "getBackBuffer", 
51549 function () {
51550 return null;
51551 });
51552 Clazz_overrideMethod (c$, "destroyBuffers", 
51553 function () {
51554 });
51555 Clazz_overrideMethod (c$, "reparent", 
51556 function (newContainer) {
51557 }, "java.awt.peer.ContainerPeer");
51558 Clazz_overrideMethod (c$, "isReparentSupported", 
51559 function () {
51560 return false;
51561 });
51562 Clazz_overrideMethod (c$, "layout", 
51563 function () {
51564 });
51565 Clazz_overrideMethod (c$, "getBounds", 
51566 function () {
51567 return null;
51568 });
51569 });
51570 Clazz_declarePackage ("swingjs");
51571 Clazz_load (["java.awt.peer.FramePeer"], "swingjs.JSWindowPeer", ["java.lang.Thread", "java.awt.GraphicsEnvironment", "$.Insets", "$.Point", "$.Toolkit"], function () {
51572 c$ = Clazz_decorateAsClass (function () {
51573 this.window = null;
51574 this.isFrame = false;
51575 this.applet = null;
51576 this.graphics = null;
51577 this.font = null;
51578 Clazz_instantialize (this, arguments);
51579 }, swingjs, "JSWindowPeer", null, java.awt.peer.FramePeer);
51580 Clazz_overrideMethod (c$, "setFrame", 
51581 function (target, isFrame) {
51582 this.isFrame = isFrame;
51583 this.window = target;
51584 var jc = this;
51585 jc.myThread = Thread.currentThread ();
51586 jc.threadGroup = jc.myThread.getThreadGroup ();
51587 this.applet = (jc.threadGroup).getHtmlApplet ();
51588 this.graphics = (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ()).createGraphicsSized (target, 500, 300);
51589 return this;
51590 }, "java.awt.Window,~B");
51591 Clazz_overrideMethod (c$, "getGraphics", 
51592 function () {
51593 this.graphics.setFont (this.window.getFont ());
51594 return this.graphics;
51595 });
51596 Clazz_overrideMethod (c$, "getToolkit", 
51597 function () {
51598 return java.awt.Toolkit.getDefaultToolkit ();
51599 });
51600 Clazz_overrideMethod (c$, "getFontMetrics", 
51601 function (font) {
51602 if (!font.equals (this.font)) this.window.setFont (this.font = font);
51603 return this.graphics.getFontMetrics (font);
51604 }, "java.awt.Font");
51605 Clazz_overrideMethod (c$, "getInsets", 
51606 function () {
51607 return  new java.awt.Insets (0, 0, 0, 0);
51608 });
51609 Clazz_overrideMethod (c$, "beginValidate", 
51610 function () {
51611 });
51612 Clazz_overrideMethod (c$, "endValidate", 
51613 function () {
51614 });
51615 Clazz_overrideMethod (c$, "beginLayout", 
51616 function () {
51617 });
51618 Clazz_overrideMethod (c$, "endLayout", 
51619 function () {
51620 });
51621 Clazz_overrideMethod (c$, "isObscured", 
51622 function () {
51623 return false;
51624 });
51625 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51626 function () {
51627 return false;
51628 });
51629 Clazz_overrideMethod (c$, "setVisible", 
51630 function (b) {
51631 }, "~B");
51632 Clazz_overrideMethod (c$, "setEnabled", 
51633 function (b) {
51634 }, "~B");
51635 Clazz_overrideMethod (c$, "paint", 
51636 function (g) {
51637 }, "java.awt.Graphics");
51638 Clazz_overrideMethod (c$, "repaint", 
51639 function (tm, x, y, width, height) {
51640 }, "~N,~N,~N,~N,~N");
51641 Clazz_overrideMethod (c$, "print", 
51642 function (g) {
51643 }, "java.awt.Graphics");
51644 Clazz_overrideMethod (c$, "setBounds", 
51645 function (x, y, width, height, op) {
51646 }, "~N,~N,~N,~N,~N");
51647 Clazz_overrideMethod (c$, "handleEvent", 
51648 function (e) {
51649 }, "java.awt.AWTEvent");
51650 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51651 function (e) {
51652 }, "java.awt.event.PaintEvent");
51653 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51654 function () {
51655 return  new java.awt.Point ();
51656 });
51657 Clazz_overrideMethod (c$, "getPreferredSize", 
51658 function () {
51659 return null;
51660 });
51661 Clazz_overrideMethod (c$, "getMinimumSize", 
51662 function () {
51663 return null;
51664 });
51665 Clazz_overrideMethod (c$, "getColorModel", 
51666 function () {
51667 return null;
51668 });
51669 Clazz_overrideMethod (c$, "dispose", 
51670 function () {
51671 });
51672 Clazz_overrideMethod (c$, "setForeground", 
51673 function (c) {
51674 }, "java.awt.Color");
51675 Clazz_overrideMethod (c$, "setBackground", 
51676 function (c) {
51677 }, "java.awt.Color");
51678 Clazz_overrideMethod (c$, "setFont", 
51679 function (f) {
51680 this.font = f;
51681 }, "java.awt.Font");
51682 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51683 function () {
51684 });
51685 Clazz_overrideMethod (c$, "requestFocus", 
51686 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51687 return false;
51688 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51689 Clazz_overrideMethod (c$, "isFocusable", 
51690 function () {
51691 return false;
51692 });
51693 Clazz_defineMethod (c$, "createImage", 
51694 function (producer) {
51695 return null;
51696 }, "java.awt.image.ImageProducer");
51697 Clazz_defineMethod (c$, "createImage", 
51698 function (width, height) {
51699 return null;
51700 }, "~N,~N");
51701 Clazz_overrideMethod (c$, "createVolatileImage", 
51702 function (width, height) {
51703 return null;
51704 }, "~N,~N");
51705 Clazz_overrideMethod (c$, "prepareImage", 
51706 function (img, w, h, o) {
51707 return false;
51708 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51709 Clazz_overrideMethod (c$, "checkImage", 
51710 function (img, w, h, o) {
51711 return 0;
51712 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51713 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51714 function () {
51715 return null;
51716 });
51717 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51718 function () {
51719 return false;
51720 });
51721 Clazz_overrideMethod (c$, "getBackBuffer", 
51722 function () {
51723 return null;
51724 });
51725 Clazz_overrideMethod (c$, "destroyBuffers", 
51726 function () {
51727 });
51728 Clazz_overrideMethod (c$, "reparent", 
51729 function (newContainer) {
51730 }, "java.awt.peer.ContainerPeer");
51731 Clazz_overrideMethod (c$, "isReparentSupported", 
51732 function () {
51733 return false;
51734 });
51735 Clazz_overrideMethod (c$, "layout", 
51736 function () {
51737 });
51738 Clazz_overrideMethod (c$, "getBounds", 
51739 function () {
51740 return null;
51741 });
51742 Clazz_overrideMethod (c$, "toFront", 
51743 function () {
51744 });
51745 Clazz_overrideMethod (c$, "toBack", 
51746 function () {
51747 });
51748 Clazz_overrideMethod (c$, "updateAlwaysOnTopState", 
51749 function () {
51750 });
51751 Clazz_overrideMethod (c$, "updateFocusableWindowState", 
51752 function () {
51753 });
51754 Clazz_overrideMethod (c$, "requestWindowFocus", 
51755 function () {
51756 return false;
51757 });
51758 Clazz_overrideMethod (c$, "setModalBlocked", 
51759 function (blocker, blocked) {
51760 }, "java.awt.Dialog,~B");
51761 Clazz_overrideMethod (c$, "updateMinimumSize", 
51762 function () {
51763 });
51764 Clazz_overrideMethod (c$, "updateIconImages", 
51765 function () {
51766 });
51767 Clazz_overrideMethod (c$, "setOpacity", 
51768 function (opacity) {
51769 }, "~N");
51770 Clazz_overrideMethod (c$, "setOpaque", 
51771 function (isOpaque) {
51772 }, "~B");
51773 Clazz_overrideMethod (c$, "updateWindow", 
51774 function (backBuffer) {
51775 }, "java.awt.image.BufferedImage");
51776 Clazz_overrideMethod (c$, "repositionSecurityWarning", 
51777 function () {
51778 });
51779 Clazz_overrideMethod (c$, "setTitle", 
51780 function (title) {
51781 }, "~S");
51782 Clazz_overrideMethod (c$, "setMenuBar", 
51783 function (mb) {
51784 }, "~O");
51785 Clazz_overrideMethod (c$, "setResizable", 
51786 function (resizeable) {
51787 }, "~B");
51788 Clazz_overrideMethod (c$, "setState", 
51789 function (state) {
51790 }, "~N");
51791 Clazz_overrideMethod (c$, "getState", 
51792 function () {
51793 return 0;
51794 });
51795 Clazz_overrideMethod (c$, "setMaximizedBounds", 
51796 function (bounds) {
51797 }, "java.awt.Rectangle");
51798 Clazz_overrideMethod (c$, "setBoundsPrivate", 
51799 function (x, y, width, height) {
51800 }, "~N,~N,~N,~N");
51801 Clazz_overrideMethod (c$, "getBoundsPrivate", 
51802 function () {
51803 return null;
51804 });
51805 });
51806 Clazz_declarePackage ("swingjs");
51807 Clazz_load (["java.awt.GraphicsEnvironment"], "swingjs.JSGraphicsEnvironment", ["swingjs.JSGraphics2D", "$.JSToolkit", "swingjs.api.DOMNode"], function () {
51808 c$ = Clazz_declareType (swingjs, "JSGraphicsEnvironment", java.awt.GraphicsEnvironment);
51809 Clazz_makeConstructor (c$, 
51810 function () {
51811 Clazz_superConstructor (this, swingjs.JSGraphicsEnvironment, []);
51812 System.out.println ("JSGraphicsEnvironment initialized");
51813 });
51814 Clazz_overrideMethod (c$, "createGraphics", 
51815 function (img) {
51816 return this.createGraphicsSized (img, img.getWidth (), img.getHeight ());
51817 }, "java.awt.image.BufferedImage");
51818 Clazz_defineMethod (c$, "createGraphicsSized", 
51819 function (img, width, height) {
51820 var g = null;
51821 {
51822 g = img._g;
51823 }if (g == null) {
51824 var canvas = swingjs.api.DOMNode.createElement ("canvas", "img" + System.currentTimeMillis ());
51825 {
51826 canvas.width = width;
51827 canvas.height = height;
51828 img._canvas = canvas;
51829 }g =  new swingjs.JSGraphics2D (canvas);
51830 {
51831 img._g = g;
51832 }}return g;
51833 }, "~O,~N,~N");
51834 Clazz_overrideMethod (c$, "getAllFonts", 
51835 function () {
51836 return null;
51837 });
51838 Clazz_defineMethod (c$, "getAvailableFontFamilyNames", 
51839 function () {
51840 return null;
51841 });
51842 Clazz_defineMethod (c$, "getAvailableFontFamilyNames", 
51843 function (l) {
51844 return null;
51845 }, "java.util.Locale");
51846 Clazz_overrideMethod (c$, "getDefaultScreenDevice", 
51847 function () {
51848 if (swingjs.JSGraphicsEnvironment.device == null) swingjs.JSGraphicsEnvironment.device = swingjs.JSToolkit.getInstance ("swingjs.JSScreenDevice");
51849 return swingjs.JSGraphicsEnvironment.device;
51850 });
51851 Clazz_defineStatics (c$,
51852 "device", null);
51853 });
51854 Clazz_declarePackage ("swingjs.plaf");
51855 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 () {
51856 c$ = Clazz_declareType (swingjs.plaf, "HTML5LookAndFeel", javax.swing.LookAndFeel);
51857 Clazz_overrideMethod (c$, "getDefaults", 
51858 function () {
51859 var table =  new javax.swing.UIDefaults (610, 0.75);
51860 this.initClassDefaults (table);
51861 this.initSystemColorDefaults (table);
51862 this.initComponentDefaults (table);
51863 return table;
51864 });
51865 Clazz_overrideMethod (c$, "initialize", 
51866 function () {
51867 });
51868 Clazz_defineMethod (c$, "installAWTEventListener", 
51869 function () {
51870 });
51871 Clazz_overrideMethod (c$, "uninitialize", 
51872 function () {
51873 });
51874 Clazz_defineMethod (c$, "initClassDefaults", 
51875 function (table) {
51876 var packageName = "swingjs.plaf.";
51877 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"]);
51878 table.putDefaults (uiDefaults);
51879 }, "javax.swing.UIDefaults");
51880 Clazz_defineMethod (c$, "initSystemColorDefaults", 
51881 function (table) {
51882 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"]);
51883 this.loadSystemColors (table, defaultSystemColors, this.isNativeLookAndFeel ());
51884 }, "javax.swing.UIDefaults");
51885 Clazz_defineMethod (c$, "loadSystemColors", 
51886 function (table, systemColors, useNative) {
51887 for (var i = 0; i < systemColors.length; i += 2) {
51888 var color = java.awt.Color.black;
51889 try {
51890 color = java.awt.Color.decode (systemColors[i + 1]);
51891 } catch (e) {
51892 if (Clazz_exceptionOf (e, NumberFormatException)) {
51893 e.printStackTrace ();
51894 } else {
51895 throw e;
51896 }
51897 }
51898 table.put (systemColors[i],  new javax.swing.plaf.ColorUIResource (color));
51899 }
51900 }, "javax.swing.UIDefaults,~A,~B");
51901 Clazz_defineMethod (c$, "initResourceBundle", 
51902  function (table) {
51903 }, "javax.swing.UIDefaults");
51904 Clazz_defineMethod (c$, "initComponentDefaults", 
51905 function (table) {
51906 this.initResourceBundle (table);
51907 var oneThousand =  new Long (1000);
51908 var twelve =  new Integer (12);
51909 var fontPlain =  new Integer (0);
51910 var serifPlain12 =  new javax.swing.plaf.FontUIResource ("Serif", 0, 12);
51911 var sansSerifPlain12 =  new javax.swing.plaf.FontUIResource ("SansSerif", 0, 12);
51912 var dialogPlain12 =  new javax.swing.plaf.FontUIResource ("Dialog", 0, 12);
51913 var monospacedPlain12 =  new javax.swing.plaf.FontUIResource ("Monospaced", 0, 12);
51914 var black =  new javax.swing.plaf.ColorUIResource (java.awt.Color.black);
51915 var white =  new javax.swing.plaf.ColorUIResource (java.awt.Color.white);
51916 var gray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.gray);
51917 var darkGray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.darkGray);
51918 var control = table.getColor ("control");
51919 var controlText = table.getColor ("controlText");
51920 var menu = table.getColor ("menu");
51921 var menuText = table.getColor ("menuText");
51922 var textText = table.getColor ("textText");
51923 var window = table.getColor ("window");
51924 var zeroInsets =  new javax.swing.plaf.InsetsUIResource (0, 0, 0, 0);
51925 var twoInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 2);
51926 var threeInsets =  new javax.swing.plaf.InsetsUIResource (3, 3, 3, 3);
51927 var listCellRendererActiveValue = ((Clazz_isClassDefined ("swingjs.plaf.HTML5LookAndFeel$1") ? 0 : swingjs.plaf.HTML5LookAndFeel.$HTML5LookAndFeel$1$ ()), Clazz_innerTypeInstance (swingjs.plaf.HTML5LookAndFeel$1, this, null));
51928 var zero =  new Integer (0);
51929 var tabbedPaneTabInsets =  new javax.swing.plaf.InsetsUIResource (0, 4, 1, 4);
51930 var tabbedPaneTabPadInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 1);
51931 var tabbedPaneTabAreaInsets =  new javax.swing.plaf.InsetsUIResource (3, 2, 0, 2);
51932 var tabbedPaneContentBorderInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 3, 3);
51933 var editorMargin = threeInsets;
51934 var four =  new Integer (4);
51935 var defaults =  Clazz_newArray (-1, ["*.font", dialogPlain12, "*.background", control, "*.foreground", controlText, "Button.margin",  new javax.swing.plaf.InsetsUIResource (2, 14, 2, 14), "ToggleButton.margin",  new javax.swing.plaf.InsetsUIResource (2, 14, 2, 14), "ToggleButton.textIconGap", four, "ToggleButton.textShiftOffset", zero, "RadioButton.margin", twoInsets, "RadioButton.textIconGap", four, "RadioButton.textShiftOffset", zero, "CheckBox.margin", twoInsets, "CheckBox.textIconGap", four, "CheckBox.textShiftOffset", zero, "ColorChooser.swatchesSwatchSize",  new java.awt.Dimension (10, 10), "ColorChooser.swatchesRecentSwatchSize",  new java.awt.Dimension (10, 10), "ColorChooser.swatchesDefaultRecentColor", control, "ComboBox.font", sansSerifPlain12, "ComboBox.background", window, "ComboBox.foreground", textText, "ComboBox.timeFactor", oneThousand, "ComboBox.isEnterSelectablePopup", Boolean.FALSE, "FileChooser.readOnly", Boolean.FALSE, "Label.border", null, "List.background", window, "List.foreground", textText, "List.cellRenderer", listCellRendererActiveValue, "List.timeFactor", oneThousand, "MenuBar.font", dialogPlain12, "MenuBar.background", menu, "MenuBar.foreground", menuText, "MenuItem.font", dialogPlain12, "MenuItem.background", menu, "MenuItem.foreground", menuText, "MenuItem.margin", twoInsets, "RadioButtonMenuItem.font", dialogPlain12, "RadioButtonMenuItem.background", menu, "RadioButtonMenuItem.foreground", menuText, "RadioButtonMenuItem.margin", twoInsets, "CheckBoxMenuItem.font", dialogPlain12, "CheckBoxMenuItem.background", menu, "CheckBoxMenuItem.foreground", menuText, "CheckBoxMenuItem.margin", twoInsets, "Menu.background", menu, "Menu.foreground", menuText, "Menu.margin", twoInsets, "PopupMenu.background", menu, "PopupMenu.foreground", menuText, "PopupMenu.consumeEventOnClose", Boolean.FALSE, "OptionPane.messageForeground", controlText, "Panel.font", dialogPlain12, "Panel.background", control, "Panel.foreground", textText, "ProgressBar.cellLength",  new Integer (1), "ProgressBar.cellSpacing", zero, "ProgressBar.repaintInterval",  new Integer (50), "ProgressBar.cycleTime",  new Integer (3000), "ProgressBar.horizontalSize",  new javax.swing.plaf.DimensionUIResource (146, 12), "ProgressBar.verticalSize",  new javax.swing.plaf.DimensionUIResource (12, 146), "ScrollBar.foreground", control, "ScrollBar.width",  new Integer (16), "Viewport.foreground", textText, "Slider.horizontalSize",  new java.awt.Dimension (200, 21), "Slider.verticalSize",  new java.awt.Dimension (21, 200), "Slider.minimumHorizontalSize",  new java.awt.Dimension (36, 21), "Slider.minimumVerticalSize",  new java.awt.Dimension (21, 36), "Spinner.font", monospacedPlain12, "Spinner.arrowButtonSize",  new java.awt.Dimension (16, 5), "Spinner.editorAlignment", new Integer (11), "SplitPane.background", control, "SplitPane.dividerSize",  new Integer (7), "SplitPaneDivider.draggingColor", darkGray, "TabbedPane.selected", null, "TabbedPane.textIconGap", four, "TabbedPane.tabsOverlapBorder", Boolean.FALSE, "TabbedPane.labelShift", new Integer (1), "TabbedPane.selectedLabelShift", new Integer (-1), "TabbedPane.tabInsets", tabbedPaneTabInsets, "TabbedPane.selectedTabPadInsets", tabbedPaneTabPadInsets, "TabbedPane.tabAreaInsets", tabbedPaneTabAreaInsets, "TabbedPane.contentBorderInsets", tabbedPaneContentBorderInsets, "TabbedPane.tabRunOverlay",  new Integer (2), "Table.background", window, "Table.dropLineShortColor", black, "Table.gridColor", gray, "Table.focusCellBackground", window, "Table.focusCellForeground", controlText, "TextField.font", sansSerifPlain12, "TextField.background", window, "TextField.foreground", textText, "TextField.margin", zeroInsets, "FormattedTextField.font", sansSerifPlain12, "FormattedTextField.background", window, "FormattedTextField.foreground", textText, "FormattedTextField.caretForeground", textText, "FormattedTextField.margin", zeroInsets, "PasswordField.font", monospacedPlain12, "PasswordField.background", window, "PasswordField.foreground", textText, "PasswordField.margin", zeroInsets, "PasswordField.echoChar", new Character ('*'), "TextArea.font", monospacedPlain12, "TextArea.background", window, "TextArea.foreground", textText, "TextArea.margin", zeroInsets, "TextPane.font", serifPlain12, "TextPane.background", white, "TextPane.foreground", textText, "TextPane.margin", editorMargin, "EditorPane.font", serifPlain12, "EditorPane.background", white, "EditorPane.foreground", textText, "EditorPane.margin", editorMargin, "TitledBorder.titleColor", controlText, "Tree.paintLines", Boolean.TRUE, "Tree.lineTypeDashed", Boolean.FALSE, "Tree.background", window, "Tree.foreground", textText, "Tree.hash", gray, "Tree.textForeground", textText, "Tree.textBackground", table.get ("text"), "Tree.leftChildIndent",  new Integer (7), "Tree.rightChildIndent",  new Integer (13), "Tree.rowHeight",  new Integer (16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.timeFactor", oneThousand]);
51936 table.putDefaults (defaults);
51937 }, "javax.swing.UIDefaults");
51938 Clazz_overrideMethod (c$, "getName", 
51939 function () {
51940 return "SwingJS";
51941 });
51942 Clazz_overrideMethod (c$, "getID", 
51943 function () {
51944 return "SwingJS";
51945 });
51946 Clazz_overrideMethod (c$, "getDescription", 
51947 function () {
51948 return "SwingJS L&F";
51949 });
51950 Clazz_overrideMethod (c$, "isNativeLookAndFeel", 
51951 function () {
51952 return true;
51953 });
51954 Clazz_overrideMethod (c$, "isSupportedLookAndFeel", 
51955 function () {
51956 return true;
51957 });
51958 c$.$HTML5LookAndFeel$1$ = function () {
51959 Clazz_pu$h(self.c$);
51960 c$ = Clazz_declareAnonymous (swingjs.plaf, "HTML5LookAndFeel$1", null, javax.swing.UIDefaults.ActiveValue);
51961 Clazz_overrideMethod (c$, "createValue", 
51962 function (table) {
51963 return  new javax.swing.DefaultListCellRenderer.UIResource ();
51964 }, "javax.swing.UIDefaults");
51965 c$ = Clazz_p0p ();
51966 };
51967 });
51968 Clazz_declarePackage ("swingjs.plaf");
51969 Clazz_load (["javax.swing.plaf.ComponentUI", "swingjs.plaf.JSEventHandler"], "swingjs.plaf.JSComponentUI", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Color", "$.Component", "$.Dimension", "$.Point", "$.Toolkit", "java.awt.event.FocusEvent", "swingjs.JSToolkit", "swingjs.api.DOMNode"], function () {
51970 c$ = Clazz_decorateAsClass (function () {
51971 this.id = null;
51972 this.c = null;
51973 this.outerNode = null;
51974 this.domNode = null;
51975 this.enableNode = null;
51976 this.textNode = null;
51977 this.valueNode = null;
51978 this.scrollNode = null;
51979 this.focusNode = null;
51980 this.components = null;
51981 this.num = 0;
51982 this.isTainted = true;
51983 this.x = 0;
51984 this.y = 0;
51985 this.preferredSize = null;
51986 this.isContainer = false;
51987 this.parent = null;
51988 this.currentText = null;
51989 this.scrollerNode = null;
51990 this.classID = null;
51991 this.document = null;
51992 this.body = null;
51993 this.needPreferred = false;
51994 Clazz_instantialize (this, arguments);
51995 }, swingjs.plaf, "JSComponentUI", javax.swing.plaf.ComponentUI, swingjs.plaf.JSEventHandler);
51996 Clazz_makeConstructor (c$, 
51997 function () {
51998 Clazz_superConstructor (this, swingjs.plaf.JSComponentUI, []);
51999 this.setDoc ();
52000 });
52001 Clazz_defineMethod (c$, "setDoc", 
52002 function () {
52003 {
52004 this.document = document;
52005 this.body = document.body;
52006 }});
52007 Clazz_overrideMethod (c$, "installUI", 
52008 function (c) {
52009 }, "javax.swing.JComponent");
52010 Clazz_overrideMethod (c$, "uninstallUI", 
52011 function (c) {
52012 this.uninstallJSUI ();
52013 }, "javax.swing.JComponent");
52014 Clazz_defineMethod (c$, "$", 
52015 function (node) {
52016 return swingjs.JSToolkit.getJQuery ().$ (node);
52017 }, "swingjs.api.DOMNode");
52018 Clazz_defineMethod (c$, "setTainted", 
52019 function () {
52020 this.isTainted = true;
52021 });
52022 Clazz_defineMethod (c$, "set", 
52023 function (target) {
52024 this.c = target;
52025 this.newID ();
52026 if (this.needPreferred) this.getPreferredSize (this.c);
52027 this.installJSUI ();
52028 return this;
52029 }, "javax.swing.JComponent");
52030 Clazz_defineMethod (c$, "newID", 
52031 function () {
52032 this.classID = this.c.getUIClassID ();
52033 if (this.id == null) {
52034 this.num = ++swingjs.plaf.JSComponentUI.incr;
52035 this.id = this.c.getHTMLName (this.classID) + "_" + this.num;
52036 }});
52037 Clazz_defineMethod (c$, "setCssFont", 
52038 function (obj, font) {
52039 if (font != null) {
52040 var istyle = font.getStyle ();
52041 var name = font.getFamily ();
52042 if (name === "Dialog") name = "Arial";
52043 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")]);
52044 }if (this.c.isBackgroundSet ()) this.setBackground (this.c.getBackground ());
52045 this.setForeground (this.c.getForeground ());
52046 return obj;
52047 }, "swingjs.api.DOMNode,java.awt.Font");
52048 Clazz_defineMethod (c$, "createDOMObject", 
52049 function (key, id, attr) {
52050 var obj = swingjs.api.DOMNode.createElement (key, id);
52051 for (var i = 0; i < attr.length; ) swingjs.api.DOMNode.setAttr (obj, attr[i++], attr[i++]);
52052
52053 if (!this.c.isEnabled ()) this.setEnabled (false);
52054 return obj;
52055 }, "~S,~S,~A");
52056 Clazz_defineMethod (c$, "bindMouse", 
52057 function (node) {
52058 swingjs.api.DOMNode.setAttr (node, "data-UI", this);
52059 }, "swingjs.api.DOMNode");
52060 Clazz_overrideMethod (c$, "handleJSEvent", 
52061 function (target, eventType, jQueryEvent) {
52062 return false;
52063 }, "~O,~N,~O");
52064 Clazz_defineMethod (c$, "wrap", 
52065 function (type, id, elements) {
52066 return this.append (this.createDOMObject (type, id + type, []), elements);
52067 }, "~S,~S,~A");
52068 Clazz_defineMethod (c$, "append", 
52069 function (obj, elements) {
52070 for (var i = 0; i < elements.length; i++) {
52071 obj.appendChild (elements[i]);
52072 }
52073 return obj;
52074 }, "swingjs.api.DOMNode,~A");
52075 Clazz_defineMethod (c$, "debugDump", 
52076 function (d) {
52077 System.out.println (swingjs.api.DOMNode.getAttr (d, "outerHTML"));
52078 }, "swingjs.api.DOMNode");
52079 c$.vCenter = Clazz_defineMethod (c$, "vCenter", 
52080 function (obj, offset) {
52081 swingjs.api.DOMNode.setStyles (obj, ["top", "50%", "transform", "translateY(" + offset + "%)"]);
52082 }, "swingjs.api.DOMNode,~N");
52083 Clazz_defineMethod (c$, "setHTMLSize", 
52084 function (obj, addCSS) {
52085 return this.setHTMLSize1 (obj, addCSS, true);
52086 }, "swingjs.api.DOMNode,~B");
52087 Clazz_defineMethod (c$, "setHTMLSize1", 
52088 function (node, addCSS, usePreferred) {
52089 if (node == null) return null;
52090 var h;
52091 var w;
52092 var w0 = null;
52093 var h0 = null;
52094 var parentNode = null;
52095 if (this.scrollerNode != null) {
52096 w = this.scrollerNode.c.getWidth ();
52097 h = this.scrollerNode.c.getHeight ();
52098 } else if (usePreferred && this.preferredSize != null) {
52099 w = this.preferredSize.width;
52100 h = this.preferredSize.height;
52101 } else {
52102 parentNode = swingjs.api.DOMNode.remove (node);
52103 {
52104 w0 = node.style.width;
52105 h0 = node.style.height;
52106 }swingjs.api.DOMNode.setStyles (node, ["position", null, "width", null, "height", null]);
52107 var div;
52108 if (swingjs.api.DOMNode.getAttr (node, "tagName") === "DIV") div = node;
52109  else div = this.wrap ("div", this.id + "_temp", [node]);
52110 swingjs.api.DOMNode.setStyles (div, ["position", "absolute"]);
52111 this.body.appendChild (div);
52112 w = Clazz_doubleToInt (Math.ceil (this.$ (div).width () + 0.5));
52113 h = Clazz_doubleToInt (Math.ceil (this.$ (div).height () + 0.5));
52114 this.body.removeChild (div);
52115 }var size = this.getCSSDimension (w, h);
52116 if (addCSS) {
52117 swingjs.api.DOMNode.setStyles (node, ["position", "absolute"]);
52118 swingjs.api.DOMNode.setSize (node, size.width, size.height);
52119 } else {
52120 swingjs.api.DOMNode.setStyles (node, ["position", null]);
52121 if (w0 != null) swingjs.api.DOMNode.setStyles (node, ["width", w0, "height", h0]);
52122 }if (parentNode != null) parentNode.appendChild (node);
52123 return size;
52124 }, "swingjs.api.DOMNode,~B,~B");
52125 Clazz_defineMethod (c$, "getCSSDimension", 
52126 function (w, h) {
52127 return  new java.awt.Dimension (w, h);
52128 }, "~N,~N");
52129 Clazz_defineMethod (c$, "setHTMLElement", 
52130 function () {
52131 if (!this.isTainted) return this.outerNode;
52132 var root = (this.isContainer ? this.c.getRootPane () : null);
52133 if (this.c === root) {
52134 this.isTainted = false;
52135 return this.outerNode;
52136 }this.domNode = this.getDOMObject ();
52137 if (this.outerNode == null) {
52138 this.outerNode = this.wrap ("div", this.id, [this.domNode]);
52139 if (root != null && root.getContentPane () === this.c) swingjs.JSToolkit.getHTML5Applet (this.c)._getContentLayer ().appendChild (this.outerNode);
52140 }swingjs.api.DOMNode.setStyles (this.outerNode, ["position", "absolute", "left", (this.x = this.c.getX ()) + "px", "top", (this.y = this.c.getY ()) + "px"]);
52141 if (this.isContainer) {
52142 System.out.println ("JSComponentUI container " + this.id + " " + this.c.getBounds ());
52143 swingjs.api.DOMNode.setSize (this.outerNode, this.c.getWidth (), this.c.getHeight ());
52144 var children = (this.components == null ? this.c.getComponents () : this.components);
52145 for (var i = children.length; --i >= 0; ) {
52146 var ui = swingjs.JSToolkit.getUI (children[i], false);
52147 if (ui == null) {
52148 continue;
52149 }if (ui.outerNode == null) ui.setHTMLElement ();
52150 if (ui.outerNode == null) {
52151 System.out.println ("JSCUI could not add " + ui.c.getName () + " to " + this.c.getName ());
52152 } else {
52153 this.outerNode.appendChild (ui.outerNode);
52154 }ui.parent = this;
52155 }
52156 }this.isTainted = false;
52157 return this.outerNode;
52158 });
52159 Clazz_defineMethod (c$, "getPreferredSize", 
52160 function (c) {
52161 var d = this.setHTMLSize (this.getDOMObject (), false);
52162 return d;
52163 }, "javax.swing.JComponent");
52164 Clazz_defineMethod (c$, "paint", 
52165 function (g, c) {
52166 if (c.isOpaque ()) {
52167 g.setColor (c.getBackground ());
52168 g.fillRect (0, 0, c.getWidth (), c.getHeight ());
52169 }}, "java.awt.Graphics,javax.swing.JComponent");
52170 Clazz_overrideMethod (c$, "update", 
52171 function (g, c) {
52172 var testing = false;
52173 if (testing) {
52174 g.setColor (java.awt.Color.red);
52175 g.drawRect (0, 0, c.getWidth (), c.getHeight ());
52176 System.out.println ("drawing " + c.getWidth () + " " + c.getHeight ());
52177 }this.setHTMLElement ();
52178 this.paint (g, c);
52179 }, "java.awt.Graphics,javax.swing.JComponent");
52180 Clazz_defineMethod (c$, "getMinimumSize", 
52181 function (c) {
52182 return this.getPreferredSize (c);
52183 }, "javax.swing.JComponent");
52184 Clazz_overrideMethod (c$, "getMaximumSize", 
52185 function (c) {
52186 return null;
52187 }, "javax.swing.JComponent");
52188 Clazz_overrideMethod (c$, "contains", 
52189 function (c, x, y) {
52190 return c.inside (x, y);
52191 }, "javax.swing.JComponent,~N,~N");
52192 c$.createUI = Clazz_overrideMethod (c$, "createUI", 
52193 function (c) {
52194 return null;
52195 }, "javax.swing.JComponent");
52196 Clazz_overrideMethod (c$, "getBaseline", 
52197 function (c, width, height) {
52198 if (c == null) {
52199 throw  new NullPointerException ("Component must be non-null");
52200 }if (width < 0 || height < 0) {
52201 throw  new IllegalArgumentException ("Width and height must be >= 0");
52202 }return -1;
52203 }, "javax.swing.JComponent,~N,~N");
52204 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
52205 function (c) {
52206 if (c == null) {
52207 throw  new NullPointerException ("Component must be non-null");
52208 }return java.awt.Component.BaselineResizeBehavior.OTHER;
52209 }, "javax.swing.JComponent");
52210 Clazz_defineMethod (c$, "getJSTextValue", 
52211 function () {
52212 return swingjs.api.DOMNode.getAttr (this.domNode, this.valueNode == null ? "innerHTML" : "value");
52213 });
52214 Clazz_defineMethod (c$, "notifyPropertyChanged", 
52215 function (prop) {
52216 var obj = null;
52217 var val = null;
52218 if (prop === "text") {
52219 val = (this.c).getText ();
52220 if (val.equals (this.currentText)) return;
52221 this.currentText = val;
52222 if (this.textNode != null) {
52223 prop = "innerHTML";
52224 obj = this.textNode;
52225 } else if (this.valueNode != null) {
52226 prop = "value";
52227 obj = this.valueNode;
52228 }} else if (prop === "preferredSize") {
52229 this.preferredSize = this.c.getPreferredSize ();
52230 this.getPreferredSize ();
52231 return;
52232 }if (obj == null) {
52233 System.out.println ("JSComponentUI: unrecognized prop: " + prop);
52234 } else {
52235 System.out.println ("JSComponentUI: setting " + this.id + " " + prop);
52236 this.setProp (obj, prop, val);
52237 }}, "~S");
52238 Clazz_defineMethod (c$, "setProp", 
52239 function (obj, prop, val) {
52240 return swingjs.api.DOMNode.setAttr (obj, prop, val);
52241 }, "swingjs.api.DOMNode,~S,~S");
52242 Clazz_overrideMethod (c$, "isObscured", 
52243 function () {
52244 swingjs.JSToolkit.notImplemented ("");
52245 return false;
52246 });
52247 Clazz_overrideMethod (c$, "canDetermineObscurity", 
52248 function () {
52249 swingjs.JSToolkit.notImplemented ("");
52250 return false;
52251 });
52252 Clazz_overrideMethod (c$, "setVisible", 
52253 function (b) {
52254 swingjs.api.DOMNode.setStyles (this.outerNode, ["display", b ? "block" : "none"]);
52255 }, "~B");
52256 Clazz_overrideMethod (c$, "setEnabled", 
52257 function (b) {
52258 if (this.enableNode != null) swingjs.api.DOMNode.setAttr (this.enableNode, "disabled", (b ? null : "TRUE"));
52259 }, "~B");
52260 Clazz_defineMethod (c$, "paint", 
52261 function (g) {
52262 }, "java.awt.Graphics");
52263 Clazz_overrideMethod (c$, "repaint", 
52264 function (tm, x, y, width, height) {
52265 }, "~N,~N,~N,~N,~N");
52266 Clazz_overrideMethod (c$, "print", 
52267 function (g) {
52268 swingjs.JSToolkit.notImplemented ("");
52269 }, "java.awt.Graphics");
52270 Clazz_overrideMethod (c$, "setBounds", 
52271 function (x, y, width, height, op) {
52272 switch (op) {
52273 case 2:
52274 case 3:
52275 case 4:
52276 if (this.scrollerNode != null) {
52277 width = Math.min (width, this.scrollerNode.c.getWidth ());
52278 height = Math.min (height, this.scrollerNode.c.getHeight ());
52279 }System.out.println (this.id + " setBounds " + x + " " + y + " " + width + " " + height + " op=" + op);
52280 if (this.domNode != null) swingjs.api.DOMNode.setSize (this.domNode, width, height);
52281 break;
52282 }
52283 }, "~N,~N,~N,~N,~N");
52284 Clazz_overrideMethod (c$, "handleEvent", 
52285 function (e) {
52286 swingjs.JSToolkit.notImplemented ("");
52287 }, "java.awt.AWTEvent");
52288 Clazz_overrideMethod (c$, "coalescePaintEvent", 
52289 function (e) {
52290 swingjs.JSToolkit.notImplemented ("");
52291 }, "java.awt.event.PaintEvent");
52292 Clazz_overrideMethod (c$, "getLocationOnScreen", 
52293 function () {
52294 var offset = this.$ (this.outerNode).offset ();
52295 return  new java.awt.Point (offset.left, offset.top);
52296 });
52297 Clazz_defineMethod (c$, "getPreferredSize", 
52298 function () {
52299 return this.getPreferredSize (this.c);
52300 });
52301 Clazz_defineMethod (c$, "getMinimumSize", 
52302 function () {
52303 swingjs.JSToolkit.notImplemented ("");
52304 return this.getPreferredSize (this.c);
52305 });
52306 Clazz_overrideMethod (c$, "getColorModel", 
52307 function () {
52308 return java.awt.Toolkit.getDefaultToolkit ().getColorModel ();
52309 });
52310 Clazz_overrideMethod (c$, "getToolkit", 
52311 function () {
52312 return java.awt.Toolkit.getDefaultToolkit ();
52313 });
52314 Clazz_overrideMethod (c$, "getGraphics", 
52315 function () {
52316 return null;
52317 });
52318 Clazz_overrideMethod (c$, "getFontMetrics", 
52319 function (font) {
52320 return this.c.getFontMetrics (font);
52321 }, "java.awt.Font");
52322 Clazz_overrideMethod (c$, "dispose", 
52323 function () {
52324 swingjs.JSToolkit.notImplemented ("");
52325 });
52326 Clazz_overrideMethod (c$, "setForeground", 
52327 function (color) {
52328 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.black : color)]);
52329 }, "java.awt.Color");
52330 Clazz_overrideMethod (c$, "setBackground", 
52331 function (color) {
52332 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["background-color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.white : color)]);
52333 }, "java.awt.Color");
52334 Clazz_overrideMethod (c$, "setFont", 
52335 function (f) {
52336 if (this.domNode != null) this.setCssFont (this.domNode, f);
52337 }, "java.awt.Font");
52338 Clazz_overrideMethod (c$, "updateCursorImmediately", 
52339 function () {
52340 swingjs.JSToolkit.notImplemented ("");
52341 });
52342 Clazz_overrideMethod (c$, "requestFocus", 
52343 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
52344 if (this.focusNode == null) return false;
52345 this.$ (this.focusNode).focus ();
52346 if (this.textNode != null) this.$ (this.textNode).select ();
52347 return true;
52348 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
52349 Clazz_overrideMethod (c$, "isFocusable", 
52350 function () {
52351 return (this.focusNode != null);
52352 });
52353 Clazz_defineMethod (c$, "createImage", 
52354 function (producer) {
52355 swingjs.JSToolkit.notImplemented ("");
52356 return null;
52357 }, "java.awt.image.ImageProducer");
52358 Clazz_defineMethod (c$, "createImage", 
52359 function (width, height) {
52360 swingjs.JSToolkit.notImplemented ("");
52361 return null;
52362 }, "~N,~N");
52363 Clazz_overrideMethod (c$, "createVolatileImage", 
52364 function (width, height) {
52365 swingjs.JSToolkit.notImplemented ("");
52366 return null;
52367 }, "~N,~N");
52368 Clazz_overrideMethod (c$, "prepareImage", 
52369 function (img, w, h, o) {
52370 swingjs.JSToolkit.notImplemented ("");
52371 return false;
52372 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
52373 Clazz_overrideMethod (c$, "checkImage", 
52374 function (img, w, h, o) {
52375 swingjs.JSToolkit.notImplemented ("");
52376 return 0;
52377 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
52378 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
52379 function () {
52380 swingjs.JSToolkit.notImplemented ("");
52381 return null;
52382 });
52383 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
52384 function () {
52385 swingjs.JSToolkit.notImplemented ("");
52386 return false;
52387 });
52388 Clazz_overrideMethod (c$, "getBackBuffer", 
52389 function () {
52390 swingjs.JSToolkit.notImplemented ("");
52391 return null;
52392 });
52393 Clazz_overrideMethod (c$, "destroyBuffers", 
52394 function () {
52395 swingjs.JSToolkit.notImplemented ("");
52396 });
52397 Clazz_overrideMethod (c$, "reparent", 
52398 function (newContainer) {
52399 swingjs.JSToolkit.notImplemented ("");
52400 }, "java.awt.peer.ContainerPeer");
52401 Clazz_overrideMethod (c$, "isReparentSupported", 
52402 function () {
52403 swingjs.JSToolkit.notImplemented ("");
52404 return false;
52405 });
52406 Clazz_overrideMethod (c$, "layout", 
52407 function () {
52408 swingjs.JSToolkit.notImplemented ("");
52409 });
52410 Clazz_overrideMethod (c$, "getBounds", 
52411 function () {
52412 swingjs.JSToolkit.notImplemented ("");
52413 return null;
52414 });
52415 Clazz_defineMethod (c$, "hasFocus", 
52416 function () {
52417 return this.focusNode != null && this.focusNode === swingjs.api.DOMNode.getAttr (this.document, "activeElement");
52418 });
52419 Clazz_defineMethod (c$, "notifyFocus", 
52420 function (focusGained) {
52421 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.FocusEvent (this.c, focusGained ? 1004 : 1005));
52422 }, "~B");
52423 Clazz_defineStatics (c$,
52424 "incr", 0);
52425 });
52426 Clazz_declarePackage ("swingjs.plaf");
52427 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSPanelUI", ["java.awt.Dimension", "javax.swing.LookAndFeel"], function () {
52428 c$ = Clazz_declareType (swingjs.plaf, "JSPanelUI", swingjs.plaf.JSComponentUI);
52429 Clazz_makeConstructor (c$, 
52430 function () {
52431 Clazz_superConstructor (this, swingjs.plaf.JSPanelUI, []);
52432 this.isContainer = true;
52433 this.setDoc ();
52434 });
52435 Clazz_overrideMethod (c$, "getDOMObject", 
52436 function () {
52437 if (this.domNode == null) this.domNode = this.createDOMObject ("label", this.id, []);
52438 return this.domNode;
52439 });
52440 Clazz_overrideMethod (c$, "setHTMLSize", 
52441 function (obj, addCSS) {
52442 return  new java.awt.Dimension (this.c.getWidth (), this.c.getHeight ());
52443 }, "swingjs.api.DOMNode,~B");
52444 Clazz_defineMethod (c$, "getPreferredSize", 
52445 function (c) {
52446 return null;
52447 }, "javax.swing.JComponent");
52448 Clazz_overrideMethod (c$, "installJSUI", 
52449 function () {
52450 javax.swing.LookAndFeel.installColorsAndFont (this.c, "Panel.background", "Panel.foreground", "Panel.font");
52451 });
52452 Clazz_overrideMethod (c$, "uninstallJSUI", 
52453 function () {
52454 });
52455 });
52456 Clazz_declarePackage ("swingjs.plaf");
52457 Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSRadioButtonUI", ["java.util.HashMap", "javax.swing.DefaultButtonModel", "swingjs.api.DOMNode"], function () {
52458 c$ = Clazz_decorateAsClass (function () {
52459 this.label = null;
52460 Clazz_instantialize (this, arguments);
52461 }, swingjs.plaf, "JSRadioButtonUI", swingjs.plaf.JSButtonUI);
52462 Clazz_overrideMethod (c$, "getDOMObject", 
52463 function () {
52464 return this.getButtonObject ("radio");
52465 });
52466 Clazz_overrideMethod (c$, "getPropertyPrefix", 
52467 function () {
52468 return "RadioButton.";
52469 });
52470 Clazz_overrideMethod (c$, "setHTMLSize", 
52471 function (obj, addCSS) {
52472 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", null]);
52473 swingjs.api.DOMNode.setStyles (this.label, ["position", null]);
52474 var d = this.setHTMLSize1 (obj, addCSS, false);
52475 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
52476 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute"]);
52477 return d;
52478 }, "swingjs.api.DOMNode,~B");
52479 Clazz_defineMethod (c$, "getButtonObject", 
52480 function (myType) {
52481 var b = this.c;
52482 var isNew = false;
52483 var doAll = false;
52484 if (this.domNode == null) {
52485 doAll = true;
52486 if (swingjs.plaf.JSRadioButtonUI.groupNames == null) swingjs.plaf.JSRadioButtonUI.groupNames =  new java.util.HashMap ();
52487 var bg = null;
52488 var name = this.id;
52489 isNew = true;
52490 if (Clazz_instanceOf (b.getModel (), javax.swing.DefaultButtonModel)) {
52491 bg = (b.getModel ()).getGroup ();
52492 name = swingjs.plaf.JSRadioButtonUI.groupNames.get (bg);
52493 if (name == null) swingjs.plaf.JSRadioButtonUI.groupNames.put (bg, name = this.id);
52494  else isNew = false;
52495 }this.domBtn = this.enableNode = this.createDOMObject ("input", this.id, ["type", myType, "name", name]);
52496 this.label = this.textNode = this.createDOMObject ("label", this.id + "l", ["htmlFor", this.id]);
52497 }if (b.isSelected () || isNew) swingjs.api.DOMNode.setAttr (this.domBtn, "checked", "true");
52498 this.setCssFont (swingjs.api.DOMNode.setAttr (this.label, "innerHTML", (this.c).getText ()), this.c.getFont ());
52499 var drad = this.setHTMLSize1 (this.domBtn, false, false);
52500 this.setHTMLSize1 (this.label, false, false);
52501 var obj = this.wrap ("div", "", [this.domBtn, this.label]);
52502 var dobj = this.setHTMLSize1 (obj, true, true);
52503 swingjs.plaf.JSComponentUI.vCenter (this.domBtn, -75);
52504 swingjs.plaf.JSComponentUI.vCenter (this.label, -50);
52505 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute", "left", drad.width + "px"]);
52506 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
52507 if (doAll) {
52508 obj = this.wrap ("div", this.id + "_0", [this.domBtn, this.label]);
52509 swingjs.api.DOMNode.setStyles (obj, ["position", "absolute"]);
52510 } else {
52511 obj = this.domNode;
52512 obj.appendChild (this.domBtn);
52513 obj.appendChild (this.label);
52514 }return swingjs.api.DOMNode.setSize (obj, dobj.width, dobj.height);
52515 }, "~S");
52516 Clazz_defineStatics (c$,
52517 "groupNames", null);
52518 });
52519 Clazz_declarePackage ("swingjs.plaf");
52520 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSRootPaneUI", null, function () {
52521 c$ = Clazz_declareType (swingjs.plaf, "JSRootPaneUI", swingjs.plaf.JSComponentUI);
52522 Clazz_makeConstructor (c$, 
52523 function () {
52524 Clazz_superConstructor (this, swingjs.plaf.JSRootPaneUI, []);
52525 this.isContainer = true;
52526 this.setDoc ();
52527 });
52528 Clazz_overrideMethod (c$, "getDOMObject", 
52529 function () {
52530 return null;
52531 });
52532 Clazz_overrideMethod (c$, "installJSUI", 
52533 function () {
52534 });
52535 Clazz_overrideMethod (c$, "uninstallJSUI", 
52536 function () {
52537 });
52538 });
52539 Clazz_declarePackage ("swingjs.plaf");
52540 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 () {
52541 c$ = Clazz_decorateAsClass (function () {
52542 this.lastPressedTimestamp = -1;
52543 this.shouldDiscardRelease = false;
52544 this.btn = null;
52545 Clazz_instantialize (this, arguments);
52546 }, swingjs.plaf, "JSButtonListener", null, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener, java.beans.PropertyChangeListener]);
52547 c$.loadActionMap = Clazz_defineMethod (c$, "loadActionMap", 
52548 function (map) {
52549 map.put ( new swingjs.plaf.JSButtonListener.Actions ("pressed"));
52550 map.put ( new swingjs.plaf.JSButtonListener.Actions ("released"));
52551 }, "swingjs.plaf.LazyActionMap");
52552 Clazz_makeConstructor (c$, 
52553 function (b) {
52554 this.btn = b;
52555 }, "javax.swing.AbstractButton");
52556 Clazz_overrideMethod (c$, "propertyChange", 
52557 function (e) {
52558 var prop = e.getPropertyName ();
52559 if (prop === "mnemonic") {
52560 this.updateMnemonicBinding (e.getSource ());
52561 } else if (prop === "contentAreaFilled") {
52562 this.checkOpacity (e.getSource ());
52563 } else if (prop === "text" || "font" === prop || "foreground" === prop) {
52564 var b = e.getSource ();
52565 (b.getUI ()).notifyPropertyChanged (prop);
52566 }}, "java.beans.PropertyChangeEvent");
52567 Clazz_defineMethod (c$, "checkOpacity", 
52568 function (b) {
52569 b.setOpaque (b.isContentAreaFilled ());
52570 }, "javax.swing.AbstractButton");
52571 Clazz_defineMethod (c$, "installKeyboardActions", 
52572 function (c) {
52573 var b = c;
52574 this.updateMnemonicBinding (b);
52575 swingjs.plaf.LazyActionMap.installLazyActionMap (c, swingjs.plaf.JSButtonListener, "Button.actionMap");
52576 var km = this.getInputMap (0, c);
52577 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, km);
52578 }, "javax.swing.JComponent");
52579 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
52580 function (c) {
52581 javax.swing.SwingUtilities.replaceUIInputMap (c, 2, null);
52582 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, null);
52583 javax.swing.SwingUtilities.replaceUIActionMap (c, null);
52584 }, "javax.swing.JComponent");
52585 Clazz_defineMethod (c$, "getInputMap", 
52586 function (condition, c) {
52587 return null;
52588 }, "~N,javax.swing.JComponent");
52589 Clazz_defineMethod (c$, "updateMnemonicBinding", 
52590 function (b) {
52591 var m = b.getMnemonic ();
52592 if (m != 0) {
52593 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52594 if (map == null) {
52595 map =  new javax.swing.plaf.ComponentInputMapUIResource (b);
52596 javax.swing.SwingUtilities.replaceUIInputMap (b, 2, map);
52597 }map.clear ();
52598 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, false), "pressed");
52599 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, true), "released");
52600 map.put (javax.swing.KeyStroke.getKeyStroke (m, 0, true), "released");
52601 } else {
52602 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52603 if (map != null) {
52604 map.clear ();
52605 }}}, "javax.swing.AbstractButton");
52606 Clazz_overrideMethod (c$, "stateChanged", 
52607 function (e) {
52608 var b = e.getSource ();
52609 b.repaint ();
52610 }, "javax.swing.event.ChangeEvent");
52611 Clazz_overrideMethod (c$, "focusGained", 
52612 function (e) {
52613 }, "java.awt.event.FocusEvent");
52614 Clazz_overrideMethod (c$, "focusLost", 
52615 function (e) {
52616 var b = e.getSource ();
52617 var model = b.getModel ();
52618 model.setArmed (false);
52619 model.setPressed (false);
52620 }, "java.awt.event.FocusEvent");
52621 Clazz_overrideMethod (c$, "mouseMoved", 
52622 function (e) {
52623 }, "java.awt.event.MouseEvent");
52624 Clazz_overrideMethod (c$, "mouseDragged", 
52625 function (e) {
52626 }, "java.awt.event.MouseEvent");
52627 Clazz_overrideMethod (c$, "mouseClicked", 
52628 function (e) {
52629 }, "java.awt.event.MouseEvent");
52630 Clazz_overrideMethod (c$, "mousePressed", 
52631 function (e) {
52632 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52633 var b = e.getSource ();
52634 if (!b.contains (e.getX (), e.getY ())) return;
52635 (b.getUI ()).verifyButtonClick (false);
52636 var multiClickThreshhold = b.getMultiClickThreshhold ();
52637 var lastTime = this.lastPressedTimestamp;
52638 var currentTime = this.lastPressedTimestamp = e.getWhen ();
52639 if (lastTime != -1 && currentTime - lastTime < multiClickThreshhold) {
52640 this.shouldDiscardRelease = true;
52641 return;
52642 }var model = b.getModel ();
52643 if (!model.isEnabled ()) {
52644 return;
52645 }if (!model.isArmed ()) {
52646 model.setArmed (true);
52647 }model.setPressed (true);
52648 if (!b.hasFocus () && b.isRequestFocusEnabled ()) {
52649 b.requestFocus ();
52650 }}}, "java.awt.event.MouseEvent");
52651 Clazz_overrideMethod (c$, "mouseReleased", 
52652 function (e) {
52653 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52654 if (this.shouldDiscardRelease) {
52655 this.shouldDiscardRelease = false;
52656 return;
52657 }var b = e.getSource ();
52658 if (!(b.getUI ()).verifyButtonClick (true)) return;
52659 var model = b.getModel ();
52660 model.setPressed (false);
52661 model.setArmed (false);
52662 }}, "java.awt.event.MouseEvent");
52663 Clazz_overrideMethod (c$, "mouseEntered", 
52664 function (e) {
52665 var b = e.getSource ();
52666 var model = b.getModel ();
52667 if (b.isRolloverEnabled () && !javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52668 model.setRollover (true);
52669 }if (model.isPressed ()) model.setArmed (true);
52670 }, "java.awt.event.MouseEvent");
52671 Clazz_overrideMethod (c$, "mouseExited", 
52672 function (e) {
52673 var b = e.getSource ();
52674 var model = b.getModel ();
52675 if (b.isRolloverEnabled ()) {
52676 model.setRollover (false);
52677 }model.setArmed (false);
52678 }, "java.awt.event.MouseEvent");
52679 Clazz_pu$h(self.c$);
52680 c$ = Clazz_declareType (swingjs.plaf.JSButtonListener, "Actions", jssun.swing.UIAction);
52681 Clazz_overrideMethod (c$, "actionPerformed", 
52682 function (a) {
52683 var b = a.getSource ();
52684 var c = this.getName ();
52685 if (c === "pressed") {
52686 var d = b.getModel ();
52687 d.setArmed (true);
52688 d.setPressed (true);
52689 if (!b.hasFocus ()) {
52690 b.requestFocus ();
52691 }} else if (c === "released") {
52692 var d = b.getModel ();
52693 d.setPressed (false);
52694 d.setArmed (false);
52695 }}, "java.awt.event.ActionEvent");
52696 Clazz_defineMethod (c$, "isEnabled", 
52697 function (a) {
52698 if (a != null && (Clazz_instanceOf (a, javax.swing.AbstractButton)) && !(a).getModel ().isEnabled ()) {
52699 return false;
52700 } else {
52701 return true;
52702 }}, "~O");
52703 Clazz_defineStatics (c$,
52704 "PRESS", "pressed",
52705 "RELEASE", "released");
52706 c$ = Clazz_p0p ();
52707 });
52708 Clazz_declarePackage ("swingjs.plaf");
52709 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSButtonUI", ["javax.swing.LookAndFeel", "$.UIManager", "javax.swing.plaf.UIResource", "swingjs.api.DOMNode", "swingjs.plaf.JSButtonListener"], function () {
52710 c$ = Clazz_decorateAsClass (function () {
52711 this.domBtn = null;
52712 this.shiftOffset = 0;
52713 this.defaultTextShiftOffset = 0;
52714 Clazz_instantialize (this, arguments);
52715 }, swingjs.plaf, "JSButtonUI", swingjs.plaf.JSComponentUI);
52716 Clazz_overrideMethod (c$, "getDOMObject", 
52717 function () {
52718 if (this.domNode == null) this.domBtn = this.enableNode = this.valueNode = this.domNode = this.createDOMObject ("input", this.id, ["type", "button"]);
52719 this.setCssFont (swingjs.api.DOMNode.setAttr (this.domNode, "value", (this.c).getText ()), this.c.getFont ());
52720 return this.domNode;
52721 });
52722 Clazz_defineMethod (c$, "verifyButtonClick", 
52723 function (isRelease) {
52724 return true;
52725 }, "~B");
52726 Clazz_overrideMethod (c$, "installJSUI", 
52727 function () {
52728 this.installDefaults (this.c);
52729 this.installListeners (this.c);
52730 this.installKeyboardActions (this.c);
52731 });
52732 Clazz_overrideMethod (c$, "uninstallJSUI", 
52733 function () {
52734 this.uninstallKeyboardActions (this.c);
52735 this.uninstallListeners (this.c);
52736 });
52737 Clazz_defineMethod (c$, "installListeners", 
52738 function (b) {
52739 var listener =  new swingjs.plaf.JSButtonListener (b);
52740 if (listener != null) {
52741 b.addMouseListener (listener);
52742 b.addMouseMotionListener (listener);
52743 b.addFocusListener (listener);
52744 b.addPropertyChangeListener (listener);
52745 b.addChangeListener (listener);
52746 }}, "javax.swing.AbstractButton");
52747 Clazz_defineMethod (c$, "uninstallListeners", 
52748 function (b) {
52749 var listener = this.getButtonListener (b);
52750 if (listener != null) {
52751 b.removeMouseListener (listener);
52752 b.removeMouseMotionListener (listener);
52753 b.removeFocusListener (listener);
52754 b.removeChangeListener (listener);
52755 b.removePropertyChangeListener (listener);
52756 }}, "javax.swing.AbstractButton");
52757 Clazz_defineMethod (c$, "installKeyboardActions", 
52758 function (b) {
52759 var listener = this.getButtonListener (b);
52760 if (listener != null) {
52761 listener.installKeyboardActions (b);
52762 }}, "javax.swing.AbstractButton");
52763 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
52764 function (b) {
52765 var listener = this.getButtonListener (b);
52766 if (listener != null) {
52767 listener.uninstallKeyboardActions (b);
52768 }}, "javax.swing.AbstractButton");
52769 Clazz_defineMethod (c$, "getButtonListener", 
52770 function (b) {
52771 var listeners = b.getMouseMotionListeners ();
52772 if (listeners != null) {
52773 for (var counter = 0; counter < listeners.length; counter++) {
52774 if (Clazz_instanceOf (listeners[counter], swingjs.plaf.JSButtonListener)) {
52775 return listeners[counter];
52776 }}
52777 }return null;
52778 }, "javax.swing.AbstractButton");
52779 Clazz_defineMethod (c$, "getPropertyPrefix", 
52780 function () {
52781 return "Button.";
52782 });
52783 Clazz_defineMethod (c$, "installDefaults", 
52784 function (b) {
52785 var pp = this.getPropertyPrefix ();
52786 this.defaultTextShiftOffset = javax.swing.UIManager.getInt (pp + "textShiftOffset");
52787 if (b.getMargin () == null || (Clazz_instanceOf (b.getMargin (), javax.swing.plaf.UIResource))) {
52788 b.setMargin (javax.swing.UIManager.getInsets (pp + "margin"));
52789 }javax.swing.LookAndFeel.installColorsAndFont (b, pp + "background", pp + "foreground", pp + "font");
52790 javax.swing.LookAndFeel.installProperty (b, "iconTextGap",  new Integer (4));
52791 }, "javax.swing.AbstractButton");
52792 });
52793 Clazz_declarePackage ("swingjs.plaf");
52794 Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSToggleButtonUI", ["swingjs.api.DOMNode"], function () {
52795 c$ = Clazz_decorateAsClass (function () {
52796 this.isDomChecked = false;
52797 Clazz_instantialize (this, arguments);
52798 }, swingjs.plaf, "JSToggleButtonUI", swingjs.plaf.JSButtonUI);
52799 Clazz_overrideMethod (c$, "verifyButtonClick", 
52800 function (isRelease) {
52801 var checked = ((swingjs.api.DOMNode.getAttr (this.domBtn, "checked")).booleanValue () === true);
52802 if (isRelease && this.isDomChecked == checked) return false;
52803 this.isDomChecked = checked;
52804 return true;
52805 }, "~B");
52806 Clazz_overrideMethod (c$, "getPropertyPrefix", 
52807 function () {
52808 return "ToggleButton.";
52809 });
52810 });
52811 Clazz_declarePackage ("swingjs.plaf");
52812 Clazz_load (["javax.swing.plaf.ActionMapUIResource"], "swingjs.plaf.LazyActionMap", ["javax.swing.SwingUtilities", "$.UIManager"], function () {
52813 c$ = Clazz_decorateAsClass (function () {
52814 this._loader = null;
52815 Clazz_instantialize (this, arguments);
52816 }, swingjs.plaf, "LazyActionMap", javax.swing.plaf.ActionMapUIResource);
52817 c$.installLazyActionMap = Clazz_defineMethod (c$, "installLazyActionMap", 
52818 function (c, loaderClass, defaultsKey) {
52819 var map = javax.swing.UIManager.get (defaultsKey);
52820 if (map == null) {
52821 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52822 }javax.swing.SwingUtilities.replaceUIActionMap (c, map);
52823 }, "javax.swing.JComponent,Class,~S");
52824 c$.getActionMap = Clazz_defineMethod (c$, "getActionMap", 
52825 function (loaderClass, defaultsKey) {
52826 var map = javax.swing.UIManager.get (defaultsKey);
52827 if (map == null) {
52828 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52829 }return map;
52830 }, "Class,~S");
52831 Clazz_makeConstructor (c$, 
52832  function (loader) {
52833 Clazz_superConstructor (this, swingjs.plaf.LazyActionMap, []);
52834 this._loader = loader;
52835 }, "Class");
52836 Clazz_defineMethod (c$, "put", 
52837 function (action) {
52838 this.put (action.getValue ("Name"), action);
52839 }, "javax.swing.Action");
52840 Clazz_defineMethod (c$, "put", 
52841 function (key, action) {
52842 this.loadIfNecessary ();
52843 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "put", [key, action]);
52844 }, "~O,javax.swing.Action");
52845 Clazz_defineMethod (c$, "get", 
52846 function (key) {
52847 this.loadIfNecessary ();
52848 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "get", [key]);
52849 }, "~O");
52850 Clazz_defineMethod (c$, "remove", 
52851 function (key) {
52852 this.loadIfNecessary ();
52853 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "remove", [key]);
52854 }, "~O");
52855 Clazz_defineMethod (c$, "clear", 
52856 function () {
52857 this.loadIfNecessary ();
52858 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "clear", []);
52859 });
52860 Clazz_defineMethod (c$, "keys", 
52861 function () {
52862 this.loadIfNecessary ();
52863 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "keys", []);
52864 });
52865 Clazz_defineMethod (c$, "size", 
52866 function () {
52867 this.loadIfNecessary ();
52868 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "size", []);
52869 });
52870 Clazz_defineMethod (c$, "allKeys", 
52871 function () {
52872 this.loadIfNecessary ();
52873 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "allKeys", []);
52874 });
52875 Clazz_defineMethod (c$, "setParent", 
52876 function (map) {
52877 this.loadIfNecessary ();
52878 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "setParent", [map]);
52879 }, "javax.swing.ActionMap");
52880 Clazz_defineMethod (c$, "loadIfNecessary", 
52881  function () {
52882 if (this._loader != null) {
52883 {
52884 this._loader.loadActionMap(this);
52885 this._loader = null;
52886 }}});
52887 });
52888 })(Clazz
52889 ,Clazz.getClassName
52890 ,Clazz.newLongArray
52891 ,Clazz.doubleToByte
52892 ,Clazz.doubleToInt
52893 ,Clazz.doubleToLong
52894 ,Clazz.declarePackage
52895 ,Clazz.instanceOf
52896 ,Clazz.load
52897 ,Clazz.instantialize
52898 ,Clazz.decorateAsClass
52899 ,Clazz.floatToInt
52900 ,Clazz.floatToLong
52901 ,Clazz.makeConstructor
52902 ,Clazz.defineEnumConstant
52903 ,Clazz.exceptionOf
52904 ,Clazz.newIntArray
52905 ,Clazz.defineStatics
52906 ,Clazz.newFloatArray
52907 ,Clazz.declareType
52908 ,Clazz.prepareFields
52909 ,Clazz.superConstructor
52910 ,Clazz.newByteArray
52911 ,Clazz.declareInterface
52912 ,Clazz.p0p
52913 ,Clazz.pu$h
52914 ,Clazz.newShortArray
52915 ,Clazz.innerTypeInstance
52916 ,Clazz.isClassDefined
52917 ,Clazz.prepareCallback
52918 ,Clazz.newArray
52919 ,Clazz.castNullAs
52920 ,Clazz.floatToShort
52921 ,Clazz.superCall
52922 ,Clazz.decorateAsType
52923 ,Clazz.newBooleanArray
52924 ,Clazz.newCharArray
52925 ,Clazz.implementOf
52926 ,Clazz.newDoubleArray
52927 ,Clazz.overrideConstructor
52928 ,Clazz.clone
52929 ,Clazz.doubleToShort
52930 ,Clazz.getInheritedLevel
52931 ,Clazz.getParamsType
52932 ,Clazz.isAF
52933 ,Clazz.isAI
52934 ,Clazz.isAS
52935 ,Clazz.isASS
52936 ,Clazz.isAP
52937 ,Clazz.isAFloat
52938 ,Clazz.isAII
52939 ,Clazz.isAFF
52940 ,Clazz.isAFFF
52941 ,Clazz.tryToSearchAndExecute
52942 ,Clazz.getStackTrace
52943 ,Clazz.inheritArgs
52944 ,Clazz.alert
52945 ,Clazz.defineMethod
52946 ,Clazz.overrideMethod
52947 ,Clazz.declareAnonymous
52948 ,Clazz.checkPrivateMethod
52949 ,Clazz.cloneFinals
52950 );