Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / core / coreswingjs.js
1 (function(Clazz
2 ,Clazz_getClassName
3 ,Clazz_newLongArray
4 ,Clazz_doubleToByte
5 ,Clazz_doubleToInt
6 ,Clazz_doubleToLong
7 ,Clazz_declarePackage
8 ,Clazz_instanceOf
9 ,Clazz_load
10 ,Clazz_instantialize
11 ,Clazz_decorateAsClass
12 ,Clazz_floatToInt
13 ,Clazz_floatToLong
14 ,Clazz_makeConstructor
15 ,Clazz_defineEnumConstant
16 ,Clazz_exceptionOf
17 ,Clazz_newIntArray
18 ,Clazz_defineStatics
19 ,Clazz_newFloatArray
20 ,Clazz_declareType
21 ,Clazz_prepareFields
22 ,Clazz_superConstructor
23 ,Clazz_newByteArray
24 ,Clazz_declareInterface
25 ,Clazz_p0p
26 ,Clazz_pu$h
27 ,Clazz_newShortArray
28 ,Clazz_innerTypeInstance
29 ,Clazz_isClassDefined
30 ,Clazz_prepareCallback
31 ,Clazz_newArray
32 ,Clazz_castNullAs
33 ,Clazz_floatToShort
34 ,Clazz_superCall
35 ,Clazz_decorateAsType
36 ,Clazz_newBooleanArray
37 ,Clazz_newCharArray
38 ,Clazz_implementOf
39 ,Clazz_newDoubleArray
40 ,Clazz_overrideConstructor
41 ,Clazz_clone
42 ,Clazz_doubleToShort
43 ,Clazz_getInheritedLevel
44 ,Clazz_getParamsType
45 ,Clazz_isAF
46 ,Clazz_isAI
47 ,Clazz_isAS
48 ,Clazz_isASS
49 ,Clazz_isAP
50 ,Clazz_isAFloat
51 ,Clazz_isAII
52 ,Clazz_isAFF
53 ,Clazz_isAFFF
54 ,Clazz_tryToSearchAndExecute
55 ,Clazz_getStackTrace
56 ,Clazz_inheritArgs
57 ,Clazz_alert
58 ,Clazz_defineMethod
59 ,Clazz_overrideMethod
60 ,Clazz_declareAnonymous
61 ,Clazz_checkPrivateMethod
62 ,Clazz_cloneFinals
63 ){
64 var $t$;
65 //var c$;
66 // SwingJSJavaExt.js
67  
68
69 // This library will be wrapped by an additional anonymous function using ANT in 
70 // build_03_tojs.xml. This task will also modify variable names. References 
71 // to Clazz._ will not be changed, but other Clazz_xxx will be changed to 
72 // (local scope) Clazz_xxx, allowing them to be further compressed using
73 // Google Closure Compiler in that same ANT task.
74
75 // BH 7/24/2015 7:21:51 AM renamed from JSmolJavaExt.js
76 // BH 5/31/2015 5:53:04 PM Number.compareTo added
77 // BH 5/21/2015 5:46:30 PM Number("0xFFFFFFFF") is not -1
78 // BH 4/23/2015 9:08:59 AM xx.getComponentType() is nonfunctional. Array.newInstance now defines a wrapper for .getClass().getComponentType() that works  
79 // BH 4/12/2015 1:37:44 PM adding Math.rint = Math.round
80 // BH 1/16/2015 10:09:38 AM Chrome failure jqGrig due to new String("x").toString() not being a simple string
81 // BH 8/14/2014 6:49:22 PM Character class efficiencies
82 // BH 7/24/2014 9:02:18 AM most browsers do not support String.codePointAt()
83 // BH 7/11/2014 4:17:22 PM fix for Boolean.valueOf("false") not being false 
84 // BH 5/27/2014 6:29:59 AM ensure floats and doubles have decimal point in toString
85 // BH 4/1/2014 12:23:41 PM Encoding moved to Clazz._Encoding; 
86 // BH 4/1/2014 7:51:46 AM removing java.lang.B00lean
87 // BH 3/7/2014 9:17:10 AM removing Array.toString; moving that code here from j2sJmol.js
88 // BH 1/30/2014 9:04:25 AM adding Throwable.getStackTrace() as a STRING
89 // BH 12/4/2013 9:20:44 PM fix for reassigning Date.prototype.toString()
90 // BH 12/3/2013 11:43:10 AM bizarre Safari bug in reassigning Boolean (OK, I admit, we shouldn't have done that...) 
91 // BH 12/1/2013 6:50:16 AM evit Number.prototype.toString assignment removed!
92 // BH 11/30/2013 1:46:31 PM fixing Byte, Short, Long, Integer, Float, Double to reflect proper bounds and error conditions
93 // BH 11/29/2013 8:58:49 PM removing Boolean.toString(boolean)
94 // BH 11/4/2013 7:34:26 AM changing "var nativeClazz" to "var nativeClass" to avoid ANT replacement of "nativeClazz_" to "nativeClazz_"
95 // BH 10/19/2013 1:29:27 PM fixed String.$replace()
96 // BH 10/18/2013 6:09:23 PM fixed (Double|Float).valueOf(NaN).valueOf(), which should return NaN, not throw an error
97 // BH 10/12/2013 11:18:44 AM fixed bug in Double(String) and Float(String) that was returning typeof "string"
98 // BH 10/10/2013 2:40:20 PM  added Math.log10   
99 // BH 7/23/2013 7:24:01 AM fixing Number.shortValue() and Number.byteValue() for negative values
100 // BH 6/16/2013 1:31:30 PM adding /| in String.replace -- thank you David Koes
101 // BH 3/13/2013 12:49:23 PM setting Boolean.valueOf() "@" 
102 // BH 3/2/2013 10:46:45 PM removed Double.valueOf(String)
103 // BH 11/6/2012 8:26:33 PM added instanceof Int32Array in String.instantialize
104 // BH 10/13/2012 11:38:07 PM corrected Integer.parseInt to allow only +-0123456789; created Integer.parseIntRadix
105 // BH 11/1/2012 added Short
106 // BH 9/10/2012 6:27:21 AM added java.net.URL... classes
107 // BH 1/7/2013 7:40:06 AM added Clazz_dateToString
108
109 ;(function(Clazz) {
110
111 // moved here from package.js
112 // these classes will be created as objects prior to any others
113 // and are then available immediately
114
115         Clazz._Loader.registerPackages("java", [ "io", "lang", "lang.reflect", "util" ]);
116
117   var sJU = "java.util";
118
119   //var sJU = "JU";  
120         //Clazz._Loader.registerPackages (sJU, ["regex", "zip"]);
121         //var javautil = JU;
122
123   var javautil = java.util;
124
125         Clazz._Loader.ignore([
126                 "net.sf.j2s.ajax.HttpRequest",
127                 sJU + ".MapEntry.Type",
128                 //"java.net.UnknownServiceException",
129                 "java.lang.Runtime",
130                 "java.security.AccessController",
131                 "java.security.PrivilegedExceptionAction",
132                 "java.io.File",
133                 "java.io.FileInputStream",
134                 "java.io.FileWriter",
135                 "java.io.OutputStreamWriter",
136 //              sJU + ".Calendar", // bypassed in ModelCollection
137 //              "java.text.SimpleDateFormat", // not used
138 //              "java.text.DateFormat", // not used
139                 sJU + ".concurrent.Executors"
140         ])
141
142 Math.rint = Math.round;
143
144 Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});
145
146 if(Clazz._supportsNativeObject){
147         // Number and Array are special -- do not override prototype.toString -- "length - 2" here
148         for(var i=0;i<Clazz._extendedObjectMethods.length - 2;i++){
149                 var p=Clazz._extendedObjectMethods[i];
150                 Array.prototype[p] = Clazz._O.prototype[p];
151                 Number.prototype[p] = Clazz._O.prototype[p];
152         }
153 }
154
155 java.lang.Number=Number;
156 Number.__CLASS_NAME__="Number";
157 Clazz_implementOf(Number,java.io.Serializable);
158 Number.equals=Clazz._innerFunctions.equals;
159 Number.getName=Clazz._innerFunctions.getName;
160 Number.prototype.compareTo = function(x) { var a = this.value, b = x.value; return (a < b ? -1 : a == b ? 0 : 1) };
161
162 Clazz_defineMethod(Number,"shortValue",
163 function(){
164 var x = Math.round(this)&0xffff;
165 return (this < 0 && x > 0 ? x - 0x10000 : x);
166 });
167
168 Clazz_defineMethod(Number,"byteValue",
169 function(){
170 var x = Math.round(this)&0xff;
171 return (this < 0 && x > 0 ? x - 0x100 : x);
172 });
173
174 Clazz_defineMethod(Number,"intValue",
175 function(){
176 return Math.round(this)&0xffffffff;
177 });
178
179 Clazz_defineMethod(Number,"longValue",
180 function(){
181 return Math.round(this);
182 });
183
184 Clazz_defineMethod(Number,"floatValue",
185 function(){
186 return this.valueOf();
187 });
188 Clazz_defineMethod(Number,"doubleValue",
189 function(){
190 return parseFloat(this.valueOf());
191 });
192
193 Clazz_overrideMethod(Number,"hashCode",
194 function(){
195 return this.valueOf();
196 });
197
198 java.lang.Integer=Integer=function(){
199 Clazz_instantialize(this,arguments);
200 };
201 Clazz_decorateAsType(Integer,"Integer",Number,Comparable,null,true);
202 Integer.prototype.valueOf=function(){return 0;};
203 Integer.toString=Integer.prototype.toString=function(){
204 if(arguments.length!=0){
205 return""+arguments[0];
206 } else if(this===Integer){
207 return"class java.lang.Integer";
208 }
209 return""+this.valueOf();
210 };
211
212 /*
213
214 Clazz_makeConstructor(Integer,
215 function(){
216 this.valueOf=function(){
217 return 0;
218 };
219 });
220 */
221
222
223 Clazz_overrideConstructor(Integer, function(v){
224  v == null && (v = 0);
225  if (typeof v != "number")
226         v = Integer.parseIntRadix(v, 10);
227  this.valueOf=function(){return v;};
228 }); //BH
229 /*
230 Clazz_makeConstructor(Integer,
231 function(s){
232 var value=Integer.parseInt(s,10);
233 this.valueOf=function(){
234 return value;
235 };
236 },"String");
237 */
238 Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-0x80000000;
239 Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=0x7fffffff;
240 Integer.TYPE=Integer.prototype.TYPE=Integer;
241
242
243 Clazz_defineMethod(Integer,"bitCount",
244 function(i) {
245         i = i - ((i >>> 1) & 0x55555555);
246         i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
247         i = (i + (i >>> 4)) & 0x0f0f0f0f;
248         i = i + (i >>> 8);
249         i = i + (i >>> 16);
250         return i & 0x3f;
251 },"Number");
252 Integer.bitCount=Integer.prototype.bitCount;
253
254 Clazz_defineMethod(Integer,"numberOfLeadingZeros",
255 function(i) {
256  if (i == 0) return 32;
257  var n = 1;
258  if (i >>> 16 == 0) { n += 16; i <<= 16; }
259  if (i >>> 24 == 0) { n +=  8; i <<=  8; }
260  if (i >>> 28 == 0) { n +=  4; i <<=  4; }
261  if (i >>> 30 == 0) { n +=  2; i <<=  2; }
262  n -= i >>> 31;
263  return n;
264 },"Number");
265 Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;
266
267 Clazz_defineMethod(Integer,"numberOfTrailingZeros",
268 function(i) {
269         if (i == 0) return 32;
270         var n = 31;
271         var y = i <<16; if (y != 0) { n = n -16; i = y; }
272         y = i << 8; if (y != 0) { n = n - 8; i = y; }
273         y = i << 4; if (y != 0) { n = n - 4; i = y; }
274         y = i << 2; if (y != 0) { n = n - 2; i = y; }
275         return n - ((i << 1) >>> 31);
276 },"Number");
277 Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;
278
279 Clazz_defineMethod(Integer,"parseIntRadix",
280 function(s,radix){
281 if(s==null){
282 throw new NumberFormatException("null");
283 }if(radix<2){
284 throw new NumberFormatException("radix "+radix+" less than Character.MIN_RADIX");
285 }if(radix>36){
286 throw new NumberFormatException("radix "+radix+" greater than Character.MAX_RADIX");
287 }
288 if (radix == 10) {
289         for (var i = s.length; --i >= 0;) {
290                 var c = s.charCodeAt(i);
291                 if (c >= 48 && c <= 57) continue;
292                 if (i > 0 || c != 43 && c != 45)
293                         throw new NumberFormatException("Not a Number : "+s);
294
295         }
296 }
297 var i=parseInt(s,radix);
298 if(isNaN(i)){
299 throw new NumberFormatException("Not a Number : "+s);
300 }
301 return i;
302 },"String, Number");
303 Integer.parseIntRadix=Integer.prototype.parseIntRadix;
304
305 Clazz_defineMethod(Integer,"parseInt",
306 function(s){
307 return Integer.parseIntRadix(s,10);
308 },"String");
309 Integer.parseInt=Integer.prototype.parseInt;
310
311 /*
312 Clazz_defineMethod(Integer,"$valueOf",
313 function(s){
314 return new Integer(Integer.parseIntRadix(s,10));
315 },"String");
316 */
317
318 Clazz_overrideMethod(Integer,"$valueOf",
319 function(s){
320 return new Integer(s);
321 });
322
323 /*
324 Clazz_defineMethod(Integer,"$valueOf",
325 function(s,r){
326 return new Integer(Integer.parseIntRadix(s,r));
327 },"String, Number");
328 */
329
330 Integer.$valueOf=Integer.prototype.$valueOf;
331
332
333 Clazz_overrideMethod(Integer,"equals",
334 function(s){
335 if(s==null||!Clazz_instanceOf(s,Integer)){
336 return false;
337 }
338 return s.valueOf()==this.valueOf();
339 },"Object");
340 Integer.toHexString=Integer.prototype.toHexString=function(d){
341 if(d.valueOf)d=d.valueOf();
342 if (d < 0) {
343 var b = d & 0xFFFFFF;
344 var c = ((d>>24)&0xFF);
345 return c._numberToString(16) + (b = "000000" + b._numberToString(16)).substring(b.length - 6);
346 }
347 return d._numberToString(16);};
348 Integer.toOctalString=Integer.prototype.toOctalString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(8);};
349 Integer.toBinaryString=Integer.prototype.toBinaryString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(2);};
350
351 Integer.decodeRaw=Clazz_defineMethod(Integer,"decodeRaw", function(n){
352 if (n.indexOf(".") >= 0)n = "";
353 var i = (n.startsWith("-") ? 1 : 0);
354 n = n.replace(/\#/, "0x").toLowerCase();
355 var radix=(n.startsWith("0x", i) ? 16 : n.startsWith("0", i) ? 8 : 10);
356 // The general problem with parseInt is that is not strict -- ParseInt("10whatever") == 10.
357 // Number is strict, but Number("055") does not work, though ParseInt("055", 8) does.
358 // need to make sure negative numbers are negative
359 n = Number(n) & 0xFFFFFFFF;
360 return (radix == 8 ? parseInt(n, 8) : n);
361 },"~S");
362
363 Integer.decode=Clazz_defineMethod(Integer,"decode", function(n){
364         n = Integer.decodeRaw(n);
365         if (isNaN(n) || n < Integer.MIN_VALUE|| n > Integer.MAX_VALUE)
366         throw new NumberFormatException("Invalid Integer");
367         return new Integer(n);
368 },"~S");
369
370 Clazz_overrideMethod(Integer,"hashCode",
371 function(){
372 return this.valueOf();
373 });
374
375 // Note that Long is problematic in JavaScript 
376
377 java.lang.Long=Long=function(){
378 Clazz_instantialize(this,arguments);
379 };
380 Clazz_decorateAsType(Long,"Long",Number,Comparable,null,true);
381 Long.prototype.valueOf=function(){return 0;};
382 Long.toString=Long.prototype.toString=function(){
383 if(arguments.length!=0){
384 return""+arguments[0];
385 }else if(this===Long){
386 return"class java.lang.Long";
387 }
388 return""+this.valueOf();
389 };
390
391 Clazz_overrideConstructor(Long, function(v){
392  v == null && (v = 0);
393  v = (typeof v == "number" ? Math.round(v) : Integer.parseIntRadix(v, 10));
394 this.valueOf=function(){return v;};
395 });
396
397 //Long.MIN_VALUE=Long.prototype.MIN_VALUE=-0x8000000000000000;
398 //Long.MAX_VALUE=Long.prototype.MAX_VALUE=0x7fffffffffffffff;
399 Long.TYPE=Long.prototype.TYPE=Long;
400
401 Clazz_defineMethod(Long,"parseLong",
402 function(s,radix){
403  return Integer.parseInt(s, radix || 10);
404 });
405
406 Long.parseLong=Long.prototype.parseLong;
407
408 Clazz_overrideMethod(Long,"$valueOf",
409 function(s){
410 return new Long(s);
411 });
412 /*
413 Clazz_defineMethod(Long,"$valueOf",
414 function(s){
415 return new Long(s);
416 },"Number");
417
418 Clazz_defineMethod(Long,"$valueOf",
419 function(s,r){
420 return new Long(Long.parseLong(s,r));
421 },"String, Number");
422 */
423 Long.$valueOf=Long.prototype.$valueOf;
424 Clazz_overrideMethod(Long,"equals",
425 function(s){
426 if(s==null||!Clazz_instanceOf(s,Long)){
427 return false;
428 }
429 return s.valueOf()==this.valueOf();
430 },"Object");
431 Long.toHexString=Long.prototype.toHexString=function(i){
432 return i.toString(16);
433 };
434 Long.toOctalString=Long.prototype.toOctalString=function(i){
435 return i.toString(8);
436 };
437 Long.toBinaryString=Long.prototype.toBinaryString=function(i){
438 return i.toString(2);
439 };
440
441
442 Long.decode=Clazz_defineMethod(Long,"decode",
443 function(n){
444         n = Integer.decodeRaw(n);
445         if (isNaN(n))
446                 throw new NumberFormatException("Invalid Long");
447         return new Long(n);
448 },"~S");
449
450 java.lang.Short = Short = function () {
451 Clazz_instantialize (this, arguments);
452 };
453 Clazz_decorateAsType (Short, "Short", Number, Comparable, null, true);
454 Short.prototype.valueOf = function () { return 0; };
455 Short.toString = Short.prototype.toString = function () {
456         if (arguments.length != 0) {
457                 return "" + arguments[0];
458         } else if (this === Short) {
459                 return "class java.lang.Short"; // Short.class.toString
460         }
461         return "" + this.valueOf ();
462 };
463
464 Clazz_overrideConstructor(Short,
465 function (v) {
466  v == null && (v = 0);
467  if (typeof v != "number")
468         v = Integer.parseIntRadix(v, 10);
469  v = v.shortValue();
470  this.valueOf = function () {return v;};
471 });
472
473
474 Short.MIN_VALUE = Short.prototype.MIN_VALUE = -32768;
475 Short.MAX_VALUE = Short.prototype.MAX_VALUE = 32767;
476 Short.TYPE = Short.prototype.TYPE = Short;
477
478 Clazz_defineMethod(Short, "parseShortRadix",
479 function (s, radix) {
480 return Integer.parseIntRadix(s, radix).shortValue();
481 }, "String, Number");
482 Short.parseShortRadix = Short.prototype.parseShortRadix;
483
484 Clazz_defineMethod(Short, "parseShort",
485 function (s) {
486 return Short.parseShortRadix (s, 10);
487 }, "String");
488
489 Short.parseShort = Short.prototype.parseShort;
490
491 /*
492 Clazz_defineMethod(Short, "$valueOf",
493 function (s) {
494 return new Short(Short.parseShort (s, 10));
495 }, "String");
496         */
497
498 Clazz_overrideMethod(Short, "$valueOf",
499 function (s) {
500 return new Short(s);
501 });
502
503 /*
504 Clazz_defineMethod(Short, "$valueOf",
505 function (s, r) {
506 return new Short(Short.parseShort (s, r));
507 }, "String, Number");
508         */
509
510 Short.$valueOf = Short.prototype.$valueOf;
511 Clazz_overrideMethod(Short, "equals",
512 function (s) {
513 if(s == null || !Clazz_instanceOf(s, Short) ){
514         return false;
515 }
516 return s.valueOf()  == this.valueOf();
517 }, "Object");
518 Short.toHexString = Short.prototype.toHexString = function (i) {
519         return i.toString (16);
520 };
521 Short.toOctalString = Short.prototype.toOctalString = function (i) {
522         return i.toString (8);
523 };
524 Short.toBinaryString = Short.prototype.toBinaryString = function (i) {
525         return i.toString (2);
526 };
527 Short.decode = Clazz_defineMethod(Short, "decode",
528 function(n){
529         n = Integer.decodeRaw(n);
530         if (isNaN(n) || n < -32768|| n > 32767)
531                 throw new NumberFormatException("Invalid Short");
532         return new Short(n);
533 }, "~S");
534
535 java.lang.Byte=Byte=function(){
536 Clazz_instantialize(this,arguments);
537 };
538 Clazz_decorateAsType(Byte,"Byte",Number,Comparable,null,true);
539 Byte.prototype.valueOf=function(){return 0;};
540 Byte.toString=Byte.prototype.toString=function(){
541 if(arguments.length!=0){
542 return""+arguments[0];
543 }else if(this===Byte){
544 return"class java.lang.Byte";
545 }
546 return""+this.valueOf();
547 };
548 Clazz_makeConstructor(Byte,
549 function(v){
550  if (typeof v != "number")
551          v = Integer.parseIntRadix(v, 10);
552  v = v.byteValue();
553 this.valueOf=function(){
554 return v;
555 };
556 });
557
558 Byte.serialVersionUID=Byte.prototype.serialVersionUID=-7183698231559129828;
559 Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128;
560 Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127;
561 Byte.SIZE=Byte.prototype.SIZE=8;
562 Byte.TYPE=Byte.prototype.TYPE=Byte;
563
564 Clazz_defineMethod(Byte,"parseByteRadix",
565 function(s,radix){
566  return Integer.parseIntRadix(s, radix).byteValue();
567 },"String, Number");
568 Byte.parseByteRadix=Byte.prototype.parseByteRadix;
569
570 Clazz_defineMethod(Byte,"parseByte",
571 function(s){
572 return Byte.parseByte(s,10);
573 },"String");
574
575 Byte.parseByte=Byte.prototype.parseByte;
576
577 Clazz_overrideMethod(Byte, "$valueOf",
578 function (s) {
579 return new Byte(s);
580 });
581
582 Byte.$valueOf=Byte.prototype.$valueOf;
583 Clazz_overrideMethod(Byte,"equals",
584 function(s){
585 if(s==null||!Clazz_instanceOf(s,Byte)){
586 return false;
587 }
588 return s.valueOf()==this.valueOf();
589 },"Object");
590 Byte.toHexString=Byte.prototype.toHexString=function(i){
591 return i.toString(16);
592 };
593 Byte.toOctalString=Byte.prototype.toOctalString=function(i){
594 return i.toString(8);
595 };
596 Byte.toBinaryString=Byte.prototype.toBinaryString=function(i){
597 return i.toString(2);
598 };
599 Byte.decode=Clazz_defineMethod(Byte,"decode",
600 function(n){
601         n = Integer.decodeRaw(n);
602         if (isNaN(n) || n < -128|| n > 127)
603                 throw new NumberFormatException("Invalid Byte");
604 return new Byte(n);
605 },"~S");
606
607 Clazz._floatToString = function(f) {
608  var s = ""+f
609  if (s.indexOf(".") < 0 && s.indexOf("e") < 0)
610          s += ".0";
611  return s;
612 }
613
614 java.lang.Float=Float=function(){
615 Clazz_instantialize(this,arguments);
616 };
617 Clazz_decorateAsType(Float,"Float",Number,Comparable,null,true);
618 Float.prototype.valueOf=function(){return 0;};
619 Float.toString=Float.prototype.toString=function(){
620 if(arguments.length!=0){
621 return Clazz._floatToString(arguments[0]);
622 }else if(this===Float){
623 return"class java.lang.Float";
624 }
625 return Clazz._floatToString(this.valueOf());
626 };
627
628 Clazz_overrideConstructor(Float, function(v){
629  v == null && (v = 0);
630  if (typeof v != "number") 
631         v = Number(v);
632  this.valueOf=function(){return v;}
633 });
634
635 Float.serialVersionUID=Float.prototype.serialVersionUID=-2671257302660747028;
636 Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235e+38;
637 Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4e-45;
638 Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;
639 Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;
640 Float.NaN=Number.NaN;
641 Float.TYPE=Float.prototype.TYPE=Float;
642
643 Clazz_defineMethod(Float,"parseFloat",
644 function(s){
645 if(s==null){
646 throw new NumberFormatException("null");
647 }
648 if (typeof s == "number")return s;  // important -- typeof NaN is "number" and is OK here
649 var floatVal=Number(s);
650 if(isNaN(floatVal)){
651 throw new NumberFormatException("Not a Number : "+s);
652 }
653 return floatVal;
654 },"String");
655 Float.parseFloat=Float.prototype.parseFloat;
656
657 Clazz_overrideMethod(Float,"$valueOf",
658 function(s){
659 return new Float(s);
660 });
661
662 Float.$valueOf=Float.prototype.$valueOf;
663
664 Clazz_defineMethod(Float,"isNaN",
665 function(num){
666 return isNaN(num);
667 },"Number");
668 Float.isNaN=Float.prototype.isNaN;
669 Clazz_defineMethod(Float,"isInfinite",
670 function(num){
671 return!isFinite(num);
672 },"Number");
673 Float.isInfinite=Float.prototype.isInfinite;
674
675 Clazz_overrideMethod(Float,"equals",
676 function(s){
677 if(s==null||!Clazz_instanceOf(s,Float)){
678 return false;
679 }
680 return s.valueOf()==this.valueOf();
681 },"Object");
682
683 java.lang.Double=Double=function(){
684 Clazz_instantialize(this,arguments);
685 };
686 Clazz_decorateAsType(Double,"Double",Number,Comparable,null,true);
687 Double.prototype.valueOf=function(){return 0;};
688 Double.toString=Double.prototype.toString=function(){
689 if(arguments.length!=0){
690 return Clazz._floatToString(arguments[0]);
691 }else if(this===Double){
692 return"class java.lang.Double";
693 }
694 return Clazz._floatToString(this.valueOf());
695 };
696
697 Clazz_overrideConstructor(Double, function(v){
698  v == null && (v = 0);
699  if (typeof v != "number") 
700         v = Double.parseDouble(v);
701  this.valueOf=function(){return v;};
702 }); // BH
703
704 Double.serialVersionUID=Double.prototype.serialVersionUID=-9172774392245257468;
705 Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9e-324;
706 Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157e+308;
707 Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;
708 Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;
709 Double.NaN=Number.NaN;
710 Double.TYPE=Double.prototype.TYPE=Double;
711
712 Clazz_defineMethod(Double,"isNaN",
713 function(num){
714 return isNaN(num);
715 },"Number");
716 Double.isNaN=Double.prototype.isNaN;
717 Clazz_defineMethod(Double,"isInfinite",
718 function(num){
719 return!isFinite(num);
720 },"Number");
721 Double.isInfinite=Double.prototype.isInfinite;
722
723 Clazz_defineMethod(Double,"parseDouble",
724 function(s){
725 if(s==null){
726 throw new NumberFormatException("null");
727 }
728 if (typeof s == "number")return s;  // important -- typeof NaN is "number" and is OK here
729 var doubleVal=Number(s);
730 if(isNaN(doubleVal)){
731 throw new NumberFormatException("Not a Number : "+s);
732 }
733 return doubleVal;
734 },"String");
735 Double.parseDouble=Double.prototype.parseDouble;
736
737 /*
738 Clazz_defineMethod(Double,"$valueOf",
739 function(s){
740 return new Double(this.parseDouble(s));
741 },"String");
742 */
743
744 Clazz_defineMethod(Double,"$valueOf",
745 function(v){
746 return new Double(v);
747 },"Number");
748
749 Double.$valueOf=Double.prototype.$valueOf;
750
751 Clazz_overrideMethod(Double,"equals",
752 function(s){
753 if(s==null||!Clazz_instanceOf(s,Double)){
754 return false;
755 }
756 return s.valueOf()==this.valueOf();
757 },"Object");
758
759
760 //java.lang.B00lean = Boolean; ?? BH why this?
761 Boolean = java.lang.Boolean = Boolean || function () {Clazz_instantialize (this, arguments);};
762 if (Clazz._supportsNativeObject) {
763         for (var i = 0; i < Clazz._extendedObjectMethods.length; i++) {
764                 var p = Clazz._extendedObjectMethods[i];
765                 Boolean.prototype[p] = Clazz._O.prototype[p];
766         }
767 }
768 Boolean.__CLASS_NAME__="Boolean";
769 Clazz_implementOf(Boolean,[java.io.Serializable,java.lang.Comparable]);
770 Boolean.equals=Clazz._innerFunctions.equals;
771 Boolean.getName=Clazz._innerFunctions.getName;
772 Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-3665804199014368530;
773
774 //Clazz_makeConstructor(Boolean,
775 //function(value){
776 //this.valueOf=function(){
777 //return value;
778 //};
779 //},"~B");
780
781 Clazz_overrideConstructor(Boolean,
782 function(s){
783         var b = ((typeof s == "string" ? Boolean.toBoolean(s) : s) ? true : false);
784         this.valueOf=function(){return b;};
785 },"~O");
786
787 Boolean.parseBoolean=Clazz_defineMethod(Boolean,"parseBoolean",
788 function(s){
789 return Boolean.toBoolean(s);
790 },"~S");
791 Clazz_defineMethod(Boolean,"booleanValue",
792 function(){
793 return this.valueOf();
794 });
795 Boolean.$valueOf=Clazz_overrideMethod(Boolean,"$valueOf",
796 function(b){
797 return((typeof b == "string"? "true".equalsIgnoreCase(b) : b)?Boolean.TRUE:Boolean.FALSE);
798 });
799
800 /*
801 Boolean.toString=Clazz_defineMethod(Boolean,"toString",
802 function(b){
803 return b?"true":"false";
804 },"~B");
805 */
806
807 Clazz_overrideMethod(Boolean,"toString",
808 function(){
809 return this.valueOf()?"true":"false";
810 });
811 Clazz_overrideMethod(Boolean,"hashCode",
812 function(){
813 return this.valueOf()?1231:1237;
814 });
815 Clazz_overrideMethod(Boolean,"equals",
816 function(obj){
817 if(Clazz_instanceOf(obj,Boolean)){
818 return this.booleanValue()==obj.booleanValue();
819 }return false;
820 },"~O");
821 Boolean.getBoolean=Clazz_defineMethod(Boolean,"getBoolean",
822 function(name){
823 var result=false;
824 try{
825 result=Boolean.toBoolean(System.getProperty(name));
826 }catch(e){
827 if(Clazz_instanceOf(e,IllegalArgumentException)){
828 }else if(Clazz_instanceOf(e,NullPointerException)){
829 }else{
830 throw e;
831 }
832 }
833 return result;
834 },"~S");
835 Clazz_overrideMethod(Boolean,"compareTo",
836 function(b){
837 return(b.value==this.value?0:(this.value?1:-1));
838 },"Boolean");
839 Boolean.toBoolean=Clazz_defineMethod(Boolean,"toBoolean",
840 ($fz=function(name){
841 return((name!=null)&&name.equalsIgnoreCase("true"));
842 },$fz.isPrivate=true,$fz),"~S");
843 Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(true);
844 Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(false);
845 Boolean.TYPE=Boolean.prototype.TYPE=Boolean;
846
847
848 Clazz._Encoding=new Object();
849
850 (function(Encoding) {
851
852 Encoding.UTF8="utf-8";
853 Encoding.UTF16="utf-16";
854 Encoding.ASCII="ascii";
855
856
857 Encoding.guessEncoding=function(str){
858 if(str.charCodeAt(0)==0xEF&&str.charCodeAt(1)==0xBB&&str.charCodeAt(2)==0xBF){
859 return Encoding.UTF8;
860 }else if(str.charCodeAt(0)==0xFF&&str.charCodeAt(1)==0xFE){
861 return Encoding.UTF16;
862 }else{
863 return Encoding.ASCII;
864 }
865 };
866
867 Encoding.readUTF8=function(str){
868 var encoding=this.guessEncoding(str);
869 var startIdx=0;
870 if(encoding==Encoding.UTF8){
871 startIdx=3;
872 }else if(encoding==Encoding.UTF16){
873 startIdx=2;
874 }
875 var arrs=new Array();
876 for(var i=startIdx;i<str.length;i++){
877 var charCode=str.charCodeAt(i);
878 if(charCode<0x80){
879 arrs[arrs.length]=str.charAt(i);
880 }else if(charCode>0xc0&&charCode<0xe0){
881 var c1=charCode&0x1f;
882 i++;
883 var c2=str.charCodeAt(i)&0x3f;
884 var c=(c1<<6)+c2;
885 arrs[arrs.length]=String.fromCharCode(c);
886 }else if(charCode>=0xe0){
887 var c1=charCode&0x0f;
888 i++;
889 var c2=str.charCodeAt(i)&0x3f;
890 i++;
891 var c3=str.charCodeAt(i)&0x3f;
892 var c=(c1<<12)+(c2<<6)+c3;
893 arrs[arrs.length]=String.fromCharCode(c);
894 }
895 }
896 return arrs.join('');
897 };
898
899 Encoding.convert2UTF8=function(str){
900 var encoding=this.guessEncoding(str);
901 var startIdx=0;
902 if(encoding==Encoding.UTF8){
903 return str;
904 }else if(encoding==Encoding.UTF16){
905 startIdx=2;
906 }
907
908 var offset=0;
909 var arrs=new Array(offset+str.length-startIdx);
910
911 for(var i=startIdx;i<str.length;i++){
912 var charCode=str.charCodeAt(i);
913 if(charCode<0x80){
914 arrs[offset+i-startIdx]=str.charAt(i);
915 }else if(charCode<=0x07ff){
916 var c1=0xc0+((charCode&0x07c0)>>6);
917 var c2=0x80+(charCode&0x003f);
918 arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2);
919 }else{
920 var c1=0xe0+((charCode&0xf000)>>12);
921 var c2=0x80+((charCode&0x0fc0)>>6);
922 var c3=0x80+(charCode&0x003f);
923 arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2)+String.fromCharCode(c3);
924 }
925 }
926 return arrs.join('');
927 };
928 Encoding.base64Chars=new Array(
929 'A','B','C','D','E','F','G','H',
930 'I','J','K','L','M','N','O','P',
931 'Q','R','S','T','U','V','W','X',
932 'Y','Z','a','b','c','d','e','f',
933 'g','h','i','j','k','l','m','n',
934 'o','p','q','r','s','t','u','v',
935 'w','x','y','z','0','1','2','3',
936 '4','5','6','7','8','9','+','/'
937 );
938 Encoding.encodeBase64=function(str){
939 if(str==null||str.length==0)return str;
940 var b64=Encoding.base64Chars;
941 var length=str.length;
942 var index=0;
943 var buf=[];
944 var c0,c1,c2;
945 while(index<length){
946 c0=str.charCodeAt(index++);
947 buf[buf.length]=b64[c0>>2];
948 if(index<length){
949 c1=str.charCodeAt(index++);
950 buf[buf.length]=b64[((c0<<4)&0x30)|(c1>>4)];
951 if(index<length){
952 c2=str.charCodeAt(index++);
953 buf[buf.length]=b64[((c1<<2)&0x3c)|(c2>>6)];
954 buf[buf.length]=b64[c2&0x3F];
955 }else{
956 buf[buf.length]=b64[((c1<<2)&0x3c)];
957 buf[buf.length]='=';
958 }
959 }else{
960 buf[buf.length]=b64[(c0<<4)&0x30];
961 buf[buf.length]='=';
962 buf[buf.length]='=';
963 }
964 }
965 return buf.join('');
966 };
967 Encoding.decodeBase64=function(str){
968 if(str==null||str.length==0)return str;
969 var b64=Encoding.base64Chars;
970 var xb64=Encoding.xBase64Chars;
971 if(Encoding.xBase64Chars==null){
972 xb64=new Object();
973 for(var i=0;i<b64.length;i++){
974 xb64[b64[i]]=i;
975 }
976 Encoding.xBase64Chars=xb64;
977 }
978 var length=str.length;
979 var index=0;
980 var buf=[];
981 var c0,c1,c2,c3;
982 var c=0;
983 while(index<length&&c++<60000){
984 c0=xb64[str.charAt(index++)];
985 c1=xb64[str.charAt(index++)];
986 c2=xb64[str.charAt(index++)];
987 c3=xb64[str.charAt(index++)];
988 buf[buf.length]=String.fromCharCode(((c0<<2)&0xff)|c1>>4);
989 if(c2!=null){
990 buf[buf.length]=String.fromCharCode(((c1<<4)&0xff)|c2>>2);
991 if(c3!=null){
992 buf[buf.length]=String.fromCharCode(((c2<<6)&0xff)|c3);
993 }
994 }
995 }
996 return buf.join('');
997 };
998
999 if(String.prototype.$replace==null){
1000 java.lang.String=String;
1001 if(Clazz._supportsNativeObject){
1002 for(var i=0;i<Clazz._extendedObjectMethods.length;i++){
1003 var p=Clazz._extendedObjectMethods[i];
1004 if("to$tring"==p||"toString"==p||"equals"==p||"hashCode"==p){
1005 continue;
1006 }
1007 String.prototype[p]=Clazz._O.prototype[p];
1008 }
1009 }
1010
1011 Clazz_implementOf(String,[java.io.Serializable,CharSequence,Comparable]);
1012
1013 String.getName=Clazz._innerFunctions.getName;
1014
1015 String.serialVersionUID=String.prototype.serialVersionUID=-6849794470754667710;
1016
1017
1018 ;(function(sp) {
1019
1020 sp.$replace=function(c1,c2){
1021         if (c1 == c2 || this.indexOf (c1) < 0) return "" + this;
1022         if (c1.length == 1) {
1023                 if ("\\$.*+|?^{}()[]".indexOf(c1) >= 0)         c1 = "\\" + c1;
1024         } else {    
1025                 c1=c1.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function($0,$1){return"\\"+$1;});
1026         }
1027         return this.replace(new RegExp(c1,"gm"),c2);
1028 };
1029 sp.$generateExpFunction=function(str){
1030 var arr=[];
1031 var orders=[];
1032 var idx=0;
1033 arr[0]="";
1034 var i=0;
1035 for(;i<str.length;i++){
1036 var ch=str.charAt(i);
1037 if(i!=str.length-1&&ch=='\\'){
1038 i++;
1039 var c=str.charAt(i);
1040 if(c=='\\'){
1041 arr[idx]+='\\';
1042 }
1043 arr[idx]+=c;
1044 }else if(i!=str.length-1&&ch=='$'){
1045 i++;
1046 orders[idx]=parseInt(str.charAt(i));
1047 idx++;
1048 arr[idx]="";
1049 }else if(ch=='\r'){
1050 arr[idx]+="\\r";
1051 }else if(ch=='\n'){
1052 arr[idx]+="\\n";
1053 }else if(ch=='\t'){
1054 arr[idx]+="\\t";
1055 }else if(ch=='\"'){
1056 arr[idx]+="\\\"";
1057 }else{
1058 arr[idx]+=ch;
1059 }
1060 }
1061 var funStr="f = function (";
1062 var max=Math.max.apply({},orders);
1063 for(i=0;i<=max;i++){
1064 funStr+="$"+i;
1065 if(i!=max){
1066 funStr+=", ";
1067 }
1068 }
1069 funStr+=") { return ";
1070 for(i=0;i<arr.length-1;i++){
1071 funStr+="\""+arr[i]+"\" + $"+orders[i]+" + ";
1072 }
1073 funStr+="\""+arr[i]+"\"; }";
1074 var f=null;
1075 eval(funStr)
1076 return f;
1077 };
1078
1079 sp.replaceAll=function(exp,str){
1080 var regExp=new RegExp(exp,"gm");
1081 return this.replace(regExp,this.$generateExpFunction(str));
1082 };
1083 sp.replaceFirst=function(exp,str){
1084 var regExp=new RegExp(exp,"m");
1085 return this.replace(regExp,this.$generateExpFunction(str));
1086 };
1087 sp.matches=function(exp){
1088 if(exp!=null){
1089 exp="^("+exp+")$";
1090 }
1091 var regExp=new RegExp(exp,"gm");
1092 var m=this.match(regExp);
1093 return m!=null&&m.length!=0;
1094 };
1095 sp.regionMatches=function(ignoreCase,toffset,
1096 other,ooffset,len){
1097
1098 if(typeof ignoreCase=="number"
1099 ||(ignoreCase!=true&&ignoreCase!=false)){
1100 len=ooffset;
1101 ooffset=other;
1102 other=toffset;
1103 toffset=ignoreCase;
1104 ignoreCase=false;
1105 }
1106 var to=toffset;
1107 var po=ooffset;
1108
1109 if((ooffset<0)||(toffset<0)||(toffset>this.length-len)||
1110 (ooffset>other.length-len)){
1111 return false;
1112 }
1113 var s1=this.substring(toffset,toffset+len);
1114 var s2=other.substring(ooffset,ooffset+len);
1115 if(ignoreCase){
1116 s1=s1.toLowerCase();
1117 s2=s2.toLowerCase();
1118 }
1119 return s1==s2;
1120 };
1121
1122
1123
1124 sp.$plit=function(regex,limit){
1125 if (!limit && regex == " ")
1126         return this.split(regex);
1127
1128 if(limit!=null&&limit>0){
1129 if(limit==1){
1130 return this;
1131 }
1132 var regExp=new RegExp("("+regex+")","gm");
1133 var count=1;
1134 var s=this.replace(regExp,function($0,$1){
1135 count++;
1136 if(count==limit){
1137 return"@@_@@";
1138 }else if(count>limit){
1139 return $0;
1140 }else{
1141 return $0;
1142 }
1143 });
1144 regExp=new RegExp(regex,"gm");
1145 var arr=this.split(regExp);
1146 if(arr.length>limit){
1147 arr[limit-1]=s.substring(s.indexOf("@@_@@")+5);
1148 arr.length=limit;
1149 }
1150 return arr;
1151 }else{
1152 var regExp=new RegExp(regex,"gm");
1153 return this.split(regExp);
1154 }
1155 };
1156 /*
1157 sp.trim=function(){
1158 var len=this.length;
1159 var st=0;
1160
1161 while((st<len)&&(this.charAt(st)<=' ')){
1162 st++;
1163 }
1164 while((st<len)&&(this.charAt(len-1)<=' ')){
1165 len--;
1166 }
1167 return((st>0)||(len<len))?this.substring(st,len):this;
1168 };
1169
1170
1171 */
1172
1173 if (!sp.trim)
1174 sp.trim=function(){
1175 return this.replace(/^\s+/g,'').replace(/\s+$/g,'');
1176 };
1177
1178 if (!sp.startsWith || !sp.endsWith) {
1179 var sn=function(s, prefix,toffset){
1180 var to=toffset;
1181 var po=0;
1182 var pc=prefix.length;
1183
1184 if((toffset<0)||(toffset>s.length-pc)){
1185 return false;
1186 }
1187 while(--pc>=0){
1188 if(s.charAt(to++)!=prefix.charAt(po++)){
1189 return false;
1190 }
1191 }
1192 return true;
1193 };
1194
1195 sp.startsWith=function(prefix){
1196 if(arguments.length==1){
1197 return sn(this,arguments[0],0);
1198 }else if(arguments.length==2){
1199 return sn(this,arguments[0],arguments[1]);
1200 }else{
1201 return false;
1202 }
1203 };
1204
1205 sp.endsWith=function(suffix){
1206 return sn(this, suffix,this.length-suffix.length);
1207 };
1208
1209 }
1210
1211 sp.equals=function(anObject){
1212 return this.valueOf()==anObject;
1213 };
1214
1215 sp.equalsIgnoreCase=function(anotherString){
1216 return(anotherString==null)?false:(this==anotherString
1217 ||this.toLowerCase()==anotherString.toLowerCase());
1218 };
1219
1220
1221 sp.hash=0;
1222
1223 sp.hashCode=function(){
1224 var h=this.hash;
1225 if(h==0){
1226 var off=0;
1227 var len=this.length;
1228 for(var i=0;i<len;i++){
1229 h=31*h+this.charCodeAt(off++);
1230 h&=0xffffffff;
1231 }
1232 this.hash=h;
1233 }
1234 return h;
1235 };
1236
1237 sp.getBytes=function(){
1238 if(arguments.length==4){
1239 return this.getChars(arguments[0],arguments[1],arguments[2],arguments[3]);
1240 }
1241 var s=this;
1242 if(arguments.length==1){
1243 var cs=arguments[0].toString().toLowerCase();
1244 var charset=[
1245 "utf-8","UTF8","us-ascii","iso-8859-1","8859_1","gb2312","gb18030","gbk"
1246 ];
1247 var existed=false;
1248 for(var i=0;i<charset.length;i++){
1249 if(charset[i]==cs){
1250 existed=true;
1251 break;
1252 }
1253 }
1254 if(!existed){
1255 throw new java.io.UnsupportedEncodingException();
1256 }
1257 if(cs=="utf-8"||cs=="utf8"){
1258 s=Encoding.convert2UTF8(this);
1259 }
1260 }
1261 var arrs=new Array(s.length);
1262 var c=0,ii=0;
1263 for(var i=0;i<s.length;i++){
1264 c=s.charCodeAt(i);
1265 if(c>255){
1266 arrs[ii]=0x1a;
1267 arrs[ii+1]=c&0xff;
1268 arrs[ii+2]=(c&0xff00)>>8;
1269 ii+=2;
1270 }else{
1271 arrs[ii]=c;
1272 }
1273 ii++;
1274 }
1275 return arrs;
1276 };
1277
1278 /*
1279 sp.compareTo=function(anotherString){
1280 if(anotherString==null){
1281 throw new java.lang.NullPointerException();
1282 }
1283 var len1=this.length;
1284 var len2=anotherString.length;
1285 var n=Math.min(len1,len2);
1286 var k=0;
1287 while(k<n){
1288 var c1=this.charCodeAt(k);
1289 var c2=anotherString.charCodeAt(k);
1290 if(c1!=c2){
1291 return c1-c2;
1292 }
1293 k++;
1294 }
1295 return len1-len2;
1296 };
1297
1298 */
1299
1300 sp.contains = function(a) {return this.indexOf(a) >= 0}  // bh added
1301 sp.compareTo = function(a){return this > a ? 1 : this < a ? -1 : 0} // bh added
1302
1303
1304
1305 sp.toCharArray=function(){
1306 var result=new Array(this.length);
1307 for(var i=0;i<this.length;i++){
1308 result[i]=this.charAt(i);
1309 }
1310 return result;
1311 };
1312 String.value0f=String.valueOf;
1313 String.valueOf=function(o){
1314 if(o=="undefined"){
1315 return String.value0f();
1316 }
1317 if(o instanceof Array){
1318 if(arguments.length==1){
1319 return o.join('');
1320 }else{
1321 var off=arguments[1];
1322 var len=arguments[2];
1323 var oo=new Array(len);
1324 for(var i=0;i<len;i++){
1325 oo[i]=o[off+i];
1326 }
1327 return oo.join('');
1328 }
1329 }
1330 return""+o;
1331 };
1332
1333 sp.subSequence=function(beginIndex,endIndex){
1334 return this.substring(beginIndex,endIndex);
1335 };
1336
1337 sp.compareToIgnoreCase=function(str){
1338 if(str==null){
1339 throw new NullPointerException();
1340 }
1341 var s1=this.toUpperCase();
1342 var s2=str.toUpperCase();
1343 if(s1==s2){
1344 return 0;
1345 }else{
1346 var s1=this.toLowerCase();
1347 var s2=str.toLowerCase();
1348 if(s1==s2){
1349 return 0;
1350 }else if(s1>s2){
1351 return 1;
1352 }else{
1353 return-1;
1354 }
1355 }
1356 };
1357
1358 sp.contentEquals=function(sb){
1359 if(this.length!=sb.length()){
1360 return false;
1361 }
1362 var v=sb.getValue();
1363 var i=0;
1364 var j=0;
1365 var n=this.length;
1366 while(n--!=0){
1367 if(this.charCodeAt(i++)!=v[j++]){
1368 return false;
1369 }
1370 }
1371 return true;
1372 };
1373
1374 sp.getChars=function(srcBegin,srcEnd,dst,dstBegin){
1375 if(srcBegin<0){
1376 throw new StringIndexOutOfBoundsException(srcBegin);
1377 }
1378 if(srcEnd>this.length){
1379 throw new StringIndexOutOfBoundsException(srcEnd);
1380 }
1381 if(srcBegin>srcEnd){
1382 throw new StringIndexOutOfBoundsException(srcEnd-srcBegin);
1383 }
1384 if(dst==null){
1385 throw new NullPointerException();
1386 }
1387 for(var i=0;i<srcEnd-srcBegin;i++){
1388 dst[dstBegin+i]=this.charAt(srcBegin+i);
1389 }
1390 };
1391 sp.$concat=sp.concat;
1392 sp.concat=function(s){
1393 if(s==null){
1394 throw new NullPointerException();
1395 }
1396 return this.$concat(s);
1397 };
1398
1399 sp.$lastIndexOf=sp.lastIndexOf;
1400 sp.lastIndexOf=function(s,last){
1401 if(last!=null&&last+this.length<=0){
1402 return-1;
1403 }
1404 if(last!=null){
1405 return this.$lastIndexOf(s,last);
1406 }else{
1407 return this.$lastIndexOf(s);
1408 }
1409 };
1410
1411 sp.intern=function(){
1412 return this.valueOf();
1413 };
1414 String.copyValueOf=sp.copyValueOf=function(){
1415 if(arguments.length==1){
1416 return String.instantialize(arguments[0]);
1417 }else{
1418 return String.instantialize(arguments[0],arguments[1],arguments[2]);
1419 }
1420 };
1421
1422 sp.codePointAt || (sp.codePointAt = sp.charCodeAt); // Firefox only
1423
1424
1425 })(String.prototype);
1426
1427 /*
1428
1429 String.indexOf=function(source,sourceOffset,sourceCount,
1430 target,targetOffset,targetCount,fromIndex){
1431 if(fromIndex>=sourceCount){
1432 return(targetCount==0?sourceCount:-1);
1433 }
1434 if(fromIndex<0){
1435 fromIndex=0;
1436 }
1437 if(targetCount==0){
1438 return fromIndex;
1439 }
1440
1441 var first=target[targetOffset];
1442 var i=sourceOffset+fromIndex;
1443 var max=sourceOffset+(sourceCount-targetCount);
1444
1445 startSearchForFirstChar:
1446 while(true){
1447
1448 while(i<=max&&source[i]!=first){
1449 i++;
1450 }
1451 if(i>max){
1452 return-1;
1453 }
1454
1455
1456 var j=i+1;
1457 var end=j+targetCount-1;
1458 var k=targetOffset+1;
1459 while(j<end){
1460 if(source[j++]!=target[k++]){
1461 i++;
1462
1463 continue startSearchForFirstChar;
1464 }
1465 }
1466 return i-sourceOffset;
1467 }
1468 };
1469
1470
1471
1472 String.instantialize=function(){
1473 if(arguments.length==0){
1474 return new String();
1475 }else if(arguments.length==1){
1476 var x=arguments[0];
1477 if(typeof x=="string"||x instanceof String){
1478 return new String(x);
1479 }else if(x instanceof Array){
1480 if(x.length>0&&typeof x[0]=="number"){
1481 var arr=new Array(x.length);
1482 for(var i=0;i<x.length;i++){
1483 arr[i]=String.fromCharCode(x[i]&0xff);
1484 }
1485 return Encoding.readUTF8(arr.join(''));
1486 }
1487 return x.join('');
1488 }else if(x.__CLASS_NAME__=="StringBuffer"
1489 ||x.__CLASS_NAME__=="java.lang.StringBuffer"){
1490 var value=x.shareValue();
1491 var length=x.length();
1492 var valueCopy=new Array(length);
1493 for(var i=0;i<length;i++){
1494 valueCopy[i]=value[i];
1495 }
1496 return valueCopy.join('')
1497
1498 }else{
1499 return""+x;
1500 }
1501 }else if(arguments.length==2){
1502 var x=arguments[0];
1503 var hibyte=arguments[1];
1504 if(typeof hibyte=="string"){
1505 return String.instantialize(x,0,x.length,hibyte);
1506 }else{
1507 return String.instantialize(x,hibyte,0,x.length);
1508 }
1509 }else if(arguments.length==3){
1510 var bytes=arguments[0];
1511 var offset=arguments[1];
1512 var length=arguments[2];
1513 if(arguments[2]instanceof Array){
1514 bytes=arguments[2];
1515 offset=arguments[0];
1516 length=arguments[1];
1517 }
1518 var arr=new Array(length);
1519 if(offset<0||length+offset>bytes.length){
1520 throw new IndexOutOfBoundsException();
1521 }
1522 if(length>0){
1523 var isChar=(bytes[offset].length!=null);
1524 if(isChar){
1525 for(var i=0;i<length;i++){
1526 arr[i]=bytes[offset+i];
1527 }
1528 }else{
1529 for(var i=0;i<length;i++){
1530 arr[i]=String.fromCharCode(bytes[offset+i]);
1531 }
1532 }
1533 }
1534 return arr.join('');
1535 }else if(arguments.length==4){
1536 var bytes=arguments[0];
1537 var y=arguments[3];
1538 if(typeof y=="string"||y instanceof String){
1539 var offset=arguments[1];
1540 var length=arguments[2];
1541 var arr=new Array(length);
1542 for(var i=0;i<length;i++){
1543 arr[i]=bytes[offset+i];
1544 if(typeof arr[i]=="number"){
1545 arr[i]=String.fromCharCode(arr[i]&0xff);
1546 }
1547 }
1548 var cs=y.toLowerCase();
1549 if(cs=="utf-8"||cs=="utf8"){
1550 return Encoding.readUTF8(arr.join(''));
1551 }else{
1552 return arr.join('');
1553 }
1554 }else{
1555 var count=arguments[3];
1556 var offset=arguments[2];
1557 var hibyte=arguments[1];
1558 var value=new Array(count);
1559 if(hibyte==0){
1560 for(var i=count;i-->0;){
1561 value[i]=String.fromCharCode(bytes[i+offset]&0xff);
1562 }
1563 }else{
1564 hibyte<<=8;
1565 for(var i=count;i-->0;){
1566 value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff));
1567 }
1568 }
1569 return value.join('');
1570 }
1571 }else{
1572 var s="";
1573 for(var i=0;i<arguments.length;i++){
1574 s+=arguments[i];
1575 }
1576 return s;
1577 }
1578 };
1579
1580
1581 */
1582
1583
1584 String.instantialize=function(){
1585 switch (arguments.length) {
1586 case 0:
1587         return new String();
1588 case 1:
1589         var x=arguments[0];
1590         if(typeof x=="string"||x instanceof String){
1591                 return new String(x);
1592         }
1593         if(x instanceof Array || x instanceof Int32Array){
1594                 if(x.length == 0)
1595                         return "";
1596                 if(typeof x[0]!="number")
1597                         return x.join('');
1598                 var arr=new Array(x.length);
1599                 for(var i=0;i<x.length;i++)
1600                         arr[i]=String.fromCharCode(x[i]&0xff);
1601                 return Encoding.readUTF8(arr.join(''));
1602         }
1603         if(x.__CLASS_NAME__=="StringBuffer"||x.__CLASS_NAME__=="java.lang.StringBuffer"){
1604                 var value=x.shareValue();
1605                 var length=x.length();
1606                 var valueCopy=new Array(length);
1607                 for(var i=0;i<length;i++){
1608                         valueCopy[i]=value[i];
1609                 }
1610                 return valueCopy.join('')
1611         }
1612         return""+x;
1613 case 2: 
1614         var x=arguments[0];
1615         var hibyte=arguments[1];
1616         if(typeof hibyte=="string"){
1617                 return String.instantialize(x,0,x.length,hibyte);
1618         }
1619         return String.instantialize(x,hibyte,0,x.length);
1620 case 3:
1621         var bytes=arguments[0];
1622         var offset=arguments[1];
1623         var length=arguments[2];
1624         if(arguments[2]instanceof Array){
1625                 bytes=arguments[2];
1626                 offset=arguments[0];
1627                 length=arguments[1];
1628         }
1629         var arr=new Array(length);
1630         if(offset<0||length+offset>bytes.length){
1631                 throw new IndexOutOfBoundsException();
1632         }
1633         if(length>0){
1634                 var isChar=(bytes[offset].length!=null);
1635                 if(isChar){
1636                         for(var i=0;i<length;i++){
1637                                 arr[i]=bytes[offset+i];
1638                         }
1639                 }else{
1640                         for(var i=0;i<length;i++){
1641                                 arr[i]=String.fromCharCode(bytes[offset+i]);
1642                         }
1643                 }
1644         }
1645         return arr.join('');
1646 case 4:
1647         var bytes=arguments[0];
1648         var y=arguments[3];
1649         if(typeof y=="string"||y instanceof String){
1650                 var offset=arguments[1];
1651                 var length=arguments[2];
1652                 var arr=new Array(length);
1653                 for(var i=0;i<length;i++){
1654                         arr[i]=bytes[offset+i];
1655                         if(typeof arr[i]=="number"){
1656                                 arr[i]=String.fromCharCode(arr[i]&0xff);
1657                         }
1658                 }
1659                 var cs=y.toLowerCase();
1660                 if(cs=="utf-8"||cs=="utf8"){
1661                         return Encoding.readUTF8(arr.join(''));
1662                 }
1663                 return arr.join('');
1664         }
1665         var count=arguments[3];
1666         var offset=arguments[2];
1667         var hibyte=arguments[1];
1668         var value=new Array(count);
1669         if(hibyte==0){
1670                 for(var i=count;i-->0;){
1671                         value[i]=String.fromCharCode(bytes[i+offset]&0xff);
1672                 }
1673         }else{
1674                 hibyte<<=8;
1675                 for(var i=count;i-->0;){
1676                         value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff));
1677                 }
1678         }
1679         return value.join('');
1680 default:
1681         var s="";
1682         for(var i=0;i<arguments.length;i++){
1683                 s+=arguments[i];
1684         }
1685         return s;
1686 }
1687 };
1688
1689 if(navigator.userAgent.toLowerCase().indexOf("chrome")!=-1){
1690         String.prototype.toString=function(){return this.valueOf();};
1691 }
1692
1693 }
1694
1695 })(Clazz._Encoding);
1696
1697
1698
1699 c$=Clazz_decorateAsClass(function(){
1700 this.value=0;
1701 Clazz_instantialize(this,arguments);
1702 },java.lang,"Character",null,[java.io.Serializable,Comparable]);
1703 Clazz_makeConstructor(c$,
1704 function(value){
1705 this.value=value;
1706 },"~N");
1707 Clazz_defineMethod(c$,"charValue",
1708 function(){
1709 return this.value;
1710 });
1711 Clazz_overrideMethod(c$,"hashCode",
1712 function(){
1713 return(this.value).charCodeAt(0);
1714 });
1715 Clazz_overrideMethod(c$,"equals",
1716 function(obj){
1717 if(Clazz_instanceOf(obj,Character)){
1718 return(this.value).charCodeAt(0)==((obj).charValue()).charCodeAt(0);
1719 }return false;
1720 },"~O");
1721 Clazz_overrideMethod(c$,"compareTo",
1722 function(c){
1723 return(this.value).charCodeAt(0)-(c.value).charCodeAt(0);
1724 },"Character");
1725 c$.toLowerCase=Clazz_defineMethod(c$,"toLowerCase",
1726 function(c){
1727 return(""+c).toLowerCase().charAt(0);
1728 },"~N");
1729 c$.toUpperCase=Clazz_defineMethod(c$,"toUpperCase",
1730 function(c){
1731 return(""+c).toUpperCase().charAt(0);
1732 },"~N");
1733 c$.isDigit=Clazz_defineMethod(c$,"isDigit",
1734 function(c){
1735 c = c.charCodeAt(0);
1736 return (48 <= c && c <= 57);
1737 },"~N");
1738 c$.isUpperCase=Clazz_defineMethod(c$,"isUpperCase",
1739 function(c){
1740 c = c.charCodeAt(0);
1741 return (65 <= c && c <= 90);
1742 },"~N");
1743 c$.isLowerCase=Clazz_defineMethod(c$,"isLowerCase",
1744 function(c){
1745 c = c.charCodeAt(0);
1746 return (97 <= c && c <= 122);
1747 },"~N");
1748 c$.isWhitespace=Clazz_defineMethod(c$,"isWhitespace",
1749 function(c){
1750 c = (c).charCodeAt(0);
1751 return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd || c == 0x1680
1752         || c >= 0x2000 && c != 0x2007 && (c <= 0x200b || c == 0x2028 || c == 0x2029 || c == 0x3000));
1753 },"~N");
1754 c$.isLetter=Clazz_defineMethod(c$,"isLetter",
1755 function(c){
1756 c = c.charCodeAt(0);
1757 return (65 <= c && c <= 90 || 97 <= c && c <= 122);
1758 },"~N");
1759 c$.isLetterOrDigit=Clazz_defineMethod(c$,"isLetterOrDigit",
1760 function(c){
1761 c = c.charCodeAt(0);
1762 return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57);
1763 },"~N");
1764 c$.isSpaceChar=Clazz_defineMethod(c$,"isSpaceChar",
1765 function(c){
1766  var i = c.charCodeAt(0);
1767 if(i==0x20||i==0xa0||i==0x1680)return true;
1768 if(i<0x2000)return false;
1769 return i<=0x200b||i==0x2028||i==0x2029||i==0x202f||i==0x3000;
1770 },"~N");
1771 c$.digit=Clazz_defineMethod(c$,"digit",
1772 function(c,radix){
1773 var i = c.charCodeAt(0);
1774 if(radix >= 2 && radix <= 36){
1775         if(i < 128){
1776                 var result = -1;
1777                 if(48 <= i && i <= 57){
1778                 result = i - 48;
1779                 }else if(97 <= i && i <= 122){
1780                 result = i - 87;
1781                 }else if(65 <= i && i <= 90){
1782                 result=i-(55);
1783                 }
1784                 return (result < radix ? result : -1);
1785         }
1786 }
1787 return -1;
1788 },"~N,~N");
1789 Clazz_overrideMethod(c$,"toString",
1790 function(){
1791 var buf=[this.value];
1792 return String.valueOf(buf);
1793 });
1794 c$.toString=Clazz_overrideMethod(c$,"toString",
1795 function(c){
1796 {
1797 if(this===Character){
1798 return"class java.lang.Character";
1799 }
1800 }return String.valueOf(c);
1801 },"~N");
1802 Clazz_defineStatics(c$,
1803 "MIN_VALUE",'\u0000',
1804 "MAX_VALUE",'\uffff',
1805 "MIN_RADIX",2,
1806 "MAX_RADIX",36,
1807 "TYPE",null);
1808
1809 java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character;
1810
1811
1812
1813 Clazz._ArrayWrapper = function(a, type) {
1814  return {
1815    a: a,
1816    __CLASS_NAME__:"Array",
1817    superClazz: Array,
1818    getComponentType: function() {return type},
1819    instanceOf: function(o) { return  Clazz_instanceOf(type, o) },
1820    getName: function() { return this.__CLASS_NAME__ }
1821  };
1822 }
1823 c$=Clazz_declareType(java.lang.reflect,"Array");
1824 c$.newInstance=Clazz_defineMethod(c$,"newInstance",
1825 function(componentType,size){
1826 var a = Clazz_newArray(size);
1827  a.getClass = function() { return new Clazz._ArrayWrapper(this, componentType);};
1828 return a;
1829 },"Class,~N");
1830
1831 javautil.Date=Date;
1832 Date.TYPE="javautil.Date";
1833 Date.__CLASS_NAME__="Date";
1834 Clazz_implementOf(Date,[java.io.Serializable,java.lang.Comparable]);
1835
1836 Clazz_defineMethod(javautil.Date,"clone",
1837 function(){
1838 return new Date(this.getTime());
1839 });
1840
1841 Clazz_defineMethod(javautil.Date,"before",
1842 function(when){
1843 return this.getTime()<when.getTime();
1844 },"javautil.Date");
1845 Clazz_defineMethod(javautil.Date,"after",
1846 function(when){
1847 return this.getTime()>when.getTime();
1848 },"javautil.Date");
1849 Clazz_defineMethod(javautil.Date,"equals",
1850 function(obj){
1851 return Clazz_instanceOf(obj,javautil.Date)&&this.getTime()==(obj).getTime();
1852 },"Object");
1853 Clazz_defineMethod(javautil.Date,"compareTo",
1854 function(anotherDate){
1855 var thisTime=this.getTime();
1856 var anotherTime=anotherDate.getTime();
1857 return(thisTime<anotherTime?-1:(thisTime==anotherTime?0:1));
1858 },"javautil.Date");
1859 Clazz_defineMethod(javautil.Date,"compareTo",
1860 function(o){
1861 return this.compareTo(o);
1862 },"Object");
1863 Clazz_overrideMethod(javautil.Date,"hashCode",
1864 function(){
1865 var ht=this.getTime();
1866 return parseInt(ht)^parseInt((ht>>32));
1867 });
1868
1869 c$=Clazz_decorateAsClass(function(){
1870 this.source=null;
1871 Clazz_instantialize(this,arguments);
1872 },javautil,"EventObject",null,java.io.Serializable);
1873 Clazz_makeConstructor(c$,
1874 function(source){
1875 if(source!=null)this.source=source;
1876 else throw new IllegalArgumentException();
1877 },"~O");
1878 Clazz_defineMethod(c$,"getSource",
1879 function(){
1880 return this.source;
1881 });
1882 Clazz_overrideMethod(c$,"toString",
1883 function(){
1884 return this.getClass().getName()+"[source="+String.valueOf(this.source)+']';
1885 });
1886 Clazz_declareInterface(javautil,"EventListener");
1887
1888 c$=Clazz_decorateAsClass(function(){
1889 this.listener=null;
1890 Clazz_instantialize(this,arguments);
1891 },javautil,"EventListenerProxy",null,javautil.EventListener);
1892 Clazz_makeConstructor(c$,
1893 function(listener){
1894 this.listener=listener;
1895 },"javautil.EventListener");
1896 Clazz_defineMethod(c$,"getListener",
1897 function(){
1898 return this.listener;
1899 });
1900 Clazz_declareInterface(javautil,"Iterator");
1901
1902 Clazz_declareInterface(javautil,"ListIterator",javautil.Iterator);
1903 Clazz_declareInterface(javautil,"Enumeration");
1904 Clazz_declareInterface(javautil,"Collection",Iterable);
1905
1906 Clazz_declareInterface(javautil,"Set",javautil.Collection);
1907 Clazz_declareInterface(javautil,"Map");
1908 Clazz_declareInterface(javautil.Map,"Entry");
1909
1910 Clazz_declareInterface(javautil,"List",javautil.Collection);
1911
1912 Clazz_declareInterface(javautil,"Queue",javautil.Collection);
1913 Clazz_declareInterface(javautil,"RandomAccess");
1914 c$=Clazz_decorateAsClass(function(){
1915 this.detailMessage=null;
1916 this.cause=null;
1917 this.stackTrace=null;
1918 Clazz_instantialize(this,arguments);
1919 },java.lang,"Throwable",null,java.io.Serializable);
1920 Clazz_prepareFields(c$,function(){
1921 this.cause=this;
1922 //alert("e0 "+ arguments.callee.caller.caller.caller.caller.caller)
1923 });
1924 Clazz_makeConstructor(c$,
1925 function(){
1926 this.fillInStackTrace();
1927 });
1928 Clazz_makeConstructor(c$,
1929 function(message){
1930 this.fillInStackTrace();
1931 this.detailMessage=message;
1932 },"~S");
1933 Clazz_makeConstructor(c$,
1934 function(message,cause){
1935 this.fillInStackTrace();
1936 this.detailMessage=message;
1937 this.cause=cause;
1938 },"~S,Throwable");
1939 Clazz_makeConstructor(c$,
1940 function(cause){
1941 this.fillInStackTrace();
1942 this.detailMessage=(cause==null?null:cause.toString());
1943 this.cause=cause;
1944 },"Throwable");
1945 Clazz_defineMethod(c$,"getMessage",
1946 function(){
1947 return (this.message || this.detailMessage || this.toString());
1948 });
1949 Clazz_defineMethod(c$,"getLocalizedMessage",
1950 function(){
1951 return this.getMessage();
1952 });
1953 Clazz_defineMethod(c$,"getCause",
1954 function(){
1955 return(this.cause===this?null:this.cause);
1956 });
1957 Clazz_defineMethod(c$,"initCause",
1958 function(cause){
1959 if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");
1960 if(cause===this)throw new IllegalArgumentException("Self-causation not permitted");
1961 this.cause=cause;
1962 return this;
1963 },"Throwable");
1964 Clazz_overrideMethod(c$,"toString",
1965 function(){
1966 var s=this.getClass().getName();
1967 var message=this.message || this.detailMessage;
1968 return(message ? s+": "+message : s);
1969 });
1970 Clazz_defineMethod(c$,"printStackTrace",
1971 function(){
1972 System.err.println(this.getStackTrace ? this.getStackTrace() : this.message + " " + Clazz_getStackTrace());
1973 });
1974
1975 Clazz_defineMethod(c$,"getStackTrace",
1976 function(){
1977 var s = "" + this + "\n";
1978 for(var i=0;i<this.stackTrace.length;i++){
1979  var t=this.stackTrace[i];
1980         var x=t.methodName.indexOf("(");
1981         var n=t.methodName.substring(0,x).replace(/\s+/g,"");
1982         if(n!="construct"||t.nativeClazz==null
1983                  ||Clazz_getInheritedLevel(t.nativeClazz,Throwable)<0){
1984                                 s += t + "\n";
1985         }
1986 }
1987 return s;
1988 });
1989
1990
1991 Clazz_defineMethod(c$,"printStackTrace",
1992 function(s){
1993 this.printStackTrace();
1994 },"java.io.PrintStream");
1995 Clazz_defineMethod(c$,"printStackTrace",
1996 function(s){
1997 this.printStackTrace();
1998 },"java.io.PrintWriter");
1999 Clazz_defineMethod(c$,"fillInStackTrace",
2000 function(){
2001 this.stackTrace=new Array();
2002 var caller=arguments.callee.caller;
2003 var superCaller=null;
2004 var callerList=new Array();
2005 var index=Clazz._callingStackTraces.length-1;
2006 var noLooping=true;
2007 while(index>-1||caller!=null){
2008 var clazzName=null;
2009 var nativeClass=null;
2010 if(!noLooping||caller==Clazz_tryToSearchAndExecute||caller==Clazz_superCall||caller==null){
2011 if(index<0){
2012 break;
2013 }
2014 noLooping=true;
2015 superCaller=Clazz._callingStackTraces[index].caller;
2016 nativeClass=Clazz._callingStackTraces[index].owner;
2017 index--;
2018 }else{
2019 superCaller=caller;
2020 if(superCaller.claxxOwner!=null){
2021 nativeClass=superCaller.claxxOwner;
2022 }else if(superCaller.exClazz!=null){
2023 nativeClass=superCaller.exClazz;
2024 }
2025 }
2026 var st=new StackTraceElement(
2027 ((nativeClass!=null&&nativeClass.__CLASS_NAME__.length!=0)?
2028 nativeClass.__CLASS_NAME__:"anonymous"),
2029 ((superCaller.exName==null)?"anonymous":superCaller.exName)
2030 +" ("+Clazz_getParamsType(superCaller.arguments)+")",
2031 null,-1);
2032 st.nativeClazz=nativeClass;
2033 this.stackTrace[this.stackTrace.length]=st;
2034 for(var i=0;i<callerList.length;i++){
2035 if(callerList[i]==superCaller){
2036
2037 var st=new StackTraceElement("lost","missing",null,-3);
2038 st.nativeClazz=null;
2039 this.stackTrace[this.stackTrace.length]=st;
2040 noLooping=false;
2041
2042 }
2043 }
2044 if(superCaller!=null){
2045 callerList[callerList.length]=superCaller;
2046 }
2047 caller=superCaller.arguments.callee.caller;
2048 }
2049 Clazz._initializingException=false;
2050 return this;
2051 });
2052 Clazz_defineMethod(c$,"setStackTrace",
2053 function(stackTrace){
2054 var defensiveCopy=stackTrace.clone();
2055 for(var i=0;i<defensiveCopy.length;i++)if(defensiveCopy[i]==null)throw new NullPointerException("stackTrace["+i+"]");
2056
2057 this.stackTrace=defensiveCopy;
2058 },"~A");
2059
2060 c$=Clazz_decorateAsClass(function(){
2061 this.declaringClass=null;
2062 this.methodName=null;
2063 this.fileName=null;
2064 this.lineNumber=0;
2065 Clazz_instantialize(this,arguments);
2066 },java.lang,"StackTraceElement",null,java.io.Serializable);
2067 Clazz_makeConstructor(c$,
2068 function(cls,method,file,line){
2069 if(cls==null||method==null){
2070 throw new NullPointerException();
2071 }this.declaringClass=cls;
2072 this.methodName=method;
2073 this.fileName=file;
2074 this.lineNumber=line;
2075 },"~S,~S,~S,~N");
2076 Clazz_overrideMethod(c$,"equals",
2077 function(obj){
2078 if(!(Clazz_instanceOf(obj,StackTraceElement))){
2079 return false;
2080 }var castObj=obj;
2081 if((this.methodName==null)||(castObj.methodName==null)){
2082 return false;
2083 }if(!this.getMethodName().equals(castObj.getMethodName())){
2084 return false;
2085 }if(!this.getClassName().equals(castObj.getClassName())){
2086 return false;
2087 }var localFileName=this.getFileName();
2088 if(localFileName==null){
2089 if(castObj.getFileName()!=null){
2090 return false;
2091 }}else{
2092 if(!localFileName.equals(castObj.getFileName())){
2093 return false;
2094 }}if(this.getLineNumber()!=castObj.getLineNumber()){
2095 return false;
2096 }return true;
2097 },"~O");
2098 Clazz_defineMethod(c$,"getClassName",
2099 function(){
2100 return(this.declaringClass==null)?"<unknown class>":this.declaringClass;
2101 });
2102 Clazz_defineMethod(c$,"getFileName",
2103 function(){
2104 return this.fileName;
2105 });
2106 Clazz_defineMethod(c$,"getLineNumber",
2107 function(){
2108 return this.lineNumber;
2109 });
2110 Clazz_defineMethod(c$,"getMethodName",
2111 function(){
2112 return(this.methodName==null)?"<unknown method>":this.methodName;
2113 });
2114 Clazz_overrideMethod(c$,"hashCode",
2115 function(){
2116 if(this.methodName==null){
2117 return 0;
2118 }return this.methodName.hashCode()^this.declaringClass.hashCode();
2119 });
2120 Clazz_defineMethod(c$,"isNativeMethod",
2121 function(){
2122 return this.lineNumber==-2;
2123 });
2124 Clazz_overrideMethod(c$,"toString",
2125 function(){
2126 var buf=new StringBuilder(80);
2127 buf.append(this.getClassName());
2128 buf.append('.');
2129 buf.append(this.getMethodName());
2130 if(this.isNativeMethod()){
2131 buf.append("(Native Method)");
2132 }else{
2133 var fName=this.getFileName();
2134 if(fName==null){
2135 buf.append("(Unknown Source)");
2136 }else{
2137 var lineNum=this.getLineNumber();
2138 buf.append('(');
2139 buf.append(fName);
2140 if(lineNum>=0){
2141 buf.append(':');
2142 buf.append(lineNum);
2143 }buf.append(')');
2144 }}return buf.toString();
2145 });
2146 TypeError.prototype.getMessage || (TypeError.prototype.getMessage = function(){ return (this.message || this.toString()) + (this.getStackTrace ? this.getStackTrace() : Clazz_getStackTrace())});
2147 c$=Clazz_declareType(java.lang,"Error",Throwable);
2148
2149 c$=Clazz_declareType(java.lang,"LinkageError",Error);
2150
2151 c$=Clazz_declareType(java.lang,"IncompatibleClassChangeError",LinkageError);
2152
2153 c$=Clazz_declareType(java.lang,"AbstractMethodError",IncompatibleClassChangeError);
2154
2155 c$=Clazz_declareType(java.lang,"AssertionError",Error);
2156 Clazz_makeConstructor(c$,
2157 function(detailMessage){
2158 Clazz_superConstructor(this,AssertionError,[String.valueOf(detailMessage),(Clazz_instanceOf(detailMessage,Throwable)?detailMessage:null)]);
2159 },"~O");
2160 Clazz_makeConstructor(c$,
2161 function(detailMessage){
2162 this.construct("" + detailMessage);
2163 },"~B");
2164 Clazz_makeConstructor(c$,
2165 function(detailMessage){
2166 this.construct("" + detailMessage);
2167 },"~N");
2168
2169 c$=Clazz_declareType(java.lang,"ClassCircularityError",LinkageError);
2170
2171 c$=Clazz_declareType(java.lang,"ClassFormatError",LinkageError);
2172
2173 c$=Clazz_decorateAsClass(function(){
2174 this.exception=null;
2175 Clazz_instantialize(this,arguments);
2176 },java.lang,"ExceptionInInitializerError",LinkageError);
2177 Clazz_makeConstructor(c$,
2178 function(){
2179 Clazz_superConstructor(this,ExceptionInInitializerError);
2180 this.initCause(null);
2181 });
2182 Clazz_makeConstructor(c$,
2183 function(detailMessage){
2184 Clazz_superConstructor(this,ExceptionInInitializerError,[detailMessage]);
2185 this.initCause(null);
2186 },"~S");
2187 Clazz_makeConstructor(c$,
2188 function(exception){
2189 Clazz_superConstructor(this,ExceptionInInitializerError);
2190 this.exception=exception;
2191 this.initCause(exception);
2192 },"Throwable");
2193 Clazz_defineMethod(c$,"getException",
2194 function(){
2195 return this.exception;
2196 });
2197 Clazz_overrideMethod(c$,"getCause",
2198 function(){
2199 return this.exception;
2200 });
2201
2202 c$=Clazz_declareType(java.lang,"IllegalAccessError",IncompatibleClassChangeError);
2203
2204 c$=Clazz_declareType(java.lang,"InstantiationError",IncompatibleClassChangeError);
2205
2206 c$=Clazz_declareType(java.lang,"VirtualMachineError",Error);
2207
2208 c$=Clazz_declareType(java.lang,"InternalError",VirtualMachineError);
2209
2210 c$=Clazz_declareType(java.lang,"NoClassDefFoundError",LinkageError);
2211
2212 c$=Clazz_declareType(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);
2213
2214 c$=Clazz_declareType(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);
2215
2216 c$=Clazz_declareType(java.lang,"OutOfMemoryError",VirtualMachineError);
2217
2218 c$=Clazz_declareType(java.lang,"StackOverflowError",VirtualMachineError);
2219
2220 c$=Clazz_declareType(java.lang,"UnknownError",VirtualMachineError);
2221
2222 c$=Clazz_declareType(java.lang,"UnsatisfiedLinkError",LinkageError);
2223
2224 c$=Clazz_declareType(java.lang,"UnsupportedClassVersionError",ClassFormatError);
2225
2226 c$=Clazz_declareType(java.lang,"VerifyError",LinkageError);
2227
2228 c$=Clazz_declareType(java.lang,"ThreadDeath",Error);
2229 Clazz_makeConstructor(c$,
2230 function(){
2231 Clazz_superConstructor(this,ThreadDeath,[]);
2232 });
2233
2234 c$=Clazz_declareType(java.lang,"Exception",Throwable);
2235
2236 c$=Clazz_declareType(java.lang,"RuntimeException",Exception);
2237
2238 c$=Clazz_declareType(java.lang,"ArithmeticException",RuntimeException);
2239
2240 c$=Clazz_declareType(java.lang,"IndexOutOfBoundsException",RuntimeException);
2241
2242 c$=Clazz_declareType(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);
2243 Clazz_makeConstructor(c$,
2244 function(index){
2245 Clazz_superConstructor(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+index]);
2246 },"~N");
2247
2248 c$=Clazz_declareType(java.lang,"ArrayStoreException",RuntimeException);
2249
2250 c$=Clazz_declareType(java.lang,"ClassCastException",RuntimeException);
2251
2252 c$=Clazz_decorateAsClass(function(){
2253 this.ex=null;
2254 Clazz_instantialize(this,arguments);
2255 },java.lang,"ClassNotFoundException",Exception);
2256 Clazz_makeConstructor(c$,
2257 function(){
2258 Clazz_superConstructor(this,ClassNotFoundException,[Clazz_castNullAs("Throwable")]);
2259 });
2260 Clazz_makeConstructor(c$,
2261 function(detailMessage){
2262 Clazz_superConstructor(this,ClassNotFoundException,[detailMessage,null]);
2263 },"~S");
2264 Clazz_makeConstructor(c$,
2265 function(detailMessage,exception){
2266 Clazz_superConstructor(this,ClassNotFoundException,[detailMessage]);
2267 this.ex=exception;
2268 },"~S,Throwable");
2269 Clazz_defineMethod(c$,"getException",
2270 function(){
2271 return this.ex;
2272 });
2273 Clazz_overrideMethod(c$,"getCause",
2274 function(){
2275 return this.ex;
2276 });
2277
2278 c$=Clazz_declareType(java.lang,"CloneNotSupportedException",Exception);
2279
2280 c$=Clazz_declareType(java.lang,"IllegalAccessException",Exception);
2281
2282 c$=Clazz_declareType(java.lang,"IllegalArgumentException",RuntimeException);
2283 Clazz_makeConstructor(c$,
2284 function(cause){
2285 Clazz_superConstructor(this,IllegalArgumentException,[(cause==null?null:cause.toString()),cause]);
2286 },"Throwable");
2287
2288 c$=Clazz_declareType(java.lang,"IllegalMonitorStateException",RuntimeException);
2289
2290 c$=Clazz_declareType(java.lang,"IllegalStateException",RuntimeException);
2291 Clazz_makeConstructor(c$,
2292 function(cause){
2293 Clazz_superConstructor(this,IllegalStateException,[(cause==null?null:cause.toString()),cause]);
2294 },"Throwable");
2295
2296 c$=Clazz_declareType(java.lang,"IllegalThreadStateException",IllegalArgumentException);
2297
2298 c$=Clazz_declareType(java.lang,"InstantiationException",Exception);
2299
2300 c$=Clazz_declareType(java.lang,"InterruptedException",Exception);
2301
2302 c$=Clazz_declareType(java.lang,"NegativeArraySizeException",RuntimeException);
2303
2304 c$=Clazz_declareType(java.lang,"NoSuchFieldException",Exception);
2305
2306 c$=Clazz_declareType(java.lang,"NoSuchMethodException",Exception);
2307
2308 c$=Clazz_declareType(java.lang,"NullPointerException",RuntimeException);
2309
2310 c$=Clazz_declareType(java.lang,"NumberFormatException",IllegalArgumentException);
2311
2312 c$=Clazz_declareType(java.lang,"SecurityException",RuntimeException);
2313 Clazz_makeConstructor(c$,
2314 function(cause){
2315 Clazz_superConstructor(this,SecurityException,[(cause==null?null:cause.toString()),cause]);
2316 },"Throwable");
2317
2318 c$=Clazz_declareType(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);
2319 Clazz_makeConstructor(c$,
2320 function(index){
2321 Clazz_superConstructor(this,StringIndexOutOfBoundsException,["String index out of range: "+index]);
2322 },"~N");
2323
2324 c$=Clazz_declareType(java.lang,"UnsupportedOperationException",RuntimeException);
2325 Clazz_makeConstructor(c$,
2326 function(){
2327 Clazz_superConstructor(this,UnsupportedOperationException,[]);
2328 });
2329 Clazz_makeConstructor(c$,
2330 function(cause){
2331 Clazz_superConstructor(this,UnsupportedOperationException,[(cause==null?null:cause.toString()),cause]);
2332 },"Throwable");
2333
2334 c$=Clazz_decorateAsClass(function(){
2335 this.target=null;
2336 Clazz_instantialize(this,arguments);
2337 },java.lang.reflect,"InvocationTargetException",Exception);
2338 Clazz_makeConstructor(c$,
2339 function(){
2340 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[Clazz_castNullAs("Throwable")]);
2341 });
2342 Clazz_makeConstructor(c$,
2343 function(exception){
2344 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[null,exception]);
2345 this.target=exception;
2346 },"Throwable");
2347 Clazz_makeConstructor(c$,
2348 function(exception,detailMessage){
2349 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[detailMessage,exception]);
2350 this.target=exception;
2351 },"Throwable,~S");
2352 Clazz_defineMethod(c$,"getTargetException",
2353 function(){
2354 return this.target;
2355 });
2356 Clazz_overrideMethod(c$,"getCause",
2357 function(){
2358 return this.target;
2359 });
2360
2361 c$=Clazz_decorateAsClass(function(){
2362 this.undeclaredThrowable=null;
2363 Clazz_instantialize(this,arguments);
2364 },java.lang.reflect,"UndeclaredThrowableException",RuntimeException);
2365 Clazz_makeConstructor(c$,
2366 function(exception){
2367 Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException);
2368 this.undeclaredThrowable=exception;
2369 this.initCause(exception);
2370 },"Throwable");
2371 Clazz_makeConstructor(c$,
2372 function(exception,detailMessage){
2373 Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException,[detailMessage]);
2374 this.undeclaredThrowable=exception;
2375 this.initCause(exception);
2376 },"Throwable,~S");
2377 Clazz_defineMethod(c$,"getUndeclaredThrowable",
2378 function(){
2379 return this.undeclaredThrowable;
2380 });
2381 Clazz_overrideMethod(c$,"getCause",
2382 function(){
2383 return this.undeclaredThrowable;
2384 });
2385
2386 c$=Clazz_declareType(java.io,"IOException",Exception);
2387
2388
2389 c$=Clazz_declareType(java.io,"CharConversionException",java.io.IOException);
2390
2391 c$=Clazz_declareType(java.io,"EOFException",java.io.IOException);
2392
2393 c$=Clazz_declareType(java.io,"FileNotFoundException",java.io.IOException);
2394
2395 c$=Clazz_decorateAsClass(function(){
2396 this.bytesTransferred=0;
2397 Clazz_instantialize(this,arguments);
2398 },java.io,"InterruptedIOException",java.io.IOException);
2399
2400 c$=Clazz_declareType(java.io,"ObjectStreamException",java.io.IOException);
2401
2402 c$=Clazz_decorateAsClass(function(){
2403 this.classname=null;
2404 Clazz_instantialize(this,arguments);
2405 },java.io,"InvalidClassException",java.io.ObjectStreamException);
2406 Clazz_makeConstructor(c$,
2407 function(className,detailMessage){
2408 Clazz_superConstructor(this,java.io.InvalidClassException,[detailMessage]);
2409 this.classname=className;
2410 },"~S,~S");
2411 Clazz_defineMethod(c$,"getMessage",
2412 function(){
2413 var msg=Clazz_superCall(this,java.io.InvalidClassException,"getMessage",[]);
2414 if(this.classname!=null){
2415 msg=this.classname+';' + ' '+msg;
2416 }return msg;
2417 });
2418
2419 c$=Clazz_declareType(java.io,"InvalidObjectException",java.io.ObjectStreamException);
2420
2421 c$=Clazz_declareType(java.io,"NotActiveException",java.io.ObjectStreamException);
2422
2423 c$=Clazz_declareType(java.io,"NotSerializableException",java.io.ObjectStreamException);
2424
2425 c$=Clazz_decorateAsClass(function(){
2426 this.eof=false;
2427 this.length=0;
2428 Clazz_instantialize(this,arguments);
2429 },java.io,"OptionalDataException",java.io.ObjectStreamException);
2430
2431 c$=Clazz_declareType(java.io,"StreamCorruptedException",java.io.ObjectStreamException);
2432
2433 c$=Clazz_declareType(java.io,"SyncFailedException",java.io.IOException);
2434
2435 c$=Clazz_declareType(java.io,"UnsupportedEncodingException",java.io.IOException);
2436
2437 c$=Clazz_declareType(java.io,"UTFDataFormatException",java.io.IOException);
2438
2439 c$=Clazz_decorateAsClass(function(){
2440 this.detail=null;
2441 Clazz_instantialize(this,arguments);
2442 },java.io,"WriteAbortedException",java.io.ObjectStreamException);
2443 Clazz_makeConstructor(c$,
2444 function(detailMessage,rootCause){
2445 Clazz_superConstructor(this,java.io.WriteAbortedException,[detailMessage]);
2446 this.detail=rootCause;
2447 this.initCause(rootCause);
2448 },"~S,Exception");
2449 Clazz_defineMethod(c$,"getMessage",
2450 function(){
2451 var msg=Clazz_superCall(this,java.io.WriteAbortedException,"getMessage",[]);
2452 return (this.detail ? msg + "; "+this.detail.toString() : msg);
2453 });
2454 Clazz_overrideMethod(c$,"getCause",
2455 function(){
2456 return this.detail;
2457 });
2458
2459 c$=Clazz_declareType(javautil,"ConcurrentModificationException",RuntimeException);
2460 Clazz_makeConstructor(c$,
2461 function(){
2462 Clazz_superConstructor(this,javautil.ConcurrentModificationException,[]);
2463 });
2464
2465 c$=Clazz_declareType(javautil,"EmptyStackException",RuntimeException);
2466
2467 c$=Clazz_decorateAsClass(function(){
2468 this.className=null;
2469 this.key=null;
2470 Clazz_instantialize(this,arguments);
2471 },javautil,"MissingResourceException",RuntimeException);
2472 Clazz_makeConstructor(c$,
2473 function(detailMessage,className,resourceName){
2474 Clazz_superConstructor(this,javautil.MissingResourceException,[detailMessage]);
2475 this.className=className;
2476 this.key=resourceName;
2477 },"~S,~S,~S");
2478 Clazz_defineMethod(c$,"getClassName",
2479 function(){
2480 return this.className;
2481 });
2482 Clazz_defineMethod(c$,"getKey",
2483 function(){
2484 return this.key;
2485 });
2486
2487 c$=Clazz_declareType(javautil,"NoSuchElementException",RuntimeException);
2488
2489 c$=Clazz_declareType(javautil,"TooManyListenersException",Exception);
2490
2491 c$=Clazz_declareType(java.lang,"Void");
2492 Clazz_defineStatics(c$,
2493 "TYPE",null);
2494 {
2495 java.lang.Void.TYPE=java.lang.Void;
2496 }Clazz_declareInterface(java.lang.reflect,"GenericDeclaration");
2497 Clazz_declareInterface(java.lang.reflect,"AnnotatedElement");
2498
2499 c$=Clazz_declareType(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);
2500 Clazz_makeConstructor(c$,
2501 function(){
2502 });
2503 Clazz_defineMethod(c$,"isAccessible",
2504 function(){
2505 return false;
2506 });
2507 c$.setAccessible=Clazz_defineMethod(c$,"setAccessible",
2508 function(objects,flag){
2509 return;
2510 },"~A,~B");
2511 Clazz_defineMethod(c$,"setAccessible",
2512 function(flag){
2513 return;
2514 },"~B");
2515 Clazz_overrideMethod(c$,"isAnnotationPresent",
2516 function(annotationType){
2517 return false;
2518 },"Class");
2519 Clazz_overrideMethod(c$,"getDeclaredAnnotations",
2520 function(){
2521 return new Array(0);
2522 });
2523 Clazz_overrideMethod(c$,"getAnnotations",
2524 function(){
2525 return new Array(0);
2526 });
2527 Clazz_overrideMethod(c$,"getAnnotation",
2528 function(annotationType){
2529 return null;
2530 },"Class");
2531 c$.marshallArguments=Clazz_defineMethod(c$,"marshallArguments",
2532 function(parameterTypes,args){
2533 return null;
2534 },"~A,~A");
2535 Clazz_defineMethod(c$,"invokeV",
2536 function(receiver,args){
2537 return;
2538 },"~O,~A");
2539 Clazz_defineMethod(c$,"invokeL",
2540 function(receiver,args){
2541 return null;
2542 },"~O,~A");
2543 Clazz_defineMethod(c$,"invokeI",
2544 function(receiver,args){
2545 return 0;
2546 },"~O,~A");
2547 Clazz_defineMethod(c$,"invokeJ",
2548 function(receiver,args){
2549 return 0;
2550 },"~O,~A");
2551 Clazz_defineMethod(c$,"invokeF",
2552 function(receiver,args){
2553 return 0.0;
2554 },"~O,~A");
2555 Clazz_defineMethod(c$,"invokeD",
2556 function(receiver,args){
2557 return 0.0;
2558 },"~O,~A");
2559 c$.emptyArgs=c$.prototype.emptyArgs=new Array(0);
2560 Clazz_declareInterface(java.lang.reflect,"InvocationHandler");
2561 c$=Clazz_declareInterface(java.lang.reflect,"Member");
2562 Clazz_defineStatics(c$,
2563 "PUBLIC",0,
2564 "DECLARED",1);
2565
2566 c$=Clazz_declareType(java.lang.reflect,"Modifier");
2567 Clazz_makeConstructor(c$,
2568 function(){
2569 });
2570 c$.isAbstract=Clazz_defineMethod(c$,"isAbstract",
2571 function(modifiers){
2572 return((modifiers&1024)!=0);
2573 },"~N");
2574 c$.isFinal=Clazz_defineMethod(c$,"isFinal",
2575 function(modifiers){
2576 return((modifiers&16)!=0);
2577 },"~N");
2578 c$.isInterface=Clazz_defineMethod(c$,"isInterface",
2579 function(modifiers){
2580 return((modifiers&512)!=0);
2581 },"~N");
2582 c$.isNative=Clazz_defineMethod(c$,"isNative",
2583 function(modifiers){
2584 return((modifiers&256)!=0);
2585 },"~N");
2586 c$.isPrivate=Clazz_defineMethod(c$,"isPrivate",
2587 function(modifiers){
2588 return((modifiers&2)!=0);
2589 },"~N");
2590 c$.isProtected=Clazz_defineMethod(c$,"isProtected",
2591 function(modifiers){
2592 return((modifiers&4)!=0);
2593 },"~N");
2594 c$.isPublic=Clazz_defineMethod(c$,"isPublic",
2595 function(modifiers){
2596 return((modifiers&1)!=0);
2597 },"~N");
2598 c$.isStatic=Clazz_defineMethod(c$,"isStatic",
2599 function(modifiers){
2600 return((modifiers&8)!=0);
2601 },"~N");
2602 c$.isStrict=Clazz_defineMethod(c$,"isStrict",
2603 function(modifiers){
2604 return((modifiers&2048)!=0);
2605 },"~N");
2606 c$.isSynchronized=Clazz_defineMethod(c$,"isSynchronized",
2607 function(modifiers){
2608 return((modifiers&32)!=0);
2609 },"~N");
2610 c$.isTransient=Clazz_defineMethod(c$,"isTransient",
2611 function(modifiers){
2612 return((modifiers&128)!=0);
2613 },"~N");
2614 c$.isVolatile=Clazz_defineMethod(c$,"isVolatile",
2615 function(modifiers){
2616 return((modifiers&64)!=0);
2617 },"~N");
2618 c$.toString=Clazz_defineMethod(c$,"toString",
2619 function(modifiers){
2620 var sb=new Array(0);
2621 if(java.lang.reflect.Modifier.isPublic(modifiers))sb[sb.length]="public";
2622 if(java.lang.reflect.Modifier.isProtected(modifiers))sb[sb.length]="protected";
2623 if(java.lang.reflect.Modifier.isPrivate(modifiers))sb[sb.length]="private";
2624 if(java.lang.reflect.Modifier.isAbstract(modifiers))sb[sb.length]="abstract";
2625 if(java.lang.reflect.Modifier.isStatic(modifiers))sb[sb.length]="static";
2626 if(java.lang.reflect.Modifier.isFinal(modifiers))sb[sb.length]="final";
2627 if(java.lang.reflect.Modifier.isTransient(modifiers))sb[sb.length]="transient";
2628 if(java.lang.reflect.Modifier.isVolatile(modifiers))sb[sb.length]="volatile";
2629 if(java.lang.reflect.Modifier.isSynchronized(modifiers))sb[sb.length]="synchronized";
2630 if(java.lang.reflect.Modifier.isNative(modifiers))sb[sb.length]="native";
2631 if(java.lang.reflect.Modifier.isStrict(modifiers))sb[sb.length]="strictfp";
2632 if(java.lang.reflect.Modifier.isInterface(modifiers))sb[sb.length]="interface";
2633 if(sb.length>0){
2634 return sb.join(" ");
2635 }return"";
2636 },"~N");
2637 Clazz_defineStatics(c$,
2638 "PUBLIC",0x1,
2639 "PRIVATE",0x2,
2640 "PROTECTED",0x4,
2641 "STATIC",0x8,
2642 "FINAL",0x10,
2643 "SYNCHRONIZED",0x20,
2644 "VOLATILE",0x40,
2645 "TRANSIENT",0x80,
2646 "NATIVE",0x100,
2647 "INTERFACE",0x200,
2648 "ABSTRACT",0x400,
2649 "STRICT",0x800,
2650 "BRIDGE",0x40,
2651 "VARARGS",0x80,
2652 "SYNTHETIC",0x1000,
2653 "ANNOTATION",0x2000,
2654 "ENUM",0x4000);
2655
2656 c$=Clazz_decorateAsClass(function(){
2657 this.clazz=null;
2658 this.parameterTypes=null;
2659 this.exceptionTypes=null;
2660 this.modifiers=0;
2661 Clazz_instantialize(this,arguments);
2662 },java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
2663 Clazz_makeConstructor(c$,
2664 function(declaringClass,parameterTypes,checkedExceptions,modifiers){
2665 Clazz_superConstructor(this,java.lang.reflect.Constructor,[]);
2666 this.clazz=declaringClass;
2667 this.parameterTypes=parameterTypes;
2668 this.exceptionTypes=checkedExceptions;
2669 this.modifiers=modifiers;
2670 },"Class,~A,~A,~N");
2671 Clazz_overrideMethod(c$,"getTypeParameters",
2672 function(){
2673 return null;
2674 });
2675 Clazz_defineMethod(c$,"toGenericString",
2676 function(){
2677 return null;
2678 });
2679 Clazz_defineMethod(c$,"getGenericParameterTypes",
2680 function(){
2681 return null;
2682 });
2683 Clazz_defineMethod(c$,"getGenericExceptionTypes",
2684 function(){
2685 return null;
2686 });
2687 Clazz_defineMethod(c$,"getParameterAnnotations",
2688 function(){
2689 return null;
2690 });
2691 Clazz_defineMethod(c$,"isVarArgs",
2692 function(){
2693 return false;
2694 });
2695 Clazz_overrideMethod(c$,"isSynthetic",
2696 function(){
2697 return false;
2698 });
2699 Clazz_overrideMethod(c$,"equals",
2700 function(object){
2701 if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Constructor)){
2702 var other=object;
2703 if(this.getDeclaringClass()===other.getDeclaringClass()){
2704 var params1=this.parameterTypes;
2705 var params2=other.parameterTypes;
2706 if(params1.length==params2.length){
2707 for(var i=0;i<params1.length;i++){
2708 if(params1[i]!==params2[i])return false;
2709 }
2710 return true;
2711 }}}return false;
2712 },"~O");
2713 Clazz_overrideMethod(c$,"getDeclaringClass",
2714 function(){
2715 return this.clazz;
2716 });
2717 Clazz_defineMethod(c$,"getExceptionTypes",
2718 function(){
2719 return this.exceptionTypes;
2720 });
2721 Clazz_overrideMethod(c$,"getModifiers",
2722 function(){
2723 return this.modifiers;
2724 });
2725 Clazz_overrideMethod(c$,"getName",
2726 function(){
2727 return this.getDeclaringClass().getName();
2728 });
2729 Clazz_defineMethod(c$,"getParameterTypes",
2730 function(){
2731 return this.parameterTypes;
2732 });
2733 Clazz_overrideMethod(c$,"hashCode",
2734 function(){
2735 return this.getDeclaringClass().getName().hashCode();
2736 });
2737 Clazz_defineMethod(c$,"newInstance",
2738 function(args){
2739 var instance=new this.clazz(Clazz_inheritArgs);
2740 Clazz_instantialize(instance,args);
2741 return instance;
2742 },"~A");
2743 Clazz_overrideMethod(c$,"toString",
2744 function(){
2745 return null;
2746 });
2747
2748 c$=Clazz_declareType(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);
2749 Clazz_overrideMethod(c$,"isSynthetic",
2750 function(){
2751 return false;
2752 });
2753 Clazz_defineMethod(c$,"toGenericString",
2754 function(){
2755 return null;
2756 });
2757 Clazz_defineMethod(c$,"isEnumConstant",
2758 function(){
2759 return false;
2760 });
2761 Clazz_defineMethod(c$,"getGenericType",
2762 function(){
2763 return null;
2764 });
2765 Clazz_overrideMethod(c$,"equals",
2766 function(object){
2767 return false;
2768 },"~O");
2769 Clazz_overrideMethod(c$,"getDeclaringClass",
2770 function(){
2771 return null;
2772 });
2773 Clazz_overrideMethod(c$,"getName",
2774 function(){
2775 return null;
2776 });
2777 Clazz_defineMethod(c$,"getType",
2778 function(){
2779 return null;
2780 });
2781 Clazz_overrideMethod(c$,"hashCode",
2782 function(){
2783 return 0;
2784 });
2785 Clazz_overrideMethod(c$,"toString",
2786 function(){
2787 return null;
2788 });
2789
2790 c$=Clazz_decorateAsClass(function(){
2791 this.clazz=null;
2792 this.name=null;
2793 this.returnType=null;
2794 this.parameterTypes=null;
2795 this.exceptionTypes=null;
2796 this.modifiers=0;
2797 Clazz_instantialize(this,arguments);
2798 },java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
2799 Clazz_makeConstructor(c$,
2800 function(declaringClass,name,parameterTypes,returnType,checkedExceptions,modifiers){
2801 Clazz_superConstructor(this,java.lang.reflect.Method,[]);
2802 this.clazz=declaringClass;
2803 this.name=name;
2804 this.parameterTypes=parameterTypes;
2805 this.returnType=returnType;
2806 this.exceptionTypes=checkedExceptions;
2807 this.modifiers=modifiers;
2808 },"Class,~S,~A,Class,~A,~N");
2809 Clazz_overrideMethod(c$,"getTypeParameters",
2810 function(){
2811 return null;
2812 });
2813 Clazz_defineMethod(c$,"toGenericString",
2814 function(){
2815 return null;
2816 });
2817 Clazz_defineMethod(c$,"getGenericParameterTypes",
2818 function(){
2819 return null;
2820 });
2821 Clazz_defineMethod(c$,"getGenericExceptionTypes",
2822 function(){
2823 return null;
2824 });
2825 Clazz_defineMethod(c$,"getGenericReturnType",
2826 function(){
2827 return null;
2828 });
2829 Clazz_defineMethod(c$,"getParameterAnnotations",
2830 function(){
2831 return null;
2832 });
2833 Clazz_defineMethod(c$,"isVarArgs",
2834 function(){
2835 return false;
2836 });
2837 Clazz_defineMethod(c$,"isBridge",
2838 function(){
2839 return false;
2840 });
2841 Clazz_overrideMethod(c$,"isSynthetic",
2842 function(){
2843 return false;
2844 });
2845 Clazz_defineMethod(c$,"getDefaultValue",
2846 function(){
2847 return null;
2848 });
2849 Clazz_overrideMethod(c$,"equals",
2850 function(object){
2851 if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Method)){
2852 var other=object;
2853 if((this.getDeclaringClass()===other.getDeclaringClass())&&(this.getName()===other.getName())){
2854 var params1=this.parameterTypes;
2855 var params2=other.parameterTypes;
2856 if(params1.length==params2.length){
2857 for(var i=0;i<params1.length;i++){
2858 if(params1[i]!==params2[i])return false;
2859 }
2860 return true;
2861 }}}return false;
2862 },"~O");
2863 Clazz_overrideMethod(c$,"getDeclaringClass",
2864 function(){
2865 return this.clazz;
2866 });
2867 Clazz_defineMethod(c$,"getExceptionTypes",
2868 function(){
2869 return this.exceptionTypes;
2870 });
2871 Clazz_overrideMethod(c$,"getModifiers",
2872 function(){
2873 return this.modifiers;
2874 });
2875 Clazz_overrideMethod(c$,"getName",
2876 function(){
2877 return this.name;
2878 });
2879 Clazz_defineMethod(c$,"getParameterTypes",
2880 function(){
2881 return this.parameterTypes; 
2882 });
2883 Clazz_defineMethod(c$,"getReturnType",
2884 function(){
2885 return this.returnType;
2886 });
2887 Clazz_overrideMethod(c$,"hashCode",
2888 function(){
2889 return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode();
2890 });
2891 Clazz_defineMethod(c$,"invoke",
2892 function(receiver,args){
2893 var m=this.clazz.prototype[this.getName()];
2894 if(m==null){
2895 m=this.clazz[this.getName()];
2896 }
2897 if(m!=null){
2898 m.apply(receiver,args);
2899 }else{
2900
2901 }
2902 },"~O,~A");
2903 Clazz_overrideMethod(c$,"toString",
2904 function(){
2905 return null;
2906 });
2907
2908 })(Clazz);
2909 Clazz_declarePackage ("JU");
2910 c$ = Clazz_declareType (JU, "DebugJS");
2911 c$._ = Clazz_defineMethod (c$, "_", 
2912 function (msg) {
2913 {
2914 if (Clazz._debugging) {
2915 debugger;
2916 }
2917 }}, "~S");
2918 Clazz_declarePackage ("java.awt");
2919 Clazz_load (["java.awt.Stroke"], "java.awt.BasicStroke", ["java.lang.Float", "$.IllegalArgumentException", "java.util.Arrays"], function () {
2920 c$ = Clazz_decorateAsClass (function () {
2921 this.width = 0;
2922 this.join = 0;
2923 this.cap = 0;
2924 this.miterlimit = 0;
2925 this.dash = null;
2926 this.dash_phase = 0;
2927 Clazz_instantialize (this, arguments);
2928 }, java.awt, "BasicStroke", null, java.awt.Stroke);
2929 Clazz_makeConstructor (c$, 
2930 function (width, cap, join, miterlimit, dash, dash_phase) {
2931 if (width < 0.0) {
2932 throw  new IllegalArgumentException ("negative width");
2933 }if (cap != 0 && cap != 1 && cap != 2) {
2934 throw  new IllegalArgumentException ("illegal end cap value");
2935 }if (join == 0) {
2936 if (miterlimit < 1.0) {
2937 throw  new IllegalArgumentException ("miter limit < 1");
2938 }} else if (join != 1 && join != 2) {
2939 throw  new IllegalArgumentException ("illegal line join value");
2940 }if (dash != null) {
2941 if (dash_phase < 0.0) {
2942 throw  new IllegalArgumentException ("negative dash phase");
2943 }var allzero = true;
2944 for (var i = 0; i < dash.length; i++) {
2945 var d = dash[i];
2946 if (d > 0.0) {
2947 allzero = false;
2948 } else if (d < 0.0) {
2949 throw  new IllegalArgumentException ("negative dash length");
2950 }}
2951 if (allzero) {
2952 throw  new IllegalArgumentException ("dash lengths all zero");
2953 }}this.width = width;
2954 this.cap = cap;
2955 this.join = join;
2956 this.miterlimit = miterlimit;
2957 if (dash != null) {
2958 this.dash = dash.clone ();
2959 }this.dash_phase = dash_phase;
2960 }, "~N,~N,~N,~N,~A,~N");
2961 Clazz_makeConstructor (c$, 
2962 function (width, cap, join, miterlimit) {
2963 this.construct (width, cap, join, miterlimit, null, 0.0);
2964 }, "~N,~N,~N,~N");
2965 Clazz_makeConstructor (c$, 
2966 function (width, cap, join) {
2967 this.construct (width, cap, join, 10.0, null, 0.0);
2968 }, "~N,~N,~N");
2969 Clazz_makeConstructor (c$, 
2970 function (width) {
2971 this.construct (width, 2, 0, 10.0, null, 0.0);
2972 }, "~N");
2973 Clazz_makeConstructor (c$, 
2974 function () {
2975 this.construct (1.0, 2, 0, 10.0, null, 0.0);
2976 });
2977 Clazz_overrideMethod (c$, "createStrokedShape", 
2978 function (s) {
2979 return s;
2980 }, "java.awt.Shape");
2981 Clazz_defineMethod (c$, "getLineWidth", 
2982 function () {
2983 return this.width;
2984 });
2985 Clazz_defineMethod (c$, "getEndCap", 
2986 function () {
2987 return this.cap;
2988 });
2989 Clazz_defineMethod (c$, "getLineJoin", 
2990 function () {
2991 return this.join;
2992 });
2993 Clazz_defineMethod (c$, "getMiterLimit", 
2994 function () {
2995 return this.miterlimit;
2996 });
2997 Clazz_defineMethod (c$, "getDashArray", 
2998 function () {
2999 if (this.dash == null) {
3000 return null;
3001 }return this.dash.clone ();
3002 });
3003 Clazz_defineMethod (c$, "getDashPhase", 
3004 function () {
3005 return this.dash_phase;
3006 });
3007 Clazz_overrideMethod (c$, "hashCode", 
3008 function () {
3009 var hash = Float.floatToIntBits (this.width);
3010 hash = hash * 31 + this.join;
3011 hash = hash * 31 + this.cap;
3012 hash = hash * 31 + Float.floatToIntBits (this.miterlimit);
3013 if (this.dash != null) {
3014 hash = hash * 31 + Float.floatToIntBits (this.dash_phase);
3015 for (var i = 0; i < this.dash.length; i++) {
3016 hash = hash * 31 + Float.floatToIntBits (this.dash[i]);
3017 }
3018 }return hash;
3019 });
3020 Clazz_overrideMethod (c$, "equals", 
3021 function (obj) {
3022 if (!(Clazz_instanceOf (obj, java.awt.BasicStroke))) {
3023 return false;
3024 }var bs = obj;
3025 if (this.width != bs.width) {
3026 return false;
3027 }if (this.join != bs.join) {
3028 return false;
3029 }if (this.cap != bs.cap) {
3030 return false;
3031 }if (this.miterlimit != bs.miterlimit) {
3032 return false;
3033 }if (this.dash != null) {
3034 if (this.dash_phase != bs.dash_phase) {
3035 return false;
3036 }if (!java.util.Arrays.equals (this.dash, bs.dash)) {
3037 return false;
3038 }} else if (bs.dash != null) {
3039 return false;
3040 }return true;
3041 }, "~O");
3042 Clazz_defineStatics (c$,
3043 "JOIN_MITER", 0,
3044 "JOIN_ROUND", 1,
3045 "JOIN_BEVEL", 2,
3046 "CAP_BUTT", 0,
3047 "CAP_ROUND", 1,
3048 "CAP_SQUARE", 2);
3049 });
3050 Clazz_declarePackage ("java.awt");
3051 Clazz_declareInterface (java.awt, "Stroke");
3052 Clazz_declarePackage ("java.util");
3053 Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () {
3054 c$ = Clazz_decorateAsClass (function () {
3055 this.language = null;
3056 this.country = null;
3057 this.variant = null;
3058 this.hashCodeValue = 0;
3059 Clazz_instantialize (this, arguments);
3060 }, java.util, "Locale", null, [Cloneable, java.io.Serializable]);
3061 Clazz_makeConstructor (c$, 
3062 function (language, country, variant) {
3063 this.language = language.intern ();
3064 this.country = country.intern ();
3065 this.variant = variant.intern ();
3066 }, "~S,~S,~S");
3067 Clazz_makeConstructor (c$, 
3068 function (language, country) {
3069 this.construct (language, country, "");
3070 }, "~S,~S");
3071 Clazz_makeConstructor (c$, 
3072 function (language) {
3073 this.construct (language, "", "");
3074 }, "~S");
3075 Clazz_makeConstructor (c$, 
3076  function (language, country, flag) {
3077 this.language = language;
3078 this.country = country;
3079 this.variant = "";
3080 }, "~S,~S,~B");
3081 c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", 
3082  function (key, language, country) {
3083 var locale =  new java.util.Locale (language, country, false);
3084 java.util.Locale.cache.put (key, locale);
3085 return locale;
3086 }, "~S,~S,~S");
3087 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
3088 function (language, country, variant) {
3089 if (language == null || country == null || variant == null) {
3090 throw  new NullPointerException ();
3091 }var sb =  new StringBuilder ();
3092 sb.append (language).append ('_').append (country).append ('_').append (variant);
3093 var key = sb.toString ();
3094 var locale = java.util.Locale.cache.get (key);
3095 if (locale == null) {
3096 locale =  new java.util.Locale (language, country, variant);
3097 var l = java.util.Locale.cache.put (key, locale);
3098 if (l != null) {
3099 locale = l;
3100 }}return locale;
3101 }, "~S,~S,~S");
3102 c$.getDefault = Clazz_defineMethod (c$, "getDefault", 
3103 function () {
3104 if (java.util.Locale.defaultLocale == null) {
3105 var language;
3106 var country;
3107 var variant;
3108 language = "en";
3109 country = "";
3110 variant = "";
3111 java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant);
3112 }return java.util.Locale.defaultLocale;
3113 });
3114 c$.setDefault = Clazz_defineMethod (c$, "setDefault", 
3115 function (newLocale) {
3116 if (newLocale == null) throw  new NullPointerException ("Can't set default locale to NULL");
3117 java.util.Locale.defaultLocale = newLocale;
3118 }, "java.util.Locale");
3119 Clazz_defineMethod (c$, "getLanguage", 
3120 function () {
3121 return this.language;
3122 });
3123 Clazz_defineMethod (c$, "getCountry", 
3124 function () {
3125 return this.country;
3126 });
3127 Clazz_defineMethod (c$, "getVariant", 
3128 function () {
3129 return this.variant;
3130 });
3131 Clazz_overrideMethod (c$, "toString", 
3132 function () {
3133 var l = this.language.length != 0;
3134 var c = this.country.length != 0;
3135 var v = this.variant.length != 0;
3136 var result =  new StringBuilder (this.language);
3137 if (c || (l && v)) {
3138 result.append ('_').append (this.country);
3139 }if (v && (l || c)) {
3140 result.append ('_').append (this.variant);
3141 }return result.toString ();
3142 });
3143 Clazz_defineMethod (c$, "getDisplayLanguage", 
3144 function () {
3145 return this.getDisplayLanguage (java.util.Locale.getDefault ());
3146 });
3147 Clazz_defineMethod (c$, "getDisplayLanguage", 
3148 function (inLocale) {
3149 return this.getDisplayString (this.language, inLocale, 0);
3150 }, "java.util.Locale");
3151 Clazz_defineMethod (c$, "getDisplayCountry", 
3152 function () {
3153 return this.getDisplayCountry (java.util.Locale.getDefault ());
3154 });
3155 Clazz_defineMethod (c$, "getDisplayCountry", 
3156 function (inLocale) {
3157 return this.getDisplayString (this.country, inLocale, 1);
3158 }, "java.util.Locale");
3159 Clazz_defineMethod (c$, "getDisplayString", 
3160  function (code, inLocale, type) {
3161 if (code.length == 0) {
3162 return "";
3163 }if (inLocale == null) {
3164 throw  new NullPointerException ();
3165 }return inLocale.toString ();
3166 }, "~S,java.util.Locale,~N");
3167 Clazz_defineMethod (c$, "getDisplayVariant", 
3168 function () {
3169 return this.getDisplayVariant (java.util.Locale.getDefault ());
3170 });
3171 Clazz_defineMethod (c$, "getDisplayVariant", 
3172 function (inLocale) {
3173 if (this.variant.length == 0) return "";
3174 return this.variant;
3175 }, "java.util.Locale");
3176 Clazz_defineMethod (c$, "getDisplayName", 
3177 function () {
3178 return this.getDisplayName (java.util.Locale.getDefault ());
3179 });
3180 Clazz_defineMethod (c$, "getDisplayName", 
3181 function (inLocale) {
3182 return inLocale.toString ();
3183 }, "java.util.Locale");
3184 Clazz_defineMethod (c$, "clone", 
3185 function () {
3186 try {
3187 var that = Clazz_superCall (this, java.util.Locale, "clone", []);
3188 return that;
3189 } catch (e) {
3190 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
3191 throw  new InternalError ();
3192 } else {
3193 throw e;
3194 }
3195 }
3196 });
3197 Clazz_overrideMethod (c$, "hashCode", 
3198 function () {
3199 var hc = this.hashCodeValue;
3200 if (hc == 0) {
3201 hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4);
3202 this.hashCodeValue = hc;
3203 }return hc;
3204 });
3205 Clazz_overrideMethod (c$, "equals", 
3206 function (obj) {
3207 if (this === obj) return true;
3208 if (!(Clazz_instanceOf (obj, java.util.Locale))) return false;
3209 var other = obj;
3210 return this.language === other.language && this.country === other.country && this.variant === other.variant;
3211 }, "~O");
3212 c$.cache = c$.prototype.cache =  new java.util.HashMap (32);
3213 c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", "");
3214 c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", "");
3215 Clazz_defineStatics (c$,
3216 "DISPLAY_LANGUAGE", 0,
3217 "DISPLAY_COUNTRY", 1,
3218 "defaultLocale", null);
3219 });
3220 Clazz_declarePackage ("java.util");
3221 Clazz_load (["java.util.Arrays", "$.Collections", "$.HashMap"], "java.util.ResourceBundle", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "java.lang.ClassNotFoundException", "$.IllegalArgumentException", "$.InternalError", "$.InterruptedException", "$.NullPointerException", "$.StringBuilder", "$.Thread", "java.util.ArrayList", "$.HashSet", "java.util.Locale", "$.MissingResourceException", "swingjs.JSToolkit", "swingjs.api.Interface"], function () {
3222 c$ = Clazz_decorateAsClass (function () {
3223 this.parent = null;
3224 this.locale = null;
3225 this.expired = false;
3226 this.$keySet = null;
3227 Clazz_instantialize (this, arguments);
3228 }, java.util, "ResourceBundle");
3229 Clazz_makeConstructor (c$, 
3230 function () {
3231 });
3232 Clazz_defineMethod (c$, "getString", 
3233 function (key) {
3234 return this.getObject (key);
3235 }, "~S");
3236 Clazz_defineMethod (c$, "getStringArray", 
3237 function (key) {
3238 return this.getObject (key);
3239 }, "~S");
3240 Clazz_defineMethod (c$, "getObject", 
3241 function (key) {
3242 var obj = this.handleGetObject (key);
3243 if (obj == null) {
3244 if (this.parent != null) {
3245 obj = this.parent.getObject (key);
3246 }if (obj == null) throw  new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key);
3247 }return obj;
3248 }, "~S");
3249 Clazz_defineMethod (c$, "getLocale", 
3250 function () {
3251 return this.locale;
3252 });
3253 Clazz_defineMethod (c$, "setParent", 
3254 function (parent) {
3255 this.parent = parent;
3256 }, "java.util.ResourceBundle");
3257 c$.getBundle = Clazz_defineMethod (c$, "getBundle", 
3258 function (baseName, targetLocale, loader, control) {
3259 var n = 4;
3260 {
3261 n = arguments.length;
3262 }switch (n) {
3263 case 2:
3264 if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) {
3265 control = targetLocale;
3266 targetLocale = null;
3267 }break;
3268 case 3:
3269 if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) {
3270 control = loader;
3271 loader = null;
3272 }break;
3273 }
3274 if (targetLocale == null) targetLocale = java.util.Locale.getDefault ();
3275 if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3276 return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control);
3277 }, "~S,~O,~O,java.util.ResourceBundle.Control");
3278 c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", 
3279  function (baseName, locale, loader, control) {
3280 if (control == null) {
3281 throw  new NullPointerException ("ResourceBundle locale or control is null");
3282 }var cacheKey =  new java.util.ResourceBundle.CacheKey (baseName, locale, loader);
3283 var bundle = null;
3284 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3285 if (bundleRef != null) {
3286 bundle = bundleRef;
3287 bundleRef = null;
3288 }if (java.util.ResourceBundle.isValidBundle (bundle)) {
3289 return bundle;
3290 }var formats = control.getFormats (baseName);
3291 var baseBundle = null;
3292 for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) {
3293 var candidateLocales = control.getCandidateLocales (baseName, targetLocale);
3294 bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle);
3295 if (java.util.ResourceBundle.isValidBundle (bundle)) {
3296 var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale);
3297 if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) {
3298 break;
3299 }if (isBaseBundle && baseBundle == null) {
3300 baseBundle = bundle;
3301 }}}
3302 if (bundle == null) {
3303 if (baseBundle == null) {
3304 java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ());
3305 }bundle = baseBundle;
3306 }return bundle;
3307 }, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control");
3308 c$.findBundle = Clazz_defineMethod (c$, "findBundle", 
3309  function (cacheKey, candidateLocales, formats, index, control, baseBundle) {
3310 var targetLocale = candidateLocales.get (index);
3311 var parent = null;
3312 if (index != candidateLocales.size () - 1) {
3313 parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle);
3314 } else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) {
3315 return baseBundle;
3316 }var expiredBundle = false;
3317 cacheKey.setLocale (targetLocale);
3318 var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control);
3319 if (java.util.ResourceBundle.isValidBundle (bundle)) {
3320 expiredBundle = bundle.expired;
3321 if (!expiredBundle) {
3322 if (bundle.parent === parent) {
3323 return bundle;
3324 }var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3325 if (bundleRef != null && bundleRef === bundle) {
3326 java.util.ResourceBundle.cacheList.remove (cacheKey);
3327 }}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) {
3328 var constKey = cacheKey.clone ();
3329 try {
3330 try {
3331 bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle);
3332 if (bundle != null) {
3333 if (bundle.parent == null) {
3334 bundle.setParent (parent);
3335 }bundle.locale = targetLocale;
3336 bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control);
3337 return bundle;
3338 }java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control);
3339 } finally {
3340 }
3341 } finally {
3342 if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) {
3343 Thread.currentThread ().interrupt ();
3344 }}
3345 }return parent;
3346 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");
3347 c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", 
3348  function (cacheKey, formats, control, reload) {
3349 var targetLocale = cacheKey.getLocale ();
3350 var bundle = null;
3351 var size = formats.size ();
3352 for (var i = 0; i < size; i++) {
3353 var format = formats.get (i);
3354 try {
3355 bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload);
3356 } catch (e$$) {
3357 if (Clazz_exceptionOf (e$$, LinkageError)) {
3358 var error = e$$;
3359 {
3360 cacheKey.setCause (error);
3361 }
3362 } else if (Clazz_exceptionOf (e$$, Exception)) {
3363 var cause = e$$;
3364 {
3365 cacheKey.setCause (cause);
3366 }
3367 } else {
3368 throw e$$;
3369 }
3370 }
3371 if (bundle != null) {
3372 cacheKey.setFormat (format);
3373 bundle.locale = targetLocale;
3374 bundle.expired = false;
3375 break;
3376 }}
3377 return bundle;
3378 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B");
3379 c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", 
3380  function (bundle) {
3381 return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE;
3382 }, "java.util.ResourceBundle");
3383 c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", 
3384  function (baseName, locale, cause) {
3385 if (Clazz_instanceOf (cause, java.util.MissingResourceException)) {
3386 cause = null;
3387 }throw  new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause);
3388 }, "~S,java.util.Locale,Throwable");
3389 c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", 
3390  function (cacheKey, control) {
3391 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3392 if (bundleRef == null) {
3393 return null;
3394 }var bundle = bundleRef;
3395 return bundle;
3396 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control");
3397 c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", 
3398  function (cacheKey, bundle, control) {
3399 var key = cacheKey.clone ();
3400 java.util.ResourceBundle.cacheList.put (key, bundle);
3401 return bundle;
3402 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control");
3403 c$.clearCache = Clazz_defineMethod (c$, "clearCache", 
3404 function () {
3405 java.util.ResourceBundle.cacheList.clear ();
3406 });
3407 Clazz_defineMethod (c$, "containsKey", 
3408 function (key) {
3409 if (key == null) {
3410 throw  new NullPointerException ();
3411 }for (var rb = this; rb != null; rb = rb.parent) {
3412 if (rb.handleKeySet ().contains (key)) {
3413 return true;
3414 }}
3415 return false;
3416 }, "~S");
3417 Clazz_defineMethod (c$, "keySet", 
3418 function () {
3419 var keys =  new java.util.HashSet ();
3420 for (var rb = this; rb != null; rb = rb.parent) {
3421 keys.addAll (rb.handleKeySet ());
3422 }
3423 return keys;
3424 });
3425 Clazz_defineMethod (c$, "handleKeySet", 
3426 function () {
3427 if (this.$keySet == null) {
3428 {
3429 if (this.$keySet == null) {
3430 var keys =  new java.util.HashSet ();
3431 var enumKeys = this.getKeys ();
3432 while (enumKeys.hasMoreElements ()) {
3433 var key = enumKeys.nextElement ();
3434 if (this.handleGetObject (key) != null) {
3435 keys.add (key);
3436 }}
3437 this.$keySet = keys;
3438 }}}return this.$keySet;
3439 });
3440 c$.$ResourceBundle$1$ = function () {
3441 Clazz_pu$h(self.c$);
3442 c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle);
3443 Clazz_defineMethod (c$, "getKeys", 
3444 function () {
3445 return null;
3446 });
3447 Clazz_defineMethod (c$, "handleGetObject", 
3448 function (key) {
3449 return null;
3450 }, "~S");
3451 Clazz_overrideMethod (c$, "toString", 
3452 function () {
3453 return "NONEXISTENT_BUNDLE";
3454 });
3455 c$ = Clazz_p0p ();
3456 };
3457 Clazz_pu$h(self.c$);
3458 c$ = Clazz_decorateAsClass (function () {
3459 this.name = null;
3460 this.locale = null;
3461 this.format = null;
3462 this.cause = null;
3463 this.hashCodeCache = 0;
3464 Clazz_instantialize (this, arguments);
3465 }, java.util.ResourceBundle, "CacheKey", null, Cloneable);
3466 Clazz_makeConstructor (c$, 
3467 function (a, b, c) {
3468 this.name = a;
3469 this.locale = b;
3470 if (this.name != null) this.calculateHashCode ();
3471 }, "~S,java.util.Locale,~O");
3472 Clazz_defineMethod (c$, "getName", 
3473 function () {
3474 return this.name;
3475 });
3476 Clazz_defineMethod (c$, "getLocale", 
3477 function () {
3478 return this.locale;
3479 });
3480 Clazz_defineMethod (c$, "setLocale", 
3481 function (a) {
3482 if (!this.locale.equals (a)) {
3483 this.locale = a;
3484 this.calculateHashCode ();
3485 }return this;
3486 }, "java.util.Locale");
3487 Clazz_overrideMethod (c$, "equals", 
3488 function (a) {
3489 if (this === a) {
3490 return true;
3491 }try {
3492 var b = a;
3493 if (this.hashCodeCache != b.hashCodeCache) {
3494 return false;
3495 }if (!this.name.equals (b.name)) {
3496 return false;
3497 }if (!this.locale.equals (b.locale)) {
3498 return false;
3499 }return true;
3500 } catch (e$$) {
3501 if (Clazz_exceptionOf (e$$, NullPointerException)) {
3502 var e = e$$;
3503 {
3504 }
3505 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
3506 var e = e$$;
3507 {
3508 }
3509 } else {
3510 throw e$$;
3511 }
3512 }
3513 return false;
3514 }, "~O");
3515 Clazz_overrideMethod (c$, "hashCode", 
3516 function () {
3517 return this.hashCodeCache;
3518 });
3519 Clazz_defineMethod (c$, "calculateHashCode", 
3520  function () {
3521 this.hashCodeCache = this.name.hashCode () << 3;
3522 this.hashCodeCache ^= this.locale.hashCode ();
3523 });
3524 Clazz_defineMethod (c$, "clone", 
3525 function () {
3526 try {
3527 var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []);
3528 a.cause = null;
3529 return a;
3530 } catch (e) {
3531 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
3532 throw  new InternalError ();
3533 } else {
3534 throw e;
3535 }
3536 }
3537 });
3538 Clazz_defineMethod (c$, "setFormat", 
3539 function (a) {
3540 this.format = a;
3541 }, "~S");
3542 Clazz_defineMethod (c$, "setCause", 
3543  function (a) {
3544 if (this.cause == null) {
3545 this.cause = a;
3546 } else {
3547 if (Clazz_instanceOf (this.cause, ClassNotFoundException)) {
3548 this.cause = a;
3549 }}}, "Throwable");
3550 Clazz_defineMethod (c$, "getCause", 
3551  function () {
3552 return this.cause;
3553 });
3554 Clazz_overrideMethod (c$, "toString", 
3555 function () {
3556 var a = this.locale.toString ();
3557 if (a.length == 0) {
3558 if (this.locale.getVariant ().length != 0) {
3559 a = "__" + this.locale.getVariant ();
3560 } else {
3561 a = "\"\"";
3562 }}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]";
3563 });
3564 c$ = Clazz_p0p ();
3565 Clazz_pu$h(self.c$);
3566 c$ = Clazz_declareType (java.util.ResourceBundle, "Control");
3567 Clazz_makeConstructor (c$, 
3568 function () {
3569 });
3570 c$.getControl = Clazz_defineMethod (c$, "getControl", 
3571 function (a) {
3572 if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
3573 return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY;
3574 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
3575 return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY;
3576 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
3577 return java.util.ResourceBundle.Control.INSTANCE;
3578 }throw  new IllegalArgumentException ();
3579 }, "java.util.List");
3580 c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", 
3581 function (a) {
3582 if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
3583 return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK;
3584 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
3585 return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK;
3586 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
3587 return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK;
3588 }throw  new IllegalArgumentException ();
3589 }, "java.util.List");
3590 Clazz_defineMethod (c$, "getFormats", 
3591 function (a) {
3592 if (a == null) {
3593 throw  new NullPointerException ();
3594 }return java.util.ResourceBundle.Control.FORMAT_DEFAULT;
3595 }, "~S");
3596 Clazz_defineMethod (c$, "getCandidateLocales", 
3597 function (a, b) {
3598 if (a == null) {
3599 throw  new NullPointerException ();
3600 }var c = b.getLanguage ();
3601 var d = b.getCountry ();
3602 var e = b.getVariant ();
3603 var f =  new java.util.ArrayList (4);
3604 if (e.length > 0) {
3605 f.add (b);
3606 }if (d.length > 0) {
3607 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, ""));
3608 }if (c.length > 0) {
3609 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", ""));
3610 }f.add (java.util.Locale.ROOT);
3611 return f;
3612 }, "~S,java.util.Locale");
3613 Clazz_defineMethod (c$, "getFallbackLocale", 
3614 function (a, b) {
3615 if (a == null) {
3616 throw  new NullPointerException ();
3617 }var c = java.util.Locale.getDefault ();
3618 return b.equals (c) ? null : c;
3619 }, "~S,java.util.Locale");
3620 Clazz_defineMethod (c$, "newBundle", 
3621 function (a, b, c, d, e) {
3622 var f = this.toBundleName (a, b);
3623 var g = null;
3624 if (c.equals ("java.class")) {
3625 g = swingjs.api.Interface.getInstance (f, false);
3626 } else if (c.equals ("java.properties")) {
3627 var h = this.toResourceName0 (f, "properties");
3628 if (h == null) {
3629 return null;
3630 }var i = swingjs.JSToolkit.getJavaResource (h, false);
3631 var j = null;
3632 j = (i == null ? null :  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ())));
3633 if (j != null) {
3634 try {
3635 g = this.newPropertyBundle (j);
3636 } finally {
3637 j.close ();
3638 }
3639 }} else {
3640 throw  new IllegalArgumentException ("unknown format: " + c);
3641 }return g;
3642 }, "~S,java.util.Locale,~S,~O,~B");
3643 Clazz_defineMethod (c$, "newPropertyBundle", 
3644  function (a) {
3645 return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a);
3646 }, "java.io.InputStream");
3647 Clazz_defineMethod (c$, "getTimeToLive", 
3648 function (a, b) {
3649 if (a == null || b == null) {
3650 throw  new NullPointerException ();
3651 }return -2;
3652 }, "~S,java.util.Locale");
3653 Clazz_defineMethod (c$, "toBundleName", 
3654 function (a, b) {
3655 if (b === java.util.Locale.ROOT) {
3656 return a;
3657 }var c = b.getLanguage ();
3658 var d = b.getCountry ();
3659 var e = b.getVariant ();
3660 if (c === "" && d === "" && e === "") {
3661 return a;
3662 }var f =  new StringBuilder (a);
3663 f.append ('_');
3664 if (e !== "") {
3665 f.append (c).append ('_').append (d).append ('_').append (e);
3666 } else if (d !== "") {
3667 f.append (c).append ('_').append (d);
3668 } else {
3669 f.append (c);
3670 }return f.toString ();
3671 }, "~S,java.util.Locale");
3672 Clazz_defineMethod (c$, "toResourceName", 
3673 function (a, b) {
3674 var c =  new StringBuilder (a.length + 1 + b.length);
3675 c.append (a.$replace ('.', '/')).append ('.').append (b);
3676 return c.toString ();
3677 }, "~S,~S");
3678 Clazz_defineMethod (c$, "toResourceName0", 
3679  function (a, b) {
3680 if (a.contains ("://")) {
3681 return null;
3682 } else {
3683 return this.toResourceName (a, b);
3684 }}, "~S,~S");
3685 c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"]));
3686 c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"]));
3687 c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"]));
3688 Clazz_defineStatics (c$,
3689 "TTL_DONT_CACHE", -1,
3690 "TTL_NO_EXPIRATION_CONTROL", -2);
3691 c$.INSTANCE = c$.prototype.INSTANCE =  new java.util.ResourceBundle.Control ();
3692 c$ = Clazz_p0p ();
3693 Clazz_pu$h(self.c$);
3694 c$ = Clazz_decorateAsClass (function () {
3695 this.formats = null;
3696 Clazz_instantialize (this, arguments);
3697 }, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control);
3698 Clazz_makeConstructor (c$, 
3699 function (a) {
3700 Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []);
3701 this.formats = a;
3702 }, "java.util.List");
3703 Clazz_overrideMethod (c$, "getFormats", 
3704 function (a) {
3705 if (a == null) {
3706 throw  new NullPointerException ();
3707 }return this.formats;
3708 }, "~S");
3709 c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3710 c$.CLASS_ONLY = c$.prototype.CLASS_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
3711 c$ = Clazz_p0p ();
3712 Clazz_pu$h(self.c$);
3713 c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl);
3714 Clazz_overrideMethod (c$, "getFallbackLocale", 
3715 function (a, b) {
3716 if (a == null || b == null) {
3717 throw  new NullPointerException ();
3718 }return null;
3719 }, "~S,java.util.Locale");
3720 c$.NO_FALLBACK = c$.prototype.NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT);
3721 c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3722 c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
3723 c$ = Clazz_p0p ();
3724 Clazz_defineStatics (c$,
3725 "INITIAL_CACHE_SIZE", 32);
3726 c$.NONEXISTENT_BUNDLE = c$.prototype.NONEXISTENT_BUNDLE = ((Clazz_isClassDefined ("java.util.ResourceBundle$1") ? 0 : java.util.ResourceBundle.$ResourceBundle$1$ ()), Clazz_innerTypeInstance (java.util.ResourceBundle$1, this, null));
3727 c$.cacheList = c$.prototype.cacheList =  new java.util.HashMap (32);
3728 });
3729 Clazz_declarePackage ("JU");
3730 Clazz_load (["javajs.api.GenericLineReader"], "JU.Rdr", ["java.io.BufferedInputStream", "$.BufferedReader", "$.ByteArrayInputStream", "$.InputStreamReader", "$.StringReader", "JU.AU", "$.Base64", "$.Encoding", "$.SB"], function () {
3731 c$ = Clazz_decorateAsClass (function () {
3732 this.reader = null;
3733 Clazz_instantialize (this, arguments);
3734 }, JU, "Rdr", null, javajs.api.GenericLineReader);
3735 Clazz_makeConstructor (c$, 
3736 function (reader) {
3737 this.reader = reader;
3738 }, "java.io.BufferedReader");
3739 Clazz_overrideMethod (c$, "readNextLine", 
3740 function () {
3741 return this.reader.readLine ();
3742 });
3743 c$.readCifData = Clazz_defineMethod (c$, "readCifData", 
3744 function (parser, br) {
3745 return parser.set (null, br).getAllCifData ();
3746 }, "javajs.api.GenericCifDataParser,java.io.BufferedReader");
3747 c$.fixUTF = Clazz_defineMethod (c$, "fixUTF", 
3748 function (bytes) {
3749 var encoding = JU.Rdr.getUTFEncoding (bytes);
3750 if (encoding !== JU.Encoding.NONE) try {
3751 var s =  String.instantialize (bytes, encoding.name ().$replace ('_', '-'));
3752 switch (encoding) {
3753 case JU.Encoding.UTF8:
3754 case JU.Encoding.UTF_16BE:
3755 case JU.Encoding.UTF_16LE:
3756 s = s.substring (1);
3757 break;
3758 default:
3759 break;
3760 }
3761 return s;
3762 } catch (e) {
3763 if (Clazz_exceptionOf (e, java.io.UnsupportedEncodingException)) {
3764 System.out.println (e);
3765 } else {
3766 throw e;
3767 }
3768 }
3769 return  String.instantialize (bytes);
3770 }, "~A");
3771 c$.getUTFEncoding = Clazz_defineMethod (c$, "getUTFEncoding", 
3772  function (bytes) {
3773 if (bytes.length >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) return JU.Encoding.UTF8;
3774 if (bytes.length >= 4 && bytes[0] == 0 && bytes[1] == 0 && bytes[2] == 0xFE && bytes[3] == 0xFF) return JU.Encoding.UTF_32BE;
3775 if (bytes.length >= 4 && bytes[0] == 0xFF && bytes[1] == 0xFE && bytes[2] == 0 && bytes[3] == 0) return JU.Encoding.UTF_32LE;
3776 if (bytes.length >= 2 && bytes[0] == 0xFF && bytes[1] == 0xFE) return JU.Encoding.UTF_16LE;
3777 if (bytes.length >= 2 && bytes[0] == 0xFE && bytes[1] == 0xFF) return JU.Encoding.UTF_16BE;
3778 return JU.Encoding.NONE;
3779 }, "~A");
3780 c$.getUTFEncodingForStream = Clazz_defineMethod (c$, "getUTFEncodingForStream", 
3781  function (is) {
3782 {
3783 is.resetStream();
3784 }var abMagic =  Clazz_newByteArray (4, 0);
3785 abMagic[3] = 1;
3786 try {
3787 is.mark (5);
3788 } catch (e) {
3789 if (Clazz_exceptionOf (e, Exception)) {
3790 return JU.Encoding.NONE;
3791 } else {
3792 throw e;
3793 }
3794 }
3795 is.read (abMagic, 0, 4);
3796 is.reset ();
3797 return JU.Rdr.getUTFEncoding (abMagic);
3798 }, "java.io.BufferedInputStream");
3799 c$.isBase64 = Clazz_defineMethod (c$, "isBase64", 
3800 function (sb) {
3801 return (sb.indexOf (";base64,") == 0);
3802 }, "JU.SB");
3803 c$.isCompoundDocumentS = Clazz_defineMethod (c$, "isCompoundDocumentS", 
3804 function (is) {
3805 return JU.Rdr.isCompoundDocumentB (JU.Rdr.getMagic (is, 8));
3806 }, "java.io.InputStream");
3807 c$.isCompoundDocumentB = Clazz_defineMethod (c$, "isCompoundDocumentB", 
3808 function (bytes) {
3809 return (bytes.length >= 8 && bytes[0] == 0xD0 && bytes[1] == 0xCF && bytes[2] == 0x11 && bytes[3] == 0xE0 && bytes[4] == 0xA1 && bytes[5] == 0xB1 && bytes[6] == 0x1A && bytes[7] == 0xE1);
3810 }, "~A");
3811 c$.isGzipS = Clazz_defineMethod (c$, "isGzipS", 
3812 function (is) {
3813 return JU.Rdr.isGzipB (JU.Rdr.getMagic (is, 2));
3814 }, "java.io.InputStream");
3815 c$.isGzipB = Clazz_defineMethod (c$, "isGzipB", 
3816 function (bytes) {
3817 return (bytes != null && bytes.length >= 2 && bytes[0] == 0x1F && bytes[1] == 0x8B);
3818 }, "~A");
3819 c$.isPickleS = Clazz_defineMethod (c$, "isPickleS", 
3820 function (is) {
3821 return JU.Rdr.isPickleB (JU.Rdr.getMagic (is, 2));
3822 }, "java.io.InputStream");
3823 c$.isPickleB = Clazz_defineMethod (c$, "isPickleB", 
3824 function (bytes) {
3825 return (bytes != null && bytes.length >= 2 && bytes[0] == 0x7D && bytes[1] == 0x71);
3826 }, "~A");
3827 c$.isPngZipStream = Clazz_defineMethod (c$, "isPngZipStream", 
3828 function (is) {
3829 return JU.Rdr.isPngZipB (JU.Rdr.getMagic (is, 55));
3830 }, "java.io.InputStream");
3831 c$.isPngZipB = Clazz_defineMethod (c$, "isPngZipB", 
3832 function (bytes) {
3833 return (bytes[50] == 0 && bytes[51] == 0x50 && bytes[52] == 0x4E && bytes[53] == 0x47 && bytes[54] == 0x4A);
3834 }, "~A");
3835 c$.isZipS = Clazz_defineMethod (c$, "isZipS", 
3836 function (is) {
3837 return JU.Rdr.isZipB (JU.Rdr.getMagic (is, 4));
3838 }, "java.io.InputStream");
3839 c$.isZipB = Clazz_defineMethod (c$, "isZipB", 
3840 function (bytes) {
3841 return (bytes.length >= 4 && bytes[0] == 0x50 && bytes[1] == 0x4B && bytes[2] == 0x03 && bytes[3] == 0x04);
3842 }, "~A");
3843 c$.getMagic = Clazz_defineMethod (c$, "getMagic", 
3844  function (is, n) {
3845 var abMagic =  Clazz_newByteArray (n, 0);
3846 {
3847 is.resetStream();
3848 }try {
3849 is.mark (n + 1);
3850 is.read (abMagic, 0, n);
3851 } catch (e) {
3852 if (Clazz_exceptionOf (e, java.io.IOException)) {
3853 } else {
3854 throw e;
3855 }
3856 }
3857 try {
3858 is.reset ();
3859 } catch (e) {
3860 if (Clazz_exceptionOf (e, java.io.IOException)) {
3861 } else {
3862 throw e;
3863 }
3864 }
3865 return abMagic;
3866 }, "java.io.InputStream,~N");
3867 c$.getBIS = Clazz_defineMethod (c$, "getBIS", 
3868 function (bytes) {
3869 return  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (bytes));
3870 }, "~A");
3871 c$.getBR = Clazz_defineMethod (c$, "getBR", 
3872 function (string) {
3873 return  new java.io.BufferedReader ( new java.io.StringReader (string));
3874 }, "~S");
3875 c$.getUnzippedInputStream = Clazz_defineMethod (c$, "getUnzippedInputStream", 
3876 function (jzt, bis) {
3877 while (JU.Rdr.isGzipS (bis)) bis =  new java.io.BufferedInputStream (JU.Rdr.newGZIPInputStream (jzt, bis));
3878
3879 return bis;
3880 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
3881 c$.getBytesFromSB = Clazz_defineMethod (c$, "getBytesFromSB", 
3882 function (sb) {
3883 return (JU.Rdr.isBase64 (sb) ? JU.Base64.decodeBase64 (sb.substring (8)) : sb.toBytes (0, -1));
3884 }, "JU.SB");
3885 c$.getStreamAsBytes = Clazz_defineMethod (c$, "getStreamAsBytes", 
3886 function (bis, out) {
3887 var buf =  Clazz_newByteArray (1024, 0);
3888 var bytes = (out == null ?  Clazz_newByteArray (4096, 0) : null);
3889 var len = 0;
3890 var totalLen = 0;
3891 while ((len = bis.read (buf, 0, 1024)) > 0) {
3892 totalLen += len;
3893 if (out == null) {
3894 if (totalLen >= bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2);
3895 System.arraycopy (buf, 0, bytes, totalLen - len, len);
3896 } else {
3897 out.write (buf, 0, len);
3898 }}
3899 bis.close ();
3900 if (out == null) {
3901 return JU.AU.arrayCopyByte (bytes, totalLen);
3902 }return totalLen + " bytes";
3903 }, "java.io.BufferedInputStream,JU.OC");
3904 c$.getBufferedReader = Clazz_defineMethod (c$, "getBufferedReader", 
3905 function (bis, charSet) {
3906 if (JU.Rdr.getUTFEncodingForStream (bis) === JU.Encoding.NONE) return  new java.io.BufferedReader ( new java.io.InputStreamReader (bis, (charSet == null ? "UTF-8" : charSet)));
3907 var bytes = JU.Rdr.getLimitedStreamBytes (bis, -1);
3908 bis.close ();
3909 return JU.Rdr.getBR (charSet == null ? JU.Rdr.fixUTF (bytes) :  String.instantialize (bytes, charSet));
3910 }, "java.io.BufferedInputStream,~S");
3911 c$.getLimitedStreamBytes = Clazz_defineMethod (c$, "getLimitedStreamBytes", 
3912 function (is, n) {
3913 var buflen = (n > 0 && n < 1024 ? n : 1024);
3914 var buf =  Clazz_newByteArray (buflen, 0);
3915 var bytes =  Clazz_newByteArray (n < 0 ? 4096 : n, 0);
3916 var len = 0;
3917 var totalLen = 0;
3918 if (n < 0) n = 2147483647;
3919 while (totalLen < n && (len = is.read (buf, 0, buflen)) > 0) {
3920 totalLen += len;
3921 if (totalLen > bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2);
3922 System.arraycopy (buf, 0, bytes, totalLen - len, len);
3923 if (n != 2147483647 && totalLen + buflen > bytes.length) buflen = bytes.length - totalLen;
3924 }
3925 if (totalLen == bytes.length) return bytes;
3926 buf =  Clazz_newByteArray (totalLen, 0);
3927 System.arraycopy (bytes, 0, buf, 0, totalLen);
3928 return buf;
3929 }, "java.io.InputStream,~N");
3930 c$.StreamToUTF8String = Clazz_defineMethod (c$, "StreamToUTF8String", 
3931 function (bis) {
3932 var data =  new Array (1);
3933 try {
3934 JU.Rdr.readAllAsString (JU.Rdr.getBufferedReader (bis, "UTF-8"), -1, true, data, 0);
3935 } catch (e) {
3936 if (Clazz_exceptionOf (e, java.io.IOException)) {
3937 } else {
3938 throw e;
3939 }
3940 }
3941 return data[0];
3942 }, "java.io.BufferedInputStream");
3943 c$.readAllAsString = Clazz_defineMethod (c$, "readAllAsString", 
3944 function (br, nBytesMax, allowBinary, data, i) {
3945 try {
3946 var sb = JU.SB.newN (8192);
3947 var line;
3948 if (nBytesMax < 0) {
3949 line = br.readLine ();
3950 if (allowBinary || line != null && line.indexOf ('\0') < 0 && (line.length != 4 || line.charCodeAt (0) != 65533 || line.indexOf ("PNG") != 1)) {
3951 sb.append (line).appendC ('\n');
3952 while ((line = br.readLine ()) != null) sb.append (line).appendC ('\n');
3953
3954 }} else {
3955 var n = 0;
3956 var len;
3957 while (n < nBytesMax && (line = br.readLine ()) != null) {
3958 if (nBytesMax - n < (len = line.length) + 1) line = line.substring (0, nBytesMax - n - 1);
3959 sb.append (line).appendC ('\n');
3960 n += len + 1;
3961 }
3962 }br.close ();
3963 data[i] = sb.toString ();
3964 return true;
3965 } catch (ioe) {
3966 if (Clazz_exceptionOf (ioe, Exception)) {
3967 data[i] = ioe.toString ();
3968 return false;
3969 } else {
3970 throw ioe;
3971 }
3972 }
3973 }, "java.io.BufferedReader,~N,~B,~A,~N");
3974 c$.getPngZipPointAndCount = Clazz_defineMethod (c$, "getPngZipPointAndCount", 
3975 function (bis, pt_count) {
3976 bis.mark (75);
3977 try {
3978 var data = JU.Rdr.getLimitedStreamBytes (bis, 74);
3979 bis.reset ();
3980 var pt = 0;
3981 for (var i = 64, f = 1; --i > 54; f *= 10) pt += (data[i] - 48) * f;
3982
3983 var n = 0;
3984 for (var i = 74, f = 1; --i > 64; f *= 10) n += (data[i] - 48) * f;
3985
3986 pt_count[0] = pt;
3987 pt_count[1] = n;
3988 } catch (e) {
3989 pt_count[1] = 0;
3990 }
3991 }, "java.io.BufferedInputStream,~A");
3992 c$.getPngZipStream = Clazz_defineMethod (c$, "getPngZipStream", 
3993 function (bis, asNewStream) {
3994 if (!JU.Rdr.isPngZipStream (bis)) return bis;
3995 var data =  Clazz_newByteArray (0, 0);
3996 bis.mark (75);
3997 try {
3998 var pt_count =  Clazz_newIntArray (2, 0);
3999 JU.Rdr.getPngZipPointAndCount (bis, pt_count);
4000 if (pt_count[1] != 0) {
4001 var pt = pt_count[0];
4002 while (pt > 0) pt -= bis.skip (pt);
4003
4004 if (!asNewStream) return bis;
4005 data = JU.Rdr.getLimitedStreamBytes (bis, pt_count[1]);
4006 }} catch (e) {
4007 } finally {
4008 try {
4009 if (asNewStream) bis.close ();
4010 } catch (e) {
4011 if (Clazz_exceptionOf (e, Exception)) {
4012 } else {
4013 throw e;
4014 }
4015 }
4016 }
4017 return JU.Rdr.getBIS (data);
4018 }, "java.io.BufferedInputStream,~B");
4019 c$.readFileAsMap = Clazz_defineMethod (c$, "readFileAsMap", 
4020 function (jzt, is, bdata, name) {
4021 jzt.readFileAsMap (is, bdata, name);
4022 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,java.util.Map,~S");
4023 c$.getZipDirectoryAsStringAndClose = Clazz_defineMethod (c$, "getZipDirectoryAsStringAndClose", 
4024 function (jzt, t) {
4025 return jzt.getZipDirectoryAsStringAndClose (t);
4026 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
4027 c$.newGZIPInputStream = Clazz_defineMethod (c$, "newGZIPInputStream", 
4028 function (jzt, bis) {
4029 return jzt.newGZIPInputStream (bis);
4030 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
4031 c$.newZipInputStream = Clazz_defineMethod (c$, "newZipInputStream", 
4032 function (jzt, $in) {
4033 return jzt.newZipInputStream ($in);
4034 }, "javajs.api.GenericZipTools,java.io.InputStream");
4035 c$.getZipFileDirectory = Clazz_defineMethod (c$, "getZipFileDirectory", 
4036 function (jzt, bis, subFileList, listPtr, asBufferedInputStream) {
4037 return jzt.getZipFileDirectory (jzt, bis, subFileList, listPtr, asBufferedInputStream);
4038 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N,~B");
4039 c$.getZipDirectoryAndClose = Clazz_defineMethod (c$, "getZipDirectoryAndClose", 
4040 function (jzt, t, manifestID) {
4041 return jzt.getZipDirectoryAndClose (t, manifestID);
4042 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~S");
4043 c$.getAllZipData = Clazz_defineMethod (c$, "getAllZipData", 
4044 function (jzt, bis, subFileList, replace, string, fileData) {
4045 jzt.getAllZipData (bis, subFileList, replace, string, fileData);
4046 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~S,~S,java.util.Map");
4047 c$.getZipFileContentsAsBytes = Clazz_defineMethod (c$, "getZipFileContentsAsBytes", 
4048 function (jzt, bis, subFileList, i) {
4049 return jzt.getZipFileContentsAsBytes (bis, subFileList, i);
4050 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N");
4051 c$.addZipEntry = Clazz_defineMethod (c$, "addZipEntry", 
4052 function (jzt, zos, fileName) {
4053 jzt.addZipEntry (zos, fileName);
4054 }, "javajs.api.GenericZipTools,~O,~S");
4055 c$.closeZipEntry = Clazz_defineMethod (c$, "closeZipEntry", 
4056 function (jzt, zos) {
4057 jzt.closeZipEntry (zos);
4058 }, "javajs.api.GenericZipTools,~O");
4059 c$.getZipOutputStream = Clazz_defineMethod (c$, "getZipOutputStream", 
4060 function (jzt, bos) {
4061 return jzt.getZipOutputStream (bos);
4062 }, "javajs.api.GenericZipTools,~O");
4063 c$.getCrcValue = Clazz_defineMethod (c$, "getCrcValue", 
4064 function (jzt, bytes) {
4065 return jzt.getCrcValue (bytes);
4066 }, "javajs.api.GenericZipTools,~A");
4067 c$.getZipRoot = Clazz_defineMethod (c$, "getZipRoot", 
4068 function (fileName) {
4069 var pt = fileName.indexOf ("|");
4070 return (pt < 0 ? fileName : fileName.substring (0, pt));
4071 }, "~S");
4072 });
4073 Clazz_declarePackage ("javajs.api");
4074 Clazz_declareInterface (javajs.api, "GenericLineReader");
4075 Clazz_load (["java.io.FilterInputStream"], "java.io.BufferedInputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException"], function () {
4076 c$ = Clazz_decorateAsClass (function () {
4077 this.buf = null;
4078 this.count = 0;
4079 this.pos = 0;
4080 this.markpos = -1;
4081 this.marklimit = 0;
4082 Clazz_instantialize (this, arguments);
4083 }, java.io, "BufferedInputStream", java.io.FilterInputStream);
4084 Clazz_defineMethod (c$, "getInIfOpen", 
4085  function () {
4086 var input = this.$in;
4087 if (input == null) throw  new java.io.IOException ("Stream closed");
4088 return input;
4089 });
4090 Clazz_defineMethod (c$, "getBufIfOpen", 
4091  function () {
4092 var buffer = this.buf;
4093 if (buffer == null) throw  new java.io.IOException ("Stream closed");
4094 return buffer;
4095 });
4096 Clazz_overrideMethod (c$, "resetStream", 
4097 function () {
4098 });
4099 Clazz_makeConstructor (c$, 
4100 function ($in) {
4101 Clazz_superConstructor (this, java.io.BufferedInputStream, [$in]);
4102 this.buf =  Clazz_newByteArray (8192, 0);
4103 }, "java.io.InputStream");
4104 Clazz_defineMethod (c$, "fill", 
4105  function () {
4106 var buffer = this.getBufIfOpen ();
4107 if (this.markpos < 0) this.pos = 0;
4108  else if (this.pos >= buffer.length) if (this.markpos > 0) {
4109 var sz = this.pos - this.markpos;
4110 System.arraycopy (buffer, this.markpos, buffer, 0, sz);
4111 this.pos = sz;
4112 this.markpos = 0;
4113 } else if (buffer.length >= this.marklimit) {
4114 this.markpos = -1;
4115 this.pos = 0;
4116 } else {
4117 var nsz = this.pos * 2;
4118 if (nsz > this.marklimit) nsz = this.marklimit;
4119 var nbuf =  Clazz_newByteArray (nsz, 0);
4120 System.arraycopy (buffer, 0, nbuf, 0, this.pos);
4121 buffer = this.buf = nbuf;
4122 }this.count = this.pos;
4123 var n = this.getInIfOpen ().read (buffer, this.pos, buffer.length - this.pos);
4124 if (n > 0) this.count = n + this.pos;
4125 });
4126 Clazz_overrideMethod (c$, "readByteAsInt", 
4127 function () {
4128 if (this.pos >= this.count) {
4129 this.fill ();
4130 if (this.pos >= this.count) return -1;
4131 }return this.getBufIfOpen ()[this.pos++] & 0xff;
4132 });
4133 Clazz_defineMethod (c$, "read1", 
4134  function (b, off, len) {
4135 var avail = this.count - this.pos;
4136 if (avail <= 0) {
4137 if (len >= this.getBufIfOpen ().length && this.markpos < 0) {
4138 return this.getInIfOpen ().read (b, off, len);
4139 }this.fill ();
4140 avail = this.count - this.pos;
4141 if (avail <= 0) return -1;
4142 }var cnt = (avail < len) ? avail : len;
4143 System.arraycopy (this.getBufIfOpen (), this.pos, b, off, cnt);
4144 this.pos += cnt;
4145 return cnt;
4146 }, "~A,~N,~N");
4147 Clazz_overrideMethod (c$, "read", 
4148 function (b, off, len) {
4149 if (arguments.length == 1) {
4150   off = 0;
4151   len  = b.length;
4152 }
4153 this.getBufIfOpen ();
4154 if ((off | len | (off + len) | (b.length - (off + len))) < 0) {
4155 throw  new IndexOutOfBoundsException ();
4156 } else if (len == 0) {
4157 return 0;
4158 }var n = 0;
4159 for (; ; ) {
4160 var nread = this.read1 (b, off + n, len - n);
4161 if (nread <= 0) return (n == 0) ? nread : n;
4162 n += nread;
4163 if (n >= len) return n;
4164 var input = this.$in;
4165 if (input != null && input.available () <= 0) return n;
4166 }
4167 }, "~A,~N,~N");
4168 Clazz_overrideMethod (c$, "skip", 
4169 function (n) {
4170 this.getBufIfOpen ();
4171 if (n <= 0) {
4172 return 0;
4173 }var avail = this.count - this.pos;
4174 if (avail <= 0) {
4175 if (this.markpos < 0) return this.getInIfOpen ().skip (n);
4176 this.fill ();
4177 avail = this.count - this.pos;
4178 if (avail <= 0) return 0;
4179 }var skipped = (avail < n) ? avail : n;
4180 this.pos += skipped;
4181 return skipped;
4182 }, "~N");
4183 Clazz_overrideMethod (c$, "available", 
4184 function () {
4185 var n = this.count - this.pos;
4186 var avail = this.getInIfOpen ().available ();
4187 return n > (2147483647 - avail) ? 2147483647 : n + avail;
4188 });
4189 Clazz_overrideMethod (c$, "mark", 
4190 function (readlimit) {
4191 this.marklimit = readlimit;
4192 this.markpos = this.pos;
4193 }, "~N");
4194 Clazz_overrideMethod (c$, "reset", 
4195 function () {
4196 this.getBufIfOpen ();
4197 if (this.markpos < 0) throw  new java.io.IOException ("Resetting to invalid mark");
4198 this.pos = this.markpos;
4199 });
4200 Clazz_overrideMethod (c$, "markSupported", 
4201 function () {
4202 return true;
4203 });
4204 Clazz_overrideMethod (c$, "close", 
4205 function () {
4206 var input = this.$in;
4207 this.$in = null;
4208 if (input != null) input.close ();
4209 return;
4210 });
4211 Clazz_defineStatics (c$,
4212 "DEFAULT_BUFFER_SIZE", 8192);
4213 });
4214 Clazz_load (["java.io.InputStream"], "java.io.FilterInputStream", null, function () {
4215 c$ = Clazz_decorateAsClass (function () {
4216 this.$in = null;
4217 Clazz_instantialize (this, arguments);
4218 }, java.io, "FilterInputStream", java.io.InputStream);
4219 Clazz_makeConstructor (c$, 
4220 function ($in) {
4221 Clazz_superConstructor (this, java.io.FilterInputStream, []);
4222 this.$in = $in;
4223 }, "java.io.InputStream");
4224 Clazz_defineMethod (c$, "readByteAsInt", 
4225 function () {
4226 return this.$in.readByteAsInt ();
4227 });
4228 Clazz_defineMethod (c$, "read", 
4229 function (b, off, len) {
4230     if (arguments.length == 1) { off = 0; len = b.length; }
4231 return this.$in.read (b, off, len);
4232 }, "~A,~N,~N");
4233 Clazz_defineMethod (c$, "skip", 
4234 function (n) {
4235 return this.$in.skip (n);
4236 }, "~N");
4237 Clazz_defineMethod (c$, "available", 
4238 function () {
4239 return this.$in.available ();
4240 });
4241 Clazz_defineMethod (c$, "close", 
4242 function () {
4243 this.$in.close ();
4244 });
4245 Clazz_defineMethod (c$, "mark", 
4246 function (readlimit) {
4247 this.$in.mark (readlimit);
4248 }, "~N");
4249 Clazz_defineMethod (c$, "reset", 
4250 function () {
4251 this.$in.reset ();
4252 });
4253 Clazz_defineMethod (c$, "markSupported", 
4254 function () {
4255 return this.$in.markSupported ();
4256 });
4257 });
4258 Clazz_load (null, "java.io.InputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4259 c$ = Clazz_declareType (java.io, "InputStream");
4260 Clazz_defineMethod (c$, "read", 
4261 function (b, off, len) {
4262 if (b == null) {
4263 throw  new NullPointerException ();
4264
4265     if (arguments.length == 1) { off = 0; len = b.length; }
4266
4267 if (off < 0 || len < 0 || len > b.length - off) {
4268 throw  new IndexOutOfBoundsException ();
4269 } else if (len == 0) {
4270 return 0;
4271 }var c = this.readByteAsInt ();
4272 if (c == -1) {
4273 return -1;
4274 }b[off] = c;
4275 var i = 1;
4276 try {
4277 for (; i < len; i++) {
4278 c = this.readByteAsInt ();
4279 if (c == -1) {
4280 break;
4281 }b[off + i] = c;
4282 }
4283 } catch (ee) {
4284 if (Clazz_exceptionOf (ee, java.io.IOException)) {
4285 } else {
4286 throw ee;
4287 }
4288 }
4289 return i;
4290 }, "~A,~N,~N");
4291 Clazz_defineMethod (c$, "skip", 
4292 function (n) {
4293 var remaining = n;
4294 var nr;
4295 if (java.io.InputStream.skipBuffer == null) java.io.InputStream.skipBuffer =  Clazz_newByteArray (2048, 0);
4296 var localSkipBuffer = java.io.InputStream.skipBuffer;
4297 if (n <= 0) {
4298 return 0;
4299 }while (remaining > 0) {
4300 nr = this.read (localSkipBuffer, 0, Math.min (2048, remaining));
4301 if (nr < 0) {
4302 break;
4303 }remaining -= nr;
4304 }
4305 return n - remaining;
4306 }, "~N");
4307 Clazz_defineMethod (c$, "available", 
4308 function () {
4309 return 0;
4310 });
4311 Clazz_defineMethod (c$, "close", 
4312 function () {
4313 });
4314 Clazz_defineMethod (c$, "mark", 
4315 function (readlimit) {
4316 }, "~N");
4317 Clazz_defineMethod (c$, "reset", 
4318 function () {
4319 throw  new java.io.IOException ("mark/reset not supported");
4320 });
4321 Clazz_defineMethod (c$, "markSupported", 
4322 function () {
4323 return false;
4324 });
4325 Clazz_defineMethod (c$, "resetStream", 
4326 function () {
4327 });
4328 Clazz_defineStatics (c$,
4329 "SKIP_BUFFER_SIZE", 2048,
4330 "skipBuffer", null);
4331 });
4332 Clazz_load (["java.io.Reader"], "java.io.BufferedReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException", "JU.SB"], function () {
4333 c$ = Clazz_decorateAsClass (function () {
4334 this.$in = null;
4335 this.cb = null;
4336 this.nChars = 0;
4337 this.nextChar = 0;
4338 this.markedChar = -1;
4339 this.readAheadLimit = 0;
4340 this.skipLF = false;
4341 this.markedSkipLF = false;
4342 Clazz_instantialize (this, arguments);
4343 }, java.io, "BufferedReader", java.io.Reader);
4344 Clazz_defineMethod (c$, "setSize", 
4345  function (sz) {
4346 if (sz <= 0) throw  new IllegalArgumentException ("Buffer size <= 0");
4347 this.cb =  Clazz_newCharArray (sz, '\0');
4348 this.nextChar = this.nChars = 0;
4349 }, "~N");
4350 Clazz_makeConstructor (c$, 
4351 function ($in) {
4352 Clazz_superConstructor (this, java.io.BufferedReader, [$in]);
4353 this.$in = $in;
4354 this.setSize (8192);
4355 }, "java.io.Reader");
4356 Clazz_defineMethod (c$, "ensureOpen", 
4357  function () {
4358 if (this.$in == null) throw  new java.io.IOException ("Stream closed");
4359 });
4360 Clazz_defineMethod (c$, "fill", 
4361  function () {
4362 var dst;
4363 if (this.markedChar <= -1) {
4364 dst = 0;
4365 } else {
4366 var delta = this.nextChar - this.markedChar;
4367 if (delta >= this.readAheadLimit) {
4368 this.markedChar = -2;
4369 this.readAheadLimit = 0;
4370 dst = 0;
4371 } else {
4372 if (this.readAheadLimit <= this.cb.length) {
4373 System.arraycopy (this.cb, this.markedChar, this.cb, 0, delta);
4374 this.markedChar = 0;
4375 dst = delta;
4376 } else {
4377 var ncb =  Clazz_newCharArray (this.readAheadLimit, '\0');
4378 System.arraycopy (this.cb, this.markedChar, ncb, 0, delta);
4379 this.cb = ncb;
4380 this.markedChar = 0;
4381 dst = delta;
4382 }this.nextChar = this.nChars = delta;
4383 }}var n;
4384 do {
4385 n = this.$in.read (this.cb, dst, this.cb.length - dst);
4386 } while (n == 0);
4387 if (n > 0) {
4388 this.nChars = dst + n;
4389 this.nextChar = dst;
4390 }});
4391 Clazz_defineMethod (c$, "read1", 
4392  function (cbuf, off, len) {
4393 if (this.nextChar >= this.nChars) {
4394 if (len >= this.cb.length && this.markedChar <= -1 && !this.skipLF) {
4395 return this.$in.read (cbuf, off, len);
4396 }this.fill ();
4397 }if (this.nextChar >= this.nChars) return -1;
4398 if (this.skipLF) {
4399 this.skipLF = false;
4400 if (this.cb[this.nextChar] == '\n') {
4401 this.nextChar++;
4402 if (this.nextChar >= this.nChars) this.fill ();
4403 if (this.nextChar >= this.nChars) return -1;
4404 }}var n = Math.min (len, this.nChars - this.nextChar);
4405 System.arraycopy (this.cb, this.nextChar, cbuf, off, n);
4406 this.nextChar += n;
4407 return n;
4408 }, "~A,~N,~N");
4409 Clazz_defineMethod (c$, "read", 
4410 function (cbuf, off, len) {
4411 {
4412 this.ensureOpen ();
4413 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4414 throw  new IndexOutOfBoundsException ();
4415 } else if (len == 0) {
4416 return 0;
4417 }var n = this.read1 (cbuf, off, len);
4418 if (n <= 0) return n;
4419 while ((n < len) && this.$in.ready ()) {
4420 var n1 = this.read1 (cbuf, off + n, len - n);
4421 if (n1 <= 0) break;
4422 n += n1;
4423 }
4424 return n;
4425 }}, "~A,~N,~N");
4426 Clazz_defineMethod (c$, "readLine1", 
4427  function (ignoreLF) {
4428 var s = null;
4429 var startChar;
4430 {
4431 this.ensureOpen ();
4432 var omitLF = ignoreLF || this.skipLF;
4433 for (; ; ) {
4434 if (this.nextChar >= this.nChars) this.fill ();
4435 if (this.nextChar >= this.nChars) {
4436 if (s != null && s.length () > 0) return s.toString ();
4437 return null;
4438 }var eol = false;
4439 var c = String.fromCharCode (0);
4440 var i;
4441 if (omitLF && (this.cb[this.nextChar] == '\n')) this.nextChar++;
4442 this.skipLF = false;
4443 omitLF = false;
4444 charLoop : for (i = this.nextChar; i < this.nChars; i++) {
4445 c = this.cb[i];
4446 if ((c == '\n') || (c == '\r')) {
4447 eol = true;
4448 break charLoop;
4449 }}
4450 startChar = this.nextChar;
4451 this.nextChar = i;
4452 if (eol) {
4453 var str;
4454 if (s == null) {
4455 str =  String.instantialize (this.cb, startChar, i - startChar);
4456 } else {
4457 s.appendCB (this.cb, startChar, i - startChar);
4458 str = s.toString ();
4459 }this.nextChar++;
4460 if (c == '\r') {
4461 this.skipLF = true;
4462 }return str;
4463 }if (s == null) s = JU.SB.newN (80);
4464 s.appendCB (this.cb, startChar, i - startChar);
4465 }
4466 }}, "~B");
4467 Clazz_defineMethod (c$, "readLine", 
4468 function () {
4469 return this.readLine1 (false);
4470 });
4471 Clazz_overrideMethod (c$, "skip", 
4472 function (n) {
4473 if (n < 0) {
4474 throw  new IllegalArgumentException ("skip value is negative");
4475 }{
4476 this.ensureOpen ();
4477 var r = n;
4478 while (r > 0) {
4479 if (this.nextChar >= this.nChars) this.fill ();
4480 if (this.nextChar >= this.nChars) break;
4481 if (this.skipLF) {
4482 this.skipLF = false;
4483 if (this.cb[this.nextChar] == '\n') {
4484 this.nextChar++;
4485 }}var d = this.nChars - this.nextChar;
4486 if (r <= d) {
4487 this.nextChar += r;
4488 r = 0;
4489 break;
4490 }r -= d;
4491 this.nextChar = this.nChars;
4492 }
4493 return n - r;
4494 }}, "~N");
4495 Clazz_defineMethod (c$, "ready", 
4496 function () {
4497 {
4498 this.ensureOpen ();
4499 if (this.skipLF) {
4500 if (this.nextChar >= this.nChars && this.$in.ready ()) {
4501 this.fill ();
4502 }if (this.nextChar < this.nChars) {
4503 if (this.cb[this.nextChar] == '\n') this.nextChar++;
4504 this.skipLF = false;
4505 }}return (this.nextChar < this.nChars) || this.$in.ready ();
4506 }});
4507 Clazz_overrideMethod (c$, "markSupported", 
4508 function () {
4509 return true;
4510 });
4511 Clazz_overrideMethod (c$, "mark", 
4512 function (readAheadLimit) {
4513 if (readAheadLimit < 0) {
4514 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4515 }{
4516 this.ensureOpen ();
4517 this.readAheadLimit = readAheadLimit;
4518 this.markedChar = this.nextChar;
4519 this.markedSkipLF = this.skipLF;
4520 }}, "~N");
4521 Clazz_overrideMethod (c$, "reset", 
4522 function () {
4523 {
4524 this.ensureOpen ();
4525 if (this.markedChar < 0) throw  new java.io.IOException ((this.markedChar == -2) ? "Mark invalid" : "Stream not marked");
4526 this.nextChar = this.markedChar;
4527 this.skipLF = this.markedSkipLF;
4528 }});
4529 Clazz_defineMethod (c$, "close", 
4530 function () {
4531 {
4532 if (this.$in == null) return;
4533 this.$in.close ();
4534 this.$in = null;
4535 this.cb = null;
4536 }});
4537 Clazz_defineStatics (c$,
4538 "INVALIDATED", -2,
4539 "UNMARKED", -1,
4540 "DEFAULT_CHAR_BUFFER_SIZE", 8192,
4541 "DEFAULT_EXPECTED_LINE_LENGTH", 80);
4542 });
4543 Clazz_load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4544 c$ = Clazz_decorateAsClass (function () {
4545 this.buf = null;
4546 this.pos = 0;
4547 this.$mark = 0;
4548 this.count = 0;
4549 Clazz_instantialize (this, arguments);
4550 }, java.io, "ByteArrayInputStream", java.io.InputStream);
4551 Clazz_makeConstructor (c$, 
4552 function (buf) {
4553 Clazz_superConstructor (this, java.io.ByteArrayInputStream, []);
4554 this.buf = buf;
4555 this.pos = 0;
4556 this.count = buf.length;
4557 }, "~A");
4558 Clazz_overrideMethod (c$, "readByteAsInt", 
4559 function () {
4560 return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1;
4561 });
4562 Clazz_overrideMethod (c$, "read", 
4563 function (b, off, len) {
4564 if (b == null) {
4565 throw  new NullPointerException ();
4566 }
4567     if (arguments.length == 1) { off = 0; len = b.length; }
4568
4569 if (off < 0 || len < 0 || len > b.length - off) {
4570 throw  new IndexOutOfBoundsException ();
4571 }if (this.pos >= this.count) {
4572 return -1;
4573 }var avail = this.count - this.pos;
4574 if (len > avail) {
4575 len = avail;
4576 }if (len <= 0) {
4577 return 0;
4578 }System.arraycopy (this.buf, this.pos, b, off, len);
4579 this.pos += len;
4580 return len;
4581 }, "~A,~N,~N");
4582 Clazz_overrideMethod (c$, "skip", 
4583 function (n) {
4584 var k = this.count - this.pos;
4585 if (n < k) {
4586 k = n < 0 ? 0 : n;
4587 }this.pos += k;
4588 return k;
4589 }, "~N");
4590 Clazz_overrideMethod (c$, "available", 
4591 function () {
4592 return this.count - this.pos;
4593 });
4594 Clazz_overrideMethod (c$, "markSupported", 
4595 function () {
4596 return true;
4597 });
4598 Clazz_overrideMethod (c$, "mark", 
4599 function (readAheadLimit) {
4600 this.$mark = this.pos;
4601 }, "~N");
4602 Clazz_overrideMethod (c$, "resetStream", 
4603 function () {
4604 });
4605 Clazz_overrideMethod (c$, "reset", 
4606 function () {
4607 this.pos = this.$mark;
4608 });
4609 Clazz_overrideMethod (c$, "close", 
4610 function () {
4611 });
4612 });
4613 Clazz_load (["java.io.Closeable"], "java.io.Reader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.NullPointerException"], function () {
4614 c$ = Clazz_decorateAsClass (function () {
4615 this.lock = null;
4616 this.skipBuffer = null;
4617 Clazz_instantialize (this, arguments);
4618 }, java.io, "Reader", null, java.io.Closeable);
4619 Clazz_makeConstructor (c$, 
4620 function (lock) {
4621 if (lock == null) {
4622 throw  new NullPointerException ();
4623 }this.lock = lock;
4624 }, "~O");
4625 Clazz_defineMethod (c$, "skip", 
4626 function (n) {
4627 if (n < 0) throw  new IllegalArgumentException ("skip value is negative");
4628 var nn = Math.min (n, 8192);
4629 {
4630 if ((this.skipBuffer == null) || (this.skipBuffer.length < nn)) this.skipBuffer =  Clazz_newCharArray (nn, '\0');
4631 var r = n;
4632 while (r > 0) {
4633 var nc = this.read (this.skipBuffer, 0, Math.min (r, nn));
4634 if (nc == -1) break;
4635 r -= nc;
4636 }
4637 return n - r;
4638 }}, "~N");
4639 Clazz_defineMethod (c$, "ready", 
4640 function () {
4641 return false;
4642 });
4643 Clazz_defineMethod (c$, "markSupported", 
4644 function () {
4645 return false;
4646 });
4647 Clazz_defineMethod (c$, "mark", 
4648 function (readAheadLimit) {
4649 throw  new java.io.IOException ("mark() not supported");
4650 }, "~N");
4651 Clazz_defineMethod (c$, "reset", 
4652 function () {
4653 throw  new java.io.IOException ("reset() not supported");
4654 });
4655 Clazz_defineStatics (c$,
4656 "MAX_SKIP_BUFFE_SIZE", 8192);
4657 });
4658 Clazz_load (["java.io.Reader"], "java.io.StringReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException"], function () {
4659 c$ = Clazz_decorateAsClass (function () {
4660 this.str = null;
4661 this.length = 0;
4662 this.next = 0;
4663 this.$mark = 0;
4664 Clazz_instantialize (this, arguments);
4665 }, java.io, "StringReader", java.io.Reader);
4666 Clazz_makeConstructor (c$, 
4667 function (s) {
4668 Clazz_superConstructor (this, java.io.StringReader, [s]);
4669 this.str = s;
4670 this.length = s.length;
4671 }, "~S");
4672 Clazz_defineMethod (c$, "ensureOpen", 
4673  function () {
4674 if (this.str == null) throw  new java.io.IOException ("Stream closed");
4675 });
4676 Clazz_overrideMethod (c$, "read", 
4677 function (cbuf, off, len) {
4678 {
4679 this.ensureOpen ();
4680 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4681 throw  new IndexOutOfBoundsException ();
4682 } else if (len == 0) {
4683 return 0;
4684 }if (this.next >= this.length) return -1;
4685 var n = Math.min (this.length - this.next, len);
4686 this.str.getChars (this.next, this.next + n, cbuf, off);
4687 this.next += n;
4688 return n;
4689 }}, "~A,~N,~N");
4690 Clazz_overrideMethod (c$, "skip", 
4691 function (ns) {
4692 {
4693 this.ensureOpen ();
4694 if (this.next >= this.length) return 0;
4695 var n = Math.min (this.length - this.next, ns);
4696 n = Math.max (-this.next, n);
4697 this.next += n;
4698 return n;
4699 }}, "~N");
4700 Clazz_overrideMethod (c$, "ready", 
4701 function () {
4702 {
4703 this.ensureOpen ();
4704 return true;
4705 }});
4706 Clazz_overrideMethod (c$, "markSupported", 
4707 function () {
4708 return true;
4709 });
4710 Clazz_overrideMethod (c$, "mark", 
4711 function (readAheadLimit) {
4712 if (readAheadLimit < 0) {
4713 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4714 }{
4715 this.ensureOpen ();
4716 this.$mark = this.next;
4717 }}, "~N");
4718 Clazz_overrideMethod (c$, "reset", 
4719 function () {
4720 {
4721 this.ensureOpen ();
4722 this.next = this.$mark;
4723 }});
4724 Clazz_overrideMethod (c$, "close", 
4725 function () {
4726 this.str = null;
4727 });
4728 });
4729 Clazz_declarePackage ("JU");
4730 Clazz_load (null, "JU.Base64", ["JU.SB"], function () {
4731 c$ = Clazz_declareType (JU, "Base64");
4732 c$.getBytes64 = Clazz_defineMethod (c$, "getBytes64", 
4733 function (bytes) {
4734 return JU.Base64.getBase64 (bytes).toBytes (0, -1);
4735 }, "~A");
4736 c$.getBase64 = Clazz_defineMethod (c$, "getBase64", 
4737 function (bytes) {
4738 var nBytes = bytes.length;
4739 var sout =  new JU.SB ();
4740 if (nBytes == 0) return sout;
4741 for (var i = 0, nPad = 0; i < nBytes && nPad == 0; ) {
4742 if (i % 75 == 0 && i != 0) sout.append ("\r\n");
4743 nPad = (i + 2 == nBytes ? 1 : i + 1 == nBytes ? 2 : 0);
4744 var outbytes = ((bytes[i++] << 16) & 0xFF0000) | ((nPad == 2 ? 0 : bytes[i++] << 8) & 0x00FF00) | ((nPad >= 1 ? 0 : bytes[i++]) & 0x0000FF);
4745 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 18) & 0x3F));
4746 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 12) & 0x3F));
4747 sout.appendC (nPad == 2 ? '=' : JU.Base64.base64.charAt ((outbytes >> 6) & 0x3F));
4748 sout.appendC (nPad >= 1 ? '=' : JU.Base64.base64.charAt (outbytes & 0x3F));
4749 }
4750 return sout;
4751 }, "~A");
4752 c$.decodeBase64 = Clazz_defineMethod (c$, "decodeBase64", 
4753 function (strBase64) {
4754 var nBytes = 0;
4755 var ch;
4756 var pt0 = strBase64.indexOf (";base64,") + 1;
4757 if (pt0 > 0) pt0 += 7;
4758 var chars64 = strBase64.toCharArray ();
4759 var len64 = chars64.length;
4760 if (len64 == 0) return  Clazz_newByteArray (0, 0);
4761 for (var i = len64; --i >= pt0; ) nBytes += ((ch = (chars64[i]).charCodeAt (0) & 0x7F) == 65 || JU.Base64.decode64[ch] > 0 ? 3 : 0);
4762
4763 nBytes = nBytes >> 2;
4764 var bytes =  Clazz_newByteArray (nBytes, 0);
4765 var offset = 18;
4766 for (var i = pt0, pt = 0, b = 0; i < len64; i++) {
4767 if (JU.Base64.decode64[ch = (chars64[i]).charCodeAt (0) & 0x7F] > 0 || ch == 65 || ch == 61) {
4768 b |= JU.Base64.decode64[ch] << offset;
4769 offset -= 6;
4770 if (offset < 0) {
4771 bytes[pt++] = ((b & 0xFF0000) >> 16);
4772 if (pt < nBytes) bytes[pt++] = ((b & 0xFF00) >> 8);
4773 if (pt < nBytes) bytes[pt++] = (b & 0xFF);
4774 offset = 18;
4775 b = 0;
4776 }}}
4777 return bytes;
4778 }, "~S");
4779 Clazz_defineStatics (c$,
4780 "base64", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
4781 "decode64",  Clazz_newIntArray (-1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 62, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 63, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0]));
4782 });
4783 Clazz_declarePackage ("JU");
4784 Clazz_load (["java.lang.Enum"], "JU.Encoding", null, function () {
4785 c$ = Clazz_declareType (JU, "Encoding", Enum);
4786 Clazz_defineEnumConstant (c$, "NONE", 0, []);
4787 Clazz_defineEnumConstant (c$, "UTF8", 1, []);
4788 Clazz_defineEnumConstant (c$, "UTF_16BE", 2, []);
4789 Clazz_defineEnumConstant (c$, "UTF_16LE", 3, []);
4790 Clazz_defineEnumConstant (c$, "UTF_32BE", 4, []);
4791 Clazz_defineEnumConstant (c$, "UTF_32LE", 5, []);
4792 });
4793 Clazz_declarePackage ("java.util");
4794 Clazz_load (["java.lang.RuntimeException"], "java.util.MissingResourceException", null, function () {
4795 c$ = Clazz_decorateAsClass (function () {
4796 this.className = null;
4797 this.key = null;
4798 Clazz_instantialize (this, arguments);
4799 }, java.util, "MissingResourceException", RuntimeException);
4800 Clazz_makeConstructor (c$, 
4801 function (s, className, key) {
4802 Clazz_superConstructor (this, java.util.MissingResourceException, [s]);
4803 this.className = className;
4804 this.key = key;
4805 }, "~S,~S,~S");
4806 Clazz_makeConstructor (c$, 
4807 function (message, className, key, cause) {
4808 Clazz_superConstructor (this, java.util.MissingResourceException, [message, cause]);
4809 this.className = className;
4810 this.key = key;
4811 }, "~S,~S,~S,Throwable");
4812 Clazz_defineMethod (c$, "getClassName", 
4813 function () {
4814 return this.className;
4815 });
4816 Clazz_defineMethod (c$, "getKey", 
4817 function () {
4818 return this.key;
4819 });
4820 });
4821 Clazz_declarePackage ("jssun.misc");
4822 Clazz_load (null, "jssun.misc.MessageUtils", ["java.lang.Character", "$.StringBuffer"], function () {
4823 c$ = Clazz_declareType (jssun.misc, "MessageUtils");
4824 Clazz_makeConstructor (c$, 
4825 function () {
4826 });
4827 c$.subst = Clazz_defineMethod (c$, "subst", 
4828 function (patt, arg) {
4829 var args =  Clazz_newArray (-1, [arg]);
4830 return jssun.misc.MessageUtils.subst (patt, args);
4831 }, "~S,~S");
4832 c$.subst = Clazz_defineMethod (c$, "subst", 
4833 function (patt, arg1, arg2) {
4834 var args =  Clazz_newArray (-1, [arg1, arg2]);
4835 return jssun.misc.MessageUtils.subst (patt, args);
4836 }, "~S,~S,~S");
4837 c$.subst = Clazz_defineMethod (c$, "subst", 
4838 function (patt, arg1, arg2, arg3) {
4839 var args =  Clazz_newArray (-1, [arg1, arg2, arg3]);
4840 return jssun.misc.MessageUtils.subst (patt, args);
4841 }, "~S,~S,~S,~S");
4842 c$.subst = Clazz_defineMethod (c$, "subst", 
4843 function (patt, args) {
4844 var result =  new StringBuffer ();
4845 var len = patt.length;
4846 for (var i = 0; i >= 0 && i < len; i++) {
4847 var ch = patt.charAt (i);
4848 if (ch == '%') {
4849 if (i != len) {
4850 var index = Character.digit (patt.charAt (i + 1), 10);
4851 if (index == -1) {
4852 result.append (patt.charAt (i + 1));
4853 i++;
4854 } else if (index < args.length) {
4855 result.append (args[index]);
4856 i++;
4857 }}} else {
4858 result.append (ch);
4859 }}
4860 return result.toString ();
4861 }, "~S,~A");
4862 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4863 function (propName, arg) {
4864 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg);
4865 }, "~S,~S");
4866 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4867 function (propName, arg1, arg2) {
4868 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2);
4869 }, "~S,~S,~S");
4870 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4871 function (propName, arg1, arg2, arg3) {
4872 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2, arg3);
4873 }, "~S,~S,~S,~S");
4874 c$.toStderr = Clazz_defineMethod (c$, "toStderr", 
4875 function (msg) {
4876 {
4877 System.out.println(msg);
4878 }}, "~S");
4879 c$.toStdout = Clazz_defineMethod (c$, "toStdout", 
4880 function (msg) {
4881 {
4882 System.out.println(msg);
4883 }}, "~S");
4884 c$.err = Clazz_defineMethod (c$, "err", 
4885 function (s) {
4886 jssun.misc.MessageUtils.toStderr (s + "\n");
4887 }, "~S");
4888 c$.out = Clazz_defineMethod (c$, "out", 
4889 function (s) {
4890 jssun.misc.MessageUtils.toStdout (s + "\n");
4891 }, "~S");
4892 c$.where = Clazz_defineMethod (c$, "where", 
4893 function () {
4894 {
4895 System.out.println(Clazz_getStackTrace());
4896 }});
4897 });
4898 Clazz_declarePackage ("java.awt");
4899 Clazz_load (["java.awt.geom.Dimension2D"], "java.awt.Dimension", null, function () {
4900 c$ = Clazz_decorateAsClass (function () {
4901 this.width = 0;
4902 this.height = 0;
4903 Clazz_instantialize (this, arguments);
4904 }, java.awt, "Dimension", java.awt.geom.Dimension2D);
4905 Clazz_makeConstructor (c$, 
4906 function () {
4907 this.construct (0, 0);
4908 });
4909 Clazz_makeConstructor (c$, 
4910 function (d) {
4911 this.construct (d.width, d.height);
4912 }, "java.awt.Dimension");
4913 Clazz_makeConstructor (c$, 
4914 function (width, height) {
4915 Clazz_superConstructor (this, java.awt.Dimension, []);
4916 this.width = width;
4917 this.height = height;
4918 }, "~N,~N");
4919 Clazz_overrideMethod (c$, "getWidth", 
4920 function () {
4921 return this.width;
4922 });
4923 Clazz_overrideMethod (c$, "getHeight", 
4924 function () {
4925 return this.height;
4926 });
4927 Clazz_defineMethod (c$, "setSize", 
4928 function (width, height) {
4929 this.width = Clazz_doubleToInt (Math.ceil (width));
4930 this.height = Clazz_doubleToInt (Math.ceil (height));
4931 }, "~N,~N");
4932 Clazz_defineMethod (c$, "getSize", 
4933 function () {
4934 return  new java.awt.Dimension (this.width, this.height);
4935 });
4936 Clazz_defineMethod (c$, "setSize", 
4937 function (d) {
4938 this.setSize (d.width, d.height);
4939 }, "java.awt.Dimension");
4940 Clazz_defineMethod (c$, "setSize", 
4941 function (width, height) {
4942 this.width = width;
4943 this.height = height;
4944 }, "~N,~N");
4945 Clazz_overrideMethod (c$, "equals", 
4946 function (obj) {
4947 if (Clazz_instanceOf (obj, java.awt.Dimension)) {
4948 var d = obj;
4949 return (this.width == d.width) && (this.height == d.height);
4950 }return false;
4951 }, "~O");
4952 Clazz_overrideMethod (c$, "hashCode", 
4953 function () {
4954 var sum = this.width + this.height;
4955 return Clazz_doubleToInt (sum * (sum + 1) / 2) + this.width;
4956 });
4957 Clazz_overrideMethod (c$, "toString", 
4958 function () {
4959 return this.getClass ().getName () + "[width=" + this.width + ",height=" + this.height + "]";
4960 });
4961 });
4962 Clazz_declarePackage ("java.awt.geom");
4963 Clazz_load (null, "java.awt.geom.Dimension2D", ["java.lang.InternalError"], function () {
4964 c$ = Clazz_declareType (java.awt.geom, "Dimension2D", null, Cloneable);
4965 Clazz_makeConstructor (c$, 
4966 function () {
4967 });
4968 Clazz_defineMethod (c$, "setSize", 
4969 function (d) {
4970 this.setSize (d.getWidth (), d.getHeight ());
4971 }, "java.awt.geom.Dimension2D");
4972 Clazz_defineMethod (c$, "clone", 
4973 function () {
4974 try {
4975 return Clazz_superCall (this, java.awt.geom.Dimension2D, "clone", []);
4976 } catch (e) {
4977 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
4978 throw  new InternalError ();
4979 } else {
4980 throw e;
4981 }
4982 }
4983 });
4984 });
4985 Clazz_declarePackage ("java.awt");
4986 Clazz_load (["java.awt.Container"], "java.awt.Panel", ["java.awt.FlowLayout"], function () {
4987 c$ = Clazz_declareType (java.awt, "Panel", java.awt.Container);
4988 Clazz_makeConstructor (c$, 
4989 function () {
4990 Clazz_superConstructor (this, java.awt.Panel, []);
4991 this.setPanel ();
4992 });
4993 Clazz_defineMethod (c$, "setPanel", 
4994 function () {
4995 this.setAppContext ();
4996 this.setLayout ( new java.awt.FlowLayout ());
4997 });
4998 Clazz_makeConstructor (c$, 
4999 function (layout) {
5000 Clazz_superConstructor (this, java.awt.Panel, []);
5001 if (layout == null) layout =  new java.awt.FlowLayout ();
5002 this.setAppContext ();
5003 this.setLayout (layout);
5004 }, "java.awt.LayoutManager");
5005 Clazz_overrideMethod (c$, "constructComponentName", 
5006 function () {
5007 {
5008 return "panel" + java.awt.Panel.nameCounter++;
5009 }});
5010 Clazz_defineMethod (c$, "addNotify", 
5011 function () {
5012 if (this.peer == null) this.peer = this.getToolkit ().createPanel (this);
5013 Clazz_superCall (this, java.awt.Panel, "addNotify", []);
5014 });
5015 Clazz_defineStatics (c$,
5016 "base", "panel",
5017 "nameCounter", 0);
5018 });
5019 Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){
5020 c$=Clazz_decorateAsClass(function(){
5021 this.firstIndex=0;
5022 this.lastIndex=0;
5023 this.array=null;
5024 Clazz_instantialize(this,arguments);
5025 },java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);
5026
5027 Clazz_overrideConstructor(c$,
5028 function(){
5029 this.setup(0);
5030 });
5031
5032 Clazz_defineMethod(c$, "setup",
5033 function(capacity){
5034 //Clazz_superConstructor(this,java.util.ArrayList,[]);
5035 this.firstIndex=this.lastIndex=0;
5036 try{
5037 this.array=this.newElementArray(capacity);
5038 }catch(e){
5039 if(Clazz_instanceOf(e,NegativeArraySizeException)){
5040 throw new IllegalArgumentException();
5041 }else{
5042 throw e;
5043 }
5044 }
5045 },"~N");
5046 /*
5047 Clazz_makeConstructor(c$,
5048 function(collection){
5049 Clazz_superConstructor(this,java.util.ArrayList,[]);
5050 var size=collection.size();
5051 this.firstIndex=this.lastIndex=0;
5052 this.array=this.newElementArray(size+(Math.floor(size/10)));
5053 this.addAll(collection);
5054 },"java.util.Collection");
5055
5056 */
5057
5058 Clazz_defineMethod(c$,"newElementArray",
5059 ($fz=function(size){
5060 return new Array(size);
5061 },$fz.isPrivate=true,$fz),"~N");
5062
5063 Clazz_overrideMethod(c$,"add",
5064 function(location,object){
5065
5066 if (arguments.length == 1) {
5067         // coming from Java methods, e.g. Collections.list()
5068         // location is actually the object
5069         return this.add1(location);
5070 }
5071 var size=this.size();
5072 if(0<location&&location<size){
5073 if(this.firstIndex==0&&this.lastIndex==this.array.length){
5074 this.growForInsert(location,1);
5075 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex==this.array.length){
5076 System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,location);
5077 }else{
5078 var index=location+this.firstIndex;
5079 System.arraycopy(this.array,index,this.array,index+1,size-location);
5080 this.lastIndex++;
5081 }this.array[location+this.firstIndex]=object;
5082 }else if(location==0){
5083 if(this.firstIndex==0){
5084 this.growAtFront(1);
5085 }this.array[--this.firstIndex]=object;
5086 }else if(location==size){
5087 if(this.lastIndex==this.array.length){
5088 this.growAtEnd(1);
5089 }this.array[this.lastIndex++]=object;
5090 }else{
5091 throw new IndexOutOfBoundsException();
5092 }this.modCount++;
5093 },"~N,~O");
5094
5095 Clazz_overrideMethod(c$,"add1",
5096 function(object){
5097 if(this.lastIndex==this.array.length){
5098 this.growAtEnd(1);
5099 }this.array[this.lastIndex++]=object;
5100 this.modCount++;
5101 return true;
5102 },"~O");
5103
5104 /* BH disallow addAll(int,List)
5105  * 
5106 Clazz_defineMethod(c$,"addAll",
5107 function(location,collection){
5108 var size=this.size();
5109 if(location<0||location>size){
5110 throw new IndexOutOfBoundsException();
5111 }var growSize=collection.size();
5112 if(0<location&&location<size){
5113 if(this.array.length-size<growSize){
5114 this.growForInsert(location,growSize);
5115 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex>this.array.length-growSize){
5116 var newFirst=this.firstIndex-growSize;
5117 if(newFirst<0){
5118 var index=location+this.firstIndex;
5119 System.arraycopy(this.array,index,this.array,index-newFirst,size-location);
5120 this.lastIndex-=newFirst;
5121 newFirst=0;
5122 }System.arraycopy(this.array,this.firstIndex,this.array,newFirst,location);
5123 this.firstIndex=newFirst;
5124 }else{
5125 var index=location+this.firstIndex;
5126 System.arraycopy(this.array,index,this.array,index+growSize,size-location);
5127 this.lastIndex+=growSize;
5128 }}else if(location==0){
5129 this.growAtFront(growSize);
5130 this.firstIndex-=growSize;
5131 }else if(location==size){
5132 if(this.lastIndex>this.array.length-growSize){
5133 this.growAtEnd(growSize);
5134 }this.lastIndex+=growSize;
5135 }if(growSize>0){
5136 var it=collection.iterator();
5137 var index=location+this.firstIndex;
5138 var end=index+growSize;
5139 while(index<end){
5140 this.array[index++]=it.next();
5141 }
5142 this.modCount++;
5143 return true;
5144 }return false;
5145 },"~N,java.util.Collection");
5146
5147  */
5148
5149 Clazz_overrideMethod(c$,"addAll",
5150 function(collection){
5151 var growSize=collection.size();
5152 if(growSize>0){
5153         if(this.lastIndex>this.array.length-growSize){
5154                 this.growAtEnd(growSize);
5155 }
5156 var it=collection.iterator();
5157 var end=this.lastIndex+growSize;
5158 while(this.lastIndex<end){
5159         this.array[this.lastIndex++]=it.next();
5160 }
5161 this.modCount++;
5162 return true;
5163 }return false;
5164 },"java.util.Collection");
5165
5166 Clazz_overrideMethod(c$,"clear",
5167 function(){
5168 if(this.firstIndex!=this.lastIndex){
5169 this.fill(this.firstIndex,this.lastIndex);
5170 this.firstIndex=this.lastIndex=0;
5171 this.modCount++;
5172 }});
5173
5174 Clazz_defineMethod(c$,"fill", function(i1, i2) { // BH
5175 for (var i = i2; --i >= i1;)
5176 this.array[i] = null;
5177 },"~N,~N");
5178
5179 Clazz_defineMethod(c$,"clone",
5180 function(){
5181 try{
5182 var newList=Clazz_superCall(this,java.util.ArrayList,"clone",[]);
5183 newList.array=this.array.clone();
5184 return newList;
5185 }catch(e){
5186 if(Clazz_instanceOf(e,CloneNotSupportedException)){
5187 return null;
5188 }else{
5189 throw e;
5190 }
5191 }
5192 });
5193 Clazz_overrideMethod(c$,"contains",
5194 function(object){
5195 if(object!=null){
5196 for(var i=this.firstIndex;i<this.lastIndex;i++){
5197 if(object.equals(this.array[i])){
5198 return true;
5199 }}
5200 }else{
5201 for(var i=this.firstIndex;i<this.lastIndex;i++){
5202 if(this.array[i]==null){
5203 return true;
5204 }}
5205 }return false;
5206 },"~O");
5207 Clazz_defineMethod(c$,"ensureCapacity",
5208 function(minimumCapacity){
5209 if(this.array.length<minimumCapacity){
5210 if(this.firstIndex>0){
5211 this.growAtFront(minimumCapacity-this.array.length);
5212 }else{
5213 this.growAtEnd(minimumCapacity-this.array.length);
5214 }}},"~N");
5215 Clazz_overrideMethod(c$,"get",
5216 function(location){
5217 if(0<=location&&location<this.size()){
5218 return this.array[this.firstIndex+location];
5219 }throw new IndexOutOfBoundsException();
5220 },"~N");
5221
5222
5223 Clazz_defineMethod(c$,"growAtEnd",
5224 ($fz=function(required){
5225 var size=this.size();
5226 if(this.firstIndex>=required-(this.array.length-this.lastIndex)){
5227         var newLast=this.lastIndex-this.firstIndex;
5228         if(size>0){
5229                 System.arraycopy(this.array,this.firstIndex,this.array,0,size);
5230                 var start=newLast<this.firstIndex?this.firstIndex:newLast;
5231                 this.fill(start,this.array.length);
5232         }
5233         this.firstIndex=0;
5234         this.lastIndex=newLast;
5235 }else{
5236         var increment=Math.floor(size/2);
5237         if(required>increment){
5238                 increment=required;
5239         }
5240         if(increment<12){
5241                 increment=12;
5242         }
5243         var newArray=this.newElementArray(size+increment);
5244         if(size>0){
5245                 System.arraycopy(this.array,this.firstIndex,newArray,this.firstIndex,size);
5246         }
5247         this.array=newArray;
5248 }
5249
5250 },$fz.isPrivate=true,$fz),"~N");
5251 Clazz_defineMethod(c$,"growAtFront",
5252 ($fz=function(required){
5253 var size=this.size();
5254 if(this.array.length-this.lastIndex>=required){
5255 var newFirst=this.array.length-size;
5256 if(size>0){
5257 System.arraycopy(this.array,this.firstIndex,this.array,newFirst,size);
5258 var length=this.firstIndex+size>newFirst?newFirst:this.firstIndex+size;
5259 this.fill(this.firstIndex,length);
5260 }this.firstIndex=newFirst;
5261 this.lastIndex=this.array.length;
5262 }else{
5263 var increment=Math.floor(size/2);
5264 if(required>increment){
5265 increment=required;
5266 }if(increment<12){
5267 increment=12;
5268 }var newArray=this.newElementArray(size+increment);
5269 if(size>0){
5270 System.arraycopy(this.array,this.firstIndex,newArray,newArray.length-size,size);
5271 }this.firstIndex=newArray.length-size;
5272 this.lastIndex=newArray.length;
5273 this.array=newArray;
5274 }},$fz.isPrivate=true,$fz),"~N");
5275 Clazz_defineMethod(c$,"growForInsert",
5276 ($fz=function(location,required){
5277 var size=this.size();
5278 var increment=Math.floor(size/2);
5279 if(required>increment){
5280 increment=required;
5281 }if(increment<12){
5282 increment=12;
5283 }var newArray=this.newElementArray(size+increment);
5284 if(location<Math.floor(size/2)){
5285 var newFirst=newArray.length-(size+required);
5286 System.arraycopy(this.array,location,newArray,location+increment,size-location);
5287 System.arraycopy(this.array,this.firstIndex,newArray,newFirst,location);
5288 this.firstIndex=newFirst;
5289 this.lastIndex=newArray.length;
5290 }else{
5291 System.arraycopy(this.array,this.firstIndex,newArray,0,location);
5292 System.arraycopy(this.array,location,newArray,location+required,size-location);
5293 this.firstIndex=0;
5294 this.lastIndex+=required;
5295 }this.array=newArray;
5296 },$fz.isPrivate=true,$fz),"~N,~N");
5297 Clazz_overrideMethod(c$,"indexOf",
5298 function(object){
5299 if(object!=null){
5300 for(var i=this.firstIndex;i<this.lastIndex;i++){
5301 if(object.equals(this.array[i])){
5302 return i-this.firstIndex;
5303 }}
5304 }else{
5305 for(var i=this.firstIndex;i<this.lastIndex;i++){
5306 if(this.array[i]==null){
5307 return i-this.firstIndex;
5308 }}
5309 }return-1;
5310 },"~O");
5311 Clazz_overrideMethod(c$,"isEmpty",
5312 function(){
5313 return this.lastIndex==this.firstIndex;
5314 });
5315 Clazz_overrideMethod(c$,"lastIndexOf",
5316 function(object){
5317 if(object!=null){
5318 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5319 if(object.equals(this.array[i])){
5320 return i-this.firstIndex;
5321 }}
5322 }else{
5323 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5324 if(this.array[i]==null){
5325 return i-this.firstIndex;
5326 }}
5327 }return-1;
5328 },"~O");
5329 Clazz_overrideMethod(c$,"remove",
5330 function(location){
5331 if (0 + location != location)return this.removeObject(location)
5332 var result;
5333 var size=this.size();
5334 if(0<=location&&location<size){
5335 if(location==size-1){
5336 result=this.array[--this.lastIndex];
5337 this.array[this.lastIndex]=null;
5338 }else if(location==0){
5339 result=this.array[this.firstIndex];
5340 this.array[this.firstIndex++]=null;
5341 }else{
5342 var elementIndex=this.firstIndex+location;
5343 result=this.array[elementIndex];
5344 if(location<Math.floor(size/2)){
5345 System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,location);
5346 this.array[this.firstIndex++]=null;
5347 }else{
5348 System.arraycopy(this.array,elementIndex+1,this.array,elementIndex,size-location-1);
5349 this.array[--this.lastIndex]=null;
5350 }}}else{
5351 throw new IndexOutOfBoundsException();
5352 }this.modCount++;
5353 return result;
5354 },"~N"); 
5355
5356 Clazz_defineMethod(c$, "removeObject", function(o) {
5357         var i = this.indexOf(o);
5358         if (i < 0)return null;
5359         return this.remove(i);
5360 }, "~O");
5361
5362 Clazz_overrideMethod(c$,"removeRange",
5363 function(start,end){
5364 if(start>=0&&start<=end&&end<=this.size()){
5365 if(start==end){
5366 return;
5367 }var size=this.size();
5368 if(end==size){
5369         this.fill(this.firstIndex+start,this.lastIndex);
5370 this.lastIndex=this.firstIndex+start;
5371 }else if(start==0){
5372         this.fill(this.firstIndex,this.firstIndex+end);
5373 this.firstIndex+=end;
5374 }else{
5375 System.arraycopy(this.array,this.firstIndex+end,this.array,this.firstIndex+start,size-end);
5376 var newLast=this.lastIndex+start-end;
5377 this.fill(newLast,this.lastIndex);
5378 this.lastIndex=newLast;
5379 }this.modCount++;
5380 }else{
5381 throw new IndexOutOfBoundsException();
5382 }},"~N,~N");
5383 Clazz_overrideMethod(c$,"set",
5384 function(location,object){
5385 if(0<=location&&location<this.size()){
5386 var result=this.array[this.firstIndex+location];
5387 this.array[this.firstIndex+location]=object;
5388 return result;
5389 }throw new IndexOutOfBoundsException();
5390 },"~N,~O");
5391 Clazz_overrideMethod(c$,"size",
5392 function(){
5393 return this.lastIndex-this.firstIndex;
5394 });
5395 /*
5396 Clazz_defineMethod(c$,"toArray",
5397 function(){
5398 var size=this.size();
5399 var result=new Array(size);
5400 System.arraycopy(this.array,this.firstIndex,result,0,size);
5401 return result;
5402 });
5403 */
5404
5405 Clazz_overrideMethod(c$,"toArray",
5406 function(contents){
5407 var size=this.size();
5408 if(!contents || size>contents.length)
5409         contents= new Array(size);
5410 System.arraycopy(this.array,this.firstIndex,contents,0,size);
5411 if(size<contents.length){
5412 contents[size]=null;
5413 }return contents;
5414 },"~O");
5415 Clazz_defineMethod(c$,"trimToSize",
5416 function(){
5417 var size=this.size();
5418 var newArray=this.newElementArray(size);
5419 System.arraycopy(this.array,this.firstIndex,newArray,0,size);
5420 this.array=newArray;
5421 this.firstIndex=0;
5422 this.lastIndex=this.array.length;
5423 });
5424 });
5425 // BH 8/25/2014 1:10:59 AM  - removed indirect access/inner class business.
5426
5427 Clazz_load(["java.util.AbstractCollection","$.Iterator","$.List","$.ListIterator","$.RandomAccess","$.NoSuchElementException"],"java.util.AbstractList",["java.lang.IllegalArgumentException","$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){
5428 c$=Clazz_decorateAsClass(function(){
5429 this.modCount=0;
5430
5431
5432
5433 //if(!Clazz_isClassDefined("java.util.AbstractList.SimpleListIterator")){
5434 //java.util.AbstractList.$AbstractList$SimpleListIterator$();
5435 //}
5436 //if(!Clazz_isClassDefined("java.util.AbstractList.FullListIterator")){
5437 //java.util.AbstractList.$AbstractList$FullListIterator$();
5438 //}
5439
5440
5441
5442 Clazz_instantialize(this,arguments);
5443 },java.util,"AbstractList",java.util.AbstractCollection,java.util.List);
5444 Clazz_defineMethod(c$,"add",
5445 function(location,object){
5446 throw new UnsupportedOperationException();
5447 },"~N,~O");
5448 Clazz_defineMethod(c$,"add",
5449 function(object){
5450 this.add(this.size(),object);
5451 return true;
5452 },"~O");
5453 Clazz_defineMethod(c$,"addAll",
5454 function(location,collection){
5455 var it=collection.iterator();
5456 while(it.hasNext()){
5457 this.add(location++,it.next());
5458 }
5459 return!collection.isEmpty();
5460 },"~N,java.util.Collection");
5461 Clazz_overrideMethod(c$,"clear",
5462 function(){
5463 this.removeRange(0,this.size());
5464 });
5465 Clazz_overrideMethod(c$,"equals",
5466 function(object){
5467 if(this===object){
5468 return true;
5469 }if(Clazz_instanceOf(object,java.util.List)){
5470 var list=object;
5471 if(list.size()!=this.size()){
5472 return false;
5473 }var it1=this.iterator();
5474 var it2=list.iterator();
5475 while(it1.hasNext()){
5476 var e1=it1.next();
5477 var e2=it2.next();
5478 if(!(e1==null?e2==null:e1.equals(e2))){
5479 return false;
5480 }}
5481 return true;
5482 }return false;
5483 },"~O");
5484 Clazz_overrideMethod(c$,"hashCode",
5485 function(){
5486 var result=1;
5487 var it=this.iterator();
5488 while(it.hasNext()){
5489 var object=it.next();
5490 result=(31*result)+(object==null?0:object.hashCode());
5491 }
5492 return result;
5493 });
5494 Clazz_overrideMethod(c$,"indexOf",
5495 function(object){
5496 var it=this.listIterator();
5497 if(object!=null){
5498 while(it.hasNext()){
5499 if(object.equals(it.next())){
5500 return it.previousIndex();
5501 }}
5502 }else{
5503 while(it.hasNext()){
5504 if(it.next()==null){
5505 return it.previousIndex();
5506 }}
5507 }return-1;
5508 },"~O");
5509 Clazz_overrideMethod(c$,"iterator",
5510 function(){
5511 return new java.util.AbstractListSimpleListIterator(this); // Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null);
5512 });
5513 Clazz_overrideMethod(c$,"lastIndexOf",
5514 function(object){
5515 var it=this.listIterator(this.size());
5516 if(object!=null){
5517 while(it.hasPrevious()){
5518 if(object.equals(it.previous())){
5519 return it.nextIndex();
5520 }}
5521 }else{
5522 while(it.hasPrevious()){
5523 if(it.previous()==null){
5524 return it.nextIndex();
5525 }}
5526 }return-1;
5527 },"~O");
5528 //Clazz_defineMethod(c$,"listIterator",
5529 //function(){
5530 //return this.listIterator(0);
5531 //});
5532 Clazz_defineMethod(c$,"listIterator",
5533 function(location){
5534 location || (location = 0);
5535 return new java.util.AbstractListFullListIterator(this, location);//Clazz_innerTypeInstance(java.util.AbstractList.FullListIterator,this,null,location);
5536 },"~N");
5537 Clazz_defineMethod(c$,"remove",
5538 function(location){
5539 throw new UnsupportedOperationException();
5540 },"~N");
5541 Clazz_defineMethod(c$,"removeRange",
5542 function(start,end){
5543 var it=this.listIterator(start);
5544 for(var i=start;i<end;i++){
5545 it.next();
5546 it.remove();
5547 }
5548 },"~N,~N");
5549 Clazz_overrideMethod(c$,"set",
5550 function(location,object){
5551 throw new UnsupportedOperationException();
5552 },"~N,~O");
5553 Clazz_overrideMethod(c$,"subList",
5554 function(start,end){
5555 if(0<=start&&end<=this.size()){
5556 if(start<=end){
5557 if(Clazz_instanceOf(this,java.util.RandomAccess)){
5558 return new java.util.AbstractList.SubAbstractListRandomAccess(this,start,end);
5559 }return new java.util.AbstractList.SubAbstractList(this,start,end);
5560 }throw new IllegalArgumentException();
5561 }throw new IndexOutOfBoundsException();
5562 },"~N,~N");
5563
5564
5565
5566 //c$.$AbstractList$SimpleListIterator$=function(){
5567
5568 Clazz_pu$h(self.c$);
5569
5570 c$=Clazz_decorateAsClass(function(){
5571 //Clazz_prepareCallback(this,arguments);
5572 this.pos=-1;
5573 this.expectedModCount=0;
5574 this.lastPosition=-1;
5575 Clazz_instantialize(this,arguments);
5576 },java.util,"AbstractListSimpleListIterator",null,java.util.Iterator);
5577
5578
5579 Clazz_makeConstructor(c$,
5580 function(a){
5581 this._list = a;
5582 this.expectedModCount=a.modCount;
5583 }, "java.util.AbstractList");
5584
5585 Clazz_overrideMethod(c$,"hasNext",
5586 function(){
5587 return this.pos+1<this._list.size();
5588 });
5589 Clazz_overrideMethod(c$,"next",
5590 function(){
5591 if(this.expectedModCount==this._list.modCount){
5592 try{
5593 var a=this._list.get(this.pos+1);
5594 this.lastPosition=++this.pos;
5595 return a;
5596 }catch(e){
5597 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5598 throw new java.util.NoSuchElementException();
5599 }else{
5600 throw e;
5601 }
5602 }
5603 }throw new java.util.ConcurrentModificationException();
5604 });
5605 Clazz_overrideMethod(c$,"remove",
5606 function(){
5607 if(this.expectedModCount==this._list.modCount){
5608 try{
5609 this._list.remove(this.lastPosition);
5610 }catch(e){
5611 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5612 throw new IllegalStateException();
5613 }else{
5614 throw e;
5615 }
5616 }
5617 if(this._list.modCount!=this.expectedModCount){
5618 this.expectedModCount++;
5619 }if(this.pos==this.lastPosition){
5620 this.pos--;
5621 }this.lastPosition=-1;
5622 }else{
5623 throw new java.util.ConcurrentModificationException();
5624 }});
5625
5626 c$=Clazz_p0p();
5627 //};
5628
5629
5630 //c$.$AbstractList$FullListIterator$=function(){
5631 Clazz_pu$h(self.c$);
5632 c$=Clazz_decorateAsClass(function(){
5633 //Clazz_prepareCallback(this,arguments);
5634 Clazz_instantialize(this,arguments);
5635 },java.util,"AbstractListFullListIterator",java.util.AbstractListSimpleListIterator,java.util.ListIterator);
5636
5637 //,Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null,Clazz_inheritArgs));
5638
5639 Clazz_makeConstructor(c$,
5640 function(a,b){
5641 Clazz_superConstructor(this,java.util.AbstractListFullListIterator,[a]);
5642 if(0<=b&&b<=this._list.size()){
5643 this.pos=b-1;
5644 }else{
5645 throw new IndexOutOfBoundsException();
5646 }},"java.util.AbstractList,~N");
5647 Clazz_overrideMethod(c$,"add",
5648 function(a){
5649 if(this.expectedModCount==this._list.modCount){
5650 try{
5651 this._list.add(this.pos+1,a);
5652 }catch(e){
5653 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5654 throw new java.util.NoSuchElementException();
5655 }else{
5656 throw e;
5657 }
5658 }
5659 this.pos++;
5660 this.lastPosition=-1;
5661 if(this._list.modCount!=this.expectedModCount){
5662 this.expectedModCount++;
5663 }}else{
5664 throw new java.util.ConcurrentModificationException();
5665 }},"~O");
5666 Clazz_overrideMethod(c$,"hasPrevious",
5667 function(){
5668 return this.pos>=0;
5669 });
5670 Clazz_overrideMethod(c$,"nextIndex",
5671 function(){
5672 return this.pos+1;
5673 });
5674 Clazz_overrideMethod(c$,"previous",
5675 function(){
5676 if(this.expectedModCount==this._list.modCount){
5677 try{
5678 var a=this._list.get(this.pos);
5679 this.lastPosition=this.pos;
5680 this.pos--;
5681 return a;
5682 }catch(e){
5683 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5684 throw new java.util.NoSuchElementException();
5685 }else{
5686 throw e;
5687 }
5688 }
5689 }throw new java.util.ConcurrentModificationException();
5690 });
5691 Clazz_overrideMethod(c$,"previousIndex",
5692 function(){
5693 return this.pos;
5694 });
5695 Clazz_overrideMethod(c$,"set",
5696 function(a){
5697 if(this.expectedModCount==this._list.modCount){
5698 try{
5699 this._list.set(this.lastPosition,a);
5700 }catch(e){
5701 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5702 throw new IllegalStateException();
5703 }else{
5704 throw e;
5705 }
5706 }
5707 }else{
5708 throw new java.util.ConcurrentModificationException();
5709 }},"~O");
5710 c$=Clazz_p0p();
5711 //};
5712
5713
5714
5715
5716 Clazz_pu$h(self.c$);
5717 c$=Clazz_declareType(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);
5718 c$=Clazz_p0p();
5719
5720
5721
5722
5723 Clazz_pu$h(self.c$);
5724 c$=Clazz_decorateAsClass(function(){
5725 this.fullList=null;
5726 this.offset=0;
5727 this.$size=0;
5728 Clazz_instantialize(this,arguments);
5729 },java.util.AbstractList,"SubAbstractList",java.util.AbstractList);
5730 Clazz_makeConstructor(c$,
5731 function(a,b,c){
5732 Clazz_superConstructor(this,java.util.AbstractList.SubAbstractList);
5733 this.fullList=a;
5734 this.modCount=this.fullList.modCount;
5735 this.offset=b;
5736 this.$size=c-b;
5737 },"java.util.AbstractList,~N,~N");
5738 Clazz_defineMethod(c$,"add",
5739 function(a,b){
5740 if(this.modCount==this.fullList.modCount){
5741 if(0<=a&&a<=this.$size){
5742 this.fullList.add(a+this.offset,b);
5743 this.$size++;
5744 this.modCount=this.fullList.modCount;
5745 }else{
5746 throw new IndexOutOfBoundsException();
5747 }}else{
5748 throw new java.util.ConcurrentModificationException();
5749 }},"~N,~O");
5750 Clazz_defineMethod(c$,"addAll",
5751 function(a,b){
5752 if(this.modCount==this.fullList.modCount){
5753 if(0<=a&&a<=this.$size){
5754 var c=this.fullList.addAll(a+this.offset,b);
5755 if(c){
5756 this.$size+=b.size();
5757 this.modCount=this.fullList.modCount;
5758 }return c;
5759 }throw new IndexOutOfBoundsException();
5760 }throw new java.util.ConcurrentModificationException();
5761 },"~N,java.util.Collection");
5762 Clazz_defineMethod(c$,"addAll",
5763 function(a){
5764 if(this.modCount==this.fullList.modCount){
5765 var b=this.fullList.addAll(this.offset+this.$size,a);
5766 if(b){
5767 this.$size+=a.size();
5768 this.modCount=this.fullList.modCount;
5769 }return b;
5770 }throw new java.util.ConcurrentModificationException();
5771 },"java.util.Collection");
5772 Clazz_defineMethod(c$,"get",
5773 function(a){
5774 if(this.modCount==this.fullList.modCount){
5775 if(0<=a&&a<this.$size){
5776 return this.fullList.get(a+this.offset);
5777 }throw new IndexOutOfBoundsException();
5778 }throw new java.util.ConcurrentModificationException();
5779 },"~N");
5780 Clazz_overrideMethod(c$,"iterator",
5781 function(){
5782 return this.listIterator(0);
5783 });
5784 Clazz_defineMethod(c$,"listIterator",
5785 function(a){
5786 if(this.modCount==this.fullList.modCount){
5787 if(0<=a&&a<=this.$size){
5788 return new java.util.AbstractList.SubAbstractList.SubAbstractListIterator(this.fullList.listIterator(a+this.offset),this,this.offset,this.$size);
5789 }throw new IndexOutOfBoundsException();
5790 }throw new java.util.ConcurrentModificationException();
5791 },"~N");
5792 Clazz_defineMethod(c$,"remove",
5793 function(a){
5794 if(this.modCount==this.fullList.modCount){
5795 if(0<=a&&a<this.$size){
5796 var b=this.fullList.remove(a+this.offset);
5797 this.$size--;
5798 this.modCount=this.fullList.modCount;
5799 return b;
5800 }throw new IndexOutOfBoundsException();
5801 }throw new java.util.ConcurrentModificationException();
5802 },"~N");
5803 Clazz_defineMethod(c$,"removeRange",
5804 function(a,b){
5805 if(a!=b){
5806 if(this.modCount==this.fullList.modCount){
5807 this.fullList.removeRange(a+this.offset,b+this.offset);
5808 this.$size-=b-a;
5809 this.modCount=this.fullList.modCount;
5810 }else{
5811 throw new java.util.ConcurrentModificationException();
5812 }}},"~N,~N");
5813 Clazz_defineMethod(c$,"set",
5814 function(a,b){
5815 if(this.modCount==this.fullList.modCount){
5816 if(0<=a&&a<this.$size){
5817 return this.fullList.set(a+this.offset,b);
5818 }throw new IndexOutOfBoundsException();
5819 }throw new java.util.ConcurrentModificationException();
5820 },"~N,~O");
5821 Clazz_overrideMethod(c$,"size",
5822 function(){
5823 return this.$size;
5824 });
5825 Clazz_defineMethod(c$,"sizeChanged",
5826 function(a){
5827 if(a){
5828 this.$size++;
5829 }else{
5830 this.$size--;
5831 }this.modCount=this.fullList.modCount;
5832 },"~B");
5833 Clazz_pu$h(self.c$);
5834 c$=Clazz_decorateAsClass(function(){
5835 this.subList=null;
5836 this.iterator=null;
5837 this.start=0;
5838 this.end=0;
5839 Clazz_instantialize(this,arguments);
5840 },java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);
5841 Clazz_makeConstructor(c$,
5842 function(a,b,c,d){
5843 this.iterator=a;
5844 this.subList=b;
5845 this.start=c;
5846 this.end=this.start+d;
5847 },"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");
5848 Clazz_defineMethod(c$,"add",
5849 function(a){
5850 this.iterator.add(a);
5851 this.subList.sizeChanged(true);
5852 this.end++;
5853 },"~O");
5854 Clazz_overrideMethod(c$,"hasNext",
5855 function(){
5856 return this.iterator.nextIndex()<this.end;
5857 });
5858 Clazz_overrideMethod(c$,"hasPrevious",
5859 function(){
5860 return this.iterator.previousIndex()>=this.start;
5861 });
5862 Clazz_defineMethod(c$,"next",
5863 function(){
5864 if(this.iterator.nextIndex()<this.end){
5865 return this.iterator.next();
5866 }throw new java.util.NoSuchElementException();
5867 });
5868 Clazz_defineMethod(c$,"nextIndex",
5869 function(){
5870 return this.iterator.nextIndex()-this.start;
5871 });
5872 Clazz_defineMethod(c$,"previous",
5873 function(){
5874 if(this.iterator.previousIndex()>=this.start){
5875 return this.iterator.previous();
5876 }throw new java.util.NoSuchElementException();
5877 });
5878 Clazz_defineMethod(c$,"previousIndex",
5879 function(){
5880 var a=this.iterator.previousIndex();
5881 if(a>=this.start){
5882 return a-this.start;
5883 }return-1;
5884 });
5885 Clazz_defineMethod(c$,"remove",
5886 function(){
5887 this.iterator.remove();
5888 this.subList.sizeChanged(false);
5889 this.end--;
5890 });
5891 Clazz_defineMethod(c$,"set",
5892 function(a){
5893 this.iterator.set(a);
5894 },"~O");
5895 c$=Clazz_p0p();
5896 c$=Clazz_p0p();
5897 });
5898 // 4/23/2015 1:20:24 PM BH removing need for array.getClass().getComponentType()
5899
5900 Clazz_load(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){
5901 c$=Clazz_declareType(java.util,"AbstractCollection",null,java.util.Collection);
5902 Clazz_makeConstructor(c$,
5903 function(){
5904 });
5905 Clazz_overrideMethod(c$,"add",
5906 function(object){
5907 throw new UnsupportedOperationException();
5908 },"~O");
5909 Clazz_overrideMethod(c$,"addAll",
5910 function(collection){
5911 var result=false;
5912 var it=collection.iterator();
5913 while(it.hasNext()){
5914 if(this.add(it.next())){
5915 result=true;
5916 }}
5917 return result;
5918 },"java.util.Collection");
5919 Clazz_overrideMethod(c$,"clear",
5920 function(){
5921 var it=this.iterator();
5922 while(it.hasNext()){
5923 it.next();
5924 it.remove();
5925 }
5926 });
5927 Clazz_overrideMethod(c$,"contains",
5928 function(object){
5929 var it=this.iterator();
5930 if(object!=null){
5931 while(it.hasNext()){
5932 if(object.equals(it.next())){
5933 return true;
5934 }}
5935 }else{
5936 while(it.hasNext()){
5937 if(it.next()==null){
5938 return true;
5939 }}
5940 }return false;
5941 },"~O");
5942 Clazz_overrideMethod(c$,"containsAll",
5943 function(collection){
5944 var it=collection.iterator();
5945 while(it.hasNext()){
5946 if(!this.contains(it.next())){
5947 return false;
5948 }}
5949 return true;
5950 },"java.util.Collection");
5951 Clazz_overrideMethod(c$,"isEmpty",
5952 function(){
5953 return this.size()==0;
5954 });
5955 Clazz_overrideMethod(c$,"remove",
5956 function(object){
5957 var it=this.iterator();
5958 if(object!=null){
5959 while(it.hasNext()){
5960 if(object.equals(it.next())){
5961 it.remove();
5962 return true;
5963 }}
5964 }else{
5965 while(it.hasNext()){
5966 if(it.next()==null){
5967 it.remove();
5968 return true;
5969 }}
5970 }return false;
5971 },"~O");
5972 Clazz_overrideMethod(c$,"removeAll",
5973 function(collection){
5974 var result=false;
5975 var it=this.iterator();
5976 while(it.hasNext()){
5977 if(collection.contains(it.next())){
5978 it.remove();
5979 result=true;
5980 }}
5981 return result;
5982 },"java.util.Collection");
5983 Clazz_overrideMethod(c$,"retainAll",
5984 function(collection){
5985 var result=false;
5986 var it=this.iterator();
5987 while(it.hasNext()){
5988 if(!collection.contains(it.next())){
5989 it.remove();
5990 result=true;
5991 }}
5992 return result;
5993 },"java.util.Collection");
5994 Clazz_defineMethod(c$,"toArray",
5995 function(){
5996 var size=this.size();
5997 var index=0;
5998 var it=this.iterator();
5999 var array=new Array(size);
6000 while(index<size){
6001 array[index++]=it.next();
6002 }
6003 return array;
6004 });
6005 Clazz_defineMethod(c$,"toArray",
6006 function(contents){
6007 var size=this.size();
6008 var index=0;
6009 // if(size>contents.length){  // BH unnec
6010 //var ct=contents.getClass().getComponentType();
6011 //contents=java.lang.reflect.Array.newInstance(ct,size);
6012 //}
6013 for(var entry,$entry=this.iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
6014 contents[index++]=entry;
6015 }
6016 if(index<contents.length){
6017 contents[index]=null;
6018 }return contents;
6019 },"~A");
6020 Clazz_overrideMethod(c$,"toString",
6021 function(){
6022 if(this.isEmpty()){
6023 return"[]";
6024 }var buffer=new StringBuilder(this.size()*16);
6025 buffer.append('[');
6026 var it=this.iterator();
6027 while(it.hasNext()){
6028 var next=it.next();
6029 if(next!==this){
6030 buffer.append(next);
6031 }else{
6032 buffer.append("(this Collection)");
6033 }if(it.hasNext()){
6034 buffer.append(", ");
6035 }}
6036 buffer.append(']');
6037 return buffer.toString();
6038 });
6039 });
6040 Clazz_declarePackage ("java.awt");
6041 Clazz_load (null, "java.awt.ComponentOrientation", ["java.util.Locale"], function () {
6042 c$ = Clazz_decorateAsClass (function () {
6043 this.orientation = 0;
6044 Clazz_instantialize (this, arguments);
6045 }, java.awt, "ComponentOrientation");
6046 Clazz_defineMethod (c$, "isHorizontal", 
6047 function () {
6048 return (this.orientation & 2) != 0;
6049 });
6050 Clazz_defineMethod (c$, "isLeftToRight", 
6051 function () {
6052 return (this.orientation & 4) != 0;
6053 });
6054 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
6055 function (locale) {
6056 var lang = locale.getLanguage ();
6057 if ("iw".equals (lang) || "ar".equals (lang) || "fa".equals (lang) || "ur".equals (lang)) {
6058 return java.awt.ComponentOrientation.RIGHT_TO_LEFT;
6059 } else {
6060 return java.awt.ComponentOrientation.LEFT_TO_RIGHT;
6061 }}, "java.util.Locale");
6062 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
6063 function (bdl) {
6064 var result = null;
6065 try {
6066 result = bdl.getObject ("Orientation");
6067 } catch (e) {
6068 if (Clazz_exceptionOf (e, Exception)) {
6069 } else {
6070 throw e;
6071 }
6072 }
6073 if (result == null) {
6074 result = java.awt.ComponentOrientation.getOrientation (bdl.getLocale ());
6075 }if (result == null) {
6076 result = java.awt.ComponentOrientation.getOrientation (java.util.Locale.getDefault ());
6077 }return result;
6078 }, "java.util.ResourceBundle");
6079 Clazz_makeConstructor (c$, 
6080  function (value) {
6081 this.orientation = value;
6082 }, "~N");
6083 Clazz_defineStatics (c$,
6084 "UNK_BIT", 1,
6085 "HORIZ_BIT", 2,
6086 "LTR_BIT", 4);
6087 c$.LEFT_TO_RIGHT = c$.prototype.LEFT_TO_RIGHT =  new java.awt.ComponentOrientation (6);
6088 c$.RIGHT_TO_LEFT = c$.prototype.RIGHT_TO_LEFT =  new java.awt.ComponentOrientation (2);
6089 c$.UNKNOWN = c$.prototype.UNKNOWN =  new java.awt.ComponentOrientation (7);
6090 });
6091 Clazz_declarePackage ("java.security");
6092 Clazz_load (["java.security.AccessControlContext"], "java.security.AccessController", null, function () {
6093 c$ = Clazz_declareType (java.security, "AccessController", null, java.security.AccessControlContext);
6094 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6095 function (action) {
6096 return action.run ();
6097 }, "java.security.PrivilegedAction");
6098 c$.getContext = Clazz_defineMethod (c$, "getContext", 
6099 function () {
6100 return  new java.security.AccessController ();
6101 });
6102 Clazz_overrideMethod (c$, "checkPermission", 
6103 function (perm) {
6104 return true;
6105 }, "~O");
6106 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6107 function (action, context) {
6108 return action.run ();
6109 }, "java.security.PrivilegedAction,java.security.AccessControlContext");
6110 });
6111 Clazz_declarePackage ("java.security");
6112 Clazz_declareInterface (java.security, "AccessControlContext");
6113 // BH minor efficiencies only
6114
6115 Clazz_load(["java.util.AbstractMap","$.AbstractSet","$.Iterator","$.Map","$.MapEntry"],"java.util.HashMap",["java.lang.IllegalArgumentException","$.IllegalStateException","java.util.AbstractCollection","$.Arrays","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.NoSuchElementException"],function(){
6116 c$=Clazz_decorateAsClass(function(){
6117 this.elementCount=0;
6118 this.elementData=null;
6119 this.loadFactor=0;
6120 this.threshold=0;
6121 this.modCount=0;
6122 Clazz_instantialize(this,arguments);
6123 },java.util,"HashMap",java.util.AbstractMap,[java.util.Map,Cloneable,java.io.Serializable]);
6124 Clazz_defineMethod(c$,"newElementArray",
6125 function(s){
6126 return new Array(s);
6127 },"~N");
6128 //Clazz_makeConstructor(c$,
6129 //function(){
6130 //this.construct(16);
6131 //});
6132 //Clazz_makeConstructor(c$,
6133 //function(capacity){
6134 //Clazz_superConstructor(this,java.util.HashMap,[]);
6135 //if(capacity>=0){
6136 //this.elementCount=0;
6137 //this.elementData=this.newElementArray(capacity==0?1:capacity);
6138 //this.loadFactor=0.75;
6139 //this.computeMaxSize();
6140 //}else{
6141 //throw new IllegalArgumentException();
6142 //}},"~N");
6143 Clazz_makeConstructor(c$,
6144 function(){
6145 this.construct(16);
6146 });
6147 Clazz_makeConstructor(c$,
6148 function(capacity){
6149 Clazz_superConstructor(this,java.util.HashMap,[]);
6150 if(capacity>=0){
6151 this.elementCount=0;
6152 this.elementData=this.newElementArray(capacity==0?1:capacity);
6153 this.loadFactor=0.75;
6154 this.computeMaxSize();
6155 }else{
6156 throw new IllegalArgumentException();
6157 }},"~N");
6158 Clazz_makeConstructor(c$,
6159 function(capacity,loadFactor){
6160 Clazz_superConstructor(this,java.util.HashMap,[]);
6161 if(capacity>=0&&loadFactor>0){
6162 this.elementCount=0;
6163 this.elementData=this.newElementArray(capacity==0?1:capacity);
6164 this.loadFactor=loadFactor;
6165 this.computeMaxSize();
6166 }else{
6167 throw new IllegalArgumentException();
6168 }},"~N,~N");
6169 Clazz_makeConstructor(c$,
6170 function(map){
6171 this.construct(map.size()<6?11:map.size()*2);
6172 Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6173 },"java.util.Map");
6174
6175
6176 /*
6177 Clazz_makeConstructor(c$,
6178 function(capacity,loadFactor){
6179 this.doConstruct(capacity,loadFactor);
6180 },"~N,~N");
6181
6182 Clazz_defineMethod(c$, "doConstruct",
6183 function(capacity,loadFactor) {
6184 capacity || (capacity = 16);
6185 loadFactor || (loadFactor = 0.75);
6186 if (typeof capacity != "number") {
6187  var map = capacity;
6188  this.loadFactor=loadFactor;
6189  this.elementData=this.newElementArray(map.size()<6?11:map.size()*2);
6190  this.computeMaxSize();
6191  this.putAllHM(map);
6192  return;
6193 }
6194
6195 //Clazz_superConstructor(this,java.util.HashMap,[]);
6196 if(capacity>=0&&loadFactor>0){
6197 this.elementData=this.newElementArray(capacity==0?1:capacity);
6198 this.loadFactor=loadFactor;
6199 this.computeMaxSize();
6200 }else{
6201 throw new IllegalArgumentException();
6202 }
6203 },"~N,~N");
6204
6205 //Clazz_makeConstructor(c$,
6206 //function(map){
6207 //this.construct(map.size()<6?11:map.size()*2);
6208 //Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6209 //},"java.util.Map");
6210
6211 */
6212 Clazz_overrideMethod(c$,"clear",
6213 function(){
6214 if(this.elementCount>0){
6215 this.elementCount=0;
6216 java.util.Arrays.fill(this.elementData,null);
6217 this.modCount++;
6218 }});
6219 Clazz_defineMethod(c$,"clone",
6220 function(){
6221   return this.cloneHM();
6222 });
6223
6224 Clazz_defineMethod(c$,"cloneHM",
6225 function(){
6226 try{
6227 var map=this.cloneAM();//Clazz_superCall(this,java.util.HashMap,"clone",[]);
6228 map.elementData=this.newElementArray(this.elementData.length);
6229 var entry;
6230 for(var i=0;i<this.elementData.length;i++){
6231 if((entry=this.elementData[i])!=null){
6232 map.elementData[i]=entry.clone();
6233 }}
6234 return map;
6235 }catch(e){
6236 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6237 return null;
6238 }else{
6239 throw e;
6240 }
6241 }
6242 });
6243
6244 Clazz_defineMethod(c$,"computeMaxSize",
6245 ($fz=function(){
6246 this.threshold=Math.round((this.elementData.length*this.loadFactor));
6247 },$fz.isPrivate=true,$fz));
6248 Clazz_overrideMethod(c$,"containsKey",
6249 function(key){
6250 return this.getEntry(key)!=null;
6251 },"~O");
6252 Clazz_defineMethod(c$,"keysEqual",
6253 function(k1,entry){
6254 var k1Hash=k1==null?0:k1.hashCode();
6255 if(k1Hash!=entry.origKeyHash){
6256 return false;
6257 }if(k1==null&&entry.key==null){
6258 return true;
6259 }return k1.equals(entry.key);
6260 },"~O,java.util.HashMap.Entry");
6261 Clazz_overrideMethod(c$,"containsValue",
6262 function(value){
6263 if(value!=null){
6264 for(var i=this.elementData.length;--i>=0;){
6265 var entry=this.elementData[i];
6266 while(entry!=null){
6267 if(value.equals(entry.value)){
6268 return true;
6269 }entry=entry.next;
6270 }
6271 }
6272 }else{
6273 for(var i=this.elementData.length;--i>=0;){
6274 var entry=this.elementData[i];
6275 while(entry!=null){
6276 if(entry.value==null){
6277 return true;
6278 }entry=entry.next;
6279 }
6280 }
6281 }return false;
6282 },"~O");
6283 Clazz_overrideMethod(c$,"entrySet",
6284 function(){
6285 return new java.util.HashMap.HashMapEntrySet(this);
6286 });
6287 Clazz_overrideMethod(c$,"get",
6288 function(key){
6289 var m=this.getEntry(key);
6290 if(m!=null){
6291 return m.value;
6292 }return null;
6293 },"~O");
6294 Clazz_defineMethod(c$,"getEntry",
6295 function(key){
6296 var index=this.getModuloHash(key);
6297 return this.findEntry(key,index);
6298 },"~O");
6299 Clazz_defineMethod(c$,"getModuloHash",
6300 function(key){
6301 if(key==null){
6302 return 0;
6303 }return(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6304 },"~O");
6305 Clazz_defineMethod(c$,"findEntry",
6306 function(key,index){
6307 var m;
6308 m=this.elementData[index];
6309 if(key!=null){
6310 while(m!=null&&!this.keysEqual(key,m)){
6311 m=m.next;
6312 }
6313 }else{
6314 while(m!=null&&m.key!=null){
6315 m=m.next;
6316 }
6317 }return m;
6318 },"~O,~N");
6319 Clazz_overrideMethod(c$,"isEmpty",
6320 function(){
6321 return this.elementCount==0;
6322 });
6323 Clazz_overrideMethod(c$,"keySet",
6324 function(){
6325 if(this.$keySet==null){
6326 this.$keySet=((Clazz_isClassDefined("java.util.HashMap$1")?0:java.util.HashMap.$HashMap$1$()),Clazz_innerTypeInstance(java.util.HashMap$1,this,null));
6327 }return this.$keySet;
6328 });
6329 Clazz_overrideMethod(c$,"put",
6330 function(key,value){
6331 var index=this.getModuloHash(key);
6332 var entry=this.findEntry(key,index);
6333 if(entry==null){
6334 this.modCount++;
6335 if(++this.elementCount>this.threshold){
6336 this.rehash();
6337 index=key==null?0:(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6338 }entry=this.createEntry(key,index,value);
6339 return null;
6340 }var result=entry.value;
6341 entry.value=value;
6342 return result;
6343 },"~O,~O");
6344 Clazz_defineMethod(c$,"createEntry",
6345 function(key,index,value){
6346 var entry=new java.util.HashMap.Entry(key,value);
6347 entry.next=this.elementData[index];
6348 this.elementData[index]=entry;
6349 return entry;
6350 },"~O,~N,~O");
6351 Clazz_defineMethod(c$,"putAll",
6352 function(map){
6353 if(!map.isEmpty()){
6354 var capacity=this.elementCount+map.size();
6355 if(capacity>this.threshold){
6356 this.rehash(capacity);
6357 }
6358 this.putAllHM(map);
6359
6360 }},"java.util.Map");
6361 Clazz_defineMethod(c$,"rehash",
6362 function(capacity){
6363 var length=(capacity==0?1:capacity<<1);
6364 var newData=this.newElementArray(length);
6365 for(var i=0;i<this.elementData.length;i++){
6366 var entry=this.elementData[i];
6367 while(entry!=null){
6368 var key=entry.key;
6369 var index=key==null?0:(key.hashCode()&0x7FFFFFFF)%length;
6370 var next=entry.next;
6371 entry.next=newData[index];
6372 newData[index]=entry;
6373 entry=next;
6374 }
6375 }
6376 this.elementData=newData;
6377 this.computeMaxSize();
6378 },"~N");
6379 Clazz_defineMethod(c$,"rehash",
6380 function(){
6381 this.rehash(this.elementData.length);
6382 });
6383 Clazz_overrideMethod(c$,"remove",
6384 function(key){
6385 var entry=this.removeEntry(key);
6386 if(entry!=null){
6387 return entry.value;
6388 }return null;
6389 },"~O");
6390 Clazz_defineMethod(c$,"removeEntry",
6391 function(key){
6392 var index=0;
6393 var entry;
6394 var last=null;
6395 if(key!=null){
6396 index=(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6397 entry=this.elementData[index];
6398 while(entry!=null&&!this.keysEqual(key,entry)){
6399 last=entry;
6400 entry=entry.next;
6401 }
6402 }else{
6403 entry=this.elementData[0];
6404 while(entry!=null&&entry.key!=null){
6405 last=entry;
6406 entry=entry.next;
6407 }
6408 }if(entry==null){
6409 return null;
6410 }if(last==null){
6411 this.elementData[index]=entry.next;
6412 }else{
6413 last.next=entry.next;
6414 }this.modCount++;
6415 this.elementCount--;
6416 return entry;
6417 },"~O");
6418 Clazz_overrideMethod(c$,"size",
6419 function(){
6420 return this.elementCount;
6421 });
6422 Clazz_overrideMethod(c$,"values",
6423 function(){
6424 if(this.valuesCollection==null){
6425 this.valuesCollection=((Clazz_isClassDefined("java.util.HashMap$2")?0:java.util.HashMap.$HashMap$2$()),Clazz_innerTypeInstance(java.util.HashMap$2,this,null));
6426 }return this.valuesCollection;
6427 });
6428 c$.$HashMap$1$=function(){
6429 Clazz_pu$h(self.c$);
6430 c$=Clazz_declareAnonymous(java.util,"HashMap$1",java.util.AbstractSet);
6431 Clazz_overrideMethod(c$,"contains",
6432 function(object){
6433 return this.b$["java.util.HashMap"].containsKey(object);
6434 },"~O");
6435 Clazz_overrideMethod(c$,"size",
6436 function(){
6437 return this.b$["java.util.HashMap"].size();
6438 });
6439 Clazz_overrideMethod(c$,"clear",
6440 function(){
6441 this.b$["java.util.HashMap"].clear();
6442 });
6443 Clazz_overrideMethod(c$,"remove",
6444 function(key){
6445 if(this.b$["java.util.HashMap"].containsKey(key)){
6446 this.b$["java.util.HashMap"].remove(key);
6447 return true;
6448 }return false;
6449 },"~O");
6450 Clazz_overrideMethod(c$,"iterator",
6451 function(){
6452 return new java.util.HashMap.HashMapIterator(((Clazz_isClassDefined("java.util.HashMap$1$1")?0:java.util.HashMap.$HashMap$1$1$()),Clazz_innerTypeInstance(java.util.HashMap$1$1,this,null)),this.b$["java.util.HashMap"]);
6453 });
6454 c$=Clazz_p0p();
6455 };
6456 c$.$HashMap$1$1$=function(){
6457 Clazz_pu$h(self.c$);
6458 c$=Clazz_declareAnonymous(java.util,"HashMap$1$1",null,java.util.MapEntry.Type);
6459 Clazz_overrideMethod(c$,"get",
6460 function(entry){
6461 return entry.key;
6462 },"java.util.MapEntry");
6463 c$=Clazz_p0p();
6464 };
6465 c$.$HashMap$2$=function(){
6466 Clazz_pu$h(self.c$);
6467 c$=Clazz_declareAnonymous(java.util,"HashMap$2",java.util.AbstractCollection);
6468 Clazz_overrideMethod(c$,"contains",
6469 function(object){
6470 return this.b$["java.util.HashMap"].containsValue(object);
6471 },"~O");
6472 Clazz_overrideMethod(c$,"size",
6473 function(){
6474 return this.b$["java.util.HashMap"].size();
6475 });
6476 Clazz_overrideMethod(c$,"clear",
6477 function(){
6478 this.b$["java.util.HashMap"].clear();
6479 });
6480 Clazz_overrideMethod(c$,"iterator",
6481 function(){
6482 return new java.util.HashMap.HashMapIterator(((Clazz_isClassDefined("java.util.HashMap$2$1")?0:java.util.HashMap.$HashMap$2$1$()),Clazz_innerTypeInstance(java.util.HashMap$2$1,this,null)),this.b$["java.util.HashMap"]);
6483 });
6484 c$=Clazz_p0p();
6485 };
6486 c$.$HashMap$2$1$=function(){
6487 Clazz_pu$h(self.c$);
6488 c$=Clazz_declareAnonymous(java.util,"HashMap$2$1",null,java.util.MapEntry.Type);
6489 Clazz_overrideMethod(c$,"get",
6490 function(entry){
6491 return entry.value;
6492 },"java.util.MapEntry");
6493 c$=Clazz_p0p();
6494 };
6495 Clazz_pu$h(self.c$);
6496 c$=Clazz_decorateAsClass(function(){
6497 this.origKeyHash=0;
6498 this.next=null;
6499 Clazz_instantialize(this,arguments);
6500 },java.util.HashMap,"Entry",java.util.MapEntry);
6501 Clazz_makeConstructor(c$,
6502 function(a,b){
6503 Clazz_superConstructor(this,java.util.HashMap.Entry,[a,b]);
6504 this.origKeyHash=(a==null?0:a.hashCode());
6505 },"~O,~O");
6506 Clazz_defineMethod(c$,"clone",
6507 function(){
6508 var a=Clazz_superCall(this,java.util.HashMap.Entry,"clone",[]);
6509 if(this.next!=null){
6510 a.next=this.next.clone();
6511 }return a;
6512 });
6513 c$=Clazz_p0p();
6514 Clazz_pu$h(self.c$);
6515 c$=Clazz_decorateAsClass(function(){
6516 this.position=0;
6517 this.expectedModCount=0;
6518 this.type=null;
6519 this.canRemove=false;
6520 this.entry=null;
6521 this.lastEntry=null;
6522 this.associatedMap=null;
6523 Clazz_instantialize(this,arguments);
6524 },java.util.HashMap,"HashMapIterator",null,java.util.Iterator);
6525 Clazz_makeConstructor(c$,
6526 function(a,b){
6527 this.associatedMap=b;
6528 this.type=a;
6529 this.expectedModCount=b.modCount;
6530 },"java.util.MapEntry.Type,java.util.HashMap");
6531 Clazz_overrideMethod(c$,"hasNext",
6532 function(){
6533 if(this.entry!=null){
6534 return true;
6535 }while(this.position<this.associatedMap.elementData.length){
6536 if(this.associatedMap.elementData[this.position]==null){
6537 this.position++;
6538 }else{
6539 return true;
6540 }}
6541 return false;
6542 });
6543 Clazz_defineMethod(c$,"checkConcurrentMod",
6544 function(){
6545 if(this.expectedModCount!=this.associatedMap.modCount){
6546 throw new java.util.ConcurrentModificationException();
6547 }});
6548 Clazz_overrideMethod(c$,"next",
6549 function(){
6550 this.checkConcurrentMod();
6551 if(!this.hasNext()){
6552 throw new java.util.NoSuchElementException();
6553 }var a;
6554 if(this.entry==null){
6555 a=this.lastEntry=this.associatedMap.elementData[this.position++];
6556 this.entry=this.lastEntry.next;
6557 }else{
6558 if(this.lastEntry.next!==this.entry){
6559 this.lastEntry=this.lastEntry.next;
6560 }a=this.entry;
6561 this.entry=this.entry.next;
6562 }this.canRemove=true;
6563 return this.type.get(a);
6564 });
6565 Clazz_overrideMethod(c$,"remove",
6566 function(){
6567 this.checkConcurrentMod();
6568 if(!this.canRemove){
6569 throw new IllegalStateException();
6570 }this.canRemove=false;
6571 this.associatedMap.modCount++;
6572 if(this.lastEntry.next===this.entry){
6573 while(this.associatedMap.elementData[--this.position]==null){
6574 ;}
6575 this.associatedMap.elementData[this.position]=this.associatedMap.elementData[this.position].next;
6576 this.entry=null;
6577 }else{
6578 this.lastEntry.next=this.entry;
6579 }this.associatedMap.elementCount--;
6580 this.expectedModCount++;
6581 });
6582 c$=Clazz_p0p();
6583 Clazz_pu$h(self.c$);
6584 c$=Clazz_decorateAsClass(function(){
6585 this.associatedMap=null;
6586 Clazz_instantialize(this,arguments);
6587 },java.util.HashMap,"HashMapEntrySet",java.util.AbstractSet);
6588 Clazz_makeConstructor(c$,
6589 function(a){
6590 Clazz_superConstructor(this,java.util.HashMap.HashMapEntrySet,[]);
6591 this.associatedMap=a;
6592 },"java.util.HashMap");
6593 Clazz_defineMethod(c$,"hashMap",
6594 function(){
6595 return this.associatedMap;
6596 });
6597 Clazz_overrideMethod(c$,"size",
6598 function(){
6599 return this.associatedMap.elementCount;
6600 });
6601 Clazz_overrideMethod(c$,"clear",
6602 function(){
6603 this.associatedMap.clear();
6604 });
6605 Clazz_overrideMethod(c$,"remove",
6606 function(a){
6607 if(this.contains(a)){
6608 this.associatedMap.remove((a).getKey());
6609 return true;
6610 }return false;
6611 },"~O");
6612 Clazz_overrideMethod(c$,"contains",
6613 function(a){
6614 if(Clazz_instanceOf(a,java.util.Map.Entry)){
6615 var b=this.associatedMap.getEntry((a).getKey());
6616 return a.equals(b);
6617 }return false;
6618 },"~O");
6619 Clazz_overrideMethod(c$,"iterator",
6620 function(){
6621 return new java.util.HashMap.HashMapIterator(((Clazz_isClassDefined("java.util.HashMap$HashMapEntrySet$1")?0:java.util.HashMap.HashMapEntrySet.$HashMap$HashMapEntrySet$1$()),Clazz_innerTypeInstance(java.util.HashMap$HashMapEntrySet$1,this,null)),this.associatedMap);
6622 });
6623 c$.$HashMap$HashMapEntrySet$1$=function(){
6624 Clazz_pu$h(self.c$);
6625 c$=Clazz_declareAnonymous(java.util,"HashMap$HashMapEntrySet$1",null,java.util.MapEntry.Type);
6626 Clazz_overrideMethod(c$,"get",
6627 function(a){
6628 return a;
6629 },"java.util.MapEntry");
6630 c$=Clazz_p0p();
6631 };
6632 c$=Clazz_p0p();
6633 Clazz_defineStatics(c$,
6634 "DEFAULT_SIZE",16);
6635 });
6636 Clazz_load(["java.util.Map"],"java.util.MapEntry",null,function(){
6637 c$=Clazz_decorateAsClass(function(){
6638 this.key=null;
6639 this.value=null;
6640 Clazz_instantialize(this,arguments);
6641 },java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);
6642 Clazz_makeConstructor(c$,
6643 function(theKey){
6644 this.key=theKey;
6645 },"~O");
6646 Clazz_makeConstructor(c$,
6647 function(theKey,theValue){
6648 this.key=theKey;
6649 this.value=theValue;
6650 },"~O,~O");
6651 Clazz_defineMethod(c$,"clone",
6652 function(){
6653 try{
6654 return Clazz_superCall(this,java.util.MapEntry,"clone",[]);
6655 }catch(e){
6656 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6657 return null;
6658 }else{
6659 throw e;
6660 }
6661 }
6662 });
6663 Clazz_overrideMethod(c$,"equals",
6664 function(object){
6665 if(this===object){
6666 return true;
6667 }if(Clazz_instanceOf(object,java.util.Map.Entry)){
6668 var entry=object;
6669 return(this.key==null?entry.getKey()==null:this.key.equals(entry.getKey()))&&(this.value==null?entry.getValue()==null:this.value.equals(entry.getValue()));
6670 }return false;
6671 },"~O");
6672 Clazz_overrideMethod(c$,"getKey",
6673 function(){
6674 return this.key;
6675 });
6676 Clazz_overrideMethod(c$,"getValue",
6677 function(){
6678 return this.value;
6679 });
6680 Clazz_overrideMethod(c$,"hashCode",
6681 function(){
6682 return(this.key==null?0:this.key.hashCode())^(this.value==null?0:this.value.hashCode());
6683 });
6684 Clazz_overrideMethod(c$,"setValue",
6685 function(object){
6686 var result=this.value;
6687 this.value=object;
6688 return result;
6689 },"~O");
6690 Clazz_overrideMethod(c$,"toString",
6691 function(){
6692 return this.key+"="+this.value;
6693 });
6694 Clazz_declareInterface(java.util.MapEntry,"Type");
6695 });
6696 Clazz_load(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){
6697 c$=Clazz_declareType(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);
6698 Clazz_overrideMethod(c$,"equals",
6699 function(object){
6700 if(this===object){
6701 return true;
6702 }if(Clazz_instanceOf(object,java.util.Set)){
6703 var s=object;
6704 return this.size()==s.size()&&this.containsAll(s);
6705 }return false;
6706 },"~O");
6707 Clazz_overrideMethod(c$,"hashCode",
6708 function(){
6709 var result=0;
6710 var it=this.iterator();
6711 while(it.hasNext()){
6712 var next=it.next();
6713 result+=next==null?0:next.hashCode();
6714 }
6715 return result;
6716 });
6717 Clazz_overrideMethod(c$,"removeAll",
6718 function(collection){
6719 var result=false;
6720 if(this.size()<=collection.size()){
6721 var it=this.iterator();
6722 while(it.hasNext()){
6723 if(collection.contains(it.next())){
6724 it.remove();
6725 result=true;
6726 }}
6727 }else{
6728 var it=collection.iterator();
6729 while(it.hasNext()){
6730 result=this.remove(it.next())||result;
6731 }
6732 }return result;
6733 },"java.util.Collection");
6734 });
6735 Clazz_load(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){
6736 c$=Clazz_decorateAsClass(function(){
6737 this.$keySet=null;
6738 this.valuesCollection=null;
6739 Clazz_instantialize(this,arguments);
6740 },java.util,"AbstractMap",null,java.util.Map);
6741 Clazz_makeConstructor(c$,
6742 function(){
6743 });
6744 Clazz_overrideMethod(c$,"clear",
6745 function(){
6746 this.entrySet().clear();
6747 });
6748 Clazz_overrideMethod(c$,"containsKey",
6749 function(key){
6750 var it=this.entrySet().iterator();
6751 if(key!=null){
6752 while(it.hasNext()){
6753 if(key.equals(it.next().getKey())){
6754 return true;
6755 }}
6756 }else{
6757 while(it.hasNext()){
6758 if(it.next().getKey()==null){
6759 return true;
6760 }}
6761 }return false;
6762 },"~O");
6763 Clazz_overrideMethod(c$,"containsValue",
6764 function(value){
6765 var it=this.entrySet().iterator();
6766 if(value!=null){
6767 while(it.hasNext()){
6768 if(value.equals(it.next().getValue())){
6769 return true;
6770 }}
6771 }else{
6772 while(it.hasNext()){
6773 if(it.next().getValue()==null){
6774 return true;
6775 }}
6776 }return false;
6777 },"~O");
6778 Clazz_overrideMethod(c$,"equals",
6779 function(object){
6780 if(this===object){
6781 return true;
6782 }if(Clazz_instanceOf(object,java.util.Map)){
6783 var map=object;
6784 if(this.size()!=map.size()){
6785 return false;
6786 }var objectSet=map.entrySet();
6787 var it=this.entrySet().iterator();
6788 while(it.hasNext()){
6789 if(!objectSet.contains(it.next())){
6790 return false;
6791 }}
6792 return true;
6793 }return false;
6794 },"~O");
6795 Clazz_overrideMethod(c$,"get",
6796 function(key){
6797 var it=this.entrySet().iterator();
6798 if(key!=null){
6799 while(it.hasNext()){
6800 var entry=it.next();
6801 if(key.equals(entry.getKey())){
6802 return entry.getValue();
6803 }}
6804 }else{
6805 while(it.hasNext()){
6806 var entry=it.next();
6807 if(entry.getKey()==null){
6808 return entry.getValue();
6809 }}
6810 }return null;
6811 },"~O");
6812 Clazz_overrideMethod(c$,"hashCode",
6813 function(){
6814 var result=0;
6815 var it=this.entrySet().iterator();
6816 while(it.hasNext()){
6817 result+=it.next().hashCode();
6818 }
6819 return result;
6820 });
6821 Clazz_overrideMethod(c$,"isEmpty",
6822 function(){
6823 return this.size()==0;
6824 });
6825 Clazz_overrideMethod(c$,"keySet",
6826 function(){
6827 if(this.$keySet==null){
6828 this.$keySet=((Clazz_isClassDefined("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1,this,null));
6829 }return this.$keySet;
6830 });
6831 Clazz_overrideMethod(c$,"put",
6832 function(key,value){
6833 throw new UnsupportedOperationException();
6834 },"~O,~O");
6835 Clazz_overrideMethod(c$,"putAll",
6836 function(map){
6837   this.putAllAM(map);
6838 },"java.util.Map");
6839
6840 Clazz_overrideMethod(c$,"putAllAM",
6841 function(map){
6842 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
6843 this.put(entry.getKey(),entry.getValue());
6844 }
6845 },"java.util.Map");
6846
6847 Clazz_overrideMethod(c$,"remove",
6848 function(key){
6849 var it=this.entrySet().iterator();
6850 if(key!=null){
6851 while(it.hasNext()){
6852 var entry=it.next();
6853 if(key.equals(entry.getKey())){
6854 it.remove();
6855 return entry.getValue();
6856 }}
6857 }else{
6858 while(it.hasNext()){
6859 var entry=it.next();
6860 if(entry.getKey()==null){
6861 it.remove();
6862 return entry.getValue();
6863 }}
6864 }return null;
6865 },"~O");
6866 Clazz_overrideMethod(c$,"size",
6867 function(){
6868 return this.entrySet().size();
6869 });
6870 Clazz_overrideMethod(c$,"toString",
6871 function(){
6872 if(this.isEmpty()){
6873 return"{}";
6874 }var buffer=new StringBuilder(this.size()*28);
6875 buffer.append('{');
6876 var it=this.entrySet().iterator();
6877 while(it.hasNext()){
6878 var entry=it.next();
6879 var key=entry.getKey();
6880 if(key!==this){
6881 buffer.append(key);
6882 }else{
6883 buffer.append("(this Map)");
6884 }buffer.append('=');
6885 var value=entry.getValue();
6886 if(value!==this){
6887 buffer.append(value);
6888 }else{
6889 buffer.append("(this Map)");
6890 }if(it.hasNext()){
6891 buffer.append(", ");
6892 }}
6893 buffer.append('}');
6894 return buffer.toString();
6895 });
6896 Clazz_overrideMethod(c$,"values",
6897 function(){
6898 if(this.valuesCollection==null){
6899 this.valuesCollection=((Clazz_isClassDefined("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$()),Clazz_innerTypeInstance(java.util.AbstractMap$2,this,null));
6900 }return this.valuesCollection;
6901 });
6902 Clazz_defineMethod(c$,"clone",
6903 function(){
6904 return  this.cloneAM();
6905 });
6906
6907 Clazz_defineMethod(c$,"cloneAM",
6908 function(){
6909 var result = Clazz_clone(this);
6910 //var result=Clazz_superCall(this,java.util.AbstractMap,"clone",[]);
6911 result.$keySet=null;
6912 result.valuesCollection=null;
6913 return result;
6914 });
6915
6916 c$.$AbstractMap$1$=function(){
6917 Clazz_pu$h(self.c$);
6918 c$=Clazz_declareAnonymous(java.util,"AbstractMap$1",java.util.AbstractSet);
6919 Clazz_overrideMethod(c$,"contains",
6920 function(object){
6921 return this.b$["java.util.AbstractMap"].containsKey(object);
6922 },"~O");
6923 Clazz_overrideMethod(c$,"size",
6924 function(){
6925 return this.b$["java.util.AbstractMap"].size();
6926 });
6927 Clazz_overrideMethod(c$,"iterator",
6928 function(){
6929 return((Clazz_isClassDefined("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1$1,this,null));
6930 });
6931 c$=Clazz_p0p();
6932 };
6933 c$.$AbstractMap$1$1$=function(){
6934 Clazz_pu$h(self.c$);
6935 c$=Clazz_decorateAsClass(function(){
6936 Clazz_prepareCallback(this,arguments);
6937 this.setIterator=null;
6938 Clazz_instantialize(this,arguments);
6939 },java.util,"AbstractMap$1$1",null,java.util.Iterator);
6940 Clazz_prepareFields(c$,function(){
6941 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6942 });
6943 Clazz_overrideMethod(c$,"hasNext",
6944 function(){
6945 return this.setIterator.hasNext();
6946 });
6947 Clazz_overrideMethod(c$,"next",
6948 function(){
6949 return this.setIterator.next().getKey();
6950 });
6951 Clazz_overrideMethod(c$,"remove",
6952 function(){
6953 this.setIterator.remove();
6954 });
6955 c$=Clazz_p0p();
6956 };
6957 c$.$AbstractMap$2$=function(){
6958 Clazz_pu$h(self.c$);
6959 c$=Clazz_declareAnonymous(java.util,"AbstractMap$2",java.util.AbstractCollection);
6960 Clazz_overrideMethod(c$,"size",
6961 function(){
6962 return this.b$["java.util.AbstractMap"].size();
6963 });
6964 Clazz_overrideMethod(c$,"contains",
6965 function(object){
6966 return this.b$["java.util.AbstractMap"].containsValue(object);
6967 },"~O");
6968 Clazz_overrideMethod(c$,"iterator",
6969 function(){
6970 return((Clazz_isClassDefined("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$2$1,this,null));
6971 });
6972 c$=Clazz_p0p();
6973 };
6974 c$.$AbstractMap$2$1$=function(){
6975 Clazz_pu$h(self.c$);
6976 c$=Clazz_decorateAsClass(function(){
6977 Clazz_prepareCallback(this,arguments);
6978 this.setIterator=null;
6979 Clazz_instantialize(this,arguments);
6980 },java.util,"AbstractMap$2$1",null,java.util.Iterator);
6981 Clazz_prepareFields(c$,function(){
6982 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6983 });
6984 Clazz_overrideMethod(c$,"hasNext",
6985 function(){
6986 return this.setIterator.hasNext();
6987 });
6988 Clazz_overrideMethod(c$,"next",
6989 function(){
6990 return this.setIterator.next().getValue();
6991 });
6992 Clazz_overrideMethod(c$,"remove",
6993 function(){
6994 this.setIterator.remove();
6995 });
6996 c$=Clazz_p0p();
6997 };
6998 });
6999 Clazz_declarePackage ("java.awt.image");
7000 c$ = Clazz_declareInterface (java.awt.image, "ImageObserver");
7001 Clazz_defineStatics (c$,
7002 "WIDTH", 1,
7003 "HEIGHT", 2,
7004 "PROPERTIES", 4,
7005 "SOMEBITS", 8,
7006 "FRAMEBITS", 16,
7007 "ALLBITS", 32,
7008 "ERROR", 64,
7009 "ABORT", 128);
7010 // BH removed inner class 
7011 Clazz_load(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException"],function(){
7012 c$=Clazz_decorateAsClass(function(){
7013 this.$name=null;
7014 this.$ordinal=0;
7015 Clazz_instantialize(this,arguments);
7016 },java.lang,"Enum",null,[java.io.Serializable,Comparable]);
7017 Clazz_makeConstructor(c$,
7018 function(name,ordinal){
7019 this.$name=name;
7020 this.$ordinal=ordinal;
7021 },"~S,~N");
7022 Clazz_defineMethod(c$,"name",
7023 function(){
7024 return this.$name;
7025 });
7026 Clazz_defineMethod(c$,"ordinal",
7027 function(){
7028 return this.$ordinal;
7029 });
7030 Clazz_overrideMethod(c$,"toString",
7031 function(){
7032 return this.$name;
7033 });
7034 Clazz_overrideMethod(c$,"equals",
7035 function(other){
7036 return this===other;
7037 },"~O");
7038 Clazz_overrideMethod(c$,"hashCode",
7039 function(){
7040 return this.$ordinal+(this.$name==null?0:this.$name.hashCode());
7041 });
7042 Clazz_overrideMethod(c$,"clone",
7043 function(){
7044 throw new CloneNotSupportedException(("KA004"));
7045 });
7046 Clazz_overrideMethod(c$,"compareTo",
7047 function(o){
7048 return this.$ordinal-o.$ordinal;
7049 },"~O");
7050 Clazz_defineMethod(c$,"getDeclaringClass",
7051 function(){
7052 var myClass=this.getClass();
7053 var mySuperClass=myClass.getSuperclass();
7054 if(Enum===mySuperClass){
7055 return myClass;
7056 }return mySuperClass;
7057 });
7058 c$.$valueOf=Clazz_defineMethod(c$,"$valueOf",
7059 function(enumType,name){
7060 if((enumType==null)||(name==null)){
7061 throw new NullPointerException(("KA001"));
7062 }var values=Enum.getValues(enumType);
7063 if(values==null){
7064 throw new IllegalArgumentException(("KA005"));
7065 }for(var enumConst,$enumConst=0,$$enumConst=values;$enumConst<$$enumConst.length&&((enumConst=$$enumConst[$enumConst])||true);$enumConst++){
7066 if(enumConst.$name.equals(name)){
7067 return enumConst;
7068 }}
7069 throw new IllegalArgumentException(("KA006"));
7070 },"Class,~S");
7071 c$.getValues=Clazz_defineMethod(c$,"getValues",
7072 function(enumType){
7073 return enumType.values();
7074 },"Class");
7075
7076 //c$.$Enum$1$=function(){
7077 //Clazz_pu$h(self.c$);
7078
7079 //c$=Clazz_declareAnonymous(null,"Enum$1",null,java.security.PrivilegedExceptionAction);
7080 //Clazz_overrideMethod(c$,"run",
7081 //function(){
7082 //var valsMethod=this.f$.enumType.getMethod("values",null);
7083 //valsMethod.setAccessible(true);
7084 //return valsMethod;
7085 //});
7086 //c$=Clazz_p0p();
7087 //};
7088
7089
7090 });
7091 Clazz_declarePackage ("java.applet");
7092 Clazz_declareInterface (java.applet, "AppletStub");
7093 Clazz_declarePackage ("java.applet");
7094 Clazz_declareInterface (java.applet, "AppletContext");
7095 Clazz_declarePackage ("javajs.api");
7096 Clazz_declareInterface (javajs.api, "JSInterface");
7097 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){
7098 c$=Clazz_declareType(java.lang,"StringBuilder",AbstractStringBuilder,[Appendable,CharSequence,java.io.Serializable]);
7099 Clazz_makeConstructor(c$,
7100 function(seq){
7101 Clazz_superConstructor(this,StringBuilder,[seq.toString()]);
7102 },"CharSequence");
7103 Clazz_defineMethod(c$,"append",
7104 function(b){
7105 this.append0(b?"true":"false");
7106 return this;
7107 },"~B");
7108 Clazz_defineMethod(c$,"append",
7109 function(c){
7110 this.append0(c);
7111 return this;
7112 },"~N");
7113 Clazz_defineMethod(c$,"append",
7114 function(i){
7115 this.append0(Integer.toString(i));
7116 return this;
7117 },"~N");
7118 Clazz_defineMethod(c$,"append",
7119 function(lng){
7120 this.append0(Long.toString(lng));
7121 return this;
7122 },"~N");
7123 Clazz_defineMethod(c$,"append",
7124 function(f){
7125 this.append0(Float.toString(f));
7126 return this;
7127 },"~N");
7128 Clazz_defineMethod(c$,"append",
7129 function(d){
7130 this.append0(Double.toString(d));
7131 return this;
7132 },"~N");
7133 Clazz_defineMethod(c$,"append",
7134 function(obj){
7135 if(obj==null){
7136 this.appendNull();
7137 }else{
7138 this.append0(obj.toString());
7139 }return this;
7140 },"~O");
7141 Clazz_defineMethod(c$,"append",
7142 function(str){
7143 this.append0(str);
7144 return this;
7145 },"~S");
7146 Clazz_defineMethod(c$,"append",
7147 function(sb){
7148 if(sb==null){
7149 this.appendNull();
7150 }else{
7151 this.append0(sb.getValue(),0,sb.length());
7152 }return this;
7153 },"StringBuffer");
7154 Clazz_defineMethod(c$,"append",
7155 function(ch){
7156 this.append0(ch);
7157 return this;
7158 },"~A");
7159 Clazz_defineMethod(c$,"append",
7160 function(str,offset,len){
7161 this.append0(str,offset,len);
7162 return this;
7163 },"~A,~N,~N");
7164 Clazz_defineMethod(c$,"append",
7165 function(csq){
7166 if(csq==null){
7167 this.appendNull();
7168 }else{
7169 this.append0(csq.toString());
7170 }return this;
7171 },"CharSequence");
7172 Clazz_defineMethod(c$,"append",
7173 function(csq,start,end){
7174 this.append0(csq,start,end);
7175 return this;
7176 },"CharSequence,~N,~N");
7177 Clazz_defineMethod(c$,"$delete",
7178 function(start,end){
7179 this.delete0(start,end);
7180 return this;
7181 },"~N,~N");
7182 Clazz_defineMethod(c$,"deleteCharAt",
7183 function(index){
7184 this.deleteCharAt0(index);
7185 return this;
7186 },"~N");
7187 Clazz_defineMethod(c$,"insert",
7188 function(offset,b){
7189 this.insert0(offset,b?"true":"false");
7190 return this;
7191 },"~N,~B");
7192 Clazz_defineMethod(c$,"insert",
7193 function(offset,c){
7194 this.insert0(offset,c);
7195 return this;
7196 },"~N,~N");
7197 Clazz_defineMethod(c$,"insert",
7198 function(offset,i){
7199 this.insert0(offset,Integer.toString(i));
7200 return this;
7201 },"~N,~N");
7202 Clazz_defineMethod(c$,"insert",
7203 function(offset,l){
7204 this.insert0(offset,Long.toString(l));
7205 return this;
7206 },"~N,~N");
7207 Clazz_defineMethod(c$,"insert",
7208 function(offset,f){
7209 this.insert0(offset,Float.toString(f));
7210 return this;
7211 },"~N,~N");
7212 Clazz_defineMethod(c$,"insert",
7213 function(offset,d){
7214 this.insert0(offset,Double.toString(d));
7215 return this;
7216 },"~N,~N");
7217 Clazz_defineMethod(c$,"insert",
7218 function(offset,obj){
7219 this.insert0(offset,obj==null?"null":obj.toString());
7220 return this;
7221 },"~N,~O");
7222 Clazz_defineMethod(c$,"insert",
7223 function(offset,str){
7224 this.insert0(offset,str);
7225 return this;
7226 },"~N,~S");
7227 Clazz_defineMethod(c$,"insert",
7228 function(offset,ch){
7229 this.insert0(offset,ch);
7230 return this;
7231 },"~N,~A");
7232 Clazz_defineMethod(c$,"insert",
7233 function(offset,str,strOffset,strLen){
7234 this.insert0(offset,str,strOffset,strLen);
7235 return this;
7236 },"~N,~A,~N,~N");
7237 Clazz_defineMethod(c$,"insert",
7238 function(offset,s){
7239 this.insert0(offset,s==null?"null":s.toString());
7240 return this;
7241 },"~N,CharSequence");
7242 Clazz_defineMethod(c$,"insert",
7243 function(offset,s,start,end){
7244 this.insert0(offset,s,start,end);
7245 return this;
7246 },"~N,CharSequence,~N,~N");
7247 Clazz_defineMethod(c$,"replace",
7248 function(start,end,str){
7249 this.replace0(start,end,str);
7250 return this;
7251 },"~N,~N,~S");
7252 Clazz_defineMethod(c$,"reverse",
7253 function(){
7254 this.reverse0();
7255 return this;
7256 });
7257 });
7258 Clazz_load(null,"java.lang.AbstractStringBuilder",["java.io.InvalidObjectException","java.lang.ArrayIndexOutOfBoundsException","$.IndexOutOfBoundsException","$.NegativeArraySizeException","$.NullPointerException","$.StringIndexOutOfBoundsException"],function(){
7259 c$=Clazz_decorateAsClass(function(){
7260 this.value=null;
7261 this.count=0;
7262 this.shared=false;
7263 Clazz_instantialize(this,arguments);
7264 },java.lang,"AbstractStringBuilder");
7265 Clazz_defineMethod(c$,"getValue",
7266 function(){
7267 return this.value;
7268 });
7269 Clazz_defineMethod(c$,"shareValue",
7270 function(){
7271 this.shared=true;
7272 return this.value;
7273 });
7274 Clazz_defineMethod(c$,"set",
7275 function(val,len){
7276 if(val==null)val=Clazz_newArray(0,'\0');
7277 if(val.length<len)throw new java.io.InvalidObjectException(("K0199"));
7278 this.shared=false;
7279 this.value=val;
7280 this.count=len;
7281 },"~A,~N");
7282 Clazz_makeConstructor(c$,
7283 function(){
7284 this.value=Clazz_newArray(16,'\0');
7285 });
7286 Clazz_makeConstructor(c$,
7287 function(capacity){
7288 if(capacity<0)throw new NegativeArraySizeException();
7289 this.value=Clazz_newArray(capacity,'\0');
7290 },"~N");
7291 Clazz_makeConstructor(c$,
7292 function(string){
7293 this.count=string.length;
7294 this.shared=false;
7295 this.value=Clazz_newArray(this.count+16,'\0');
7296 string.getChars(0,this.count,this.value,0);
7297 },"~S");
7298 Clazz_defineMethod(c$,"enlargeBuffer",
7299 ($fz=function(min){
7300 var twice=(this.value.length<<1)+2;
7301 var newData=Clazz_newArray(min>twice?min:twice,'\0');
7302 System.arraycopy(this.value,0,newData,0,this.count);
7303 this.value=newData;
7304 this.shared=false;
7305 },$fz.isPrivate=true,$fz),"~N");
7306 Clazz_defineMethod(c$,"appendNull",
7307 function(){
7308 var newSize=this.count+4;
7309 if(newSize>this.value.length){
7310 this.enlargeBuffer(newSize);
7311 }else if(this.shared){
7312 this.value=this.value.clone();
7313 this.shared=false;
7314 }this.value[this.count++]='n';
7315 this.value[this.count++]='u';
7316 this.value[this.count++]='l';
7317 this.value[this.count++]='l';
7318 });
7319 Clazz_defineMethod(c$,"append0",
7320 function(chars){
7321 var newSize=this.count+chars.length;
7322 if(newSize>this.value.length){
7323 this.enlargeBuffer(newSize);
7324 }else if(this.shared){
7325 this.value=this.value.clone();
7326 this.shared=false;
7327 }System.arraycopy(chars,0,this.value,this.count,chars.length);
7328 this.count=newSize;
7329 },"~A");
7330 Clazz_defineMethod(c$,"append0",
7331 function(chars,start,length){
7332 if(chars==null){
7333 throw new NullPointerException();
7334 }if(start>=0&&0<=length&&length<=chars.length-start){
7335 var newSize=this.count+length;
7336 if(newSize>this.value.length){
7337 this.enlargeBuffer(newSize);
7338 }else if(this.shared){
7339 this.value=this.value.clone();
7340 this.shared=false;
7341 }System.arraycopy(chars,start,this.value,this.count,length);
7342 this.count=newSize;
7343 }else{
7344 throw new ArrayIndexOutOfBoundsException();
7345 }},"~A,~N,~N");
7346 Clazz_defineMethod(c$,"append0",
7347 function(ch){
7348 if(this.count==this.value.length){
7349 this.enlargeBuffer(this.count+1);
7350 }if(this.shared){
7351 this.value=this.value.clone();
7352 this.shared=false;
7353 }this.value[this.count++]=ch;
7354 },"~N");
7355 Clazz_defineMethod(c$,"append0",
7356 function(string){
7357 if(string==null){
7358 this.appendNull();
7359 return;
7360 }var adding=string.length;
7361 var newSize=this.count+adding;
7362 if(newSize>this.value.length){
7363 this.enlargeBuffer(newSize);
7364 }else if(this.shared){
7365 this.value=this.value.clone();
7366 this.shared=false;
7367 }string.getChars(0,adding,this.value,this.count);
7368 this.count=newSize;
7369 },"~S");
7370 Clazz_defineMethod(c$,"append0",
7371 function(s,start,end){
7372 if(s==null)s="null";
7373 if(start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7374 this.append0(s.subSequence(start,end).toString());
7375 },"CharSequence,~N,~N");
7376 Clazz_defineMethod(c$,"capacity",
7377 function(){
7378 return this.value.length;
7379 });
7380 Clazz_defineMethod(c$,"charAt",
7381 function(index){
7382 if(index<0||index>=this.count)throw new StringIndexOutOfBoundsException(index);
7383 return this.value[index];
7384 },"~N");
7385 Clazz_defineMethod(c$,"delete0",
7386 function(start,end){
7387 if(start>=0){
7388 if(end>this.count){
7389 end=this.count;
7390 }if(end==start){
7391 return;
7392 }if(end>start){
7393 var length=this.count-end;
7394 if(length>0){
7395 if(!this.shared){
7396 System.arraycopy(this.value,end,this.value,start,length);
7397 }else{
7398 var newData=Clazz_newArray(this.value.length,'\0');
7399 System.arraycopy(this.value,0,newData,0,start);
7400 System.arraycopy(this.value,end,newData,start,length);
7401 this.value=newData;
7402 this.shared=false;
7403 }}this.count-=end-start;
7404 return;
7405 }}throw new StringIndexOutOfBoundsException();
7406 },"~N,~N");
7407 Clazz_defineMethod(c$,"deleteCharAt0",
7408 function(location){
7409 if(0>location||location>=this.count)throw new StringIndexOutOfBoundsException(location);
7410 var length=this.count-location-1;
7411 if(length>0){
7412 if(!this.shared){
7413 System.arraycopy(this.value,location+1,this.value,location,length);
7414 }else{
7415 var newData=Clazz_newArray(this.value.length,'\0');
7416 System.arraycopy(this.value,0,newData,0,location);
7417 System.arraycopy(this.value,location+1,newData,location,length);
7418 this.value=newData;
7419 this.shared=false;
7420 }}this.count--;
7421 },"~N");
7422 Clazz_defineMethod(c$,"ensureCapacity",
7423 function(min){
7424 if(min>this.value.length){
7425 this.enlargeBuffer(min);
7426 }},"~N");
7427 Clazz_defineMethod(c$,"getChars",
7428 function(start,end,dest,destStart){
7429 if(start>this.count||end>this.count||start>end){
7430 throw new StringIndexOutOfBoundsException();
7431 }System.arraycopy(this.value,start,dest,destStart,end-start);
7432 },"~N,~N,~A,~N");
7433 Clazz_defineMethod(c$,"insert0",
7434 function(index,chars){
7435 if(0>index||index>this.count){
7436 throw new StringIndexOutOfBoundsException(index);
7437 }if(chars.length!=0){
7438 this.move(chars.length,index);
7439 System.arraycopy(chars,0,this.value,index,chars.length);
7440 this.count+=chars.length;
7441 }},"~N,~A");
7442 Clazz_defineMethod(c$,"insert0",
7443 function(index,chars,start,length){
7444 if(0<=index&&index<=this.count){
7445 if(start>=0&&0<=length&&length<=chars.length-start){
7446 if(length!=0){
7447 this.move(length,index);
7448 System.arraycopy(chars,start,this.value,index,length);
7449 this.count+=length;
7450 }return;
7451 }throw new StringIndexOutOfBoundsException("offset "+start+", len "+length+", array.length "+chars.length);
7452 }throw new StringIndexOutOfBoundsException(index);
7453 },"~N,~A,~N,~N");
7454 Clazz_defineMethod(c$,"insert0",
7455 function(index,ch){
7456 if(0>index||index>this.count){
7457 throw new ArrayIndexOutOfBoundsException(index);
7458 }this.move(1,index);
7459 this.value[index]=ch;
7460 this.count++;
7461 },"~N,~N");
7462 Clazz_defineMethod(c$,"insert0",
7463 function(index,string){
7464 if(0<=index&&index<=this.count){
7465 if(string==null)string="null";
7466 var min=string.length;
7467 if(min!=0){
7468 this.move(min,index);
7469 string.getChars(0,min,this.value,index);
7470 this.count+=min;
7471 }}else{
7472 throw new StringIndexOutOfBoundsException(index);
7473 }},"~N,~S");
7474 Clazz_defineMethod(c$,"insert0",
7475 function(index,s,start,end){
7476 if(s==null)s="null";
7477 if(index<0||index>this.count||start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7478 this.insert0(index,s.subSequence(start,end).toString());
7479 },"~N,CharSequence,~N,~N");
7480 Clazz_defineMethod(c$,"length",
7481 function(){
7482 return this.count;
7483 });
7484 Clazz_defineMethod(c$,"move",
7485 ($fz=function(size,index){
7486 var newSize;
7487 if(this.value.length-this.count>=size){
7488 if(!this.shared){
7489 System.arraycopy(this.value,index,this.value,index+size,this.count-index);
7490 return;
7491 }newSize=this.value.length;
7492 }else{
7493 var a=this.count+size;
7494 var b=(this.value.length<<1)+2;
7495 newSize=a>b?a:b;
7496 }var newData=Clazz_newArray(newSize,'\0');
7497 System.arraycopy(this.value,0,newData,0,index);
7498 System.arraycopy(this.value,index,newData,index+size,this.count-index);
7499 this.value=newData;
7500 this.shared=false;
7501 },$fz.isPrivate=true,$fz),"~N,~N");
7502 Clazz_defineMethod(c$,"replace0",
7503 function(start,end,string){
7504 if(start>=0){
7505 if(end>this.count)end=this.count;
7506 if(end>start){
7507 var stringLength=string.length;
7508 var diff=end-start-stringLength;
7509 if(diff>0){
7510 if(!this.shared){
7511 System.arraycopy(this.value,end,this.value,start+stringLength,this.count-end);
7512 }else{
7513 var newData=Clazz_newArray(this.value.length,'\0');
7514 System.arraycopy(this.value,0,newData,0,start);
7515 System.arraycopy(this.value,end,newData,start+stringLength,this.count-end);
7516 this.value=newData;
7517 this.shared=false;
7518 }}else if(diff<0){
7519 this.move(-diff,end);
7520 }else if(this.shared){
7521 this.value=this.value.clone();
7522 this.shared=false;
7523 }string.getChars(0,stringLength,this.value,start);
7524 this.count-=diff;
7525 return;
7526 }if(start==end){
7527 if(string==null)throw new NullPointerException();
7528 this.insert0(start,string);
7529 return;
7530 }}throw new StringIndexOutOfBoundsException();
7531 },"~N,~N,~S");
7532 Clazz_defineMethod(c$,"reverse0",
7533 function(){
7534 if(this.count<2){
7535 return;
7536 }if(!this.shared){
7537 for(var i=0,end=this.count,mid=Math.floor(this.count/2);i<mid;i++){
7538 var temp=this.value[--end];
7539 this.value[end]=this.value[i];
7540 this.value[i]=temp;
7541 }
7542 }else{
7543 var newData=Clazz_newArray(this.value.length,'\0');
7544 for(var i=0,end=this.count;i<this.count;i++){
7545 newData[--end]=this.value[i];
7546 }
7547 this.value=newData;
7548 this.shared=false;
7549 }});
7550 Clazz_defineMethod(c$,"setCharAt",
7551 function(index,ch){
7552 if(0>index||index>=this.count){
7553 throw new StringIndexOutOfBoundsException(index);
7554 }if(this.shared){
7555 this.value=this.value.clone();
7556 this.shared=false;
7557 }this.value[index]=ch;
7558 },"~N,~N");
7559 Clazz_defineMethod(c$,"setLength",
7560 function(length){
7561 if(length<0)throw new StringIndexOutOfBoundsException(length);
7562 if(this.count<length){
7563 if(length>this.value.length){
7564 this.enlargeBuffer(length);
7565 }else{
7566 if(this.shared){
7567 var newData=Clazz_newArray(this.value.length,'\0');
7568 System.arraycopy(this.value,0,newData,0,this.count);
7569 this.value=newData;
7570 this.shared=false;
7571 }else{
7572 for(var i=this.count;i<length;i++){
7573 this.value[i]=String.fromCharCode(0);
7574 }
7575 }}}this.count=length;
7576 },"~N");
7577 Clazz_defineMethod(c$,"substring",
7578 function(start){
7579 if(0<=start&&start<=this.count){
7580 if(start==this.count)return"";
7581 this.shared=true;
7582 return String.instantialize(start,this.count-start,this.value);
7583 }throw new StringIndexOutOfBoundsException(start);
7584 },"~N");
7585 Clazz_defineMethod(c$,"substring",
7586 function(start,end){
7587 if(0<=start&&start<=end&&end<=this.count){
7588 if(start==end)return"";
7589 this.shared=true;
7590 return String.instantialize(this.value,start,end-start);
7591 }throw new StringIndexOutOfBoundsException();
7592 },"~N,~N");
7593 Clazz_overrideMethod(c$,"toString",
7594 function(){
7595 if(this.count==0)return"";
7596 if(this.count>=256&&this.count<=(this.value.length>>1))return String.instantialize(this.value,0,this.count);
7597 this.shared=true;
7598 return String.instantialize(0,this.count,this.value);
7599 });
7600 Clazz_defineMethod(c$,"subSequence",
7601 function(start,end){
7602 return this.substring(start,end);
7603 },"~N,~N");
7604 Clazz_defineMethod(c$,"indexOf",
7605 function(string){
7606 return this.indexOf(string,0);
7607 },"~S");
7608 Clazz_defineMethod(c$,"indexOf",
7609 function(subString,start){
7610 if(start<0)start=0;
7611 var subCount=subString.length;
7612 if(subCount>0){
7613 if(subCount+start>this.count)return-1;
7614 var firstChar=subString.charAt(0);
7615 while(true){
7616 var i=start;
7617 var found=false;
7618 for(;i<this.count;i++)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7619 found=true;
7620 break;
7621 }
7622 if(!found||subCount+i>this.count)return-1;
7623 var o1=i;
7624 var o2=0;
7625 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7626 }
7627 if(o2==subCount)return i;
7628 start=i+1;
7629 }
7630 }return(start<this.count||start==0)?start:this.count;
7631 },"~S,~N");
7632 Clazz_defineMethod(c$,"lastIndexOf",
7633 function(string){
7634 return this.lastIndexOf(string,this.count);
7635 },"~S");
7636 Clazz_defineMethod(c$,"lastIndexOf",
7637 function(subString,start){
7638 var subCount=subString.length;
7639 if(subCount<=this.count&&start>=0){
7640 if(subCount>0){
7641 if(start>this.count-subCount)start=this.count-subCount;
7642 var firstChar=subString.charAt(0);
7643 while(true){
7644 var i=start;
7645 var found=false;
7646 for(;i>=0;--i)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7647 found=true;
7648 break;
7649 }
7650 if(!found)return-1;
7651 var o1=i;
7652 var o2=0;
7653 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7654 }
7655 if(o2==subCount)return i;
7656 start=i-1;
7657 }
7658 }return start<this.count?start:this.count;
7659 }return-1;
7660 },"~S,~N");
7661 Clazz_defineMethod(c$,"trimToSize",
7662 function(){
7663 if(this.count<this.value.length){
7664 var newValue=Clazz_newArray(this.count,'\0');
7665 System.arraycopy(this.value,0,newValue,0,this.count);
7666 this.value=newValue;
7667 this.shared=false;
7668 }});
7669 Clazz_defineStatics(c$,
7670 "INITIAL_CAPACITY",16);
7671 });
7672 // BH adjusted to have only one sort method.
7673 // BH -- added Java 6  copyOfRange
7674
7675 Clazz_load(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){
7676 c$=Clazz_declareType(java.util,"Arrays");
7677
7678 c$.copyOfRange = Clazz_defineMethod (c$, "copyOfRange", 
7679 function (original, from, to) {
7680 to = Math.min(original.length, to);
7681 var newLength = to - from;
7682 if (newLength < 0) throw  new IllegalArgumentException (from + " > " + to);
7683 if (original.slice)
7684   return original.slice(from, to);
7685   // MSIE and Chrome do not have Int32Array.slice()
7686 var c = Clazz_newIntArray(newLength, 0);
7687 for (var i = 0; i < newLength; i++)
7688   c[i] = original[from++];
7689 return c;  
7690 }, "~A,~N,~N");
7691
7692 c$.sort=Clazz_overrideMethod(c$,"sort",
7693 function(a,c,d,e){
7694   switch (arguments.length) {
7695   case 1:
7696     var aux=a.sort(function(o1,o2){
7697       if(typeof o1=="string"||o1 instanceof Comparable){
7698         return o1.compareTo(o2);
7699       }
7700       return o1-o2;
7701       });
7702     for(var i=0;i<a.length;i++){
7703       a[i]=aux[i];
7704     }
7705     return;
7706   case 2:
7707     var aux=a.sort(function(o1,o2){
7708       if(c!=null){
7709         return c.compare(o1,o2);
7710       }else if(typeof o1=="string"||o1 instanceof Comparable){
7711         return o1.compareTo(o2);
7712       }
7713       return o1-o2;
7714       });
7715     for(var i=0;i<a.length;i++){
7716       a[i]=aux[i];
7717     }
7718     return;
7719   case 3:
7720     var fromIndex = c;
7721     var toIndex = d;
7722     this.rangeCheck(a.length,fromIndex,toIndex);
7723     var aux=new Array();
7724     for(var i=fromIndex;i<toIndex;i++){
7725       aux[i-fromIndex]=a[i];
7726     }
7727     aux=aux.sort(function(o1,o2){
7728       if(typeof o1=="string"||o1 instanceof Comparable){
7729         return o1.compareTo(o2);
7730       }
7731       return o1-o2;
7732       });
7733     for(var i=fromIndex;i<toIndex;i++){
7734       a[i]=aux[i-fromIndex];
7735     }
7736     return;
7737   case 4:  
7738     var fromIndex = c;
7739     var toIndex = d;
7740     c = e;
7741     this.rangeCheck(a.length,fromIndex,toIndex);
7742     var aux=new Array();
7743     for(var i=fromIndex;i<toIndex;i++){
7744       aux[i-fromIndex]=a[i];
7745     }
7746     aux=aux.sort(function(o1,o2){
7747       if(c!=null){
7748         return c.compare(o1,o2);
7749       }else if(typeof o1=="string"||o1 instanceof Comparable){
7750         return o1.compareTo(o2);
7751       }
7752       return o1-o2;
7753       });
7754     for(var i=fromIndex;i<toIndex;i++){
7755       a[i]=aux[i-fromIndex];
7756     }
7757   }
7758 });
7759
7760 c$.rangeCheck=Clazz_defineMethod(c$,"rangeCheck",
7761 ($fz=function(arrayLen,fromIndex,toIndex){
7762 if(fromIndex>toIndex)throw new IllegalArgumentException("fromIndex("+fromIndex+") > toIndex("+toIndex+")");
7763 if(fromIndex<0)throw new ArrayIndexOutOfBoundsException(fromIndex);
7764 if(toIndex>arrayLen)throw new ArrayIndexOutOfBoundsException(toIndex);
7765 },$fz.isPrivate=true,$fz),"~N,~N,~N");
7766 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7767 function(a,key){
7768 var low=0;
7769 var high=a.length-1;
7770 while(low<=high){
7771 var mid=(low+high)>>1;
7772 var midVal=a[mid];
7773 if(midVal<key)low=mid+1;
7774 else if(midVal>key)high=mid-1;
7775 else return mid;
7776 }
7777 return-(low+1);
7778 },"~A,~N");
7779 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7780 function(a,key){
7781 var low=0;
7782 var high=a.length-1;
7783 while(low<=high){
7784 var mid=(low+high)>>1;
7785 var midVal=a[mid];
7786 var cmp=(midVal).compareTo(key);
7787 if(cmp<0)low=mid+1;
7788 else if(cmp>0)high=mid-1;
7789 else return mid;
7790 }
7791 return-(low+1);
7792 },"~A,~O");
7793 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7794 function(a,key,c){
7795 if(c==null)return java.util.Arrays.binarySearch(a,key);
7796 var low=0;
7797 var high=a.length-1;
7798 while(low<=high){
7799 var mid=(low+high)>>1;
7800 var midVal=a[mid];
7801 var cmp=c.compare(midVal,key);
7802 if(cmp<0)low=mid+1;
7803 else if(cmp>0)high=mid-1;
7804 else return mid;
7805 }
7806 return-(low+1);
7807 },"~A,~O,java.util.Comparator");
7808 c$.equals=Clazz_defineMethod(c$,"equals",
7809 function(a,a2){
7810 if(a===a2)return true;
7811 if(a==null||a2==null)return false;
7812 var length=a.length;
7813 if(a2.length!=length)return false;
7814 for(var i=0;i<length;i++){
7815 var o1=a[i];
7816 var o2=a2[i];
7817 {
7818 if(!(o1==null?o2==null:(o1.equals==null?o1==o2:o1.equals(o2))))return false;
7819 }}
7820 return true;
7821 },"~A,~A");
7822
7823 c$.fill=Clazz_overrideMethod(c$,"fill",
7824 function(a,fromIndex,toIndex,val){
7825 if (arguments.length == 2) {
7826                 val = fromIndex;
7827                 fromIndex = 0;
7828                 toIndex = a.length;
7829         }       
7830         java.util.Arrays.rangeCheck(a.length,fromIndex,toIndex);
7831         for(var i=fromIndex;i<toIndex;i++)a[i]=val;
7832 });
7833
7834 c$.asList=Clazz_defineMethod(c$,"asList",
7835 function(a){
7836 return new java.util.Arrays.ArrayList(arguments.length == 1 && Clazz_getClassName(a) == "Array" ? a : arguments); // BH must be T...
7837 },"~A");
7838 Clazz_pu$h(self.c$);
7839 c$=Clazz_decorateAsClass(function(){
7840 this.a=null;
7841 Clazz_instantialize(this,arguments);
7842 },java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);
7843 Clazz_makeConstructor(c$,
7844 function(a){
7845 Clazz_superConstructor(this,java.util.Arrays.ArrayList,[]);
7846 if(a==null)throw new NullPointerException();
7847 this.a=a;
7848 },"~A");
7849 Clazz_overrideMethod(c$,"size",
7850 function(){
7851 return this.a.length;
7852 });
7853 Clazz_defineMethod(c$,"toArray",
7854 function(){
7855 return this.a.clone();
7856 });
7857 Clazz_overrideMethod(c$,"get",
7858 function(a){
7859 return this.a[a];
7860 },"~N");
7861 Clazz_overrideMethod(c$,"set",
7862 function(a,b){
7863 var c=this.a[a];
7864 this.a[a]=b;
7865 return c;
7866 },"~N,~O");
7867 Clazz_overrideMethod(c$,"indexOf",
7868 function(a){
7869 if(a==null){
7870 for(var b=0;b<this.a.length;b++)if(this.a[b]==null)return b;
7871
7872 }else{
7873 for(var b=0;b<this.a.length;b++)if(a.equals(this.a[b]))return b;
7874
7875 }return-1;
7876 },"~O");
7877 Clazz_overrideMethod(c$,"contains",
7878 function(a){
7879 return this.indexOf(a)!=-1;
7880 },"~O");
7881 c$=Clazz_p0p();
7882 Clazz_defineStatics(c$,
7883 "INSERTIONSORT_THRESHOLD",7);
7884 });
7885 Clazz_declarePackage ("java.util");
7886 Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () {
7887 c$ = Clazz_decorateAsClass (function () {
7888 this.language = null;
7889 this.country = null;
7890 this.variant = null;
7891 this.hashCodeValue = 0;
7892 Clazz_instantialize (this, arguments);
7893 }, java.util, "Locale", null, [Cloneable, java.io.Serializable]);
7894 Clazz_makeConstructor (c$, 
7895 function (language, country, variant) {
7896 this.language = language.intern ();
7897 this.country = country.intern ();
7898 this.variant = variant.intern ();
7899 }, "~S,~S,~S");
7900 Clazz_makeConstructor (c$, 
7901 function (language, country) {
7902 this.construct (language, country, "");
7903 }, "~S,~S");
7904 Clazz_makeConstructor (c$, 
7905 function (language) {
7906 this.construct (language, "", "");
7907 }, "~S");
7908 Clazz_makeConstructor (c$, 
7909  function (language, country, flag) {
7910 this.language = language;
7911 this.country = country;
7912 this.variant = "";
7913 }, "~S,~S,~B");
7914 c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", 
7915  function (key, language, country) {
7916 var locale =  new java.util.Locale (language, country, false);
7917 java.util.Locale.cache.put (key, locale);
7918 return locale;
7919 }, "~S,~S,~S");
7920 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
7921 function (language, country, variant) {
7922 if (language == null || country == null || variant == null) {
7923 throw  new NullPointerException ();
7924 }var sb =  new StringBuilder ();
7925 sb.append (language).append ('_').append (country).append ('_').append (variant);
7926 var key = sb.toString ();
7927 var locale = java.util.Locale.cache.get (key);
7928 if (locale == null) {
7929 locale =  new java.util.Locale (language, country, variant);
7930 var l = java.util.Locale.cache.put (key, locale);
7931 if (l != null) {
7932 locale = l;
7933 }}return locale;
7934 }, "~S,~S,~S");
7935 c$.getDefault = Clazz_defineMethod (c$, "getDefault", 
7936 function () {
7937 if (java.util.Locale.defaultLocale == null) {
7938 var language;
7939 var country;
7940 var variant;
7941 language = "en";
7942 country = "";
7943 variant = "";
7944 java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant);
7945 }return java.util.Locale.defaultLocale;
7946 });
7947 c$.setDefault = Clazz_defineMethod (c$, "setDefault", 
7948 function (newLocale) {
7949 if (newLocale == null) throw  new NullPointerException ("Can't set default locale to NULL");
7950 java.util.Locale.defaultLocale = newLocale;
7951 }, "java.util.Locale");
7952 Clazz_defineMethod (c$, "getLanguage", 
7953 function () {
7954 return this.language;
7955 });
7956 Clazz_defineMethod (c$, "getCountry", 
7957 function () {
7958 return this.country;
7959 });
7960 Clazz_defineMethod (c$, "getVariant", 
7961 function () {
7962 return this.variant;
7963 });
7964 Clazz_overrideMethod (c$, "toString", 
7965 function () {
7966 var l = this.language.length != 0;
7967 var c = this.country.length != 0;
7968 var v = this.variant.length != 0;
7969 var result =  new StringBuilder (this.language);
7970 if (c || (l && v)) {
7971 result.append ('_').append (this.country);
7972 }if (v && (l || c)) {
7973 result.append ('_').append (this.variant);
7974 }return result.toString ();
7975 });
7976 Clazz_defineMethod (c$, "getDisplayLanguage", 
7977 function () {
7978 return this.getDisplayLanguage (java.util.Locale.getDefault ());
7979 });
7980 Clazz_defineMethod (c$, "getDisplayLanguage", 
7981 function (inLocale) {
7982 return this.getDisplayString (this.language, inLocale, 0);
7983 }, "java.util.Locale");
7984 Clazz_defineMethod (c$, "getDisplayCountry", 
7985 function () {
7986 return this.getDisplayCountry (java.util.Locale.getDefault ());
7987 });
7988 Clazz_defineMethod (c$, "getDisplayCountry", 
7989 function (inLocale) {
7990 return this.getDisplayString (this.country, inLocale, 1);
7991 }, "java.util.Locale");
7992 Clazz_defineMethod (c$, "getDisplayString", 
7993  function (code, inLocale, type) {
7994 if (code.length == 0) {
7995 return "";
7996 }if (inLocale == null) {
7997 throw  new NullPointerException ();
7998 }return inLocale.toString ();
7999 }, "~S,java.util.Locale,~N");
8000 Clazz_defineMethod (c$, "getDisplayVariant", 
8001 function () {
8002 return this.getDisplayVariant (java.util.Locale.getDefault ());
8003 });
8004 Clazz_defineMethod (c$, "getDisplayVariant", 
8005 function (inLocale) {
8006 if (this.variant.length == 0) return "";
8007 return this.variant;
8008 }, "java.util.Locale");
8009 Clazz_defineMethod (c$, "getDisplayName", 
8010 function () {
8011 return this.getDisplayName (java.util.Locale.getDefault ());
8012 });
8013 Clazz_defineMethod (c$, "getDisplayName", 
8014 function (inLocale) {
8015 return inLocale.toString ();
8016 }, "java.util.Locale");
8017 Clazz_defineMethod (c$, "clone", 
8018 function () {
8019 try {
8020 var that = Clazz_superCall (this, java.util.Locale, "clone", []);
8021 return that;
8022 } catch (e) {
8023 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8024 throw  new InternalError ();
8025 } else {
8026 throw e;
8027 }
8028 }
8029 });
8030 Clazz_overrideMethod (c$, "hashCode", 
8031 function () {
8032 var hc = this.hashCodeValue;
8033 if (hc == 0) {
8034 hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4);
8035 this.hashCodeValue = hc;
8036 }return hc;
8037 });
8038 Clazz_overrideMethod (c$, "equals", 
8039 function (obj) {
8040 if (this === obj) return true;
8041 if (!(Clazz_instanceOf (obj, java.util.Locale))) return false;
8042 var other = obj;
8043 return this.language === other.language && this.country === other.country && this.variant === other.variant;
8044 }, "~O");
8045 c$.cache = c$.prototype.cache =  new java.util.HashMap (32);
8046 c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", "");
8047 c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", "");
8048 Clazz_defineStatics (c$,
8049 "DISPLAY_LANGUAGE", 0,
8050 "DISPLAY_COUNTRY", 1,
8051 "defaultLocale", null);
8052 });
8053 Clazz_declarePackage ("java.awt.event");
8054 Clazz_load (["java.util.EventListener"], "java.awt.event.ActionListener", null, function () {
8055 Clazz_declareInterface (java.awt.event, "ActionListener", java.util.EventListener);
8056 });
8057 Clazz_declarePackage ("java.awt.event");
8058 Clazz_load (["java.util.EventListener"], "java.awt.event.AdjustmentListener", null, function () {
8059 Clazz_declareInterface (java.awt.event, "AdjustmentListener", java.util.EventListener);
8060 });
8061 Clazz_declarePackage ("java.awt.event");
8062 Clazz_load (["java.util.EventListener"], "java.awt.event.ComponentListener", null, function () {
8063 Clazz_declareInterface (java.awt.event, "ComponentListener", java.util.EventListener);
8064 });
8065 Clazz_declarePackage ("java.awt.event");
8066 Clazz_load (["java.util.EventListener"], "java.awt.event.ContainerListener", null, function () {
8067 Clazz_declareInterface (java.awt.event, "ContainerListener", java.util.EventListener);
8068 });
8069 Clazz_declarePackage ("java.awt.event");
8070 Clazz_load (["java.util.EventListener"], "java.awt.event.FocusListener", null, function () {
8071 Clazz_declareInterface (java.awt.event, "FocusListener", java.util.EventListener);
8072 });
8073 Clazz_declarePackage ("java.awt.event");
8074 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyBoundsListener", null, function () {
8075 Clazz_declareInterface (java.awt.event, "HierarchyBoundsListener", java.util.EventListener);
8076 });
8077 Clazz_declarePackage ("java.awt.event");
8078 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyListener", null, function () {
8079 Clazz_declareInterface (java.awt.event, "HierarchyListener", java.util.EventListener);
8080 });
8081 Clazz_declarePackage ("java.awt.event");
8082 Clazz_load (["java.util.EventListener"], "java.awt.event.InputMethodListener", null, function () {
8083 Clazz_declareInterface (java.awt.event, "InputMethodListener", java.util.EventListener);
8084 });
8085 Clazz_declarePackage ("java.awt.event");
8086 Clazz_load (["java.util.EventListener"], "java.awt.event.ItemListener", null, function () {
8087 Clazz_declareInterface (java.awt.event, "ItemListener", java.util.EventListener);
8088 });
8089 Clazz_declarePackage ("java.awt.event");
8090 Clazz_load (["java.util.EventListener"], "java.awt.event.KeyListener", null, function () {
8091 Clazz_declareInterface (java.awt.event, "KeyListener", java.util.EventListener);
8092 });
8093 Clazz_declarePackage ("java.awt.event");
8094 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseListener", null, function () {
8095 Clazz_declareInterface (java.awt.event, "MouseListener", java.util.EventListener);
8096 });
8097 Clazz_declarePackage ("java.awt.event");
8098 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseMotionListener", null, function () {
8099 Clazz_declareInterface (java.awt.event, "MouseMotionListener", java.util.EventListener);
8100 });
8101 Clazz_declarePackage ("java.awt.event");
8102 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseWheelListener", null, function () {
8103 Clazz_declareInterface (java.awt.event, "MouseWheelListener", java.util.EventListener);
8104 });
8105 Clazz_declarePackage ("java.awt.event");
8106 Clazz_load (["java.util.EventListener"], "java.awt.event.TextListener", null, function () {
8107 Clazz_declareInterface (java.awt.event, "TextListener", java.util.EventListener);
8108 });
8109 Clazz_declarePackage ("java.awt.event");
8110 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowFocusListener", null, function () {
8111 Clazz_declareInterface (java.awt.event, "WindowFocusListener", java.util.EventListener);
8112 });
8113 Clazz_declarePackage ("java.awt.event");
8114 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowListener", null, function () {
8115 Clazz_declareInterface (java.awt.event, "WindowListener", java.util.EventListener);
8116 });
8117 Clazz_declarePackage ("java.awt.event");
8118 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowStateListener", null, function () {
8119 Clazz_declareInterface (java.awt.event, "WindowStateListener", java.util.EventListener);
8120 });
8121 Clazz_declarePackage ("java.awt");
8122 Clazz_load (null, "java.awt.Cursor", ["java.lang.IllegalArgumentException"], function () {
8123 c$ = Clazz_decorateAsClass (function () {
8124 this.type = 0;
8125 this.name = null;
8126 Clazz_instantialize (this, arguments);
8127 }, java.awt, "Cursor");
8128 c$.getPredefinedCursor = Clazz_defineMethod (c$, "getPredefinedCursor", 
8129 function (type) {
8130 if (type < 0 || type > 13) {
8131 throw  new IllegalArgumentException ("illegal cursor type");
8132 }var c = java.awt.Cursor.predefinedPrivate[type];
8133 if (c == null) {
8134 java.awt.Cursor.predefinedPrivate[type] = c =  new java.awt.Cursor (type);
8135 }if (java.awt.Cursor.predefined[type] == null) {
8136 java.awt.Cursor.predefined[type] = c;
8137 }return c;
8138 }, "~N");
8139 c$.getSystemCustomCursor = Clazz_defineMethod (c$, "getSystemCustomCursor", 
8140 function (name) {
8141 return null;
8142 }, "~S");
8143 c$.getDefaultCursor = Clazz_defineMethod (c$, "getDefaultCursor", 
8144 function () {
8145 return java.awt.Cursor.getPredefinedCursor (0);
8146 });
8147 Clazz_makeConstructor (c$, 
8148 function (type) {
8149 if (type < 0 || type > 13) {
8150 throw  new IllegalArgumentException ("illegal cursor type");
8151 }this.type = type;
8152 this.name = "TODO_CURSOR";
8153 }, "~N");
8154 Clazz_makeConstructor (c$, 
8155 function (name) {
8156 this.type = -1;
8157 this.name = name;
8158 }, "~S");
8159 Clazz_defineMethod (c$, "getType", 
8160 function () {
8161 return this.type;
8162 });
8163 Clazz_defineMethod (c$, "getName", 
8164 function () {
8165 return this.name;
8166 });
8167 Clazz_overrideMethod (c$, "toString", 
8168 function () {
8169 return this.getClass ().getName () + "[" + this.getName () + "]";
8170 });
8171 Clazz_defineStatics (c$,
8172 "DEFAULT_CURSOR", 0,
8173 "CROSSHAIR_CURSOR", 1,
8174 "TEXT_CURSOR", 2,
8175 "WAIT_CURSOR", 3,
8176 "SW_RESIZE_CURSOR", 4,
8177 "SE_RESIZE_CURSOR", 5,
8178 "NW_RESIZE_CURSOR", 6,
8179 "NE_RESIZE_CURSOR", 7,
8180 "N_RESIZE_CURSOR", 8,
8181 "S_RESIZE_CURSOR", 9,
8182 "W_RESIZE_CURSOR", 10,
8183 "E_RESIZE_CURSOR", 11,
8184 "HAND_CURSOR", 12,
8185 "MOVE_CURSOR", 13);
8186 c$.predefined = c$.prototype.predefined =  new Array (14);
8187 c$.predefinedPrivate = c$.prototype.predefinedPrivate =  new Array (14);
8188 Clazz_defineStatics (c$,
8189 "cursorProperties",  Clazz_newArray (-1, [ Clazz_newArray (-1, ["AWT.DefaultCursor", "Default Cursor"]),  Clazz_newArray (-1, ["AWT.CrosshairCursor", "Crosshair Cursor"]),  Clazz_newArray (-1, ["AWT.TextCursor", "Text Cursor"]),  Clazz_newArray (-1, ["AWT.WaitCursor", "Wait Cursor"]),  Clazz_newArray (-1, ["AWT.SWResizeCursor", "Southwest Resize Cursor"]),  Clazz_newArray (-1, ["AWT.SEResizeCursor", "Southeast Resize Cursor"]),  Clazz_newArray (-1, ["AWT.NWResizeCursor", "Northwest Resize Cursor"]),  Clazz_newArray (-1, ["AWT.NEResizeCursor", "Northeast Resize Cursor"]),  Clazz_newArray (-1, ["AWT.NResizeCursor", "North Resize Cursor"]),  Clazz_newArray (-1, ["AWT.SResizeCursor", "South Resize Cursor"]),  Clazz_newArray (-1, ["AWT.WResizeCursor", "West Resize Cursor"]),  Clazz_newArray (-1, ["AWT.EResizeCursor", "East Resize Cursor"]),  Clazz_newArray (-1, ["AWT.HandCursor", "Hand Cursor"]),  Clazz_newArray (-1, ["AWT.MoveCursor", "Move Cursor"])]),
8190 "CUSTOM_CURSOR", -1);
8191 });
8192 Clazz_declarePackage ("java.awt");
8193 Clazz_load (["java.lang.Error"], "java.awt.AWTError", null, function () {
8194 c$ = Clazz_declareType (java.awt, "AWTError", Error);
8195 });
8196 Clazz_declarePackage ("java.awt");
8197 Clazz_load (null, "java.awt.Insets", ["java.lang.InternalError"], function () {
8198 c$ = Clazz_decorateAsClass (function () {
8199 this.top = 0;
8200 this.left = 0;
8201 this.bottom = 0;
8202 this.right = 0;
8203 Clazz_instantialize (this, arguments);
8204 }, java.awt, "Insets", null, [Cloneable, java.io.Serializable]);
8205 Clazz_makeConstructor (c$, 
8206 function (top, left, bottom, right) {
8207 this.top = top;
8208 this.left = left;
8209 this.bottom = bottom;
8210 this.right = right;
8211 }, "~N,~N,~N,~N");
8212 Clazz_defineMethod (c$, "set", 
8213 function (top, left, bottom, right) {
8214 this.top = top;
8215 this.left = left;
8216 this.bottom = bottom;
8217 this.right = right;
8218 }, "~N,~N,~N,~N");
8219 Clazz_overrideMethod (c$, "equals", 
8220 function (obj) {
8221 if (Clazz_instanceOf (obj, java.awt.Insets)) {
8222 var insets = obj;
8223 return ((this.top == insets.top) && (this.left == insets.left) && (this.bottom == insets.bottom) && (this.right == insets.right));
8224 }return false;
8225 }, "~O");
8226 Clazz_overrideMethod (c$, "hashCode", 
8227 function () {
8228 var sum1 = this.left + this.bottom;
8229 var sum2 = this.right + this.top;
8230 var val1 = Clazz_doubleToInt (sum1 * (sum1 + 1) / 2) + this.left;
8231 var val2 = Clazz_doubleToInt (sum2 * (sum2 + 1) / 2) + this.top;
8232 var sum3 = val1 + val2;
8233 return Clazz_doubleToInt (sum3 * (sum3 + 1) / 2) + val2;
8234 });
8235 Clazz_overrideMethod (c$, "toString", 
8236 function () {
8237 return this.getClass ().getName () + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]";
8238 });
8239 Clazz_defineMethod (c$, "clone", 
8240 function () {
8241 try {
8242 return Clazz_superCall (this, java.awt.Insets, "clone", []);
8243 } catch (e) {
8244 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8245 throw  new InternalError ();
8246 } else {
8247 throw e;
8248 }
8249 }
8250 });
8251 });
8252 Clazz_declarePackage ("java.awt");
8253 Clazz_load (["java.util.Map", "$.HashMap"], "java.awt.RenderingHints", ["java.lang.IllegalArgumentException", "$.InternalError", "java.util.Collections"], function () {
8254 c$ = Clazz_decorateAsClass (function () {
8255 this.hintmap = null;
8256 Clazz_instantialize (this, arguments);
8257 }, java.awt, "RenderingHints", null, [java.util.Map, Cloneable]);
8258 Clazz_prepareFields (c$, function () {
8259 this.hintmap =  new java.util.HashMap (7);
8260 });
8261 Clazz_overrideMethod (c$, "size", 
8262 function () {
8263 return this.hintmap.size ();
8264 });
8265 Clazz_overrideMethod (c$, "isEmpty", 
8266 function () {
8267 return this.hintmap.isEmpty ();
8268 });
8269 Clazz_overrideMethod (c$, "containsKey", 
8270 function (key) {
8271 return this.hintmap.containsKey (key);
8272 }, "~O");
8273 Clazz_overrideMethod (c$, "containsValue", 
8274 function (value) {
8275 return this.hintmap.containsValue (value);
8276 }, "~O");
8277 Clazz_overrideMethod (c$, "get", 
8278 function (key) {
8279 return this.hintmap.get (key);
8280 }, "~O");
8281 Clazz_overrideMethod (c$, "put", 
8282 function (key, value) {
8283 if (!(key).isCompatibleValue (value)) {
8284 throw  new IllegalArgumentException (value + " incompatible with " + key);
8285 }return this.hintmap.put (key, value);
8286 }, "~O,~O");
8287 Clazz_defineMethod (c$, "add", 
8288 function (hints) {
8289 this.hintmap.putAll (hints.hintmap);
8290 }, "java.awt.RenderingHints");
8291 Clazz_overrideMethod (c$, "clear", 
8292 function () {
8293 this.hintmap.clear ();
8294 });
8295 Clazz_overrideMethod (c$, "remove", 
8296 function (key) {
8297 return this.hintmap.remove (key);
8298 }, "~O");
8299 Clazz_overrideMethod (c$, "putAll", 
8300 function (m) {
8301 if (java.awt.RenderingHints.isInstance (m)) {
8302 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.hintmap.put (entry.getKey (), entry.getValue ());
8303
8304 } else {
8305 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.put (entry.getKey (), entry.getValue ());
8306
8307 }}, "java.util.Map");
8308 Clazz_overrideMethod (c$, "keySet", 
8309 function () {
8310 return this.hintmap.keySet ();
8311 });
8312 Clazz_overrideMethod (c$, "values", 
8313 function () {
8314 return this.hintmap.values ();
8315 });
8316 Clazz_overrideMethod (c$, "entrySet", 
8317 function () {
8318 return java.util.Collections.unmodifiableMap (this.hintmap).entrySet ();
8319 });
8320 Clazz_overrideMethod (c$, "equals", 
8321 function (o) {
8322 if (Clazz_instanceOf (o, java.awt.RenderingHints)) {
8323 return this.hintmap.equals ((o).hintmap);
8324 } else if (Clazz_instanceOf (o, java.util.Map)) {
8325 return this.hintmap.equals (o);
8326 }return false;
8327 }, "~O");
8328 Clazz_overrideMethod (c$, "hashCode", 
8329 function () {
8330 return this.hintmap.hashCode ();
8331 });
8332 Clazz_overrideMethod (c$, "clone", 
8333 function () {
8334 var rh;
8335 try {
8336 {
8337 rh = Clazz_clone(this);
8338 if (this.hintmap != null) { rh.hintmap =
8339 this.hintmap.cloneHM(); }
8340 }} catch (e) {
8341 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8342 throw  new InternalError ();
8343 } else {
8344 throw e;
8345 }
8346 }
8347 return rh;
8348 });
8349 Clazz_overrideMethod (c$, "toString", 
8350 function () {
8351 if (this.hintmap == null) {
8352 return this.getClass ().getName () + "@" + Integer.toHexString (this.hashCode ()) + " (0 hints)";
8353 }return this.hintmap.toString ();
8354 });
8355 Clazz_pu$h(self.c$);
8356 c$ = Clazz_decorateAsClass (function () {
8357 this.privatekey = 0;
8358 Clazz_instantialize (this, arguments);
8359 }, java.awt.RenderingHints, "Key");
8360 Clazz_defineMethod (c$, "getIdentity", 
8361  function () {
8362 return this.getClass ().getName () + "@" + Integer.toHexString (System.identityHashCode (this.getClass ())) + ":" + Integer.toHexString (this.privatekey);
8363 });
8364 Clazz_defineMethod (c$, "recordIdentity", 
8365  function (a) {
8366 var b = a.getIdentity ();
8367 var c = java.awt.RenderingHints.Key.identitymap.get (b);
8368 if (c != null) {
8369 var d = c;
8370 if (d != null && d.getClass () === a.getClass ()) {
8371 throw  new IllegalArgumentException (b + " already registered");
8372 }}java.awt.RenderingHints.Key.identitymap.put (b, a);
8373 }, "java.awt.RenderingHints.Key");
8374 Clazz_makeConstructor (c$, 
8375 function (a) {
8376 this.privatekey = a;
8377 this.recordIdentity (this);
8378 }, "~N");
8379 Clazz_defineMethod (c$, "intKey", 
8380 function () {
8381 return this.privatekey;
8382 });
8383 Clazz_overrideMethod (c$, "equals", 
8384 function (a) {
8385 return this === a;
8386 }, "~O");
8387 c$.identitymap = c$.prototype.identitymap =  new java.util.HashMap (17);
8388 c$ = Clazz_p0p ();
8389 Clazz_pu$h(self.c$);
8390 c$ = Clazz_decorateAsClass (function () {
8391 this.description = null;
8392 Clazz_instantialize (this, arguments);
8393 }, java.awt.RenderingHints, "SunKey", java.awt.RenderingHints.Key);
8394 Clazz_makeConstructor (c$, 
8395 function (a, b) {
8396 Clazz_superConstructor (this, java.awt.RenderingHints.SunKey, [a]);
8397 this.description = b;
8398 }, "~N,~S");
8399 Clazz_defineMethod (c$, "getIndex", 
8400 function () {
8401 return this.privatekey;
8402 });
8403 Clazz_overrideMethod (c$, "toString", 
8404 function () {
8405 return this.description;
8406 });
8407 Clazz_overrideMethod (c$, "isCompatibleValue", 
8408 function (a) {
8409 if (Clazz_instanceOf (a, java.awt.RenderingHints.Value)) {
8410 return (a).isCompatibleKey (this);
8411 }return false;
8412 }, "~O");
8413 c$ = Clazz_p0p ();
8414 Clazz_pu$h(self.c$);
8415 c$ = Clazz_decorateAsClass (function () {
8416 this.myKey = null;
8417 this.index = 0;
8418 this.description = null;
8419 Clazz_instantialize (this, arguments);
8420 }, java.awt.RenderingHints, "Value");
8421 c$.register = Clazz_defineMethod (c$, "register", 
8422  function (a, b) {
8423 var c = a.getIndex ();
8424 var d = b.getIndex ();
8425 if (java.awt.RenderingHints.Value.ValueObjects[c][d] != null) {
8426 throw  new InternalError ("duplicate index: " + d);
8427 }java.awt.RenderingHints.Value.ValueObjects[c][d] = b;
8428 }, "java.awt.RenderingHints.SunKey,java.awt.RenderingHints.Value");
8429 c$.get = Clazz_defineMethod (c$, "get", 
8430 function (a, b) {
8431 return java.awt.RenderingHints.Value.ValueObjects[a][b];
8432 }, "~N,~N");
8433 Clazz_makeConstructor (c$, 
8434 function (a, b, c) {
8435 this.myKey = a;
8436 this.index = b;
8437 this.description = c;
8438 java.awt.RenderingHints.Value.register (a, this);
8439 }, "java.awt.RenderingHints.SunKey,~N,~S");
8440 Clazz_defineMethod (c$, "getIndex", 
8441 function () {
8442 return this.index;
8443 });
8444 Clazz_overrideMethod (c$, "toString", 
8445 function () {
8446 return this.description;
8447 });
8448 Clazz_defineMethod (c$, "isCompatibleKey", 
8449 function (a) {
8450 return this.myKey === a;
8451 }, "java.awt.RenderingHints.SunKey");
8452 Clazz_overrideMethod (c$, "hashCode", 
8453 function () {
8454 return this.description.hashCode ();
8455 });
8456 Clazz_overrideMethod (c$, "equals", 
8457 function (a) {
8458 return this === a;
8459 }, "~O");
8460 c$.ValueObjects = c$.prototype.ValueObjects =  Clazz_newArray (9, 8, null);
8461 c$ = Clazz_p0p ();
8462 Clazz_pu$h(self.c$);
8463 c$ = Clazz_declareType (java.awt.RenderingHints, "LCDContrastKey", java.awt.RenderingHints.SunKey);
8464 Clazz_overrideMethod (c$, "isCompatibleValue", 
8465 function (a) {
8466 if (Clazz_instanceOf (a, Integer)) {
8467 var b = (a).intValue ();
8468 return b >= 100 && b <= 250;
8469 }return false;
8470 }, "~O");
8471 c$ = Clazz_p0p ();
8472 Clazz_defineStatics (c$,
8473 "NUM_KEYS", 9,
8474 "VALS_PER_KEY", 8,
8475 "INTKEY_RENDERING", 0,
8476 "INTVAL_RENDER_DEFAULT", 0,
8477 "INTVAL_RENDER_SPEED", 1,
8478 "INTVAL_RENDER_QUALITY", 2,
8479 "INTKEY_ANTIALIASING", 1,
8480 "INTVAL_ANTIALIAS_DEFAULT", 0,
8481 "INTVAL_ANTIALIAS_OFF", 1,
8482 "INTVAL_ANTIALIAS_ON", 2,
8483 "INTKEY_TEXT_ANTIALIASING", 2,
8484 "INTVAL_TEXT_ANTIALIAS_DEFAULT", 0,
8485 "INTVAL_TEXT_ANTIALIAS_OFF", 1,
8486 "INTVAL_TEXT_ANTIALIAS_ON", 2,
8487 "INTVAL_TEXT_ANTIALIAS_GASP", 3,
8488 "INTVAL_TEXT_ANTIALIAS_LCD_HRGB", 4,
8489 "INTVAL_TEXT_ANTIALIAS_LCD_HBGR", 5,
8490 "INTVAL_TEXT_ANTIALIAS_LCD_VRGB", 6,
8491 "INTVAL_TEXT_ANTIALIAS_LCD_VBGR", 7,
8492 "INTKEY_FRACTIONALMETRICS", 3,
8493 "INTVAL_FRACTIONALMETRICS_DEFAULT", 0,
8494 "INTVAL_FRACTIONALMETRICS_OFF", 1,
8495 "INTVAL_FRACTIONALMETRICS_ON", 2,
8496 "INTKEY_DITHERING", 4,
8497 "INTVAL_DITHER_DEFAULT", 0,
8498 "INTVAL_DITHER_DISABLE", 1,
8499 "INTVAL_DITHER_ENABLE", 2,
8500 "INTKEY_INTERPOLATION", 5,
8501 "INTVAL_INTERPOLATION_NEAREST_NEIGHBOR", 0,
8502 "INTVAL_INTERPOLATION_BILINEAR", 1,
8503 "INTVAL_INTERPOLATION_BICUBIC", 2,
8504 "INTKEY_ALPHA_INTERPOLATION", 6,
8505 "INTVAL_ALPHA_INTERPOLATION_DEFAULT", 0,
8506 "INTVAL_ALPHA_INTERPOLATION_SPEED", 1,
8507 "INTVAL_ALPHA_INTERPOLATION_QUALITY", 2,
8508 "INTKEY_COLOR_RENDERING", 7,
8509 "INTVAL_COLOR_RENDER_DEFAULT", 0,
8510 "INTVAL_COLOR_RENDER_SPEED", 1,
8511 "INTVAL_COLOR_RENDER_QUALITY", 2,
8512 "INTKEY_STROKE_CONTROL", 8,
8513 "INTVAL_STROKE_DEFAULT", 0,
8514 "INTVAL_STROKE_NORMALIZE", 1,
8515 "INTVAL_STROKE_PURE", 2,
8516 "INTKEY_AATEXT_LCD_CONTRAST", 100);
8517 c$.KEY_RENDERING = c$.prototype.KEY_RENDERING =  new java.awt.RenderingHints.SunKey (0, "Global rendering quality key");
8518 c$.VALUE_RENDER_SPEED = c$.prototype.VALUE_RENDER_SPEED =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 1, "Fastest rendering methods");
8519 c$.VALUE_RENDER_QUALITY = c$.prototype.VALUE_RENDER_QUALITY =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 2, "Highest quality rendering methods");
8520 c$.VALUE_RENDER_DEFAULT = c$.prototype.VALUE_RENDER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 0, "Default rendering methods");
8521 c$.KEY_ANTIALIASING = c$.prototype.KEY_ANTIALIASING =  new java.awt.RenderingHints.SunKey (1, "Global antialiasing enable key");
8522 c$.VALUE_ANTIALIAS_ON = c$.prototype.VALUE_ANTIALIAS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 2, "Antialiased rendering mode");
8523 c$.VALUE_ANTIALIAS_OFF = c$.prototype.VALUE_ANTIALIAS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 1, "Nonantialiased rendering mode");
8524 c$.VALUE_ANTIALIAS_DEFAULT = c$.prototype.VALUE_ANTIALIAS_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 0, "Default antialiasing rendering mode");
8525 c$.KEY_FRACTIONALMETRICS = c$.prototype.KEY_FRACTIONALMETRICS =  new java.awt.RenderingHints.SunKey (3, "Fractional metrics enable key");
8526 c$.VALUE_FRACTIONALMETRICS_ON = c$.prototype.VALUE_FRACTIONALMETRICS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 2, "Fractional text metrics mode");
8527 c$.VALUE_FRACTIONALMETRICS_OFF = c$.prototype.VALUE_FRACTIONALMETRICS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 1, "Integer text metrics mode");
8528 c$.VALUE_FRACTIONALMETRICS_DEFAULT = c$.prototype.VALUE_FRACTIONALMETRICS_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 0, "Default fractional text metrics mode");
8529 c$.KEY_DITHERING = c$.prototype.KEY_DITHERING =  new java.awt.RenderingHints.SunKey (4, "Dithering quality key");
8530 c$.VALUE_DITHER_ENABLE = c$.prototype.VALUE_DITHER_ENABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 2, "Dithered rendering mode");
8531 c$.VALUE_DITHER_DISABLE = c$.prototype.VALUE_DITHER_DISABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 1, "Nondithered rendering mode");
8532 c$.VALUE_DITHER_DEFAULT = c$.prototype.VALUE_DITHER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 0, "Default dithering mode");
8533 c$.KEY_INTERPOLATION = c$.prototype.KEY_INTERPOLATION =  new java.awt.RenderingHints.SunKey (5, "Image interpolation method key");
8534 c$.VALUE_INTERPOLATION_NEAREST_NEIGHBOR = c$.prototype.VALUE_INTERPOLATION_NEAREST_NEIGHBOR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 0, "Nearest Neighbor image interpolation mode");
8535 c$.VALUE_INTERPOLATION_BILINEAR = c$.prototype.VALUE_INTERPOLATION_BILINEAR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 1, "Bilinear image interpolation mode");
8536 c$.VALUE_INTERPOLATION_BICUBIC = c$.prototype.VALUE_INTERPOLATION_BICUBIC =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 2, "Bicubic image interpolation mode");
8537 c$.KEY_ALPHA_INTERPOLATION = c$.prototype.KEY_ALPHA_INTERPOLATION =  new java.awt.RenderingHints.SunKey (6, "Alpha blending interpolation method key");
8538 c$.VALUE_ALPHA_INTERPOLATION_SPEED = c$.prototype.VALUE_ALPHA_INTERPOLATION_SPEED =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 1, "Fastest alpha blending methods");
8539 c$.VALUE_ALPHA_INTERPOLATION_QUALITY = c$.prototype.VALUE_ALPHA_INTERPOLATION_QUALITY =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 2, "Highest quality alpha blending methods");
8540 c$.VALUE_ALPHA_INTERPOLATION_DEFAULT = c$.prototype.VALUE_ALPHA_INTERPOLATION_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 0, "Default alpha blending methods");
8541 c$.KEY_COLOR_RENDERING = c$.prototype.KEY_COLOR_RENDERING =  new java.awt.RenderingHints.SunKey (7, "Color rendering quality key");
8542 c$.VALUE_COLOR_RENDER_SPEED = c$.prototype.VALUE_COLOR_RENDER_SPEED =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 1, "Fastest color rendering mode");
8543 c$.VALUE_COLOR_RENDER_QUALITY = c$.prototype.VALUE_COLOR_RENDER_QUALITY =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 2, "Highest quality color rendering mode");
8544 c$.VALUE_COLOR_RENDER_DEFAULT = c$.prototype.VALUE_COLOR_RENDER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 0, "Default color rendering mode");
8545 c$.KEY_STROKE_CONTROL = c$.prototype.KEY_STROKE_CONTROL =  new java.awt.RenderingHints.SunKey (8, "Stroke normalization control key");
8546 c$.VALUE_STROKE_DEFAULT = c$.prototype.VALUE_STROKE_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 0, "Default stroke normalization");
8547 c$.VALUE_STROKE_NORMALIZE = c$.prototype.VALUE_STROKE_NORMALIZE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 1, "Normalize strokes for consistent rendering");
8548 c$.VALUE_STROKE_PURE = c$.prototype.VALUE_STROKE_PURE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 2, "Pure stroke conversion for accurate paths");
8549 c$.KEY_TEXT_ANTIALIASING = c$.prototype.KEY_TEXT_ANTIALIASING =  new java.awt.RenderingHints.SunKey (2, "Text-specific antialiasing enable key");
8550 c$.VALUE_TEXT_ANTIALIAS_ON = c$.prototype.VALUE_TEXT_ANTIALIAS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 2, "Antialiased text mode");
8551 c$.VALUE_TEXT_ANTIALIAS_OFF = c$.prototype.VALUE_TEXT_ANTIALIAS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 1, "Nonantialiased text mode");
8552 c$.VALUE_TEXT_ANTIALIAS_DEFAULT = c$.prototype.VALUE_TEXT_ANTIALIAS_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 0, "Default antialiasing text mode");
8553 c$.VALUE_TEXT_ANTIALIAS_GASP = c$.prototype.VALUE_TEXT_ANTIALIAS_GASP =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 3, "gasp antialiasing text mode");
8554 c$.VALUE_TEXT_ANTIALIAS_LCD_HRGB = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HRGB =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 4, "LCD HRGB antialiasing text mode");
8555 c$.VALUE_TEXT_ANTIALIAS_LCD_HBGR = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HBGR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 5, "LCD HBGR antialiasing text mode");
8556 c$.VALUE_TEXT_ANTIALIAS_LCD_VRGB = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VRGB =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 6, "LCD VRGB antialiasing text mode");
8557 c$.VALUE_TEXT_ANTIALIAS_LCD_VBGR = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VBGR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 7, "LCD VBGR antialiasing text mode");
8558 c$.KEY_TEXT_ANTIALIAS_LCD_CONTRAST = c$.prototype.KEY_TEXT_ANTIALIAS_LCD_CONTRAST =  new java.awt.RenderingHints.LCDContrastKey (100, "Text-specific LCD contrast key");
8559 c$.KEY_TEXT_LCD_CONTRAST = c$.prototype.KEY_TEXT_LCD_CONTRAST = java.awt.RenderingHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST;
8560 });
8561 //BH note: a declared static superclass must come before a static class referencing it
8562
8563 Clazz_load(["java.util.AbstractList","$.AbstractMap","$.AbstractSet","$.Collection","$.Iterator","$.List","$.ListIterator","$.Map","$.RandomAccess","$.Set","$.SortedMap","$.SortedSet","java.lang.NullPointerException","$.UnsupportedOperationException","java.lang.reflect.Array"],"java.util.Collections",["java.lang.ArrayIndexOutOfBoundsException","$.ClassCastException","$.IllegalArgumentException","$.IndexOutOfBoundsException","java.util.ArrayList","$.Arrays","$.Enumeration","java.util.Map.Entry","java.util.NoSuchElementException","$.Random"],function(){
8564 c$=Clazz_declareType(java.util,"Collections");
8565 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8566 function(list,object){
8567 if(list==null){
8568 throw new NullPointerException();
8569 }if(list.isEmpty()){
8570 return-1;
8571 }var key=object;
8572 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8573 var it=list.listIterator();
8574 while(it.hasNext()){
8575 var result;
8576 if((result=key.compareTo(it.next()))<=0){
8577 if(result==0){
8578 return it.previousIndex();
8579 }return-it.previousIndex()-1;
8580 }}
8581 return-list.size()-1;
8582 }var low=0;
8583 var mid=list.size();
8584 var high=mid-1;
8585 var result=-1;
8586 while(low<=high){
8587 mid=(low+high)>>1;
8588 if((result=key.compareTo(list.get(mid)))>0){
8589 low=mid+1;
8590 }else if(result==0){
8591 return mid;
8592 }else{
8593 high=mid-1;
8594 }}
8595 return-mid-(result<0?1:2);
8596 },"java.util.List,~O");
8597 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8598 function(list,object,comparator){
8599 if(comparator==null){
8600 return java.util.Collections.binarySearch(list,object);
8601 }if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8602 var it=list.listIterator();
8603 while(it.hasNext()){
8604 var result;
8605 if((result=comparator.compare(object,it.next()))<=0){
8606 if(result==0){
8607 return it.previousIndex();
8608 }return-it.previousIndex()-1;
8609 }}
8610 return-list.size()-1;
8611 }var low=0;
8612 var mid=list.size();
8613 var high=mid-1;
8614 var result=-1;
8615 while(low<=high){
8616 mid=(low+high)>>1;
8617 if((result=comparator.compare(object,list.get(mid)))>0){
8618 low=mid+1;
8619 }else if(result==0){
8620 return mid;
8621 }else{
8622 high=mid-1;
8623 }}
8624 return-mid-(result<0?1:2);
8625 },"java.util.List,~O,java.util.Comparator");
8626 c$.copy=Clazz_defineMethod(c$,"copy",
8627 function(destination,source){
8628 if(destination.size()<source.size()){
8629 throw new ArrayIndexOutOfBoundsException();
8630 }var srcIt=source.iterator();
8631 var destIt=destination.listIterator();
8632 while(srcIt.hasNext()){
8633 try{
8634 destIt.next();
8635 }catch(e){
8636 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
8637 throw new ArrayIndexOutOfBoundsException();
8638 }else{
8639 throw e;
8640 }
8641 }
8642 destIt.set(srcIt.next());
8643 }
8644 },"java.util.List,java.util.List");
8645 c$.enumeration=Clazz_defineMethod(c$,"enumeration",
8646 function(collection){
8647 var c=collection;
8648
8649 if (!Clazz_isClassDefined("java.util.Collections$1"))
8650         java.util.Collections.$Collections$1$(c);
8651
8652 var x = Clazz_innerTypeInstance(java.util.Collections$1,this,null);
8653
8654 return x;
8655 },"java.util.Collection");
8656
8657 c$.fill=Clazz_defineMethod(c$,"fill",
8658 function(list,object){
8659 var it=list.listIterator();
8660 while(it.hasNext()){
8661 it.next();
8662 it.set(object);
8663 }
8664 },"java.util.List,~O");
8665 c$.max=Clazz_defineMethod(c$,"max",
8666 function(collection){
8667 var it=collection.iterator();
8668 var max=it.next();
8669 while(it.hasNext()){
8670 var next=it.next();
8671 if(max.compareTo(next)<0){
8672 max=next;
8673 }}
8674 return max;
8675 },"java.util.Collection");
8676 c$.max=Clazz_defineMethod(c$,"max",
8677 function(collection,comparator){
8678 var it=collection.iterator();
8679 var max=it.next();
8680 while(it.hasNext()){
8681 var next=it.next();
8682 if(comparator.compare(max,next)<0){
8683 max=next;
8684 }}
8685 return max;
8686 },"java.util.Collection,java.util.Comparator");
8687 c$.min=Clazz_defineMethod(c$,"min",
8688 function(collection){
8689 var it=collection.iterator();
8690 var min=it.next();
8691 while(it.hasNext()){
8692 var next=it.next();
8693 if(min.compareTo(next)>0){
8694 min=next;
8695 }}
8696 return min;
8697 },"java.util.Collection");
8698 c$.min=Clazz_defineMethod(c$,"min",
8699 function(collection,comparator){
8700 var it=collection.iterator();
8701 var min=it.next();
8702 while(it.hasNext()){
8703 var next=it.next();
8704 if(comparator.compare(min,next)>0){
8705 min=next;
8706 }}
8707 return min;
8708 },"java.util.Collection,java.util.Comparator");
8709 c$.nCopies=Clazz_defineMethod(c$,"nCopies",
8710 function(length,object){
8711 return new java.util.Collections.CopiesList(length,object);
8712 },"~N,~O");
8713 c$.reverse=Clazz_defineMethod(c$,"reverse",
8714 function(list){
8715 var size=list.size();
8716 var front=list.listIterator();
8717 var back=list.listIterator(size);
8718 for(var i=0;i<Math.floor(size/2);i++){
8719 var frontNext=front.next();
8720 var backPrev=back.previous();
8721 front.set(backPrev);
8722 back.set(frontNext);
8723 }
8724 },"java.util.List");
8725 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8726 function(){
8727 return new java.util.Collections.ReverseComparator();
8728 });
8729 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8730 function(c){
8731 if(c==null){
8732 return java.util.Collections.reverseOrder();
8733 }return new java.util.Collections.ReverseComparatorWithComparator(c);
8734 },"java.util.Comparator");
8735 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8736 function(list){
8737 java.util.Collections.shuffle(list,new java.util.Random());
8738 },"java.util.List");
8739 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8740 function(list,random){
8741 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8742 var array=list.toArray();
8743 for(var i=array.length-1;i>0;i--){
8744 var index=random.nextInt()%(i+1);
8745 if(index<0){
8746 index=-index;
8747 }var temp=array[i];
8748 array[i]=array[index];
8749 array[index]=temp;
8750 }
8751 var i=0;
8752 var it=list.listIterator();
8753 while(it.hasNext()){
8754 it.next();
8755 it.set(array[i++]);
8756 }
8757 }else{
8758 var rawList=list;
8759 for(var i=rawList.size()-1;i>0;i--){
8760 var index=random.nextInt()%(i+1);
8761 if(index<0){
8762 index=-index;
8763 }rawList.set(index,rawList.set(i,rawList.get(index)));
8764 }
8765 }},"java.util.List,java.util.Random");
8766 c$.singleton=Clazz_defineMethod(c$,"singleton",
8767 function(object){
8768 return new java.util.Collections.SingletonSet(object);
8769 },"~O");
8770 c$.singletonList=Clazz_defineMethod(c$,"singletonList",
8771 function(object){
8772 return new java.util.Collections.SingletonList(object);
8773 },"~O");
8774 c$.singletonMap=Clazz_defineMethod(c$,"singletonMap",
8775 function(key,value){
8776 return new java.util.Collections.SingletonMap(key,value);
8777 },"~O,~O");
8778 c$.sort=Clazz_defineMethod(c$,"sort",
8779 function(list){
8780 var array=list.toArray();
8781 java.util.Arrays.sort(array);
8782 var i=0;
8783 var it=list.listIterator();
8784 while(it.hasNext()){
8785 it.next();
8786 it.set(array[i++]);
8787 }
8788 },"java.util.List");
8789 c$.sort=Clazz_defineMethod(c$,"sort",
8790 function(list,comparator){
8791 var array=list.toArray(new Array(list.size()));
8792 java.util.Arrays.sort(array,comparator);
8793 var i=0;
8794 var it=list.listIterator();
8795 while(it.hasNext()){
8796 it.next();
8797 it.set(array[i++]);
8798 }
8799 },"java.util.List,java.util.Comparator");
8800 c$.swap=Clazz_defineMethod(c$,"swap",
8801 function(list,index1,index2){
8802 if(list==null){
8803 throw new NullPointerException();
8804 }if(index1==index2){
8805 return;
8806 }var rawList=list;
8807 rawList.set(index2,rawList.set(index1,rawList.get(index2)));
8808 },"java.util.List,~N,~N");
8809 c$.replaceAll=Clazz_defineMethod(c$,"replaceAll",
8810 function(list,obj,obj2){
8811 var index;
8812 var found=false;
8813 while((index=list.indexOf(obj))>-1){
8814 found=true;
8815 list.set(index,obj2);
8816 }
8817 return found;
8818 },"java.util.List,~O,~O");
8819 c$.rotate=Clazz_defineMethod(c$,"rotate",
8820 function(lst,dist){
8821 var list=lst;
8822 var size=list.size();
8823 if(size==0){
8824 return;
8825 }var normdist;
8826 if(dist>0){
8827 normdist=dist%size;
8828 }else{
8829 normdist=size-((dist%size)*(-1));
8830 }if(normdist==0||normdist==size){
8831 return;
8832 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8833 var temp=list.get(0);
8834 var index=0;
8835 var beginIndex=0;
8836 for(var i=0;i<size;i++){
8837 index=(index+normdist)%size;
8838 temp=list.set(index,temp);
8839 if(index==beginIndex){
8840 index=++beginIndex;
8841 temp=list.get(beginIndex);
8842 }}
8843 }else{
8844 var divideIndex=(size-normdist)%size;
8845 var sublist1=list.subList(0,divideIndex);
8846 var sublist2=list.subList(divideIndex,size);
8847 java.util.Collections.reverse(sublist1);
8848 java.util.Collections.reverse(sublist2);
8849 java.util.Collections.reverse(list);
8850 }},"java.util.List,~N");
8851 c$.indexOfSubList=Clazz_defineMethod(c$,"indexOfSubList",
8852 function(list,sublist){
8853 var size=list.size();
8854 var sublistSize=sublist.size();
8855 if(sublistSize>size){
8856 return-1;
8857 }if(sublistSize==0){
8858 return 0;
8859 }var firstObj=sublist.get(0);
8860 var index=list.indexOf(firstObj);
8861 if(index==-1){
8862 return-1;
8863 }while(index<size&&(size-index>=sublistSize)){
8864 var listIt=list.listIterator(index);
8865 if((firstObj==null)?listIt.next()==null:firstObj.equals(listIt.next())){
8866 var sublistIt=sublist.listIterator(1);
8867 var difFound=false;
8868 while(sublistIt.hasNext()){
8869 var element=sublistIt.next();
8870 if(!listIt.hasNext()){
8871 return-1;
8872 }if((element==null)?listIt.next()!=null:!element.equals(listIt.next())){
8873 difFound=true;
8874 break;
8875 }}
8876 if(!difFound){
8877 return index;
8878 }}index++;
8879 }
8880 return-1;
8881 },"java.util.List,java.util.List");
8882 c$.lastIndexOfSubList=Clazz_defineMethod(c$,"lastIndexOfSubList",
8883 function(list,sublist){
8884 var sublistSize=sublist.size();
8885 var size=list.size();
8886 if(sublistSize>size){
8887 return-1;
8888 }if(sublistSize==0){
8889 return size;
8890 }var lastObj=sublist.get(sublistSize-1);
8891 var index=list.lastIndexOf(lastObj);
8892 while((index>-1)&&(index+1>=sublistSize)){
8893 var listIt=list.listIterator(index+1);
8894 if((lastObj==null)?listIt.previous()==null:lastObj.equals(listIt.previous())){
8895 var sublistIt=sublist.listIterator(sublistSize-1);
8896 var difFound=false;
8897 while(sublistIt.hasPrevious()){
8898 var element=sublistIt.previous();
8899 if(!listIt.hasPrevious()){
8900 return-1;
8901 }if((element==null)?listIt.previous()!=null:!element.equals(listIt.previous())){
8902 difFound=true;
8903 break;
8904 }}
8905 if(!difFound){
8906 return listIt.nextIndex();
8907 }}index--;
8908 }
8909 return-1;
8910 },"java.util.List,java.util.List");
8911 c$.list=Clazz_defineMethod(c$,"list",
8912 function(enumeration){
8913 var list=new java.util.ArrayList();
8914 while(enumeration.hasMoreElements()){
8915 list.add(enumeration.nextElement());
8916 }
8917 return list;
8918 },"java.util.Enumeration");
8919 c$.synchronizedCollection=Clazz_defineMethod(c$,"synchronizedCollection",
8920 function(collection){
8921 if(collection==null){
8922 throw new NullPointerException();
8923 }return new java.util.Collections.SynchronizedCollection(collection);
8924 },"java.util.Collection");
8925 c$.synchronizedList=Clazz_defineMethod(c$,"synchronizedList",
8926 function(list){
8927 if(list==null){
8928 throw new NullPointerException();
8929 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8930 return new java.util.Collections.SynchronizedRandomAccessList(list);
8931 }return new java.util.Collections.SynchronizedList(list);
8932 },"java.util.List");
8933 c$.synchronizedMap=Clazz_defineMethod(c$,"synchronizedMap",
8934 function(map){
8935 if(map==null){
8936 throw new NullPointerException();
8937 }return new java.util.Collections.SynchronizedMap(map);
8938 },"java.util.Map");
8939 c$.synchronizedSet=Clazz_defineMethod(c$,"synchronizedSet",
8940 function(set){
8941 if(set==null){
8942 throw new NullPointerException();
8943 }return new java.util.Collections.SynchronizedSet(set);
8944 },"java.util.Set");
8945 c$.synchronizedSortedMap=Clazz_defineMethod(c$,"synchronizedSortedMap",
8946 function(map){
8947 if(map==null){
8948 throw new NullPointerException();
8949 }return new java.util.Collections.SynchronizedSortedMap(map);
8950 },"java.util.SortedMap");
8951 c$.synchronizedSortedSet=Clazz_defineMethod(c$,"synchronizedSortedSet",
8952 function(set){
8953 if(set==null){
8954 throw new NullPointerException();
8955 }return new java.util.Collections.SynchronizedSortedSet(set);
8956 },"java.util.SortedSet");
8957 c$.unmodifiableCollection=Clazz_defineMethod(c$,"unmodifiableCollection",
8958 function(collection){
8959 if(collection==null){
8960 throw new NullPointerException();
8961 }return new java.util.Collections.UnmodifiableCollection(collection);
8962 },"java.util.Collection");
8963 c$.unmodifiableList=Clazz_defineMethod(c$,"unmodifiableList",
8964 function(list){
8965 if(list==null){
8966 throw new NullPointerException();
8967 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8968 return new java.util.Collections.UnmodifiableRandomAccessList(list);
8969 }return new java.util.Collections.UnmodifiableList(list);
8970 },"java.util.List");
8971 c$.unmodifiableMap=Clazz_defineMethod(c$,"unmodifiableMap",
8972 function(map){
8973 if(map==null){
8974 throw new NullPointerException();
8975 }return new java.util.Collections.UnmodifiableMap(map);
8976 },"java.util.Map");
8977 c$.unmodifiableSet=Clazz_defineMethod(c$,"unmodifiableSet",
8978 function(set){
8979 if(set==null){
8980 throw new NullPointerException();
8981 }return new java.util.Collections.UnmodifiableSet(set);
8982 },"java.util.Set");
8983 c$.unmodifiableSortedMap=Clazz_defineMethod(c$,"unmodifiableSortedMap",
8984 function(map){
8985 if(map==null){
8986 throw new NullPointerException();
8987 }return new java.util.Collections.UnmodifiableSortedMap(map);
8988 },"java.util.SortedMap");
8989 c$.unmodifiableSortedSet=Clazz_defineMethod(c$,"unmodifiableSortedSet",
8990 function(set){
8991 if(set==null){
8992 throw new NullPointerException();
8993 }return new java.util.Collections.UnmodifiableSortedSet(set);
8994 },"java.util.SortedSet");
8995 c$.frequency=Clazz_defineMethod(c$,"frequency",
8996 function(c,o){
8997 if(c==null){
8998 throw new NullPointerException();
8999 }if(c.isEmpty()){
9000 return 0;
9001 }
9002 var result=0;
9003 var itr=c.iterator();
9004 while(itr.hasNext()){
9005 var e=itr.next();
9006 if(o==null?e==null:o.equals(e)){
9007 result++;
9008 }}
9009 return result;
9010 },"java.util.Collection,~O");
9011
9012 c$.emptyList=Clazz_defineMethod(c$,"emptyList",
9013 function(){
9014 return java.util.Collections.EMPTY_LIST;
9015 });
9016 c$.emptySet=Clazz_defineMethod(c$,"emptySet",
9017 function(){
9018 return java.util.Collections.EMPTY_SET;
9019 });
9020 c$.emptyMap=Clazz_defineMethod(c$,"emptyMap",
9021 function(){
9022 return java.util.Collections.EMPTY_MAP;
9023 });
9024 c$.checkedCollection=Clazz_defineMethod(c$,"checkedCollection",
9025 function(c,type){
9026 return new java.util.Collections.CheckedCollection(c,type);
9027 },"java.util.Collection,Class");
9028 c$.checkedMap=Clazz_defineMethod(c$,"checkedMap",
9029 function(m,keyType,valueType){
9030 return new java.util.Collections.CheckedMap(m,keyType,valueType);
9031 },"java.util.Map,Class,Class");
9032 c$.checkedList=Clazz_defineMethod(c$,"checkedList",
9033 function(list,type){
9034 if(Clazz_instanceOf(list,java.util.RandomAccess)){
9035 return new java.util.Collections.CheckedRandomAccessList(list,type);
9036 }return new java.util.Collections.CheckedList(list,type);
9037 },"java.util.List,Class");
9038 c$.checkedSet=Clazz_defineMethod(c$,"checkedSet",
9039 function(s,type){
9040 return new java.util.Collections.CheckedSet(s,type);
9041 },"java.util.Set,Class");
9042 c$.checkedSortedMap=Clazz_defineMethod(c$,"checkedSortedMap",
9043 function(m,keyType,valueType){
9044 return new java.util.Collections.CheckedSortedMap(m,keyType,valueType);
9045 },"java.util.SortedMap,Class,Class");
9046 c$.checkedSortedSet=Clazz_defineMethod(c$,"checkedSortedSet",
9047 function(s,type){
9048 return new java.util.Collections.CheckedSortedSet(s,type);
9049 },"java.util.SortedSet,Class");
9050 c$.addAll=Clazz_defineMethod(c$,"addAll",
9051 function(c,a){
9052 var modified=false;
9053 for(var i=0;i<a.length;i++){
9054 modified=new Boolean(modified|c.add(a[i])).valueOf();
9055 }
9056 return modified;
9057 },"java.util.Collection,~A");
9058 c$.disjoint=Clazz_defineMethod(c$,"disjoint",
9059 function(c1,c2){
9060 if((Clazz_instanceOf(c1,java.util.Set))&&!(Clazz_instanceOf(c2,java.util.Set))||(c2.size())>c1.size()){
9061 var tmp=c1;
9062 c1=c2;
9063 c2=tmp;
9064 }var it=c1.iterator();
9065 while(it.hasNext()){
9066 if(c2.contains(it.next())){
9067 return false;
9068 }}
9069 return true;
9070 },"java.util.Collection,java.util.Collection");
9071 c$.checkType=Clazz_defineMethod(c$,"checkType",
9072 function(obj,type){
9073 if(!type.isInstance(obj)){
9074 throw new ClassCastException("Attempt to insert "+obj.getClass()+" element into collection with element type "+type);
9075 }return obj;
9076 },"~O,Class");
9077
9078 c$.$Collections$1$=function(c){
9079 Clazz_pu$h(self.c$);
9080 c$=Clazz_decorateAsClass(function(){
9081 Clazz_prepareCallback(this,arguments);
9082 this.it=null;
9083 Clazz_instantialize(this,arguments);
9084 },java.util,"Collections$1",null,java.util.Enumeration);
9085
9086 Clazz_prepareFields(c$,function(){
9087 this.it=c.iterator();
9088 });
9089
9090 Clazz_defineMethod(c$,"hasMoreElements",
9091 function(){
9092 return this.it.hasNext();
9093 });
9094 Clazz_defineMethod(c$,"nextElement",
9095 function(){
9096 return this.it.next();
9097 });
9098 c$=Clazz_p0p();
9099 };
9100
9101 Clazz_pu$h(self.c$);
9102 c$=Clazz_decorateAsClass(function(){
9103 this.n=0;
9104 this.element=null;
9105 Clazz_instantialize(this,arguments);
9106 },java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);
9107 Clazz_makeConstructor(c$,
9108 function(a,b){
9109 Clazz_superConstructor(this,java.util.Collections.CopiesList,[]);
9110 if(a<0){
9111 throw new IllegalArgumentException();
9112 }this.n=a;
9113 this.element=b;
9114 },"~N,~O");
9115 Clazz_overrideMethod(c$,"contains",
9116 function(a){
9117 return this.element==null?a==null:this.element.equals(a);
9118 },"~O");
9119 Clazz_overrideMethod(c$,"size",
9120 function(){
9121 return this.n;
9122 });
9123 Clazz_overrideMethod(c$,"get",
9124 function(a){
9125 if(0<=a&&a<this.n){
9126 return this.element;
9127 }throw new IndexOutOfBoundsException();
9128 },"~N");
9129 c$=Clazz_p0p();
9130 Clazz_pu$h(self.c$);
9131 c$=Clazz_declareType(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);
9132 Clazz_overrideMethod(c$,"contains",
9133 function(a){
9134 return false;
9135 },"~O");
9136 Clazz_overrideMethod(c$,"size",
9137 function(){
9138 return 0;
9139 });
9140 Clazz_overrideMethod(c$,"get",
9141 function(a){
9142 throw new IndexOutOfBoundsException();
9143 },"~N");
9144 c$=Clazz_p0p();
9145 Clazz_pu$h(self.c$);
9146 c$=Clazz_declareType(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);
9147 Clazz_overrideMethod(c$,"contains",
9148 function(a){
9149 return false;
9150 },"~O");
9151 Clazz_overrideMethod(c$,"size",
9152 function(){
9153 return 0;
9154 });
9155 Clazz_overrideMethod(c$,"iterator",
9156 function(){
9157 return((Clazz_isClassDefined("java.util.Collections$EmptySet$1")?0:java.util.Collections.EmptySet.$Collections$EmptySet$1$()),Clazz_innerTypeInstance(java.util.Collections$EmptySet$1,this,null));
9158 });
9159 c$.$Collections$EmptySet$1$=function(){
9160 Clazz_pu$h(self.c$);
9161 c$=Clazz_declareAnonymous(java.util,"Collections$EmptySet$1",null,java.util.Iterator);
9162 Clazz_overrideMethod(c$,"hasNext",
9163 function(){
9164 return false;
9165 });
9166 Clazz_overrideMethod(c$,"next",
9167 function(){
9168 throw new java.util.NoSuchElementException();
9169 });
9170 Clazz_overrideMethod(c$,"remove",
9171 function(){
9172 throw new UnsupportedOperationException();
9173 });
9174 c$=Clazz_p0p();
9175 };
9176 c$=Clazz_p0p();
9177 Clazz_pu$h(self.c$);
9178 c$=Clazz_declareType(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);
9179 Clazz_overrideMethod(c$,"containsKey",
9180 function(a){
9181 return false;
9182 },"~O");
9183 Clazz_overrideMethod(c$,"containsValue",
9184 function(a){
9185 return false;
9186 },"~O");
9187 Clazz_overrideMethod(c$,"entrySet",
9188 function(){
9189 return java.util.Collections.EMPTY_SET;
9190 });
9191 Clazz_overrideMethod(c$,"get",
9192 function(a){
9193 return null;
9194 },"~O");
9195 Clazz_overrideMethod(c$,"keySet",
9196 function(){
9197 return java.util.Collections.EMPTY_SET;
9198 });
9199 Clazz_overrideMethod(c$,"values",
9200 function(){
9201 return java.util.Collections.EMPTY_LIST;
9202 });
9203 c$=Clazz_p0p();
9204 Clazz_pu$h(self.c$);
9205 c$=Clazz_declareType(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);
9206 Clazz_overrideMethod(c$,"compare",
9207 function(a,b){
9208 var c=b;
9209 return c.compareTo(a);
9210 },"~O,~O");
9211 c$=Clazz_p0p();
9212 Clazz_pu$h(self.c$);
9213 c$=Clazz_decorateAsClass(function(){
9214 this.comparator=null;
9215 Clazz_instantialize(this,arguments);
9216 },java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);
9217 Clazz_makeConstructor(c$,
9218 function(a){
9219 this.comparator=a;
9220 },"java.util.Comparator");
9221 Clazz_defineMethod(c$,"compare",
9222 function(a,b){
9223 return this.comparator.compare(b,a);
9224 },"~O,~O");
9225 c$=Clazz_p0p();
9226 Clazz_pu$h(self.c$);
9227 c$=Clazz_decorateAsClass(function(){
9228 this.element=null;
9229 Clazz_instantialize(this,arguments);
9230 },java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);
9231 Clazz_makeConstructor(c$,
9232 function(a){
9233 Clazz_superConstructor(this,java.util.Collections.SingletonSet,[]);
9234 this.element=a;
9235 },"~O");
9236 Clazz_overrideMethod(c$,"contains",
9237 function(a){
9238 return this.element==null?a==null:this.element.equals(a);
9239 },"~O");
9240 Clazz_overrideMethod(c$,"size",
9241 function(){
9242 return 1;
9243 });
9244 Clazz_overrideMethod(c$,"iterator",
9245 function(){
9246 return((Clazz_isClassDefined("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$()),Clazz_innerTypeInstance(java.util.Collections$SingletonSet$1,this,null));
9247 });
9248 c$.$Collections$SingletonSet$1$=function(){
9249 Clazz_pu$h(self.c$);
9250 c$=Clazz_decorateAsClass(function(){
9251 Clazz_prepareCallback(this,arguments);
9252 this.$hasNext=true;
9253 Clazz_instantialize(this,arguments);
9254 },java.util,"Collections$SingletonSet$1",null,java.util.Iterator);
9255 Clazz_overrideMethod(c$,"hasNext",
9256 function(){
9257 return this.$hasNext;
9258 });
9259 Clazz_overrideMethod(c$,"next",
9260 function(){
9261 if(this.$hasNext){
9262 this.$hasNext=false;
9263 return this.b$["java.util.Collections.SingletonSet"].element;
9264 }throw new java.util.NoSuchElementException();
9265 });
9266 Clazz_overrideMethod(c$,"remove",
9267 function(){
9268 throw new UnsupportedOperationException();
9269 });
9270 c$=Clazz_p0p();
9271 };
9272 c$=Clazz_p0p();
9273 Clazz_pu$h(self.c$);
9274 c$=Clazz_decorateAsClass(function(){
9275 this.element=null;
9276 Clazz_instantialize(this,arguments);
9277 },java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);
9278 Clazz_makeConstructor(c$,
9279 function(a){
9280 Clazz_superConstructor(this,java.util.Collections.SingletonList,[]);
9281 this.element=a;
9282 },"~O");
9283 Clazz_overrideMethod(c$,"contains",
9284 function(a){
9285 return this.element==null?a==null:this.element.equals(a);
9286 },"~O");
9287 Clazz_overrideMethod(c$,"get",
9288 function(a){
9289 if(a==0){
9290 return this.element;
9291 }throw new IndexOutOfBoundsException();
9292 },"~N");
9293 Clazz_overrideMethod(c$,"size",
9294 function(){
9295 return 1;
9296 });
9297 c$=Clazz_p0p();
9298 Clazz_pu$h(self.c$);
9299 c$=Clazz_decorateAsClass(function(){
9300 this.k=null;
9301 this.v=null;
9302 Clazz_instantialize(this,arguments);
9303 },java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);
9304 Clazz_makeConstructor(c$,
9305 function(a,b){
9306 Clazz_superConstructor(this,java.util.Collections.SingletonMap,[]);
9307 this.k=a;
9308 this.v=b;
9309 },"~O,~O");
9310 Clazz_overrideMethod(c$,"containsKey",
9311 function(a){
9312 return this.k==null?a==null:this.k.equals(a);
9313 },"~O");
9314 Clazz_overrideMethod(c$,"containsValue",
9315 function(a){
9316 return this.v==null?a==null:this.v.equals(a);
9317 },"~O");
9318 Clazz_overrideMethod(c$,"get",
9319 function(a){
9320 if(this.containsKey(a)){
9321 return this.v;
9322 }return null;
9323 },"~O");
9324 Clazz_overrideMethod(c$,"size",
9325 function(){
9326 return 1;
9327 });
9328 Clazz_overrideMethod(c$,"entrySet",
9329 function(){
9330 return((Clazz_isClassDefined("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$()),Clazz_innerTypeInstance(java.util.Collections$SingletonMap$1,this,null));
9331 });
9332 c$.$Collections$SingletonMap$1$=function(){
9333 Clazz_pu$h(self.c$);
9334 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);
9335 Clazz_overrideMethod(c$,"contains",
9336 function(a){
9337 if(Clazz_instanceOf(a,java.util.Map.Entry)){
9338 var b=a;
9339 return this.b$["java.util.Collections.SingletonMap"].containsKey(b.getKey())&&this.b$["java.util.Collections.SingletonMap"].containsValue(b.getValue());
9340 }return false;
9341 },"~O");
9342 Clazz_overrideMethod(c$,"size",
9343 function(){
9344 return 1;
9345 });
9346 Clazz_overrideMethod(c$,"iterator",
9347 function(){
9348 return((Clazz_isClassDefined("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$()),Clazz_innerTypeInstance(java.util.Collections$SingletonMap$1$1,this,null));
9349 });
9350 c$=Clazz_p0p();
9351 };
9352 c$.$Collections$SingletonMap$1$1$=function(){
9353 Clazz_pu$h(self.c$);
9354 c$=Clazz_decorateAsClass(function(){
9355 Clazz_prepareCallback(this,arguments);
9356 this.$hasNext=true;
9357 Clazz_instantialize(this,arguments);
9358 },java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);
9359 Clazz_overrideMethod(c$,"hasNext",
9360 function(){
9361 return this.$hasNext;
9362 });
9363 Clazz_overrideMethod(c$,"next",
9364 function(){
9365 if(this.$hasNext){
9366 this.$hasNext=false;
9367 return((Clazz_isClassDefined("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$()),Clazz_innerTypeInstance(java.util.Collections$SingletonMap$1$1$1,this,null));
9368 }throw new java.util.NoSuchElementException();
9369 });
9370 Clazz_overrideMethod(c$,"remove",
9371 function(){
9372 throw new UnsupportedOperationException();
9373 });
9374 c$=Clazz_p0p();
9375 };
9376 c$.$Collections$SingletonMap$1$1$1$=function(){
9377 Clazz_pu$h(self.c$);
9378 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);
9379 Clazz_overrideMethod(c$,"equals",
9380 function(a){
9381 return this.b$["java.util.Collections$SingletonMap$1"].contains(a);
9382 },"~O");
9383 Clazz_overrideMethod(c$,"getKey",
9384 function(){
9385 return this.b$["java.util.Collections.SingletonMap"].k;
9386 });
9387 Clazz_overrideMethod(c$,"getValue",
9388 function(){
9389 return this.b$["java.util.Collections.SingletonMap"].v;
9390 });
9391 Clazz_overrideMethod(c$,"hashCode",
9392 function(){
9393 return(this.b$["java.util.Collections.SingletonMap"].k==null?0:this.b$["java.util.Collections.SingletonMap"].k.hashCode())^(this.b$["java.util.Collections.SingletonMap"].v==null?0:this.b$["java.util.Collections.SingletonMap"].v.hashCode());
9394 });
9395 Clazz_overrideMethod(c$,"setValue",
9396 function(a){
9397 throw new UnsupportedOperationException();
9398 },"~O");
9399 c$=Clazz_p0p();
9400 };
9401 c$=Clazz_p0p();
9402 Clazz_pu$h(self.c$);
9403 c$=Clazz_decorateAsClass(function(){
9404 this.c=null;
9405 this.mutex=null;
9406 Clazz_instantialize(this,arguments);
9407 },java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);
9408 Clazz_makeConstructor(c$,
9409 function(a){
9410 this.c=a;
9411 this.mutex=this;
9412 },"java.util.Collection");
9413 Clazz_makeConstructor(c$,
9414 function(a,b){
9415 this.c=a;
9416 this.mutex=b;
9417 },"java.util.Collection,~O");
9418 Clazz_defineMethod(c$,"add",
9419 function(a){
9420 {
9421 return this.c.add(a);
9422 }},"~O");
9423 Clazz_defineMethod(c$,"addAll",
9424 function(a){
9425 {
9426 return this.c.addAll(a);
9427 }},"java.util.Collection");
9428 Clazz_defineMethod(c$,"clear",
9429 function(){
9430 {
9431 this.c.clear();
9432 }});
9433 Clazz_defineMethod(c$,"contains",
9434 function(a){
9435 {
9436 return this.c.contains(a);
9437 }},"~O");
9438 Clazz_defineMethod(c$,"containsAll",
9439 function(a){
9440 {
9441 return this.c.containsAll(a);
9442 }},"java.util.Collection");
9443 Clazz_defineMethod(c$,"isEmpty",
9444 function(){
9445 {
9446 return this.c.isEmpty();
9447 }});
9448 Clazz_defineMethod(c$,"iterator",
9449 function(){
9450 {
9451 return this.c.iterator();
9452 }});
9453 Clazz_defineMethod(c$,"remove",
9454 function(a){
9455 {
9456 return this.c.remove(a);
9457 }},"~O");
9458 Clazz_defineMethod(c$,"removeAll",
9459 function(a){
9460 {
9461 return this.c.removeAll(a);
9462 }},"java.util.Collection");
9463 Clazz_defineMethod(c$,"retainAll",
9464 function(a){
9465 {
9466 return this.c.retainAll(a);
9467 }},"java.util.Collection");
9468 Clazz_defineMethod(c$,"size",
9469 function(){
9470 {
9471 return this.c.size();
9472 }});
9473 Clazz_defineMethod(c$,"toArray",
9474 function(){
9475 {
9476 return this.c.toArray();
9477 }});
9478 Clazz_defineMethod(c$,"toString",
9479 function(){
9480 {
9481 return this.c.toString();
9482 }});
9483 Clazz_defineMethod(c$,"toArray",
9484 function(a){
9485 {
9486 return this.c.toArray(a);
9487 }},"~A");
9488 c$=Clazz_p0p();
9489
9490
9491 Clazz_pu$h(self.c$);
9492 c$=Clazz_decorateAsClass(function(){
9493 this.list=null;
9494 Clazz_instantialize(this,arguments);
9495 },java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);
9496 Clazz_makeConstructor(c$,
9497 function(a){
9498 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a]);
9499 this.list=a;
9500 },"java.util.List");
9501 Clazz_makeConstructor(c$,
9502 function(a,b){
9503 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a,b]);
9504 this.list=a;
9505 },"java.util.List,~O");
9506 Clazz_defineMethod(c$,"add",
9507 function(a,b){
9508 {
9509 this.list.add(a,b);
9510 }},"~N,~O");
9511 Clazz_defineMethod(c$,"addAll",
9512 function(a,b){
9513 {
9514 return this.list.addAll(a,b);
9515 }},"~N,java.util.Collection");
9516 Clazz_overrideMethod(c$,"equals",
9517 function(a){
9518 {
9519 return this.list.equals(a);
9520 }},"~O");
9521 Clazz_defineMethod(c$,"get",
9522 function(a){
9523 {
9524 return this.list.get(a);
9525 }},"~N");
9526 Clazz_overrideMethod(c$,"hashCode",
9527 function(){
9528 {
9529 return this.list.hashCode();
9530 }});
9531 Clazz_defineMethod(c$,"indexOf",
9532 function(a){
9533 {
9534 return this.list.indexOf(a);
9535 }},"~O");
9536 Clazz_defineMethod(c$,"lastIndexOf",
9537 function(a){
9538 {
9539 return this.list.lastIndexOf(a);
9540 }},"~O");
9541 //Clazz_defineMethod(c$,"listIterator",
9542 //function(){
9543 //{
9544 //return this.list.listIterator();
9545 //}});
9546 Clazz_defineMethod(c$,"listIterator",
9547 function(a){
9548 {
9549 a || (a = 0);
9550 return this.list.listIterator(a);
9551 }},"~N");
9552 Clazz_defineMethod(c$,"remove",
9553 function(a){
9554 {
9555 return this.list.remove(a);
9556 }},"~N");
9557 Clazz_defineMethod(c$,"set",
9558 function(a,b){
9559 {
9560 return this.list.set(a,b);
9561 }},"~N,~O");
9562 Clazz_defineMethod(c$,"subList",
9563 function(a,b){
9564 {
9565 return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex);
9566 }},"~N,~N");
9567 c$=Clazz_p0p();
9568
9569
9570
9571 Clazz_pu$h(self.c$);
9572 c$=Clazz_declareType(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);
9573 Clazz_overrideMethod(c$,"subList",
9574 function(a,b){
9575 {
9576 return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex);
9577 }},"~N,~N");
9578 c$=Clazz_p0p();
9579
9580
9581
9582
9583 Clazz_pu$h(self.c$);
9584 c$=Clazz_decorateAsClass(function(){
9585 this.m=null;
9586 this.mutex=null;
9587 Clazz_instantialize(this,arguments);
9588 },java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);
9589 Clazz_makeConstructor(c$,
9590 function(a){
9591 this.m=a;
9592 this.mutex=this;
9593 },"java.util.Map");
9594 Clazz_makeConstructor(c$,
9595 function(a,b){
9596 this.m=a;
9597 this.mutex=b;
9598 },"java.util.Map,~O");
9599 Clazz_defineMethod(c$,"clear",
9600 function(){
9601 {
9602 this.m.clear();
9603 }});
9604 Clazz_defineMethod(c$,"containsKey",
9605 function(a){
9606 {
9607 return this.m.containsKey(a);
9608 }},"~O");
9609 Clazz_defineMethod(c$,"containsValue",
9610 function(a){
9611 {
9612 return this.m.containsValue(a);
9613 }},"~O");
9614 Clazz_defineMethod(c$,"entrySet",
9615 function(){
9616 {
9617 return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex);
9618 }});
9619 Clazz_overrideMethod(c$,"equals",
9620 function(a){
9621 {
9622 return this.m.equals(a);
9623 }},"~O");
9624 Clazz_defineMethod(c$,"get",
9625 function(a){
9626 {
9627 return this.m.get(a);
9628 }},"~O");
9629 Clazz_overrideMethod(c$,"hashCode",
9630 function(){
9631 {
9632 return this.m.hashCode();
9633 }});
9634 Clazz_defineMethod(c$,"isEmpty",
9635 function(){
9636 {
9637 return this.m.isEmpty();
9638 }});
9639 Clazz_defineMethod(c$,"keySet",
9640 function(){
9641 {
9642 return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex);
9643 }});
9644 Clazz_defineMethod(c$,"put",
9645 function(a,b){
9646 {
9647 return this.m.put(a,b);
9648 }},"~O,~O");
9649 Clazz_defineMethod(c$,"putAll",
9650 function(a){
9651 {
9652 this.m.putAll(a);
9653 }},"java.util.Map");
9654 Clazz_defineMethod(c$,"remove",
9655 function(a){
9656 {
9657 return this.m.remove(a);
9658 }},"~O");
9659 Clazz_defineMethod(c$,"size",
9660 function(){
9661 {
9662 return this.m.size();
9663 }});
9664 Clazz_defineMethod(c$,"values",
9665 function(){
9666 {
9667 return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex);
9668 }});
9669 Clazz_defineMethod(c$,"toString",
9670 function(){
9671 {
9672 return this.m.toString();
9673 }});
9674 c$=Clazz_p0p();
9675 Clazz_pu$h(self.c$);
9676 c$=Clazz_declareType(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);
9677 Clazz_overrideMethod(c$,"equals",
9678 function(a){
9679 {
9680 return this.c.equals(a);
9681 }},"~O");
9682 Clazz_overrideMethod(c$,"hashCode",
9683 function(){
9684 {
9685 return this.c.hashCode();
9686 }});
9687 c$=Clazz_p0p();
9688 Clazz_pu$h(self.c$);
9689 c$=Clazz_decorateAsClass(function(){
9690 this.sm=null;
9691 Clazz_instantialize(this,arguments);
9692 },java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);
9693 Clazz_makeConstructor(c$,
9694 function(a){
9695 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a]);
9696 this.sm=a;
9697 },"java.util.SortedMap");
9698 Clazz_makeConstructor(c$,
9699 function(a,b){
9700 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a,b]);
9701 this.sm=a;
9702 },"java.util.SortedMap,~O");
9703 Clazz_defineMethod(c$,"comparator",
9704 function(){
9705 {
9706 return this.sm.comparator();
9707 }});
9708 Clazz_defineMethod(c$,"firstKey",
9709 function(){
9710 {
9711 return this.sm.firstKey();
9712 }});
9713 Clazz_defineMethod(c$,"headMap",
9714 function(a){
9715 {
9716 return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex);
9717 }},"~O");
9718 Clazz_defineMethod(c$,"lastKey",
9719 function(){
9720 {
9721 return this.sm.lastKey();
9722 }});
9723 Clazz_defineMethod(c$,"subMap",
9724 function(a,b){
9725 {
9726 return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,b),this.mutex);
9727 }},"~O,~O");
9728 Clazz_defineMethod(c$,"tailMap",
9729 function(a){
9730 {
9731 return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex);
9732 }},"~O");
9733 c$=Clazz_p0p();
9734 Clazz_pu$h(self.c$);
9735 c$=Clazz_decorateAsClass(function(){
9736 this.ss=null;
9737 Clazz_instantialize(this,arguments);
9738 },java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);
9739 Clazz_makeConstructor(c$,
9740 function(a){
9741 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a]);
9742 this.ss=a;
9743 },"java.util.SortedSet");
9744 Clazz_makeConstructor(c$,
9745 function(a,b){
9746 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a,b]);
9747 this.ss=a;
9748 },"java.util.SortedSet,~O");
9749 Clazz_defineMethod(c$,"comparator",
9750 function(){
9751 {
9752 return this.ss.comparator();
9753 }});
9754 Clazz_defineMethod(c$,"first",
9755 function(){
9756 {
9757 return this.ss.first();
9758 }});
9759 Clazz_defineMethod(c$,"headSet",
9760 function(a){
9761 {
9762 return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex);
9763 }},"~O");
9764 Clazz_defineMethod(c$,"last",
9765 function(){
9766 {
9767 return this.ss.last();
9768 }});
9769 Clazz_defineMethod(c$,"subSet",
9770 function(a,b){
9771 {
9772 return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex);
9773 }},"~O,~O");
9774 Clazz_defineMethod(c$,"tailSet",
9775 function(a){
9776 {
9777 return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex);
9778 }},"~O");
9779 c$=Clazz_p0p();
9780 Clazz_pu$h(self.c$);
9781 c$=Clazz_decorateAsClass(function(){
9782 this.c=null;
9783 Clazz_instantialize(this,arguments);
9784 },java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);
9785 Clazz_makeConstructor(c$,
9786 function(a){
9787 this.c=a;
9788 },"java.util.Collection");
9789 Clazz_overrideMethod(c$,"add",
9790 function(a){
9791 throw new UnsupportedOperationException();
9792 },"~O");
9793 Clazz_overrideMethod(c$,"addAll",
9794 function(a){
9795 throw new UnsupportedOperationException();
9796 },"java.util.Collection");
9797 Clazz_overrideMethod(c$,"clear",
9798 function(){
9799 throw new UnsupportedOperationException();
9800 });
9801 Clazz_defineMethod(c$,"contains",
9802 function(a){
9803 return this.c.contains(a);
9804 },"~O");
9805 Clazz_defineMethod(c$,"containsAll",
9806 function(a){
9807 return this.c.containsAll(a);
9808 },"java.util.Collection");
9809 Clazz_defineMethod(c$,"isEmpty",
9810 function(){
9811 return this.c.isEmpty();
9812 });
9813 Clazz_defineMethod(c$,"iterator",
9814 function(){
9815 return((Clazz_isClassDefined("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$()),Clazz_innerTypeInstance(java.util.Collections$UnmodifiableCollection$1,this,null));
9816 });
9817 Clazz_overrideMethod(c$,"remove",
9818 function(a){
9819 throw new UnsupportedOperationException();
9820 },"~O");
9821 Clazz_overrideMethod(c$,"removeAll",
9822 function(a){
9823 throw new UnsupportedOperationException();
9824 },"java.util.Collection");
9825 Clazz_overrideMethod(c$,"retainAll",
9826 function(a){
9827 throw new UnsupportedOperationException();
9828 },"java.util.Collection");
9829 Clazz_defineMethod(c$,"size",
9830 function(){
9831 return this.c.size();
9832 });
9833 Clazz_defineMethod(c$,"toArray",
9834 function(){
9835 return this.c.toArray();
9836 });
9837 Clazz_defineMethod(c$,"toArray",
9838 function(a){
9839 return this.c.toArray(a);
9840 },"~A");
9841 Clazz_defineMethod(c$,"toString",
9842 function(){
9843 return this.c.toString();
9844 });
9845 c$.$Collections$UnmodifiableCollection$1$=function(){
9846 Clazz_pu$h(self.c$);
9847 c$=Clazz_decorateAsClass(function(){
9848 Clazz_prepareCallback(this,arguments);
9849 this.iterator=null;
9850 Clazz_instantialize(this,arguments);
9851 },java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);
9852 Clazz_prepareFields(c$,function(){
9853 this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator();
9854 });
9855 Clazz_defineMethod(c$,"hasNext",
9856 function(){
9857 return this.iterator.hasNext();
9858 });
9859 Clazz_defineMethod(c$,"next",
9860 function(){
9861 return this.iterator.next();
9862 });
9863 Clazz_overrideMethod(c$,"remove",
9864 function(){
9865 throw new UnsupportedOperationException();
9866 });
9867 c$=Clazz_p0p();
9868 };
9869 c$=Clazz_p0p();
9870
9871 //BH note: a declared static superclass must come before a static class referencing it
9872
9873 Clazz_pu$h(self.c$);
9874 c$=Clazz_decorateAsClass(function(){
9875 this.list=null;
9876 Clazz_instantialize(this,arguments);
9877 },java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);
9878 Clazz_makeConstructor(c$,
9879 function(a){
9880 Clazz_superConstructor(this,java.util.Collections.UnmodifiableList,[a]);
9881 this.list=a;
9882 },"java.util.List");
9883 Clazz_defineMethod(c$,"add",
9884 function(a,b){
9885 throw new UnsupportedOperationException();
9886 },"~N,~O");
9887 Clazz_defineMethod(c$,"addAll",
9888 function(a,b){
9889 throw new UnsupportedOperationException();
9890 },"~N,java.util.Collection");
9891 Clazz_overrideMethod(c$,"equals",
9892 function(a){
9893 return this.list.equals(a);
9894 },"~O");
9895 Clazz_defineMethod(c$,"get",
9896 function(a){
9897 return this.list.get(a);
9898 },"~N");
9899 Clazz_overrideMethod(c$,"hashcode",
9900 function(){
9901 return this.list.hashCode();
9902 });
9903 Clazz_defineMethod(c$,"indexOf",
9904 function(a){
9905 return this.list.indexOf(a);
9906 },"~O");
9907 Clazz_defineMethod(c$,"lastIndexOf",
9908 function(a){
9909 return this.list.lastIndexOf(a);
9910 },"~O");
9911 //Clazz_defineMethod(c$,"listIterator",
9912 //function(){
9913 //return this.listIterator(0);
9914 //});
9915 Clazz_defineMethod(c$,"listIterator",
9916 function(a){
9917 a || (a = 0);
9918 return((Clazz_isClassDefined("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$()),Clazz_innerTypeInstance(java.util.Collections$UnmodifiableList$1,this,null));
9919 },"~N");
9920 Clazz_defineMethod(c$,"remove",
9921 function(a){
9922 throw new UnsupportedOperationException();
9923 },"~N");
9924 Clazz_overrideMethod(c$,"set",
9925 function(a,b){
9926 throw new UnsupportedOperationException();
9927 },"~N,~O");
9928 Clazz_defineMethod(c$,"subList",
9929 function(a,b){
9930 return new java.util.Collections.UnmodifiableList(this.list.subList(a,b));
9931 },"~N,~N");
9932 c$.$Collections$UnmodifiableList$1$=function(){
9933 Clazz_pu$h(self.c$);
9934 c$=Clazz_decorateAsClass(function(){
9935 Clazz_prepareCallback(this,arguments);
9936 this.iterator=null;
9937 Clazz_instantialize(this,arguments);
9938 },java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);
9939 Clazz_prepareFields(c$,function(){
9940 this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location);
9941 });
9942 Clazz_overrideMethod(c$,"add",
9943 function(b){
9944 throw new UnsupportedOperationException();
9945 },"~O");
9946 Clazz_defineMethod(c$,"hasNext",
9947 function(){
9948 return this.iterator.hasNext();
9949 });
9950 Clazz_defineMethod(c$,"hasPrevious",
9951 function(){
9952 return this.iterator.hasPrevious();
9953 });
9954 Clazz_defineMethod(c$,"next",
9955 function(){
9956 return this.iterator.next();
9957 });
9958 Clazz_defineMethod(c$,"nextIndex",
9959 function(){
9960 return this.iterator.nextIndex();
9961 });
9962 Clazz_defineMethod(c$,"previous",
9963 function(){
9964 return this.iterator.previous();
9965 });
9966 Clazz_defineMethod(c$,"previousIndex",
9967 function(){
9968 return this.iterator.previousIndex();
9969 });
9970 Clazz_overrideMethod(c$,"remove",
9971 function(){
9972 throw new UnsupportedOperationException();
9973 });
9974 Clazz_overrideMethod(c$,"set",
9975 function(b){
9976 throw new UnsupportedOperationException();
9977 },"~O");
9978 c$=Clazz_p0p();
9979 };
9980 c$=Clazz_p0p();
9981
9982
9983
9984
9985 Clazz_pu$h(self.c$);
9986 c$=Clazz_declareType(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);
9987 Clazz_overrideMethod(c$,"subList",
9988 function(a,b){
9989 return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,b));
9990 },"~N,~N");
9991 c$=Clazz_p0p();
9992
9993
9994 Clazz_pu$h(self.c$);
9995 c$=Clazz_declareType(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);
9996 Clazz_overrideMethod(c$,"equals",
9997 function(a){
9998 return this.c.equals(a);
9999 },"~O");
10000 Clazz_overrideMethod(c$,"hashCode",
10001 function(){
10002 return this.c.hashCode();
10003 });
10004 c$=Clazz_p0p();
10005
10006
10007 Clazz_pu$h(self.c$);
10008 c$=Clazz_decorateAsClass(function(){
10009 this.m=null;
10010 Clazz_instantialize(this,arguments);
10011 },java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);
10012 Clazz_makeConstructor(c$,
10013 function(a){
10014 this.m=a;
10015 },"java.util.Map");
10016 Clazz_overrideMethod(c$,"clear",
10017 function(){
10018 throw new UnsupportedOperationException();
10019 });
10020 Clazz_defineMethod(c$,"containsKey",
10021 function(a){
10022 return this.m.containsKey(a);
10023 },"~O");
10024 Clazz_defineMethod(c$,"containsValue",
10025 function(a){
10026 return this.m.containsValue(a);
10027 },"~O");
10028 Clazz_defineMethod(c$,"entrySet",
10029 function(){
10030 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet());
10031 });
10032 Clazz_overrideMethod(c$,"equals",
10033 function(a){
10034 return this.m.equals(a);
10035 },"~O");
10036 Clazz_defineMethod(c$,"get",
10037 function(a){
10038 return this.m.get(a);
10039 },"~O");
10040 Clazz_overrideMethod(c$,"hashcode",
10041 function(){
10042 return this.m.hashCode();
10043 });
10044 Clazz_defineMethod(c$,"isEmpty",
10045 function(){
10046 return this.m.isEmpty();
10047 });
10048 Clazz_defineMethod(c$,"keySet",
10049 function(){
10050 return new java.util.Collections.UnmodifiableSet(this.m.keySet());
10051 });
10052 Clazz_overrideMethod(c$,"put",
10053 function(a,b){
10054 throw new UnsupportedOperationException();
10055 },"~O,~O");
10056 Clazz_overrideMethod(c$,"putAll",
10057 function(a){
10058 throw new UnsupportedOperationException();
10059 },"java.util.Map");
10060 Clazz_overrideMethod(c$,"remove",
10061 function(a){
10062 throw new UnsupportedOperationException();
10063 },"~O");
10064 Clazz_defineMethod(c$,"size",
10065 function(){
10066 return this.m.size();
10067 });
10068 Clazz_defineMethod(c$,"values",
10069 function(){
10070 return new java.util.Collections.UnmodifiableCollection(this.m.values());
10071 });
10072 Clazz_defineMethod(c$,"toString",
10073 function(){
10074 return this.m.toString();
10075 });
10076
10077
10078
10079
10080
10081
10082
10083 Clazz_pu$h(self.c$);
10084 c$=Clazz_declareType(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);
10085 Clazz_overrideMethod(c$,"iterator",
10086 function(){
10087 return((Clazz_isClassDefined("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$()),Clazz_innerTypeInstance(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null));
10088 });
10089 Clazz_defineMethod(c$,"toArray",
10090 function(){
10091 var a=this.c.size();
10092 var b=new Array(a);
10093 var c=this.iterator();
10094 for(var d=a;--d>=0;){
10095 b[d]=c.next();
10096 }
10097 return b;
10098 });
10099 Clazz_defineMethod(c$,"toArray",
10100 function(a){
10101 var b=this.c.size();
10102 var c=0;
10103 var d=this.iterator();
10104 if(b>a.length){
10105 var e=a.getClass().getComponentType();
10106 a=java.lang.reflect.Array.newInstance(e,b);
10107 }while(c<b){
10108 a[c++]=d.next();
10109 }
10110 if(c<a.length){
10111 a[c]=null;
10112 }return a;
10113 },"~A");
10114 c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){
10115 Clazz_pu$h(self.c$);
10116 c$=Clazz_decorateAsClass(function(){
10117 Clazz_prepareCallback(this,arguments);
10118 this.iterator=null;
10119 Clazz_instantialize(this,arguments);
10120 },java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);
10121 Clazz_prepareFields(c$,function(){
10122 this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator();
10123 });
10124 Clazz_defineMethod(c$,"hasNext",
10125 function(){
10126 return this.iterator.hasNext();
10127 });
10128 Clazz_defineMethod(c$,"next",
10129 function(){
10130 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next());
10131 });
10132 Clazz_overrideMethod(c$,"remove",
10133 function(){
10134 throw new UnsupportedOperationException();
10135 });
10136 c$=Clazz_p0p();
10137 };
10138 Clazz_pu$h(self.c$);
10139 c$=Clazz_decorateAsClass(function(){
10140 this.mapEntry=null;
10141 Clazz_instantialize(this,arguments);
10142 },java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);
10143 Clazz_makeConstructor(c$,
10144 function(a){
10145 this.mapEntry=a;
10146 },"java.util.Map.Entry");
10147 Clazz_overrideMethod(c$,"equals",
10148 function(a){
10149 return this.mapEntry.equals(a);
10150 },"~O");
10151 Clazz_defineMethod(c$,"getKey",
10152 function(){
10153 return this.mapEntry.getKey();
10154 });
10155 Clazz_defineMethod(c$,"getValue",
10156 function(){
10157 return this.mapEntry.getValue();
10158 });
10159 Clazz_overrideMethod(c$,"hashcode",
10160 function(){
10161 return this.mapEntry.hashCode();
10162 });
10163 Clazz_overrideMethod(c$,"setValue",
10164 function(a){
10165 throw new UnsupportedOperationException();
10166 },"~O");
10167 Clazz_defineMethod(c$,"toString",
10168 function(){
10169 return this.mapEntry.toString();
10170 });
10171 c$=Clazz_p0p();
10172 c$=Clazz_p0p();
10173 c$=Clazz_p0p();
10174
10175
10176
10177 Clazz_pu$h(self.c$);
10178 c$=Clazz_decorateAsClass(function(){
10179 this.sm=null;
10180 Clazz_instantialize(this,arguments);
10181 },java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);
10182 Clazz_makeConstructor(c$,
10183 function(a){
10184 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedMap,[a]);
10185 this.sm=a;
10186 },"java.util.SortedMap");
10187 Clazz_defineMethod(c$,"comparator",
10188 function(){
10189 return this.sm.comparator();
10190 });
10191 Clazz_defineMethod(c$,"firstKey",
10192 function(){
10193 return this.sm.firstKey();
10194 });
10195 Clazz_defineMethod(c$,"headMap",
10196 function(a){
10197 return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a));
10198 },"~O");
10199 Clazz_defineMethod(c$,"lastKey",
10200 function(){
10201 return this.sm.lastKey();
10202 });
10203 Clazz_defineMethod(c$,"subMap",
10204 function(a,b){
10205 return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b));
10206 },"~O,~O");
10207 Clazz_defineMethod(c$,"tailMap",
10208 function(a){
10209 return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a));
10210 },"~O");
10211 c$=Clazz_p0p();
10212 Clazz_pu$h(self.c$);
10213 c$=Clazz_decorateAsClass(function(){
10214 this.ss=null;
10215 Clazz_instantialize(this,arguments);
10216 },java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);
10217 Clazz_makeConstructor(c$,
10218 function(a){
10219 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedSet,[a]);
10220 this.ss=a;
10221 },"java.util.SortedSet");
10222 Clazz_defineMethod(c$,"comparator",
10223 function(){
10224 return this.ss.comparator();
10225 });
10226 Clazz_defineMethod(c$,"first",
10227 function(){
10228 return this.ss.first();
10229 });
10230 Clazz_defineMethod(c$,"headSet",
10231 function(a){
10232 return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a));
10233 },"~O");
10234 Clazz_defineMethod(c$,"last",
10235 function(){
10236 return this.ss.last();
10237 });
10238 Clazz_defineMethod(c$,"subSet",
10239 function(a,b){
10240 return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b));
10241 },"~O,~O");
10242 Clazz_defineMethod(c$,"tailSet",
10243 function(a){
10244 return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a));
10245 },"~O");
10246 c$=Clazz_p0p();
10247 Clazz_pu$h(self.c$);
10248 c$=Clazz_decorateAsClass(function(){
10249 this.c=null;
10250 this.type=null;
10251 Clazz_instantialize(this,arguments);
10252 },java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);
10253 Clazz_makeConstructor(c$,
10254 function(a,b){
10255 if(a==null||b==null){
10256 throw new NullPointerException();
10257 }this.c=a;
10258 this.type=b;
10259 },"java.util.Collection,Class");
10260 Clazz_defineMethod(c$,"size",
10261 function(){
10262 return this.c.size();
10263 });
10264 Clazz_defineMethod(c$,"isEmpty",
10265 function(){
10266 return this.c.isEmpty();
10267 });
10268 Clazz_defineMethod(c$,"contains",
10269 function(a){
10270 return this.c.contains(a);
10271 },"~O");
10272 Clazz_defineMethod(c$,"iterator",
10273 function(){
10274 var a=this.c.iterator();
10275 if(Clazz_instanceOf(a,java.util.ListIterator)){
10276 a=new java.util.Collections.CheckedListIterator(a,this.type);
10277 }return a;
10278 });
10279 Clazz_defineMethod(c$,"toArray",
10280 function(){
10281 return this.c.toArray();
10282 });
10283 Clazz_defineMethod(c$,"toArray",
10284 function(a){
10285 return this.c.toArray(a);
10286 },"~A");
10287 Clazz_defineMethod(c$,"add",
10288 function(a){
10289 return this.c.add(java.util.Collections.checkType(a,this.type));
10290 },"~O");
10291 Clazz_defineMethod(c$,"remove",
10292 function(a){
10293 return this.c.remove(a);
10294 },"~O");
10295 Clazz_defineMethod(c$,"containsAll",
10296 function(a){
10297 return this.c.containsAll(a);
10298 },"java.util.Collection");
10299 Clazz_overrideMethod(c$,"addAll",
10300 function(a){
10301 var b=a.size();
10302 if(b==0){
10303 return false;
10304 }var c=new Array(b);
10305 var d=a.iterator();
10306 for(var e=0;e<b;e++){
10307 c[e]=java.util.Collections.checkType(d.next(),this.type);
10308 }
10309 var f=false;
10310 for(var g=0;g<b;g++){
10311 f=new Boolean(f|this.c.add(c[g])).valueOf();
10312 }
10313 return f;
10314 },"java.util.Collection");
10315 Clazz_defineMethod(c$,"removeAll",
10316 function(a){
10317 return this.c.removeAll(a);
10318 },"java.util.Collection");
10319 Clazz_defineMethod(c$,"retainAll",
10320 function(a){
10321 return this.c.retainAll(a);
10322 },"java.util.Collection");
10323 Clazz_defineMethod(c$,"clear",
10324 function(){
10325 this.c.clear();
10326 });
10327 Clazz_defineMethod(c$,"toString",
10328 function(){
10329 return this.c.toString();
10330 });
10331 c$=Clazz_p0p();
10332 Clazz_pu$h(self.c$);
10333 c$=Clazz_decorateAsClass(function(){
10334 this.i=null;
10335 this.type=null;
10336 Clazz_instantialize(this,arguments);
10337 },java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);
10338 Clazz_makeConstructor(c$,
10339 function(a,b){
10340 this.i=a;
10341 this.type=b;
10342 },"java.util.ListIterator,Class");
10343 Clazz_defineMethod(c$,"hasNext",
10344 function(){
10345 return this.i.hasNext();
10346 });
10347 Clazz_defineMethod(c$,"next",
10348 function(){
10349 return this.i.next();
10350 });
10351 Clazz_defineMethod(c$,"remove",
10352 function(){
10353 this.i.remove();
10354 });
10355 Clazz_defineMethod(c$,"hasPrevious",
10356 function(){
10357 return this.i.hasPrevious();
10358 });
10359 Clazz_defineMethod(c$,"previous",
10360 function(){
10361 return this.i.previous();
10362 });
10363 Clazz_defineMethod(c$,"nextIndex",
10364 function(){
10365 return this.i.nextIndex();
10366 });
10367 Clazz_defineMethod(c$,"previousIndex",
10368 function(){
10369 return this.i.previousIndex();
10370 });
10371 Clazz_defineMethod(c$,"set",
10372 function(a){
10373 this.i.set(java.util.Collections.checkType(a,this.type));
10374 },"~O");
10375 Clazz_defineMethod(c$,"add",
10376 function(a){
10377 this.i.add(java.util.Collections.checkType(a,this.type));
10378 },"~O");
10379 c$=Clazz_p0p();
10380 Clazz_pu$h(self.c$);
10381 c$=Clazz_decorateAsClass(function(){
10382 this.l=null;
10383 Clazz_instantialize(this,arguments);
10384 },java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);
10385 Clazz_makeConstructor(c$,
10386 function(a,b){
10387 Clazz_superConstructor(this,java.util.Collections.CheckedList,[a,b]);
10388 this.l=a;
10389 },"java.util.List,Class");
10390 Clazz_defineMethod(c$,"addAll",
10391 function(a,b){
10392 var c=b.size();
10393 if(c==0){
10394 return false;
10395 }var d=new Array(c);
10396 var e=b.iterator();
10397 for(var f=0;f<c;f++){
10398 d[f]=java.util.Collections.checkType(e.next(),this.type);
10399 }
10400 return this.l.addAll(a,java.util.Arrays.asList(d));
10401 },"~N,java.util.Collection");
10402 Clazz_defineMethod(c$,"get",
10403 function(a){
10404 return this.l.get(a);
10405 },"~N");
10406 Clazz_defineMethod(c$,"set",
10407 function(a,b){
10408 return this.l.set(a,java.util.Collections.checkType(b,this.type));
10409 },"~N,~O");
10410 Clazz_defineMethod(c$,"add",
10411 function(a,b){
10412 this.l.add(a,java.util.Collections.checkType(b,this.type));
10413 },"~N,~O");
10414 Clazz_defineMethod(c$,"remove",
10415 function(a){
10416 return this.l.remove(a);
10417 },"~N");
10418 Clazz_defineMethod(c$,"indexOf",
10419 function(a){
10420 return this.l.indexOf(a);
10421 },"~O");
10422 Clazz_defineMethod(c$,"lastIndexOf",
10423 function(a){
10424 return this.l.lastIndexOf(a);
10425 },"~O");
10426 //Clazz_defineMethod(c$,"listIterator",
10427 //function(){
10428 //return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type);
10429 //});
10430 Clazz_defineMethod(c$,"listIterator",
10431 function(a){
10432 a || (a = 0);
10433 return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type);
10434 },"~N");
10435 Clazz_defineMethod(c$,"subList",
10436 function(a,b){
10437 return java.util.Collections.checkedList(this.l.subList(a,b),this.type);
10438 },"~N,~N");
10439 Clazz_overrideMethod(c$,"equals",
10440 function(a){
10441 return this.l.equals(a);
10442 },"~O");
10443 Clazz_overrideMethod(c$,"hashcode",
10444 function(){
10445 return this.l.hashCode();
10446 });
10447 c$=Clazz_p0p();
10448 Clazz_pu$h(self.c$);
10449 c$=Clazz_declareType(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);
10450 c$=Clazz_p0p();
10451 Clazz_pu$h(self.c$);
10452 c$=Clazz_declareType(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);
10453 Clazz_overrideMethod(c$,"equals",
10454 function(a){
10455 return this.c.equals(a);
10456 },"~O");
10457 Clazz_overrideMethod(c$,"hashCode",
10458 function(){
10459 return this.c.hashCode();
10460 });
10461 c$=Clazz_p0p();
10462 Clazz_pu$h(self.c$);
10463 c$=Clazz_decorateAsClass(function(){
10464 this.m=null;
10465 this.keyType=null;
10466 this.valueType=null;
10467 Clazz_instantialize(this,arguments);
10468 },java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);
10469 Clazz_makeConstructor(c$,
10470 ($fz=function(a,b,c){
10471 if(a==null||b==null||c==null){
10472 throw new NullPointerException();
10473 }this.m=a;
10474 this.keyType=b;
10475 this.valueType=c;
10476 },$fz.isPrivate=true,$fz),"java.util.Map,Class,Class");
10477 Clazz_defineMethod(c$,"size",
10478 function(){
10479 return this.m.size();
10480 });
10481 Clazz_defineMethod(c$,"isEmpty",
10482 function(){
10483 return this.m.isEmpty();
10484 });
10485 Clazz_defineMethod(c$,"containsKey",
10486 function(a){
10487 return this.m.containsKey(a);
10488 },"~O");
10489 Clazz_defineMethod(c$,"containsValue",
10490 function(a){
10491 return this.m.containsValue(a);
10492 },"~O");
10493 Clazz_defineMethod(c$,"get",
10494 function(a){
10495 return this.m.get(a);
10496 },"~O");
10497 Clazz_defineMethod(c$,"put",
10498 function(a,b){
10499 return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,this.valueType));
10500 },"~O,~O");
10501 Clazz_defineMethod(c$,"remove",
10502 function(a){
10503 return this.m.remove(a);
10504 },"~O");
10505 Clazz_overrideMethod(c$,"putAll",
10506 function(a){
10507 var b=a.size();
10508 if(b==0){
10509 return;
10510 }var c=new Array(b);
10511 var d=a.entrySet().iterator();
10512 for(var e=0;e<b;e++){
10513 var f=d.next();
10514 java.util.Collections.checkType(f.getKey(),this.keyType);
10515 java.util.Collections.checkType(f.getValue(),this.valueType);
10516 c[e]=f;
10517 }
10518 for(var f=0;f<b;f++){
10519 this.m.put(c[f].getKey(),c[f].getValue());
10520 }
10521 },"java.util.Map");
10522 Clazz_defineMethod(c$,"clear",
10523 function(){
10524 this.m.clear();
10525 });
10526 Clazz_defineMethod(c$,"keySet",
10527 function(){
10528 return this.m.keySet();
10529 });
10530 Clazz_defineMethod(c$,"values",
10531 function(){
10532 return this.m.values();
10533 });
10534 Clazz_defineMethod(c$,"entrySet",
10535 function(){
10536 return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType);
10537 });
10538 Clazz_overrideMethod(c$,"equals",
10539 function(a){
10540 return this.m.equals(a);
10541 },"~O");
10542 Clazz_overrideMethod(c$,"hashcode",
10543 function(){
10544 return this.m.hashCode();
10545 });
10546 Clazz_defineMethod(c$,"toString",
10547 function(){
10548 return this.m.toString();
10549 });
10550 Clazz_pu$h(self.c$);
10551 c$=Clazz_decorateAsClass(function(){
10552 this.e=null;
10553 this.valueType=null;
10554 Clazz_instantialize(this,arguments);
10555 },java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);
10556 Clazz_makeConstructor(c$,
10557 function(a,b){
10558 if(a==null){
10559 throw new NullPointerException();
10560 }this.e=a;
10561 this.valueType=b;
10562 },"java.util.Map.Entry,Class");
10563 Clazz_defineMethod(c$,"getKey",
10564 function(){
10565 return this.e.getKey();
10566 });
10567 Clazz_defineMethod(c$,"getValue",
10568 function(){
10569 return this.e.getValue();
10570 });
10571 Clazz_defineMethod(c$,"setValue",
10572 function(a){
10573 return this.e.setValue(java.util.Collections.checkType(a,this.valueType));
10574 },"~O");
10575 Clazz_overrideMethod(c$,"equals",
10576 function(a){
10577 return this.e.equals(a);
10578 },"~O");
10579 Clazz_overrideMethod(c$,"hashcode",
10580 function(){
10581 return this.e.hashCode();
10582 });
10583 c$=Clazz_p0p();
10584 Clazz_pu$h(self.c$);
10585 c$=Clazz_decorateAsClass(function(){
10586 this.s=null;
10587 this.valueType=null;
10588 Clazz_instantialize(this,arguments);
10589 },java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);
10590 Clazz_makeConstructor(c$,
10591 function(a,b){
10592 this.s=a;
10593 this.valueType=b;
10594 },"java.util.Set,Class");
10595 Clazz_defineMethod(c$,"iterator",
10596 function(){
10597 return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType);
10598 });
10599 Clazz_defineMethod(c$,"toArray",
10600 function(){
10601 var a=this.size();
10602 var b=new Array(a);
10603 var c=this.iterator();
10604 for(var d=0;d<a;d++){
10605 b[d]=c.next();
10606 }
10607 return b;
10608 });
10609 Clazz_defineMethod(c$,"toArray",
10610 function(a){
10611 var b=this.size();
10612 if(a.length<b){
10613 var c=a.getClass().getComponentType();
10614 a=java.lang.reflect.Array.newInstance(c,b);
10615 }var c=this.iterator();
10616 for(var d=0;d<b;d++){
10617 a[d]=c.next();
10618 }
10619 if(b<a.length){
10620 a[b]=null;
10621 }return a;
10622 },"~A");
10623 Clazz_defineMethod(c$,"retainAll",
10624 function(a){
10625 return this.s.retainAll(a);
10626 },"java.util.Collection");
10627 Clazz_defineMethod(c$,"removeAll",
10628 function(a){
10629 return this.s.removeAll(a);
10630 },"java.util.Collection");
10631 Clazz_defineMethod(c$,"containsAll",
10632 function(a){
10633 return this.s.containsAll(a);
10634 },"java.util.Collection");
10635 Clazz_overrideMethod(c$,"addAll",
10636 function(a){
10637 throw new UnsupportedOperationException();
10638 },"java.util.Collection");
10639 Clazz_defineMethod(c$,"remove",
10640 function(a){
10641 return this.s.remove(a);
10642 },"~O");
10643 Clazz_defineMethod(c$,"contains",
10644 function(a){
10645 return this.s.contains(a);
10646 },"~O");
10647 Clazz_overrideMethod(c$,"add",
10648 function(a){
10649 throw new UnsupportedOperationException();
10650 },"java.util.Map.Entry");
10651 Clazz_defineMethod(c$,"isEmpty",
10652 function(){
10653 return this.s.isEmpty();
10654 });
10655 Clazz_defineMethod(c$,"clear",
10656 function(){
10657 this.s.clear();
10658 });
10659 Clazz_defineMethod(c$,"size",
10660 function(){
10661 return this.s.size();
10662 });
10663 Clazz_overrideMethod(c$,"hashcode",
10664 function(){
10665 return this.s.hashCode();
10666 });
10667 Clazz_overrideMethod(c$,"equals",
10668 function(a){
10669 return this.s.equals(a);
10670 },"~O");
10671 Clazz_pu$h(self.c$);
10672 c$=Clazz_decorateAsClass(function(){
10673 this.i=null;
10674 this.valueType=null;
10675 Clazz_instantialize(this,arguments);
10676 },java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);
10677 Clazz_makeConstructor(c$,
10678 function(a,b){
10679 this.i=a;
10680 this.valueType=b;
10681 },"java.util.Iterator,Class");
10682 Clazz_defineMethod(c$,"hasNext",
10683 function(){
10684 return this.i.hasNext();
10685 });
10686 Clazz_defineMethod(c$,"remove",
10687 function(){
10688 this.i.remove();
10689 });
10690 Clazz_defineMethod(c$,"next",
10691 function(){
10692 return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType);
10693 });
10694 c$=Clazz_p0p();
10695 c$=Clazz_p0p();
10696 c$=Clazz_p0p();
10697 Clazz_pu$h(self.c$);
10698 c$=Clazz_decorateAsClass(function(){
10699 this.ss=null;
10700 Clazz_instantialize(this,arguments);
10701 },java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);
10702 Clazz_makeConstructor(c$,
10703 function(a,b){
10704 Clazz_superConstructor(this,java.util.Collections.CheckedSortedSet,[a,b]);
10705 this.ss=a;
10706 },"java.util.SortedSet,Class");
10707 Clazz_defineMethod(c$,"comparator",
10708 function(){
10709 return this.ss.comparator();
10710 });
10711 Clazz_defineMethod(c$,"subSet",
10712 function(a,b){
10713 return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),this.type);
10714 },"~O,~O");
10715 Clazz_defineMethod(c$,"headSet",
10716 function(a){
10717 return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type);
10718 },"~O");
10719 Clazz_defineMethod(c$,"tailSet",
10720 function(a){
10721 return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type);
10722 },"~O");
10723 Clazz_defineMethod(c$,"first",
10724 function(){
10725 return this.ss.first();
10726 });
10727 Clazz_defineMethod(c$,"last",
10728 function(){
10729 return this.ss.last();
10730 });
10731 c$=Clazz_p0p();
10732 Clazz_pu$h(self.c$);
10733 c$=Clazz_decorateAsClass(function(){
10734 this.sm=null;
10735 Clazz_instantialize(this,arguments);
10736 },java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);
10737 Clazz_makeConstructor(c$,
10738 function(a,b,c){
10739 Clazz_superConstructor(this,java.util.Collections.CheckedSortedMap,[a,b,c]);
10740 this.sm=a;
10741 },"java.util.SortedMap,Class,Class");
10742 Clazz_defineMethod(c$,"comparator",
10743 function(){
10744 return this.sm.comparator();
10745 });
10746 Clazz_defineMethod(c$,"subMap",
10747 function(a,b){
10748 return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),this.keyType,this.valueType);
10749 },"~O,~O");
10750 Clazz_defineMethod(c$,"headMap",
10751 function(a){
10752 return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType);
10753 },"~O");
10754 Clazz_defineMethod(c$,"tailMap",
10755 function(a){
10756 return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType);
10757 },"~O");
10758 Clazz_defineMethod(c$,"firstKey",
10759 function(){
10760 return this.sm.firstKey();
10761 });
10762 Clazz_defineMethod(c$,"lastKey",
10763 function(){
10764 return this.sm.lastKey();
10765 });
10766 c$=Clazz_p0p();
10767 c$.EMPTY_LIST=c$.prototype.EMPTY_LIST=new java.util.Collections.EmptyList();
10768 c$.EMPTY_SET=c$.prototype.EMPTY_SET=new java.util.Collections.EmptySet();
10769 c$.EMPTY_MAP=c$.prototype.EMPTY_MAP=new java.util.Collections.EmptyMap();
10770 });
10771 Clazz_load(["java.util.Map"],"java.util.SortedMap",null,function(){
10772 Clazz_declareInterface(java.util,"SortedMap",java.util.Map);
10773 });
10774 Clazz_load(["java.util.Set"],"java.util.SortedSet",null,function(){
10775 Clazz_declareInterface(java.util,"SortedSet",java.util.Set);
10776 });
10777 Clazz_load(null,"java.util.Random",["java.lang.IllegalArgumentException"],function(){
10778 c$=Clazz_decorateAsClass(function(){
10779 this.haveNextNextGaussian=false;
10780 this.seed=0;
10781 this.nextNextGaussian=0;
10782 Clazz_instantialize(this,arguments);
10783 },java.util,"Random",null,java.io.Serializable);
10784 Clazz_makeConstructor(c$,
10785 function(){
10786 this.setSeed(System.currentTimeMillis());
10787 });
10788 Clazz_makeConstructor(c$,
10789 function(seed){
10790 this.setSeed(seed);
10791 },"~N");
10792 Clazz_defineMethod(c$,"next",
10793 function(bits){
10794 this.seed=(this.seed*25214903917+0xb)&(281474976710655);
10795 return(this.seed>>>(48-bits));
10796 },"~N");
10797 Clazz_defineMethod(c$,"nextBoolean",
10798 function(){
10799 return Math.random()>0.5;
10800 });
10801 Clazz_defineMethod(c$,"nextBytes",
10802 function(buf){
10803 for(var i=0;i<bytes.length;i++){
10804 bytes[i]=Math.round(0x100*Math.random());
10805 }
10806 },"~A");
10807 Clazz_defineMethod(c$,"nextDouble",
10808 function(){
10809 return Math.random();
10810 });
10811 Clazz_defineMethod(c$,"nextFloat",
10812 function(){
10813 return Math.random();
10814 });
10815 Clazz_defineMethod(c$,"nextGaussian",
10816 function(){
10817 if(this.haveNextNextGaussian){
10818 this.haveNextNextGaussian=false;
10819 return this.nextNextGaussian;
10820 }var v1;
10821 var v2;
10822 var s;
10823 do{
10824 v1=2*this.nextDouble()-1;
10825 v2=2*this.nextDouble()-1;
10826 s=v1*v1+v2*v2;
10827 }while(s>=1);
10828 var norm=Math.sqrt(-2*Math.log(s)/s);
10829 this.nextNextGaussian=v2*norm;
10830 this.haveNextNextGaussian=true;
10831 return v1*norm;
10832 });
10833 Clazz_defineMethod(c$,"nextInt",
10834 function(){
10835 return Math.ceil(0xffff*Math.random())-0x8000;
10836 });
10837 Clazz_defineMethod(c$,"nextInt",
10838 function(n){
10839 if(n>0){
10840 n = Math.min(n, 31);
10841 return Math.floor((2 << (n - 1)) * Math.random())
10842
10843 /*
10844 if((n&-n)==n){
10845 return((n*this.next(31))>>31);
10846 }var bits;
10847 var val;
10848 do{
10849 bits=this.next(31);
10850 val=bits%n;
10851 }while(bits-val+(n-1)<0);
10852
10853
10854 return val;
10855
10856 */
10857 }
10858 throw new IllegalArgumentException();
10859 },"~N");
10860 Clazz_defineMethod(c$,"nextLong",
10861 function(){
10862 return Math.ceil(0xffffffff*Math.random())-0x80000000;
10863 });
10864 Clazz_defineMethod(c$,"setSeed",
10865 function(seed){
10866 Math.seedrandom(seed);
10867 //this.seed=(seed^25214903917)&(281474976710655);
10868 //this.haveNextNextGaussian=false;
10869 },"~N");
10870 Clazz_defineStatics(c$,
10871 "multiplier",0x5deece66d);
10872 });
10873
10874 // seedrandom.js
10875 // Author: David Bau 3/11/2010
10876 //
10877 // Defines a method Math.seedrandom() that, when called, substitutes
10878 // an explicitly seeded RC4-based algorithm for Math.random().  Also
10879 // supports automatic seeding from local or network sources of entropy.
10880 //
10881 // Usage:
10882 //
10883 //   <script src=http://davidbau.com/encode/seedrandom-min.js></script>
10884 //
10885 //   Math.seedrandom('yipee'); Sets Math.random to a function that is
10886 //                             initialized using the given explicit seed.
10887 //
10888 //   Math.seedrandom();        Sets Math.random to a function that is
10889 //                             seeded using the current time, dom state,
10890 //                             and other accumulated local entropy.
10891 //                             The generated seed string is returned.
10892 //
10893 //   Math.seedrandom('yowza', true);
10894 //                             Seeds using the given explicit seed mixed
10895 //                             together with accumulated entropy.
10896 //
10897 //   <script src="http://bit.ly/srandom-512"></script>
10898 //                             Seeds using physical random bits downloaded
10899 //                             from random.org.
10900 //
10901 // Examples:
10902 //
10903 //   Math.seedrandom("hello");            // Use "hello" as the seed.
10904 //   document.write(Math.random());       // Always 0.5463663768140734
10905 //   document.write(Math.random());       // Always 0.43973793770592234
10906 //   var rng1 = Math.random;              // Remember the current prng.
10907 //
10908 //   var autoseed = Math.seedrandom();    // New prng with an automatic seed.
10909 //   document.write(Math.random());       // Pretty much unpredictable.
10910 //
10911 //   Math.random = rng1;                  // Continue "hello" prng sequence.
10912 //   document.write(Math.random());       // Always 0.554769432473455
10913 //
10914 //   Math.seedrandom(autoseed);           // Restart at the previous seed.
10915 //   document.write(Math.random());       // Repeat the 'unpredictable' value.
10916 //
10917 // Notes:
10918 //
10919 // Each time seedrandom('arg') is called, entropy from the passed seed
10920 // is accumulated in a pool to help generate future seeds for the
10921 // zero-argument form of Math.seedrandom, so entropy can be injected over
10922 // time by calling seedrandom with explicit data repeatedly.
10923 //
10924 // On speed - This javascript implementation of Math.random() is about
10925 // 3-10x slower than the built-in Math.random() because it is not native
10926 // code, but this is typically fast enough anyway.  Seeding is more expensive,
10927 // especially if you use auto-seeding.  Some details (timings on Chrome 4):
10928 //
10929 // Our Math.random()            - avg less than 0.002 milliseconds per call
10930 // seedrandom('explicit')       - avg less than 0.5 milliseconds per call
10931 // seedrandom('explicit', true) - avg less than 2 milliseconds per call
10932 // seedrandom()                 - avg about 38 milliseconds per call
10933 //
10934 // LICENSE (BSD):
10935 //
10936 // Copyright 2010 David Bau, all rights reserved.
10937 //
10938 // Redistribution and use in source and binary forms, with or without
10939 // modification, are permitted provided that the following conditions are met:
10940 //
10941 //   1. Redistributions of source code must retain the above copyright
10942 //      notice, this list of conditions and the following disclaimer.
10943 //
10944 //   2. Redistributions in binary form must reproduce the above copyright
10945 //      notice, this list of conditions and the following disclaimer in the
10946 //      documentation and/or other materials provided with the distribution.
10947 //
10948 //   3. Neither the name of this module nor the names of its contributors may
10949 //      be used to endorse or promote products derived from this software
10950 //      without specific prior written permission.
10951 //
10952 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10953 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10954 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10955 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10956 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10957 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10958 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10959 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10960 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10961 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10962 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10963 //
10964 /**
10965  * All code is in an anonymous closure to keep the global namespace clean.
10966  *
10967  * @param {number=} overflow
10968  * @param {number=} startdenom
10969  */
10970 (function (pool, math, width, chunks, significance, overflow, startdenom) {
10971
10972 var copyright = "Copyright 2010 David Bau, all rights reserved. (BSD)"
10973 //
10974 // seedrandom()
10975 // This is the seedrandom function described above.
10976 //
10977 math['seedrandom'] = function seedrandom(seed, use_entropy) {
10978   var key = [];
10979   var arc4;
10980
10981   // Flatten the seed string or build one from local entropy if needed.
10982   seed = mixkey(flatten(
10983     use_entropy ? [seed, pool] :
10984     arguments.length ? seed :
10985     [new Date().getTime(), pool, window], 3), key);
10986
10987   // Use the seed to initialize an ARC4 generator.
10988   arc4 = new ARC4(key);
10989
10990   // Mix the randomness into accumulated entropy.
10991   mixkey(arc4.S, pool);
10992
10993   // Override Math.random
10994
10995   // This function returns a random double in [0, 1) that contains
10996   // randomness in every bit of the mantissa of the IEEE 754 value.
10997
10998   math['random'] = function random() {  // Closure to return a random double:
10999     var n = arc4.g(chunks);             // Start with a numerator n < 2 ^ 48
11000     var d = startdenom;                 //   and denominator d = 2 ^ 48.
11001     var x = 0;                          //   and no 'extra last byte'.
11002     while (n < significance) {          // Fill up all significant digits by
11003       n = (n + x) * width;              //   shifting numerator and
11004       d *= width;                       //   denominator and generating a
11005       x = arc4.g(1);                    //   new least-significant-byte.
11006     }
11007     while (n >= overflow) {             // To avoid rounding up, before adding
11008       n /= 2;                           //   last byte, shift everything
11009       d /= 2;                           //   right using integer math until
11010       x >>>= 1;                         //   we have exactly the desired bits.
11011     }
11012     return (n + x) / d;                 // Form the number within [0, 1).
11013   };
11014
11015   // Return the seed that was used
11016   return seed;
11017 };
11018
11019 //
11020 // ARC4
11021 //
11022 // An ARC4 implementation.  The constructor takes a key in the form of
11023 // an array of at most (width) integers that should be 0 <= x < (width).
11024 //
11025 // The g(count) method returns a pseudorandom integer that concatenates
11026 // the next (count) outputs from ARC4.  Its return value is a number x
11027 // that is in the range 0 <= x < (width ^ count).
11028 //
11029 /** @constructor */
11030 function ARC4(key) {
11031   var t, u, me = this, keylen = key.length;
11032   var i = 0, j = me.i = me.j = me.m = 0;
11033   me.S = [];
11034   me.c = [];
11035
11036   // The empty key [] is treated as [0].
11037   if (!keylen) { key = [keylen++]; }
11038
11039   // Set up S using the standard key scheduling algorithm.
11040   while (i < width) { me.S[i] = i++; }
11041   for (i = 0; i < width; i++) {
11042     t = me.S[i];
11043     j = lowbits(j + t + key[i % keylen]);
11044     u = me.S[j];
11045     me.S[i] = u;
11046     me.S[j] = t;
11047   }
11048
11049   // The "g" method returns the next (count) outputs as one number.
11050   me.g = function getnext(count) {
11051     var s = me.S;
11052     var i = lowbits(me.i + 1); var t = s[i];
11053     var j = lowbits(me.j + t); var u = s[j];
11054     s[i] = u;
11055     s[j] = t;
11056     var r = s[lowbits(t + u)];
11057     while (--count) {
11058       i = lowbits(i + 1); t = s[i];
11059       j = lowbits(j + t); u = s[j];
11060       s[i] = u;
11061       s[j] = t;
11062       r = r * width + s[lowbits(t + u)];
11063     }
11064     me.i = i;
11065     me.j = j;
11066     return r;
11067   };
11068   // For robust unpredictability discard an initial batch of values.
11069   // See http://www.rsa.com/rsalabs/node.asp?id=2009
11070   me.g(width);
11071 }
11072
11073 //
11074 // flatten()
11075 // Converts an object tree to nested arrays of strings.
11076 //
11077 /** @param {Object=} result
11078   * @param {string=} prop */
11079 function flatten(obj, depth, result, prop) {
11080   result = [];
11081   if (depth && typeof(obj) == 'object') {
11082     for (prop in obj) {
11083       if (prop.indexOf('S') < 5) {    // Avoid FF3 bug (local/sessionStorage)
11084         try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
11085       }
11086     }
11087   }
11088   return result.length ? result : '' + obj;
11089 }
11090
11091 //
11092 // mixkey()
11093 // Mixes a string seed into a key that is an array of integers, and
11094 // returns a shortened string seed that is equivalent to the result key.
11095 //
11096 /** @param {number=} smear
11097   * @param {number=} j */
11098 function mixkey(seed, key, smear, j) {
11099   seed += '';                         // Ensure the seed is a string
11100   smear = 0;
11101   for (j = 0; j < seed.length; j++) {
11102     key[lowbits(j)] =
11103       lowbits((smear ^= key[lowbits(j)] * 19) + seed.charCodeAt(j));
11104   }
11105   seed = '';
11106   for (j in key) { seed += String.fromCharCode(key[j]); }
11107   return seed;
11108 }
11109
11110 //
11111 // lowbits()
11112 // A quick "n mod width" for width a power of 2.
11113 //
11114 function lowbits(n) { return n & (width - 1); }
11115
11116 //
11117 // The following constants are related to IEEE 754 limits.
11118 //
11119 startdenom = math.pow(width, chunks);
11120 significance = math.pow(2, significance);
11121 overflow = significance * 2;
11122
11123 //
11124 // When seedrandom.js is loaded, we immediately mix a few bits
11125 // from the built-in RNG into the entropy pool.  Because we do
11126 // not want to intefere with determinstic PRNG state later,
11127 // seedrandom will not call math.random on its own again after
11128 // initialization.
11129 //
11130 mixkey(math.random(), pool);
11131
11132 // End anonymous scope, and pass initial values.
11133 })(
11134   [],   // pool: entropy pool starts empty
11135   Math, // math: package containing random, pow, and seedrandom
11136   256,  // width: each RC4 output is 0 <= x < 256
11137   6,    // chunks: at least six RC4 outputs for each double
11138   52    // significance: there are 52 significant digits in a double
11139 );
11140
11141 Clazz_declarePackage ("java.awt.event");
11142 Clazz_load (["java.util.EventListenerProxy", "java.awt.event.AWTEventListener"], "java.awt.event.AWTEventListenerProxy", null, function () {
11143 c$ = Clazz_decorateAsClass (function () {
11144 this.eventMask = 0;
11145 Clazz_instantialize (this, arguments);
11146 }, java.awt.event, "AWTEventListenerProxy", java.util.EventListenerProxy, java.awt.event.AWTEventListener);
11147 Clazz_makeConstructor (c$, 
11148 function (eventMask, listener) {
11149 Clazz_superConstructor (this, java.awt.event.AWTEventListenerProxy, [listener]);
11150 this.eventMask = eventMask;
11151 }, "~N,java.awt.event.AWTEventListener");
11152 Clazz_defineMethod (c$, "eventDispatched", 
11153 function (evt) {
11154 (this.getListener ()).eventDispatched (evt);
11155 }, "java.awt.AWTEvent");
11156 Clazz_defineMethod (c$, "getEventMask", 
11157 function () {
11158 return this.eventMask;
11159 });
11160 });
11161 Clazz_declarePackage ("java.beans");
11162 Clazz_load (["java.beans.ChangeListenerMap"], "java.beans.PropertyChangeSupport", ["java.lang.Boolean", "$.NullPointerException", "java.beans.IndexedPropertyChangeEvent", "$.PropertyChangeEvent", "$.PropertyChangeListenerProxy"], function () {
11163 c$ = Clazz_decorateAsClass (function () {
11164 this.map = null;
11165 this.source = null;
11166 Clazz_instantialize (this, arguments);
11167 }, java.beans, "PropertyChangeSupport");
11168 Clazz_prepareFields (c$, function () {
11169 this.map =  new java.beans.PropertyChangeSupport.PropertyChangeListenerMap ();
11170 });
11171 Clazz_makeConstructor (c$, 
11172 function (sourceBean) {
11173 if (sourceBean == null) {
11174 throw  new NullPointerException ();
11175 }this.source = sourceBean;
11176 }, "~O");
11177 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11178 function (listener) {
11179 this.addPropertyChangeListener1 (listener);
11180 }, "java.beans.PropertyChangeListener");
11181 Clazz_defineMethod (c$, "addPropertyChangeListener1", 
11182 function (listener) {
11183 if (listener == null) {
11184 return;
11185 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11186 var proxy = listener;
11187 this.addPropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11188 } else {
11189 this.map.add (null, listener);
11190 }}, "java.beans.PropertyChangeListener");
11191 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11192 function (listener) {
11193 if (listener == null) {
11194 return;
11195 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11196 var proxy = listener;
11197 this.removePropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11198 } else {
11199 this.map.remove (null, listener);
11200 }}, "java.beans.PropertyChangeListener");
11201 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11202 function () {
11203 return this.map.getListeners ();
11204 });
11205 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11206 function (propertyName, listener) {
11207 {
11208 if (arguments.length == 1) {
11209 this.addPropertyChangeListener1(propertyName);
11210 return;
11211 }
11212 }this.addPropertyChangeListener2 (propertyName, listener);
11213 }, "~S,java.beans.PropertyChangeListener");
11214 Clazz_defineMethod (c$, "addPropertyChangeListener2", 
11215 function (propertyName, listener) {
11216 if (listener == null || propertyName == null) {
11217 return;
11218 }listener = this.map.extract (listener);
11219 if (listener != null) {
11220 this.map.add (propertyName, listener);
11221 }}, "~S,java.beans.PropertyChangeListener");
11222 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11223 function (propertyName, listener) {
11224 if (listener == null || propertyName == null) {
11225 return;
11226 }listener = this.map.extract (listener);
11227 if (listener != null) {
11228 this.map.remove (propertyName, listener);
11229 }}, "~S,java.beans.PropertyChangeListener");
11230 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11231 function (propertyName) {
11232 return this.map.getListeners (propertyName);
11233 }, "~S");
11234 Clazz_defineMethod (c$, "firePropertyChange", 
11235 function (propertyName, oldValue, newValue) {
11236 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11237 return;
11238 }this.firePropertyChangeEvt ( new java.beans.PropertyChangeEvent (this.source, propertyName, oldValue, newValue));
11239 }, "~S,~O,~O");
11240 Clazz_defineMethod (c$, "firePropertyChange", 
11241 function (propertyName, oldValue, newValue) {
11242 if (oldValue == newValue) {
11243 return;
11244 }this.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11245 }, "~S,~N,~N");
11246 Clazz_defineMethod (c$, "firePropertyChange", 
11247 function (propertyName, oldValue, newValue) {
11248 if (oldValue == newValue) {
11249 return;
11250 }this.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11251 }, "~S,~B,~B");
11252 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
11253 function (evt) {
11254 var oldValue = evt.getOldValue ();
11255 var newValue = evt.getNewValue ();
11256 var propertyName = evt.getPropertyName ();
11257 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11258 return;
11259 }var common = this.map.get (null);
11260 var named = (propertyName != null) ? this.map.get (propertyName) : null;
11261 this.fire (common, evt);
11262 this.fire (named, evt);
11263 }, "java.beans.PropertyChangeEvent");
11264 Clazz_defineMethod (c$, "fire", 
11265  function (listeners, event) {
11266 if (listeners != null) {
11267 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11268 listener.propertyChange (event);
11269 }
11270 }}, "~A,java.beans.PropertyChangeEvent");
11271 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11272 function (propertyName, index, oldValue, newValue) {
11273 this.firePropertyChangeEvt ( new java.beans.IndexedPropertyChangeEvent (this.source, propertyName, oldValue, newValue, index));
11274 }, "~S,~N,~O,~O");
11275 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11276 function (propertyName, index, oldValue, newValue) {
11277 if (oldValue == newValue) {
11278 return;
11279 }this.fireIndexedPropertyChange (propertyName, index, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11280 }, "~S,~N,~N,~N");
11281 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11282 function (propertyName, index, oldValue, newValue) {
11283 if (oldValue == newValue) {
11284 return;
11285 }this.fireIndexedPropertyChange (propertyName, index, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11286 }, "~S,~N,~B,~B");
11287 Clazz_defineMethod (c$, "hasListeners", 
11288 function (propertyName) {
11289 return this.map.hasListeners (propertyName);
11290 }, "~S");
11291 Clazz_pu$h(self.c$);
11292 c$ = Clazz_declareType (java.beans.PropertyChangeSupport, "PropertyChangeListenerMap", java.beans.ChangeListenerMap);
11293 Clazz_overrideMethod (c$, "newArray", 
11294 function (a) {
11295 return (0 < a) ?  new Array (a) : java.beans.PropertyChangeSupport.PropertyChangeListenerMap.EMPTY;
11296 }, "~N");
11297 Clazz_overrideMethod (c$, "newProxy", 
11298 function (a, b) {
11299 return  new java.beans.PropertyChangeListenerProxy (a, b);
11300 }, "~S,java.beans.PropertyChangeListener");
11301 Clazz_defineStatics (c$,
11302 "EMPTY",  Clazz_newArray (-1, []));
11303 c$ = Clazz_p0p ();
11304 });
11305 Clazz_declarePackage ("java.beans");
11306 Clazz_load (null, "java.beans.ChangeListenerMap", ["java.util.ArrayList", "$.Collections", "$.EventListenerProxy", "$.HashMap"], function () {
11307 c$ = Clazz_decorateAsClass (function () {
11308 this.map = null;
11309 Clazz_instantialize (this, arguments);
11310 }, java.beans, "ChangeListenerMap");
11311 Clazz_defineMethod (c$, "add", 
11312 function (name, listener) {
11313 if (this.map == null) {
11314 this.map =  new java.util.HashMap ();
11315 }var array = this.map.get (name);
11316 var size = (array != null) ? array.length : 0;
11317 var clone = this.newArray (size + 1);
11318 clone[size] = listener;
11319 if (array != null) {
11320 System.arraycopy (array, 0, clone, 0, size);
11321 }this.map.put (name, clone);
11322 }, "~S,~O");
11323 Clazz_defineMethod (c$, "remove", 
11324 function (name, listener) {
11325 if (this.map != null) {
11326 var array = this.map.get (name);
11327 if (array != null) {
11328 for (var i = 0; i < array.length; i++) {
11329 if (listener.equals (array[i])) {
11330 var size = array.length - 1;
11331 if (size > 0) {
11332 var clone = this.newArray (size);
11333 System.arraycopy (array, 0, clone, 0, i);
11334 System.arraycopy (array, i + 1, clone, i, size - i);
11335 this.map.put (name, clone);
11336 } else {
11337 this.map.remove (name);
11338 if (this.map.isEmpty ()) {
11339 this.map = null;
11340 }}break;
11341 }}
11342 }}}, "~S,~O");
11343 Clazz_defineMethod (c$, "get", 
11344 function (name) {
11345 return (this.map != null) ? this.map.get (name) : null;
11346 }, "~S");
11347 Clazz_defineMethod (c$, "set", 
11348 function (name, listeners) {
11349 if (listeners != null) {
11350 if (this.map == null) {
11351 this.map =  new java.util.HashMap ();
11352 }this.map.put (name, listeners);
11353 } else if (this.map != null) {
11354 this.map.remove (name);
11355 if (this.map.isEmpty ()) {
11356 this.map = null;
11357 }}}, "~S,~A");
11358 Clazz_defineMethod (c$, "getListeners", 
11359 function () {
11360 if (this.map == null) {
11361 return this.newArray (0);
11362 }var list =  new java.util.ArrayList ();
11363 var listeners = this.map.get (null);
11364 if (listeners != null) {
11365 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11366 list.add (listener);
11367 }
11368 }for (var entry, $entry = this.map.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) {
11369 var name = entry.getKey ();
11370 if (name != null) {
11371 for (var listener, $listener = 0, $$listener = entry.getValue (); $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11372 list.add (this.newProxy (name, listener));
11373 }
11374 }}
11375 return list.toArray (this.newArray (list.size ()));
11376 });
11377 Clazz_defineMethod (c$, "getListeners", 
11378 function (name) {
11379 if (name != null) {
11380 var listeners = this.get (name);
11381 if (listeners != null) {
11382 return listeners.clone ();
11383 }}return this.newArray (0);
11384 }, "~S");
11385 Clazz_defineMethod (c$, "hasListeners", 
11386 function (name) {
11387 if (this.map == null) {
11388 return false;
11389 }var array = this.map.get (null);
11390 return (array != null) || ((name != null) && (null != this.map.get (name)));
11391 }, "~S");
11392 Clazz_defineMethod (c$, "getEntries", 
11393 function () {
11394 return (this.map != null) ? this.map.entrySet () : java.util.Collections.emptySet ();
11395 });
11396 Clazz_defineMethod (c$, "extract", 
11397 function (listener) {
11398 while (Clazz_instanceOf (listener, java.util.EventListenerProxy)) {
11399 var proxy = listener;
11400 listener = proxy.getListener ();
11401 }
11402 return listener;
11403 }, "~O");
11404 });
11405 Clazz_declarePackage ("java.beans");
11406 Clazz_load (["java.beans.PropertyChangeEvent"], "java.beans.IndexedPropertyChangeEvent", null, function () {
11407 c$ = Clazz_decorateAsClass (function () {
11408 this.index = 0;
11409 Clazz_instantialize (this, arguments);
11410 }, java.beans, "IndexedPropertyChangeEvent", java.beans.PropertyChangeEvent);
11411 Clazz_makeConstructor (c$, 
11412 function (source, propertyName, oldValue, newValue, index) {
11413 Clazz_superConstructor (this, java.beans.IndexedPropertyChangeEvent, [source, propertyName, oldValue, newValue]);
11414 this.index = index;
11415 }, "~O,~S,~O,~O,~N");
11416 Clazz_defineMethod (c$, "getIndex", 
11417 function () {
11418 return this.index;
11419 });
11420 });
11421 Clazz_declarePackage ("java.beans");
11422 Clazz_load (["java.util.EventObject"], "java.beans.PropertyChangeEvent", null, function () {
11423 c$ = Clazz_decorateAsClass (function () {
11424 this.propertyName = null;
11425 this.newValue = null;
11426 this.oldValue = null;
11427 this.propagationId = null;
11428 Clazz_instantialize (this, arguments);
11429 }, java.beans, "PropertyChangeEvent", java.util.EventObject);
11430 Clazz_makeConstructor (c$, 
11431 function (source, propertyName, oldValue, newValue) {
11432 Clazz_superConstructor (this, java.beans.PropertyChangeEvent, [source]);
11433 this.propertyName = propertyName;
11434 this.newValue = newValue;
11435 this.oldValue = oldValue;
11436 }, "~O,~S,~O,~O");
11437 Clazz_defineMethod (c$, "getPropertyName", 
11438 function () {
11439 return this.propertyName;
11440 });
11441 Clazz_defineMethod (c$, "getNewValue", 
11442 function () {
11443 return this.newValue;
11444 });
11445 Clazz_defineMethod (c$, "getOldValue", 
11446 function () {
11447 return this.oldValue;
11448 });
11449 Clazz_defineMethod (c$, "setPropagationId", 
11450 function (propagationId) {
11451 this.propagationId = propagationId;
11452 }, "~O");
11453 Clazz_defineMethod (c$, "getPropagationId", 
11454 function () {
11455 return this.propagationId;
11456 });
11457 });
11458 Clazz_declarePackage ("java.beans");
11459 Clazz_load (["java.util.EventListenerProxy", "java.beans.PropertyChangeListener"], "java.beans.PropertyChangeListenerProxy", null, function () {
11460 c$ = Clazz_decorateAsClass (function () {
11461 this.propertyName = null;
11462 Clazz_instantialize (this, arguments);
11463 }, java.beans, "PropertyChangeListenerProxy", java.util.EventListenerProxy, java.beans.PropertyChangeListener);
11464 Clazz_makeConstructor (c$, 
11465 function (propertyName, listener) {
11466 Clazz_superConstructor (this, java.beans.PropertyChangeListenerProxy, [listener]);
11467 this.propertyName = propertyName;
11468 }, "~S,java.beans.PropertyChangeListener");
11469 Clazz_defineMethod (c$, "propertyChange", 
11470 function (evt) {
11471 (this.getListener ()).propertyChange (evt);
11472 }, "java.beans.PropertyChangeEvent");
11473 Clazz_defineMethod (c$, "getPropertyName", 
11474 function () {
11475 return this.propertyName;
11476 });
11477 });
11478 Clazz_declarePackage ("java.beans");
11479 Clazz_load (["java.util.EventListener"], "java.beans.PropertyChangeListener", null, function () {
11480 Clazz_declareInterface (java.beans, "PropertyChangeListener", java.util.EventListener);
11481 });
11482 Clazz_declarePackage ("java.security");
11483 Clazz_declareInterface (java.security, "PrivilegedAction");
11484 Clazz_declarePackage ("java.awt");
11485 Clazz_load (["java.awt.geom.Point2D"], "java.awt.Point", null, function () {
11486 c$ = Clazz_decorateAsClass (function () {
11487 this.x = 0;
11488 this.y = 0;
11489 Clazz_instantialize (this, arguments);
11490 }, java.awt, "Point", java.awt.geom.Point2D);
11491 Clazz_makeConstructor (c$, 
11492 function () {
11493 this.construct (0, 0);
11494 });
11495 Clazz_makeConstructor (c$, 
11496 function (p) {
11497 this.construct (p.x, p.y);
11498 }, "java.awt.Point");
11499 Clazz_makeConstructor (c$, 
11500 function (x, y) {
11501 Clazz_superConstructor (this, java.awt.Point, []);
11502 this.x = x;
11503 this.y = y;
11504 }, "~N,~N");
11505 Clazz_overrideMethod (c$, "getX", 
11506 function () {
11507 return this.x;
11508 });
11509 Clazz_overrideMethod (c$, "getY", 
11510 function () {
11511 return this.y;
11512 });
11513 Clazz_defineMethod (c$, "getLocation", 
11514 function () {
11515 return  new java.awt.Point (this.x, this.y);
11516 });
11517 Clazz_defineMethod (c$, "setLocation", 
11518 function (p) {
11519 this.setLocation (p.x, p.y);
11520 }, "java.awt.Point");
11521 Clazz_defineMethod (c$, "setLocation", 
11522 function (x, y) {
11523 this.x = Clazz_doubleToInt (Math.floor (x + 0.5));
11524 this.y = Clazz_doubleToInt (Math.floor (y + 0.5));
11525 }, "~N,~N");
11526 Clazz_defineMethod (c$, "move", 
11527 function (x, y) {
11528 this.x = x;
11529 this.y = y;
11530 }, "~N,~N");
11531 Clazz_defineMethod (c$, "translate", 
11532 function (dx, dy) {
11533 this.x += dx;
11534 this.y += dy;
11535 }, "~N,~N");
11536 Clazz_defineMethod (c$, "equals", 
11537 function (obj) {
11538 if (Clazz_instanceOf (obj, java.awt.Point)) {
11539 var pt = obj;
11540 return (this.x == pt.x) && (this.y == pt.y);
11541 }return Clazz_superCall (this, java.awt.Point, "equals", [obj]);
11542 }, "~O");
11543 Clazz_overrideMethod (c$, "toString", 
11544 function () {
11545 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + "]";
11546 });
11547 });
11548 Clazz_declarePackage ("jssun.awt");
11549 Clazz_load (["java.lang.StringBuffer", "java.util.Collections", "$.HashMap", "$.IdentityHashMap"], ["jssun.awt.AppContext", "$.MostRecentThreadAppContext", "$.MostRecentKeyValue"], ["java.lang.Thread", "java.util.HashSet", "java.beans.PropertyChangeSupport"], function () {
11550 c$ = Clazz_decorateAsClass (function () {
11551 this.table = null;
11552 this.threadGroup = null;
11553 this.changeSupport = null;
11554 this.$isDisposed = false;
11555 this.mostRecentKeyValue = null;
11556 this.shadowMostRecentKeyValue = null;
11557 Clazz_instantialize (this, arguments);
11558 }, jssun.awt, "AppContext");
11559 Clazz_prepareFields (c$, function () {
11560 this.table =  new java.util.HashMap ();
11561 });
11562 c$.getAppContexts = Clazz_defineMethod (c$, "getAppContexts", 
11563 function () {
11564 return  new java.util.HashSet (jssun.awt.AppContext.threadGroup2appContext.values ());
11565 });
11566 Clazz_defineMethod (c$, "isDisposed", 
11567 function () {
11568 return this.$isDisposed;
11569 });
11570 Clazz_makeConstructor (c$, 
11571 function (threadGroup) {
11572 jssun.awt.AppContext.numAppContexts++;
11573 this.threadGroup = threadGroup;
11574 jssun.awt.AppContext.threadGroup2appContext.put (threadGroup, this);
11575 }, "ThreadGroup");
11576 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
11577 function () {
11578 var currentThread = Thread.currentThread ();
11579 var appContext = null;
11580 var recent = jssun.awt.AppContext.mostRecentThreadAppContext;
11581 if ((recent != null) && (recent.thread === currentThread)) {
11582 appContext = recent.appContext;
11583 } else {
11584 var currentThreadGroup = currentThread.getThreadGroup ();
11585 var threadGroup = currentThreadGroup;
11586 appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11587 while (appContext == null) {
11588 threadGroup = threadGroup.getParent ();
11589 if (threadGroup == null) {
11590 return null;
11591 }appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11592 }
11593 for (var tg = currentThreadGroup; tg !== threadGroup; tg = tg.getParent ()) {
11594 jssun.awt.AppContext.threadGroup2appContext.put (tg, appContext);
11595 }
11596 jssun.awt.AppContext.mostRecentThreadAppContext =  new jssun.awt.MostRecentThreadAppContext (currentThread, appContext);
11597 }return appContext;
11598 });
11599 c$.isMainContext = Clazz_defineMethod (c$, "isMainContext", 
11600 function (ctx) {
11601 return false;
11602 }, "jssun.awt.AppContext");
11603 Clazz_defineMethod (c$, "dispose", 
11604 function () {
11605 });
11606 Clazz_defineMethod (c$, "get", 
11607 function (key) {
11608 {
11609 var recent = this.mostRecentKeyValue;
11610 if ((recent != null) && (recent.key === key)) {
11611 return recent.value;
11612 }var value = this.table.get (key);
11613 if (this.mostRecentKeyValue == null) {
11614 this.mostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11615 this.shadowMostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11616 } else {
11617 var auxKeyValue = this.mostRecentKeyValue;
11618 this.shadowMostRecentKeyValue.setPair (key, value);
11619 this.mostRecentKeyValue = this.shadowMostRecentKeyValue;
11620 this.shadowMostRecentKeyValue = auxKeyValue;
11621 }return value;
11622 }}, "~O");
11623 Clazz_defineMethod (c$, "put", 
11624 function (key, value) {
11625 {
11626 var recent = this.mostRecentKeyValue;
11627 if ((recent != null) && (recent.key === key)) recent.value = value;
11628 return this.table.put (key, value);
11629 }}, "~O,~O");
11630 Clazz_defineMethod (c$, "remove", 
11631 function (key) {
11632 {
11633 var recent = this.mostRecentKeyValue;
11634 if ((recent != null) && (recent.key === key)) recent.value = null;
11635 return this.table.remove (key);
11636 }}, "~O");
11637 Clazz_defineMethod (c$, "getThreadGroup", 
11638 function () {
11639 return this.threadGroup;
11640 });
11641 Clazz_overrideMethod (c$, "toString", 
11642 function () {
11643 return this.getClass ().getName () + "[threadGroup=" + this.threadGroup.getName () + "]";
11644 });
11645 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11646 function () {
11647 if (this.changeSupport == null) {
11648 return  new Array (0);
11649 }return this.changeSupport.getPropertyChangeListeners ();
11650 });
11651 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11652 function (propertyName, listener) {
11653 if (listener == null) {
11654 return;
11655 }if (this.changeSupport == null) {
11656 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
11657 }this.changeSupport.addPropertyChangeListener (propertyName, listener);
11658 }, "~S,java.beans.PropertyChangeListener");
11659 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11660 function (propertyName, listener) {
11661 if (listener == null || this.changeSupport == null) {
11662 return;
11663 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
11664 }, "~S,java.beans.PropertyChangeListener");
11665 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11666 function (propertyName) {
11667 if (this.changeSupport == null) {
11668 return  new Array (0);
11669 }return this.changeSupport.getPropertyChangeListeners (propertyName);
11670 }, "~S");
11671 c$.EVENT_QUEUE_KEY = c$.prototype.EVENT_QUEUE_KEY =  new StringBuffer ("EventQueue");
11672 c$.threadGroup2appContext = c$.prototype.threadGroup2appContext = java.util.Collections.synchronizedMap ( new java.util.IdentityHashMap ());
11673 Clazz_defineStatics (c$,
11674 "DISPOSED_PROPERTY_NAME", "disposed",
11675 "GUI_DISPOSED", "guidisposed",
11676 "numAppContexts", 0,
11677 "mostRecentThreadAppContext", null);
11678 c$ = Clazz_decorateAsClass (function () {
11679 this.thread = null;
11680 this.appContext = null;
11681 Clazz_instantialize (this, arguments);
11682 }, jssun.awt, "MostRecentThreadAppContext");
11683 Clazz_makeConstructor (c$, 
11684 function (key, value) {
11685 this.thread = key;
11686 this.appContext = value;
11687 }, "Thread,jssun.awt.AppContext");
11688 c$ = Clazz_decorateAsClass (function () {
11689 this.key = null;
11690 this.value = null;
11691 Clazz_instantialize (this, arguments);
11692 }, jssun.awt, "MostRecentKeyValue");
11693 Clazz_makeConstructor (c$, 
11694 function (k, v) {
11695 this.key = k;
11696 this.value = v;
11697 }, "~O,~O");
11698 Clazz_defineMethod (c$, "setPair", 
11699 function (k, v) {
11700 this.key = k;
11701 this.value = v;
11702 }, "~O,~O");
11703 });
11704 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){
11705 c$=Clazz_declareType(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);
11706 Clazz_makeConstructor(c$,
11707 function(cs){
11708 if(cs==null){
11709 throw new NullPointerException();
11710 }
11711 Clazz_superConstructor(this,StringBuffer,[cs.toString()]);
11712 },"CharSequence");
11713 Clazz_defineMethod(c$,"append",
11714 function(b){
11715 return this.append(b?"true":"false");
11716 },"~B");
11717 Clazz_defineMethod(c$,"append",
11718 function(ch){
11719 this.append0(ch);
11720 return this;
11721 },"~N");
11722 Clazz_defineMethod(c$,"append",
11723 function(d){
11724 return this.append(Double.toString(d));
11725 },"~N");
11726 Clazz_defineMethod(c$,"append",
11727 function(obj){
11728 if(obj==null){
11729 this.appendNull();
11730 }else{
11731 this.append0(obj.toString());
11732 }return this;
11733 },"~O");
11734 Clazz_defineMethod(c$,"append",
11735 function(string){
11736 this.append0(string);
11737 return this;
11738 },"~S");
11739 Clazz_defineMethod(c$,"append",
11740 function(sb){
11741 if(sb==null){
11742 this.appendNull();
11743 }else{
11744 {
11745 this.append0(sb.getValue(),0,sb.length());
11746 }}return this;
11747 },"StringBuffer");
11748 Clazz_defineMethod(c$,"append",
11749 function(chars){
11750 this.append0(chars);
11751 return this;
11752 },"~A");
11753 Clazz_defineMethod(c$,"append",
11754 function(chars,start,length){
11755 this.append0(chars,start,length);
11756 return this;
11757 },"~A,~N,~N");
11758 Clazz_defineMethod(c$,"append",
11759 function(s){
11760 if(s==null){
11761 this.appendNull();
11762 }else{
11763 this.append0(s.toString());
11764 }return this;
11765 },"CharSequence");
11766 Clazz_defineMethod(c$,"append",
11767 function(s,start,end){
11768 this.append0(s,start,end);
11769 return this;
11770 },"CharSequence,~N,~N");
11771 Clazz_defineMethod(c$,"appendCodePoint",
11772 function(codePoint){
11773 return this.append(Character.toChars(codePoint));
11774 },"~N");
11775 Clazz_defineMethod(c$,"$delete",
11776 function(start,end){
11777 this.delete0(start,end);
11778 return this;
11779 },"~N,~N");
11780 Clazz_defineMethod(c$,"deleteCharAt",
11781 function(location){
11782 this.deleteCharAt0(location);
11783 return this;
11784 },"~N");
11785 Clazz_defineMethod(c$,"insert",
11786 function(index,ch){
11787 this.insert0(index,ch);
11788 return this;
11789 },"~N,~N");
11790 Clazz_defineMethod(c$,"insert",
11791 function(index,b){
11792 return this.insert(index,b?"true":"false");
11793 },"~N,~B");
11794 Clazz_defineMethod(c$,"insert",
11795 function(index,i){
11796 return this.insert(index,Integer.toString(i));
11797 },"~N,~N");
11798 Clazz_defineMethod(c$,"insert",
11799 function(index,l){
11800 return this.insert(index,Long.toString(l));
11801 },"~N,~N");
11802 Clazz_defineMethod(c$,"insert",
11803 function(index,d){
11804 return this.insert(index,Double.toString(d));
11805 },"~N,~N");
11806 Clazz_defineMethod(c$,"insert",
11807 function(index,f){
11808 return this.insert(index,Float.toString(f));
11809 },"~N,~N");
11810 Clazz_defineMethod(c$,"insert",
11811 function(index,obj){
11812 return this.insert(index,obj==null?"null":obj.toString());
11813 },"~N,~O");
11814 Clazz_defineMethod(c$,"insert",
11815 function(index,string){
11816 this.insert0(index,string);
11817 return this;
11818 },"~N,~S");
11819 Clazz_defineMethod(c$,"insert",
11820 function(index,chars){
11821 this.insert0(index,chars);
11822 return this;
11823 },"~N,~A");
11824 Clazz_defineMethod(c$,"insert",
11825 function(index,chars,start,length){
11826 this.insert0(index,chars,start,length);
11827 return this;
11828 },"~N,~A,~N,~N");
11829 Clazz_defineMethod(c$,"insert",
11830 function(index,s){
11831 this.insert0(index,s==null?"null":s.toString());
11832 return this;
11833 },"~N,CharSequence");
11834 Clazz_defineMethod(c$,"insert",
11835 function(index,s,start,end){
11836 this.insert0(index,s,start,end);
11837 return this;
11838 },"~N,CharSequence,~N,~N");
11839 Clazz_defineMethod(c$,"replace",
11840 function(start,end,string){
11841 this.replace0(start,end,string);
11842 return this;
11843 },"~N,~N,~S");
11844 Clazz_defineMethod(c$,"reverse",
11845 function(){
11846 this.reverse0();
11847 return this;
11848 });
11849 Clazz_overrideMethod(c$,"subSequence",
11850 function(start,end){
11851 return Clazz_superCall(this,StringBuffer,"substring",[start,end]);
11852 },"~N,~N");
11853 });
11854 Clazz_load(["java.util.AbstractMap","$.AbstractSet","$.Iterator","$.Map","$.MapEntry"],"java.util.IdentityHashMap",["java.lang.IllegalArgumentException","$.IllegalStateException","java.util.AbstractCollection","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.NoSuchElementException"],function(){
11855 c$=Clazz_decorateAsClass(function(){
11856 this.elementData=null;
11857 this.$size=0;
11858 this.threshold=0;
11859 this.modCount=0;
11860 Clazz_instantialize(this,arguments);
11861 },java.util,"IdentityHashMap",java.util.AbstractMap,[java.util.Map,java.io.Serializable,Cloneable]);
11862 Clazz_makeConstructor(c$,
11863 function(){
11864 this.construct(21);
11865 });
11866 Clazz_makeConstructor(c$,
11867 function(maxSize){
11868 Clazz_superConstructor(this,java.util.IdentityHashMap,[]);
11869 if(maxSize>=0){
11870 this.$size=0;
11871 this.threshold=this.getThreshold(maxSize);
11872 this.elementData=this.newElementArray(this.computeElementArraySize());
11873 }else{
11874 throw new IllegalArgumentException();
11875 }},"~N");
11876 Clazz_defineMethod(c$,"getThreshold",
11877 ($fz=function(maxSize){
11878 return maxSize>3?maxSize:3;
11879 },$fz.isPrivate=true,$fz),"~N");
11880 Clazz_defineMethod(c$,"computeElementArraySize",
11881 ($fz=function(){
11882 return(Math.floor((this.threshold*10000)/7500))*2;
11883 },$fz.isPrivate=true,$fz));
11884 Clazz_defineMethod(c$,"newElementArray",
11885 ($fz=function(s){
11886 return new Array(s);
11887 },$fz.isPrivate=true,$fz),"~N");
11888 Clazz_makeConstructor(c$,
11889 function(map){
11890 this.construct(map.size()<6?11:map.size()*2);
11891 this.putAllImpl(map);
11892 },"java.util.Map");
11893 Clazz_defineMethod(c$,"massageValue",
11894 ($fz=function(value){
11895 return((value===java.util.IdentityHashMap.NULL_OBJECT)?null:value);
11896 },$fz.isPrivate=true,$fz),"~O");
11897 Clazz_overrideMethod(c$,"clear",
11898 function(){
11899 this.$size=0;
11900 for(var i=0;i<this.elementData.length;i++){
11901 this.elementData[i]=null;
11902 }
11903 this.modCount++;
11904 });
11905 Clazz_overrideMethod(c$,"containsKey",
11906 function(key){
11907 if(key==null){
11908 key=java.util.IdentityHashMap.NULL_OBJECT;
11909 }var index=this.findIndex(key,this.elementData);
11910 return this.elementData[index]===key;
11911 },"~O");
11912 Clazz_overrideMethod(c$,"containsValue",
11913 function(value){
11914 if(value==null){
11915 value=java.util.IdentityHashMap.NULL_OBJECT;
11916 }for(var i=1;i<this.elementData.length;i=i+2){
11917 if(this.elementData[i]===value){
11918 return true;
11919 }}
11920 return false;
11921 },"~O");
11922 Clazz_overrideMethod(c$,"get",
11923 function(key){
11924 if(key==null){
11925 key=java.util.IdentityHashMap.NULL_OBJECT;
11926 }var index=this.findIndex(key,this.elementData);
11927 if(this.elementData[index]===key){
11928 var result=this.elementData[index+1];
11929 return this.massageValue(result);
11930 }return null;
11931 },"~O");
11932 Clazz_defineMethod(c$,"getEntry",
11933 ($fz=function(key){
11934 if(key==null){
11935 key=java.util.IdentityHashMap.NULL_OBJECT;
11936 }var index=this.findIndex(key,this.elementData);
11937 if(this.elementData[index]===key){
11938 return this.getEntry(index);
11939 }return null;
11940 },$fz.isPrivate=true,$fz),"~O");
11941 Clazz_defineMethod(c$,"getEntry",
11942 ($fz=function(index){
11943 var key=this.elementData[index];
11944 var value=this.elementData[index+1];
11945 if(key===java.util.IdentityHashMap.NULL_OBJECT){
11946 key=null;
11947 }if(value===java.util.IdentityHashMap.NULL_OBJECT){
11948 value=null;
11949 }return new java.util.IdentityHashMap.IdentityHashMapEntry(key,value);
11950 },$fz.isPrivate=true,$fz),"~N");
11951 Clazz_defineMethod(c$,"findIndex",
11952 ($fz=function(key,array){
11953 var length=array.length;
11954 var index=this.getModuloHash(key,length);
11955 var last=(index+length-2)%length;
11956 while(index!=last){
11957 if(array[index]===key||(array[index]==null)){
11958 break;
11959 }index=(index+2)%length;
11960 }
11961 return index;
11962 },$fz.isPrivate=true,$fz),"~O,~A");
11963 Clazz_defineMethod(c$,"getModuloHash",
11964 ($fz=function(key,length){
11965 return((System.identityHashCode(key)&0x7FFFFFFF)%(Math.floor(length/2)))*2;
11966 },$fz.isPrivate=true,$fz),"~O,~N");
11967 Clazz_overrideMethod(c$,"put",
11968 function(key,value){
11969 var _key=key;
11970 var _value=value;
11971 if(_key==null){
11972 _key=java.util.IdentityHashMap.NULL_OBJECT;
11973 }if(_value==null){
11974 _value=java.util.IdentityHashMap.NULL_OBJECT;
11975 }var index=this.findIndex(_key,this.elementData);
11976 if(this.elementData[index]!==_key){
11977 this.modCount++;
11978 if(++this.$size>this.threshold){
11979 this.rehash();
11980 index=this.findIndex(_key,this.elementData);
11981 }this.elementData[index]=_key;
11982 this.elementData[index+1]=null;
11983 }var result=this.elementData[index+1];
11984 this.elementData[index+1]=_value;
11985 return this.massageValue(result);
11986 },"~O,~O");
11987 Clazz_overrideMethod(c$,"putAll",
11988 function(map){
11989 this.putAllImpl(map);
11990 },"java.util.Map");
11991 Clazz_defineMethod(c$,"rehash",
11992 ($fz=function(){
11993 var newlength=this.elementData.length<<1;
11994 if(newlength==0){
11995 newlength=1;
11996 }var newData=this.newElementArray(newlength);
11997 for(var i=0;i<this.elementData.length;i=i+2){
11998 var key=this.elementData[i];
11999 if(key!=null){
12000 var index=this.findIndex(key,newData);
12001 newData[index]=key;
12002 newData[index+1]=this.elementData[i+1];
12003 }}
12004 this.elementData=newData;
12005 this.computeMaxSize();
12006 },$fz.isPrivate=true,$fz));
12007 Clazz_defineMethod(c$,"computeMaxSize",
12008 ($fz=function(){
12009 this.threshold=(Math.floor((Math.floor(this.elementData.length/ 2)) * 7500 /10000));
12010 },$fz.isPrivate=true,$fz));
12011 Clazz_overrideMethod(c$,"remove",
12012 function(key){
12013 if(key==null){
12014 key=java.util.IdentityHashMap.NULL_OBJECT;
12015 }var hashedOk;
12016 var index;
12017 var next;
12018 var hash;
12019 var result;
12020 var object;
12021 index=next=this.findIndex(key,this.elementData);
12022 if(this.elementData[index]!==key){
12023 return null;
12024 }result=this.elementData[index+1];
12025 var length=this.elementData.length;
12026 while(true){
12027 next=(next+2)%length;
12028 object=this.elementData[next];
12029 if(object==null){
12030 break;
12031 }hash=this.getModuloHash(object,length);
12032 hashedOk=hash>index;
12033 if(next<index){
12034 hashedOk=hashedOk||(hash<=next);
12035 }else{
12036 hashedOk=hashedOk&&(hash<=next);
12037 }if(!hashedOk){
12038 this.elementData[index]=object;
12039 this.elementData[index+1]=this.elementData[next+1];
12040 index=next;
12041 }}
12042 this.$size--;
12043 this.modCount++;
12044 this.elementData[index]=null;
12045 this.elementData[index+1]=null;
12046 return this.massageValue(result);
12047 },"~O");
12048 Clazz_overrideMethod(c$,"entrySet",
12049 function(){
12050 return new java.util.IdentityHashMap.IdentityHashMapEntrySet(this);
12051 });
12052 Clazz_overrideMethod(c$,"keySet",
12053 function(){
12054 if(this.$keySet==null){
12055 this.$keySet=((Clazz_isClassDefined("java.util.IdentityHashMap$1")?0:java.util.IdentityHashMap.$IdentityHashMap$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$1,this,null));
12056 }return this.$keySet;
12057 });
12058 Clazz_overrideMethod(c$,"values",
12059 function(){
12060 if(this.valuesCollection==null){
12061 this.valuesCollection=((Clazz_isClassDefined("java.util.IdentityHashMap$2")?0:java.util.IdentityHashMap.$IdentityHashMap$2$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$2,this,null));
12062 }return this.valuesCollection;
12063 });
12064 Clazz_overrideMethod(c$,"equals",
12065 function(object){
12066 if(this===object){
12067 return true;
12068 }if(Clazz_instanceOf(object,java.util.Map)){
12069 var map=object;
12070 if(this.size()!=map.size()){
12071 return false;
12072 }var set=this.entrySet();
12073 return set.equals(map.entrySet());
12074 }return false;
12075 },"~O");
12076 Clazz_defineMethod(c$,"clone",
12077 function(){
12078 try{
12079 return Clazz_superCall(this,java.util.IdentityHashMap,"clone",[]);
12080 }catch(e){
12081 if(Clazz_instanceOf(e,CloneNotSupportedException)){
12082 return null;
12083 }else{
12084 throw e;
12085 }
12086 }
12087 });
12088 Clazz_overrideMethod(c$,"isEmpty",
12089 function(){
12090 return this.$size==0;
12091 });
12092 Clazz_overrideMethod(c$,"size",
12093 function(){
12094 return this.$size;
12095 });
12096 Clazz_defineMethod(c$,"putAllImpl",
12097 ($fz=function(map){
12098 if(map.entrySet()!=null){
12099 Clazz_superCall(this,java.util.IdentityHashMap,"putAll",[map]);
12100 }},$fz.isPrivate=true,$fz),"java.util.Map");
12101 c$.$IdentityHashMap$1$=function(){
12102 Clazz_pu$h(self.c$);
12103 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1",java.util.AbstractSet);
12104 Clazz_overrideMethod(c$,"contains",
12105 function(object){
12106 return this.b$["java.util.IdentityHashMap"].containsKey(object);
12107 },"~O");
12108 Clazz_overrideMethod(c$,"size",
12109 function(){
12110 return this.b$["java.util.IdentityHashMap"].size();
12111 });
12112 Clazz_overrideMethod(c$,"clear",
12113 function(){
12114 this.b$["java.util.IdentityHashMap"].clear();
12115 });
12116 Clazz_overrideMethod(c$,"remove",
12117 function(key){
12118 if(this.b$["java.util.IdentityHashMap"].containsKey(key)){
12119 this.b$["java.util.IdentityHashMap"].remove(key);
12120 return true;
12121 }return false;
12122 },"~O");
12123 Clazz_overrideMethod(c$,"iterator",
12124 function(){
12125 return new java.util.IdentityHashMap.IdentityHashMapIterator(((Clazz_isClassDefined("java.util.IdentityHashMap$1$1")?0:java.util.IdentityHashMap.$IdentityHashMap$1$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$1$1,this,null)),this.b$["java.util.IdentityHashMap"]);
12126 });
12127 c$=Clazz_p0p();
12128 };
12129 c$.$IdentityHashMap$1$1$=function(){
12130 Clazz_pu$h(self.c$);
12131 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1$1",null,java.util.MapEntry.Type);
12132 Clazz_overrideMethod(c$,"get",
12133 function(entry){
12134 return entry.key;
12135 },"java.util.MapEntry");
12136 c$=Clazz_p0p();
12137 };
12138 c$.$IdentityHashMap$2$=function(){
12139 Clazz_pu$h(self.c$);
12140 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2",java.util.AbstractCollection);
12141 Clazz_overrideMethod(c$,"contains",
12142 function(object){
12143 return this.b$["java.util.IdentityHashMap"].containsValue(object);
12144 },"~O");
12145 Clazz_overrideMethod(c$,"size",
12146 function(){
12147 return this.b$["java.util.IdentityHashMap"].size();
12148 });
12149 Clazz_overrideMethod(c$,"clear",
12150 function(){
12151 this.b$["java.util.IdentityHashMap"].clear();
12152 });
12153 Clazz_overrideMethod(c$,"iterator",
12154 function(){
12155 return new java.util.IdentityHashMap.IdentityHashMapIterator(((Clazz_isClassDefined("java.util.IdentityHashMap$2$1")?0:java.util.IdentityHashMap.$IdentityHashMap$2$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$2$1,this,null)),this.b$["java.util.IdentityHashMap"]);
12156 });
12157 Clazz_overrideMethod(c$,"remove",
12158 function(object){
12159 var it=this.iterator();
12160 while(it.hasNext()){
12161 if(object===it.next()){
12162 it.remove();
12163 return true;
12164 }}
12165 return false;
12166 },"~O");
12167 c$=Clazz_p0p();
12168 };
12169 c$.$IdentityHashMap$2$1$=function(){
12170 Clazz_pu$h(self.c$);
12171 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2$1",null,java.util.MapEntry.Type);
12172 Clazz_overrideMethod(c$,"get",
12173 function(entry){
12174 return entry.value;
12175 },"java.util.MapEntry");
12176 c$=Clazz_p0p();
12177 };
12178 Clazz_pu$h(self.c$);
12179 c$=Clazz_declareType(java.util.IdentityHashMap,"IdentityHashMapEntry",java.util.MapEntry);
12180 Clazz_overrideMethod(c$,"equals",
12181 function(a){
12182 if(this===a){
12183 return true;
12184 }if(Clazz_instanceOf(a,java.util.Map.Entry)){
12185 var b=a;
12186 return(this.key===b.getKey())&&(this.value===b.getValue());
12187 }return false;
12188 },"~O");
12189 Clazz_overrideMethod(c$,"hashCode",
12190 function(){
12191 return System.identityHashCode(this.key)^System.identityHashCode(this.value);
12192 });
12193 Clazz_overrideMethod(c$,"toString",
12194 function(){
12195 return this.key+"="+this.value;
12196 });
12197 c$=Clazz_p0p();
12198 Clazz_pu$h(self.c$);
12199 c$=Clazz_decorateAsClass(function(){
12200 this.position=0;
12201 this.lastPosition=0;
12202 this.associatedMap=null;
12203 this.expectedModCount=0;
12204 this.type=null;
12205 this.canRemove=false;
12206 Clazz_instantialize(this,arguments);
12207 },java.util.IdentityHashMap,"IdentityHashMapIterator",null,java.util.Iterator);
12208 Clazz_makeConstructor(c$,
12209 function(a,b){
12210 this.associatedMap=b;
12211 this.type=a;
12212 this.expectedModCount=b.modCount;
12213 },"java.util.MapEntry.Type,java.util.IdentityHashMap");
12214 Clazz_overrideMethod(c$,"hasNext",
12215 function(){
12216 while(this.position<this.associatedMap.elementData.length){
12217 if(this.associatedMap.elementData[this.position]==null){
12218 this.position+=2;
12219 }else{
12220 return true;
12221 }}
12222 return false;
12223 });
12224 Clazz_defineMethod(c$,"checkConcurrentMod",
12225 function(){
12226 if(this.expectedModCount!=this.associatedMap.modCount){
12227 throw new java.util.ConcurrentModificationException();
12228 }});
12229 Clazz_overrideMethod(c$,"next",
12230 function(){
12231 this.checkConcurrentMod();
12232 if(!this.hasNext()){
12233 throw new java.util.NoSuchElementException();
12234 }var a=this.associatedMap.getEntry(this.position);
12235 this.lastPosition=this.position;
12236 this.position+=2;
12237 this.canRemove=true;
12238 return this.type.get(a);
12239 });
12240 Clazz_overrideMethod(c$,"remove",
12241 function(){
12242 this.checkConcurrentMod();
12243 if(!this.canRemove){
12244 throw new IllegalStateException();
12245 }this.canRemove=false;
12246 this.associatedMap.remove(this.associatedMap.elementData[this.lastPosition]);
12247 this.position=this.lastPosition;
12248 this.expectedModCount++;
12249 });
12250 c$=Clazz_p0p();
12251 Clazz_pu$h(self.c$);
12252 c$=Clazz_decorateAsClass(function(){
12253 this.associatedMap=null;
12254 Clazz_instantialize(this,arguments);
12255 },java.util.IdentityHashMap,"IdentityHashMapEntrySet",java.util.AbstractSet);
12256 Clazz_makeConstructor(c$,
12257 function(a){
12258 Clazz_superConstructor(this,java.util.IdentityHashMap.IdentityHashMapEntrySet,[]);
12259 this.associatedMap=a;
12260 },"java.util.IdentityHashMap");
12261 Clazz_defineMethod(c$,"hashMap",
12262 function(){
12263 return this.associatedMap;
12264 });
12265 Clazz_overrideMethod(c$,"size",
12266 function(){
12267 return this.associatedMap.$size;
12268 });
12269 Clazz_overrideMethod(c$,"clear",
12270 function(){
12271 this.associatedMap.clear();
12272 });
12273 Clazz_overrideMethod(c$,"remove",
12274 function(a){
12275 if(this.contains(a)){
12276 this.associatedMap.remove((a).getKey());
12277 return true;
12278 }return false;
12279 },"~O");
12280 Clazz_overrideMethod(c$,"contains",
12281 function(a){
12282 if(Clazz_instanceOf(a,java.util.Map.Entry)){
12283 var b=this.associatedMap.getEntry((a).getKey());
12284 return b!=null&&b.equals(a);
12285 }return false;
12286 },"~O");
12287 Clazz_overrideMethod(c$,"iterator",
12288 function(){
12289 return new java.util.IdentityHashMap.IdentityHashMapIterator(((Clazz_isClassDefined("java.util.IdentityHashMap$IdentityHashMapEntrySet$1")?0:java.util.IdentityHashMap.IdentityHashMapEntrySet.$IdentityHashMap$IdentityHashMapEntrySet$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$IdentityHashMapEntrySet$1,this,null)),this.associatedMap);
12290 });
12291 c$.$IdentityHashMap$IdentityHashMapEntrySet$1$=function(){
12292 Clazz_pu$h(self.c$);
12293 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$IdentityHashMapEntrySet$1",null,java.util.MapEntry.Type);
12294 Clazz_overrideMethod(c$,"get",
12295 function(a){
12296 return a;
12297 },"java.util.MapEntry");
12298 c$=Clazz_p0p();
12299 };
12300 c$=Clazz_p0p();
12301 Clazz_defineStatics(c$,
12302 "DEFAULT_MAX_SIZE",21,
12303 "loadFactor",7500);
12304 c$.NULL_OBJECT=c$.prototype.NULL_OBJECT=new Clazz._O();
12305 });
12306 Clazz_load(["java.util.AbstractSet","$.Set"],"java.util.HashSet",["java.util.HashMap"],function(){
12307 c$=Clazz_decorateAsClass(function(){
12308 this.backingMap=null;
12309 Clazz_instantialize(this,arguments);
12310 },java.util,"HashSet",java.util.AbstractSet,[java.util.Set,Cloneable,java.io.Serializable]);
12311
12312
12313 Clazz_makeConstructor(c$,
12314 function(){
12315 this.construct(new java.util.HashMap());
12316 });
12317 Clazz_makeConstructor(c$,
12318 function(capacity){
12319 this.construct(new java.util.HashMap(capacity));
12320 },"~N");
12321 Clazz_makeConstructor(c$,
12322 function(capacity,loadFactor){
12323 this.construct(new java.util.HashMap(capacity,loadFactor));
12324 },"~N,~N");
12325 Clazz_makeConstructor(c$,
12326 function(collection){
12327 this.construct(new java.util.HashMap(collection.size()<6?11:collection.size()*2));
12328 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
12329 this.add(e);
12330 }
12331 },"java.util.Collection");
12332 Clazz_makeConstructor(c$,
12333 function(backingMap){
12334 Clazz_superConstructor(this,java.util.HashSet,[]);
12335 this.backingMap=backingMap;
12336 },"java.util.HashMap");
12337
12338 Clazz_overrideMethod(c$,"add",
12339 function(object){
12340 return this.backingMap.put(object,this)==null;
12341 },"~O");
12342 Clazz_overrideMethod(c$,"clear",
12343 function(){
12344 this.backingMap.clear();
12345 });
12346 Clazz_defineMethod(c$,"clone",
12347 function(){
12348 try{
12349 var clone=this.cloneHM();
12350 clone.backingMap=this.backingMap.clone();
12351 return clone;
12352 }catch(e){
12353 if(Clazz_instanceOf(e,CloneNotSupportedException)){
12354 return null;
12355 }else{
12356 throw e;
12357 }
12358 }
12359 });
12360 Clazz_overrideMethod(c$,"contains",
12361 function(object){
12362 return this.backingMap.containsKey(object);
12363 },"~O");
12364 Clazz_overrideMethod(c$,"isEmpty",
12365 function(){
12366 return this.backingMap.isEmpty();
12367 });
12368 Clazz_defineMethod(c$,"iterator",
12369 function(){
12370 return this.backingMap.keySet().iterator();
12371 });
12372 Clazz_overrideMethod(c$,"remove",
12373 function(object){
12374 return this.backingMap.remove(object)!=null;
12375 },"~O");
12376 Clazz_overrideMethod(c$,"size",
12377 function(){
12378 return this.backingMap.size();
12379 });
12380 Clazz_defineMethod(c$,"createBackingMap",
12381 function(capacity,loadFactor){
12382 return new java.util.HashMap(capacity,loadFactor);
12383 },"~N,~N");
12384 });
12385 Clazz_declarePackage ("jssun.awt");
12386 Clazz_declareInterface (jssun.awt, "ComponentFactory");
12387 Clazz_declarePackage ("jssun.awt");
12388 Clazz_declareInterface (jssun.awt, "WindowClosingListener");
12389 Clazz_declarePackage ("jssun.awt");
12390 Clazz_declareInterface (jssun.awt, "WindowClosingSupport");
12391 Clazz_declarePackage ("java.awt");
12392 Clazz_load (["java.awt.Container", "java.util.ArrayList", "$.Vector", "java.awt.Color"], ["java.awt.Window", "$.FocusManager"], ["java.lang.IllegalArgumentException", "java.util.Arrays", "java.applet.Applet", "java.awt.AWTEventMulticaster", "$.BorderLayout", "$.ComponentOrientation", "$.Cursor", "$.GraphicsEnvironment", "$.Point", "$.Toolkit", "java.awt.event.WindowEvent", "$.WindowFocusListener", "$.WindowListener", "$.WindowStateListener", "java.util.Locale", "$.ResourceBundle", "javax.swing.JComponent", "$.RootPaneContainer", "jssun.awt.AppContext", "swingjs.JSToolkit"], function () {
12393 c$ = Clazz_decorateAsClass (function () {
12394 this.warningString = null;
12395 this.icons = null;
12396 this.temporaryLostComponent = null;
12397 this.syncLWRequests = false;
12398 this.beforeFirstShow = true;
12399 this.state = 0;
12400 this.alwaysOnTop = false;
12401 this.ownedWindowList = null;
12402 this.showWithParent = false;
12403 this.modalBlocker = null;
12404 this.modalExclusionType = null;
12405 this.windowListener = null;
12406 this.windowStateListener = null;
12407 this.windowFocusListener = null;
12408 this.focusableWindowState = true;
12409 this.isInShow = false;
12410 this.opacity = 1.0;
12411 this.shape = null;
12412 this.isTrayIconWindow = false;
12413 this.opaque = true;
12414 Clazz_instantialize (this, arguments);
12415 }, java.awt, "Window", java.awt.Container);
12416 Clazz_prepareFields (c$, function () {
12417 this.ownedWindowList =  new java.util.Vector ();
12418 });
12419 Clazz_makeConstructor (c$, 
12420 function (gc) {
12421 Clazz_superConstructor (this, java.awt.Window, []);
12422 this.init (gc);
12423 }, "java.awt.GraphicsConfiguration");
12424 Clazz_defineMethod (c$, "init", 
12425  function (gc) {
12426 this.syncLWRequests = java.awt.Window.systemSyncLWRequests;
12427 this.addToWindowList ();
12428 this.cursor = java.awt.Cursor.getPredefinedCursor (0);
12429 this.visible = false;
12430 this.setLayout ( new java.awt.BorderLayout ());
12431 this.modalExclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12432 }, "java.awt.GraphicsConfiguration");
12433 Clazz_makeConstructor (c$, 
12434 function () {
12435 Clazz_superConstructor (this, java.awt.Window, []);
12436 this.init (null);
12437 });
12438 Clazz_makeConstructor (c$, 
12439 function (owner) {
12440 Clazz_superConstructor (this, java.awt.Window, []);
12441 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12442 this.ownedInit (owner);
12443 }, "java.awt.Frame");
12444 Clazz_makeConstructor (c$, 
12445 function (owner) {
12446 Clazz_superConstructor (this, java.awt.Window, []);
12447 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12448 this.ownedInit (owner);
12449 }, "java.awt.Window");
12450 Clazz_makeConstructor (c$, 
12451 function (owner, gc) {
12452 this.construct (gc);
12453 this.ownedInit (owner);
12454 }, "java.awt.Window,java.awt.GraphicsConfiguration");
12455 Clazz_defineMethod (c$, "ownedInit", 
12456  function (owner) {
12457 this.parent = owner;
12458 if (owner != null) {
12459 owner.addOwnedWindow (this);
12460 }}, "java.awt.Window");
12461 Clazz_overrideMethod (c$, "constructComponentName", 
12462 function () {
12463 {
12464 return "win" + java.awt.Window.nameCounter++;
12465 }});
12466 Clazz_defineMethod (c$, "getIconImages", 
12467 function () {
12468 var icons = this.icons;
12469 if (icons == null || icons.size () == 0) {
12470 return  new java.util.ArrayList ();
12471 }return  new java.util.ArrayList (icons);
12472 });
12473 Clazz_defineMethod (c$, "setIconImages", 
12474 function (icons) {
12475 this.icons = (icons == null) ?  new java.util.ArrayList () :  new java.util.ArrayList (icons);
12476 this.firePropertyChangeObject ("iconImage", null, null);
12477 }, "java.util.List");
12478 Clazz_defineMethod (c$, "setIconImage", 
12479 function (image) {
12480 var imageList =  new java.util.ArrayList ();
12481 if (image != null) {
12482 imageList.add (image);
12483 }this.setIconImages (imageList);
12484 }, "java.awt.Image");
12485 Clazz_defineMethod (c$, "addNotify", 
12486 function () {
12487 var parent = this.parent;
12488 if (parent != null && parent.getPeer () == null) {
12489 parent.addNotify ();
12490 }if (this.peer == null) {
12491 this.peer = this.getToolkit ().createWindow (this);
12492 }{
12493 java.awt.Window.allWindows.add (this);
12494 }Clazz_superCall (this, java.awt.Window, "addNotify", []);
12495 });
12496 Clazz_defineMethod (c$, "removeNotify", 
12497 function () {
12498 {
12499 java.awt.Window.allWindows.remove (this);
12500 }Clazz_superCall (this, java.awt.Window, "removeNotify", []);
12501 });
12502 Clazz_defineMethod (c$, "pack", 
12503 function () {
12504 var parent = this.parent;
12505 if (parent != null && parent.getPeer () == null) {
12506 parent.addNotify ();
12507 }if (this.peer == null) {
12508 this.addNotify ();
12509 }var newSize = this.getPreferredSize ();
12510 if (this.peer != null) {
12511 this.setClientSize (newSize.width, newSize.height);
12512 }if (this.beforeFirstShow) {
12513 this.isPacked = true;
12514 }this.validate ();
12515 });
12516 Clazz_defineMethod (c$, "setMinimumSize", 
12517 function (minimumSize) {
12518 {
12519 Clazz_superCall (this, java.awt.Window, "setMinimumSize", [minimumSize]);
12520 var size = this.getSize ();
12521 if (this.isMinimumSizeSet ()) {
12522 if (size.width < minimumSize.width || size.height < minimumSize.height) {
12523 var nw = Math.max (this.width, minimumSize.width);
12524 var nh = Math.max (this.height, minimumSize.height);
12525 this.setSize (nw, nh);
12526 }}}}, "java.awt.Dimension");
12527 Clazz_defineMethod (c$, "reshape", 
12528 function (x, y, width, height) {
12529 if (this.isMinimumSizeSet ()) {
12530 var minSize = this.getMinimumSize ();
12531 if (width < minSize.width) {
12532 width = minSize.width;
12533 }if (height < minSize.height) {
12534 height = minSize.height;
12535 }}Clazz_superCall (this, java.awt.Window, "reshape", [x, y, width, height]);
12536 }, "~N,~N,~N,~N");
12537 Clazz_defineMethod (c$, "setClientSize", 
12538 function (w, h) {
12539 {
12540 this.setBounds (this.x, this.y, w, h);
12541 }}, "~N,~N");
12542 c$.closeSplashScreen = Clazz_defineMethod (c$, "closeSplashScreen", 
12543 function () {
12544 });
12545 Clazz_defineMethod (c$, "show", 
12546 function () {
12547 this.validate ();
12548 this.isInShow = true;
12549 if (this.visible) {
12550 this.toFront ();
12551 } else {
12552 this.beforeFirstShow = false;
12553 java.awt.Window.closeSplashScreen ();
12554 Clazz_superCall (this, java.awt.Window, "show", []);
12555 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12556 var child = this.ownedWindowList.elementAt (i);
12557 if ((child != null) && child.showWithParent) {
12558 child.show ();
12559 child.showWithParent = false;
12560 }}
12561 if (!this.isModalBlocked ()) {
12562 this.updateChildrenBlocking ();
12563 } else {
12564 this.modalBlocker.toFront_NoClientCode ();
12565 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
12566 java.awt.Window.updateChildFocusableWindowState (this);
12567 }}this.isInShow = false;
12568 if ((this.state & 1) == 0) {
12569 this.postWindowEvent (200);
12570 this.state |= 1;
12571 }});
12572 c$.updateChildFocusableWindowState = Clazz_defineMethod (c$, "updateChildFocusableWindowState", 
12573 function (w) {
12574 for (var i = 0; i < w.ownedWindowList.size (); i++) {
12575 var child = w.ownedWindowList.elementAt (i);
12576 if (child != null) {
12577 java.awt.Window.updateChildFocusableWindowState (child);
12578 }}
12579 }, "java.awt.Window");
12580 Clazz_defineMethod (c$, "postWindowEvent", 
12581 function (id) {
12582 if (this.windowListener != null || (this.eventMask & 64) != 0 || java.awt.Toolkit.enabledOnToolkit (64)) {
12583 var e =  new java.awt.event.WindowEvent (this, id);
12584 java.awt.Toolkit.getEventQueue ().postEvent (e);
12585 }}, "~N");
12586 Clazz_defineMethod (c$, "hide", 
12587 function () {
12588 {
12589 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12590 var child = this.ownedWindowList.elementAt (i);
12591 if ((child != null) && child.visible) {
12592 child.hide ();
12593 child.showWithParent = true;
12594 }}
12595 }Clazz_superCall (this, java.awt.Window, "hide", []);
12596 });
12597 Clazz_overrideMethod (c$, "clearMostRecentFocusOwnerOnHide", 
12598 function () {
12599 });
12600 Clazz_defineMethod (c$, "dispose", 
12601 function () {
12602 this.doDispose ();
12603 });
12604 Clazz_defineMethod (c$, "disposeImpl", 
12605 function () {
12606 this.dispose ();
12607 });
12608 Clazz_defineMethod (c$, "doDispose", 
12609 function () {
12610 if (!Clazz_isClassDefined ("java.awt.Window$1DisposeAction")) {
12611 java.awt.Window.$Window$1DisposeAction$ ();
12612 }
12613 var action = Clazz_innerTypeInstance (java.awt.Window$1DisposeAction, this, null);
12614 action.run ();
12615 this.postWindowEvent (202);
12616 });
12617 Clazz_overrideMethod (c$, "adjustListeningChildrenOnParent", 
12618 function (mask, num) {
12619 }, "~N,~N");
12620 Clazz_overrideMethod (c$, "adjustDecendantsOnParent", 
12621 function (num) {
12622 }, "~N");
12623 Clazz_defineMethod (c$, "toFront", 
12624 function () {
12625 this.toFront_NoClientCode ();
12626 });
12627 Clazz_defineMethod (c$, "toFront_NoClientCode", 
12628 function () {
12629 if (this.visible) {
12630 }});
12631 Clazz_defineMethod (c$, "toBack", 
12632 function () {
12633 this.toBack_NoClientCode ();
12634 });
12635 Clazz_defineMethod (c$, "toBack_NoClientCode", 
12636 function () {
12637 if (this.isAlwaysOnTop ()) {
12638 try {
12639 this.setAlwaysOnTop (false);
12640 } catch (e) {
12641 if (Clazz_exceptionOf (e, SecurityException)) {
12642 } else {
12643 throw e;
12644 }
12645 }
12646 }if (this.visible) {
12647 }});
12648 Clazz_overrideMethod (c$, "getToolkit", 
12649 function () {
12650 return java.awt.Toolkit.getDefaultToolkit ();
12651 });
12652 Clazz_defineMethod (c$, "getWarningString", 
12653 function () {
12654 return this.warningString;
12655 });
12656 Clazz_overrideMethod (c$, "getLocale", 
12657 function () {
12658 if (this.locale == null) {
12659 return java.util.Locale.getDefault ();
12660 }return this.locale;
12661 });
12662 Clazz_defineMethod (c$, "setCursor", 
12663 function (cursor) {
12664 if (cursor == null) {
12665 cursor = java.awt.Cursor.getPredefinedCursor (0);
12666 }Clazz_superCall (this, java.awt.Window, "setCursor", [cursor]);
12667 }, "java.awt.Cursor");
12668 Clazz_defineMethod (c$, "getOwner", 
12669 function () {
12670 return this.getOwner_NoClientCode ();
12671 });
12672 Clazz_defineMethod (c$, "getOwner_NoClientCode", 
12673 function () {
12674 return this.parent;
12675 });
12676 Clazz_defineMethod (c$, "getOwnedWindows", 
12677 function () {
12678 return this.getOwnedWindows_NoClientCode ();
12679 });
12680 Clazz_defineMethod (c$, "getOwnedWindows_NoClientCode", 
12681 function () {
12682 var realCopy;
12683 {
12684 var fullSize = this.ownedWindowList.size ();
12685 var realSize = 0;
12686 var fullCopy =  new Array (fullSize);
12687 for (var i = 0; i < fullSize; i++) {
12688 fullCopy[realSize] = this.ownedWindowList.elementAt (i);
12689 if (fullCopy[realSize] != null) {
12690 realSize++;
12691 }}
12692 if (fullSize != realSize) {
12693 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12694 } else {
12695 realCopy = fullCopy;
12696 }}return realCopy;
12697 });
12698 Clazz_defineMethod (c$, "isModalBlocked", 
12699 function () {
12700 return this.modalBlocker != null;
12701 });
12702 Clazz_defineMethod (c$, "setModalBlocked", 
12703 function (blocker, blocked, peerCall) {
12704 }, "java.awt.Dialog,~B,~B");
12705 Clazz_defineMethod (c$, "getModalBlocker", 
12706 function () {
12707 return this.modalBlocker;
12708 });
12709 c$.getAllWindows = Clazz_defineMethod (c$, "getAllWindows", 
12710 function () {
12711 {
12712 var v =  new java.util.ArrayList ();
12713 v.addAll (java.awt.Window.allWindows);
12714 return v;
12715 }});
12716 c$.getAllUnblockedWindows = Clazz_defineMethod (c$, "getAllUnblockedWindows", 
12717 function () {
12718 {
12719 var unblocked =  new java.util.ArrayList ();
12720 for (var i = 0; i < java.awt.Window.allWindows.size (); i++) {
12721 var w = java.awt.Window.allWindows.get (i);
12722 if (!w.isModalBlocked ()) {
12723 unblocked.add (w);
12724 }}
12725 return unblocked;
12726 }});
12727 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12728  function (appContext) {
12729 {
12730 var realCopy;
12731 var windowList = appContext.get (java.awt.Window);
12732 if (windowList != null) {
12733 var fullSize = windowList.size ();
12734 var realSize = 0;
12735 var fullCopy =  new Array (fullSize);
12736 for (var i = 0; i < fullSize; i++) {
12737 var w = windowList.get (i);
12738 if (w != null) {
12739 fullCopy[realSize++] = w;
12740 }}
12741 if (fullSize != realSize) {
12742 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12743 } else {
12744 realCopy = fullCopy;
12745 }} else {
12746 realCopy =  new Array (0);
12747 }return realCopy;
12748 }}, "jssun.awt.AppContext");
12749 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12750 function () {
12751 return java.awt.Window.getWindows (jssun.awt.AppContext.getAppContext ());
12752 });
12753 c$.getOwnerlessWindows = Clazz_defineMethod (c$, "getOwnerlessWindows", 
12754 function () {
12755 var allWindows = java.awt.Window.getWindows ();
12756 var ownerlessCount = 0;
12757 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12758 if (w.getOwner () == null) {
12759 ownerlessCount++;
12760 }}
12761 var ownerless =  new Array (ownerlessCount);
12762 var c = 0;
12763 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12764 if (w.getOwner () == null) {
12765 ownerless[c++] = w;
12766 }}
12767 return ownerless;
12768 });
12769 Clazz_defineMethod (c$, "getDocumentRoot", 
12770 function () {
12771 {
12772 var w = this;
12773 while (w.getOwner () != null) {
12774 w = w.getOwner ();
12775 }
12776 return w;
12777 }});
12778 Clazz_defineMethod (c$, "setModalExclusionType", 
12779 function (exclusionType) {
12780 if (exclusionType == null) {
12781 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12782 }if (!java.awt.Toolkit.getDefaultToolkit ().isModalExclusionTypeSupported (exclusionType)) {
12783 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12784 }if (this.modalExclusionType === exclusionType) {
12785 return;
12786 }this.modalExclusionType = exclusionType;
12787 }, "java.awt.Dialog.ModalExclusionType");
12788 Clazz_defineMethod (c$, "getModalExclusionType", 
12789 function () {
12790 return this.modalExclusionType;
12791 });
12792 Clazz_defineMethod (c$, "isModalExcluded", 
12793 function (exclusionType) {
12794 if ((this.modalExclusionType != null) && this.modalExclusionType.compareTo (exclusionType) >= 0) {
12795 return true;
12796 }var owner = this.getOwner_NoClientCode ();
12797 return (owner != null) && owner.isModalExcluded (exclusionType);
12798 }, "java.awt.Dialog.ModalExclusionType");
12799 Clazz_defineMethod (c$, "updateChildrenBlocking", 
12800 function () {
12801 });
12802 Clazz_defineMethod (c$, "addWindowListener", 
12803 function (l) {
12804 if (l == null) {
12805 return;
12806 }this.newEventsOnly = true;
12807 this.windowListener = java.awt.AWTEventMulticaster.add (this.windowListener, l);
12808 }, "java.awt.event.WindowListener");
12809 Clazz_defineMethod (c$, "addWindowStateListener", 
12810 function (l) {
12811 if (l == null) {
12812 return;
12813 }this.windowStateListener = java.awt.AWTEventMulticaster.add (this.windowStateListener, l);
12814 this.newEventsOnly = true;
12815 }, "java.awt.event.WindowStateListener");
12816 Clazz_defineMethod (c$, "addWindowFocusListener", 
12817 function (l) {
12818 if (l == null) {
12819 return;
12820 }this.windowFocusListener = java.awt.AWTEventMulticaster.add (this.windowFocusListener, l);
12821 this.newEventsOnly = true;
12822 }, "java.awt.event.WindowFocusListener");
12823 Clazz_defineMethod (c$, "removeWindowListener", 
12824 function (l) {
12825 if (l == null) {
12826 return;
12827 }this.windowListener = java.awt.AWTEventMulticaster.remove (this.windowListener, l);
12828 }, "java.awt.event.WindowListener");
12829 Clazz_defineMethod (c$, "removeWindowStateListener", 
12830 function (l) {
12831 if (l == null) {
12832 return;
12833 }this.windowStateListener = java.awt.AWTEventMulticaster.remove (this.windowStateListener, l);
12834 }, "java.awt.event.WindowStateListener");
12835 Clazz_defineMethod (c$, "removeWindowFocusListener", 
12836 function (l) {
12837 if (l == null) {
12838 return;
12839 }this.windowFocusListener = java.awt.AWTEventMulticaster.remove (this.windowFocusListener, l);
12840 }, "java.awt.event.WindowFocusListener");
12841 Clazz_defineMethod (c$, "getWindowListeners", 
12842 function () {
12843 return (this.getListeners (java.awt.event.WindowListener));
12844 });
12845 Clazz_defineMethod (c$, "getWindowFocusListeners", 
12846 function () {
12847 return (this.getListeners (java.awt.event.WindowFocusListener));
12848 });
12849 Clazz_defineMethod (c$, "getWindowStateListeners", 
12850 function () {
12851 return (this.getListeners (java.awt.event.WindowStateListener));
12852 });
12853 Clazz_defineMethod (c$, "getListeners", 
12854 function (listenerType) {
12855 var l = null;
12856 if (listenerType === java.awt.event.WindowFocusListener) {
12857 l = this.windowFocusListener;
12858 } else if (listenerType === java.awt.event.WindowStateListener) {
12859 l = this.windowStateListener;
12860 } else if (listenerType === java.awt.event.WindowListener) {
12861 l = this.windowListener;
12862 } else {
12863 return Clazz_superCall (this, java.awt.Window, "getListeners", [listenerType]);
12864 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
12865 }, "Class");
12866 Clazz_defineMethod (c$, "eventEnabled", 
12867 function (e) {
12868 switch (e.id) {
12869 case 200:
12870 case 201:
12871 case 202:
12872 case 203:
12873 case 204:
12874 case 205:
12875 case 206:
12876 if ((this.eventMask & 64) != 0 || this.windowListener != null) {
12877 return true;
12878 }return false;
12879 case 207:
12880 case 208:
12881 if ((this.eventMask & 524288) != 0 || this.windowFocusListener != null) {
12882 return true;
12883 }return false;
12884 case 209:
12885 if ((this.eventMask & 262144) != 0 || this.windowStateListener != null) {
12886 return true;
12887 }return false;
12888 default:
12889 break;
12890 }
12891 return Clazz_superCall (this, java.awt.Window, "eventEnabled", [e]);
12892 }, "java.awt.AWTEvent");
12893 Clazz_overrideMethod (c$, "processEvent", 
12894 function (e) {
12895 if (Clazz_instanceOf (e, java.awt.event.WindowEvent)) {
12896 switch (e.getID ()) {
12897 case 200:
12898 case 201:
12899 case 202:
12900 case 203:
12901 case 204:
12902 case 205:
12903 case 206:
12904 this.processWindowEvent (e);
12905 break;
12906 case 207:
12907 case 208:
12908 this.processWindowFocusEvent (e);
12909 break;
12910 case 209:
12911 this.processWindowStateEvent (e);
12912 default:
12913 break;
12914 }
12915 return;
12916 }this.processEventCont (e);
12917 }, "java.awt.AWTEvent");
12918 Clazz_defineMethod (c$, "processWindowEvent", 
12919 function (e) {
12920 var listener = this.windowListener;
12921 if (listener != null) {
12922 switch (e.getID ()) {
12923 case 200:
12924 listener.windowOpened (e);
12925 break;
12926 case 201:
12927 listener.windowClosing (e);
12928 break;
12929 case 202:
12930 listener.windowClosed (e);
12931 break;
12932 case 203:
12933 listener.windowIconified (e);
12934 break;
12935 case 204:
12936 listener.windowDeiconified (e);
12937 break;
12938 case 205:
12939 listener.windowActivated (e);
12940 break;
12941 case 206:
12942 listener.windowDeactivated (e);
12943 break;
12944 default:
12945 break;
12946 }
12947 }}, "java.awt.event.WindowEvent");
12948 Clazz_defineMethod (c$, "processWindowFocusEvent", 
12949 function (e) {
12950 var listener = this.windowFocusListener;
12951 if (listener != null) {
12952 switch (e.getID ()) {
12953 case 207:
12954 listener.windowGainedFocus (e);
12955 break;
12956 case 208:
12957 listener.windowLostFocus (e);
12958 break;
12959 default:
12960 break;
12961 }
12962 }}, "java.awt.event.WindowEvent");
12963 Clazz_defineMethod (c$, "processWindowStateEvent", 
12964 function (e) {
12965 var listener = this.windowStateListener;
12966 if (listener != null) {
12967 switch (e.getID ()) {
12968 case 209:
12969 listener.windowStateChanged (e);
12970 break;
12971 default:
12972 break;
12973 }
12974 }}, "java.awt.event.WindowEvent");
12975 Clazz_overrideMethod (c$, "preProcessKeyEvent", 
12976 function (e) {
12977 }, "java.awt.event.KeyEvent");
12978 Clazz_overrideMethod (c$, "postProcessKeyEvent", 
12979 function (e) {
12980 }, "java.awt.event.KeyEvent");
12981 Clazz_defineMethod (c$, "setAlwaysOnTop", 
12982 function (alwaysOnTop) {
12983 var oldAlwaysOnTop;
12984 {
12985 oldAlwaysOnTop = this.alwaysOnTop;
12986 this.alwaysOnTop = alwaysOnTop;
12987 }if (oldAlwaysOnTop != alwaysOnTop) {
12988 if (this.isAlwaysOnTopSupported ()) {
12989 }this.firePropertyChangeBool ("alwaysOnTop", oldAlwaysOnTop, alwaysOnTop);
12990 }}, "~B");
12991 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
12992 function () {
12993 return java.awt.Toolkit.getDefaultToolkit ().isAlwaysOnTopSupported ();
12994 });
12995 Clazz_defineMethod (c$, "isAlwaysOnTop", 
12996 function () {
12997 return this.alwaysOnTop;
12998 });
12999 Clazz_defineMethod (c$, "isActive", 
13000 function () {
13001 return false;
13002 });
13003 Clazz_defineMethod (c$, "isFocused", 
13004 function () {
13005 return swingjs.JSToolkit.isFocused (this);
13006 });
13007 Clazz_overrideMethod (c$, "getFocusTraversalKeys", 
13008 function (id) {
13009 return null;
13010 }, "~N");
13011 Clazz_defineMethod (c$, "setFocusCycleRoot", 
13012 function (focusCycleRoot) {
13013 }, "~B");
13014 Clazz_defineMethod (c$, "isFocusCycleRoot", 
13015 function () {
13016 return true;
13017 });
13018 Clazz_overrideMethod (c$, "getFocusCycleRootAncestor", 
13019 function () {
13020 return null;
13021 });
13022 Clazz_defineMethod (c$, "isFocusableWindow", 
13023 function () {
13024 if (!this.getFocusableWindowState ()) {
13025 return false;
13026 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
13027 return true;
13028 }for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
13029 if (Clazz_instanceOf (owner, java.awt.Frame) || Clazz_instanceOf (owner, java.awt.Dialog)) {
13030 return owner.isShowing ();
13031 }}
13032 return false;
13033 });
13034 Clazz_defineMethod (c$, "getFocusableWindowState", 
13035 function () {
13036 return this.focusableWindowState;
13037 });
13038 Clazz_defineMethod (c$, "setFocusableWindowState", 
13039 function (focusableWindowState) {
13040 var oldFocusableWindowState;
13041 {
13042 oldFocusableWindowState = this.focusableWindowState;
13043 this.focusableWindowState = focusableWindowState;
13044 }this.firePropertyChangeBool ("focusableWindowState", oldFocusableWindowState, focusableWindowState);
13045 if (oldFocusableWindowState && !focusableWindowState && this.isFocused ()) {
13046 for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
13047 }
13048 }}, "~B");
13049 Clazz_defineMethod (c$, "dispatchEventImpl", 
13050 function (e) {
13051 if (e.getID () == 101) {
13052 this.invalidate ();
13053 this.validate ();
13054 }Clazz_superCall (this, java.awt.Window, "dispatchEventImpl", [e]);
13055 }, "java.awt.AWTEvent");
13056 Clazz_overrideMethod (c$, "postEvent", 
13057 function (e) {
13058 if (this.handleEvent (e)) {
13059 e.consume ();
13060 return true;
13061 }return false;
13062 }, "java.awt.Event");
13063 Clazz_defineMethod (c$, "isShowing", 
13064 function () {
13065 return this.visible;
13066 });
13067 Clazz_defineMethod (c$, "applyResourceBundle", 
13068 function (rb) {
13069 this.applyComponentOrientation (java.awt.ComponentOrientation.getOrientation (rb));
13070 }, "java.util.ResourceBundle");
13071 Clazz_defineMethod (c$, "applyResourceBundle", 
13072 function (rbName) {
13073 this.applyResourceBundle (java.util.ResourceBundle.getBundle (rbName));
13074 }, "~S");
13075 Clazz_defineMethod (c$, "addOwnedWindow", 
13076 function (weakWindow) {
13077 if (weakWindow != null) {
13078 {
13079 if (!this.ownedWindowList.contains (weakWindow)) {
13080 this.ownedWindowList.addElement (weakWindow);
13081 }}}}, "java.awt.Window");
13082 Clazz_defineMethod (c$, "removeOwnedWindow", 
13083 function (weakWindow) {
13084 if (weakWindow != null) {
13085 this.ownedWindowList.removeElement (weakWindow);
13086 }}, "java.awt.Window");
13087 Clazz_defineMethod (c$, "connectOwnedWindow", 
13088 function (child) {
13089 child.parent = this;
13090 this.addOwnedWindow (child);
13091 }, "java.awt.Window");
13092 Clazz_defineMethod (c$, "addToWindowList", 
13093  function () {
13094 var windowList = this.appContext.get (java.awt.Window);
13095 if (windowList == null) {
13096 windowList =  new java.util.Vector ();
13097 this.appContext.put (java.awt.Window, windowList);
13098 }windowList.add (this);
13099 });
13100 c$.removeFromWindowList = Clazz_defineMethod (c$, "removeFromWindowList", 
13101  function (context, w) {
13102 {
13103 var windowList = context.get (java.awt.Window);
13104 if (windowList != null) {
13105 windowList.remove (w);
13106 }}}, "jssun.awt.AppContext,java.awt.Window");
13107 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
13108 function () {
13109 if (this.graphicsConfig == null) this.graphicsConfig = swingjs.JSToolkit.getGraphicsConfiguration ();
13110 return this.graphicsConfig;
13111 });
13112 Clazz_overrideMethod (c$, "resetGC", 
13113 function () {
13114 });
13115 Clazz_defineMethod (c$, "setLocationRelativeTo", 
13116 function (c) {
13117 var root = null;
13118 if (c != null) {
13119 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) {
13120 root = c;
13121 } else {
13122 var parent;
13123 for (parent = c.getParent (); parent != null; parent = parent.getParent ()) {
13124 if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
13125 root = parent;
13126 break;
13127 }}
13128 }}if ((c != null && !c.isShowing ()) || root == null || !root.isShowing ()) {
13129 var paneSize = this.getSize ();
13130 var centerPoint = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getCenterPoint ();
13131 this.setLocation (centerPoint.x - Clazz_doubleToInt (paneSize.width / 2), centerPoint.y - Clazz_doubleToInt (paneSize.height / 2));
13132 } else {
13133 var invokerSize = c.getSize ();
13134 var invokerScreenLocation = c.getLocationOnScreen ();
13135 var windowBounds = this.getBounds ();
13136 var dx = invokerScreenLocation.x + ((invokerSize.width - windowBounds.width) >> 1);
13137 var dy = invokerScreenLocation.y + ((invokerSize.height - windowBounds.height) >> 1);
13138 var ss = root.getGraphicsConfiguration ().getBounds ();
13139 if (dy + windowBounds.height > ss.y + ss.height) {
13140 dy = ss.y + ss.height - windowBounds.height;
13141 if (invokerScreenLocation.x - ss.x + Clazz_doubleToInt (invokerSize.width / 2) < Clazz_doubleToInt (ss.width / 2)) {
13142 dx = invokerScreenLocation.x + invokerSize.width;
13143 } else {
13144 dx = invokerScreenLocation.x - windowBounds.width;
13145 }}if (dx + windowBounds.width > ss.x + ss.width) {
13146 dx = ss.x + ss.width - windowBounds.width;
13147 }if (dx < ss.x) dx = ss.x;
13148 if (dy < ss.y) dy = ss.y;
13149 this.setLocation (dx, dy);
13150 }}, "java.awt.Component");
13151 Clazz_defineMethod (c$, "deliverMouseWheelToAncestor", 
13152 function (e) {
13153 }, "java.awt.event.MouseWheelEvent");
13154 Clazz_overrideMethod (c$, "dispatchMouseWheelToAncestor", 
13155 function (e) {
13156 return false;
13157 }, "java.awt.event.MouseWheelEvent");
13158 Clazz_defineMethod (c$, "getTemporaryLostComponent", 
13159 function () {
13160 return this.temporaryLostComponent;
13161 });
13162 Clazz_defineMethod (c$, "setTemporaryLostComponent", 
13163 function (component) {
13164 var previousComp = this.temporaryLostComponent;
13165 if (component == null || component.canBeFocusOwner ()) {
13166 this.temporaryLostComponent = component;
13167 } else {
13168 this.temporaryLostComponent = null;
13169 }return previousComp;
13170 }, "java.awt.Component");
13171 Clazz_defineMethod (c$, "canContainFocusOwner", 
13172 function (focusOwnerCandidate) {
13173 return Clazz_superCall (this, java.awt.Window, "canContainFocusOwner", [focusOwnerCandidate]) && this.isFocusableWindow ();
13174 }, "java.awt.Component");
13175 Clazz_defineMethod (c$, "setBounds", 
13176 function (r) {
13177 this.setBounds (r.x, r.y, r.width, r.height);
13178 }, "java.awt.Rectangle");
13179 Clazz_overrideMethod (c$, "isRecursivelyVisible", 
13180 function () {
13181 return this.visible;
13182 });
13183 Clazz_defineMethod (c$, "getOpacity", 
13184 function () {
13185 {
13186 return this.opacity;
13187 }});
13188 Clazz_defineMethod (c$, "setOpacity", 
13189 function (opacity) {
13190 {
13191 if (opacity < 0.0 || opacity > 1.0) {
13192 throw  new IllegalArgumentException ("The value of opacity should be in the range [0.0f .. 1.0f].");
13193 }this.opacity = opacity;
13194 }}, "~N");
13195 Clazz_defineMethod (c$, "getShape", 
13196 function () {
13197 {
13198 return this.shape;
13199 }});
13200 Clazz_defineMethod (c$, "setShape", 
13201 function (shape) {
13202 {
13203 this.shape = shape;
13204 }}, "java.awt.Shape");
13205 Clazz_defineMethod (c$, "setOpaque", 
13206 function (opaque) {
13207 {
13208 java.awt.Window.setLayersOpaque (this, opaque);
13209 this.opaque = opaque;
13210 var peer = this.getPeer ();
13211 if (peer != null) {
13212 peer.setOpaque (opaque);
13213 }}}, "~B");
13214 c$.setLayersOpaque = Clazz_defineMethod (c$, "setLayersOpaque", 
13215  function (component, isOpaque) {
13216 if (Clazz_instanceOf (component, javax.swing.RootPaneContainer)) {
13217 var rpc = component;
13218 var root = rpc.getRootPane ();
13219 var lp = root.getLayeredPane ();
13220 var c = root.getContentPane ();
13221 var content = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
13222 lp.setOpaque (isOpaque);
13223 root.setOpaque (isOpaque);
13224 root.setDoubleBuffered (isOpaque);
13225 if (content != null) {
13226 content.setOpaque (isOpaque);
13227 content.setDoubleBuffered (isOpaque);
13228 var numChildren = content.getComponentCount ();
13229 if (numChildren > 0) {
13230 var child = content.getComponent (0);
13231 if (Clazz_instanceOf (child, javax.swing.RootPaneContainer)) {
13232 java.awt.Window.setLayersOpaque (child, isOpaque);
13233 }}}}var bg = component.getBackground ();
13234 var hasTransparentBg = java.awt.Window.TRANSPARENT_BACKGROUND_COLOR.equals (bg);
13235 var container = null;
13236 if (Clazz_instanceOf (component, java.awt.Container)) {
13237 container = component;
13238 }if (isOpaque) {
13239 if (hasTransparentBg) {
13240 var newColor = null;
13241 if (container != null && container.preserveBackgroundColor != null) {
13242 newColor = container.preserveBackgroundColor;
13243 } else {
13244 newColor =  new java.awt.Color (255, 255, 255);
13245 }component.setBackground (newColor);
13246 }} else {
13247 if (!hasTransparentBg && container != null) {
13248 container.preserveBackgroundColor = bg;
13249 }component.setBackground (java.awt.Window.TRANSPARENT_BACKGROUND_COLOR);
13250 }}, "java.awt.Component,~B");
13251 Clazz_overrideMethod (c$, "getContainer", 
13252 function () {
13253 return null;
13254 });
13255 Clazz_overrideMethod (c$, "mixOnReshaping", 
13256 function () {
13257 });
13258 Clazz_overrideMethod (c$, "getLocationOnWindow", 
13259 function () {
13260 return  new java.awt.Point (0, 0);
13261 });
13262 c$.$Window$1DisposeAction$ = function () {
13263 Clazz_pu$h(self.c$);
13264 c$ = Clazz_decorateAsClass (function () {
13265 Clazz_prepareCallback (this, arguments);
13266 Clazz_instantialize (this, arguments);
13267 }, java.awt, "Window$1DisposeAction", null, Runnable);
13268 Clazz_overrideMethod (c$, "run", 
13269 function () {
13270 var a;
13271 {
13272 a =  new Array (this.b$["java.awt.Window"].ownedWindowList.size ());
13273 this.b$["java.awt.Window"].ownedWindowList.copyInto (a);
13274 }for (var b = 0; b < a.length; b++) {
13275 var c = (((a[b])));
13276 if (c != null) {
13277 c.disposeImpl ();
13278 }}
13279 this.b$["java.awt.Window"].hide ();
13280 this.b$["java.awt.Window"].beforeFirstShow = true;
13281 this.b$["java.awt.Window"].removeNotify ();
13282 this.b$["java.awt.Window"].clearCurrentFocusCycleRootOnHide ();
13283 });
13284 c$ = Clazz_p0p ();
13285 };
13286 Clazz_defineStatics (c$,
13287 "systemSyncLWRequests", false,
13288 "OPENED", 0x01,
13289 "base", "win",
13290 "nameCounter", 0);
13291 c$.allWindows = c$.prototype.allWindows =  new java.util.ArrayList ();
13292 c$.TRANSPARENT_BACKGROUND_COLOR = c$.prototype.TRANSPARENT_BACKGROUND_COLOR =  new java.awt.Color (0, 0, 0, 0);
13293 c$ = Clazz_decorateAsClass (function () {
13294 this.focusRoot = null;
13295 this.focusOwner = null;
13296 Clazz_instantialize (this, arguments);
13297 }, java.awt, "FocusManager");
13298 });
13299 Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.Vector",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringBuffer","java.lang.reflect.Array","java.util.Arrays","$.Collections","$.Enumeration","$.NoSuchElementException"],function(){
13300 c$=Clazz_decorateAsClass(function(){
13301 this.elementCount=0;
13302 this.elementData=null;
13303 this.capacityIncrement=0;
13304 Clazz_instantialize(this,arguments);
13305 },java.util,"Vector",java.util.AbstractList,[java.util.List,java.util.RandomAccess,Cloneable,java.io.Serializable]);
13306 Clazz_makeConstructor(c$,
13307 function(){
13308 this.construct(10,0);
13309 });
13310 Clazz_makeConstructor(c$,
13311 function(capacity){
13312 this.construct(capacity,0);
13313 },"~N");
13314 Clazz_makeConstructor(c$,
13315 function(capacity,capacityIncrement){
13316 Clazz_superConstructor(this,java.util.Vector,[]);
13317 this.elementCount=0;
13318 try{
13319 this.elementData=this.newElementArray(capacity);
13320 }catch(e){
13321 if(Clazz_instanceOf(e,NegativeArraySizeException)){
13322 throw new IllegalArgumentException();
13323 }else{
13324 throw e;
13325 }
13326 }
13327 this.capacityIncrement=capacityIncrement;
13328 },"~N,~N");
13329 Clazz_makeConstructor(c$,
13330 function(collection){
13331 this.construct(collection.size(),0);
13332 var it=collection.iterator();
13333 while(it.hasNext()){
13334 this.elementData[this.elementCount++]=it.next();
13335 }
13336 },"java.util.Collection");
13337 Clazz_defineMethod(c$,"newElementArray",
13338 ($fz=function(size){
13339 return new Array(size);
13340 },$fz.isPrivate=true,$fz),"~N");
13341 Clazz_defineMethod(c$,"add",
13342 function(location,object){
13343 this.insertElementAt(object,location);
13344 },"~N,~O");
13345 Clazz_defineMethod(c$,"add",
13346 function(object){
13347 this.addElement(object);
13348 return true;
13349 },"~O");
13350 Clazz_defineMethod(c$,"addAll",
13351 function(location,collection){
13352 if(0<=location&&location<=this.elementCount){
13353 var size=collection.size();
13354 if(size==0){
13355 return false;
13356 }var required=size-(this.elementData.length-this.elementCount);
13357 if(required>0){
13358 this.growBy(required);
13359 }var count=this.elementCount-location;
13360 if(count>0){
13361 System.arraycopy(this.elementData,location,this.elementData,location+size,count);
13362 }var it=collection.iterator();
13363 while(it.hasNext()){
13364 this.elementData[location++]=it.next();
13365 }
13366 this.elementCount+=size;
13367 this.modCount++;
13368 return true;
13369 }throw new ArrayIndexOutOfBoundsException(location);
13370 },"~N,java.util.Collection");
13371 Clazz_defineMethod(c$,"addAll",
13372 function(collection){
13373 return this.addAll(this.elementCount,collection);
13374 },"java.util.Collection");
13375 Clazz_defineMethod(c$,"addElement",
13376 function(object){
13377 if(this.elementCount==this.elementData.length){
13378 this.growByOne();
13379 }this.elementData[this.elementCount++]=object;
13380 this.modCount++;
13381 },"~O");
13382 Clazz_defineMethod(c$,"capacity",
13383 function(){
13384 return this.elementData.length;
13385 });
13386 Clazz_overrideMethod(c$,"clear",
13387 function(){
13388 this.removeAllElements();
13389 });
13390 Clazz_defineMethod(c$,"clone",
13391 function(){
13392 try{
13393 var vector=Clazz_superCall(this,java.util.Vector,"clone",[]);
13394 vector.elementData=this.elementData.clone();
13395 return vector;
13396 }catch(e){
13397 if(Clazz_instanceOf(e,CloneNotSupportedException)){
13398 return null;
13399 }else{
13400 throw e;
13401 }
13402 }
13403 });
13404 Clazz_overrideMethod(c$,"contains",
13405 function(object){
13406 return this.indexOf(object,0)!=-1;
13407 },"~O");
13408 Clazz_defineMethod(c$,"copyInto",
13409 function(elements){
13410 System.arraycopy(this.elementData,0,elements,0,this.elementCount);
13411 },"~A");
13412 Clazz_defineMethod(c$,"elementAt",
13413 function(location){
13414 if(location<this.elementCount){
13415 return this.elementData[location];
13416 }throw new ArrayIndexOutOfBoundsException(location);
13417 },"~N");
13418 Clazz_defineMethod(c$,"elements",
13419 function(){
13420 return((Clazz_isClassDefined("java.util.Vector$1")?0:java.util.Vector.$Vector$1$()),Clazz_innerTypeInstance(java.util.Vector$1,this,null));
13421 });
13422 Clazz_defineMethod(c$,"ensureCapacity",
13423 function(minimumCapacity){
13424 if(this.elementData.length<minimumCapacity){
13425 var next=(this.capacityIncrement<=0?this.elementData.length:this.capacityIncrement)+this.elementData.length;
13426 this.grow(minimumCapacity>next?minimumCapacity:next);
13427 }},"~N");
13428 Clazz_overrideMethod(c$,"equals",
13429 function(object){
13430 if(this===object){
13431 return true;
13432 }if(Clazz_instanceOf(object,java.util.List)){
13433 var list=object;
13434 if(list.size()!=this.size()){
13435 return false;
13436 }var index=0;
13437 var it=list.iterator();
13438 while(it.hasNext()){
13439 var e1=this.elementData[index++];
13440 var e2=it.next();
13441 if(!(e1==null?e2==null:e1.equals(e2))){
13442 return false;
13443 }}
13444 return true;
13445 }return false;
13446 },"~O");
13447 Clazz_defineMethod(c$,"firstElement",
13448 function(){
13449 if(this.elementCount>0){
13450 return this.elementData[0];
13451 }throw new java.util.NoSuchElementException();
13452 });
13453 Clazz_overrideMethod(c$,"get",
13454 function(location){
13455 return this.elementAt(location);
13456 },"~N");
13457 Clazz_defineMethod(c$,"grow",
13458 ($fz=function(newCapacity){
13459 var newData=this.newElementArray(newCapacity);
13460 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13461 this.elementData=newData;
13462 },$fz.isPrivate=true,$fz),"~N");
13463 Clazz_defineMethod(c$,"growByOne",
13464 ($fz=function(){
13465 var adding=0;
13466 if(this.capacityIncrement<=0){
13467 if((adding=this.elementData.length)==0){
13468 adding=1;
13469 }}else{
13470 adding=this.capacityIncrement;
13471 }var newData=this.newElementArray(this.elementData.length+adding);
13472 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13473 this.elementData=newData;
13474 },$fz.isPrivate=true,$fz));
13475 Clazz_defineMethod(c$,"growBy",
13476 ($fz=function(required){
13477 var adding=0;
13478 if(this.capacityIncrement<=0){
13479 if((adding=this.elementData.length)==0){
13480 adding=required;
13481 }while(adding<required){
13482 adding+=adding;
13483 }
13484 }else{
13485 adding=(Math.floor(required/this.capacityIncrement))*this.capacityIncrement;
13486 if(adding<required){
13487 adding+=this.capacityIncrement;
13488 }}var newData=this.newElementArray(this.elementData.length+adding);
13489 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13490 this.elementData=newData;
13491 },$fz.isPrivate=true,$fz),"~N");
13492 Clazz_overrideMethod(c$,"hashCode",
13493 function(){
13494 var result=1;
13495 for(var i=0;i<this.elementCount;i++){
13496 result=(31*result)+(this.elementData[i]==null?0:this.elementData[i].hashCode());
13497 }
13498 return result;
13499 });
13500 Clazz_defineMethod(c$,"indexOf",
13501 function(object){
13502 return this.indexOf(object,0);
13503 },"~O");
13504 Clazz_defineMethod(c$,"indexOf",
13505 function(object,location){
13506 if(object!=null){
13507 for(var i=location;i<this.elementCount;i++){
13508 if(object.equals(this.elementData[i])){
13509 return i;
13510 }}
13511 }else{
13512 for(var i=location;i<this.elementCount;i++){
13513 if(this.elementData[i]==null){
13514 return i;
13515 }}
13516 }return-1;
13517 },"~O,~N");
13518 Clazz_defineMethod(c$,"insertElementAt",
13519 function(object,location){
13520 if(0<=location&&location<=this.elementCount){
13521 if(this.elementCount==this.elementData.length){
13522 this.growByOne();
13523 }var count=this.elementCount-location;
13524 if(count>0){
13525 System.arraycopy(this.elementData,location,this.elementData,location+1,count);
13526 }this.elementData[location]=object;
13527 this.elementCount++;
13528 this.modCount++;
13529 }else{
13530 throw new ArrayIndexOutOfBoundsException(location);
13531 }},"~O,~N");
13532 Clazz_overrideMethod(c$,"isEmpty",
13533 function(){
13534 return this.elementCount==0;
13535 });
13536 Clazz_defineMethod(c$,"lastElement",
13537 function(){
13538 try{
13539 return this.elementData[this.elementCount-1];
13540 }catch(e){
13541 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
13542 throw new java.util.NoSuchElementException();
13543 }else{
13544 throw e;
13545 }
13546 }
13547 });
13548 Clazz_defineMethod(c$,"lastIndexOf",
13549 function(object){
13550 return this.lastIndexOf(object,this.elementCount-1);
13551 },"~O");
13552 Clazz_defineMethod(c$,"lastIndexOf",
13553 function(object,location){
13554 if(location<this.elementCount){
13555 if(object!=null){
13556 for(var i=location;i>=0;i--){
13557 if(object.equals(this.elementData[i])){
13558 return i;
13559 }}
13560 }else{
13561 for(var i=location;i>=0;i--){
13562 if(this.elementData[i]==null){
13563 return i;
13564 }}
13565 }return-1;
13566 }throw new ArrayIndexOutOfBoundsException(location);
13567 },"~O,~N");
13568 Clazz_defineMethod(c$,"remove",
13569 function(location){
13570 if(location<this.elementCount){
13571 var result=this.elementData[location];
13572 this.elementCount--;
13573 var size=this.elementCount-location;
13574 if(size>0){
13575 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13576 }this.elementData[this.elementCount]=null;
13577 this.modCount++;
13578 return result;
13579 }throw new ArrayIndexOutOfBoundsException(location);
13580 },"~N");
13581 Clazz_defineMethod(c$,"remove",
13582 function(object){
13583 return this.removeElement(object);
13584 },"~O");
13585 Clazz_defineMethod(c$,"removeAllElements",
13586 function(){
13587 java.util.Arrays.fill(this.elementData,0,this.elementCount,null);
13588 this.modCount++;
13589 this.elementCount=0;
13590 });
13591 Clazz_defineMethod(c$,"removeElement",
13592 function(object){
13593 var index;
13594 if((index=this.indexOf(object,0))==-1){
13595 return false;
13596 }this.removeElementAt(index);
13597 return true;
13598 },"~O");
13599 Clazz_defineMethod(c$,"removeElementAt",
13600 function(location){
13601 if(0<=location&&location<this.elementCount){
13602 this.elementCount--;
13603 var size=this.elementCount-location;
13604 if(size>0){
13605 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13606 }this.elementData[this.elementCount]=null;
13607 this.modCount++;
13608 }else{
13609 throw new ArrayIndexOutOfBoundsException(location);
13610 }},"~N");
13611 Clazz_overrideMethod(c$,"removeRange",
13612 function(start,end){
13613 if(start>=0&&start<=end&&end<=this.size()){
13614 if(start==end){
13615 return;
13616 }if(end!=this.elementCount){
13617 System.arraycopy(this.elementData,end,this.elementData,start,this.elementCount-end);
13618 var newCount=this.elementCount-(end-start);
13619 java.util.Arrays.fill(this.elementData,newCount,this.elementCount,null);
13620 this.elementCount=newCount;
13621 }else{
13622 java.util.Arrays.fill(this.elementData,start,this.elementCount,null);
13623 this.elementCount=start;
13624 }this.modCount++;
13625 }else{
13626 throw new IndexOutOfBoundsException();
13627 }},"~N,~N");
13628 Clazz_overrideMethod(c$,"set",
13629 function(location,object){
13630 if(location<this.elementCount){
13631 var result=this.elementData[location];
13632 this.elementData[location]=object;
13633 return result;
13634 }throw new ArrayIndexOutOfBoundsException(location);
13635 },"~N,~O");
13636 Clazz_defineMethod(c$,"setElementAt",
13637 function(object,location){
13638 if(location<this.elementCount){
13639 this.elementData[location]=object;
13640 }else{
13641 throw new ArrayIndexOutOfBoundsException(location);
13642 }},"~O,~N");
13643 Clazz_defineMethod(c$,"setSize",
13644 function(length){
13645 if(length==this.elementCount){
13646 return;
13647 }this.ensureCapacity(length);
13648 if(this.elementCount>length){
13649 java.util.Arrays.fill(this.elementData,length,this.elementCount,null);
13650 }this.elementCount=length;
13651 this.modCount++;
13652 },"~N");
13653 Clazz_overrideMethod(c$,"size",
13654 function(){
13655 return this.elementCount;
13656 });
13657 Clazz_overrideMethod(c$,"subList",
13658 function(start,end){
13659 return new java.util.Collections.SynchronizedRandomAccessList(Clazz_superCall(this,java.util.Vector,"subList",[start,end]),this);
13660 },"~N,~N");
13661 Clazz_defineMethod(c$,"toArray",
13662 function(){
13663 var result=new Array(this.elementCount);
13664 System.arraycopy(this.elementData,0,result,0,this.elementCount);
13665 return result;
13666 });
13667 Clazz_defineMethod(c$,"toArray",
13668 function(contents){
13669 if(this.elementCount>contents.length){
13670 var ct=contents.getClass().getComponentType();
13671 contents=java.lang.reflect.Array.newInstance(ct,this.elementCount);
13672 }System.arraycopy(this.elementData,0,contents,0,this.elementCount);
13673 if(this.elementCount<contents.length){
13674 contents[this.elementCount]=null;
13675 }return contents;
13676 },"~A");
13677 Clazz_overrideMethod(c$,"toString",
13678 function(){
13679 if(this.elementCount==0){
13680 return"[]";
13681 }var length=this.elementCount-1;
13682 var buffer=new StringBuffer(this.size()*16);
13683 buffer.append('[');
13684 for(var i=0;i<length;i++){
13685 if(this.elementData[i]===this){
13686 buffer.append("(this Collection)");
13687 }else{
13688 buffer.append(this.elementData[i]);
13689 }buffer.append(", ");
13690 }
13691 if(this.elementData[length]===this){
13692 buffer.append("(this Collection)");
13693 }else{
13694 buffer.append(this.elementData[length]);
13695 }buffer.append(']');
13696 return buffer.toString();
13697 });
13698 Clazz_defineMethod(c$,"trimToSize",
13699 function(){
13700 if(this.elementData.length!=this.elementCount){
13701 this.grow(this.elementCount);
13702 }});
13703 c$.$Vector$1$=function(){
13704 Clazz_pu$h(self.c$);
13705 c$=Clazz_decorateAsClass(function(){
13706 Clazz_prepareCallback(this,arguments);
13707 this.pos=0;
13708 Clazz_instantialize(this,arguments);
13709 },java.util,"Vector$1",null,java.util.Enumeration);
13710 Clazz_overrideMethod(c$,"hasMoreElements",
13711 function(){
13712 return this.pos<this.b$["java.util.Vector"].elementCount;
13713 });
13714 Clazz_overrideMethod(c$,"nextElement",
13715 function(){
13716 {
13717 if(this.pos<this.b$["java.util.Vector"].elementCount){
13718 return this.b$["java.util.Vector"].elementData[this.pos++];
13719 }}throw new java.util.NoSuchElementException();
13720 });
13721 c$=Clazz_p0p();
13722 };
13723 Clazz_defineStatics(c$,
13724 "DEFAULT_SIZE",10);
13725 });
13726 Clazz_declarePackage ("java.awt");
13727 Clazz_load (["java.awt.Paint"], "java.awt.Color", ["java.lang.IllegalArgumentException", "java.awt.ColorPaintContext"], function () {
13728 c$ = Clazz_decorateAsClass (function () {
13729 this.value = 0;
13730 this.frgbvalue = null;
13731 this.falpha = 0.0;
13732 this.context = null;
13733 Clazz_instantialize (this, arguments);
13734 }, java.awt, "Color", null, java.awt.Paint);
13735 c$.testColorValueRange = Clazz_defineMethod (c$, "testColorValueRange", 
13736  function (r, g, b, a) {
13737 var rangeError = false;
13738 var badComponentString = "";
13739 if (a < 0 || a > 255) {
13740 rangeError = true;
13741 badComponentString = badComponentString + " Alpha";
13742 }if (r < 0 || r > 255) {
13743 rangeError = true;
13744 badComponentString = badComponentString + " Red";
13745 }if (g < 0 || g > 255) {
13746 rangeError = true;
13747 badComponentString = badComponentString + " Green";
13748 }if (b < 0 || b > 255) {
13749 rangeError = true;
13750 badComponentString = badComponentString + " Blue";
13751 }if (rangeError == true) {
13752 throw  new IllegalArgumentException ("Color parameter outside of expected range:" + badComponentString);
13753 }}, "~N,~N,~N,~N");
13754 Clazz_makeConstructor (c$, 
13755 function () {
13756 {
13757 var a = arguments;
13758 switch(a.length) {
13759 case 0:
13760 break;
13761 case 1:
13762 this.value = (a[0].value ? a[0].value : 0xff000000 | a[0]);
13763 break;
13764 case 2:
13765 this.value = (a[1] ? a[0] : 0xff000000 | a[0]);
13766 break;
13767 case 3:
13768 var n = a[0] + a[1] + a[2];
13769 if (n > 0 && n < 3.001)
13770 this.setFloat(a[0], a[1], a[2], 1);
13771 else
13772 this.setColor4(a[0], a[1], a[2], 255);
13773 break;
13774 case 4:
13775 var n = a[0] + a[1] + a[2] + a[3];
13776 if (n > 0 && n < 4.001)
13777 this.setFloat(a[0], a[1], a[2], a[3]);
13778 else
13779 this.setColor4(a[0], a[1], a[2], a[3]);
13780 break;
13781 }
13782 return this;
13783 }});
13784 Clazz_defineMethod (c$, "setColor4", 
13785  function (r, g, b, a) {
13786 this.value = ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0);
13787 java.awt.Color.testColorValueRange (r, g, b, a);
13788 }, "~N,~N,~N,~N");
13789 Clazz_defineMethod (c$, "setFloat", 
13790  function (r, g, b, f) {
13791 this.setColor4 (Clazz_doubleToInt (r * 255 + 0.5), Clazz_doubleToInt (g * 255 + 0.5), Clazz_doubleToInt (b * 255 + 0.5), Clazz_doubleToInt (f * 255 + 0.5));
13792 this.frgbvalue =  Clazz_newFloatArray (3, 0);
13793 this.frgbvalue[0] = r;
13794 this.frgbvalue[1] = g;
13795 this.frgbvalue[2] = b;
13796 this.falpha = f;
13797 }, "~N,~N,~N,~N");
13798 c$.getColorF4 = Clazz_defineMethod (c$, "getColorF4", 
13799 function (r, g, b, a) {
13800 var c =  new java.awt.Color ();
13801 c.setFloat (r, g, b, a);
13802 return c;
13803 }, "~N,~N,~N,~N");
13804 Clazz_defineMethod (c$, "getRed", 
13805 function () {
13806 return (this.getRGB () >> 16) & 0xFF;
13807 });
13808 Clazz_defineMethod (c$, "getGreen", 
13809 function () {
13810 return (this.getRGB () >> 8) & 0xFF;
13811 });
13812 Clazz_defineMethod (c$, "getBlue", 
13813 function () {
13814 return (this.getRGB () >> 0) & 0xFF;
13815 });
13816 Clazz_defineMethod (c$, "getAlpha", 
13817 function () {
13818 return (this.getRGB () >> 24) & 0xff;
13819 });
13820 Clazz_defineMethod (c$, "getRGB", 
13821 function () {
13822 return this.value;
13823 });
13824 Clazz_defineMethod (c$, "brighter", 
13825 function () {
13826 var r = this.getRed ();
13827 var g = this.getGreen ();
13828 var b = this.getBlue ();
13829 var i = Clazz_doubleToInt (3.333333333333333);
13830 if (r == 0 && g == 0 && b == 0) {
13831 return  new java.awt.Color (i, i, i);
13832 }if (r > 0 && r < i) r = i;
13833 if (g > 0 && g < i) g = i;
13834 if (b > 0 && b < i) b = i;
13835 return  new java.awt.Color (Math.min (Clazz_doubleToInt (r / 0.7), 255), Math.min (Clazz_doubleToInt (g / 0.7), 255), Math.min (Clazz_doubleToInt (b / 0.7), 255));
13836 });
13837 Clazz_defineMethod (c$, "darker", 
13838 function () {
13839 return  new java.awt.Color (Math.max (Clazz_doubleToInt (this.getRed () * 0.7), 0), Math.max (Clazz_doubleToInt (this.getGreen () * 0.7), 0), Math.max (Clazz_doubleToInt (this.getBlue () * 0.7), 0));
13840 });
13841 Clazz_overrideMethod (c$, "hashCode", 
13842 function () {
13843 return this.value;
13844 });
13845 Clazz_overrideMethod (c$, "equals", 
13846 function (obj) {
13847 return Clazz_instanceOf (obj, java.awt.Color) && (obj).getRGB () == this.getRGB ();
13848 }, "~O");
13849 Clazz_overrideMethod (c$, "toString", 
13850 function () {
13851 return this.getClass ().getName () + "[r=" + this.getRed () + ",g=" + this.getGreen () + ",b=" + this.getBlue () + "]";
13852 });
13853 c$.decode = Clazz_defineMethod (c$, "decode", 
13854 function (nm) {
13855 var intval = Integer.decode (nm);
13856 var i = intval.intValue ();
13857 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13858 }, "~S");
13859 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13860 function (nm) {
13861 return java.awt.Color.getColor (nm, null);
13862 }, "~S");
13863 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13864 function (nm, v) {
13865 var intval = Integer.getInteger (nm);
13866 if (intval == null) {
13867 return v;
13868 }var i = intval.intValue ();
13869 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13870 }, "~S,java.awt.Color");
13871 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13872 function (nm, v) {
13873 var intval = Integer.getInteger (nm);
13874 var i = (intval != null) ? intval.intValue () : v;
13875 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, (i >> 0) & 0xFF);
13876 }, "~S,~N");
13877 c$.HSBtoRGB = Clazz_defineMethod (c$, "HSBtoRGB", 
13878 function (hue, saturation, brightness) {
13879 var r = 0;
13880 var g = 0;
13881 var b = 0;
13882 if (saturation == 0) {
13883 r = g = b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13884 } else {
13885 var h = (hue - Math.floor (hue)) * 6.0;
13886 var f = h - java.lang.Math.floor (h);
13887 var p = brightness * (1.0 - saturation);
13888 var q = brightness * (1.0 - saturation * f);
13889 var t = brightness * (1.0 - (saturation * (1.0 - f)));
13890 switch (Clazz_floatToInt (h)) {
13891 case 0:
13892 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13893 g = Clazz_floatToInt (t * 255.0 + 0.5);
13894 b = Clazz_floatToInt (p * 255.0 + 0.5);
13895 break;
13896 case 1:
13897 r = Clazz_floatToInt (q * 255.0 + 0.5);
13898 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13899 b = Clazz_floatToInt (p * 255.0 + 0.5);
13900 break;
13901 case 2:
13902 r = Clazz_floatToInt (p * 255.0 + 0.5);
13903 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13904 b = Clazz_floatToInt (t * 255.0 + 0.5);
13905 break;
13906 case 3:
13907 r = Clazz_floatToInt (p * 255.0 + 0.5);
13908 g = Clazz_floatToInt (q * 255.0 + 0.5);
13909 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13910 break;
13911 case 4:
13912 r = Clazz_floatToInt (t * 255.0 + 0.5);
13913 g = Clazz_floatToInt (p * 255.0 + 0.5);
13914 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13915 break;
13916 case 5:
13917 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13918 g = Clazz_floatToInt (p * 255.0 + 0.5);
13919 b = Clazz_floatToInt (q * 255.0 + 0.5);
13920 break;
13921 }
13922 }return 0xff000000 | (r << 16) | (g << 8) | (b << 0);
13923 }, "~N,~N,~N");
13924 c$.RGBtoHSB = Clazz_defineMethod (c$, "RGBtoHSB", 
13925 function (r, g, b, hsbvals) {
13926 var hue;
13927 var saturation;
13928 var brightness;
13929 if (hsbvals == null) {
13930 hsbvals =  Clazz_newFloatArray (3, 0);
13931 }var cmax = (r > g) ? r : g;
13932 if (b > cmax) cmax = b;
13933 var cmin = (r < g) ? r : g;
13934 if (b < cmin) cmin = b;
13935 brightness = (cmax) / 255.0;
13936 if (cmax != 0) saturation = ((cmax - cmin)) / (cmax);
13937  else saturation = 0;
13938 if (saturation == 0) hue = 0;
13939  else {
13940 var redc = ((cmax - r)) / ((cmax - cmin));
13941 var greenc = ((cmax - g)) / ((cmax - cmin));
13942 var bluec = ((cmax - b)) / ((cmax - cmin));
13943 if (r == cmax) hue = bluec - greenc;
13944  else if (g == cmax) hue = 2.0 + redc - bluec;
13945  else hue = 4.0 + greenc - redc;
13946 hue = hue / 6.0;
13947 if (hue < 0) hue = hue + 1.0;
13948 }hsbvals[0] = hue;
13949 hsbvals[1] = saturation;
13950 hsbvals[2] = brightness;
13951 return hsbvals;
13952 }, "~N,~N,~N,~A");
13953 c$.getHSBColor = Clazz_defineMethod (c$, "getHSBColor", 
13954 function (h, s, b) {
13955 return  new java.awt.Color (java.awt.Color.HSBtoRGB (h, s, b));
13956 }, "~N,~N,~N");
13957 Clazz_defineMethod (c$, "getRGBComponents", 
13958 function (compArray) {
13959 var f;
13960 if (compArray == null) {
13961 f =  Clazz_newFloatArray (4, 0);
13962 } else {
13963 f = compArray;
13964 }if (this.frgbvalue == null) {
13965 f[0] = (this.getRed ()) / 255;
13966 f[1] = (this.getGreen ()) / 255;
13967 f[2] = (this.getBlue ()) / 255;
13968 f[3] = (this.getAlpha ()) / 255;
13969 } else {
13970 f[0] = this.frgbvalue[0];
13971 f[1] = this.frgbvalue[1];
13972 f[2] = this.frgbvalue[2];
13973 f[3] = this.falpha;
13974 }return f;
13975 }, "~A");
13976 Clazz_defineMethod (c$, "getRGBColorComponents", 
13977 function (compArray) {
13978 var f;
13979 if (compArray == null) {
13980 f =  Clazz_newFloatArray (3, 0);
13981 } else {
13982 f = compArray;
13983 }if (this.frgbvalue == null) {
13984 f[0] = (this.getRed ()) / 255;
13985 f[1] = (this.getGreen ()) / 255;
13986 f[2] = (this.getBlue ()) / 255;
13987 } else {
13988 f[0] = this.frgbvalue[0];
13989 f[1] = this.frgbvalue[1];
13990 f[2] = this.frgbvalue[2];
13991 }return f;
13992 }, "~A");
13993 Clazz_overrideMethod (c$, "createContext", 
13994 function (cm, r, r2d, xform, hints) {
13995 if (this.context == null || this.context.getRGB () != this.getRGB ()) {
13996 this.context =  new java.awt.ColorPaintContext (this.getRGB (), cm);
13997 }return this.context;
13998 }, "java.awt.image.ColorModel,java.awt.Rectangle,java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform,java.awt.RenderingHints");
13999 Clazz_overrideMethod (c$, "getTransparency", 
14000 function () {
14001 var alpha = this.getAlpha ();
14002 if (alpha == 0xff) {
14003 return 1;
14004 } else if (alpha == 0) {
14005 return 2;
14006 } else {
14007 return 3;
14008 }});
14009 c$.white = c$.prototype.white =  new java.awt.Color (255, 255, 255);
14010 c$.WHITE = c$.prototype.WHITE = java.awt.Color.white;
14011 c$.lightGray = c$.prototype.lightGray =  new java.awt.Color (192, 192, 192);
14012 c$.LIGHT_GRAY = c$.prototype.LIGHT_GRAY = java.awt.Color.lightGray;
14013 c$.gray = c$.prototype.gray =  new java.awt.Color (128, 128, 128);
14014 c$.GRAY = c$.prototype.GRAY = java.awt.Color.gray;
14015 c$.darkGray = c$.prototype.darkGray =  new java.awt.Color (64, 64, 64);
14016 c$.DARK_GRAY = c$.prototype.DARK_GRAY = java.awt.Color.darkGray;
14017 c$.black = c$.prototype.black =  new java.awt.Color (0, 0, 0);
14018 c$.BLACK = c$.prototype.BLACK = java.awt.Color.black;
14019 c$.red = c$.prototype.red =  new java.awt.Color (255, 0, 0);
14020 c$.RED = c$.prototype.RED = java.awt.Color.red;
14021 c$.pink = c$.prototype.pink =  new java.awt.Color (255, 175, 175);
14022 c$.PINK = c$.prototype.PINK = java.awt.Color.pink;
14023 c$.orange = c$.prototype.orange =  new java.awt.Color (255, 200, 0);
14024 c$.ORANGE = c$.prototype.ORANGE = java.awt.Color.orange;
14025 c$.yellow = c$.prototype.yellow =  new java.awt.Color (255, 255, 0);
14026 c$.YELLOW = c$.prototype.YELLOW = java.awt.Color.yellow;
14027 c$.green = c$.prototype.green =  new java.awt.Color (0, 255, 0);
14028 c$.GREEN = c$.prototype.GREEN = java.awt.Color.green;
14029 c$.magenta = c$.prototype.magenta =  new java.awt.Color (255, 0, 255);
14030 c$.MAGENTA = c$.prototype.MAGENTA = java.awt.Color.magenta;
14031 c$.cyan = c$.prototype.cyan =  new java.awt.Color (0, 255, 255);
14032 c$.CYAN = c$.prototype.CYAN = java.awt.Color.cyan;
14033 c$.blue = c$.prototype.blue =  new java.awt.Color (0, 0, 255);
14034 c$.BLUE = c$.prototype.BLUE = java.awt.Color.blue;
14035 Clazz_defineStatics (c$,
14036 "FACTOR", 0.7);
14037 });
14038 Clazz_declarePackage ("java.awt");
14039 Clazz_load (["java.awt.Transparency"], "java.awt.Paint", null, function () {
14040 Clazz_declareInterface (java.awt, "Paint", java.awt.Transparency);
14041 });
14042 Clazz_declarePackage ("java.awt");
14043 c$ = Clazz_declareInterface (java.awt, "Transparency");
14044 Clazz_defineStatics (c$,
14045 "OPAQUE", 1,
14046 "BITMASK", 2,
14047 "TRANSLUCENT", 3);
14048 Clazz_declarePackage ("java.awt");
14049 Clazz_load (["java.awt.PaintContext"], "java.awt.ColorPaintContext", ["java.awt.image.ColorModel"], function () {
14050 c$ = Clazz_decorateAsClass (function () {
14051 this.color = 0;
14052 Clazz_instantialize (this, arguments);
14053 }, java.awt, "ColorPaintContext", null, java.awt.PaintContext);
14054 Clazz_makeConstructor (c$, 
14055 function (color, cm) {
14056 this.color = color;
14057 }, "~N,java.awt.image.ColorModel");
14058 Clazz_overrideMethod (c$, "dispose", 
14059 function () {
14060 });
14061 Clazz_defineMethod (c$, "getRGB", 
14062 function () {
14063 return this.color;
14064 });
14065 Clazz_overrideMethod (c$, "getColorModel", 
14066 function () {
14067 return java.awt.image.ColorModel.getRGBdefault ();
14068 });
14069 });
14070 Clazz_declarePackage ("java.awt");
14071 Clazz_declareInterface (java.awt, "PaintContext");
14072 Clazz_declarePackage ("java.awt.image");
14073 Clazz_load (["java.awt.Transparency", "java.awt.color.ColorSpace"], "java.awt.image.ColorModel", ["java.lang.IllegalArgumentException", "$.NullPointerException", "$.UnsupportedOperationException", "JU.AU"], function () {
14074 c$ = Clazz_decorateAsClass (function () {
14075 this.pixel_bits = 0;
14076 this.nBits = null;
14077 this.transparency = 3;
14078 this.supportsAlpha = true;
14079 this.$isAlphaPremultiplied = false;
14080 this.numComponents = -1;
14081 this.numColorComponents = -1;
14082 this.colorSpace = null;
14083 this.colorSpaceType = 5;
14084 this.maxBits = 0;
14085 this.is_sRGB = true;
14086 this.transferType = 0;
14087 Clazz_instantialize (this, arguments);
14088 }, java.awt.image, "ColorModel", null, java.awt.Transparency);
14089 Clazz_prepareFields (c$, function () {
14090 this.colorSpace = java.awt.color.ColorSpace.getInstance (1000);
14091 });
14092 c$.getRGBdefault = Clazz_defineMethod (c$, "getRGBdefault", 
14093 function () {
14094 if (java.awt.image.ColorModel.RGBdefault == null) {
14095 java.awt.image.ColorModel.RGBdefault =  new java.awt.image.DirectColorModel (32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
14096 }return java.awt.image.ColorModel.RGBdefault;
14097 });
14098 Clazz_makeConstructor (c$, 
14099 function (bits) {
14100 this.pixel_bits = bits;
14101 if (bits < 1) {
14102 throw  new IllegalArgumentException ("Number of bits must be > 0");
14103 }this.numComponents = 4;
14104 this.numColorComponents = 3;
14105 this.maxBits = bits;
14106 this.transferType = java.awt.image.ColorModel.getDefaultTransferType (bits);
14107 }, "~N");
14108 Clazz_makeConstructor (c$, 
14109 function (pixel_bits, bits, cspace, hasAlpha, isAlphaPremultiplied, transparency, transferType) {
14110 this.colorSpace = cspace;
14111 this.colorSpaceType = cspace.getType ();
14112 this.numColorComponents = cspace.getNumComponents ();
14113 this.numComponents = this.numColorComponents + (hasAlpha ? 1 : 0);
14114 this.supportsAlpha = hasAlpha;
14115 if (bits.length < this.numComponents) {
14116 throw  new IllegalArgumentException ("Number of color/alpha components should be " + this.numComponents + " but length of bits array is " + bits.length);
14117 }if (transparency < 1 || transparency > 3) {
14118 throw  new IllegalArgumentException ("Unknown transparency: " + transparency);
14119 }if (this.supportsAlpha == false) {
14120 this.$isAlphaPremultiplied = false;
14121 this.transparency = 1;
14122 } else {
14123 this.$isAlphaPremultiplied = isAlphaPremultiplied;
14124 this.transparency = transparency;
14125 }this.nBits = bits.clone ();
14126 this.pixel_bits = pixel_bits;
14127 if (pixel_bits <= 0) {
14128 throw  new IllegalArgumentException ("Number of pixel bits must be > 0");
14129 }this.maxBits = 0;
14130 for (var i = 0; i < bits.length; i++) {
14131 if (bits[i] < 0) {
14132 throw  new IllegalArgumentException ("Number of bits must be >= 0");
14133 }if (this.maxBits < bits[i]) {
14134 this.maxBits = bits[i];
14135 }}
14136 if (this.maxBits == 0) {
14137 throw  new IllegalArgumentException ("There must be at least one component with > 0 pixel bits.");
14138 }if (cspace !== java.awt.color.ColorSpace.getInstance (1000)) {
14139 this.is_sRGB = false;
14140 }this.transferType = transferType;
14141 }, "~N,~A,java.awt.color.ColorSpace,~B,~B,~N,~N");
14142 Clazz_defineMethod (c$, "hasAlpha", 
14143 function () {
14144 return this.supportsAlpha;
14145 });
14146 Clazz_defineMethod (c$, "isAlphaPremultiplied", 
14147 function () {
14148 return this.$isAlphaPremultiplied;
14149 });
14150 Clazz_defineMethod (c$, "getTransferType", 
14151 function () {
14152 return this.transferType;
14153 });
14154 Clazz_defineMethod (c$, "getPixelSize", 
14155 function () {
14156 return this.pixel_bits;
14157 });
14158 Clazz_defineMethod (c$, "getComponentSize", 
14159 function (componentIdx) {
14160 if (this.nBits == null) {
14161 throw  new NullPointerException ("Number of bits array is null.");
14162 }return this.nBits[componentIdx];
14163 }, "~N");
14164 Clazz_defineMethod (c$, "getComponentSize", 
14165 function () {
14166 if (this.nBits != null) {
14167 return this.nBits.clone ();
14168 }return null;
14169 });
14170 Clazz_overrideMethod (c$, "getTransparency", 
14171 function () {
14172 return this.transparency;
14173 });
14174 Clazz_defineMethod (c$, "getNumComponents", 
14175 function () {
14176 return this.numComponents;
14177 });
14178 Clazz_defineMethod (c$, "getNumColorComponents", 
14179 function () {
14180 return this.numColorComponents;
14181 });
14182 Clazz_defineMethod (c$, "getRGB", 
14183 function (pixel) {
14184 return (this.getAlpha (pixel) << 24) | (this.getRed (pixel) << 16) | (this.getGreen (pixel) << 8) | (this.getBlue (pixel) << 0);
14185 }, "~N");
14186 Clazz_defineMethod (c$, "getRed", 
14187 function (inData) {
14188 var pixel = 0;
14189 var length = 0;
14190 var idata = inData;
14191 pixel = idata[0];
14192 length = idata.length;
14193 if (length == 1) {
14194 return this.getRed (pixel);
14195 } else {
14196 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14197 }}, "~O");
14198 Clazz_defineMethod (c$, "getGreen", 
14199 function (inData) {
14200 var pixel = 0;
14201 var length = 0;
14202 var idata = inData;
14203 pixel = idata[0];
14204 length = idata.length;
14205 if (length == 1) {
14206 return this.getGreen (pixel);
14207 } else {
14208 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14209 }}, "~O");
14210 Clazz_defineMethod (c$, "getBlue", 
14211 function (inData) {
14212 var pixel = 0;
14213 var length = 0;
14214 var idata = inData;
14215 pixel = idata[0];
14216 length = idata.length;
14217 if (length == 1) {
14218 return this.getBlue (pixel);
14219 } else {
14220 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14221 }}, "~O");
14222 Clazz_defineMethod (c$, "getAlpha", 
14223 function (inData) {
14224 var pixel = 0;
14225 var length = 0;
14226 var idata = inData;
14227 pixel = idata[0];
14228 length = idata.length;
14229 if (length == 1) {
14230 return this.getAlpha (pixel);
14231 } else {
14232 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14233 }}, "~O");
14234 Clazz_defineMethod (c$, "getRGB", 
14235 function (inData) {
14236 return (this.getAlpha (inData) << 24) | (this.getRed (inData) << 16) | (this.getGreen (inData) << 8) | (this.getBlue (inData) << 0);
14237 }, "~O");
14238 Clazz_defineMethod (c$, "getDataElements", 
14239 function (rgb, pixel) {
14240 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14241 }, "~N,~O");
14242 Clazz_defineMethod (c$, "getComponents", 
14243 function (pixel, components, offset) {
14244 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14245 }, "~N,~A,~N");
14246 Clazz_defineMethod (c$, "getComponents", 
14247 function (pixel, components, offset) {
14248 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14249 }, "~O,~A,~N");
14250 Clazz_defineMethod (c$, "getUnnormalizedComponents", 
14251 function (normComponents, normOffset, components, offset) {
14252 if (this.colorSpace == null) {
14253 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14254 }if (this.nBits == null) {
14255 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14256 }if ((normComponents.length - normOffset) < this.numComponents) {
14257 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14258 }if (components == null) {
14259 components =  Clazz_newIntArray (offset + this.numComponents, 0);
14260 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14261 var normAlpha = normComponents[normOffset + this.numColorComponents];
14262 for (var i = 0; i < this.numColorComponents; i++) {
14263 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) * normAlpha + 0.5);
14264 }
14265 components[offset + this.numColorComponents] = Clazz_floatToInt (normAlpha * ((1 << this.nBits[this.numColorComponents]) - 1) + 0.5);
14266 } else {
14267 for (var i = 0; i < this.numComponents; i++) {
14268 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) + 0.5);
14269 }
14270 }return components;
14271 }, "~A,~N,~A,~N");
14272 Clazz_defineMethod (c$, "getNormalizedComponents", 
14273 function (components, offset, normComponents, normOffset) {
14274 if (this.colorSpace == null) {
14275 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14276 }if (this.nBits == null) {
14277 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14278 }if ((components.length - offset) < this.numComponents) {
14279 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14280 }if (normComponents == null) {
14281 normComponents =  Clazz_newFloatArray (this.numComponents + normOffset, 0);
14282 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14283 var normAlpha = components[offset + this.numColorComponents];
14284 normAlpha /= ((1 << this.nBits[this.numColorComponents]) - 1);
14285 if (normAlpha != 0.0) {
14286 for (var i = 0; i < this.numColorComponents; i++) {
14287 normComponents[normOffset + i] = (components[offset + i]) / (normAlpha * (((1 << this.nBits[i]) - 1)));
14288 }
14289 } else {
14290 for (var i = 0; i < this.numColorComponents; i++) {
14291 normComponents[normOffset + i] = 0.0;
14292 }
14293 }normComponents[normOffset + this.numColorComponents] = normAlpha;
14294 } else {
14295 for (var i = 0; i < this.numComponents; i++) {
14296 normComponents[normOffset + i] = (components[offset + i]) / (((1 << this.nBits[i]) - 1));
14297 }
14298 }return normComponents;
14299 }, "~A,~N,~A,~N");
14300 Clazz_defineMethod (c$, "getDataElement", 
14301 function (components, offset) {
14302 return this.getDataElementInt (components, offset);
14303 }, "~A,~N");
14304 Clazz_defineMethod (c$, "getDataElementInt", 
14305 function (components, offset) {
14306 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14307 }, "~A,~N");
14308 Clazz_defineMethod (c$, "getDataElement", 
14309 function (normComponents, normOffset) {
14310 if (JU.AU.isAI (normComponents)) {
14311 var ints = normComponents;
14312 return this.getDataElementInt (ints, normOffset);
14313 }var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14314 return this.getDataElement (components, 0);
14315 }, "~A,~N");
14316 Clazz_defineMethod (c$, "getDataElements", 
14317 function (normComponents, normOffset, obj) {
14318 var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14319 return this.getDataElements (components, 0, obj);
14320 }, "~A,~N,~O");
14321 Clazz_defineMethod (c$, "getNormalizedComponents", 
14322 function (pixel, normComponents, normOffset) {
14323 var components = this.getComponents (pixel, null, 0);
14324 return this.getNormalizedComponents (components, 0, normComponents, normOffset);
14325 }, "~O,~A,~N");
14326 Clazz_overrideMethod (c$, "equals", 
14327 function (obj) {
14328 if (!(Clazz_instanceOf (obj, java.awt.image.ColorModel))) {
14329 return false;
14330 }var cm = obj;
14331 if (this === cm) {
14332 return true;
14333 }if (this.supportsAlpha != cm.hasAlpha () || this.$isAlphaPremultiplied != cm.isAlphaPremultiplied () || this.pixel_bits != cm.getPixelSize () || this.transparency != cm.getTransparency () || this.numComponents != cm.getNumComponents ()) {
14334 return false;
14335 }var nb = cm.getComponentSize ();
14336 if ((this.nBits != null) && (nb != null)) {
14337 for (var i = 0; i < this.numComponents; i++) {
14338 if (this.nBits[i] != nb[i]) {
14339 return false;
14340 }}
14341 } else {
14342 return ((this.nBits == null) && (nb == null));
14343 }return true;
14344 }, "~O");
14345 Clazz_overrideMethod (c$, "hashCode", 
14346 function () {
14347 var result = 0;
14348 result = (this.supportsAlpha ? 2 : 3) + (this.$isAlphaPremultiplied ? 4 : 5) + this.pixel_bits * 6 + this.transparency * 7 + this.numComponents * 8;
14349 if (this.nBits != null) {
14350 for (var i = 0; i < this.numComponents; i++) {
14351 result = result + this.nBits[i] * (i + 9);
14352 }
14353 }return result;
14354 });
14355 Clazz_defineMethod (c$, "getColorSpace", 
14356 function () {
14357 return this.colorSpace;
14358 });
14359 Clazz_defineMethod (c$, "isCompatibleRaster", 
14360 function (raster) {
14361 throw  new UnsupportedOperationException ("This method has not been implemented for this ColorModel.");
14362 }, "java.awt.image.Raster");
14363 Clazz_defineMethod (c$, "createCompatibleWritableRaster", 
14364 function (w, h) {
14365 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14366 }, "~N,~N");
14367 Clazz_defineMethod (c$, "createCompatibleSampleModel", 
14368 function (w, h) {
14369 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14370 }, "~N,~N");
14371 Clazz_defineMethod (c$, "isCompatibleSampleModel", 
14372 function (sm) {
14373 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14374 }, "java.awt.image.SampleModel");
14375 Clazz_overrideMethod (c$, "finalize", 
14376 function () {
14377 });
14378 Clazz_defineMethod (c$, "getAlphaRaster", 
14379 function (raster) {
14380 return null;
14381 }, "java.awt.image.WritableRaster");
14382 Clazz_overrideMethod (c$, "toString", 
14383 function () {
14384 return  String.instantialize ("ColorModel: #pixelBits = " + this.pixel_bits + " numComponents = " + this.numComponents + " color space = " + this.colorSpace + " transparency = " + this.transparency + " has alpha = " + this.supportsAlpha + " isAlphaPre = " + this.$isAlphaPremultiplied);
14385 });
14386 c$.getDefaultTransferType = Clazz_defineMethod (c$, "getDefaultTransferType", 
14387 function (pixel_bits) {
14388 if (pixel_bits <= 8) {
14389 return 0;
14390 }return 3;
14391 }, "~N");
14392 c$.isLinearRGBspace = Clazz_defineMethod (c$, "isLinearRGBspace", 
14393 function (cs) {
14394 return false;
14395 }, "java.awt.color.ColorSpace");
14396 c$.isLinearGRAYspace = Clazz_defineMethod (c$, "isLinearGRAYspace", 
14397 function (cs) {
14398 return false;
14399 }, "java.awt.color.ColorSpace");
14400 Clazz_defineStatics (c$,
14401 "RGBdefault", null,
14402 "l8Tos8", null,
14403 "s8Tol8", null,
14404 "l16Tos8", null,
14405 "s8Tol16", null,
14406 "g8Tos8Map", null,
14407 "lg16Toog8Map", null,
14408 "g16Tos8Map", null,
14409 "lg16Toog16Map", null);
14410 });
14411 Clazz_declarePackage ("java.awt.color");
14412 Clazz_load (null, "java.awt.color.ColorSpace", ["java.lang.IllegalArgumentException"], function () {
14413 c$ = Clazz_decorateAsClass (function () {
14414 this.type = 0;
14415 this.numComponents = 0;
14416 this.compName = null;
14417 Clazz_instantialize (this, arguments);
14418 }, java.awt.color, "ColorSpace");
14419 Clazz_makeConstructor (c$, 
14420 function (type, numcomponents) {
14421 this.type = type;
14422 this.numComponents = numcomponents;
14423 }, "~N,~N");
14424 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
14425 function (colorspace) {
14426 var theColorSpace;
14427 switch (colorspace) {
14428 default:
14429 case 1000:
14430 if (java.awt.color.ColorSpace.sRGBspace == null) {
14431 java.awt.color.ColorSpace.sRGBspace =  new java.awt.color.ColorSpace (5, 3);
14432 }theColorSpace = java.awt.color.ColorSpace.sRGBspace;
14433 break;
14434 }
14435 return theColorSpace;
14436 }, "~N");
14437 Clazz_defineMethod (c$, "isCS_sRGB", 
14438 function () {
14439 return (this === java.awt.color.ColorSpace.sRGBspace);
14440 });
14441 Clazz_defineMethod (c$, "toRGB", 
14442 function (colorvalue) {
14443 return colorvalue;
14444 }, "~A");
14445 Clazz_defineMethod (c$, "fromRGB", 
14446 function (rgbvalue) {
14447 return rgbvalue;
14448 }, "~A");
14449 Clazz_defineMethod (c$, "getType", 
14450 function () {
14451 return this.type;
14452 });
14453 Clazz_defineMethod (c$, "getNumComponents", 
14454 function () {
14455 return this.numComponents;
14456 });
14457 Clazz_defineMethod (c$, "getName", 
14458 function (idx) {
14459 if ((idx < 0) || (idx > this.numComponents - 1)) {
14460 throw  new IllegalArgumentException ("Component index out of range: " + idx);
14461 }if (this.compName == null) {
14462 switch (this.type) {
14463 case 0:
14464 this.compName =  Clazz_newArray (-1, ["X", "Y", "Z"]);
14465 break;
14466 case 1:
14467 this.compName =  Clazz_newArray (-1, ["L", "a", "b"]);
14468 break;
14469 case 2:
14470 this.compName =  Clazz_newArray (-1, ["L", "u", "v"]);
14471 break;
14472 case 3:
14473 this.compName =  Clazz_newArray (-1, ["Y", "Cb", "Cr"]);
14474 break;
14475 case 4:
14476 this.compName =  Clazz_newArray (-1, ["Y", "x", "y"]);
14477 break;
14478 case 5:
14479 this.compName =  Clazz_newArray (-1, ["Red", "Green", "Blue"]);
14480 break;
14481 case 6:
14482 this.compName =  Clazz_newArray (-1, ["Gray"]);
14483 break;
14484 case 7:
14485 this.compName =  Clazz_newArray (-1, ["Hue", "Saturation", "Value"]);
14486 break;
14487 case 8:
14488 this.compName =  Clazz_newArray (-1, ["Hue", "Lightness", "Saturation"]);
14489 break;
14490 case 9:
14491 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow", "Black"]);
14492 break;
14493 case 11:
14494 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow"]);
14495 break;
14496 default:
14497 var tmp =  new Array (this.numComponents);
14498 for (var i = 0; i < tmp.length; i++) {
14499 tmp[i] = "Unnamed color component(" + i + ")";
14500 }
14501 this.compName = tmp;
14502 }
14503 }return this.compName[idx];
14504 }, "~N");
14505 Clazz_defineMethod (c$, "getMinValue", 
14506 function (component) {
14507 if ((component < 0) || (component > this.numComponents - 1)) {
14508 throw  new IllegalArgumentException ("Component index out of range: " + component);
14509 }return 0.0;
14510 }, "~N");
14511 Clazz_defineMethod (c$, "getMaxValue", 
14512 function (component) {
14513 if ((component < 0) || (component > this.numComponents - 1)) {
14514 throw  new IllegalArgumentException ("Component index out of range: " + component);
14515 }return 1.0;
14516 }, "~N");
14517 Clazz_defineStatics (c$,
14518 "sRGBspace", null,
14519 "TYPE_XYZ", 0,
14520 "TYPE_Lab", 1,
14521 "TYPE_Luv", 2,
14522 "TYPE_YCbCr", 3,
14523 "TYPE_Yxy", 4,
14524 "TYPE_RGB", 5,
14525 "TYPE_GRAY", 6,
14526 "TYPE_HSV", 7,
14527 "TYPE_HLS", 8,
14528 "TYPE_CMYK", 9,
14529 "TYPE_CMY", 11,
14530 "TYPE_2CLR", 12,
14531 "TYPE_3CLR", 13,
14532 "TYPE_4CLR", 14,
14533 "TYPE_5CLR", 15,
14534 "TYPE_6CLR", 16,
14535 "TYPE_7CLR", 17,
14536 "TYPE_8CLR", 18,
14537 "TYPE_9CLR", 19,
14538 "TYPE_ACLR", 20,
14539 "TYPE_BCLR", 21,
14540 "TYPE_CCLR", 22,
14541 "TYPE_DCLR", 23,
14542 "TYPE_ECLR", 24,
14543 "TYPE_FCLR", 25,
14544 "CS_sRGB", 1000,
14545 "CS_LINEAR_RGB", 1004,
14546 "CS_CIEXYZ", 1001,
14547 "CS_PYCC", 1002,
14548 "CS_GRAY", 1003);
14549 });
14550 Clazz_declarePackage ("java.util");
14551 Clazz_load (["java.util.Arrays", "$.Collections", "$.HashMap"], "java.util.ResourceBundle", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "java.lang.ClassNotFoundException", "$.IllegalArgumentException", "$.InternalError", "$.InterruptedException", "$.NullPointerException", "$.StringBuilder", "$.Thread", "java.util.ArrayList", "$.HashSet", "java.util.Locale", "$.MissingResourceException", "swingjs.JSToolkit", "swingjs.api.Interface"], function () {
14552 c$ = Clazz_decorateAsClass (function () {
14553 this.parent = null;
14554 this.locale = null;
14555 this.expired = false;
14556 this.$keySet = null;
14557 Clazz_instantialize (this, arguments);
14558 }, java.util, "ResourceBundle");
14559 Clazz_makeConstructor (c$, 
14560 function () {
14561 });
14562 Clazz_defineMethod (c$, "getString", 
14563 function (key) {
14564 return this.getObject (key);
14565 }, "~S");
14566 Clazz_defineMethod (c$, "getStringArray", 
14567 function (key) {
14568 return this.getObject (key);
14569 }, "~S");
14570 Clazz_defineMethod (c$, "getObject", 
14571 function (key) {
14572 var obj = this.handleGetObject (key);
14573 if (obj == null) {
14574 if (this.parent != null) {
14575 obj = this.parent.getObject (key);
14576 }if (obj == null) throw  new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key);
14577 }return obj;
14578 }, "~S");
14579 Clazz_defineMethod (c$, "getLocale", 
14580 function () {
14581 return this.locale;
14582 });
14583 Clazz_defineMethod (c$, "setParent", 
14584 function (parent) {
14585 this.parent = parent;
14586 }, "java.util.ResourceBundle");
14587 c$.getBundle = Clazz_defineMethod (c$, "getBundle", 
14588 function (baseName, targetLocale, loader, control) {
14589 var n = 4;
14590 {
14591 n = arguments.length;
14592 }switch (n) {
14593 case 2:
14594 if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) {
14595 control = targetLocale;
14596 targetLocale = null;
14597 }break;
14598 case 3:
14599 if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) {
14600 control = loader;
14601 loader = null;
14602 }break;
14603 }
14604 if (targetLocale == null) targetLocale = java.util.Locale.getDefault ();
14605 if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
14606 return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control);
14607 }, "~S,~O,~O,java.util.ResourceBundle.Control");
14608 c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", 
14609  function (baseName, locale, loader, control) {
14610 if (control == null) {
14611 throw  new NullPointerException ("ResourceBundle locale or control is null");
14612 }var cacheKey =  new java.util.ResourceBundle.CacheKey (baseName, locale, loader);
14613 var bundle = null;
14614 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14615 if (bundleRef != null) {
14616 bundle = bundleRef;
14617 bundleRef = null;
14618 }if (java.util.ResourceBundle.isValidBundle (bundle)) {
14619 return bundle;
14620 }var formats = control.getFormats (baseName);
14621 var baseBundle = null;
14622 for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) {
14623 var candidateLocales = control.getCandidateLocales (baseName, targetLocale);
14624 bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle);
14625 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14626 var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale);
14627 if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) {
14628 break;
14629 }if (isBaseBundle && baseBundle == null) {
14630 baseBundle = bundle;
14631 }}}
14632 if (bundle == null) {
14633 if (baseBundle == null) {
14634 java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ());
14635 }bundle = baseBundle;
14636 }return bundle;
14637 }, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control");
14638 c$.findBundle = Clazz_defineMethod (c$, "findBundle", 
14639  function (cacheKey, candidateLocales, formats, index, control, baseBundle) {
14640 var targetLocale = candidateLocales.get (index);
14641 var parent = null;
14642 if (index != candidateLocales.size () - 1) {
14643 parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle);
14644 } else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) {
14645 return baseBundle;
14646 }var expiredBundle = false;
14647 cacheKey.setLocale (targetLocale);
14648 var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control);
14649 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14650 expiredBundle = bundle.expired;
14651 if (!expiredBundle) {
14652 if (bundle.parent === parent) {
14653 return bundle;
14654 }var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14655 if (bundleRef != null && bundleRef === bundle) {
14656 java.util.ResourceBundle.cacheList.remove (cacheKey);
14657 }}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) {
14658 var constKey = cacheKey.clone ();
14659 try {
14660 try {
14661 bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle);
14662 if (bundle != null) {
14663 if (bundle.parent == null) {
14664 bundle.setParent (parent);
14665 }bundle.locale = targetLocale;
14666 bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control);
14667 return bundle;
14668 }java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control);
14669 } finally {
14670 }
14671 } finally {
14672 if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) {
14673 Thread.currentThread ().interrupt ();
14674 }}
14675 }return parent;
14676 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");
14677 c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", 
14678  function (cacheKey, formats, control, reload) {
14679 var targetLocale = cacheKey.getLocale ();
14680 var bundle = null;
14681 var size = formats.size ();
14682 for (var i = 0; i < size; i++) {
14683 var format = formats.get (i);
14684 try {
14685 bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload);
14686 } catch (e$$) {
14687 if (Clazz_exceptionOf (e$$, LinkageError)) {
14688 var error = e$$;
14689 {
14690 cacheKey.setCause (error);
14691 }
14692 } else if (Clazz_exceptionOf (e$$, Exception)) {
14693 var cause = e$$;
14694 {
14695 cacheKey.setCause (cause);
14696 }
14697 } else {
14698 throw e$$;
14699 }
14700 }
14701 if (bundle != null) {
14702 cacheKey.setFormat (format);
14703 bundle.locale = targetLocale;
14704 bundle.expired = false;
14705 break;
14706 }}
14707 return bundle;
14708 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B");
14709 c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", 
14710  function (bundle) {
14711 return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE;
14712 }, "java.util.ResourceBundle");
14713 c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", 
14714  function (baseName, locale, cause) {
14715 if (Clazz_instanceOf (cause, java.util.MissingResourceException)) {
14716 cause = null;
14717 }throw  new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause);
14718 }, "~S,java.util.Locale,Throwable");
14719 c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", 
14720  function (cacheKey, control) {
14721 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14722 if (bundleRef == null) {
14723 return null;
14724 }var bundle = bundleRef;
14725 return bundle;
14726 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control");
14727 c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", 
14728  function (cacheKey, bundle, control) {
14729 var key = cacheKey.clone ();
14730 java.util.ResourceBundle.cacheList.put (key, bundle);
14731 return bundle;
14732 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control");
14733 c$.clearCache = Clazz_defineMethod (c$, "clearCache", 
14734 function () {
14735 java.util.ResourceBundle.cacheList.clear ();
14736 });
14737 Clazz_defineMethod (c$, "containsKey", 
14738 function (key) {
14739 if (key == null) {
14740 throw  new NullPointerException ();
14741 }for (var rb = this; rb != null; rb = rb.parent) {
14742 if (rb.handleKeySet ().contains (key)) {
14743 return true;
14744 }}
14745 return false;
14746 }, "~S");
14747 Clazz_defineMethod (c$, "keySet", 
14748 function () {
14749 var keys =  new java.util.HashSet ();
14750 for (var rb = this; rb != null; rb = rb.parent) {
14751 keys.addAll (rb.handleKeySet ());
14752 }
14753 return keys;
14754 });
14755 Clazz_defineMethod (c$, "handleKeySet", 
14756 function () {
14757 if (this.$keySet == null) {
14758 {
14759 if (this.$keySet == null) {
14760 var keys =  new java.util.HashSet ();
14761 var enumKeys = this.getKeys ();
14762 while (enumKeys.hasMoreElements ()) {
14763 var key = enumKeys.nextElement ();
14764 if (this.handleGetObject (key) != null) {
14765 keys.add (key);
14766 }}
14767 this.$keySet = keys;
14768 }}}return this.$keySet;
14769 });
14770 c$.$ResourceBundle$1$ = function () {
14771 Clazz_pu$h(self.c$);
14772 c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle);
14773 Clazz_defineMethod (c$, "getKeys", 
14774 function () {
14775 return null;
14776 });
14777 Clazz_defineMethod (c$, "handleGetObject", 
14778 function (key) {
14779 return null;
14780 }, "~S");
14781 Clazz_overrideMethod (c$, "toString", 
14782 function () {
14783 return "NONEXISTENT_BUNDLE";
14784 });
14785 c$ = Clazz_p0p ();
14786 };
14787 Clazz_pu$h(self.c$);
14788 c$ = Clazz_decorateAsClass (function () {
14789 this.name = null;
14790 this.locale = null;
14791 this.format = null;
14792 this.cause = null;
14793 this.hashCodeCache = 0;
14794 Clazz_instantialize (this, arguments);
14795 }, java.util.ResourceBundle, "CacheKey", null, Cloneable);
14796 Clazz_makeConstructor (c$, 
14797 function (a, b, c) {
14798 this.name = a;
14799 this.locale = b;
14800 if (this.name != null) this.calculateHashCode ();
14801 }, "~S,java.util.Locale,~O");
14802 Clazz_defineMethod (c$, "getName", 
14803 function () {
14804 return this.name;
14805 });
14806 Clazz_defineMethod (c$, "getLocale", 
14807 function () {
14808 return this.locale;
14809 });
14810 Clazz_defineMethod (c$, "setLocale", 
14811 function (a) {
14812 if (!this.locale.equals (a)) {
14813 this.locale = a;
14814 this.calculateHashCode ();
14815 }return this;
14816 }, "java.util.Locale");
14817 Clazz_overrideMethod (c$, "equals", 
14818 function (a) {
14819 if (this === a) {
14820 return true;
14821 }try {
14822 var b = a;
14823 if (this.hashCodeCache != b.hashCodeCache) {
14824 return false;
14825 }if (!this.name.equals (b.name)) {
14826 return false;
14827 }if (!this.locale.equals (b.locale)) {
14828 return false;
14829 }return true;
14830 } catch (e$$) {
14831 if (Clazz_exceptionOf (e$$, NullPointerException)) {
14832 var e = e$$;
14833 {
14834 }
14835 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
14836 var e = e$$;
14837 {
14838 }
14839 } else {
14840 throw e$$;
14841 }
14842 }
14843 return false;
14844 }, "~O");
14845 Clazz_overrideMethod (c$, "hashCode", 
14846 function () {
14847 return this.hashCodeCache;
14848 });
14849 Clazz_defineMethod (c$, "calculateHashCode", 
14850  function () {
14851 this.hashCodeCache = this.name.hashCode () << 3;
14852 this.hashCodeCache ^= this.locale.hashCode ();
14853 });
14854 Clazz_defineMethod (c$, "clone", 
14855 function () {
14856 try {
14857 var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []);
14858 a.cause = null;
14859 return a;
14860 } catch (e) {
14861 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
14862 throw  new InternalError ();
14863 } else {
14864 throw e;
14865 }
14866 }
14867 });
14868 Clazz_defineMethod (c$, "setFormat", 
14869 function (a) {
14870 this.format = a;
14871 }, "~S");
14872 Clazz_defineMethod (c$, "setCause", 
14873  function (a) {
14874 if (this.cause == null) {
14875 this.cause = a;
14876 } else {
14877 if (Clazz_instanceOf (this.cause, ClassNotFoundException)) {
14878 this.cause = a;
14879 }}}, "Throwable");
14880 Clazz_defineMethod (c$, "getCause", 
14881  function () {
14882 return this.cause;
14883 });
14884 Clazz_overrideMethod (c$, "toString", 
14885 function () {
14886 var a = this.locale.toString ();
14887 if (a.length == 0) {
14888 if (this.locale.getVariant ().length != 0) {
14889 a = "__" + this.locale.getVariant ();
14890 } else {
14891 a = "\"\"";
14892 }}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]";
14893 });
14894 c$ = Clazz_p0p ();
14895 Clazz_pu$h(self.c$);
14896 c$ = Clazz_declareType (java.util.ResourceBundle, "Control");
14897 Clazz_makeConstructor (c$, 
14898 function () {
14899 });
14900 c$.getControl = Clazz_defineMethod (c$, "getControl", 
14901 function (a) {
14902 if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14903 return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY;
14904 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14905 return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY;
14906 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14907 return java.util.ResourceBundle.Control.INSTANCE;
14908 }throw  new IllegalArgumentException ();
14909 }, "java.util.List");
14910 c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", 
14911 function (a) {
14912 if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14913 return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK;
14914 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14915 return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK;
14916 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14917 return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK;
14918 }throw  new IllegalArgumentException ();
14919 }, "java.util.List");
14920 Clazz_defineMethod (c$, "getFormats", 
14921 function (a) {
14922 if (a == null) {
14923 throw  new NullPointerException ();
14924 }return java.util.ResourceBundle.Control.FORMAT_DEFAULT;
14925 }, "~S");
14926 Clazz_defineMethod (c$, "getCandidateLocales", 
14927 function (a, b) {
14928 if (a == null) {
14929 throw  new NullPointerException ();
14930 }var c = b.getLanguage ();
14931 var d = b.getCountry ();
14932 var e = b.getVariant ();
14933 var f =  new java.util.ArrayList (4);
14934 if (e.length > 0) {
14935 f.add (b);
14936 }if (d.length > 0) {
14937 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, ""));
14938 }if (c.length > 0) {
14939 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", ""));
14940 }f.add (java.util.Locale.ROOT);
14941 return f;
14942 }, "~S,java.util.Locale");
14943 Clazz_defineMethod (c$, "getFallbackLocale", 
14944 function (a, b) {
14945 if (a == null) {
14946 throw  new NullPointerException ();
14947 }var c = java.util.Locale.getDefault ();
14948 return b.equals (c) ? null : c;
14949 }, "~S,java.util.Locale");
14950 Clazz_defineMethod (c$, "newBundle", 
14951 function (a, b, c, d, e) {
14952 var f = this.toBundleName (a, b);
14953 var g = null;
14954 if (c.equals ("java.class")) {
14955 g = swingjs.api.Interface.getInstance (f, false);
14956 } else if (c.equals ("java.properties")) {
14957 var h = this.toResourceName0 (f, "properties");
14958 if (h == null) {
14959 return null;
14960 }var i = swingjs.JSToolkit.getJavaResource (h, false);
14961 var j = null;
14962 j = (i == null ? null :  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ())));
14963 if (j != null) {
14964 try {
14965 g = this.newPropertyBundle (j);
14966 } finally {
14967 j.close ();
14968 }
14969 }} else {
14970 throw  new IllegalArgumentException ("unknown format: " + c);
14971 }return g;
14972 }, "~S,java.util.Locale,~S,~O,~B");
14973 Clazz_defineMethod (c$, "newPropertyBundle", 
14974  function (a) {
14975 return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a);
14976 }, "java.io.InputStream");
14977 Clazz_defineMethod (c$, "getTimeToLive", 
14978 function (a, b) {
14979 if (a == null || b == null) {
14980 throw  new NullPointerException ();
14981 }return -2;
14982 }, "~S,java.util.Locale");
14983 Clazz_defineMethod (c$, "toBundleName", 
14984 function (a, b) {
14985 if (b === java.util.Locale.ROOT) {
14986 return a;
14987 }var c = b.getLanguage ();
14988 var d = b.getCountry ();
14989 var e = b.getVariant ();
14990 if (c === "" && d === "" && e === "") {
14991 return a;
14992 }var f =  new StringBuilder (a);
14993 f.append ('_');
14994 if (e !== "") {
14995 f.append (c).append ('_').append (d).append ('_').append (e);
14996 } else if (d !== "") {
14997 f.append (c).append ('_').append (d);
14998 } else {
14999 f.append (c);
15000 }return f.toString ();
15001 }, "~S,java.util.Locale");
15002 Clazz_defineMethod (c$, "toResourceName", 
15003 function (a, b) {
15004 var c =  new StringBuilder (a.length + 1 + b.length);
15005 c.append (a.$replace ('.', '/')).append ('.').append (b);
15006 return c.toString ();
15007 }, "~S,~S");
15008 Clazz_defineMethod (c$, "toResourceName0", 
15009  function (a, b) {
15010 if (a.contains ("://")) {
15011 return null;
15012 } else {
15013 return this.toResourceName (a, b);
15014 }}, "~S,~S");
15015 c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"]));
15016 c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"]));
15017 c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"]));
15018 Clazz_defineStatics (c$,
15019 "TTL_DONT_CACHE", -1,
15020 "TTL_NO_EXPIRATION_CONTROL", -2);
15021 c$.INSTANCE = c$.prototype.INSTANCE =  new java.util.ResourceBundle.Control ();
15022 c$ = Clazz_p0p ();
15023 Clazz_pu$h(self.c$);
15024 c$ = Clazz_decorateAsClass (function () {
15025 this.formats = null;
15026 Clazz_instantialize (this, arguments);
15027 }, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control);
15028 Clazz_makeConstructor (c$, 
15029 function (a) {
15030 Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []);
15031 this.formats = a;
15032 }, "java.util.List");
15033 Clazz_overrideMethod (c$, "getFormats", 
15034 function (a) {
15035 if (a == null) {
15036 throw  new NullPointerException ();
15037 }return this.formats;
15038 }, "~S");
15039 c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
15040 c$.CLASS_ONLY = c$.prototype.CLASS_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
15041 c$ = Clazz_p0p ();
15042 Clazz_pu$h(self.c$);
15043 c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl);
15044 Clazz_overrideMethod (c$, "getFallbackLocale", 
15045 function (a, b) {
15046 if (a == null || b == null) {
15047 throw  new NullPointerException ();
15048 }return null;
15049 }, "~S,java.util.Locale");
15050 c$.NO_FALLBACK = c$.prototype.NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT);
15051 c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
15052 c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
15053 c$ = Clazz_p0p ();
15054 Clazz_defineStatics (c$,
15055 "INITIAL_CACHE_SIZE", 32);
15056 c$.NONEXISTENT_BUNDLE = c$.prototype.NONEXISTENT_BUNDLE = ((Clazz_isClassDefined ("java.util.ResourceBundle$1") ? 0 : java.util.ResourceBundle.$ResourceBundle$1$ ()), Clazz_innerTypeInstance (java.util.ResourceBundle$1, this, null));
15057 c$.cacheList = c$.prototype.cacheList =  new java.util.HashMap (32);
15058 });
15059 Clazz_declarePackage ("java.applet");
15060 Clazz_load (["java.awt.Panel"], "java.applet.Applet", ["java.net.URL", "java.util.Locale"], function () {
15061 c$ = Clazz_decorateAsClass (function () {
15062 this.stub = null;
15063 Clazz_instantialize (this, arguments);
15064 }, java.applet, "Applet", java.awt.Panel);
15065 Clazz_makeConstructor (c$, 
15066 function () {
15067 Clazz_superConstructor (this, java.applet.Applet, []);
15068 this.setPanel ();
15069 });
15070 Clazz_defineMethod (c$, "setStub", 
15071 function (stub) {
15072 this.stub = stub;
15073 }, "java.applet.AppletStub");
15074 Clazz_defineMethod (c$, "isActive", 
15075 function () {
15076 if (this.stub != null) {
15077 return this.stub.isActive ();
15078 } else {
15079 return false;
15080 }});
15081 Clazz_defineMethod (c$, "getDocumentBase", 
15082 function () {
15083 return this.stub.getDocumentBase ();
15084 });
15085 Clazz_defineMethod (c$, "getCodeBase", 
15086 function () {
15087 return this.stub.getCodeBase ();
15088 });
15089 Clazz_defineMethod (c$, "getParameter", 
15090 function (name) {
15091 return this.stub.getParameter (name);
15092 }, "~S");
15093 Clazz_defineMethod (c$, "getAppletContext", 
15094 function () {
15095 return this.stub.getAppletContext ();
15096 });
15097 Clazz_defineMethod (c$, "resize", 
15098 function (width, height) {
15099 var d = this.size ();
15100 if ((d.width != width) || (d.height != height)) {
15101 Clazz_superCall (this, java.applet.Applet, "resize", [width, height]);
15102 if (this.stub != null) {
15103 this.stub.appletResize (width, height);
15104 }}}, "~N,~N");
15105 Clazz_defineMethod (c$, "resize", 
15106 function (d) {
15107 this.resize (d.width, d.height);
15108 }, "java.awt.Dimension");
15109 Clazz_defineMethod (c$, "showStatus", 
15110 function (msg) {
15111 this.getAppletContext ().showStatus (msg);
15112 }, "~S");
15113 Clazz_defineMethod (c$, "getImage", 
15114 function (url) {
15115 return this.getAppletContext ().getImage (url);
15116 }, "java.net.URL");
15117 Clazz_defineMethod (c$, "getImage", 
15118 function (url, name) {
15119 try {
15120 return this.getImage ( new java.net.URL (url, name));
15121 } catch (e) {
15122 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
15123 return null;
15124 } else {
15125 throw e;
15126 }
15127 }
15128 }, "java.net.URL,~S");
15129 Clazz_defineMethod (c$, "getAppletInfo", 
15130 function () {
15131 return null;
15132 });
15133 Clazz_defineMethod (c$, "getLocale", 
15134 function () {
15135 var locale = Clazz_superCall (this, java.applet.Applet, "getLocale", []);
15136 if (locale == null) {
15137 return java.util.Locale.getDefault ();
15138 }return locale;
15139 });
15140 Clazz_defineMethod (c$, "getParameterInfo", 
15141 function () {
15142 return null;
15143 });
15144 Clazz_defineMethod (c$, "init", 
15145 function () {
15146 });
15147 Clazz_defineMethod (c$, "start", 
15148 function () {
15149 });
15150 Clazz_defineMethod (c$, "stop", 
15151 function () {
15152 });
15153 Clazz_defineMethod (c$, "destroy", 
15154 function () {
15155 });
15156 });
15157 Clazz_declarePackage ("java.net");
15158 Clazz_load (["java.util.Hashtable"], "java.net.URL", ["java.io.IOException", "java.lang.Character", "$.Error", "java.net.MalformedURLException"], function () {
15159 c$ = Clazz_decorateAsClass (function () {
15160 this.protocol = null;
15161 this.host = null;
15162 this.port = -1;
15163 this.file = null;
15164 this.query = null;
15165 this.authority = null;
15166 this.path = null;
15167 this.userInfo = null;
15168 this.ref = null;
15169 this.handler = null;
15170 this.$hashCode = -1;
15171 Clazz_instantialize (this, arguments);
15172 }, java.net, "URL", null, java.io.Serializable);
15173 Clazz_makeConstructor (c$, 
15174 function (context, spec, handler) {
15175 {
15176 switch (arguments.length) {
15177 case 1:
15178 spec = context;context = handler = null;
15179 break;
15180 case 2:
15181 handler = null;
15182 break;
15183 case 3:
15184 if (context == null || Clazz_instanceOf(context, java.net.URL))
15185 break;
15186 default:
15187 alert("java.net.URL constructor format not supported");
15188 break;
15189 }
15190 context && context.valueOf && context.valueOf() == null && (context = null);
15191 }var original = spec;
15192 var i;
15193 var limit;
15194 var c;
15195 var start = 0;
15196 var newProtocol = null;
15197 var aRef = false;
15198 var isRelative = false;
15199 try {
15200 limit = spec.length;
15201 while ((limit > 0) && (spec.charAt (limit - 1) <= ' ')) {
15202 limit--;
15203 }
15204 while ((start < limit) && (spec.charAt (start) <= ' ')) {
15205 start++;
15206 }
15207 if (spec.regionMatches (true, start, "url:", 0, 4)) {
15208 start += 4;
15209 }if (start < spec.length && spec.charAt (start) == '#') {
15210 aRef = true;
15211 }for (i = start; !aRef && (i < limit) && ((c = spec.charCodeAt (i)) != 47); i++) {
15212 if (c == 58) {
15213 var s = spec.substring (start, i).toLowerCase ();
15214 if (this.isValidProtocol (s)) {
15215 newProtocol = s;
15216 start = i + 1;
15217 }break;
15218 }}
15219 this.protocol = newProtocol;
15220 if ((context != null) && ((newProtocol == null) || newProtocol.equalsIgnoreCase (context.protocol))) {
15221 if (handler == null) {
15222 handler = context.handler;
15223 }if (context.path != null && context.path.startsWith ("/")) newProtocol = null;
15224 if (newProtocol == null) {
15225 this.protocol = context.protocol;
15226 this.authority = context.authority;
15227 this.userInfo = context.userInfo;
15228 this.host = context.host;
15229 this.port = context.port;
15230 this.file = context.file;
15231 this.path = context.path;
15232 isRelative = true;
15233 }}if (this.protocol == null) {
15234 throw  new java.net.MalformedURLException ("no protocol: " + original);
15235 }if (handler == null && (handler = java.net.URL.getURLStreamHandler (this.protocol)) == null) {
15236 throw  new java.net.MalformedURLException ("unknown protocol: " + this.protocol);
15237 }this.handler = handler;
15238 i = spec.indexOf ('#', start);
15239 if (i >= 0) {
15240 this.ref = spec.substring (i + 1, limit);
15241 limit = i;
15242 }if (isRelative && start == limit) {
15243 this.query = context.query;
15244 if (this.ref == null) {
15245 this.ref = context.ref;
15246 }}handler.parseURL (this, spec, start, limit);
15247 } catch (e$$) {
15248 if (Clazz_exceptionOf (e$$, java.net.MalformedURLException)) {
15249 var e = e$$;
15250 {
15251 throw e;
15252 }
15253 } else if (Clazz_exceptionOf (e$$, Exception)) {
15254 var e = e$$;
15255 {
15256 var exception =  new java.net.MalformedURLException (e.getMessage ());
15257 exception.initCause (e);
15258 throw exception;
15259 }
15260 } else {
15261 throw e$$;
15262 }
15263 }
15264 }, "java.net.URL,~S,java.net.URLStreamHandler");
15265 Clazz_defineMethod (c$, "isValidProtocol", 
15266  function (protocol) {
15267 var len = protocol.length;
15268 if (len < 1) return false;
15269 var c = protocol.charAt (0);
15270 if (!Character.isLetter (c)) return false;
15271 for (var i = 1; i < len; i++) {
15272 c = protocol.charAt (i);
15273 if (!Character.isLetterOrDigit (c) && c != '.' && c != '+' && c != '-') {
15274 return false;
15275 }}
15276 return true;
15277 }, "~S");
15278 Clazz_defineMethod (c$, "set5", 
15279 function (protocol, host, port, file, ref) {
15280 {
15281 this.protocol = protocol;
15282 this.host = host;
15283 this.authority = port == -1 ? host : host + ":" + port;
15284 this.port = port;
15285 this.file = file;
15286 this.ref = ref;
15287 this.$hashCode = -1;
15288 var q = file.lastIndexOf ('?');
15289 if (q != -1) {
15290 this.query = file.substring (q + 1);
15291 this.path = file.substring (0, q);
15292 } else this.path = file;
15293 }}, "~S,~S,~N,~S,~S");
15294 Clazz_defineMethod (c$, "set", 
15295 function (protocol, host, port, authority, userInfo, path, query, ref) {
15296 {
15297 this.protocol = protocol;
15298 this.host = host;
15299 this.port = port;
15300 this.file = query == null ? path : path + "?" + query;
15301 this.userInfo = userInfo;
15302 this.path = path;
15303 this.ref = ref;
15304 this.$hashCode = -1;
15305 this.query = query;
15306 this.authority = authority;
15307 }}, "~S,~S,~N,~S,~S,~S,~S,~S");
15308 Clazz_defineMethod (c$, "getQuery", 
15309 function () {
15310 return this.query;
15311 });
15312 Clazz_defineMethod (c$, "getPath", 
15313 function () {
15314 return this.path;
15315 });
15316 Clazz_defineMethod (c$, "getUserInfo", 
15317 function () {
15318 return this.userInfo;
15319 });
15320 Clazz_defineMethod (c$, "getAuthority", 
15321 function () {
15322 return this.authority;
15323 });
15324 Clazz_defineMethod (c$, "getPort", 
15325 function () {
15326 return this.port;
15327 });
15328 Clazz_defineMethod (c$, "getDefaultPort", 
15329 function () {
15330 return this.handler.getDefaultPort ();
15331 });
15332 Clazz_defineMethod (c$, "getProtocol", 
15333 function () {
15334 return this.protocol;
15335 });
15336 Clazz_defineMethod (c$, "getHost", 
15337 function () {
15338 return this.host;
15339 });
15340 Clazz_defineMethod (c$, "getFile", 
15341 function () {
15342 return this.file;
15343 });
15344 Clazz_defineMethod (c$, "getRef", 
15345 function () {
15346 return this.ref;
15347 });
15348 Clazz_overrideMethod (c$, "equals", 
15349 function (obj) {
15350 if (!(Clazz_instanceOf (obj, java.net.URL))) return false;
15351 var u2 = obj;
15352 return this.handler.equals2 (this, u2);
15353 }, "~O");
15354 Clazz_overrideMethod (c$, "hashCode", 
15355 function () {
15356 if (this.$hashCode != -1) return this.$hashCode;
15357 this.$hashCode = this.handler.hashCode (this);
15358 return this.$hashCode;
15359 });
15360 Clazz_defineMethod (c$, "sameFile", 
15361 function (other) {
15362 return this.handler.sameFile (this, other);
15363 }, "java.net.URL");
15364 Clazz_overrideMethod (c$, "toString", 
15365 function () {
15366 return this.toExternalForm ();
15367 });
15368 Clazz_defineMethod (c$, "toExternalForm", 
15369 function () {
15370 return this.handler.toExternalForm (this);
15371 });
15372 Clazz_defineMethod (c$, "openConnection", 
15373 function () {
15374 return this.handler.openConnection (this);
15375 });
15376 Clazz_defineMethod (c$, "openStream", 
15377 function () {
15378 return this.openConnection ().getInputStream ();
15379 });
15380 Clazz_defineMethod (c$, "getContent", 
15381 function () {
15382 return this.openConnection ().getInputStream ();
15383 });
15384 c$.setURLStreamHandlerFactory = Clazz_defineMethod (c$, "setURLStreamHandlerFactory", 
15385 function (fac) {
15386 {
15387 if (java.net.URL.factory != null) {
15388 throw  new Error ("factory already defined");
15389 }var security = System.getSecurityManager ();
15390 if (security != null) {
15391 security.checkSetFactory ();
15392 }java.net.URL.handlers.clear ();
15393 java.net.URL.factory = fac;
15394 }}, "java.net.URLStreamHandlerFactory");
15395 c$.getURLStreamHandler = Clazz_defineMethod (c$, "getURLStreamHandler", 
15396 function (protocol) {
15397 var handler = java.net.URL.handlers.get (protocol);
15398 if (handler == null) {
15399 if (java.net.URL.factory != null) {
15400 handler = java.net.URL.factory.createURLStreamHandler (protocol);
15401 }}return handler;
15402 }, "~S");
15403 Clazz_defineStatics (c$,
15404 "factory", null);
15405 c$.handlers = c$.prototype.handlers =  new java.util.Hashtable ();
15406 c$.streamHandlerLock = c$.prototype.streamHandlerLock =  new Clazz._O ();
15407 });
15408
15409 // modified by Bob Hanson 3/21/2014 6:44:21 AM  to reduce this.b$[....] phrases to simply this.h$
15410 // BH added ability to use a non-Java key for HTML elements, for example.
15411 // BH 8/24/2014 8:48:58 PM all synchronization and inner classes removed
15412
15413
15414 Clazz_load([],"java.util.HashtableIterator",[],function(){
15415 c$=Clazz_decorateAsClass(function(){
15416 this.position=0;
15417 this.expectedModCount=0;
15418 this.type=null;
15419 this.lastEntry=null;
15420 this.lastPosition=0;
15421 this.canRemove=false;
15422 Clazz_instantialize(this,arguments);
15423 },java.util,"HashtableIterator",null,java.util.Iterator);
15424 Clazz_makeConstructor(c$,
15425 function(a){
15426 this.type=a;
15427 this.h$ = a.h$;
15428 this.position=this.h$.lastSlot;
15429 this.expectedModCount=this.h$.modCount;
15430 },"java.util.AbstractSet");
15431 Clazz_overrideMethod(c$,"hasNext",
15432 function(){
15433 if(this.lastEntry&&this.lastEntry.next){
15434 return true;
15435 }while(this.position>=this.h$.firstSlot){
15436 if(this.h$.elementData[this.position]==null){
15437 this.position--;
15438 }else{
15439 return true;
15440 }}
15441 return false;
15442 });
15443 Clazz_overrideMethod(c$,"next",
15444 function(){
15445 if(this.expectedModCount==this.h$.modCount){
15446 if(this.lastEntry){
15447 this.lastEntry=this.lastEntry.next;
15448 }if(this.lastEntry==null){
15449 while(this.position>=this.h$.firstSlot&&(this.lastEntry=this.h$.elementData[this.position])==null){
15450 this.position--;
15451 }
15452 if(this.lastEntry){
15453 this.lastPosition=this.position;
15454 this.position--;
15455 }}if(this.lastEntry){
15456 this.canRemove=true;
15457 return this.type.get(this.lastEntry);
15458 }throw new java.util.NoSuchElementException();
15459 }throw new java.util.ConcurrentModificationException();
15460 });
15461 Clazz_overrideMethod(c$,"remove",
15462 function(){
15463 if(this.expectedModCount==this.h$.modCount){
15464 if(this.canRemove){
15465 this.canRemove=false;
15466 {
15467 var a=false;
15468 var b=this.h$.elementData[this.lastPosition];
15469 if(b===this.lastEntry){
15470 this.h$.elementData[this.lastPosition]=b.next;
15471 a=true;
15472 }else{
15473 while(b&&b.next!==this.lastEntry){
15474 b=b.next;
15475 }
15476 if(b){
15477 b.next=this.lastEntry.next;
15478 a=true;
15479 }}if(a){
15480 this.h$.modCount++;
15481 this.h$.elementCount--;
15482 this.expectedModCount++;
15483 return;
15484 }}}else{
15485 throw new IllegalStateException();
15486 }}throw new java.util.ConcurrentModificationException();
15487 });
15488 });
15489
15490
15491
15492 ////////////////////////////
15493
15494
15495 Clazz_load([],"java.util.HashtableEnumerator",[],function(){
15496 c$=Clazz_decorateAsClass(function(){
15497 this.key=false;
15498 this.start=0;
15499 this.entry=null;
15500 Clazz_instantialize(this,arguments);
15501 },java.util,"HashtableEnumerator",null,java.util.Enumeration);
15502
15503 Clazz_makeConstructor(c$,
15504 function(a, b){
15505 this.key = a;
15506 this.h$ = b;
15507 if (this.h$)this.start=this.h$.lastSlot+1;
15508 },"~B,java.util.Hashtable");
15509 Clazz_overrideMethod(c$,"hasMoreElements",
15510 function(){
15511 if (!this.h$)return false;
15512 if(this.entry)return true;
15513
15514 while(--this.start>=this.h$.firstSlot){
15515 if(this.h$.elementData[this.start]){
15516 this.entry=this.h$.elementData[this.start];
15517 return true;
15518 }}
15519 return false;
15520 });
15521 Clazz_overrideMethod(c$,"nextElement",
15522 function(){
15523 if(this.hasMoreElements()){
15524 var a=this.key?this.entry.key:this.entry.value;
15525 this.entry=this.entry.next;
15526 return a;
15527 }
15528 throw new java.util.NoSuchElementException();
15529 });
15530 });
15531
15532 ////////////////////////////
15533
15534 Clazz_load([],"java.util.HashtableEntrySet",[],function(){
15535 c$=Clazz_decorateAsClass(function(){
15536 Clazz_instantialize(this,arguments);
15537 },java.util,"HashtableEntrySet",java.util.AbstractSet);
15538
15539 Clazz_makeConstructor(c$,
15540 function(a){
15541 this.h$ = a;
15542 },"java.util.Hashtable");
15543 Clazz_overrideMethod(c$,"size",
15544 function(){
15545 return this.h$.elementCount;
15546 });
15547 Clazz_overrideMethod(c$,"clear",
15548 function(){
15549 this.h$.clear();
15550 });
15551 Clazz_overrideMethod(c$,"remove",
15552 function(object){
15553 if(this.contains(object)){
15554 this.h$.remove((object).getKey());
15555 return true;
15556 }return false;
15557 },"~O");
15558 Clazz_defineMethod(c$,"contains",
15559 function(object){
15560 var entry=this.h$.getEntry((object).getKey());
15561 return object.equals(entry);
15562 },"~O");
15563
15564 Clazz_overrideMethod(c$,"get",
15565 function(entry){
15566 return entry;
15567 },"java.util.MapEntry");
15568
15569 Clazz_defineMethod(c$,"iterator",
15570 function(){
15571 return new java.util.HashtableIterator(this);
15572 });
15573 });
15574
15575
15576 ////////////////////////////
15577
15578 Clazz_load([],"java.util.HashtableKeySet",[],function(){
15579 c$=Clazz_decorateAsClass(function(){
15580 Clazz_instantialize(this,arguments);
15581 },java.util,"HashtableKeySet",java.util.AbstractSet);
15582
15583 Clazz_makeConstructor(c$,
15584 function(a){
15585 this.h$ = a;
15586 },"java.util.Hashtable");
15587
15588 Clazz_overrideMethod(c$,"contains",
15589 function(object){
15590 return this.h$.containsKey(object);
15591 },"~O");
15592 Clazz_overrideMethod(c$,"size",
15593 function(){
15594 return this.h$.elementCount;
15595 });
15596 Clazz_overrideMethod(c$,"clear",
15597 function(){
15598 this.h$.clear();
15599 });
15600 Clazz_overrideMethod(c$,"remove",
15601 function(key){
15602 if(this.h$.containsKey(key)){
15603 this.h$.remove(key);
15604 return true;
15605 }return false;
15606 },"~O");
15607
15608 Clazz_overrideMethod(c$,"get",
15609 function(entry){
15610 return entry.key;
15611 },"java.util.MapEntry");
15612
15613 Clazz_overrideMethod(c$,"iterator",
15614 function(){
15615 return new java.util.HashtableIterator(this);
15616 });
15617 });
15618
15619 ////////////////////////////
15620
15621 Clazz_load([],"java.util.HashtableValueCollection",[],function(){
15622 c$=Clazz_decorateAsClass(function(){
15623 Clazz_instantialize(this,arguments);
15624 },java.util,"HashtableValueCollection",null,java.util.AbstractCollection);
15625
15626 Clazz_makeConstructor(c$,
15627 function(a){
15628 this.h$ = a;
15629 },"java.util.Hashtable");
15630 Clazz_overrideMethod(c$,"contains",
15631 function(object){
15632 return this.h$.contains(object);
15633 },"~O");
15634 Clazz_overrideMethod(c$,"size",
15635 function(){
15636 return this.h$.elementCount;
15637 });
15638 Clazz_overrideMethod(c$,"clear",
15639 function(){
15640 this.h$.clear();
15641 });
15642
15643 Clazz_overrideMethod(c$,"get",
15644 function(entry){
15645 return entry.value;
15646 },"java.util.MapEntry");
15647
15648 Clazz_overrideMethod(c$,"iterator",
15649 function(){
15650 return new java.util.HashtableIterator(this);
15651 });
15652 });
15653 ////////////////////////////
15654
15655
15656 Clazz_load(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){
15657 c$=Clazz_decorateAsClass(function(){
15658 this.next=null;
15659 this.hashcode=0;
15660 Clazz_instantialize(this,arguments);
15661 },java.util,"HashtableEntry",java.util.MapEntry);
15662 Clazz_overrideConstructor(c$,
15663 function(a,b){
15664 this.key = a;
15665 this.value = b;
15666 this.hashcode=a.hashCode();
15667 });
15668 Clazz_defineMethod(c$,"clone",
15669 function(){
15670 var a=Clazz_superCall(this,java.util.HashtableEntry,"clone",[]);
15671 if(this.next!=null){
15672 a.next=this.next.clone();
15673 }
15674 return a;
15675 });
15676 Clazz_overrideMethod(c$,"setValue",
15677 function(a){
15678 if(a==null){
15679 throw new NullPointerException();
15680 }var b=this.value;
15681 this.value=a;
15682 return b;
15683 },"~O");
15684 Clazz_defineMethod(c$,"getKeyHash",
15685 function(){
15686 return this.key.hashCode();
15687 });
15688 Clazz_defineMethod(c$,"equalsKey",
15689 function(a,b){
15690 return this.hashcode==(!a.hashCode || a.hashCode())&&this.key.equals(a);
15691 },"~O,~N");
15692 Clazz_overrideMethod(c$,"toString",
15693 function(){
15694 return this.key+"="+this.value;
15695 });
15696 });
15697
15698
15699
15700 ////////////////////////////
15701
15702
15703 Clazz_load(["java.util.Dictionary","$.Enumeration","$.HashtableEnumerator","$.Iterator","$.Map","$.MapEntry","$.NoSuchElementException"],"java.util.Hashtable",["java.lang.IllegalArgumentException","$.IllegalStateException","$.NullPointerException","$.StringBuilder","java.util.AbstractCollection","$.AbstractSet","$.Arrays","$.Collections","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.HashtableEntry"],function(){
15704 c$=Clazz_decorateAsClass(function(){
15705 this.elementCount=0;
15706 this.elementData=null;
15707 this.loadFactor=0;
15708 this.threshold=0;
15709 this.firstSlot=0;
15710 this.lastSlot=-1;
15711 this.modCount=0;
15712 Clazz_instantialize(this,arguments);
15713 },java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);   
15714 c$.newEntry=Clazz_defineMethod(c$,"newEntry",
15715 ($fz=function(key,value,hash){
15716 return new java.util.HashtableEntry(key,value);
15717 },$fz.isPrivate=true,$fz),"~O,~O,~N");
15718 Clazz_overrideConstructor(c$,
15719 function(){
15720 this.elementCount=0;
15721 this.elementData=this.newElementArray(11);
15722 this.firstSlot=this.elementData.length;
15723 this.loadFactor=0.75;
15724 this.computeMaxSize();
15725 });
15726 Clazz_defineMethod(c$,"newElementArray",
15727 ($fz=function(size){
15728 return new Array(size);
15729 },$fz.isPrivate=true,$fz),"~N");
15730 Clazz_overrideMethod(c$,"clear",
15731 function(){
15732 this.elementCount=0;
15733 for (var i = this.elementData.length; --i >= 0;)
15734           this.elementData[i] = null;
15735 this.modCount++;
15736 });
15737 Clazz_defineMethod(c$,"clone",
15738 function(){
15739 try{
15740 var hashtable=Clazz_superCall(this,java.util.Hashtable,"clone",[]);
15741 hashtable.elementData=this.elementData.clone();
15742 var entry;
15743 for(var i=this.elementData.length;--i>=0;){
15744 if((entry=this.elementData[i])){
15745 hashtable.elementData[i]=entry.clone();
15746 }}
15747 return hashtable;
15748 }catch(e){
15749 if(Clazz_instanceOf(e,CloneNotSupportedException)){
15750 return null;
15751 }else{
15752 throw e;
15753 }
15754 }
15755 });
15756 Clazz_defineMethod(c$,"computeMaxSize",
15757 ($fz=function(){
15758 this.threshold=Math.round((this.elementData.length*this.loadFactor));
15759 },$fz.isPrivate=true,$fz));
15760 Clazz_defineMethod(c$,"contains",
15761 function(value){
15762 if(value==null){
15763 throw new NullPointerException();
15764 }for(var i=this.elementData.length;--i>=0;){
15765 var entry=this.elementData[i];
15766 while(entry){
15767 if(value.equals(entry.value)){
15768 return true;
15769 }entry=entry.next;
15770 }
15771 }
15772 return false;
15773 },"~O");
15774 Clazz_overrideMethod(c$,"containsKey",
15775 function(key){
15776         if(!key.hashCode)  {
15777           key.hashCode = function(){return 1};
15778           if (!key.equals)
15779                 key.equals = function(a) {return this == a};
15780         }
15781 return this.getEntry(key)!=null ;
15782 },"~O");
15783 Clazz_overrideMethod(c$,"containsValue",
15784 function(value){
15785 return this.contains(value);
15786 },"~O");
15787 Clazz_overrideMethod(c$,"elements",
15788 function(){
15789 if(this.elementCount==0){
15790 return java.util.Hashtable.EMPTY_ENUMERATION;
15791 }
15792 return new java.util.HashtableEnumerator(false, this);
15793 });
15794 Clazz_overrideMethod(c$,"entrySet",
15795 function(){
15796 return new java.util.HashtableEntrySet(this);
15797 });
15798 Clazz_overrideMethod(c$,"equals",
15799 function(object){
15800 if(this===object){
15801 return true;
15802 }if(Clazz_instanceOf(object,java.util.Map)){
15803 var map=object;
15804 if(this.size()!=map.size()){
15805 return false;
15806 }var entries=this.entrySet();
15807 for(var e,$e=map.entrySet().iterator();$e.hasNext()&&((e=$e.next())||true);){
15808 if(!entries.contains(e)){
15809 return false;
15810 }}
15811 return true;
15812 }return false;
15813 },"~O");
15814 Clazz_overrideMethod(c$,"get",
15815 function(key){
15816         if(!key.hashCode) { 
15817           key.hashCode = function(){return 1};
15818         if (!key.equals)
15819                 key.equals = function(a) {return this == a};
15820         }
15821 var hash=key.hashCode();
15822 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15823 var entry=this.elementData[index];
15824 while(entry){
15825 if(entry.equalsKey(key,hash)){
15826 return entry.value;
15827 }entry=entry.next;
15828 }
15829 return null;
15830 },"~O");
15831 Clazz_defineMethod(c$,"getEntry",
15832 function(key){
15833 var hash=key.hashCode();
15834 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15835 var entry=this.elementData[index];
15836 while(entry){
15837 if(entry.equalsKey(key,hash)){
15838 return entry;
15839 }entry=entry.next;
15840 }
15841 return null;
15842 },"~O");
15843 Clazz_overrideMethod(c$,"hashCode",
15844 function(){
15845 var result=0;
15846 var it=this.entrySet().iterator();
15847 while(it.hasNext()){
15848 var entry=it.next();
15849 var key=entry.getKey();
15850 var value=entry.getValue();
15851 var hash=(key!==this?key.hashCode():0)^(value!==this?(value!=null?value.hashCode():0):0);
15852 result+=hash;
15853 }
15854 return result;
15855 });
15856 Clazz_overrideMethod(c$,"isEmpty",
15857 function(){
15858 return this.elementCount==0;
15859 });
15860 Clazz_overrideMethod(c$,"keys",
15861 function(){
15862 if(this.elementCount==0){
15863 return java.util.Hashtable.EMPTY_ENUMERATION;
15864 }
15865 return new java.util.HashtableEnumerator(true, this); 
15866 });
15867 Clazz_overrideMethod(c$,"keySet",
15868 function(){
15869 return new java.util.HashtableKeySet(this);
15870 });
15871 Clazz_overrideMethod(c$,"put",
15872 function(key,value){
15873 if(key!=null&&value!=null){
15874         if(!key.hashCode)  {
15875           key.hashCode = function(){return 1};
15876           if (!key.equals)
15877                 key.equals = function(a) {return this == a};
15878         }
15879         var hash=key.hashCode();
15880         var index=(hash&0x7FFFFFFF)%this.elementData.length;
15881         var entry=this.elementData[index];
15882         while(entry!=null&&!entry.equalsKey(key,hash)){
15883         entry=entry.next;
15884 }
15885 if(entry==null){
15886 this.modCount++;
15887 if(++this.elementCount>this.threshold){
15888 this.rehash();
15889 index=(hash&0x7FFFFFFF)%this.elementData.length;
15890 }if(index<this.firstSlot){
15891 this.firstSlot=index;
15892 }if(index>this.lastSlot){
15893 this.lastSlot=index;
15894 }
15895
15896 entry=java.util.Hashtable.newEntry(key,value,hash);
15897 entry.next=this.elementData[index];
15898 this.elementData[index]=entry;
15899 return null;
15900 }var result=entry.value;
15901 entry.value=value;
15902 return result;
15903 }throw new NullPointerException();
15904 },"~O,~O");
15905 Clazz_overrideMethod(c$,"putAll",
15906 function(map){
15907 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
15908 this.put(entry.getKey(),entry.getValue());
15909 }
15910 },"java.util.Map");
15911
15912 Clazz_defineMethod(c$,"rehash",
15913 function(){
15914 var length=(this.elementData.length<<1)+1;
15915 if(length==0){
15916 length=1;
15917 }var newFirst=length;
15918 var newLast=-1;
15919 var newData=this.newElementArray(length);
15920 for(var i=this.lastSlot+1;--i>=this.firstSlot;){
15921 var entry=this.elementData[i];
15922 while(entry!=null){
15923 var index=(entry.getKeyHash()&0x7FFFFFFF)%length;
15924 if(index<newFirst){
15925 newFirst=index;
15926 }if(index>newLast){
15927 newLast=index;
15928 }var next=entry.next;
15929 entry.next=newData[index];
15930 newData[index]=entry;
15931 entry=next;
15932 }
15933 }
15934 this.firstSlot=newFirst;
15935 this.lastSlot=newLast;
15936 this.elementData=newData;
15937 this.computeMaxSize();
15938 });
15939 Clazz_overrideMethod(c$,"remove",
15940 function(key){
15941 var hash=key.hashCode();
15942 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15943 var last=null;
15944 var entry=this.elementData[index];
15945 while(entry!=null&&!entry.equalsKey(key,hash)){
15946 last=entry;
15947 entry=entry.next;
15948 }
15949 if(entry!=null){
15950 this.modCount++;
15951 if(last==null){
15952 this.elementData[index]=entry.next;
15953 }else{
15954 last.next=entry.next;
15955 }this.elementCount--;
15956 var result=entry.value;
15957 entry.value=null;
15958 return result;
15959 }return null;
15960 },"~O");
15961 Clazz_overrideMethod(c$,"size",
15962 function(){
15963 return this.elementCount;
15964 });
15965 Clazz_overrideMethod(c$,"toString",
15966 function(){
15967 if(this.isEmpty()){
15968 return"{}";
15969 }var buffer=new StringBuilder(this.size()*28);
15970 buffer.append('{');
15971 for(var i=this.lastSlot;i>=this.firstSlot;i--){
15972 var entry=this.elementData[i];
15973 while(entry!=null){
15974 if(entry.key!==this){
15975 buffer.append(entry.key);
15976 }else{
15977 buffer.append("(this Map)");
15978 }buffer.append('=');
15979 if(entry.value!==this){
15980 buffer.append(entry.value);
15981 }else{
15982 buffer.append("(this Map)");
15983 }buffer.append(", ");
15984 entry=entry.next;
15985 }
15986 }
15987 if(this.elementCount>0){
15988 buffer.setLength(buffer.length()-2);
15989 }buffer.append('}');
15990 return buffer.toString();
15991 });
15992 Clazz_overrideMethod(c$,"values",
15993 function(){
15994 return new java.util.HashtableValueCollection(this);
15995 });
15996 java.util.Hashtable.EMPTY_ENUMERATION = new java.util.HashtableEnumerator();
15997 });
15998 c$=Clazz_declareType(java.util,"Dictionary");
15999 Clazz_makeConstructor(c$,
16000 function(){
16001 });
16002 Clazz_declarePackage ("java.net");
16003 Clazz_load (["java.io.IOException"], "java.net.MalformedURLException", null, function () {
16004 c$ = Clazz_declareType (java.net, "MalformedURLException", java.io.IOException);
16005 Clazz_makeConstructor (c$, 
16006 function () {
16007 Clazz_superConstructor (this, java.net.MalformedURLException, []);
16008 });
16009 });
16010 Clazz_declarePackage ("java.awt");
16011 Clazz_load (null, "java.awt.GraphicsEnvironment", ["swingjs.JSToolkit"], function () {
16012 c$ = Clazz_declareType (java.awt, "GraphicsEnvironment");
16013 Clazz_makeConstructor (c$, 
16014 function () {
16015 });
16016 c$.getLocalGraphicsEnvironment = Clazz_defineMethod (c$, "getLocalGraphicsEnvironment", 
16017 function () {
16018 if (java.awt.GraphicsEnvironment.localEnv == null) {
16019 java.awt.GraphicsEnvironment.localEnv = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsEnvironment");
16020 }return java.awt.GraphicsEnvironment.localEnv;
16021 });
16022 c$.isHeadless = Clazz_defineMethod (c$, "isHeadless", 
16023 function () {
16024 return false;
16025 });
16026 c$.getHeadlessProperty = Clazz_defineMethod (c$, "getHeadlessProperty", 
16027  function () {
16028 return false;
16029 });
16030 c$.checkHeadless = Clazz_defineMethod (c$, "checkHeadless", 
16031 function () {
16032 });
16033 Clazz_defineMethod (c$, "isHeadlessInstance", 
16034 function () {
16035 return java.awt.GraphicsEnvironment.getHeadlessProperty ();
16036 });
16037 Clazz_defineMethod (c$, "registerFont", 
16038 function (font) {
16039 return true;
16040 }, "java.awt.Font");
16041 Clazz_defineMethod (c$, "preferLocaleFonts", 
16042 function () {
16043 });
16044 Clazz_defineMethod (c$, "preferProportionalFonts", 
16045 function () {
16046 });
16047 Clazz_defineMethod (c$, "getCenterPoint", 
16048 function () {
16049 return null;
16050 });
16051 Clazz_defineStatics (c$,
16052 "localEnv", null);
16053 });
16054 Clazz_declarePackage ("java.awt.event");
16055 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.WindowEvent", ["java.awt.Window", "jssun.awt.AppContext", "$.SunToolkit"], function () {
16056 c$ = Clazz_decorateAsClass (function () {
16057 this.opposite = null;
16058 this.oldState = 0;
16059 this.newState = 0;
16060 Clazz_instantialize (this, arguments);
16061 }, java.awt.event, "WindowEvent", java.awt.event.ComponentEvent);
16062 Clazz_makeConstructor (c$, 
16063 function (source, id, opposite, oldState, newState) {
16064 Clazz_superConstructor (this, java.awt.event.WindowEvent, [source, id]);
16065 this.opposite = opposite;
16066 this.oldState = oldState;
16067 this.newState = newState;
16068 }, "java.awt.Window,~N,java.awt.Window,~N,~N");
16069 Clazz_makeConstructor (c$, 
16070 function (source, id, opposite) {
16071 this.construct (source, id, opposite, 0, 0);
16072 }, "java.awt.Window,~N,java.awt.Window");
16073 Clazz_makeConstructor (c$, 
16074 function (source, id, oldState, newState) {
16075 this.construct (source, id, null, oldState, newState);
16076 }, "java.awt.Window,~N,~N,~N");
16077 Clazz_makeConstructor (c$, 
16078 function (source, id) {
16079 this.construct (source, id, null, 0, 0);
16080 }, "java.awt.Window,~N");
16081 Clazz_defineMethod (c$, "getWindow", 
16082 function () {
16083 return (Clazz_instanceOf (this.source, java.awt.Window)) ? this.source : null;
16084 });
16085 Clazz_defineMethod (c$, "getOppositeWindow", 
16086 function () {
16087 if (this.opposite == null) {
16088 return null;
16089 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
16090 });
16091 Clazz_defineMethod (c$, "getOldState", 
16092 function () {
16093 return this.oldState;
16094 });
16095 Clazz_defineMethod (c$, "getNewState", 
16096 function () {
16097 return this.newState;
16098 });
16099 Clazz_overrideMethod (c$, "paramString", 
16100 function () {
16101 var typeStr;
16102 switch (this.id) {
16103 case 200:
16104 typeStr = "WINDOW_OPENED";
16105 break;
16106 case 201:
16107 typeStr = "WINDOW_CLOSING";
16108 break;
16109 case 202:
16110 typeStr = "WINDOW_CLOSED";
16111 break;
16112 case 203:
16113 typeStr = "WINDOW_ICONIFIED";
16114 break;
16115 case 204:
16116 typeStr = "WINDOW_DEICONIFIED";
16117 break;
16118 case 205:
16119 typeStr = "WINDOW_ACTIVATED";
16120 break;
16121 case 206:
16122 typeStr = "WINDOW_DEACTIVATED";
16123 break;
16124 case 207:
16125 typeStr = "WINDOW_GAINED_FOCUS";
16126 break;
16127 case 208:
16128 typeStr = "WINDOW_LOST_FOCUS";
16129 break;
16130 case 209:
16131 typeStr = "WINDOW_STATE_CHANGED";
16132 break;
16133 default:
16134 typeStr = "unknown type";
16135 }
16136 typeStr += ",opposite=" + this.getOppositeWindow () + ",oldState=" + this.oldState + ",newState=" + this.newState;
16137 return typeStr;
16138 });
16139 Clazz_defineStatics (c$,
16140 "WINDOW_FIRST", 200,
16141 "WINDOW_OPENED", 200,
16142 "WINDOW_CLOSING", 201,
16143 "WINDOW_CLOSED", 202,
16144 "WINDOW_ICONIFIED", 203,
16145 "WINDOW_DEICONIFIED", 204,
16146 "WINDOW_ACTIVATED", 205,
16147 "WINDOW_DEACTIVATED", 206,
16148 "WINDOW_GAINED_FOCUS", 207,
16149 "WINDOW_LOST_FOCUS", 208,
16150 "WINDOW_STATE_CHANGED", 209,
16151 "WINDOW_LAST", 209);
16152 });
16153 Clazz_declarePackage ("javax.swing");
16154 Clazz_load (["java.awt.Container", "javax.swing.Action", "java.util.ArrayList", "javax.swing.SwingUtilities", "javax.swing.event.EventListenerList", "jssun.awt.RequestFocusController"], "javax.swing.JComponent", ["java.lang.IllegalArgumentException", "java.util.HashSet", "$.Hashtable", "java.applet.Applet", "java.awt.Component", "$.Insets", "$.Rectangle", "$.Window", "java.beans.PropertyChangeListener", "java.util.Locale", "javax.swing.ActionMap", "$.AncestorNotifier", "$.ArrayTable", "$.CellRendererPane", "$.ClientPropertyKey", "$.ComponentInputMap", "$.InputMap", "$.JApplet", "$.JDialog", "$.JFrame", "$.JWindow", "$.KeyStroke", "$.KeyboardManager", "javax.swing.Popup.HeavyWeightWindow", "javax.swing.RepaintManager", "javax.swing.border.AbstractBorder", "javax.swing.event.AncestorListener", "jssun.font.FontDesignMetrics", "swingjs.JSToolkit"], function () {
16155 c$ = Clazz_decorateAsClass (function () {
16156 this.isAlignmentXSet = false;
16157 this.alignmentX = 0;
16158 this.isAlignmentYSet = false;
16159 this.alignmentY = 0;
16160 this.ui = null;
16161 this.listenerList = null;
16162 this.clientProperties = null;
16163 this.autoscrolls = false;
16164 this.border = null;
16165 this.flags = 0;
16166 this.verifyInputWhenFocusTarget = true;
16167 this.paintingChild = null;
16168 this.popupMenu = null;
16169 this.focusInputMap = null;
16170 this.ancestorInputMap = null;
16171 this.windowInputMap = null;
16172 this.actionMap = null;
16173 if (!Clazz_isClassDefined ("javax.swing.JComponent.ActionStandin")) {
16174 javax.swing.JComponent.$JComponent$ActionStandin$ ();
16175 }
16176 Clazz_instantialize (this, arguments);
16177 }, javax.swing, "JComponent", java.awt.Container);
16178 Clazz_prepareFields (c$, function () {
16179 this.listenerList =  new javax.swing.event.EventListenerList ();
16180 });
16181 c$.safelyGetGraphics = Clazz_defineMethod (c$, "safelyGetGraphics", 
16182 function (c, root) {
16183 {
16184 javax.swing.JComponent.componentObtainingGraphicsFrom = root;
16185 var g = c.getGraphics ();
16186 javax.swing.JComponent.componentObtainingGraphicsFrom = null;
16187 return g;
16188 }}, "java.awt.Component,java.awt.Component");
16189 c$.getGraphicsInvoked = Clazz_defineMethod (c$, "getGraphicsInvoked", 
16190 function (root) {
16191 if (!javax.swing.JComponent.isComponentObtainingGraphicsFrom (root)) {
16192 var rootPane = (root).getRootPane ();
16193 if (rootPane != null) {
16194 rootPane.disableTrueDoubleBuffering ();
16195 }}}, "java.awt.Component");
16196 c$.isComponentObtainingGraphicsFrom = Clazz_defineMethod (c$, "isComponentObtainingGraphicsFrom", 
16197  function (c) {
16198 {
16199 return (javax.swing.JComponent.componentObtainingGraphicsFrom === c);
16200 }}, "java.awt.Component");
16201 c$.getManagingFocusForwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusForwardTraversalKeys", 
16202 function () {
16203 {
16204 if (javax.swing.JComponent.managingFocusForwardTraversalKeys == null) {
16205 javax.swing.JComponent.managingFocusForwardTraversalKeys =  new java.util.HashSet (1);
16206 javax.swing.JComponent.managingFocusForwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 2));
16207 }}return javax.swing.JComponent.managingFocusForwardTraversalKeys;
16208 });
16209 c$.getManagingFocusBackwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusBackwardTraversalKeys", 
16210 function () {
16211 {
16212 if (javax.swing.JComponent.managingFocusBackwardTraversalKeys == null) {
16213 javax.swing.JComponent.managingFocusBackwardTraversalKeys =  new java.util.HashSet (1);
16214 javax.swing.JComponent.managingFocusBackwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 3));
16215 }}return javax.swing.JComponent.managingFocusBackwardTraversalKeys;
16216 });
16217 c$.fetchRectangle = Clazz_defineMethod (c$, "fetchRectangle", 
16218  function () {
16219 {
16220 var rect;
16221 var size = javax.swing.JComponent.tempRectangles.size ();
16222 if (size > 0) {
16223 rect = javax.swing.JComponent.tempRectangles.remove (size - 1);
16224 } else {
16225 rect =  new java.awt.Rectangle (0, 0, 0, 0);
16226 }return rect;
16227 }});
16228 c$.recycleRectangle = Clazz_defineMethod (c$, "recycleRectangle", 
16229  function (rect) {
16230 {
16231 javax.swing.JComponent.tempRectangles.add (rect);
16232 }}, "java.awt.Rectangle");
16233 Clazz_defineMethod (c$, "setInheritsPopupMenu", 
16234 function (value) {
16235 var oldValue = this.getFlag (23);
16236 this.setFlag (23, value);
16237 this.firePropertyChangeBool ("inheritsPopupMenu", oldValue, value);
16238 }, "~B");
16239 Clazz_defineMethod (c$, "getInheritsPopupMenu", 
16240 function () {
16241 return this.getFlag (23);
16242 });
16243 Clazz_defineMethod (c$, "setComponentPopupMenu", 
16244 function (popup) {
16245 if (popup != null) {
16246 this.enableEvents (16);
16247 }var oldPopup = this.popupMenu;
16248 this.popupMenu = popup;
16249 this.firePropertyChangeObject ("componentPopupMenu", oldPopup, popup);
16250 }, "javax.swing.JPopupMenu");
16251 Clazz_defineMethod (c$, "getComponentPopupMenu", 
16252 function () {
16253 if (!this.getInheritsPopupMenu ()) {
16254 return this.popupMenu;
16255 }if (this.popupMenu == null) {
16256 var parent = this.getParent ();
16257 while (parent != null) {
16258 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16259 return (parent).getComponentPopupMenu ();
16260 }if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
16261 break;
16262 }parent = parent.getParent ();
16263 }
16264 return null;
16265 }return this.popupMenu;
16266 });
16267 Clazz_makeConstructor (c$, 
16268 function () {
16269 Clazz_superConstructor (this, javax.swing.JComponent);
16270 this.enableEvents (8);
16271 Clazz_superCall (this, javax.swing.JComponent, "setLocale", [javax.swing.JComponent.getDefaultLocale ()]);
16272 });
16273 Clazz_defineMethod (c$, "updateUI", 
16274 function () {
16275 });
16276 Clazz_defineMethod (c$, "setUI", 
16277 function (newUI) {
16278 this.uninstallUIAndProperties ();
16279 this.ui = newUI;
16280 if (this.ui != null) {
16281 this.ui.installUI (this);
16282 }this.revalidate ();
16283 this.repaint ();
16284 }, "javax.swing.plaf.ComponentUI");
16285 Clazz_defineMethod (c$, "getUI", 
16286 function () {
16287 return this.ui;
16288 });
16289 Clazz_defineMethod (c$, "uninstallUIAndProperties", 
16290  function () {
16291 if (this.ui != null) {
16292 this.ui.uninstallUI (this);
16293 }});
16294 Clazz_defineMethod (c$, "getUIClassID", 
16295 function () {
16296 return "ComponentUI";
16297 });
16298 Clazz_defineMethod (c$, "getComponentGraphics", 
16299 function (g) {
16300 var componentGraphics = g;
16301 componentGraphics.setColor (this.getForeground ());
16302 componentGraphics.setFont (this.getFont ());
16303 return componentGraphics;
16304 }, "java.awt.Graphics");
16305 Clazz_defineMethod (c$, "paintComponent", 
16306 function (g) {
16307 if (this.ui != null) {
16308 var scratchGraphics = (g == null) ? null : g.createSwingJS ();
16309 try {
16310 this.ui.update (scratchGraphics, this);
16311 } finally {
16312 scratchGraphics.dispose ();
16313 }
16314 }}, "java.awt.Graphics");
16315 Clazz_defineMethod (c$, "paintChildren", 
16316 function (g) {
16317 var isJComponent;
16318 var sg = g;
16319 {
16320 var i = this.getComponentCount () - 1;
16321 if (i < 0) {
16322 return;
16323 }if (this.paintingChild != null && (Clazz_instanceOf (this.paintingChild, javax.swing.JComponent))) {
16324 for (; i >= 0; i--) {
16325 if (this.getComponent (i) === this.paintingChild) {
16326 break;
16327 }}
16328 }var tmpRect = javax.swing.JComponent.fetchRectangle ();
16329 for (; i >= 0; i--) {
16330 var comp = this.getComponent (i);
16331 isJComponent = (Clazz_instanceOf (comp, javax.swing.JComponent));
16332 if (comp != null && (isJComponent || javax.swing.JComponent.isLightweightComponent (comp)) && (comp.isVisible () == true)) {
16333 var cr = comp.getBounds (tmpRect);
16334 var cg = sg.create4 (cr.x, cr.y, cr.width, cr.height);
16335 cg.setColor (comp.getForeground ());
16336 cg.setFont (comp.getFont ());
16337 var shouldSetFlagBack = false;
16338 try {
16339 if (isJComponent) {
16340 (comp).paint (cg);
16341 } else {
16342 comp.paint (cg);
16343 }} finally {
16344 cg.dispose ();
16345 if (shouldSetFlagBack) {
16346 (comp).setFlag (1, false);
16347 (comp).setFlag (2, false);
16348 }}
16349 }}
16350 javax.swing.JComponent.recycleRectangle (tmpRect);
16351 }}, "java.awt.Graphics");
16352 Clazz_defineMethod (c$, "paintBorder", 
16353 function (g) {
16354 var border = this.getBorder ();
16355 if (border != null) {
16356 border.paintBorder (this, g, 0, 0, this.getWidth (), this.getHeight ());
16357 }}, "java.awt.Graphics");
16358 Clazz_overrideMethod (c$, "update", 
16359 function (g) {
16360 this.paint (g);
16361 }, "java.awt.Graphics");
16362 Clazz_overrideMethod (c$, "paint", 
16363 function (g) {
16364 var shouldClearPaintFlags = false;
16365 if ((this.getWidth () <= 0) || (this.getHeight () <= 0)) {
16366 return;
16367 }var componentGraphics = this.getComponentGraphics (g);
16368 var co = componentGraphics.createSwingJS ();
16369 try {
16370 if (this.getParent () != null && !(Clazz_instanceOf (this.getParent (), javax.swing.JComponent))) {
16371 this.adjustPaintFlags ();
16372 shouldClearPaintFlags = true;
16373 }this.paintComponent (co);
16374 this.paintBorder (co);
16375 this.paintChildren (co);
16376 } finally {
16377 co.dispose ();
16378 if (shouldClearPaintFlags) {
16379 this.setFlag (1, false);
16380 this.setFlag (2, false);
16381 this.setFlag (11, false);
16382 this.setFlag (12, false);
16383 }}
16384 }, "java.awt.Graphics");
16385 Clazz_defineMethod (c$, "paintForceDoubleBuffered", 
16386 function (g) {
16387 var rm = javax.swing.RepaintManager.currentManager (this);
16388 var clip = g.getClipBounds ();
16389 rm.beginPaint ();
16390 this.setFlag (13, true);
16391 try {
16392 rm.paint (this, this, g, clip.x, clip.y, clip.width, clip.height);
16393 } finally {
16394 rm.endPaint ();
16395 this.setFlag (13, false);
16396 }
16397 }, "java.awt.Graphics");
16398 Clazz_defineMethod (c$, "isPainting", 
16399 function () {
16400 var component = this;
16401 while (component != null) {
16402 if (Clazz_instanceOf (component, javax.swing.JComponent) && (component).getFlag (1)) {
16403 return true;
16404 }component = component.getParent ();
16405 }
16406 return false;
16407 });
16408 Clazz_defineMethod (c$, "adjustPaintFlags", 
16409  function () {
16410 var jparent = null;
16411 var parent;
16412 for (parent = this.getParent (); parent != null; parent = parent.getParent ()) {
16413 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16414 jparent = parent;
16415 if (jparent.getFlag (1)) this.setFlag (1, true);
16416 if (jparent.getFlag (2)) this.setFlag (2, true);
16417 if (jparent.getFlag (11)) this.setFlag (11, true);
16418 if (jparent.getFlag (12)) this.setFlag (12, true);
16419 break;
16420 }}
16421 });
16422 Clazz_overrideMethod (c$, "printAll", 
16423 function (g) {
16424 this.setFlag (12, true);
16425 try {
16426 this.print (g);
16427 } finally {
16428 this.setFlag (12, false);
16429 }
16430 }, "java.awt.Graphics");
16431 Clazz_overrideMethod (c$, "print", 
16432 function (g) {
16433 this.setFlag (11, true);
16434 this.firePropertyChangeBool ("paintingForPrint", false, true);
16435 try {
16436 this.paint (g);
16437 } finally {
16438 this.setFlag (11, false);
16439 this.firePropertyChangeBool ("paintingForPrint", true, false);
16440 }
16441 }, "java.awt.Graphics");
16442 Clazz_defineMethod (c$, "printComponent", 
16443 function (g) {
16444 this.paintComponent (g);
16445 }, "java.awt.Graphics");
16446 Clazz_defineMethod (c$, "printChildren", 
16447 function (g) {
16448 this.paintChildren (g);
16449 }, "java.awt.Graphics");
16450 Clazz_defineMethod (c$, "printBorder", 
16451 function (g) {
16452 this.paintBorder (g);
16453 }, "java.awt.Graphics");
16454 Clazz_defineMethod (c$, "isPaintingTile", 
16455 function () {
16456 return this.getFlag (2);
16457 });
16458 Clazz_defineMethod (c$, "isPaintingForPrint", 
16459 function () {
16460 return this.getFlag (11);
16461 });
16462 Clazz_defineMethod (c$, "isManagingFocus", 
16463 function () {
16464 return false;
16465 });
16466 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16467  function () {
16468 this.registerNextFocusableComponent (this.getNextFocusableComponent ());
16469 });
16470 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16471  function (nextFocusableComponent) {
16472 if (nextFocusableComponent == null) {
16473 return;
16474 }}, "java.awt.Component");
16475 Clazz_defineMethod (c$, "deregisterNextFocusableComponent", 
16476  function () {
16477 var nextFocusableComponent = this.getNextFocusableComponent ();
16478 if (nextFocusableComponent == null) {
16479 return;
16480 }var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16481 if (nearestRoot == null) {
16482 return;
16483 }});
16484 Clazz_defineMethod (c$, "setNextFocusableComponent", 
16485 function (aComponent) {
16486 var displayable = this.isDisplayable ();
16487 if (displayable) {
16488 this.deregisterNextFocusableComponent ();
16489 }this.putClientProperty ("nextFocus", aComponent);
16490 if (displayable) {
16491 this.registerNextFocusableComponent (aComponent);
16492 }}, "java.awt.Component");
16493 Clazz_defineMethod (c$, "getNextFocusableComponent", 
16494 function () {
16495 return this.getClientProperty ("nextFocus");
16496 });
16497 Clazz_defineMethod (c$, "setRequestFocusEnabled", 
16498 function (requestFocusEnabled) {
16499 this.setFlag (22, !requestFocusEnabled);
16500 }, "~B");
16501 Clazz_defineMethod (c$, "isRequestFocusEnabled", 
16502 function () {
16503 return !this.getFlag (22);
16504 });
16505 Clazz_defineMethod (c$, "requestFocus", 
16506 function (temporary) {
16507 Clazz_superCall (this, javax.swing.JComponent, "requestFocus", []);
16508 return true;
16509 }, "~B");
16510 Clazz_defineMethod (c$, "requestFocusInWindow", 
16511 function (temporary) {
16512 return Clazz_superCall (this, javax.swing.JComponent, "requestFocusInWindow", []);
16513 }, "~B");
16514 Clazz_defineMethod (c$, "grabFocus", 
16515 function () {
16516 this.requestFocus ();
16517 });
16518 Clazz_defineMethod (c$, "setVerifyInputWhenFocusTarget", 
16519 function (verifyInputWhenFocusTarget) {
16520 var oldVerifyInputWhenFocusTarget = this.verifyInputWhenFocusTarget;
16521 this.verifyInputWhenFocusTarget = verifyInputWhenFocusTarget;
16522 this.firePropertyChangeBool ("verifyInputWhenFocusTarget", oldVerifyInputWhenFocusTarget, verifyInputWhenFocusTarget);
16523 }, "~B");
16524 Clazz_defineMethod (c$, "getVerifyInputWhenFocusTarget", 
16525 function () {
16526 return this.verifyInputWhenFocusTarget;
16527 });
16528 Clazz_overrideMethod (c$, "getFontMetrics", 
16529 function (font) {
16530 return jssun.font.FontDesignMetrics.getMetrics (font);
16531 }, "java.awt.Font");
16532 Clazz_overrideMethod (c$, "getPreferredSize", 
16533 function () {
16534 return this.getPrefSizeJComp ();
16535 });
16536 Clazz_defineMethod (c$, "getPrefSizeJComp", 
16537 function () {
16538 var size = (this.isPreferredSizeSet () || this.ui == null ? null : this.ui.getPreferredSize (this));
16539 return (size == null ? this.preferredSize () : size);
16540 });
16541 Clazz_defineMethod (c$, "getMaximumSize", 
16542 function () {
16543 if (this.isMaximumSizeSet ()) {
16544 return Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16545 }var size = null;
16546 if (this.ui != null) {
16547 size = this.ui.getMaximumSize (this);
16548 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16549 });
16550 Clazz_defineMethod (c$, "getMinimumSize", 
16551 function () {
16552 if (this.isMinimumSizeSet ()) {
16553 return Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16554 }var size = null;
16555 if (this.ui != null) {
16556 size = this.ui.getMinimumSize (this);
16557 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16558 });
16559 Clazz_overrideMethod (c$, "contains", 
16560 function (x, y) {
16561 return (this.ui != null) ? this.ui.contains (this, x, y) : this.inside (x, y);
16562 }, "~N,~N");
16563 Clazz_defineMethod (c$, "setBorder", 
16564 function (border) {
16565 var oldBorder = this.border;
16566 this.border = border;
16567 this.firePropertyChangeObject ("border", oldBorder, border);
16568 if (border !== oldBorder) {
16569 if (border == null || oldBorder == null || !(border.getBorderInsets (this).equals (oldBorder.getBorderInsets (this)))) {
16570 this.revalidate ();
16571 }this.repaint ();
16572 }}, "javax.swing.border.Border");
16573 Clazz_defineMethod (c$, "getBorder", 
16574 function () {
16575 return this.border;
16576 });
16577 Clazz_defineMethod (c$, "getInsets", 
16578 function () {
16579 if (this.border != null) {
16580 return this.border.getBorderInsets (this);
16581 }return Clazz_superCall (this, javax.swing.JComponent, "getInsets", []);
16582 });
16583 Clazz_defineMethod (c$, "getInsets", 
16584 function (insets) {
16585 if (insets == null) {
16586 insets =  new java.awt.Insets (0, 0, 0, 0);
16587 }if (this.border != null) {
16588 if (Clazz_instanceOf (this.border, javax.swing.border.AbstractBorder)) {
16589 return (this.border).getBorderInsets (this, insets);
16590 } else {
16591 return this.border.getBorderInsets (this);
16592 }} else {
16593 insets.left = insets.top = insets.right = insets.bottom = 0;
16594 return insets;
16595 }}, "java.awt.Insets");
16596 Clazz_defineMethod (c$, "getAlignmentY", 
16597 function () {
16598 if (this.isAlignmentYSet) {
16599 return this.alignmentY;
16600 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentY", []);
16601 });
16602 Clazz_defineMethod (c$, "setAlignmentY", 
16603 function (alignmentY) {
16604 this.alignmentY = alignmentY > 1.0 ? 1.0 : alignmentY < 0.0 ? 0.0 : alignmentY;
16605 this.isAlignmentYSet = true;
16606 }, "~N");
16607 Clazz_defineMethod (c$, "getAlignmentX", 
16608 function () {
16609 if (this.isAlignmentXSet) {
16610 return this.alignmentX;
16611 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentX", []);
16612 });
16613 Clazz_defineMethod (c$, "setAlignmentX", 
16614 function (alignmentX) {
16615 this.alignmentX = alignmentX > 1.0 ? 1.0 : alignmentX < 0.0 ? 0.0 : alignmentX;
16616 this.isAlignmentXSet = true;
16617 }, "~N");
16618 Clazz_defineMethod (c$, "setInputVerifier", 
16619 function (inputVerifier) {
16620 var oldInputVerifier = this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16621 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER, inputVerifier);
16622 this.firePropertyChangeObject ("inputVerifier", oldInputVerifier, inputVerifier);
16623 }, "javax.swing.InputVerifier");
16624 Clazz_defineMethod (c$, "getInputVerifier", 
16625 function () {
16626 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16627 });
16628 Clazz_defineMethod (c$, "registerKeyboardAction", 
16629 function (anAction, aCommand, aKeyStroke, aCondition) {
16630 var inputMap = this.getInputMap (aCondition, true);
16631 if (inputMap != null) {
16632 var actionMap = this.getActionMap (true);
16633 var action = Clazz_innerTypeInstance (javax.swing.JComponent.ActionStandin, this, null, anAction, aCommand);
16634 inputMap.put (aKeyStroke, action);
16635 if (actionMap != null) {
16636 actionMap.put (action, action);
16637 }}}, "java.awt.event.ActionListener,~S,javax.swing.KeyStroke,~N");
16638 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16639  function (onlyIfNew) {
16640 var inputMap = this.getInputMap (2, false);
16641 var strokes;
16642 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16643 if (inputMap != null) {
16644 strokes = inputMap.allKeys ();
16645 if (strokes != null) {
16646 for (var counter = strokes.length - 1; counter >= 0; counter--) {
16647 if (!onlyIfNew || registered == null || registered.get (strokes[counter]) == null) {
16648 this.registerWithKeyboardManager (strokes[counter]);
16649 }if (registered != null) {
16650 registered.remove (strokes[counter]);
16651 }}
16652 }} else {
16653 strokes = null;
16654 }if (registered != null && registered.size () > 0) {
16655 var keys = registered.keys ();
16656 while (keys.hasMoreElements ()) {
16657 var ks = keys.nextElement ();
16658 this.unregisterWithKeyboardManager (ks);
16659 }
16660 registered.clear ();
16661 }if (strokes != null && strokes.length > 0) {
16662 if (registered == null) {
16663 registered =  new java.util.Hashtable (strokes.length);
16664 this.putClientProperty ("_WhenInFocusedWindow", registered);
16665 }for (var counter = strokes.length - 1; counter >= 0; counter--) {
16666 registered.put (strokes[counter], strokes[counter]);
16667 }
16668 } else {
16669 this.putClientProperty ("_WhenInFocusedWindow", null);
16670 }}, "~B");
16671 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16672  function () {
16673 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16674 if (registered != null && registered.size () > 0) {
16675 var keys = registered.keys ();
16676 while (keys.hasMoreElements ()) {
16677 var ks = keys.nextElement ();
16678 this.unregisterWithKeyboardManager (ks);
16679 }
16680 }this.putClientProperty ("_WhenInFocusedWindow", null);
16681 });
16682 Clazz_defineMethod (c$, "componentInputMapChanged", 
16683 function (inputMap) {
16684 var km = this.getInputMap (2, false);
16685 while (km !== inputMap && km != null) {
16686 km = km.getParent ();
16687 }
16688 if (km != null) {
16689 this.registerWithKeyboardManager (false);
16690 }}, "javax.swing.ComponentInputMap");
16691 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16692  function (aKeyStroke) {
16693 javax.swing.KeyboardManager.getCurrentManager ().registerKeyStroke (aKeyStroke, this);
16694 }, "javax.swing.KeyStroke");
16695 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16696  function (aKeyStroke) {
16697 javax.swing.KeyboardManager.getCurrentManager ().unregisterKeyStroke (aKeyStroke, this);
16698 }, "javax.swing.KeyStroke");
16699 Clazz_defineMethod (c$, "registerKeyboardAction", 
16700 function (anAction, aKeyStroke, aCondition) {
16701 this.registerKeyboardAction (anAction, null, aKeyStroke, aCondition);
16702 }, "java.awt.event.ActionListener,javax.swing.KeyStroke,~N");
16703 Clazz_defineMethod (c$, "unregisterKeyboardAction", 
16704 function (aKeyStroke) {
16705 var am = this.getActionMap (false);
16706 for (var counter = 0; counter < 3; counter++) {
16707 var km = this.getInputMap (counter, false);
16708 if (km != null) {
16709 var actionID = km.get (aKeyStroke);
16710 if (am != null && actionID != null) {
16711 am.remove (actionID);
16712 }km.remove (aKeyStroke);
16713 }}
16714 }, "javax.swing.KeyStroke");
16715 Clazz_defineMethod (c$, "getRegisteredKeyStrokes", 
16716 function () {
16717 var counts =  Clazz_newIntArray (3, 0);
16718 var strokes =  new Array (3);
16719 for (var counter = 0; counter < 3; counter++) {
16720 var km = this.getInputMap (counter, false);
16721 strokes[counter] = (km != null) ? km.allKeys () : null;
16722 counts[counter] = (strokes[counter] != null) ? strokes[counter].length : 0;
16723 }
16724 var retValue =  new Array (counts[0] + counts[1] + counts[2]);
16725 for (var counter = 0, last = 0; counter < 3; counter++) {
16726 if (counts[counter] > 0) {
16727 System.arraycopy (strokes[counter], 0, retValue, last, counts[counter]);
16728 last += counts[counter];
16729 }}
16730 return retValue;
16731 });
16732 Clazz_defineMethod (c$, "getConditionForKeyStroke", 
16733 function (aKeyStroke) {
16734 for (var counter = 0; counter < 3; counter++) {
16735 var inputMap = this.getInputMap (counter, false);
16736 if (inputMap != null && inputMap.get (aKeyStroke) != null) {
16737 return counter;
16738 }}
16739 return -1;
16740 }, "javax.swing.KeyStroke");
16741 Clazz_defineMethod (c$, "getActionForKeyStroke", 
16742 function (aKeyStroke) {
16743 var am = this.getActionMap (false);
16744 if (am == null) {
16745 return null;
16746 }for (var counter = 0; counter < 3; counter++) {
16747 var inputMap = this.getInputMap (counter, false);
16748 if (inputMap != null) {
16749 var actionBinding = inputMap.get (aKeyStroke);
16750 if (actionBinding != null) {
16751 var action = am.get (actionBinding);
16752 if (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin)) {
16753 return (action).actionListener;
16754 }return action;
16755 }}}
16756 return null;
16757 }, "javax.swing.KeyStroke");
16758 Clazz_defineMethod (c$, "resetKeyboardActions", 
16759 function () {
16760 for (var counter = 0; counter < 3; counter++) {
16761 var inputMap = this.getInputMap (counter, false);
16762 if (inputMap != null) {
16763 inputMap.clear ();
16764 }}
16765 var am = this.getActionMap (false);
16766 if (am != null) {
16767 am.clear ();
16768 }});
16769 Clazz_defineMethod (c$, "setInputMap", 
16770 function (condition, map) {
16771 switch (condition) {
16772 case 2:
16773 if (map != null && !(Clazz_instanceOf (map, javax.swing.ComponentInputMap))) {
16774 throw  new IllegalArgumentException ("WHEN_IN_FOCUSED_WINDOW InputMaps must be of type ComponentInputMap");
16775 }this.windowInputMap = map;
16776 this.setFlag (7, true);
16777 this.registerWithKeyboardManager (false);
16778 break;
16779 case 1:
16780 this.ancestorInputMap = map;
16781 this.setFlag (6, true);
16782 break;
16783 case 0:
16784 this.focusInputMap = map;
16785 this.setFlag (5, true);
16786 break;
16787 default:
16788 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16789 }
16790 }, "~N,javax.swing.InputMap");
16791 Clazz_defineMethod (c$, "getInputMap", 
16792 function (condition) {
16793 return this.getInputMap (condition, true);
16794 }, "~N");
16795 Clazz_defineMethod (c$, "getInputMap", 
16796 function () {
16797 return this.getInputMap (0, true);
16798 });
16799 Clazz_defineMethod (c$, "setActionMap", 
16800 function (am) {
16801 this.actionMap = am;
16802 this.setFlag (8, true);
16803 }, "javax.swing.ActionMap");
16804 Clazz_defineMethod (c$, "getActionMap", 
16805 function () {
16806 return this.getActionMap (true);
16807 });
16808 Clazz_defineMethod (c$, "getInputMap", 
16809 function (condition, create) {
16810 switch (condition) {
16811 case 0:
16812 if (this.getFlag (5)) {
16813 return this.focusInputMap;
16814 }if (create) {
16815 var km =  new javax.swing.InputMap ();
16816 this.setInputMap (condition, km);
16817 return km;
16818 }break;
16819 case 1:
16820 if (this.getFlag (6)) {
16821 return this.ancestorInputMap;
16822 }if (create) {
16823 var km =  new javax.swing.InputMap ();
16824 this.setInputMap (condition, km);
16825 return km;
16826 }break;
16827 case 2:
16828 if (this.getFlag (7)) {
16829 return this.windowInputMap;
16830 }if (create) {
16831 var km =  new javax.swing.ComponentInputMap (this);
16832 this.setInputMap (condition, km);
16833 return km;
16834 }break;
16835 default:
16836 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16837 }
16838 return null;
16839 }, "~N,~B");
16840 Clazz_defineMethod (c$, "getActionMap", 
16841 function (create) {
16842 {
16843 (arguments.length == 0) && (create = true);
16844 }if (this.getFlag (8)) {
16845 return this.actionMap;
16846 }if (create) {
16847 var am =  new javax.swing.ActionMap ();
16848 this.setActionMap (am);
16849 return am;
16850 }return null;
16851 }, "~B");
16852 Clazz_defineMethod (c$, "getBaseline", 
16853 function (width, height) {
16854 Clazz_superCall (this, javax.swing.JComponent, "getBaseline", [width, height]);
16855 if (this.ui != null) {
16856 return this.ui.getBaseline (this, width, height);
16857 }return -1;
16858 }, "~N,~N");
16859 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
16860 function () {
16861 if (this.ui != null) {
16862 return this.ui.getBaselineResizeBehavior (this);
16863 }return java.awt.Component.BaselineResizeBehavior.OTHER;
16864 });
16865 Clazz_defineMethod (c$, "requestDefaultFocus", 
16866 function () {
16867 var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16868 if (nearestRoot == null) {
16869 return false;
16870 }return false;
16871 });
16872 Clazz_defineMethod (c$, "setVisible", 
16873 function (aFlag) {
16874 if (aFlag != this.isVisible ()) {
16875 Clazz_superCall (this, javax.swing.JComponent, "setVisible", [aFlag]);
16876 var parent = this.getParent ();
16877 if (parent != null) {
16878 var r = this.getBounds ();
16879 parent.repaint (r.x, r.y, r.width, r.height);
16880 }this.revalidate ();
16881 }}, "~B");
16882 Clazz_defineMethod (c$, "setEnabled", 
16883 function (enabled) {
16884 var oldEnabled = this.isEnabled ();
16885 Clazz_superCall (this, javax.swing.JComponent, "setEnabled", [enabled]);
16886 this.firePropertyChangeBool ("enabled", oldEnabled, enabled);
16887 if (enabled != oldEnabled) {
16888 this.repaint ();
16889 }}, "~B");
16890 Clazz_defineMethod (c$, "setForeground", 
16891 function (fg) {
16892 var oldFg = this.getForeground ();
16893 Clazz_superCall (this, javax.swing.JComponent, "setForeground", [fg]);
16894 if ((oldFg != null) ? !oldFg.equals (fg) : ((fg != null) && !fg.equals (oldFg))) {
16895 this.repaint ();
16896 }}, "java.awt.Color");
16897 Clazz_defineMethod (c$, "setBackground", 
16898 function (bg) {
16899 var oldBg = this.getBackground ();
16900 Clazz_superCall (this, javax.swing.JComponent, "setBackground", [bg]);
16901 if ((oldBg != null) ? !oldBg.equals (bg) : ((bg != null) && !bg.equals (oldBg))) {
16902 this.repaint ();
16903 }}, "java.awt.Color");
16904 Clazz_defineMethod (c$, "setFont", 
16905 function (font) {
16906 var oldFont = this.getFont ();
16907 Clazz_superCall (this, javax.swing.JComponent, "setFont", [font]);
16908 if (font !== oldFont) {
16909 this.revalidate ();
16910 this.repaint ();
16911 }}, "java.awt.Font");
16912 c$.getDefaultLocale = Clazz_defineMethod (c$, "getDefaultLocale", 
16913 function () {
16914 var l = javax.swing.SwingUtilities.appContextGet ("JComponent.defaultLocale");
16915 if (l == null) {
16916 l = java.util.Locale.getDefault ();
16917 javax.swing.JComponent.setDefaultLocale (l);
16918 }return l;
16919 });
16920 c$.setDefaultLocale = Clazz_defineMethod (c$, "setDefaultLocale", 
16921 function (l) {
16922 javax.swing.SwingUtilities.appContextPut ("JComponent.defaultLocale", l);
16923 }, "java.util.Locale");
16924 Clazz_defineMethod (c$, "processComponentKeyEvent", 
16925 function (e) {
16926 }, "java.awt.event.KeyEvent");
16927 Clazz_defineMethod (c$, "processKeyEvent", 
16928 function (e) {
16929 var shouldProcessKey;
16930 Clazz_superCall (this, javax.swing.JComponent, "processKeyEvent", [e]);
16931 if (!e.isConsumed ()) {
16932 this.processComponentKeyEvent (e);
16933 }shouldProcessKey = javax.swing.JComponent.KeyboardState.shouldProcess (e);
16934 if (e.isConsumed ()) {
16935 return;
16936 }if (shouldProcessKey && this.processKeyBindings (e, e.getID () == 401)) {
16937 e.consume ();
16938 }}, "java.awt.event.KeyEvent");
16939 Clazz_defineMethod (c$, "processKeyBinding", 
16940 function (ks, e, condition, pressed) {
16941 var map = this.getInputMap (condition, false);
16942 var am = this.getActionMap (false);
16943 if (map != null && am != null && this.isEnabled ()) {
16944 var binding = map.get (ks);
16945 var action = (binding == null) ? null : am.get (binding);
16946 if (action != null) {
16947 return javax.swing.SwingUtilities.notifyAction (action, ks, e, this, e.getModifiers ());
16948 }}return false;
16949 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
16950 Clazz_defineMethod (c$, "processKeyBindings", 
16951 function (e, pressed) {
16952 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (e)) {
16953 return false;
16954 }var ks;
16955 if (e.getID () == 400) {
16956 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
16957 } else {
16958 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), (pressed ? false : true));
16959 }if (this.processKeyBinding (ks, e, 0, pressed)) return true;
16960 var parent = this;
16961 while (parent != null && !(Clazz_instanceOf (parent, java.awt.Window)) && !(Clazz_instanceOf (parent, java.applet.Applet))) {
16962 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16963 if ((parent).processKeyBinding (ks, e, 1, pressed)) return true;
16964 }parent = parent.getParent ();
16965 }
16966 if (parent != null) {
16967 return javax.swing.JComponent.processKeyBindingsForAllComponents (e, parent, pressed);
16968 }return false;
16969 }, "java.awt.event.KeyEvent,~B");
16970 c$.processKeyBindingsForAllComponents = Clazz_defineMethod (c$, "processKeyBindingsForAllComponents", 
16971 function (e, container, pressed) {
16972 while (true) {
16973 if (javax.swing.KeyboardManager.getCurrentManager ().fireKeyboardAction (e, pressed, container)) {
16974 return true;
16975 }if (Clazz_instanceOf (container, javax.swing.Popup.HeavyWeightWindow)) {
16976 container = (container).getOwner ();
16977 } else {
16978 return false;
16979 }}
16980 }, "java.awt.event.KeyEvent,java.awt.Container,~B");
16981 Clazz_defineMethod (c$, "setToolTipText", 
16982 function (text) {
16983 this.putClientProperty ("ToolTipText", text);
16984 }, "~S");
16985 Clazz_defineMethod (c$, "getToolTipText", 
16986 function () {
16987 return this.getClientProperty ("ToolTipText");
16988 });
16989 Clazz_defineMethod (c$, "getToolTipText", 
16990 function (event) {
16991 return this.getToolTipText ();
16992 }, "java.awt.event.MouseEvent");
16993 Clazz_defineMethod (c$, "getToolTipLocation", 
16994 function (event) {
16995 return null;
16996 }, "java.awt.event.MouseEvent");
16997 Clazz_defineMethod (c$, "getPopupLocation", 
16998 function (event) {
16999 return null;
17000 }, "java.awt.event.MouseEvent");
17001 Clazz_defineMethod (c$, "createToolTip", 
17002 function () {
17003 var tip =  new javax.swing.JToolTip ();
17004 tip.setComponent (this);
17005 return tip;
17006 });
17007 Clazz_defineMethod (c$, "scrollRectToVisible", 
17008 function (aRect) {
17009 var parent;
17010 var dx = this.getX ();
17011 var dy = this.getY ();
17012 for (parent = this.getParent (); !(parent == null) && !(Clazz_instanceOf (parent, javax.swing.JComponent)) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane)); parent = parent.getParent ()) {
17013 var bounds = parent.getBounds ();
17014 dx += bounds.x;
17015 dy += bounds.y;
17016 }
17017 if (!(parent == null) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane))) {
17018 aRect.x += dx;
17019 aRect.y += dy;
17020 (parent).scrollRectToVisible (aRect);
17021 aRect.x -= dx;
17022 aRect.y -= dy;
17023 }}, "java.awt.Rectangle");
17024 Clazz_defineMethod (c$, "setAutoscrolls", 
17025 function (autoscrolls) {
17026 }, "~B");
17027 Clazz_defineMethod (c$, "getAutoscrolls", 
17028 function () {
17029 return this.autoscrolls;
17030 });
17031 Clazz_defineMethod (c$, "superProcessMouseMotionEvent", 
17032 function (e) {
17033 Clazz_superCall (this, javax.swing.JComponent, "processMouseMotionEvent", [e]);
17034 }, "java.awt.event.MouseEvent");
17035 Clazz_defineMethod (c$, "setCreatedDoubleBuffer", 
17036 function (newValue) {
17037 this.setFlag (9, newValue);
17038 }, "~B");
17039 Clazz_defineMethod (c$, "getCreatedDoubleBuffer", 
17040 function () {
17041 return this.getFlag (9);
17042 });
17043 Clazz_defineMethod (c$, "getClientProperties", 
17044  function () {
17045 if (this.clientProperties == null) {
17046 this.clientProperties =  new javax.swing.ArrayTable ();
17047 }return this.clientProperties;
17048 });
17049 Clazz_defineMethod (c$, "getClientProperty", 
17050 function (key) {
17051 if (this.clientProperties == null) {
17052 return null;
17053 } else {
17054 {
17055 return this.clientProperties.get (key);
17056 }}}, "~O");
17057 Clazz_defineMethod (c$, "putClientProperty", 
17058 function (key, value) {
17059 if (value == null && this.clientProperties == null) {
17060 return;
17061 }var clientProperties = this.getClientProperties ();
17062 var oldValue;
17063 {
17064 oldValue = clientProperties.get (key);
17065 if (value != null) {
17066 clientProperties.put (key, value);
17067 } else if (oldValue != null) {
17068 clientProperties.remove (key);
17069 } else {
17070 return;
17071 }}this.clientPropertyChanged (key, oldValue, value);
17072 this.firePropertyChangeObject (key.toString (), oldValue, value);
17073 }, "~O,~O");
17074 Clazz_defineMethod (c$, "clientPropertyChanged", 
17075 function (key, oldValue, newValue) {
17076 }, "~O,~O,~O");
17077 Clazz_defineMethod (c$, "setUIProperty", 
17078 function (propertyName, value) {
17079 if (propertyName === "opaque") {
17080 if (!this.getFlag (24)) {
17081 this.setOpaque ((value).booleanValue ());
17082 this.setFlag (24, false);
17083 }} else if (propertyName === "autoscrolls") {
17084 if (!this.getFlag (25)) {
17085 this.setAutoscrolls ((value).booleanValue ());
17086 this.setFlag (25, false);
17087 }} else if (propertyName === "focusTraversalKeysForward") {
17088 } else if (propertyName === "focusTraversalKeysBackward") {
17089 } else {
17090 System.out.println (swingjs.JSToolkit.getClassName (this) + " property \"" + propertyName + "\" cannot be set using this method" + swingjs.JSToolkit.getStackTrace (5));
17091 }}, "~S,~O");
17092 c$.isLightweightComponent = Clazz_defineMethod (c$, "isLightweightComponent", 
17093 function (c) {
17094 return !(Clazz_instanceOf (c, javax.swing.JApplet) || Clazz_instanceOf (c, javax.swing.JFrame) || Clazz_instanceOf (c, javax.swing.JWindow) || Clazz_instanceOf (c, javax.swing.JDialog));
17095 }, "java.awt.Component");
17096 Clazz_overrideMethod (c$, "isOpaque", 
17097 function () {
17098 return this.getFlag (3);
17099 });
17100 Clazz_defineMethod (c$, "setOpaque", 
17101 function (isOpaque) {
17102 var oldValue = this.getFlag (3);
17103 this.setFlag (3, isOpaque);
17104 this.setFlag (24, true);
17105 this.firePropertyChangeBool ("opaque", oldValue, isOpaque);
17106 }, "~B");
17107 Clazz_defineMethod (c$, "rectangleIsObscured", 
17108 function (x, y, width, height) {
17109 var numChildren = this.getComponentCount ();
17110 for (var i = 0; i < numChildren; i++) {
17111 var child = this.getComponent (i);
17112 var cx;
17113 var cy;
17114 var cw;
17115 var ch;
17116 cx = child.getX ();
17117 cy = child.getY ();
17118 cw = child.getWidth ();
17119 ch = child.getHeight ();
17120 if (x >= cx && (x + width) <= (cx + cw) && y >= cy && (y + height) <= (cy + ch) && child.isVisible ()) {
17121 if (Clazz_instanceOf (child, javax.swing.JComponent)) {
17122 return (child).isOpaque ();
17123 } else {
17124 return false;
17125 }}}
17126 return false;
17127 }, "~N,~N,~N,~N");
17128 c$.computeVisibleRect = Clazz_defineMethod (c$, "computeVisibleRect", 
17129 function (c, visibleRect) {
17130 var p = c.getParent ();
17131 var bounds = c.getBounds ();
17132 if (p == null || Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17133 visibleRect.reshape (0, 0, bounds.width, bounds.height);
17134 } else {
17135 javax.swing.JComponent.computeVisibleRect (p, visibleRect);
17136 visibleRect.x -= bounds.x;
17137 visibleRect.y -= bounds.y;
17138 javax.swing.SwingUtilities.computeIntersection (0, 0, bounds.width, bounds.height, visibleRect);
17139 }}, "java.awt.Component,java.awt.Rectangle");
17140 Clazz_defineMethod (c$, "computeVisibleRect", 
17141 function (visibleRect) {
17142 javax.swing.JComponent.computeVisibleRect (this, visibleRect);
17143 }, "java.awt.Rectangle");
17144 Clazz_defineMethod (c$, "getVisibleRect", 
17145 function () {
17146 var visibleRect =  new java.awt.Rectangle ();
17147 this.computeVisibleRect (visibleRect);
17148 return visibleRect;
17149 });
17150 Clazz_defineMethod (c$, "getTopLevelAncestor", 
17151 function () {
17152 for (var p = this; p != null; p = p.getParent ()) {
17153 if (Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17154 return p;
17155 }}
17156 return null;
17157 });
17158 Clazz_defineMethod (c$, "getAncestorNotifier", 
17159  function () {
17160 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER);
17161 });
17162 Clazz_defineMethod (c$, "addAncestorListener", 
17163 function (listener) {
17164 var ancestorNotifier = this.getAncestorNotifier ();
17165 if (ancestorNotifier == null) {
17166 ancestorNotifier =  new javax.swing.AncestorNotifier (this);
17167 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, ancestorNotifier);
17168 }ancestorNotifier.addAncestorListener (listener);
17169 }, "javax.swing.event.AncestorListener");
17170 Clazz_defineMethod (c$, "removeAncestorListener", 
17171 function (listener) {
17172 var ancestorNotifier = this.getAncestorNotifier ();
17173 if (ancestorNotifier == null) {
17174 return;
17175 }ancestorNotifier.removeAncestorListener (listener);
17176 if (ancestorNotifier.listenerList.getListenerList ().length == 0) {
17177 ancestorNotifier.removeAllListeners ();
17178 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, null);
17179 }}, "javax.swing.event.AncestorListener");
17180 Clazz_defineMethod (c$, "getAncestorListeners", 
17181 function () {
17182 var ancestorNotifier = this.getAncestorNotifier ();
17183 if (ancestorNotifier == null) {
17184 return  new Array (0);
17185 }return ancestorNotifier.getAncestorListeners ();
17186 });
17187 Clazz_defineMethod (c$, "getListeners", 
17188 function (listenerType) {
17189 var result;
17190 if (listenerType === javax.swing.event.AncestorListener) {
17191 result = this.getAncestorListeners ();
17192 } else if (listenerType === java.beans.PropertyChangeListener) {
17193 result = this.getPropertyChangeListeners ();
17194 } else {
17195 result = this.listenerList.getListeners (listenerType);
17196 }if (result.length == 0) {
17197 return Clazz_superCall (this, javax.swing.JComponent, "getListeners", [listenerType]);
17198 }return result;
17199 }, "Class");
17200 Clazz_defineMethod (c$, "addNotify", 
17201 function () {
17202 Clazz_superCall (this, javax.swing.JComponent, "addNotify", []);
17203 this.firePropertyChangeObject ("ancestor", null, this.getParent ());
17204 this.registerWithKeyboardManager (false);
17205 this.registerNextFocusableComponent ();
17206 });
17207 Clazz_defineMethod (c$, "removeNotify", 
17208 function () {
17209 Clazz_superCall (this, javax.swing.JComponent, "removeNotify", []);
17210 this.firePropertyChangeObject ("ancestor", this.getParent (), null);
17211 this.unregisterWithKeyboardManager ();
17212 this.deregisterNextFocusableComponent ();
17213 if (this.getCreatedDoubleBuffer ()) {
17214 javax.swing.RepaintManager.currentManager (this).resetDoubleBuffer ();
17215 this.setCreatedDoubleBuffer (false);
17216 }});
17217 Clazz_defineMethod (c$, "repaint", 
17218 function (tm, x, y, width, height) {
17219 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
17220 }, "~N,~N,~N,~N,~N");
17221 Clazz_defineMethod (c$, "repaint", 
17222 function (r) {
17223 this.repaint (0, r.x, r.y, r.width, r.height);
17224 }, "java.awt.Rectangle");
17225 Clazz_defineMethod (c$, "revalidate", 
17226 function () {
17227 if (this.getParent () == null) {
17228 return;
17229 }if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
17230 this.invalidate ();
17231 javax.swing.RepaintManager.currentManager (this).addInvalidComponent (this);
17232 } else {
17233 {
17234 if (this.getFlag (28)) {
17235 return;
17236 }this.setFlag (28, true);
17237 }var callRevalidate = ((Clazz_isClassDefined ("javax.swing.JComponent$2") ? 0 : javax.swing.JComponent.$JComponent$2$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$2, this, null));
17238 javax.swing.SwingUtilities.invokeLater (callRevalidate);
17239 }});
17240 Clazz_defineMethod (c$, "isValidateRoot", 
17241 function () {
17242 return false;
17243 });
17244 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
17245 function () {
17246 return true;
17247 });
17248 Clazz_defineMethod (c$, "isPaintingOrigin", 
17249 function () {
17250 return false;
17251 });
17252 Clazz_defineMethod (c$, "paintImmediately", 
17253 function (x, y, w, h) {
17254 {
17255 if (arguments.length == 1) {
17256 var r = x;
17257 x = r.x;
17258 y = r.y;
17259 w = r.width;
17260 h = r.height;
17261 }
17262 }var c = this;
17263 var parent;
17264 if (!this.isShowing ()) {
17265 return;
17266 }while (!(c).isOpaque ()) {
17267 parent = c.getParent ();
17268 if (parent != null) {
17269 x += c.getX ();
17270 y += c.getY ();
17271 c = parent;
17272 } else {
17273 break;
17274 }if (!(Clazz_instanceOf (c, javax.swing.JComponent))) {
17275 break;
17276 }}
17277 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17278 (c)._paintImmediately (x, y, w, h);
17279 } else {
17280 c.repaint (x, y, w, h);
17281 }}, "~N,~N,~N,~N");
17282 Clazz_defineMethod (c$, "paintImmediately", 
17283 function (r) {
17284 this.paintImmediately (r.x, r.y, r.width, r.height);
17285 }, "java.awt.Rectangle");
17286 Clazz_defineMethod (c$, "alwaysOnTop", 
17287 function () {
17288 return false;
17289 });
17290 Clazz_defineMethod (c$, "setPaintingChild", 
17291 function (paintingChild) {
17292 this.paintingChild = paintingChild;
17293 }, "java.awt.Component");
17294 Clazz_defineMethod (c$, "_paintImmediately", 
17295 function (x, y, w, h) {
17296 var g;
17297 var c;
17298 var tmpX;
17299 var tmpY;
17300 var tmpWidth;
17301 var tmpHeight;
17302 var offsetX = 0;
17303 var offsetY = 0;
17304 var hasBuffer = false;
17305 var bufferedComponent = null;
17306 var paintingComponent = this;
17307 var path =  new java.util.ArrayList (7);
17308 var pIndex = -1;
17309 var pCount = 0;
17310 tmpX = tmpY = tmpWidth = tmpHeight = 0;
17311 var paintImmediatelyClip = javax.swing.JComponent.fetchRectangle ();
17312 paintImmediatelyClip.x = x;
17313 paintImmediatelyClip.y = y;
17314 paintImmediatelyClip.width = w;
17315 paintImmediatelyClip.height = h;
17316 var ontop = this.alwaysOnTop () && this.isOpaque ();
17317 if (ontop) {
17318 javax.swing.SwingUtilities.computeIntersection (0, 0, this.getWidth (), this.getHeight (), paintImmediatelyClip);
17319 if (paintImmediatelyClip.width == 0) {
17320 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17321 return;
17322 }}var child;
17323 for (c = this, child = null; c != null && !(Clazz_instanceOf (c, java.awt.Window)) && !(Clazz_instanceOf (c, java.applet.Applet)); child = c, c = c.getParent ()) {
17324 var jc = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
17325 path.add (c);
17326 if (!ontop && jc != null && !jc.isOptimizedDrawingEnabled ()) {
17327 var resetPC;
17328 if (c !== this) {
17329 if (jc.isPaintingOrigin ()) {
17330 resetPC = true;
17331 } else {
17332 var children = c.getComponents ();
17333 var i = 0;
17334 for (; i < children.length; i++) {
17335 if (children[i] === child) break;
17336 }
17337 switch (jc.getObscuredState (i, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height)) {
17338 case 0:
17339 resetPC = false;
17340 break;
17341 case 2:
17342 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17343 return;
17344 default:
17345 resetPC = true;
17346 break;
17347 }
17348 }} else {
17349 resetPC = false;
17350 }if (resetPC) {
17351 paintingComponent = jc;
17352 pIndex = pCount;
17353 offsetX = offsetY = 0;
17354 hasBuffer = false;
17355 }}pCount++;
17356 if (!ontop) {
17357 var bx = c.getX ();
17358 var by = c.getY ();
17359 tmpWidth = c.getWidth ();
17360 tmpHeight = c.getHeight ();
17361 javax.swing.SwingUtilities.computeIntersection (tmpX, tmpY, tmpWidth, tmpHeight, paintImmediatelyClip);
17362 paintImmediatelyClip.x += bx;
17363 paintImmediatelyClip.y += by;
17364 offsetX += bx;
17365 offsetY += by;
17366 }}
17367 if (c == null || paintImmediatelyClip.width <= 0 || paintImmediatelyClip.height <= 0) {
17368 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17369 return;
17370 }paintingComponent.setFlag (13, true);
17371 paintImmediatelyClip.x -= offsetX;
17372 paintImmediatelyClip.y -= offsetY;
17373 if (paintingComponent !== this) {
17374 var comp;
17375 var i = pIndex;
17376 for (; i > 0; i--) {
17377 comp = path.get (i);
17378 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17379 (comp).setPaintingChild (path.get (i - 1));
17380 }}
17381 }try {
17382 g = javax.swing.JComponent.safelyGetGraphics (paintingComponent, c).createSwingJS ();
17383 try {
17384 if (hasBuffer) {
17385 var rm = javax.swing.RepaintManager.currentManager (bufferedComponent);
17386 rm.beginPaint ();
17387 try {
17388 rm.paint (paintingComponent, bufferedComponent, g, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height);
17389 } finally {
17390 rm.endPaint ();
17391 }
17392 } else {
17393 paintingComponent.paint (g);
17394 }} finally {
17395 g.dispose ();
17396 }
17397 } finally {
17398 if (paintingComponent !== this) {
17399 var comp;
17400 var i = pIndex;
17401 for (; i > 0; i--) {
17402 comp = path.get (i);
17403 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17404 (comp).setPaintingChild (null);
17405 }}
17406 }paintingComponent.setFlag (13, false);
17407 }
17408 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17409 }, "~N,~N,~N,~N");
17410 Clazz_defineMethod (c$, "paintToOffscreen", 
17411 function (g, x, y, w, h, maxX, maxY) {
17412 try {
17413 this.setFlag (1, true);
17414 if ((y + h) < maxY || (x + w) < maxX) {
17415 this.setFlag (2, true);
17416 }if (this.getFlag (13)) {
17417 this.paint (g);
17418 } else {
17419 if (!this.rectangleIsObscured (x, y, w, h)) {
17420 this.paintComponent (g);
17421 this.paintBorder (g);
17422 }this.paintChildren (g);
17423 }} finally {
17424 this.setFlag (1, false);
17425 this.setFlag (2, false);
17426 }
17427 }, "java.awt.Graphics,~N,~N,~N,~N,~N,~N");
17428 Clazz_defineMethod (c$, "getObscuredState", 
17429  function (compIndex, x, y, width, height) {
17430 var retValue = 0;
17431 var tmpRect = javax.swing.JComponent.fetchRectangle ();
17432 for (var i = compIndex - 1; i >= 0; i--) {
17433 var sibling = this.getComponent (i);
17434 if (!sibling.isVisible ()) {
17435 continue;
17436 }var siblingRect;
17437 var opaque;
17438 if (Clazz_instanceOf (sibling, javax.swing.JComponent)) {
17439 opaque = (sibling).isOpaque ();
17440 if (!opaque) {
17441 if (retValue == 1) {
17442 continue;
17443 }}} else {
17444 opaque = true;
17445 }siblingRect = sibling.getBounds (tmpRect);
17446 if (opaque && x >= siblingRect.x && (x + width) <= (siblingRect.x + siblingRect.width) && y >= siblingRect.y && (y + height) <= (siblingRect.y + siblingRect.height)) {
17447 javax.swing.JComponent.recycleRectangle (tmpRect);
17448 return 2;
17449 } else if (retValue == 0 && !((x + width <= siblingRect.x) || (y + height <= siblingRect.y) || (x >= siblingRect.x + siblingRect.width) || (y >= siblingRect.y + siblingRect.height))) {
17450 retValue = 1;
17451 }}
17452 javax.swing.JComponent.recycleRectangle (tmpRect);
17453 return retValue;
17454 }, "~N,~N,~N,~N,~N");
17455 Clazz_defineMethod (c$, "checkIfChildObscuredBySibling", 
17456 function () {
17457 return true;
17458 });
17459 Clazz_defineMethod (c$, "setFlag", 
17460  function (aFlag, aValue) {
17461 if (aValue) {
17462 this.flags |= (1 << aFlag);
17463 } else {
17464 this.flags &= ~(1 << aFlag);
17465 }}, "~N,~B");
17466 Clazz_defineMethod (c$, "getFlag", 
17467  function (aFlag) {
17468 var mask = (1 << aFlag);
17469 return ((this.flags & mask) == mask);
17470 }, "~N");
17471 Clazz_defineMethod (c$, "setDoubleBuffered", 
17472 function (aFlag) {
17473 }, "~B");
17474 Clazz_overrideMethod (c$, "isDoubleBuffered", 
17475 function () {
17476 return this.getFlag (0);
17477 });
17478 Clazz_defineMethod (c$, "getRootPane", 
17479 function () {
17480 return javax.swing.SwingUtilities.getRootPane (this);
17481 });
17482 Clazz_defineMethod (c$, "paramString", 
17483 function () {
17484 var preferredSizeString = (this.isPreferredSizeSet () ? this.getPreferredSize ().toString () : "");
17485 var minimumSizeString = (this.isMinimumSizeSet () ? this.getMinimumSize ().toString () : "");
17486 var maximumSizeString = (this.isMaximumSizeSet () ? this.getMaximumSize ().toString () : "");
17487 var borderString = (this.border == null ? "" : (this.border === this ? "this" : this.border.toString ()));
17488 return Clazz_superCall (this, javax.swing.JComponent, "paramString", []) + ",alignmentX=" + this.alignmentX + ",alignmentY=" + this.alignmentY + ",border=" + borderString + ",flags=" + this.flags + ",maximumSize=" + maximumSizeString + ",minimumSize=" + minimumSizeString + ",preferredSize=" + preferredSizeString;
17489 });
17490 c$.$JComponent$ActionStandin$ = function () {
17491 Clazz_pu$h(self.c$);
17492 c$ = Clazz_decorateAsClass (function () {
17493 Clazz_prepareCallback (this, arguments);
17494 this.actionListener = null;
17495 this.command = null;
17496 this.action = null;
17497 Clazz_instantialize (this, arguments);
17498 }, javax.swing.JComponent, "ActionStandin", null, javax.swing.Action);
17499 Clazz_makeConstructor (c$, 
17500 function (a, b) {
17501 this.actionListener = a;
17502 if (Clazz_instanceOf (a, javax.swing.Action)) {
17503 this.action = a;
17504 } else {
17505 this.action = null;
17506 }this.command = b;
17507 }, "java.awt.event.ActionListener,~S");
17508 Clazz_defineMethod (c$, "getValue", 
17509 function (a) {
17510 if (a != null) {
17511 if (a.equals ("ActionCommandKey")) {
17512 return this.command;
17513 }if (this.action != null) {
17514 return this.action.getValue (a);
17515 }if (a.equals ("Name")) {
17516 return "ActionStandin";
17517 }}return null;
17518 }, "~S");
17519 Clazz_defineMethod (c$, "isEnabled", 
17520 function () {
17521 if (this.actionListener == null) {
17522 return false;
17523 }if (this.action == null) {
17524 return true;
17525 }return this.action.isEnabled ();
17526 });
17527 Clazz_defineMethod (c$, "actionPerformed", 
17528 function (a) {
17529 if (this.actionListener != null) {
17530 this.actionListener.actionPerformed (a);
17531 }}, "java.awt.event.ActionEvent");
17532 Clazz_overrideMethod (c$, "putValue", 
17533 function (a, b) {
17534 }, "~S,~O");
17535 Clazz_overrideMethod (c$, "setEnabled", 
17536 function (a) {
17537 }, "~B");
17538 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
17539 function (a) {
17540 }, "java.beans.PropertyChangeListener");
17541 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
17542 function (a) {
17543 }, "java.beans.PropertyChangeListener");
17544 c$ = Clazz_p0p ();
17545 };
17546 c$.$JComponent$2$ = function () {
17547 Clazz_pu$h(self.c$);
17548 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$2", null, Runnable);
17549 Clazz_overrideMethod (c$, "run", 
17550 function () {
17551 {
17552 this.b$["javax.swing.JComponent"].setFlag (28, false);
17553 }this.b$["javax.swing.JComponent"].revalidate ();
17554 });
17555 c$ = Clazz_p0p ();
17556 };
17557 c$.$JComponent$1$ = function () {
17558 Clazz_pu$h(self.c$);
17559 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$1", null, jssun.awt.RequestFocusController);
17560 Clazz_overrideMethod (c$, "acceptRequestFocus", 
17561 function (from, to, temporary, focusedWindowChangeAllowed, cause) {
17562 if ((to == null) || !(Clazz_instanceOf (to, javax.swing.JComponent))) {
17563 return true;
17564 }if ((from == null) || !(Clazz_instanceOf (from, javax.swing.JComponent))) {
17565 return true;
17566 }var target = to;
17567 if (!target.getVerifyInputWhenFocusTarget ()) {
17568 return true;
17569 }var jFocusOwner = from;
17570 var iv = jFocusOwner.getInputVerifier ();
17571 if (iv == null) {
17572 return true;
17573 } else {
17574 var currentSource = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17575 if (currentSource === jFocusOwner) {
17576 return true;
17577 }javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, jFocusOwner);
17578 try {
17579 return iv.shouldYieldFocus (jFocusOwner);
17580 } finally {
17581 if (currentSource != null) {
17582 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, currentSource);
17583 } else {
17584 javax.swing.SwingUtilities.appContextRemove (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17585 }}
17586 }}, "java.awt.Component,java.awt.Component,~B,~B,jssun.awt.CausedFocusEvent.Cause");
17587 c$ = Clazz_p0p ();
17588 };
17589 Clazz_pu$h(self.c$);
17590 c$ = Clazz_decorateAsClass (function () {
17591 this.array = null;
17592 this.count = 0;
17593 this.capacity = 0;
17594 Clazz_instantialize (this, arguments);
17595 }, javax.swing.JComponent, "IntVector");
17596 Clazz_defineMethod (c$, "size", 
17597 function () {
17598 return this.count;
17599 });
17600 Clazz_defineMethod (c$, "elementAt", 
17601 function (a) {
17602 return this.array[a];
17603 }, "~N");
17604 Clazz_defineMethod (c$, "addElement", 
17605 function (a) {
17606 if (this.count == this.capacity) {
17607 this.capacity = (this.capacity + 2) * 2;
17608 var b =  Clazz_newIntArray (this.capacity, 0);
17609 if (this.count > 0) {
17610 System.arraycopy (this.array, 0, b, 0, this.count);
17611 }this.array = b;
17612 }this.array[this.count++] = a;
17613 }, "~N");
17614 Clazz_defineMethod (c$, "setElementAt", 
17615 function (a, b) {
17616 this.array[b] = a;
17617 }, "~N,~N");
17618 c$ = Clazz_p0p ();
17619 Clazz_pu$h(self.c$);
17620 c$ = Clazz_declareType (javax.swing.JComponent, "KeyboardState");
17621 c$.getKeyCodeArray = Clazz_defineMethod (c$, "getKeyCodeArray", 
17622 function () {
17623 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.KeyboardState.keyCodesKey);
17624 if (a == null) {
17625 a =  new javax.swing.JComponent.IntVector ();
17626 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.KeyboardState.keyCodesKey, a);
17627 }return a;
17628 });
17629 c$.registerKeyPressed = Clazz_defineMethod (c$, "registerKeyPressed", 
17630 function (a) {
17631 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17632 var c = b.size ();
17633 var d;
17634 for (d = 0; d < c; d++) {
17635 if (b.elementAt (d) == -1) {
17636 b.setElementAt (a, d);
17637 return;
17638 }}
17639 b.addElement (a);
17640 }, "~N");
17641 c$.registerKeyReleased = Clazz_defineMethod (c$, "registerKeyReleased", 
17642 function (a) {
17643 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17644 var c = b.size ();
17645 var d;
17646 for (d = 0; d < c; d++) {
17647 if (b.elementAt (d) == a) {
17648 b.setElementAt (-1, d);
17649 return;
17650 }}
17651 }, "~N");
17652 c$.keyIsPressed = Clazz_defineMethod (c$, "keyIsPressed", 
17653 function (a) {
17654 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17655 var c = b.size ();
17656 var d;
17657 for (d = 0; d < c; d++) {
17658 if (b.elementAt (d) == a) {
17659 return true;
17660 }}
17661 return false;
17662 }, "~N");
17663 c$.shouldProcess = Clazz_defineMethod (c$, "shouldProcess", 
17664 function (a) {
17665 switch (a.getID ()) {
17666 case 401:
17667 if (!javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ())) {
17668 javax.swing.JComponent.KeyboardState.registerKeyPressed (a.getKeyCode ());
17669 }return true;
17670 case 402:
17671 if (javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ()) || a.getKeyCode () == 154) {
17672 javax.swing.JComponent.KeyboardState.registerKeyReleased (a.getKeyCode ());
17673 return true;
17674 }return false;
17675 case 400:
17676 return true;
17677 default:
17678 return false;
17679 }
17680 }, "java.awt.event.KeyEvent");
17681 c$.keyCodesKey = c$.prototype.keyCodesKey = javax.swing.JComponent.KeyboardState;
17682 c$ = Clazz_p0p ();
17683 Clazz_defineStatics (c$,
17684 "uiClassID", "ComponentUI",
17685 "managingFocusForwardTraversalKeys", null,
17686 "managingFocusBackwardTraversalKeys", null,
17687 "NOT_OBSCURED", 0,
17688 "PARTIALLY_OBSCURED", 1,
17689 "COMPLETELY_OBSCURED", 2,
17690 "DEBUG_GRAPHICS_LOADED", false);
17691 c$.INPUT_VERIFIER_SOURCE_KEY = c$.prototype.INPUT_VERIFIER_SOURCE_KEY =  new Clazz._O ();
17692 Clazz_defineStatics (c$,
17693 "WHEN_FOCUSED", 0,
17694 "WHEN_ANCESTOR_OF_FOCUSED_COMPONENT", 1,
17695 "WHEN_IN_FOCUSED_WINDOW", 2,
17696 "UNDEFINED_CONDITION", -1,
17697 "WHEN_IN_FOCUSED_WINDOW_BINDINGS", "_WhenInFocusedWindow",
17698 "TOOL_TIP_TEXT_KEY", "ToolTipText",
17699 "NEXT_FOCUS", "nextFocus",
17700 "IS_DOUBLE_BUFFERED", 0,
17701 "ANCESTOR_USING_BUFFER", 1,
17702 "IS_PAINTING_TILE", 2,
17703 "IS_OPAQUE", 3,
17704 "FOCUS_INPUTMAP_CREATED", 5,
17705 "ANCESTOR_INPUTMAP_CREATED", 6,
17706 "WIF_INPUTMAP_CREATED", 7,
17707 "ACTIONMAP_CREATED", 8,
17708 "CREATED_DOUBLE_BUFFER", 9,
17709 "IS_PRINTING", 11,
17710 "IS_PRINTING_ALL", 12,
17711 "IS_REPAINTING", 13,
17712 "REQUEST_FOCUS_DISABLED", 22,
17713 "INHERITS_POPUP_MENU", 23,
17714 "OPAQUE_SET", 24,
17715 "AUTOSCROLLS_SET", 25,
17716 "REVALIDATE_RUNNABLE_SCHEDULED", 28);
17717 c$.tempRectangles = c$.prototype.tempRectangles =  new java.util.ArrayList (11);
17718 Clazz_defineStatics (c$,
17719 "defaultLocale", "JComponent.defaultLocale",
17720 "componentObtainingGraphicsFrom", null);
17721 c$.componentObtainingGraphicsFromLock = c$.prototype.componentObtainingGraphicsFromLock =  new Clazz._O ();
17722 c$.focusController = c$.prototype.focusController = ((Clazz_isClassDefined ("javax.swing.JComponent$1") ? 0 : javax.swing.JComponent.$JComponent$1$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$1, this, null));
17723 });
17724 Clazz_declarePackage ("javax.swing");
17725 Clazz_load (["java.awt.event.ActionListener"], "javax.swing.Action", null, function () {
17726 c$ = Clazz_declareInterface (javax.swing, "Action", java.awt.event.ActionListener);
17727 Clazz_defineStatics (c$,
17728 "DEFAULT", "Default",
17729 "NAME", "Name",
17730 "SHORT_DESCRIPTION", "ShortDescription",
17731 "LONG_DESCRIPTION", "LongDescription",
17732 "SMALL_ICON", "SmallIcon",
17733 "ACTION_COMMAND_KEY", "ActionCommandKey",
17734 "ACCELERATOR_KEY", "AcceleratorKey",
17735 "MNEMONIC_KEY", "MnemonicKey",
17736 "SELECTED_KEY", "SwingSelectedKey",
17737 "DISPLAYED_MNEMONIC_INDEX_KEY", "SwingDisplayedMnemonicIndexKey",
17738 "LARGE_ICON_KEY", "SwingLargeIconKey");
17739 });
17740 Clazz_declarePackage ("javax.swing");
17741 Clazz_load (["java.awt.Frame", "java.awt.event.WindowListener", "javax.swing.SwingConstants"], "javax.swing.SwingUtilities", ["java.lang.Character", "$.Error", "$.Thread", "java.applet.Applet", "java.awt.Component", "$.Container", "$.EventQueue", "$.Point", "$.Rectangle", "$.Window", "java.awt.event.ActionEvent", "$.MouseEvent", "$.MouseWheelEvent", "javax.swing.JComponent", "javax.swing.JComponent.ActionStandin", "javax.swing.JRootPane", "$.RootPaneContainer", "javax.swing.event.MenuDragMouseEvent", "javax.swing.plaf.UIResource", "jssun.awt.AppContext", "jssun.swing.UIAction", "swingjs.api.Interface"], function () {
17742 c$ = Clazz_declareType (javax.swing, "SwingUtilities", null, javax.swing.SwingConstants);
17743 c$.installSwingDropTargetAsNecessary = Clazz_defineMethod (c$, "installSwingDropTargetAsNecessary", 
17744 function (c, t) {
17745 }, "java.awt.Component,javax.swing.TransferHandler");
17746 c$.isRectangleContainingRectangle = Clazz_defineMethod (c$, "isRectangleContainingRectangle", 
17747 function (a, b) {
17748 if (b.x >= a.x && (b.x + b.width) <= (a.x + a.width) && b.y >= a.y && (b.y + b.height) <= (a.y + a.height)) {
17749 return true;
17750 }return false;
17751 }, "java.awt.Rectangle,java.awt.Rectangle");
17752 c$.getLocalBounds = Clazz_defineMethod (c$, "getLocalBounds", 
17753 function (aComponent) {
17754 var b =  new java.awt.Rectangle (aComponent.getBounds ());
17755 b.x = b.y = 0;
17756 return b;
17757 }, "java.awt.Component");
17758 c$.getWindowAncestor = Clazz_defineMethod (c$, "getWindowAncestor", 
17759 function (c) {
17760 for (var p = c.getParent (); p != null; p = p.getParent ()) {
17761 if (Clazz_instanceOf (p, java.awt.Window)) {
17762 return p;
17763 }}
17764 return null;
17765 }, "java.awt.Component");
17766 c$.convertScreenLocationToParent = Clazz_defineMethod (c$, "convertScreenLocationToParent", 
17767 function (parent, x, y) {
17768 for (var p = parent; p != null; p = p.getParent ()) {
17769 if (Clazz_instanceOf (p, java.awt.Window)) {
17770 var point =  new java.awt.Point (x, y);
17771 javax.swing.SwingUtilities.convertPointFromScreen (point, parent);
17772 return point;
17773 }}
17774 throw  new Error ("convertScreenLocationToParent: no window ancestor");
17775 }, "java.awt.Container,~N,~N");
17776 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17777 function (source, aPoint, destination) {
17778 var p;
17779 if (source == null && destination == null) return aPoint;
17780 if (source == null) {
17781 source = javax.swing.SwingUtilities.getWindowAncestor (destination);
17782 if (source == null) throw  new Error ("Source component not connected to component tree hierarchy");
17783 }p =  new java.awt.Point (aPoint);
17784 javax.swing.SwingUtilities.convertPointToScreen (p, source);
17785 if (destination == null) {
17786 destination = javax.swing.SwingUtilities.getWindowAncestor (source);
17787 if (destination == null) throw  new Error ("Destination component not connected to component tree hierarchy");
17788 }javax.swing.SwingUtilities.convertPointFromScreen (p, destination);
17789 return p;
17790 }, "java.awt.Component,java.awt.Point,java.awt.Component");
17791 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17792 function (source, x, y, destination) {
17793 var point =  new java.awt.Point (x, y);
17794 return javax.swing.SwingUtilities.convertPoint (source, point, destination);
17795 }, "java.awt.Component,~N,~N,java.awt.Component");
17796 c$.convertRectangle = Clazz_defineMethod (c$, "convertRectangle", 
17797 function (source, aRectangle, destination) {
17798 var point =  new java.awt.Point (aRectangle.x, aRectangle.y);
17799 point = javax.swing.SwingUtilities.convertPoint (source, point, destination);
17800 return  new java.awt.Rectangle (point.x, point.y, aRectangle.width, aRectangle.height);
17801 }, "java.awt.Component,java.awt.Rectangle,java.awt.Component");
17802 c$.getAncestorOfClass = Clazz_defineMethod (c$, "getAncestorOfClass", 
17803 function (c, comp) {
17804 if (comp == null || c == null) return null;
17805 var parent = comp.getParent ();
17806 while (parent != null && !(c.isInstance (parent))) parent = parent.getParent ();
17807
17808 return parent;
17809 }, "Class,java.awt.Component");
17810 c$.getAncestorNamed = Clazz_defineMethod (c$, "getAncestorNamed", 
17811 function (name, comp) {
17812 if (comp == null || name == null) return null;
17813 var parent = comp.getParent ();
17814 while (parent != null && !(name.equals (parent.getName ()))) parent = parent.getParent ();
17815
17816 return parent;
17817 }, "~S,java.awt.Component");
17818 c$.getDeepestComponentAt = Clazz_defineMethod (c$, "getDeepestComponentAt", 
17819 function (parent, x, y) {
17820 if (!parent.contains (x, y)) {
17821 return null;
17822 }if (Clazz_instanceOf (parent, java.awt.Container)) {
17823 var components = (parent).getComponents ();
17824 for (var i = 0; i < components.length; i++) {
17825 var comp = components[i];
17826 if (comp != null && comp.isVisible ()) {
17827 var loc = comp.getLocation ();
17828 if (Clazz_instanceOf (comp, java.awt.Container)) {
17829 comp = javax.swing.SwingUtilities.getDeepestComponentAt (comp, x - loc.x, y - loc.y);
17830 } else {
17831 comp = comp.getComponentAt (x - loc.x, y - loc.y);
17832 }if (comp != null && comp.isVisible ()) {
17833 return comp;
17834 }}}
17835 }return parent;
17836 }, "java.awt.Component,~N,~N");
17837 c$.convertMouseEvent = Clazz_defineMethod (c$, "convertMouseEvent", 
17838 function (source, sourceEvent, destination) {
17839 var p = javax.swing.SwingUtilities.convertPoint (source,  new java.awt.Point (sourceEvent.getX (), sourceEvent.getY ()), destination);
17840 var newSource;
17841 if (destination != null) newSource = destination;
17842  else newSource = source;
17843 var newEvent;
17844 if (Clazz_instanceOf (sourceEvent, java.awt.event.MouseWheelEvent)) {
17845 var sourceWheelEvent = sourceEvent;
17846 newEvent =  new java.awt.event.MouseWheelEvent (newSource, sourceWheelEvent.getID (), sourceWheelEvent.getWhen (), sourceWheelEvent.getModifiers (), p.x, p.y, sourceWheelEvent.getXOnScreen (), sourceWheelEvent.getYOnScreen (), sourceWheelEvent.getClickCount (), sourceWheelEvent.isPopupTrigger (), sourceWheelEvent.getScrollType (), sourceWheelEvent.getScrollAmount (), sourceWheelEvent.getWheelRotation ());
17847 } else if (Clazz_instanceOf (sourceEvent, javax.swing.event.MenuDragMouseEvent)) {
17848 var sourceMenuDragEvent = sourceEvent;
17849 newEvent =  new javax.swing.event.MenuDragMouseEvent (newSource, sourceMenuDragEvent.getID (), sourceMenuDragEvent.getWhen (), sourceMenuDragEvent.getModifiers (), p.x, p.y, sourceMenuDragEvent.getXOnScreen (), sourceMenuDragEvent.getYOnScreen (), sourceMenuDragEvent.getClickCount (), sourceMenuDragEvent.isPopupTrigger (), sourceMenuDragEvent.getPath (), sourceMenuDragEvent.getMenuSelectionManager ());
17850 } else {
17851 newEvent =  new java.awt.event.MouseEvent (newSource, sourceEvent.getID (), sourceEvent.getWhen (), sourceEvent.getModifiers (), p.x, p.y, sourceEvent.getXOnScreen (), sourceEvent.getYOnScreen (), sourceEvent.getClickCount (), sourceEvent.isPopupTrigger (), 0);
17852 }return newEvent;
17853 }, "java.awt.Component,java.awt.event.MouseEvent,java.awt.Component");
17854 c$.convertPointToScreen = Clazz_defineMethod (c$, "convertPointToScreen", 
17855 function (p, c) {
17856 var x;
17857 var y;
17858 do {
17859 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17860 x = (c).getX ();
17861 y = (c).getY ();
17862 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17863 try {
17864 var pp = c.getLocationOnScreen ();
17865 x = pp.x;
17866 y = pp.y;
17867 } catch (icse) {
17868 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17869 x = c.getX ();
17870 y = c.getY ();
17871 } else {
17872 throw icse;
17873 }
17874 }
17875 } else {
17876 x = c.getX ();
17877 y = c.getY ();
17878 }p.x += x;
17879 p.y += y;
17880 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17881 c = c.getParent ();
17882 } while (c != null);
17883 }, "java.awt.Point,java.awt.Component");
17884 c$.convertPointFromScreen = Clazz_defineMethod (c$, "convertPointFromScreen", 
17885 function (p, c) {
17886 var x;
17887 var y;
17888 do {
17889 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17890 x = (c).getX ();
17891 y = (c).getY ();
17892 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17893 try {
17894 var pp = c.getLocationOnScreen ();
17895 x = pp.x;
17896 y = pp.y;
17897 } catch (icse) {
17898 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17899 x = c.getX ();
17900 y = c.getY ();
17901 } else {
17902 throw icse;
17903 }
17904 }
17905 } else {
17906 x = c.getX ();
17907 y = c.getY ();
17908 }p.x -= x;
17909 p.y -= y;
17910 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17911 c = c.getParent ();
17912 } while (c != null);
17913 }, "java.awt.Point,java.awt.Component");
17914 c$.windowForComponent = Clazz_defineMethod (c$, "windowForComponent", 
17915 function (c) {
17916 return javax.swing.SwingUtilities.getWindowAncestor (c);
17917 }, "java.awt.Component");
17918 c$.isDescendingFrom = Clazz_defineMethod (c$, "isDescendingFrom", 
17919 function (a, b) {
17920 if (a === b) return true;
17921 for (var p = a.getParent (); p != null; p = p.getParent ()) if (p === b) return true;
17922
17923 return false;
17924 }, "java.awt.Component,java.awt.Component");
17925 c$.computeIntersection = Clazz_defineMethod (c$, "computeIntersection", 
17926 function (x, y, width, height, dest) {
17927 var x1 = (x > dest.x) ? x : dest.x;
17928 var x2 = ((x + width) < (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17929 var y1 = (y > dest.y) ? y : dest.y;
17930 var y2 = ((y + height) < (dest.y + dest.height) ? (y + height) : (dest.y + dest.height));
17931 dest.x = x1;
17932 dest.y = y1;
17933 dest.width = x2 - x1;
17934 dest.height = y2 - y1;
17935 if (dest.width < 0 || dest.height < 0) {
17936 dest.x = dest.y = dest.width = dest.height = 0;
17937 }return dest;
17938 }, "~N,~N,~N,~N,java.awt.Rectangle");
17939 c$.computeUnion = Clazz_defineMethod (c$, "computeUnion", 
17940 function (x, y, width, height, dest) {
17941 var x1 = (x < dest.x) ? x : dest.x;
17942 var x2 = ((x + width) > (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17943 var y1 = (y < dest.y) ? y : dest.y;
17944 var y2 = ((y + height) > (dest.y + dest.height)) ? (y + height) : (dest.y + dest.height);
17945 dest.x = x1;
17946 dest.y = y1;
17947 dest.width = (x2 - x1);
17948 dest.height = (y2 - y1);
17949 return dest;
17950 }, "~N,~N,~N,~N,java.awt.Rectangle");
17951 c$.computeDifference = Clazz_defineMethod (c$, "computeDifference", 
17952 function (rectA, rectB) {
17953 if (rectB == null || !rectA.intersects (rectB) || javax.swing.SwingUtilities.isRectangleContainingRectangle (rectB, rectA)) {
17954 return  new Array (0);
17955 }var t =  new java.awt.Rectangle ();
17956 var a = null;
17957 var b = null;
17958 var c = null;
17959 var d = null;
17960 var result;
17961 var rectCount = 0;
17962 if (javax.swing.SwingUtilities.isRectangleContainingRectangle (rectA, rectB)) {
17963 t.x = rectA.x;
17964 t.y = rectA.y;
17965 t.width = rectB.x - rectA.x;
17966 t.height = rectA.height;
17967 if (t.width > 0 && t.height > 0) {
17968 a =  new java.awt.Rectangle (t);
17969 rectCount++;
17970 }t.x = rectB.x;
17971 t.y = rectA.y;
17972 t.width = rectB.width;
17973 t.height = rectB.y - rectA.y;
17974 if (t.width > 0 && t.height > 0) {
17975 b =  new java.awt.Rectangle (t);
17976 rectCount++;
17977 }t.x = rectB.x;
17978 t.y = rectB.y + rectB.height;
17979 t.width = rectB.width;
17980 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17981 if (t.width > 0 && t.height > 0) {
17982 c =  new java.awt.Rectangle (t);
17983 rectCount++;
17984 }t.x = rectB.x + rectB.width;
17985 t.y = rectA.y;
17986 t.width = rectA.x + rectA.width - (rectB.x + rectB.width);
17987 t.height = rectA.height;
17988 if (t.width > 0 && t.height > 0) {
17989 d =  new java.awt.Rectangle (t);
17990 rectCount++;
17991 }} else {
17992 if (rectB.x <= rectA.x && rectB.y <= rectA.y) {
17993 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17994 t.x = rectA.x;
17995 t.y = rectB.y + rectB.height;
17996 t.width = rectA.width;
17997 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17998 if (t.width > 0 && t.height > 0) {
17999 a = t;
18000 rectCount++;
18001 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18002 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18003 if (t.width > 0 && t.height > 0) {
18004 a = t;
18005 rectCount++;
18006 }} else {
18007 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectB.y + rectB.height) - rectA.y);
18008 if (t.width > 0 && t.height > 0) {
18009 a =  new java.awt.Rectangle (t);
18010 rectCount++;
18011 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18012 if (t.width > 0 && t.height > 0) {
18013 b =  new java.awt.Rectangle (t);
18014 rectCount++;
18015 }}} else if (rectB.x <= rectA.x && (rectB.y + rectB.height) >= (rectA.y + rectA.height)) {
18016 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
18017 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18018 if (t.width > 0 && t.height > 0) {
18019 a = t;
18020 rectCount++;
18021 }} else {
18022 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18023 if (t.width > 0 && t.height > 0) {
18024 a =  new java.awt.Rectangle (t);
18025 rectCount++;
18026 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectA.y + rectA.height) - rectB.y);
18027 if (t.width > 0 && t.height > 0) {
18028 b =  new java.awt.Rectangle (t);
18029 rectCount++;
18030 }}} else if (rectB.x <= rectA.x) {
18031 if ((rectB.x + rectB.width) >= (rectA.x + rectA.width)) {
18032 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18033 if (t.width > 0 && t.height > 0) {
18034 a =  new java.awt.Rectangle (t);
18035 rectCount++;
18036 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18037 if (t.width > 0 && t.height > 0) {
18038 b =  new java.awt.Rectangle (t);
18039 rectCount++;
18040 }} else {
18041 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18042 if (t.width > 0 && t.height > 0) {
18043 a =  new java.awt.Rectangle (t);
18044 rectCount++;
18045 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectB.height);
18046 if (t.width > 0 && t.height > 0) {
18047 b =  new java.awt.Rectangle (t);
18048 rectCount++;
18049 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18050 if (t.width > 0 && t.height > 0) {
18051 c =  new java.awt.Rectangle (t);
18052 rectCount++;
18053 }}} else if (rectB.x <= (rectA.x + rectA.width) && (rectB.x + rectB.width) > (rectA.x + rectA.width)) {
18054 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18055 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18056 if (t.width > 0 && t.height > 0) {
18057 a = t;
18058 rectCount++;
18059 }} else if (rectB.y <= rectA.y) {
18060 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, (rectB.y + rectB.height) - rectA.y);
18061 if (t.width > 0 && t.height > 0) {
18062 a =  new java.awt.Rectangle (t);
18063 rectCount++;
18064 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18065 if (t.width > 0 && t.height > 0) {
18066 b =  new java.awt.Rectangle (t);
18067 rectCount++;
18068 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18069 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18070 if (t.width > 0 && t.height > 0) {
18071 a =  new java.awt.Rectangle (t);
18072 rectCount++;
18073 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, (rectA.y + rectA.height) - rectB.y);
18074 if (t.width > 0 && t.height > 0) {
18075 b =  new java.awt.Rectangle (t);
18076 rectCount++;
18077 }} else {
18078 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18079 if (t.width > 0 && t.height > 0) {
18080 a =  new java.awt.Rectangle (t);
18081 rectCount++;
18082 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, rectB.height);
18083 if (t.width > 0 && t.height > 0) {
18084 b =  new java.awt.Rectangle (t);
18085 rectCount++;
18086 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18087 if (t.width > 0 && t.height > 0) {
18088 c =  new java.awt.Rectangle (t);
18089 rectCount++;
18090 }}} else if (rectB.x >= rectA.x && (rectB.x + rectB.width) <= (rectA.x + rectA.width)) {
18091 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18092 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18093 if (t.width > 0 && t.height > 0) {
18094 a =  new java.awt.Rectangle (t);
18095 rectCount++;
18096 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18097 if (t.width > 0 && t.height > 0) {
18098 b =  new java.awt.Rectangle (t);
18099 rectCount++;
18100 }} else if (rectB.y <= rectA.y) {
18101 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18102 if (t.width > 0 && t.height > 0) {
18103 a =  new java.awt.Rectangle (t);
18104 rectCount++;
18105 }t.reshape (rectB.x, (rectB.y + rectB.height), rectB.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18106 if (t.width > 0 && t.height > 0) {
18107 b =  new java.awt.Rectangle (t);
18108 rectCount++;
18109 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18110 if (t.width > 0 && t.height > 0) {
18111 c =  new java.awt.Rectangle (t);
18112 rectCount++;
18113 }} else {
18114 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18115 if (t.width > 0 && t.height > 0) {
18116 a =  new java.awt.Rectangle (t);
18117 rectCount++;
18118 }t.reshape (rectB.x, rectA.y, rectB.width, rectB.y - rectA.y);
18119 if (t.width > 0 && t.height > 0) {
18120 b =  new java.awt.Rectangle (t);
18121 rectCount++;
18122 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18123 if (t.width > 0 && t.height > 0) {
18124 c =  new java.awt.Rectangle (t);
18125 rectCount++;
18126 }}}}result =  new Array (rectCount);
18127 rectCount = 0;
18128 if (a != null) result[rectCount++] = a;
18129 if (b != null) result[rectCount++] = b;
18130 if (c != null) result[rectCount++] = c;
18131 if (d != null) result[rectCount++] = d;
18132 return result;
18133 }, "java.awt.Rectangle,java.awt.Rectangle");
18134 c$.isLeftMouseButton = Clazz_defineMethod (c$, "isLeftMouseButton", 
18135 function (anEvent) {
18136 return ((anEvent.getModifiers () & 16) != 0);
18137 }, "java.awt.event.MouseEvent");
18138 c$.isMiddleMouseButton = Clazz_defineMethod (c$, "isMiddleMouseButton", 
18139 function (anEvent) {
18140 return ((anEvent.getModifiers () & 8) == 8);
18141 }, "java.awt.event.MouseEvent");
18142 c$.isRightMouseButton = Clazz_defineMethod (c$, "isRightMouseButton", 
18143 function (anEvent) {
18144 return ((anEvent.getModifiers () & 4) == 4);
18145 }, "java.awt.event.MouseEvent");
18146 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18147 function (g, c, p, x, y, w, h) {
18148 javax.swing.SwingUtilities.getCellRendererPane (c, p).paintComponent (g, c, p, x, y, w, h, false);
18149 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
18150 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18151 function (g, c, p, r) {
18152 javax.swing.SwingUtilities.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
18153 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
18154 c$.getCellRendererPane = Clazz_defineMethod (c$, "getCellRendererPane", 
18155  function (c, p) {
18156 var shell = c.getParent ();
18157 if (Clazz_instanceOf (shell, javax.swing.CellRendererPane)) {
18158 if (shell.getParent () !== p) {
18159 p.add (shell);
18160 }} else {
18161 shell = swingjs.api.Interface.getInstance ("javax.swing.CellRendererPane", false);
18162 shell.add (c);
18163 p.add (shell);
18164 }return shell;
18165 }, "java.awt.Component,java.awt.Container");
18166 c$.updateComponentTreeUI = Clazz_defineMethod (c$, "updateComponentTreeUI", 
18167 function (c) {
18168 javax.swing.SwingUtilities.updateComponentTreeUI0 (c);
18169 c.invalidate ();
18170 c.validate ();
18171 c.repaint ();
18172 }, "java.awt.Component");
18173 c$.updateComponentTreeUI0 = Clazz_defineMethod (c$, "updateComponentTreeUI0", 
18174  function (c) {
18175 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
18176 var jc = c;
18177 jc.updateUI ();
18178 var jpm = jc.getComponentPopupMenu ();
18179 if (jpm != null) {
18180 javax.swing.SwingUtilities.updateComponentTreeUI (jpm);
18181 }}var children = null;
18182 if (Clazz_instanceOf (c, javax.swing.JMenu)) {
18183 children = (c).getMenuComponents ();
18184 } else if (Clazz_instanceOf (c, java.awt.Container)) {
18185 children = (c).getComponents ();
18186 }if (children != null) {
18187 for (var i = 0; i < children.length; i++) {
18188 javax.swing.SwingUtilities.updateComponentTreeUI0 (children[i]);
18189 }
18190 }}, "java.awt.Component");
18191 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
18192 function (doRun) {
18193 java.awt.EventQueue.invokeLater (doRun);
18194 }, "Runnable");
18195 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
18196 function (doRun) {
18197 java.awt.EventQueue.invokeAndWait (doRun);
18198 }, "Runnable");
18199 c$.isEventDispatchThread = Clazz_defineMethod (c$, "isEventDispatchThread", 
18200 function () {
18201 return java.awt.EventQueue.isDispatchThread ();
18202 });
18203 c$.getRootPane = Clazz_defineMethod (c$, "getRootPane", 
18204 function (c) {
18205 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
18206 return (c).getRootPane ();
18207 }for (; c != null; c = c.getParent ()) {
18208 if (Clazz_instanceOf (c, javax.swing.JRootPane)) {
18209 return c;
18210 }}
18211 return null;
18212 }, "java.awt.Component");
18213 c$.getRoot = Clazz_defineMethod (c$, "getRoot", 
18214 function (c) {
18215 var applet = null;
18216 for (var p = c; p != null; p = p.getParent ()) {
18217 if (Clazz_instanceOf (p, java.awt.Window)) {
18218 return p;
18219 }if (Clazz_instanceOf (p, java.applet.Applet)) {
18220 applet = p;
18221 }}
18222 return applet;
18223 }, "java.awt.Component");
18224 c$.processKeyBindings = Clazz_defineMethod (c$, "processKeyBindings", 
18225 function (event) {
18226 if (event != null) {
18227 if (event.isConsumed ()) {
18228 return false;
18229 }var component = event.getComponent ();
18230 var pressed = (event.getID () == 401);
18231 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (event)) {
18232 return false;
18233 }while (component != null) {
18234 if (Clazz_instanceOf (component, javax.swing.JComponent)) {
18235 return (component).processKeyBindings (event, pressed);
18236 }if ((Clazz_instanceOf (component, java.applet.Applet)) || (Clazz_instanceOf (component, java.awt.Window))) {
18237 return javax.swing.JComponent.processKeyBindingsForAllComponents (event, component, pressed);
18238 }component = component.getParent ();
18239 }
18240 }return false;
18241 }, "java.awt.event.KeyEvent");
18242 c$.isValidKeyEventForKeyBindings = Clazz_defineMethod (c$, "isValidKeyEventForKeyBindings", 
18243 function (e) {
18244 if (e.getID () == 400) {
18245 var mod = e.getModifiers ();
18246 if (((mod & 8) != 0) && ((mod & 2) == 0)) {
18247 return false;
18248 }}return true;
18249 }, "java.awt.event.KeyEvent");
18250 c$.notifyAction = Clazz_defineMethod (c$, "notifyAction", 
18251 function (action, ks, event, sender, modifiers) {
18252 if (action == null) {
18253 return false;
18254 }if (Clazz_instanceOf (action, jssun.swing.UIAction)) {
18255 if (!(action).isEnabled (sender)) {
18256 return false;
18257 }} else if (!action.isEnabled ()) {
18258 return false;
18259 }var commandO;
18260 var stayNull;
18261 commandO = action.getValue ("ActionCommandKey");
18262 if (commandO == null && (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin))) {
18263 stayNull = true;
18264 } else {
18265 stayNull = false;
18266 }var command;
18267 if (commandO != null) {
18268 command = commandO.toString ();
18269 } else if (!stayNull && event.getKeyChar () != '\uffff') {
18270 command = String.valueOf (event.getKeyChar ());
18271 } else {
18272 command = null;
18273 }action.actionPerformed ( new java.awt.event.ActionEvent (sender, 1001, command, event.getWhen (), modifiers));
18274 return true;
18275 }, "javax.swing.Action,javax.swing.KeyStroke,java.awt.event.KeyEvent,~O,~N");
18276 c$.replaceUIInputMap = Clazz_defineMethod (c$, "replaceUIInputMap", 
18277 function (component, type, uiInputMap) {
18278 var map = component.getInputMap (type, (uiInputMap != null));
18279 while (map != null) {
18280 var parent = map.getParent ();
18281 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18282 map.setParent (uiInputMap);
18283 return;
18284 }map = parent;
18285 }
18286 }, "javax.swing.JComponent,~N,javax.swing.InputMap");
18287 c$.replaceUIActionMap = Clazz_defineMethod (c$, "replaceUIActionMap", 
18288 function (component, uiActionMap) {
18289 var map = component.getActionMap ((uiActionMap != null));
18290 ;while (map != null) {
18291 var parent = map.getParent ();
18292 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18293 map.setParent (uiActionMap);
18294 return;
18295 }map = parent;
18296 }
18297 }, "javax.swing.JComponent,javax.swing.ActionMap");
18298 c$.getUIInputMap = Clazz_defineMethod (c$, "getUIInputMap", 
18299 function (component, condition) {
18300 var map = component.getInputMap (condition, false);
18301 while (map != null) {
18302 var parent = map.getParent ();
18303 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18304 return parent;
18305 }map = parent;
18306 }
18307 return null;
18308 }, "javax.swing.JComponent,~N");
18309 c$.getUIActionMap = Clazz_defineMethod (c$, "getUIActionMap", 
18310 function (component) {
18311 var map = component.getActionMap (false);
18312 while (map != null) {
18313 var parent = map.getParent ();
18314 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18315 return parent;
18316 }map = parent;
18317 }
18318 return null;
18319 }, "javax.swing.JComponent");
18320 c$.getSharedOwnerFrame = Clazz_defineMethod (c$, "getSharedOwnerFrame", 
18321 function () {
18322 var sharedOwnerFrame = javax.swing.SwingUtilities.appContextGet (javax.swing.SwingUtilities.sharedOwnerFrameKey);
18323 if (sharedOwnerFrame == null) {
18324 sharedOwnerFrame =  new javax.swing.SwingUtilities.SharedOwnerFrame ();
18325 javax.swing.SwingUtilities.appContextPut (javax.swing.SwingUtilities.sharedOwnerFrameKey, sharedOwnerFrame);
18326 }return sharedOwnerFrame;
18327 });
18328 c$.getSharedOwnerFrameShutdownListener = Clazz_defineMethod (c$, "getSharedOwnerFrameShutdownListener", 
18329 function () {
18330 var sharedOwnerFrame = javax.swing.SwingUtilities.getSharedOwnerFrame ();
18331 return sharedOwnerFrame;
18332 });
18333 c$.appContextGet = Clazz_defineMethod (c$, "appContextGet", 
18334 function (key) {
18335 return jssun.awt.AppContext.getAppContext ().get (key);
18336 }, "~O");
18337 c$.appContextPut = Clazz_defineMethod (c$, "appContextPut", 
18338 function (key, value) {
18339 jssun.awt.AppContext.getAppContext ().put (key, value);
18340 }, "~O,~O");
18341 c$.appContextRemove = Clazz_defineMethod (c$, "appContextRemove", 
18342 function (key) {
18343 jssun.awt.AppContext.getAppContext ().remove (key);
18344 }, "~O");
18345 c$.loadSystemClass = Clazz_defineMethod (c$, "loadSystemClass", 
18346 function (className) {
18347 return Clazz._4Name (className, true, Thread.currentThread ().getContextClassLoader ());
18348 }, "~S");
18349 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
18350 function (c) {
18351 return c.getComponentOrientation ().isLeftToRight ();
18352 }, "java.awt.Component");
18353 c$.doesIconReferenceImage = Clazz_defineMethod (c$, "doesIconReferenceImage", 
18354 function (icon, image) {
18355 var iconImage = (icon != null && (Clazz_instanceOf (icon, javax.swing.ImageIcon))) ? (icon).getImage () : null;
18356 return (iconImage === image);
18357 }, "javax.swing.Icon,java.awt.Image");
18358 c$.findDisplayedMnemonicIndex = Clazz_defineMethod (c$, "findDisplayedMnemonicIndex", 
18359 function (text, mnemonic) {
18360 if (text == null || mnemonic == 0) {
18361 return -1;
18362 }var uc = Character.toUpperCase (String.fromCharCode (mnemonic));
18363 var lc = Character.toLowerCase (String.fromCharCode (mnemonic));
18364 var uci = text.indexOf (uc);
18365 var lci = text.indexOf (lc);
18366 if (uci == -1) {
18367 return lci;
18368 } else if (lci == -1) {
18369 return uci;
18370 } else {
18371 return (lci < uci) ? lci : uci;
18372 }}, "~S,~N");
18373 c$.calculateInnerArea = Clazz_defineMethod (c$, "calculateInnerArea", 
18374 function (c, r) {
18375 if (c == null) {
18376 return null;
18377 }var rect = r;
18378 var insets = c.getInsets ();
18379 if (rect == null) {
18380 rect =  new java.awt.Rectangle ();
18381 }rect.x = insets.left;
18382 rect.y = insets.top;
18383 rect.width = c.getWidth () - insets.left - insets.right;
18384 rect.height = c.getHeight () - insets.top - insets.bottom;
18385 return rect;
18386 }, "javax.swing.JComponent,java.awt.Rectangle");
18387 c$.updateRendererOrEditorUI = Clazz_defineMethod (c$, "updateRendererOrEditorUI", 
18388 function (rendererOrEditor) {
18389 if (rendererOrEditor == null) {
18390 return;
18391 }var component = null;
18392 if (Clazz_instanceOf (rendererOrEditor, java.awt.Component)) {
18393 component = rendererOrEditor;
18394 }if (Clazz_instanceOf (rendererOrEditor, javax.swing.DefaultCellEditor)) {
18395 component = (rendererOrEditor).getComponent ();
18396 }if (component != null) {
18397 javax.swing.SwingUtilities.updateComponentTreeUI (component);
18398 }}, "~O");
18399 Clazz_pu$h(self.c$);
18400 c$ = Clazz_declareType (javax.swing.SwingUtilities, "SharedOwnerFrame", java.awt.Frame, java.awt.event.WindowListener);
18401 Clazz_defineMethod (c$, "addNotify", 
18402 function () {
18403 Clazz_superCall (this, javax.swing.SwingUtilities.SharedOwnerFrame, "addNotify", []);
18404 this.installListeners ();
18405 });
18406 Clazz_defineMethod (c$, "installListeners", 
18407 function () {
18408 var a = this.getOwnedWindows ();
18409 for (var b = 0; b < a.length; b++) {
18410 var c = a[b];
18411 if (c != null) {
18412 c.removeWindowListener (this);
18413 c.addWindowListener (this);
18414 }}
18415 });
18416 Clazz_overrideMethod (c$, "windowClosed", 
18417 function (a) {
18418 var b = this.getOwnedWindows ();
18419 for (var c = 0; c < b.length; c++) {
18420 var d = b[c];
18421 if (d != null) {
18422 if (d.isDisplayable ()) {
18423 return;
18424 }d.removeWindowListener (this);
18425 }this.dispose ();
18426 }
18427 }, "java.awt.event.WindowEvent");
18428 Clazz_overrideMethod (c$, "windowOpened", 
18429 function (a) {
18430 }, "java.awt.event.WindowEvent");
18431 Clazz_overrideMethod (c$, "windowClosing", 
18432 function (a) {
18433 }, "java.awt.event.WindowEvent");
18434 Clazz_overrideMethod (c$, "windowIconified", 
18435 function (a) {
18436 }, "java.awt.event.WindowEvent");
18437 Clazz_overrideMethod (c$, "windowDeiconified", 
18438 function (a) {
18439 }, "java.awt.event.WindowEvent");
18440 Clazz_overrideMethod (c$, "windowActivated", 
18441 function (a) {
18442 }, "java.awt.event.WindowEvent");
18443 Clazz_overrideMethod (c$, "windowDeactivated", 
18444 function (a) {
18445 }, "java.awt.event.WindowEvent");
18446 Clazz_defineMethod (c$, "show", 
18447 function () {
18448 });
18449 Clazz_overrideMethod (c$, "dispose", 
18450 function () {
18451 });
18452 c$ = Clazz_p0p ();
18453 c$.sharedOwnerFrameKey = c$.prototype.sharedOwnerFrameKey =  new Clazz._O ();
18454 });
18455 Clazz_declarePackage ("java.awt");
18456 Clazz_load (["java.awt.Window"], "java.awt.Frame", ["java.lang.IllegalArgumentException", "java.awt.Cursor", "$.IllegalComponentStateException"], function () {
18457 c$ = Clazz_decorateAsClass (function () {
18458 this.maximizedBounds = null;
18459 this.title = "Untitled";
18460 this.resizable = true;
18461 this.undecorated = false;
18462 this.mbManagement = false;
18463 this.$state = 0;
18464 this.ownedWindows = null;
18465 this.menuBar = null;
18466 Clazz_instantialize (this, arguments);
18467 }, java.awt, "Frame", java.awt.Window);
18468 Clazz_makeConstructor (c$, 
18469 function () {
18470 this.construct ("");
18471 });
18472 Clazz_makeConstructor (c$, 
18473 function (gc) {
18474 this.construct ("", gc);
18475 }, "java.awt.GraphicsConfiguration");
18476 Clazz_makeConstructor (c$, 
18477 function (title) {
18478 Clazz_superConstructor (this, java.awt.Frame, []);
18479 this.initFrame (title, null);
18480 }, "~S");
18481 Clazz_makeConstructor (c$, 
18482 function (title, gc) {
18483 Clazz_superConstructor (this, java.awt.Frame, [gc]);
18484 this.initFrame (title, gc);
18485 }, "~S,java.awt.GraphicsConfiguration");
18486 Clazz_defineMethod (c$, "initFrame", 
18487  function (title, gc) {
18488 this.title = title;
18489 }, "~S,java.awt.GraphicsConfiguration");
18490 Clazz_overrideMethod (c$, "constructComponentName", 
18491 function () {
18492 {
18493 return "frame" + java.awt.Frame.$nameCounter++;
18494 }});
18495 Clazz_defineMethod (c$, "addNotify", 
18496 function () {
18497 if (this.peer == null) {
18498 this.peer = this.getToolkit ().createFrame (this);
18499 }var p = this.peer;
18500 p.setMaximizedBounds (this.maximizedBounds);
18501 Clazz_superCall (this, java.awt.Frame, "addNotify", []);
18502 });
18503 Clazz_defineMethod (c$, "getTitle", 
18504 function () {
18505 return this.title;
18506 });
18507 Clazz_defineMethod (c$, "setTitle", 
18508 function (title) {
18509 var oldTitle = this.title;
18510 if (title == null) {
18511 title = "";
18512 }{
18513 this.title = title;
18514 }this.firePropertyChangeObject ("title", oldTitle, title);
18515 }, "~S");
18516 Clazz_defineMethod (c$, "getIconImage", 
18517 function () {
18518 var icons = this.icons;
18519 if (icons != null) {
18520 if (icons.size () > 0) {
18521 return icons.get (0);
18522 }}return null;
18523 });
18524 Clazz_defineMethod (c$, "isResizable", 
18525 function () {
18526 return this.resizable;
18527 });
18528 Clazz_defineMethod (c$, "setResizable", 
18529 function (resizable) {
18530 var oldResizable = this.resizable;
18531 {
18532 this.resizable = resizable;
18533 }this.firePropertyChangeBool ("resizable", oldResizable, resizable);
18534 }, "~B");
18535 Clazz_defineMethod (c$, "setState", 
18536 function (state) {
18537 var current = this.getExtendedState ();
18538 if (state == 1 && (current & 1) == 0) {
18539 this.setExtendedState (current | 1);
18540 } else if (state == 0 && (current & 1) != 0) {
18541 this.setExtendedState (current & -2);
18542 }}, "~N");
18543 Clazz_defineMethod (c$, "setExtendedState", 
18544 function (state) {
18545 if (!this.isFrameStateSupported (state)) {
18546 return;
18547 }this.$state = state;
18548 }, "~N");
18549 Clazz_defineMethod (c$, "isFrameStateSupported", 
18550  function (state) {
18551 if (!this.getToolkit ().isFrameStateSupported (state)) {
18552 if (((state & 1) != 0) && !this.getToolkit ().isFrameStateSupported (1)) {
18553 return false;
18554 } else {
18555 state &= -2;
18556 }return this.getToolkit ().isFrameStateSupported (state);
18557 }return true;
18558 }, "~N");
18559 Clazz_defineMethod (c$, "getState", 
18560 function () {
18561 return (this.getExtendedState () & 1) != 0 ? 1 : 0;
18562 });
18563 Clazz_defineMethod (c$, "getExtendedState", 
18564 function () {
18565 return this.$state;
18566 });
18567 Clazz_defineMethod (c$, "setMaximizedBounds", 
18568 function (bounds) {
18569 this.maximizedBounds = bounds;
18570 }, "java.awt.Rectangle");
18571 Clazz_defineMethod (c$, "getMaximizedBounds", 
18572 function () {
18573 return this.maximizedBounds;
18574 });
18575 Clazz_defineMethod (c$, "setUndecorated", 
18576 function (undecorated) {
18577 {
18578 if (this.isDisplayable ()) {
18579 throw  new java.awt.IllegalComponentStateException ("The frame is displayable.");
18580 }this.undecorated = undecorated;
18581 }}, "~B");
18582 Clazz_defineMethod (c$, "isUndecorated", 
18583 function () {
18584 return this.undecorated;
18585 });
18586 Clazz_overrideMethod (c$, "removeNotify", 
18587 function () {
18588 });
18589 Clazz_defineMethod (c$, "paramString", 
18590 function () {
18591 var str = Clazz_superCall (this, java.awt.Frame, "paramString", []);
18592 if (this.title != null) {
18593 str += ",title=" + this.title;
18594 }if (this.resizable) {
18595 str += ",resizable";
18596 }this.getExtendedState ();
18597 if (this.$state == 0) {
18598 str += ",normal";
18599 } else {
18600 if ((this.$state & 1) != 0) {
18601 str += ",iconified";
18602 }if ((this.$state & 6) == 6) {
18603 str += ",maximized";
18604 } else if ((this.$state & 2) != 0) {
18605 str += ",maximized_horiz";
18606 } else if ((this.$state & 4) != 0) {
18607 str += ",maximized_vert";
18608 }}return str;
18609 });
18610 Clazz_defineMethod (c$, "setCursor", 
18611 function (cursorType) {
18612 if (cursorType < 0 || cursorType > 13) {
18613 throw  new IllegalArgumentException ("illegal cursor type");
18614 }this.setCursor (java.awt.Cursor.getPredefinedCursor (cursorType));
18615 }, "~N");
18616 Clazz_defineMethod (c$, "getCursorType", 
18617 function () {
18618 return (this.getCursor ().getType ());
18619 });
18620 c$.getFrames = Clazz_defineMethod (c$, "getFrames", 
18621 function () {
18622 var allWindows = java.awt.Window.getWindows ();
18623 var frameCount = 0;
18624 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18625 if (Clazz_instanceOf (w, java.awt.Frame)) {
18626 frameCount++;
18627 }}
18628 var frames =  new Array (frameCount);
18629 var c = 0;
18630 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18631 if (Clazz_instanceOf (w, java.awt.Frame)) {
18632 frames[c++] = w;
18633 }}
18634 return frames;
18635 });
18636 Clazz_defineStatics (c$,
18637 "DEFAULT_CURSOR", 0,
18638 "CROSSHAIR_CURSOR", 1,
18639 "TEXT_CURSOR", 2,
18640 "WAIT_CURSOR", 3,
18641 "SW_RESIZE_CURSOR", 4,
18642 "SE_RESIZE_CURSOR", 5,
18643 "NW_RESIZE_CURSOR", 6,
18644 "NE_RESIZE_CURSOR", 7,
18645 "N_RESIZE_CURSOR", 8,
18646 "S_RESIZE_CURSOR", 9,
18647 "W_RESIZE_CURSOR", 10,
18648 "E_RESIZE_CURSOR", 11,
18649 "HAND_CURSOR", 12,
18650 "MOVE_CURSOR", 13,
18651 "NORMAL", 0,
18652 "ICONIFIED", 1,
18653 "MAXIMIZED_HORIZ", 2,
18654 "MAXIMIZED_VERT", 4,
18655 "MAXIMIZED_BOTH", 6,
18656 "$base", "frame",
18657 "$nameCounter", 0);
18658 });
18659 Clazz_declarePackage ("java.awt");
18660 Clazz_load (["java.lang.IllegalStateException"], "java.awt.IllegalComponentStateException", null, function () {
18661 c$ = Clazz_declareType (java.awt, "IllegalComponentStateException", IllegalStateException);
18662 });
18663 Clazz_declarePackage ("javax.swing");
18664 c$ = Clazz_declareInterface (javax.swing, "SwingConstants");
18665 Clazz_defineStatics (c$,
18666 "CENTER", 0,
18667 "TOP", 1,
18668 "LEFT", 2,
18669 "BOTTOM", 3,
18670 "RIGHT", 4,
18671 "NORTH", 1,
18672 "NORTH_EAST", 2,
18673 "EAST", 3,
18674 "SOUTH_EAST", 4,
18675 "SOUTH", 5,
18676 "SOUTH_WEST", 6,
18677 "WEST", 7,
18678 "NORTH_WEST", 8,
18679 "HORIZONTAL", 0,
18680 "VERTICAL", 1,
18681 "LEADING", 10,
18682 "TRAILING", 11,
18683 "NEXT", 12,
18684 "PREVIOUS", 13);
18685 Clazz_declarePackage ("java.awt");
18686 Clazz_load (["java.awt.Shape", "java.awt.geom.Rectangle2D"], "java.awt.Rectangle", ["java.awt.Dimension", "$.Point"], function () {
18687 c$ = Clazz_decorateAsClass (function () {
18688 this.x = 0;
18689 this.y = 0;
18690 this.width = 0;
18691 this.height = 0;
18692 Clazz_instantialize (this, arguments);
18693 }, java.awt, "Rectangle", java.awt.geom.Rectangle2D, java.awt.Shape);
18694 Clazz_makeConstructor (c$, 
18695 function () {
18696 this.construct (0, 0, 0, 0);
18697 });
18698 Clazz_makeConstructor (c$, 
18699 function (r) {
18700 this.construct (r.x, r.y, r.width, r.height);
18701 }, "java.awt.Rectangle");
18702 Clazz_makeConstructor (c$, 
18703 function (x, y, width, height) {
18704 Clazz_superConstructor (this, java.awt.Rectangle, []);
18705 this.x = x;
18706 this.y = y;
18707 this.width = width;
18708 this.height = height;
18709 }, "~N,~N,~N,~N");
18710 Clazz_makeConstructor (c$, 
18711 function (width, height) {
18712 this.construct (0, 0, width, height);
18713 }, "~N,~N");
18714 Clazz_makeConstructor (c$, 
18715 function (p, d) {
18716 this.construct (p.x, p.y, d.width, d.height);
18717 }, "java.awt.Point,java.awt.Dimension");
18718 Clazz_makeConstructor (c$, 
18719 function (p) {
18720 this.construct (p.x, p.y, 0, 0);
18721 }, "java.awt.Point");
18722 Clazz_makeConstructor (c$, 
18723 function (d) {
18724 this.construct (0, 0, d.width, d.height);
18725 }, "java.awt.Dimension");
18726 Clazz_overrideMethod (c$, "getX", 
18727 function () {
18728 return this.x;
18729 });
18730 Clazz_overrideMethod (c$, "getY", 
18731 function () {
18732 return this.y;
18733 });
18734 Clazz_overrideMethod (c$, "getWidth", 
18735 function () {
18736 return this.width;
18737 });
18738 Clazz_overrideMethod (c$, "getHeight", 
18739 function () {
18740 return this.height;
18741 });
18742 Clazz_overrideMethod (c$, "getBounds", 
18743 function () {
18744 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18745 });
18746 Clazz_overrideMethod (c$, "getBounds2D", 
18747 function () {
18748 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18749 });
18750 Clazz_defineMethod (c$, "setBounds", 
18751 function (r) {
18752 this.reshape (r.x, r.y, r.width, r.height);
18753 }, "java.awt.Rectangle");
18754 Clazz_defineMethod (c$, "setBounds", 
18755 function (x, y, width, height) {
18756 this.reshape (x, y, width, height);
18757 }, "~N,~N,~N,~N");
18758 Clazz_defineMethod (c$, "setRect", 
18759 function (x, y, width, height) {
18760 var newx;
18761 var newy;
18762 var neww;
18763 var newh;
18764 if (x > 4.294967294E9) {
18765 newx = 2147483647;
18766 neww = -1;
18767 } else {
18768 newx = java.awt.Rectangle.clip (x, false);
18769 if (width >= 0) width += x - newx;
18770 neww = java.awt.Rectangle.clip (width, width >= 0);
18771 }if (y > 4.294967294E9) {
18772 newy = 2147483647;
18773 newh = -1;
18774 } else {
18775 newy = java.awt.Rectangle.clip (y, false);
18776 if (height >= 0) height += y - newy;
18777 newh = java.awt.Rectangle.clip (height, height >= 0);
18778 }this.reshape (newx, newy, neww, newh);
18779 }, "~N,~N,~N,~N");
18780 c$.clip = Clazz_defineMethod (c$, "clip", 
18781  function (v, doceil) {
18782 if (v <= -2147483648) {
18783 return -2147483648;
18784 }if (v >= 2147483647) {
18785 return 2147483647;
18786 }return Clazz_doubleToInt (doceil ? Math.ceil (v) : Math.floor (v));
18787 }, "~N,~B");
18788 Clazz_defineMethod (c$, "reshape", 
18789 function (x, y, width, height) {
18790 this.x = x;
18791 this.y = y;
18792 this.width = width;
18793 this.height = height;
18794 }, "~N,~N,~N,~N");
18795 Clazz_defineMethod (c$, "getLocation", 
18796 function () {
18797 return  new java.awt.Point (this.x, this.y);
18798 });
18799 Clazz_defineMethod (c$, "setLocation", 
18800 function (p) {
18801 this.setLocation (p.x, p.y);
18802 }, "java.awt.Point");
18803 Clazz_defineMethod (c$, "setLocation", 
18804 function (x, y) {
18805 this.move (x, y);
18806 }, "~N,~N");
18807 Clazz_defineMethod (c$, "move", 
18808 function (x, y) {
18809 this.x = x;
18810 this.y = y;
18811 }, "~N,~N");
18812 Clazz_defineMethod (c$, "translate", 
18813 function (dx, dy) {
18814 var oldv = this.x;
18815 var newv = oldv + dx;
18816 if (dx < 0) {
18817 if (newv > oldv) {
18818 if (this.width >= 0) {
18819 this.width += newv - -2147483648;
18820 }newv = -2147483648;
18821 }} else {
18822 if (newv < oldv) {
18823 if (this.width >= 0) {
18824 this.width += newv - 2147483647;
18825 if (this.width < 0) this.width = 2147483647;
18826 }newv = 2147483647;
18827 }}this.x = newv;
18828 oldv = this.y;
18829 newv = oldv + dy;
18830 if (dy < 0) {
18831 if (newv > oldv) {
18832 if (this.height >= 0) {
18833 this.height += newv - -2147483648;
18834 }newv = -2147483648;
18835 }} else {
18836 if (newv < oldv) {
18837 if (this.height >= 0) {
18838 this.height += newv - 2147483647;
18839 if (this.height < 0) this.height = 2147483647;
18840 }newv = 2147483647;
18841 }}this.y = newv;
18842 }, "~N,~N");
18843 Clazz_defineMethod (c$, "getSize", 
18844 function () {
18845 return  new java.awt.Dimension (this.width, this.height);
18846 });
18847 Clazz_defineMethod (c$, "setSize", 
18848 function (d) {
18849 this.setSize (d.width, d.height);
18850 }, "java.awt.Dimension");
18851 Clazz_defineMethod (c$, "setSize", 
18852 function (width, height) {
18853 this.resize (width, height);
18854 }, "~N,~N");
18855 Clazz_defineMethod (c$, "resize", 
18856 function (width, height) {
18857 this.width = width;
18858 this.height = height;
18859 }, "~N,~N");
18860 Clazz_defineMethod (c$, "contains", 
18861 function (p) {
18862 return this.contains (p.x, p.y);
18863 }, "java.awt.Point");
18864 Clazz_defineMethod (c$, "contains", 
18865 function (x, y) {
18866 return this.inside (x, y);
18867 }, "~N,~N");
18868 Clazz_defineMethod (c$, "contains", 
18869 function (r) {
18870 return this.contains (r.x, r.y, r.width, r.height);
18871 }, "java.awt.Rectangle");
18872 Clazz_defineMethod (c$, "contains", 
18873 function (X, Y, W, H) {
18874 var w = this.width;
18875 var h = this.height;
18876 if ((w | h | W | H) < 0) {
18877 return false;
18878 }var x = this.x;
18879 var y = this.y;
18880 if (X < x || Y < y) {
18881 return false;
18882 }w += x;
18883 W += X;
18884 if (W <= X) {
18885 if (w >= x || W > w) return false;
18886 } else {
18887 if (w >= x && W > w) return false;
18888 }h += y;
18889 H += Y;
18890 if (H <= Y) {
18891 if (h >= y || H > h) return false;
18892 } else {
18893 if (h >= y && H > h) return false;
18894 }return true;
18895 }, "~N,~N,~N,~N");
18896 Clazz_defineMethod (c$, "inside", 
18897 function (X, Y) {
18898 var w = this.width;
18899 var h = this.height;
18900 if ((w | h) < 0) {
18901 return false;
18902 }var x = this.x;
18903 var y = this.y;
18904 if (X < x || Y < y) {
18905 return false;
18906 }w += x;
18907 h += y;
18908 return ((w < x || w > X) && (h < y || h > Y));
18909 }, "~N,~N");
18910 Clazz_defineMethod (c$, "intersects", 
18911 function (r) {
18912 var tw = this.width;
18913 var th = this.height;
18914 var rw = r.width;
18915 var rh = r.height;
18916 if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) {
18917 return false;
18918 }var tx = this.x;
18919 var ty = this.y;
18920 var rx = r.x;
18921 var ry = r.y;
18922 rw += rx;
18923 rh += ry;
18924 tw += tx;
18925 th += ty;
18926 return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry));
18927 }, "java.awt.Rectangle");
18928 Clazz_defineMethod (c$, "intersection", 
18929 function (r) {
18930 var tx1 = this.x;
18931 var ty1 = this.y;
18932 var rx1 = r.x;
18933 var ry1 = r.y;
18934 var tx2 = tx1;
18935 tx2 += this.width;
18936 var ty2 = ty1;
18937 ty2 += this.height;
18938 var rx2 = rx1;
18939 rx2 += r.width;
18940 var ry2 = ry1;
18941 ry2 += r.height;
18942 if (tx1 < rx1) tx1 = rx1;
18943 if (ty1 < ry1) ty1 = ry1;
18944 if (tx2 > rx2) tx2 = rx2;
18945 if (ty2 > ry2) ty2 = ry2;
18946 tx2 -= tx1;
18947 ty2 -= ty1;
18948 if (tx2 < -2147483648) tx2 = -2147483648;
18949 if (ty2 < -2147483648) ty2 = -2147483648;
18950 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18951 }, "java.awt.Rectangle");
18952 Clazz_defineMethod (c$, "union", 
18953 function (r) {
18954 var tx2 = this.width;
18955 var ty2 = this.height;
18956 if ((tx2 | ty2) < 0) {
18957 return  new java.awt.Rectangle (r);
18958 }var rx2 = r.width;
18959 var ry2 = r.height;
18960 if ((rx2 | ry2) < 0) {
18961 return  new java.awt.Rectangle (this);
18962 }var tx1 = this.x;
18963 var ty1 = this.y;
18964 tx2 += tx1;
18965 ty2 += ty1;
18966 var rx1 = r.x;
18967 var ry1 = r.y;
18968 rx2 += rx1;
18969 ry2 += ry1;
18970 if (tx1 > rx1) tx1 = rx1;
18971 if (ty1 > ry1) ty1 = ry1;
18972 if (tx2 < rx2) tx2 = rx2;
18973 if (ty2 < ry2) ty2 = ry2;
18974 tx2 -= tx1;
18975 ty2 -= ty1;
18976 if (tx2 > 2147483647) tx2 = 2147483647;
18977 if (ty2 > 2147483647) ty2 = 2147483647;
18978 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18979 }, "java.awt.Rectangle");
18980 Clazz_defineMethod (c$, "add", 
18981 function (newx, newy) {
18982 if ((this.width | this.height) < 0) {
18983 this.x = newx;
18984 this.y = newy;
18985 this.width = this.height = 0;
18986 return;
18987 }var x1 = this.x;
18988 var y1 = this.y;
18989 var x2 = this.width;
18990 var y2 = this.height;
18991 x2 += x1;
18992 y2 += y1;
18993 if (x1 > newx) x1 = newx;
18994 if (y1 > newy) y1 = newy;
18995 if (x2 < newx) x2 = newx;
18996 if (y2 < newy) y2 = newy;
18997 x2 -= x1;
18998 y2 -= y1;
18999 if (x2 > 2147483647) x2 = 2147483647;
19000 if (y2 > 2147483647) y2 = 2147483647;
19001 this.reshape (x1, y1, x2, y2);
19002 }, "~N,~N");
19003 Clazz_defineMethod (c$, "add", 
19004 function (pt) {
19005 this.add (pt.x, pt.y);
19006 }, "java.awt.Point");
19007 Clazz_defineMethod (c$, "add", 
19008 function (r) {
19009 var tx2 = this.width;
19010 var ty2 = this.height;
19011 if ((tx2 | ty2) < 0) {
19012 this.reshape (r.x, r.y, r.width, r.height);
19013 }var rx2 = r.width;
19014 var ry2 = r.height;
19015 if ((rx2 | ry2) < 0) {
19016 return;
19017 }var tx1 = this.x;
19018 var ty1 = this.y;
19019 tx2 += tx1;
19020 ty2 += ty1;
19021 var rx1 = r.x;
19022 var ry1 = r.y;
19023 rx2 += rx1;
19024 ry2 += ry1;
19025 if (tx1 > rx1) tx1 = rx1;
19026 if (ty1 > ry1) ty1 = ry1;
19027 if (tx2 < rx2) tx2 = rx2;
19028 if (ty2 < ry2) ty2 = ry2;
19029 tx2 -= tx1;
19030 ty2 -= ty1;
19031 if (tx2 > 2147483647) tx2 = 2147483647;
19032 if (ty2 > 2147483647) ty2 = 2147483647;
19033 this.reshape (tx1, ty1, tx2, ty2);
19034 }, "java.awt.Rectangle");
19035 Clazz_defineMethod (c$, "grow", 
19036 function (h, v) {
19037 var x0 = this.x;
19038 var y0 = this.y;
19039 var x1 = this.width;
19040 var y1 = this.height;
19041 x1 += x0;
19042 y1 += y0;
19043 x0 -= h;
19044 y0 -= v;
19045 x1 += h;
19046 y1 += v;
19047 if (x1 < x0) {
19048 x1 -= x0;
19049 if (x1 < -2147483648) x1 = -2147483648;
19050 if (x0 < -2147483648) x0 = -2147483648;
19051  else if (x0 > 2147483647) x0 = 2147483647;
19052 } else {
19053 if (x0 < -2147483648) x0 = -2147483648;
19054  else if (x0 > 2147483647) x0 = 2147483647;
19055 x1 -= x0;
19056 if (x1 < -2147483648) x1 = -2147483648;
19057  else if (x1 > 2147483647) x1 = 2147483647;
19058 }if (y1 < y0) {
19059 y1 -= y0;
19060 if (y1 < -2147483648) y1 = -2147483648;
19061 if (y0 < -2147483648) y0 = -2147483648;
19062  else if (y0 > 2147483647) y0 = 2147483647;
19063 } else {
19064 if (y0 < -2147483648) y0 = -2147483648;
19065  else if (y0 > 2147483647) y0 = 2147483647;
19066 y1 -= y0;
19067 if (y1 < -2147483648) y1 = -2147483648;
19068  else if (y1 > 2147483647) y1 = 2147483647;
19069 }this.reshape (x0, y0, x1, y1);
19070 }, "~N,~N");
19071 Clazz_overrideMethod (c$, "isEmpty", 
19072 function () {
19073 return (this.width <= 0) || (this.height <= 0);
19074 });
19075 Clazz_defineMethod (c$, "outcode", 
19076 function (x, y) {
19077 var out = 0;
19078 if (this.width <= 0) {
19079 out |= 5;
19080 } else if (x < this.x) {
19081 out |= 1;
19082 } else if (x > this.x + this.width) {
19083 out |= 4;
19084 }if (this.height <= 0) {
19085 out |= 10;
19086 } else if (y < this.y) {
19087 out |= 2;
19088 } else if (y > this.y + this.height) {
19089 out |= 8;
19090 }return out;
19091 }, "~N,~N");
19092 Clazz_overrideMethod (c$, "createIntersection", 
19093 function (r) {
19094 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
19095 return this.intersection (r);
19096 }var dest =  new java.awt.geom.Rectangle2D.Double ();
19097 java.awt.geom.Rectangle2D.intersect (this, r, dest);
19098 return dest;
19099 }, "java.awt.geom.Rectangle2D");
19100 Clazz_overrideMethod (c$, "createUnion", 
19101 function (r) {
19102 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
19103 return this.union (r);
19104 }var dest =  new java.awt.geom.Rectangle2D.Double ();
19105 java.awt.geom.Rectangle2D.union (this, r, dest);
19106 return dest;
19107 }, "java.awt.geom.Rectangle2D");
19108 Clazz_defineMethod (c$, "equals", 
19109 function (obj) {
19110 if (Clazz_instanceOf (obj, java.awt.Rectangle)) {
19111 var r = obj;
19112 return ((this.x == r.x) && (this.y == r.y) && (this.width == r.width) && (this.height == r.height));
19113 }return Clazz_superCall (this, java.awt.Rectangle, "equals", [obj]);
19114 }, "~O");
19115 Clazz_overrideMethod (c$, "toString", 
19116 function () {
19117 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",width=" + this.width + ",height=" + this.height + "]";
19118 });
19119 });
19120 Clazz_declarePackage ("java.awt");
19121 Clazz_declareInterface (java.awt, "Shape");
19122 Clazz_declarePackage ("java.awt.geom");
19123 Clazz_load (["java.awt.geom.RectangularShape"], "java.awt.geom.Rectangle2D", ["java.lang.Double", "java.awt.geom.RectIterator"], function () {
19124 c$ = Clazz_declareType (java.awt.geom, "Rectangle2D", java.awt.geom.RectangularShape);
19125 Clazz_makeConstructor (c$, 
19126 function () {
19127 Clazz_superConstructor (this, java.awt.geom.Rectangle2D, []);
19128 });
19129 Clazz_defineMethod (c$, "setRect", 
19130 function (r) {
19131 this.setRect (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19132 }, "java.awt.geom.Rectangle2D");
19133 Clazz_defineMethod (c$, "intersectsLine", 
19134 function (x1, y1, x2, y2) {
19135 var out1;
19136 var out2;
19137 if ((out2 = this.outcode (x2, y2)) == 0) {
19138 return true;
19139 }while ((out1 = this.outcode (x1, y1)) != 0) {
19140 if ((out1 & out2) != 0) {
19141 return false;
19142 }if ((out1 & (5)) != 0) {
19143 var x = this.getX ();
19144 if ((out1 & 4) != 0) {
19145 x += this.getWidth ();
19146 }y1 = y1 + (x - x1) * (y2 - y1) / (x2 - x1);
19147 x1 = x;
19148 } else {
19149 var y = this.getY ();
19150 if ((out1 & 8) != 0) {
19151 y += this.getHeight ();
19152 }x1 = x1 + (y - y1) * (x2 - x1) / (y2 - y1);
19153 y1 = y;
19154 }}
19155 return true;
19156 }, "~N,~N,~N,~N");
19157 Clazz_defineMethod (c$, "intersectsLine", 
19158 function (l) {
19159 return this.intersectsLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
19160 }, "java.awt.geom.Line2D");
19161 Clazz_defineMethod (c$, "outcode", 
19162 function (p) {
19163 return this.outcode (p.getX (), p.getY ());
19164 }, "java.awt.geom.Point2D");
19165 Clazz_defineMethod (c$, "setFrame", 
19166 function (x, y, w, h) {
19167 this.setRect (x, y, w, h);
19168 }, "~N,~N,~N,~N");
19169 Clazz_overrideMethod (c$, "getBounds2D", 
19170 function () {
19171 return this.clone ();
19172 });
19173 Clazz_defineMethod (c$, "contains", 
19174 function (x, y) {
19175 var x0 = this.getX ();
19176 var y0 = this.getY ();
19177 return (x >= x0 && y >= y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19178 }, "~N,~N");
19179 Clazz_defineMethod (c$, "intersects", 
19180 function (x, y, w, h) {
19181 if (this.isEmpty () || w <= 0 || h <= 0) {
19182 return false;
19183 }var x0 = this.getX ();
19184 var y0 = this.getY ();
19185 return (x + w > x0 && y + h > y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19186 }, "~N,~N,~N,~N");
19187 Clazz_defineMethod (c$, "contains", 
19188 function (x, y, w, h) {
19189 if (this.isEmpty () || w <= 0 || h <= 0) {
19190 return false;
19191 }var x0 = this.getX ();
19192 var y0 = this.getY ();
19193 return (x >= x0 && y >= y0 && (x + w) <= x0 + this.getWidth () && (y + h) <= y0 + this.getHeight ());
19194 }, "~N,~N,~N,~N");
19195 c$.intersect = Clazz_defineMethod (c$, "intersect", 
19196 function (src1, src2, dest) {
19197 var x1 = Math.max (src1.getMinX (), src2.getMinX ());
19198 var y1 = Math.max (src1.getMinY (), src2.getMinY ());
19199 var x2 = Math.min (src1.getMaxX (), src2.getMaxX ());
19200 var y2 = Math.min (src1.getMaxY (), src2.getMaxY ());
19201 dest.setFrame (x1, y1, x2 - x1, y2 - y1);
19202 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19203 c$.union = Clazz_defineMethod (c$, "union", 
19204 function (src1, src2, dest) {
19205 var x1 = Math.min (src1.getMinX (), src2.getMinX ());
19206 var y1 = Math.min (src1.getMinY (), src2.getMinY ());
19207 var x2 = Math.max (src1.getMaxX (), src2.getMaxX ());
19208 var y2 = Math.max (src1.getMaxY (), src2.getMaxY ());
19209 dest.setFrameFromDiagonal (x1, y1, x2, y2);
19210 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19211 Clazz_defineMethod (c$, "add", 
19212 function (newx, newy) {
19213 var x1 = Math.min (this.getMinX (), newx);
19214 var x2 = Math.max (this.getMaxX (), newx);
19215 var y1 = Math.min (this.getMinY (), newy);
19216 var y2 = Math.max (this.getMaxY (), newy);
19217 this.setRect (x1, y1, x2 - x1, y2 - y1);
19218 }, "~N,~N");
19219 Clazz_defineMethod (c$, "add", 
19220 function (pt) {
19221 this.add (pt.getX (), pt.getY ());
19222 }, "java.awt.geom.Point2D");
19223 Clazz_defineMethod (c$, "add", 
19224 function (r) {
19225 var x1 = Math.min (this.getMinX (), r.getMinX ());
19226 var x2 = Math.max (this.getMaxX (), r.getMaxX ());
19227 var y1 = Math.min (this.getMinY (), r.getMinY ());
19228 var y2 = Math.max (this.getMaxY (), r.getMaxY ());
19229 this.setRect (x1, y1, x2 - x1, y2 - y1);
19230 }, "java.awt.geom.Rectangle2D");
19231 Clazz_defineMethod (c$, "getPathIterator", 
19232 function (at) {
19233 return  new java.awt.geom.RectIterator (this, at);
19234 }, "java.awt.geom.AffineTransform");
19235 Clazz_defineMethod (c$, "getPathIterator", 
19236 function (at, flatness) {
19237 return  new java.awt.geom.RectIterator (this, at);
19238 }, "java.awt.geom.AffineTransform,~N");
19239 Clazz_overrideMethod (c$, "hashCode", 
19240 function () {
19241 var bits = java.lang.Double.doubleToLongBits (this.getX ());
19242 bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37;
19243 bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43;
19244 bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47;
19245 return ((bits) ^ ((bits >> 32)));
19246 });
19247 Clazz_overrideMethod (c$, "equals", 
19248 function (obj) {
19249 if (obj === this) {
19250 return true;
19251 }if (Clazz_instanceOf (obj, java.awt.geom.Rectangle2D)) {
19252 var r2d = obj;
19253 return ((this.getX () == r2d.getX ()) && (this.getY () == r2d.getY ()) && (this.getWidth () == r2d.getWidth ()) && (this.getHeight () == r2d.getHeight ()));
19254 }return false;
19255 }, "~O");
19256 Clazz_pu$h(self.c$);
19257 c$ = Clazz_decorateAsClass (function () {
19258 this.x = 0;
19259 this.y = 0;
19260 this.width = 0;
19261 this.height = 0;
19262 Clazz_instantialize (this, arguments);
19263 }, java.awt.geom.Rectangle2D, "Float", java.awt.geom.Rectangle2D);
19264 Clazz_makeConstructor (c$, 
19265 function (a, b, c, d) {
19266 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Float, []);
19267 {
19268 if (arguments.length == 0)
19269 return;
19270 }this.setRect (a, b, c, d);
19271 }, "~N,~N,~N,~N");
19272 Clazz_defineMethod (c$, "getX", 
19273 function () {
19274 return this.x;
19275 });
19276 Clazz_defineMethod (c$, "getY", 
19277 function () {
19278 return this.y;
19279 });
19280 Clazz_defineMethod (c$, "getWidth", 
19281 function () {
19282 return this.width;
19283 });
19284 Clazz_defineMethod (c$, "getHeight", 
19285 function () {
19286 return this.height;
19287 });
19288 Clazz_overrideMethod (c$, "isEmpty", 
19289 function () {
19290 return (this.width <= 0.0) || (this.height <= 0.0);
19291 });
19292 Clazz_defineMethod (c$, "setRect", 
19293 function (a, b, c, d) {
19294 this.x = a;
19295 this.y = b;
19296 this.width = c;
19297 this.height = d;
19298 }, "~N,~N,~N,~N");
19299 Clazz_defineMethod (c$, "setRect", 
19300 function (a, b, c, d) {
19301 this.x = a;
19302 this.y = b;
19303 this.width = c;
19304 this.height = d;
19305 }, "~N,~N,~N,~N");
19306 Clazz_defineMethod (c$, "setRect", 
19307 function (a) {
19308 this.x = a.getX ();
19309 this.y = a.getY ();
19310 this.width = a.getWidth ();
19311 this.height = a.getHeight ();
19312 }, "java.awt.geom.Rectangle2D");
19313 Clazz_defineMethod (c$, "outcode", 
19314 function (a, b) {
19315 var c = 0;
19316 if (this.width <= 0) {
19317 c |= 5;
19318 } else if (a < this.x) {
19319 c |= 1;
19320 } else if (a > this.x + this.width) {
19321 c |= 4;
19322 }if (this.height <= 0) {
19323 c |= 10;
19324 } else if (b < this.y) {
19325 c |= 2;
19326 } else if (b > this.y + this.height) {
19327 c |= 8;
19328 }return c;
19329 }, "~N,~N");
19330 Clazz_overrideMethod (c$, "getBounds2D", 
19331 function () {
19332 return  new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height);
19333 });
19334 Clazz_overrideMethod (c$, "createIntersection", 
19335 function (a) {
19336 var b;
19337 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19338 b =  new java.awt.geom.Rectangle2D.Float ();
19339 } else {
19340 b =  new java.awt.geom.Rectangle2D.Double ();
19341 }java.awt.geom.Rectangle2D.intersect (this, a, b);
19342 return b;
19343 }, "java.awt.geom.Rectangle2D");
19344 Clazz_overrideMethod (c$, "createUnion", 
19345 function (a) {
19346 var b;
19347 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19348 b =  new java.awt.geom.Rectangle2D.Float ();
19349 } else {
19350 b =  new java.awt.geom.Rectangle2D.Double ();
19351 }java.awt.geom.Rectangle2D.union (this, a, b);
19352 return b;
19353 }, "java.awt.geom.Rectangle2D");
19354 Clazz_overrideMethod (c$, "toString", 
19355 function () {
19356 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19357 });
19358 c$ = Clazz_p0p ();
19359 Clazz_pu$h(self.c$);
19360 c$ = Clazz_decorateAsClass (function () {
19361 this.x = 0;
19362 this.y = 0;
19363 this.width = 0;
19364 this.height = 0;
19365 Clazz_instantialize (this, arguments);
19366 }, java.awt.geom.Rectangle2D, "Double", java.awt.geom.Rectangle2D);
19367 Clazz_makeConstructor (c$, 
19368 function () {
19369 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19370 });
19371 Clazz_makeConstructor (c$, 
19372 function (a, b, c, d) {
19373 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19374 this.setRect (a, b, c, d);
19375 }, "~N,~N,~N,~N");
19376 Clazz_defineMethod (c$, "getX", 
19377 function () {
19378 return this.x;
19379 });
19380 Clazz_defineMethod (c$, "getY", 
19381 function () {
19382 return this.y;
19383 });
19384 Clazz_defineMethod (c$, "getWidth", 
19385 function () {
19386 return this.width;
19387 });
19388 Clazz_defineMethod (c$, "getHeight", 
19389 function () {
19390 return this.height;
19391 });
19392 Clazz_overrideMethod (c$, "isEmpty", 
19393 function () {
19394 return (this.width <= 0.0) || (this.height <= 0.0);
19395 });
19396 Clazz_defineMethod (c$, "setRect", 
19397 function (a, b, c, d) {
19398 this.x = a;
19399 this.y = b;
19400 this.width = c;
19401 this.height = d;
19402 }, "~N,~N,~N,~N");
19403 Clazz_defineMethod (c$, "setRect", 
19404 function (a) {
19405 this.x = a.getX ();
19406 this.y = a.getY ();
19407 this.width = a.getWidth ();
19408 this.height = a.getHeight ();
19409 }, "java.awt.geom.Rectangle2D");
19410 Clazz_defineMethod (c$, "outcode", 
19411 function (a, b) {
19412 var c = 0;
19413 if (this.width <= 0) {
19414 c |= 5;
19415 } else if (a < this.x) {
19416 c |= 1;
19417 } else if (a > this.x + this.width) {
19418 c |= 4;
19419 }if (this.height <= 0) {
19420 c |= 10;
19421 } else if (b < this.y) {
19422 c |= 2;
19423 } else if (b > this.y + this.height) {
19424 c |= 8;
19425 }return c;
19426 }, "~N,~N");
19427 Clazz_overrideMethod (c$, "getBounds2D", 
19428 function () {
19429 return  new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height);
19430 });
19431 Clazz_overrideMethod (c$, "createIntersection", 
19432 function (a) {
19433 var b =  new java.awt.geom.Rectangle2D.Double ();
19434 java.awt.geom.Rectangle2D.intersect (this, a, b);
19435 return b;
19436 }, "java.awt.geom.Rectangle2D");
19437 Clazz_overrideMethod (c$, "createUnion", 
19438 function (a) {
19439 var b =  new java.awt.geom.Rectangle2D.Double ();
19440 java.awt.geom.Rectangle2D.union (this, a, b);
19441 return b;
19442 }, "java.awt.geom.Rectangle2D");
19443 Clazz_overrideMethod (c$, "toString", 
19444 function () {
19445 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19446 });
19447 c$ = Clazz_p0p ();
19448 Clazz_defineStatics (c$,
19449 "OUT_LEFT", 1,
19450 "OUT_TOP", 2,
19451 "OUT_RIGHT", 4,
19452 "OUT_BOTTOM", 8);
19453 });
19454 Clazz_declarePackage ("java.awt.geom");
19455 Clazz_load (["java.awt.Shape"], "java.awt.geom.RectangularShape", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator"], function () {
19456 c$ = Clazz_declareType (java.awt.geom, "RectangularShape", null, [java.awt.Shape, Cloneable]);
19457 Clazz_makeConstructor (c$, 
19458 function () {
19459 });
19460 Clazz_defineMethod (c$, "getMinX", 
19461 function () {
19462 return this.getX ();
19463 });
19464 Clazz_defineMethod (c$, "getMinY", 
19465 function () {
19466 return this.getY ();
19467 });
19468 Clazz_defineMethod (c$, "getMaxX", 
19469 function () {
19470 return this.getX () + this.getWidth ();
19471 });
19472 Clazz_defineMethod (c$, "getMaxY", 
19473 function () {
19474 return this.getY () + this.getHeight ();
19475 });
19476 Clazz_defineMethod (c$, "getCenterX", 
19477 function () {
19478 return this.getX () + this.getWidth () / 2.0;
19479 });
19480 Clazz_defineMethod (c$, "getCenterY", 
19481 function () {
19482 return this.getY () + this.getHeight () / 2.0;
19483 });
19484 Clazz_defineMethod (c$, "getFrame", 
19485 function () {
19486 return  new java.awt.geom.Rectangle2D.Double (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
19487 });
19488 Clazz_defineMethod (c$, "setFrame", 
19489 function (loc, size) {
19490 this.setFrame (loc.getX (), loc.getY (), size.getWidth (), size.getHeight ());
19491 }, "java.awt.geom.Point2D,java.awt.geom.Dimension2D");
19492 Clazz_defineMethod (c$, "setFrame", 
19493 function (r) {
19494 this.setFrame (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19495 }, "java.awt.geom.Rectangle2D");
19496 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19497 function (x1, y1, x2, y2) {
19498 if (x2 < x1) {
19499 var t = x1;
19500 x1 = x2;
19501 x2 = t;
19502 }if (y2 < y1) {
19503 var t = y1;
19504 y1 = y2;
19505 y2 = t;
19506 }this.setFrame (x1, y1, x2 - x1, y2 - y1);
19507 }, "~N,~N,~N,~N");
19508 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19509 function (p1, p2) {
19510 this.setFrameFromDiagonal (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
19511 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19512 Clazz_defineMethod (c$, "setFrameFromCenter", 
19513 function (centerX, centerY, cornerX, cornerY) {
19514 var halfW = Math.abs (cornerX - centerX);
19515 var halfH = Math.abs (cornerY - centerY);
19516 this.setFrame (centerX - halfW, centerY - halfH, halfW * 2.0, halfH * 2.0);
19517 }, "~N,~N,~N,~N");
19518 Clazz_defineMethod (c$, "setFrameFromCenter", 
19519 function (center, corner) {
19520 this.setFrameFromCenter (center.getX (), center.getY (), corner.getX (), corner.getY ());
19521 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19522 Clazz_defineMethod (c$, "contains", 
19523 function (p) {
19524 return this.contains (p.getX (), p.getY ());
19525 }, "java.awt.geom.Point2D");
19526 Clazz_overrideMethod (c$, "intersects", 
19527 function (r) {
19528 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19529 }, "java.awt.geom.Rectangle2D");
19530 Clazz_defineMethod (c$, "contains", 
19531 function (r) {
19532 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19533 }, "java.awt.geom.Rectangle2D");
19534 Clazz_overrideMethod (c$, "getBounds", 
19535 function () {
19536 var width = this.getWidth ();
19537 var height = this.getHeight ();
19538 if (width < 0 || height < 0) {
19539 return  new java.awt.Rectangle ();
19540 }var x = this.getX ();
19541 var y = this.getY ();
19542 var x1 = Math.floor (x);
19543 var y1 = Math.floor (y);
19544 var x2 = Math.ceil (x + width);
19545 var y2 = Math.ceil (y + height);
19546 return  new java.awt.Rectangle (Clazz_doubleToInt (x1), Clazz_doubleToInt (y1), Clazz_doubleToInt (x2 - x1), Clazz_doubleToInt (y2 - y1));
19547 });
19548 Clazz_overrideMethod (c$, "getPathIterator", 
19549 function (at, flatness) {
19550 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
19551 }, "java.awt.geom.AffineTransform,~N");
19552 Clazz_defineMethod (c$, "clone", 
19553 function () {
19554 try {
19555 return Clazz_superCall (this, java.awt.geom.RectangularShape, "clone", []);
19556 } catch (e) {
19557 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
19558 throw  new InternalError ();
19559 } else {
19560 throw e;
19561 }
19562 }
19563 });
19564 });
19565 Clazz_declarePackage ("java.awt.geom");
19566 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.FlatteningPathIterator", ["java.lang.IllegalArgumentException", "java.util.NoSuchElementException", "java.awt.geom.CubicCurve2D", "$.QuadCurve2D"], function () {
19567 c$ = Clazz_decorateAsClass (function () {
19568 this.src = null;
19569 this.squareflat = 0;
19570 this.limit = 0;
19571 this.hold = null;
19572 this.curx = 0;
19573 this.cury = 0;
19574 this.movx = 0;
19575 this.movy = 0;
19576 this.holdType = 0;
19577 this.holdEnd = 0;
19578 this.holdIndex = 0;
19579 this.levels = null;
19580 this.levelIndex = 0;
19581 this.done = false;
19582 Clazz_instantialize (this, arguments);
19583 }, java.awt.geom, "FlatteningPathIterator", null, java.awt.geom.PathIterator);
19584 Clazz_prepareFields (c$, function () {
19585 this.hold =  Clazz_newDoubleArray (14, 0);
19586 });
19587 Clazz_makeConstructor (c$, 
19588 function (src, flatness) {
19589 this.construct (src, flatness, 10);
19590 }, "java.awt.geom.PathIterator,~N");
19591 Clazz_makeConstructor (c$, 
19592 function (src, flatness, limit) {
19593 if (flatness < 0.0) {
19594 throw  new IllegalArgumentException ("flatness must be >= 0");
19595 }if (limit < 0) {
19596 throw  new IllegalArgumentException ("limit must be >= 0");
19597 }this.src = src;
19598 this.squareflat = flatness * flatness;
19599 this.limit = limit;
19600 this.levels =  Clazz_newIntArray (limit + 1, 0);
19601 this.next (false);
19602 }, "java.awt.geom.PathIterator,~N,~N");
19603 Clazz_defineMethod (c$, "getFlatness", 
19604 function () {
19605 return Math.sqrt (this.squareflat);
19606 });
19607 Clazz_defineMethod (c$, "getRecursionLimit", 
19608 function () {
19609 return this.limit;
19610 });
19611 Clazz_defineMethod (c$, "getWindingRule", 
19612 function () {
19613 return this.src.getWindingRule ();
19614 });
19615 Clazz_defineMethod (c$, "isDone", 
19616 function () {
19617 return this.done;
19618 });
19619 Clazz_defineMethod (c$, "ensureHoldCapacity", 
19620 function (want) {
19621 if (this.holdIndex - want < 0) {
19622 var have = this.hold.length - this.holdIndex;
19623 var newsize = this.hold.length + 24;
19624 var newhold =  Clazz_newDoubleArray (newsize, 0);
19625 System.arraycopy (this.hold, this.holdIndex, newhold, this.holdIndex + 24, have);
19626 this.hold = newhold;
19627 this.holdIndex += 24;
19628 this.holdEnd += 24;
19629 }}, "~N");
19630 Clazz_defineMethod (c$, "next", 
19631 function () {
19632 this.next (true);
19633 });
19634 Clazz_defineMethod (c$, "next", 
19635  function (doNext) {
19636 var level;
19637 if (this.holdIndex >= this.holdEnd) {
19638 if (doNext) {
19639 this.src.next ();
19640 }if (this.src.isDone ()) {
19641 this.done = true;
19642 return;
19643 }this.holdType = this.src.currentSegment (this.hold);
19644 this.levelIndex = 0;
19645 this.levels[0] = 0;
19646 }switch (this.holdType) {
19647 case 0:
19648 case 1:
19649 this.curx = this.hold[0];
19650 this.cury = this.hold[1];
19651 if (this.holdType == 0) {
19652 this.movx = this.curx;
19653 this.movy = this.cury;
19654 }this.holdIndex = 0;
19655 this.holdEnd = 0;
19656 break;
19657 case 4:
19658 this.curx = this.movx;
19659 this.cury = this.movy;
19660 this.holdIndex = 0;
19661 this.holdEnd = 0;
19662 break;
19663 case 2:
19664 if (this.holdIndex >= this.holdEnd) {
19665 this.holdIndex = this.hold.length - 6;
19666 this.holdEnd = this.hold.length - 2;
19667 this.hold[this.holdIndex + 0] = this.curx;
19668 this.hold[this.holdIndex + 1] = this.cury;
19669 this.hold[this.holdIndex + 2] = this.hold[0];
19670 this.hold[this.holdIndex + 3] = this.hold[1];
19671 this.hold[this.holdIndex + 4] = this.curx = this.hold[2];
19672 this.hold[this.holdIndex + 5] = this.cury = this.hold[3];
19673 }level = this.levels[this.levelIndex];
19674 while (level < this.limit) {
19675 if (java.awt.geom.QuadCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19676 break;
19677 }this.ensureHoldCapacity (4);
19678 java.awt.geom.QuadCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 4, this.hold, this.holdIndex);
19679 this.holdIndex -= 4;
19680 level++;
19681 this.levels[this.levelIndex] = level;
19682 this.levelIndex++;
19683 this.levels[this.levelIndex] = level;
19684 }
19685 this.holdIndex += 4;
19686 this.levelIndex--;
19687 break;
19688 case 3:
19689 if (this.holdIndex >= this.holdEnd) {
19690 this.holdIndex = this.hold.length - 8;
19691 this.holdEnd = this.hold.length - 2;
19692 this.hold[this.holdIndex + 0] = this.curx;
19693 this.hold[this.holdIndex + 1] = this.cury;
19694 this.hold[this.holdIndex + 2] = this.hold[0];
19695 this.hold[this.holdIndex + 3] = this.hold[1];
19696 this.hold[this.holdIndex + 4] = this.hold[2];
19697 this.hold[this.holdIndex + 5] = this.hold[3];
19698 this.hold[this.holdIndex + 6] = this.curx = this.hold[4];
19699 this.hold[this.holdIndex + 7] = this.cury = this.hold[5];
19700 }level = this.levels[this.levelIndex];
19701 while (level < this.limit) {
19702 if (java.awt.geom.CubicCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19703 break;
19704 }this.ensureHoldCapacity (6);
19705 java.awt.geom.CubicCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 6, this.hold, this.holdIndex);
19706 this.holdIndex -= 6;
19707 level++;
19708 this.levels[this.levelIndex] = level;
19709 this.levelIndex++;
19710 this.levels[this.levelIndex] = level;
19711 }
19712 this.holdIndex += 6;
19713 this.levelIndex--;
19714 break;
19715 }
19716 }, "~B");
19717 Clazz_defineMethod (c$, "currentSegment", 
19718 function (coords) {
19719 if (this.isDone ()) {
19720 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19721 }var type = this.holdType;
19722 if (type != 4) {
19723 coords[0] = this.hold[this.holdIndex + 0];
19724 coords[1] = this.hold[this.holdIndex + 1];
19725 if (type != 0) {
19726 type = 1;
19727 }}return type;
19728 }, "~A");
19729 Clazz_defineMethod (c$, "currentSegment", 
19730 function (coords) {
19731 if (this.isDone ()) {
19732 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19733 }var type = this.holdType;
19734 if (type != 4) {
19735 coords[0] = this.hold[this.holdIndex + 0];
19736 coords[1] = this.hold[this.holdIndex + 1];
19737 if (type != 0) {
19738 type = 1;
19739 }}return type;
19740 }, "~A");
19741 Clazz_defineStatics (c$,
19742 "GROW_SIZE", 24);
19743 });
19744 Clazz_declarePackage ("java.awt.geom");
19745 c$ = Clazz_declareInterface (java.awt.geom, "PathIterator");
19746 Clazz_defineStatics (c$,
19747 "WIND_EVEN_ODD", 0,
19748 "WIND_NON_ZERO", 1,
19749 "SEG_MOVETO", 0,
19750 "SEG_LINETO", 1,
19751 "SEG_QUADTO", 2,
19752 "SEG_CUBICTO", 3,
19753 "SEG_CLOSE", 4);
19754 Clazz_declarePackage ("java.awt.geom");
19755 Clazz_load (["java.awt.Shape"], "java.awt.geom.CubicCurve2D", ["java.lang.InternalError", "java.util.Arrays", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadCurve2D", "$.Rectangle2D", "jssun.awt.geom.Curve", "swingjs.api.Interface"], function () {
19756 c$ = Clazz_declareType (java.awt.geom, "CubicCurve2D", null, [java.awt.Shape, Cloneable]);
19757 Clazz_makeConstructor (c$, 
19758 function () {
19759 });
19760 Clazz_defineMethod (c$, "setCurve", 
19761 function (coords, offset) {
19762 this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]);
19763 }, "~A,~N");
19764 Clazz_defineMethod (c$, "setCurve", 
19765 function (p1, cp1, cp2, p2) {
19766 this.setCurve (p1.getX (), p1.getY (), cp1.getX (), cp1.getY (), cp2.getX (), cp2.getY (), p2.getX (), p2.getY ());
19767 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
19768 Clazz_defineMethod (c$, "setCurve", 
19769 function (pts, offset) {
19770 this.setCurve (pts[offset + 0].getX (), pts[offset + 0].getY (), pts[offset + 1].getX (), pts[offset + 1].getY (), pts[offset + 2].getX (), pts[offset + 2].getY (), pts[offset + 3].getX (), pts[offset + 3].getY ());
19771 }, "~A,~N");
19772 Clazz_defineMethod (c$, "setCurve", 
19773 function (c) {
19774 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX1 (), c.getCtrlY1 (), c.getCtrlX2 (), c.getCtrlY2 (), c.getX2 (), c.getY2 ());
19775 }, "java.awt.geom.CubicCurve2D");
19776 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19777 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19778 return Math.max (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx1, ctrly1), java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx2, ctrly2));
19779 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19780 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19781 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19782 return Math.sqrt (java.awt.geom.CubicCurve2D.getFlatnessSq (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2));
19783 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19784 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19785 function (coords, offset) {
19786 return java.awt.geom.CubicCurve2D.getFlatnessSq (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]);
19787 }, "~A,~N");
19788 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19789 function (coords, offset) {
19790 return java.awt.geom.CubicCurve2D.getFlatness (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]);
19791 }, "~A,~N");
19792 Clazz_defineMethod (c$, "getFlatnessSq", 
19793 function () {
19794 return java.awt.geom.CubicCurve2D.getFlatnessSq (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19795 });
19796 Clazz_defineMethod (c$, "getFlatness", 
19797 function () {
19798 return java.awt.geom.CubicCurve2D.getFlatness (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19799 });
19800 Clazz_defineMethod (c$, "subdivide", 
19801 function (left, right) {
19802 java.awt.geom.CubicCurve2D.subdivide (this, left, right);
19803 }, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19804 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19805 function (src, left, right) {
19806 var x1 = src.getX1 ();
19807 var y1 = src.getY1 ();
19808 var ctrlx1 = src.getCtrlX1 ();
19809 var ctrly1 = src.getCtrlY1 ();
19810 var ctrlx2 = src.getCtrlX2 ();
19811 var ctrly2 = src.getCtrlY2 ();
19812 var x2 = src.getX2 ();
19813 var y2 = src.getY2 ();
19814 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19815 var centery = (ctrly1 + ctrly2) / 2.0;
19816 ctrlx1 = (x1 + ctrlx1) / 2.0;
19817 ctrly1 = (y1 + ctrly1) / 2.0;
19818 ctrlx2 = (x2 + ctrlx2) / 2.0;
19819 ctrly2 = (y2 + ctrly2) / 2.0;
19820 var ctrlx12 = (ctrlx1 + centerx) / 2.0;
19821 var ctrly12 = (ctrly1 + centery) / 2.0;
19822 var ctrlx21 = (ctrlx2 + centerx) / 2.0;
19823 var ctrly21 = (ctrly2 + centery) / 2.0;
19824 centerx = (ctrlx12 + ctrlx21) / 2.0;
19825 centery = (ctrly12 + ctrly21) / 2.0;
19826 if (left != null) {
19827 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx12, ctrly12, centerx, centery);
19828 }if (right != null) {
19829 right.setCurve (centerx, centery, ctrlx21, ctrly21, ctrlx2, ctrly2, x2, y2);
19830 }}, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19831 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19832 function (src, srcoff, left, leftoff, right, rightoff) {
19833 var x1 = src[srcoff + 0];
19834 var y1 = src[srcoff + 1];
19835 var ctrlx1 = src[srcoff + 2];
19836 var ctrly1 = src[srcoff + 3];
19837 var ctrlx2 = src[srcoff + 4];
19838 var ctrly2 = src[srcoff + 5];
19839 var x2 = src[srcoff + 6];
19840 var y2 = src[srcoff + 7];
19841 if (left != null) {
19842 left[leftoff + 0] = x1;
19843 left[leftoff + 1] = y1;
19844 }if (right != null) {
19845 right[rightoff + 6] = x2;
19846 right[rightoff + 7] = y2;
19847 }x1 = (x1 + ctrlx1) / 2.0;
19848 y1 = (y1 + ctrly1) / 2.0;
19849 x2 = (x2 + ctrlx2) / 2.0;
19850 y2 = (y2 + ctrly2) / 2.0;
19851 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19852 var centery = (ctrly1 + ctrly2) / 2.0;
19853 ctrlx1 = (x1 + centerx) / 2.0;
19854 ctrly1 = (y1 + centery) / 2.0;
19855 ctrlx2 = (x2 + centerx) / 2.0;
19856 ctrly2 = (y2 + centery) / 2.0;
19857 centerx = (ctrlx1 + ctrlx2) / 2.0;
19858 centery = (ctrly1 + ctrly2) / 2.0;
19859 if (left != null) {
19860 left[leftoff + 2] = x1;
19861 left[leftoff + 3] = y1;
19862 left[leftoff + 4] = ctrlx1;
19863 left[leftoff + 5] = ctrly1;
19864 left[leftoff + 6] = centerx;
19865 left[leftoff + 7] = centery;
19866 }if (right != null) {
19867 right[rightoff + 0] = centerx;
19868 right[rightoff + 1] = centery;
19869 right[rightoff + 2] = ctrlx2;
19870 right[rightoff + 3] = ctrly2;
19871 right[rightoff + 4] = x2;
19872 right[rightoff + 5] = y2;
19873 }}, "~A,~N,~A,~N,~A,~N");
19874 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19875 function (eqn) {
19876 return java.awt.geom.CubicCurve2D.solveCubic (eqn, eqn);
19877 }, "~A");
19878 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19879 function (eqn, res) {
19880 var d = eqn[3];
19881 if (d == 0.0) {
19882 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
19883 }var a = eqn[2] / d;
19884 var b = eqn[1] / d;
19885 var c = eqn[0] / d;
19886 var roots = 0;
19887 var Q = (a * a - 3.0 * b) / 9.0;
19888 var R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0;
19889 var R2 = R * R;
19890 var Q3 = Q * Q * Q;
19891 a = a / 3.0;
19892 if (R2 < Q3) {
19893 var theta = Math.acos (R / Math.sqrt (Q3));
19894 Q = -2.0 * Math.sqrt (Q);
19895 if (res === eqn) {
19896 eqn =  Clazz_newDoubleArray (4, 0);
19897 System.arraycopy (res, 0, eqn, 0, 4);
19898 }res[roots++] = Q * Math.cos (theta / 3.0) - a;
19899 res[roots++] = Q * Math.cos ((theta + 6.283185307179586) / 3.0) - a;
19900 res[roots++] = Q * Math.cos ((theta - 6.283185307179586) / 3.0) - a;
19901 java.awt.geom.CubicCurve2D.fixRoots (res, eqn);
19902 } else {
19903 var neg = (R < 0.0);
19904 var S = Math.sqrt (R2 - Q3);
19905 if (neg) {
19906 R = -R;
19907 }var A = Math.pow (R + S, 0.3333333333333333);
19908 if (!neg) {
19909 A = -A;
19910 }var B = (A == 0.0) ? 0.0 : (Q / A);
19911 res[roots++] = (A + B) - a;
19912 }return roots;
19913 }, "~A,~A");
19914 c$.fixRoots = Clazz_defineMethod (c$, "fixRoots", 
19915  function (res, eqn) {
19916 var EPSILON = 1E-5;
19917 for (var i = 0; i < 3; i++) {
19918 var t = res[i];
19919 if (Math.abs (t) < 1.0E-5) {
19920 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 0, eqn);
19921 } else if (Math.abs (t - 1) < 1.0E-5) {
19922 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 1, eqn);
19923 }}
19924 }, "~A,~A");
19925 c$.solveEqn = Clazz_defineMethod (c$, "solveEqn", 
19926  function (eqn, order, t) {
19927 var v = eqn[order];
19928 while (--order >= 0) {
19929 v = v * t + eqn[order];
19930 }
19931 return v;
19932 }, "~A,~N,~N");
19933 c$.findZero = Clazz_defineMethod (c$, "findZero", 
19934  function (t, target, eqn) {
19935 var slopeqn =  Clazz_newDoubleArray (-1, [eqn[1], 2 * eqn[2], 3 * eqn[3]]);
19936 var slope;
19937 var origdelta = 0;
19938 var origt = t;
19939 while (true) {
19940 slope = java.awt.geom.CubicCurve2D.solveEqn (slopeqn, 2, t);
19941 if (slope == 0) {
19942 return t;
19943 }var y = java.awt.geom.CubicCurve2D.solveEqn (eqn, 3, t);
19944 if (y == 0) {
19945 return t;
19946 }var delta = -(y / slope);
19947 if (origdelta == 0) {
19948 origdelta = delta;
19949 }if (t < target) {
19950 if (delta < 0) return t;
19951 } else if (t > target) {
19952 if (delta > 0) return t;
19953 } else {
19954 return (delta > 0 ? (target + 4.9E-324) : (target - 4.9E-324));
19955 }var newt = t + delta;
19956 if (t == newt) {
19957 return t;
19958 }if (delta * origdelta < 0) {
19959 var tag = (origt < t ? java.awt.geom.CubicCurve2D.getTag (target, origt, t) : java.awt.geom.CubicCurve2D.getTag (target, t, origt));
19960 if (tag != 0) {
19961 return (origt + t) / 2;
19962 }t = target;
19963 } else {
19964 t = newt;
19965 }}
19966 }, "~N,~N,~A");
19967 Clazz_defineMethod (c$, "contains", 
19968 function (x, y) {
19969 if (!(x * 0.0 + y * 0.0 == 0.0)) {
19970 return false;
19971 }var x1 = this.getX1 ();
19972 var y1 = this.getY1 ();
19973 var x2 = this.getX2 ();
19974 var y2 = this.getY2 ();
19975 var crossings = (jssun.awt.geom.Curve.pointCrossingsForLine (x, y, x1, y1, x2, y2) + jssun.awt.geom.Curve.pointCrossingsForCubic (x, y, x1, y1, this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), x2, y2, 0));
19976 return ((crossings & 1) == 1);
19977 }, "~N,~N");
19978 Clazz_defineMethod (c$, "contains", 
19979 function (p) {
19980 return this.contains (p.getX (), p.getY ());
19981 }, "java.awt.geom.Point2D");
19982 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
19983  function (eqn, val, c1, cp1, cp2, c2) {
19984 eqn[0] = c1 - val;
19985 eqn[1] = (cp1 - c1) * 3.0;
19986 eqn[2] = (cp2 - cp1 - cp1 + c1) * 3.0;
19987 eqn[3] = c2 + (cp1 - cp2) * 3.0 - c1;
19988 return;
19989 }, "~A,~N,~N,~N,~N,~N");
19990 c$.evalCubic = Clazz_defineMethod (c$, "evalCubic", 
19991  function (vals, num, include0, include1, inflect, c1, cp1, cp2, c2) {
19992 var j = 0;
19993 for (var i = 0; i < num; i++) {
19994 var t = vals[i];
19995 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + (2 * inflect[2] + 3 * inflect[3] * t) * t != 0)) {
19996 var u = 1 - t;
19997 vals[j++] = c1 * u * u * u + 3 * cp1 * t * u * u + 3 * cp2 * t * t * u + c2 * t * t * t;
19998 }}
19999 return j;
20000 }, "~A,~N,~B,~B,~A,~N,~N,~N,~N");
20001 c$.getTag = Clazz_defineMethod (c$, "getTag", 
20002  function (coord, low, high) {
20003 if (coord <= low) {
20004 return (coord < low ? -2 : -1);
20005 }if (coord >= high) {
20006 return (coord > high ? 2 : 1);
20007 }return 0;
20008 }, "~N,~N,~N");
20009 c$.inwards = Clazz_defineMethod (c$, "inwards", 
20010  function (pttag, opt1tag, opt2tag) {
20011 switch (pttag) {
20012 case -2:
20013 case 2:
20014 default:
20015 return false;
20016 case -1:
20017 return (opt1tag >= 0 || opt2tag >= 0);
20018 case 0:
20019 return true;
20020 case 1:
20021 return (opt1tag <= 0 || opt2tag <= 0);
20022 }
20023 }, "~N,~N,~N");
20024 Clazz_defineMethod (c$, "intersects", 
20025 function (x, y, w, h) {
20026 if (w <= 0 || h <= 0) {
20027 return false;
20028 }var x1 = this.getX1 ();
20029 var y1 = this.getY1 ();
20030 var x1tag = java.awt.geom.CubicCurve2D.getTag (x1, x, x + w);
20031 var y1tag = java.awt.geom.CubicCurve2D.getTag (y1, y, y + h);
20032 if (x1tag == 0 && y1tag == 0) {
20033 return true;
20034 }var x2 = this.getX2 ();
20035 var y2 = this.getY2 ();
20036 var x2tag = java.awt.geom.CubicCurve2D.getTag (x2, x, x + w);
20037 var y2tag = java.awt.geom.CubicCurve2D.getTag (y2, y, y + h);
20038 if (x2tag == 0 && y2tag == 0) {
20039 return true;
20040 }var ctrlx1 = this.getCtrlX1 ();
20041 var ctrly1 = this.getCtrlY1 ();
20042 var ctrlx2 = this.getCtrlX2 ();
20043 var ctrly2 = this.getCtrlY2 ();
20044 var ctrlx1tag = java.awt.geom.CubicCurve2D.getTag (ctrlx1, x, x + w);
20045 var ctrly1tag = java.awt.geom.CubicCurve2D.getTag (ctrly1, y, y + h);
20046 var ctrlx2tag = java.awt.geom.CubicCurve2D.getTag (ctrlx2, x, x + w);
20047 var ctrly2tag = java.awt.geom.CubicCurve2D.getTag (ctrly2, y, y + h);
20048 if (x1tag < 0 && x2tag < 0 && ctrlx1tag < 0 && ctrlx2tag < 0) {
20049 return false;
20050 }if (y1tag < 0 && y2tag < 0 && ctrly1tag < 0 && ctrly2tag < 0) {
20051 return false;
20052 }if (x1tag > 0 && x2tag > 0 && ctrlx1tag > 0 && ctrlx2tag > 0) {
20053 return false;
20054 }if (y1tag > 0 && y2tag > 0 && ctrly1tag > 0 && ctrly2tag > 0) {
20055 return false;
20056 }if (java.awt.geom.CubicCurve2D.inwards (x1tag, x2tag, ctrlx1tag) && java.awt.geom.CubicCurve2D.inwards (y1tag, y2tag, ctrly1tag)) {
20057 return true;
20058 }if (java.awt.geom.CubicCurve2D.inwards (x2tag, x1tag, ctrlx2tag) && java.awt.geom.CubicCurve2D.inwards (y2tag, y1tag, ctrly2tag)) {
20059 return true;
20060 }var xoverlap = (x1tag * x2tag <= 0);
20061 var yoverlap = (y1tag * y2tag <= 0);
20062 if (x1tag == 0 && x2tag == 0 && yoverlap) {
20063 return true;
20064 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
20065 return true;
20066 }var eqn =  Clazz_newDoubleArray (4, 0);
20067 var res =  Clazz_newDoubleArray (4, 0);
20068 if (!yoverlap) {
20069 java.awt.geom.CubicCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly1, ctrly2, y2);
20070 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20071 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, x1, ctrlx1, ctrlx2, x2);
20072 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], x, x + w) * java.awt.geom.CubicCurve2D.getTag (res[1], x, x + w) <= 0);
20073 }if (!xoverlap) {
20074 java.awt.geom.CubicCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
20075 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20076 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
20077 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], y, y + h) * java.awt.geom.CubicCurve2D.getTag (res[1], y, y + h) <= 0);
20078 }var dx = x2 - x1;
20079 var dy = y2 - y1;
20080 var k = y2 * x1 - x2 * y1;
20081 var c1tag;
20082 var c2tag;
20083 if (y1tag == 0) {
20084 c1tag = x1tag;
20085 } else {
20086 c1tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
20087 }if (y2tag == 0) {
20088 c2tag = x2tag;
20089 } else {
20090 c2tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
20091 }if (c1tag * c2tag <= 0) {
20092 return true;
20093 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
20094 java.awt.geom.CubicCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
20095 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20096 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
20097 var tags =  Clazz_newIntArray (num + 1, 0);
20098 for (var i = 0; i < num; i++) {
20099 tags[i] = java.awt.geom.CubicCurve2D.getTag (res[i], y, y + h);
20100 }
20101 tags[num] = c1tag;
20102 java.util.Arrays.sort (tags);
20103 return ((num >= 1 && tags[0] * tags[1] <= 0) || (num >= 3 && tags[2] * tags[3] <= 0));
20104 }, "~N,~N,~N,~N");
20105 Clazz_defineMethod (c$, "intersects", 
20106 function (r) {
20107 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20108 }, "java.awt.geom.Rectangle2D");
20109 Clazz_defineMethod (c$, "contains", 
20110 function (x, y, w, h) {
20111 if (w <= 0 || h <= 0) {
20112 return false;
20113 }if (!(this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h))) {
20114 return false;
20115 }var rect =  new java.awt.geom.Rectangle2D.Double (x, y, w, h);
20116 return !rect.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20117 }, "~N,~N,~N,~N");
20118 Clazz_defineMethod (c$, "contains", 
20119 function (r) {
20120 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20121 }, "java.awt.geom.Rectangle2D");
20122 Clazz_overrideMethod (c$, "getBounds", 
20123 function () {
20124 return this.getBounds2D ().getBounds ();
20125 });
20126 Clazz_defineMethod (c$, "getPathIterator", 
20127 function (at) {
20128 return (swingjs.api.Interface.getInstance ("java.awt.geom.CubicInterator", false)).set (this, at);
20129 }, "java.awt.geom.AffineTransform");
20130 Clazz_defineMethod (c$, "getPathIterator", 
20131 function (at, flatness) {
20132 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
20133 }, "java.awt.geom.AffineTransform,~N");
20134 Clazz_defineMethod (c$, "clone", 
20135 function () {
20136 try {
20137 return Clazz_superCall (this, java.awt.geom.CubicCurve2D, "clone", []);
20138 } catch (e) {
20139 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20140 throw  new InternalError ();
20141 } else {
20142 throw e;
20143 }
20144 }
20145 });
20146 Clazz_pu$h(self.c$);
20147 c$ = Clazz_decorateAsClass (function () {
20148 this.x1 = 0;
20149 this.y1 = 0;
20150 this.ctrlx1 = 0;
20151 this.ctrly1 = 0;
20152 this.ctrlx2 = 0;
20153 this.ctrly2 = 0;
20154 this.x2 = 0;
20155 this.y2 = 0;
20156 Clazz_instantialize (this, arguments);
20157 }, java.awt.geom.CubicCurve2D, "Float", java.awt.geom.CubicCurve2D);
20158 Clazz_makeConstructor (c$, 
20159 function () {
20160 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20161 });
20162 Clazz_makeConstructor (c$, 
20163 function (a, b, c, d, e, f, g, h) {
20164 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20165 this.setCurve (a, b, c, d, e, f, g, h);
20166 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20167 Clazz_overrideMethod (c$, "getX1", 
20168 function () {
20169 return this.x1;
20170 });
20171 Clazz_overrideMethod (c$, "getY1", 
20172 function () {
20173 return this.y1;
20174 });
20175 Clazz_overrideMethod (c$, "getP1", 
20176 function () {
20177 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20178 });
20179 Clazz_overrideMethod (c$, "getCtrlX1", 
20180 function () {
20181 return this.ctrlx1;
20182 });
20183 Clazz_overrideMethod (c$, "getCtrlY1", 
20184 function () {
20185 return this.ctrly1;
20186 });
20187 Clazz_overrideMethod (c$, "getCtrlP1", 
20188 function () {
20189 return  new java.awt.geom.Point2D.Float (this.ctrlx1, this.ctrly1);
20190 });
20191 Clazz_overrideMethod (c$, "getCtrlX2", 
20192 function () {
20193 return this.ctrlx2;
20194 });
20195 Clazz_overrideMethod (c$, "getCtrlY2", 
20196 function () {
20197 return this.ctrly2;
20198 });
20199 Clazz_overrideMethod (c$, "getCtrlP2", 
20200 function () {
20201 return  new java.awt.geom.Point2D.Float (this.ctrlx2, this.ctrly2);
20202 });
20203 Clazz_overrideMethod (c$, "getX2", 
20204 function () {
20205 return this.x2;
20206 });
20207 Clazz_overrideMethod (c$, "getY2", 
20208 function () {
20209 return this.y2;
20210 });
20211 Clazz_overrideMethod (c$, "getP2", 
20212 function () {
20213 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20214 });
20215 Clazz_defineMethod (c$, "setCurve", 
20216 function (a, b, c, d, e, f, g, h) {
20217 this.x1 = a;
20218 this.y1 = b;
20219 this.ctrlx1 = c;
20220 this.ctrly1 = d;
20221 this.ctrlx2 = e;
20222 this.ctrly2 = f;
20223 this.x2 = g;
20224 this.y2 = h;
20225 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20226 Clazz_defineMethod (c$, "setCurve", 
20227 function (a, b, c, d, e, f, g, h) {
20228 this.x1 = a;
20229 this.y1 = b;
20230 this.ctrlx1 = c;
20231 this.ctrly1 = d;
20232 this.ctrlx2 = e;
20233 this.ctrly2 = f;
20234 this.x2 = g;
20235 this.y2 = h;
20236 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20237 Clazz_overrideMethod (c$, "getBounds2D", 
20238 function () {
20239 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20240 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20241 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20242 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20243 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
20244 });
20245 c$ = Clazz_p0p ();
20246 Clazz_pu$h(self.c$);
20247 c$ = Clazz_decorateAsClass (function () {
20248 this.x1 = 0;
20249 this.y1 = 0;
20250 this.ctrlx1 = 0;
20251 this.ctrly1 = 0;
20252 this.ctrlx2 = 0;
20253 this.ctrly2 = 0;
20254 this.x2 = 0;
20255 this.y2 = 0;
20256 Clazz_instantialize (this, arguments);
20257 }, java.awt.geom.CubicCurve2D, "Double", java.awt.geom.CubicCurve2D);
20258 Clazz_makeConstructor (c$, 
20259 function () {
20260 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20261 });
20262 Clazz_makeConstructor (c$, 
20263 function (a, b, c, d, e, f, g, h) {
20264 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20265 this.setCurve (a, b, c, d, e, f, g, h);
20266 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20267 Clazz_overrideMethod (c$, "getX1", 
20268 function () {
20269 return this.x1;
20270 });
20271 Clazz_overrideMethod (c$, "getY1", 
20272 function () {
20273 return this.y1;
20274 });
20275 Clazz_overrideMethod (c$, "getP1", 
20276 function () {
20277 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20278 });
20279 Clazz_overrideMethod (c$, "getCtrlX1", 
20280 function () {
20281 return this.ctrlx1;
20282 });
20283 Clazz_overrideMethod (c$, "getCtrlY1", 
20284 function () {
20285 return this.ctrly1;
20286 });
20287 Clazz_overrideMethod (c$, "getCtrlP1", 
20288 function () {
20289 return  new java.awt.geom.Point2D.Double (this.ctrlx1, this.ctrly1);
20290 });
20291 Clazz_overrideMethod (c$, "getCtrlX2", 
20292 function () {
20293 return this.ctrlx2;
20294 });
20295 Clazz_overrideMethod (c$, "getCtrlY2", 
20296 function () {
20297 return this.ctrly2;
20298 });
20299 Clazz_overrideMethod (c$, "getCtrlP2", 
20300 function () {
20301 return  new java.awt.geom.Point2D.Double (this.ctrlx2, this.ctrly2);
20302 });
20303 Clazz_overrideMethod (c$, "getX2", 
20304 function () {
20305 return this.x2;
20306 });
20307 Clazz_overrideMethod (c$, "getY2", 
20308 function () {
20309 return this.y2;
20310 });
20311 Clazz_overrideMethod (c$, "getP2", 
20312 function () {
20313 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20314 });
20315 Clazz_defineMethod (c$, "setCurve", 
20316 function (a, b, c, d, e, f, g, h) {
20317 this.x1 = a;
20318 this.y1 = b;
20319 this.ctrlx1 = c;
20320 this.ctrly1 = d;
20321 this.ctrlx2 = e;
20322 this.ctrly2 = f;
20323 this.x2 = g;
20324 this.y2 = h;
20325 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20326 Clazz_overrideMethod (c$, "getBounds2D", 
20327 function () {
20328 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20329 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20330 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20331 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20332 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
20333 });
20334 c$ = Clazz_p0p ();
20335 Clazz_defineStatics (c$,
20336 "BELOW", -2,
20337 "LOWEDGE", -1,
20338 "INSIDE", 0,
20339 "HIGHEDGE", 1,
20340 "ABOVE", 2);
20341 });
20342 Clazz_declarePackage ("java.awt.geom");
20343 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.CubicIterator", ["java.util.NoSuchElementException"], function () {
20344 c$ = Clazz_decorateAsClass (function () {
20345 this.cubic = null;
20346 this.affine = null;
20347 this.index = 0;
20348 Clazz_instantialize (this, arguments);
20349 }, java.awt.geom, "CubicIterator", null, java.awt.geom.PathIterator);
20350 Clazz_makeConstructor (c$, 
20351 function () {
20352 });
20353 Clazz_makeConstructor (c$, 
20354 function (q, at) {
20355 this.set (q, at);
20356 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20357 Clazz_defineMethod (c$, "set", 
20358 function (q, at) {
20359 this.cubic = q;
20360 this.affine = at;
20361 return this;
20362 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20363 Clazz_overrideMethod (c$, "getWindingRule", 
20364 function () {
20365 return 1;
20366 });
20367 Clazz_overrideMethod (c$, "isDone", 
20368 function () {
20369 return (this.index > 1);
20370 });
20371 Clazz_overrideMethod (c$, "next", 
20372 function () {
20373 this.index++;
20374 });
20375 Clazz_defineMethod (c$, "currentSegment", 
20376 function (coords) {
20377 if (this.isDone ()) {
20378 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20379 }var type;
20380 if (this.index == 0) {
20381 coords[0] = this.cubic.getX1 ();
20382 coords[1] = this.cubic.getY1 ();
20383 type = 0;
20384 } else {
20385 coords[0] = this.cubic.getCtrlX1 ();
20386 coords[1] = this.cubic.getCtrlY1 ();
20387 coords[2] = this.cubic.getCtrlX2 ();
20388 coords[3] = this.cubic.getCtrlY2 ();
20389 coords[4] = this.cubic.getX2 ();
20390 coords[5] = this.cubic.getY2 ();
20391 type = 3;
20392 }if (this.affine != null) {
20393 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20394 }return type;
20395 }, "~A");
20396 Clazz_defineMethod (c$, "currentSegment", 
20397 function (coords) {
20398 if (this.isDone ()) {
20399 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20400 }var type;
20401 if (this.index == 0) {
20402 coords[0] = this.cubic.getX1 ();
20403 coords[1] = this.cubic.getY1 ();
20404 type = 0;
20405 } else {
20406 coords[0] = this.cubic.getCtrlX1 ();
20407 coords[1] = this.cubic.getCtrlY1 ();
20408 coords[2] = this.cubic.getCtrlX2 ();
20409 coords[3] = this.cubic.getCtrlY2 ();
20410 coords[4] = this.cubic.getX2 ();
20411 coords[5] = this.cubic.getY2 ();
20412 type = 3;
20413 }if (this.affine != null) {
20414 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20415 }return type;
20416 }, "~A");
20417 });
20418 Clazz_declarePackage ("java.awt.geom");
20419 Clazz_load (["java.awt.Shape"], "java.awt.geom.Line2D", ["java.lang.InternalError", "java.awt.geom.LineIterator", "$.Point2D", "$.Rectangle2D"], function () {
20420 c$ = Clazz_declareType (java.awt.geom, "Line2D", null, [java.awt.Shape, Cloneable]);
20421 Clazz_makeConstructor (c$, 
20422 function () {
20423 });
20424 Clazz_defineMethod (c$, "setLine", 
20425 function (p1, p2) {
20426 this.setLine (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
20427 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20428 Clazz_defineMethod (c$, "setLine", 
20429 function (l) {
20430 this.setLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
20431 }, "java.awt.geom.Line2D");
20432 c$.relativeCCW = Clazz_defineMethod (c$, "relativeCCW", 
20433 function (x1, y1, x2, y2, px, py) {
20434 x2 -= x1;
20435 y2 -= y1;
20436 px -= x1;
20437 py -= y1;
20438 var ccw = px * y2 - py * x2;
20439 if (ccw == 0.0) {
20440 ccw = px * x2 + py * y2;
20441 if (ccw > 0.0) {
20442 px -= x2;
20443 py -= y2;
20444 ccw = px * x2 + py * y2;
20445 if (ccw < 0.0) {
20446 ccw = 0.0;
20447 }}}return (ccw < 0.0) ? -1 : ((ccw > 0.0) ? 1 : 0);
20448 }, "~N,~N,~N,~N,~N,~N");
20449 Clazz_defineMethod (c$, "relativeCCW", 
20450 function (px, py) {
20451 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20452 }, "~N,~N");
20453 Clazz_defineMethod (c$, "relativeCCW", 
20454 function (p) {
20455 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), p.getX (), p.getY ());
20456 }, "java.awt.geom.Point2D");
20457 c$.linesIntersect = Clazz_defineMethod (c$, "linesIntersect", 
20458 function (x1, y1, x2, y2, x3, y3, x4, y4) {
20459 return ((java.awt.geom.Line2D.relativeCCW (x1, y1, x2, y2, x3, y3) * java.awt.geom.Line2D.relativeCCW (x1, y1, x2, y2, x4, y4) <= 0) && (java.awt.geom.Line2D.relativeCCW (x3, y3, x4, y4, x1, y1) * java.awt.geom.Line2D.relativeCCW (x3, y3, x4, y4, x2, y2) <= 0));
20460 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20461 Clazz_defineMethod (c$, "intersectsLine", 
20462 function (x1, y1, x2, y2) {
20463 return java.awt.geom.Line2D.linesIntersect (x1, y1, x2, y2, this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20464 }, "~N,~N,~N,~N");
20465 Clazz_defineMethod (c$, "intersectsLine", 
20466 function (l) {
20467 return java.awt.geom.Line2D.linesIntersect (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 (), this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20468 }, "java.awt.geom.Line2D");
20469 c$.ptSegDistSq = Clazz_defineMethod (c$, "ptSegDistSq", 
20470 function (x1, y1, x2, y2, px, py) {
20471 x2 -= x1;
20472 y2 -= y1;
20473 px -= x1;
20474 py -= y1;
20475 var dotprod = px * x2 + py * y2;
20476 var projlenSq;
20477 if (dotprod <= 0.0) {
20478 projlenSq = 0.0;
20479 } else {
20480 px = x2 - px;
20481 py = y2 - py;
20482 dotprod = px * x2 + py * y2;
20483 if (dotprod <= 0.0) {
20484 projlenSq = 0.0;
20485 } else {
20486 projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20487 }}var lenSq = px * px + py * py - projlenSq;
20488 if (lenSq < 0) {
20489 lenSq = 0;
20490 }return lenSq;
20491 }, "~N,~N,~N,~N,~N,~N");
20492 c$.ptSegDist = Clazz_defineMethod (c$, "ptSegDist", 
20493 function (x1, y1, x2, y2, px, py) {
20494 return Math.sqrt (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, px, py));
20495 }, "~N,~N,~N,~N,~N,~N");
20496 Clazz_defineMethod (c$, "ptSegDistSq", 
20497 function (px, py) {
20498 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20499 }, "~N,~N");
20500 Clazz_defineMethod (c$, "ptSegDistSq", 
20501 function (pt) {
20502 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20503 }, "java.awt.geom.Point2D");
20504 Clazz_defineMethod (c$, "ptSegDist", 
20505 function (px, py) {
20506 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20507 }, "~N,~N");
20508 Clazz_defineMethod (c$, "ptSegDist", 
20509 function (pt) {
20510 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20511 }, "java.awt.geom.Point2D");
20512 c$.ptLineDistSq = Clazz_defineMethod (c$, "ptLineDistSq", 
20513 function (x1, y1, x2, y2, px, py) {
20514 x2 -= x1;
20515 y2 -= y1;
20516 px -= x1;
20517 py -= y1;
20518 var dotprod = px * x2 + py * y2;
20519 var projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20520 var lenSq = px * px + py * py - projlenSq;
20521 if (lenSq < 0) {
20522 lenSq = 0;
20523 }return lenSq;
20524 }, "~N,~N,~N,~N,~N,~N");
20525 c$.ptLineDist = Clazz_defineMethod (c$, "ptLineDist", 
20526 function (x1, y1, x2, y2, px, py) {
20527 return Math.sqrt (java.awt.geom.Line2D.ptLineDistSq (x1, y1, x2, y2, px, py));
20528 }, "~N,~N,~N,~N,~N,~N");
20529 Clazz_defineMethod (c$, "ptLineDistSq", 
20530 function (px, py) {
20531 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20532 }, "~N,~N");
20533 Clazz_defineMethod (c$, "ptLineDistSq", 
20534 function (pt) {
20535 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20536 }, "java.awt.geom.Point2D");
20537 Clazz_defineMethod (c$, "ptLineDist", 
20538 function (px, py) {
20539 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20540 }, "~N,~N");
20541 Clazz_defineMethod (c$, "ptLineDist", 
20542 function (pt) {
20543 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20544 }, "java.awt.geom.Point2D");
20545 Clazz_defineMethod (c$, "contains", 
20546 function (x, y) {
20547 return false;
20548 }, "~N,~N");
20549 Clazz_defineMethod (c$, "contains", 
20550 function (p) {
20551 return false;
20552 }, "java.awt.geom.Point2D");
20553 Clazz_defineMethod (c$, "intersects", 
20554 function (x, y, w, h) {
20555 return this.intersects ( new java.awt.geom.Rectangle2D.Double (x, y, w, h));
20556 }, "~N,~N,~N,~N");
20557 Clazz_defineMethod (c$, "intersects", 
20558 function (r) {
20559 return r.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20560 }, "java.awt.geom.Rectangle2D");
20561 Clazz_defineMethod (c$, "contains", 
20562 function (x, y, w, h) {
20563 return false;
20564 }, "~N,~N,~N,~N");
20565 Clazz_defineMethod (c$, "contains", 
20566 function (r) {
20567 return false;
20568 }, "java.awt.geom.Rectangle2D");
20569 Clazz_overrideMethod (c$, "getBounds", 
20570 function () {
20571 return this.getBounds2D ().getBounds ();
20572 });
20573 Clazz_defineMethod (c$, "getPathIterator", 
20574 function (at) {
20575 return  new java.awt.geom.LineIterator (this, at);
20576 }, "java.awt.geom.AffineTransform");
20577 Clazz_defineMethod (c$, "getPathIterator", 
20578 function (at, flatness) {
20579 return  new java.awt.geom.LineIterator (this, at);
20580 }, "java.awt.geom.AffineTransform,~N");
20581 Clazz_defineMethod (c$, "clone", 
20582 function () {
20583 try {
20584 return Clazz_superCall (this, java.awt.geom.Line2D, "clone", []);
20585 } catch (e) {
20586 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20587 throw  new InternalError ();
20588 } else {
20589 throw e;
20590 }
20591 }
20592 });
20593 Clazz_pu$h(self.c$);
20594 c$ = Clazz_decorateAsClass (function () {
20595 this.x1 = 0;
20596 this.y1 = 0;
20597 this.x2 = 0;
20598 this.y2 = 0;
20599 Clazz_instantialize (this, arguments);
20600 }, java.awt.geom.Line2D, "Float", java.awt.geom.Line2D);
20601 Clazz_makeConstructor (c$, 
20602 function () {
20603 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20604 });
20605 Clazz_makeConstructor (c$, 
20606 function (a, b, c, d) {
20607 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20608 this.setLine (a, b, c, d);
20609 }, "~N,~N,~N,~N");
20610 Clazz_makeConstructor (c$, 
20611 function (a, b) {
20612 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20613 this.setLine (a, b);
20614 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20615 Clazz_overrideMethod (c$, "getX1", 
20616 function () {
20617 return this.x1;
20618 });
20619 Clazz_overrideMethod (c$, "getY1", 
20620 function () {
20621 return this.y1;
20622 });
20623 Clazz_overrideMethod (c$, "getP1", 
20624 function () {
20625 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20626 });
20627 Clazz_overrideMethod (c$, "getX2", 
20628 function () {
20629 return this.x2;
20630 });
20631 Clazz_overrideMethod (c$, "getY2", 
20632 function () {
20633 return this.y2;
20634 });
20635 Clazz_overrideMethod (c$, "getP2", 
20636 function () {
20637 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20638 });
20639 Clazz_defineMethod (c$, "setLine", 
20640 function (a, b, c, d) {
20641 this.x1 = a;
20642 this.y1 = b;
20643 this.x2 = c;
20644 this.y2 = d;
20645 }, "~N,~N,~N,~N");
20646 Clazz_defineMethod (c$, "setLine", 
20647 function (a, b, c, d) {
20648 this.x1 = a;
20649 this.y1 = b;
20650 this.x2 = c;
20651 this.y2 = d;
20652 }, "~N,~N,~N,~N");
20653 Clazz_overrideMethod (c$, "getBounds2D", 
20654 function () {
20655 var a;
20656 var b;
20657 var c;
20658 var d;
20659 if (this.x1 < this.x2) {
20660 a = this.x1;
20661 c = this.x2 - this.x1;
20662 } else {
20663 a = this.x2;
20664 c = this.x1 - this.x2;
20665 }if (this.y1 < this.y2) {
20666 b = this.y1;
20667 d = this.y2 - this.y1;
20668 } else {
20669 b = this.y2;
20670 d = this.y1 - this.y2;
20671 }return  new java.awt.geom.Rectangle2D.Float (a, b, c, d);
20672 });
20673 c$ = Clazz_p0p ();
20674 Clazz_pu$h(self.c$);
20675 c$ = Clazz_decorateAsClass (function () {
20676 this.x1 = 0;
20677 this.y1 = 0;
20678 this.x2 = 0;
20679 this.y2 = 0;
20680 Clazz_instantialize (this, arguments);
20681 }, java.awt.geom.Line2D, "Double", java.awt.geom.Line2D);
20682 Clazz_makeConstructor (c$, 
20683 function () {
20684 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20685 });
20686 Clazz_makeConstructor (c$, 
20687 function (a, b, c, d) {
20688 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20689 this.setLine (a, b, c, d);
20690 }, "~N,~N,~N,~N");
20691 Clazz_makeConstructor (c$, 
20692 function (a, b) {
20693 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20694 this.setLine (a, b);
20695 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20696 Clazz_overrideMethod (c$, "getX1", 
20697 function () {
20698 return this.x1;
20699 });
20700 Clazz_overrideMethod (c$, "getY1", 
20701 function () {
20702 return this.y1;
20703 });
20704 Clazz_overrideMethod (c$, "getP1", 
20705 function () {
20706 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20707 });
20708 Clazz_overrideMethod (c$, "getX2", 
20709 function () {
20710 return this.x2;
20711 });
20712 Clazz_overrideMethod (c$, "getY2", 
20713 function () {
20714 return this.y2;
20715 });
20716 Clazz_overrideMethod (c$, "getP2", 
20717 function () {
20718 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20719 });
20720 Clazz_defineMethod (c$, "setLine", 
20721 function (a, b, c, d) {
20722 this.x1 = a;
20723 this.y1 = b;
20724 this.x2 = c;
20725 this.y2 = d;
20726 }, "~N,~N,~N,~N");
20727 Clazz_overrideMethod (c$, "getBounds2D", 
20728 function () {
20729 var a;
20730 var b;
20731 var c;
20732 var d;
20733 if (this.x1 < this.x2) {
20734 a = this.x1;
20735 c = this.x2 - this.x1;
20736 } else {
20737 a = this.x2;
20738 c = this.x1 - this.x2;
20739 }if (this.y1 < this.y2) {
20740 b = this.y1;
20741 d = this.y2 - this.y1;
20742 } else {
20743 b = this.y2;
20744 d = this.y1 - this.y2;
20745 }return  new java.awt.geom.Rectangle2D.Double (a, b, c, d);
20746 });
20747 c$ = Clazz_p0p ();
20748 });
20749 Clazz_declarePackage ("java.awt.geom");
20750 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.LineIterator", ["java.util.NoSuchElementException"], function () {
20751 c$ = Clazz_decorateAsClass (function () {
20752 this.line = null;
20753 this.affine = null;
20754 this.index = 0;
20755 Clazz_instantialize (this, arguments);
20756 }, java.awt.geom, "LineIterator", null, java.awt.geom.PathIterator);
20757 Clazz_makeConstructor (c$, 
20758 function (l, at) {
20759 this.line = l;
20760 this.affine = at;
20761 }, "java.awt.geom.Line2D,java.awt.geom.AffineTransform");
20762 Clazz_overrideMethod (c$, "getWindingRule", 
20763 function () {
20764 return 1;
20765 });
20766 Clazz_overrideMethod (c$, "isDone", 
20767 function () {
20768 return (this.index > 1);
20769 });
20770 Clazz_overrideMethod (c$, "next", 
20771 function () {
20772 this.index++;
20773 });
20774 Clazz_defineMethod (c$, "currentSegment", 
20775 function (coords) {
20776 if (this.isDone ()) {
20777 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20778 }var type;
20779 if (this.index == 0) {
20780 coords[0] = this.line.getX1 ();
20781 coords[1] = this.line.getY1 ();
20782 type = 0;
20783 } else {
20784 coords[0] = this.line.getX2 ();
20785 coords[1] = this.line.getY2 ();
20786 type = 1;
20787 }if (this.affine != null) {
20788 this.affine.transform (coords, 0, coords, 0, 1);
20789 }return type;
20790 }, "~A");
20791 Clazz_defineMethod (c$, "currentSegment", 
20792 function (coords) {
20793 if (this.isDone ()) {
20794 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20795 }var type;
20796 if (this.index == 0) {
20797 coords[0] = this.line.getX1 ();
20798 coords[1] = this.line.getY1 ();
20799 type = 0;
20800 } else {
20801 coords[0] = this.line.getX2 ();
20802 coords[1] = this.line.getY2 ();
20803 type = 1;
20804 }if (this.affine != null) {
20805 this.affine.transform (coords, 0, coords, 0, 1);
20806 }return type;
20807 }, "~A");
20808 });
20809 Clazz_declarePackage ("java.awt.geom");
20810 Clazz_load (["java.awt.Shape"], "java.awt.geom.QuadCurve2D", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadIterator", "$.Rectangle2D"], function () {
20811 c$ = Clazz_declareType (java.awt.geom, "QuadCurve2D", null, [java.awt.Shape, Cloneable]);
20812 Clazz_makeConstructor (c$, 
20813 function () {
20814 });
20815 Clazz_defineMethod (c$, "setCurve", 
20816 function (coords, offset) {
20817 this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5]);
20818 }, "~A,~N");
20819 Clazz_defineMethod (c$, "setCurve", 
20820 function (p1, cp, p2) {
20821 this.setCurve (p1.getX (), p1.getY (), cp.getX (), cp.getY (), p2.getX (), p2.getY ());
20822 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
20823 Clazz_defineMethod (c$, "setCurve", 
20824 function (pts, offset) {
20825 this.setCurve (pts[offset + 0].getX (), pts[offset + 0].getY (), pts[offset + 1].getX (), pts[offset + 1].getY (), pts[offset + 2].getX (), pts[offset + 2].getY ());
20826 }, "~A,~N");
20827 Clazz_defineMethod (c$, "setCurve", 
20828 function (c) {
20829 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX (), c.getCtrlY (), c.getX2 (), c.getY2 ());
20830 }, "java.awt.geom.QuadCurve2D");
20831 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20832 function (x1, y1, ctrlx, ctrly, x2, y2) {
20833 return java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx, ctrly);
20834 }, "~N,~N,~N,~N,~N,~N");
20835 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20836 function (x1, y1, ctrlx, ctrly, x2, y2) {
20837 return java.awt.geom.Line2D.ptSegDist (x1, y1, x2, y2, ctrlx, ctrly);
20838 }, "~N,~N,~N,~N,~N,~N");
20839 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20840 function (coords, offset) {
20841 return java.awt.geom.Line2D.ptSegDistSq (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20842 }, "~A,~N");
20843 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20844 function (coords, offset) {
20845 return java.awt.geom.Line2D.ptSegDist (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20846 }, "~A,~N");
20847 Clazz_defineMethod (c$, "getFlatnessSq", 
20848 function () {
20849 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20850 });
20851 Clazz_defineMethod (c$, "getFlatness", 
20852 function () {
20853 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20854 });
20855 Clazz_defineMethod (c$, "subdivide", 
20856 function (left, right) {
20857 java.awt.geom.QuadCurve2D.subdivide (this, left, right);
20858 }, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20859 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20860 function (src, left, right) {
20861 var x1 = src.getX1 ();
20862 var y1 = src.getY1 ();
20863 var ctrlx = src.getCtrlX ();
20864 var ctrly = src.getCtrlY ();
20865 var x2 = src.getX2 ();
20866 var y2 = src.getY2 ();
20867 var ctrlx1 = (x1 + ctrlx) / 2.0;
20868 var ctrly1 = (y1 + ctrly) / 2.0;
20869 var ctrlx2 = (x2 + ctrlx) / 2.0;
20870 var ctrly2 = (y2 + ctrly) / 2.0;
20871 ctrlx = (ctrlx1 + ctrlx2) / 2.0;
20872 ctrly = (ctrly1 + ctrly2) / 2.0;
20873 if (left != null) {
20874 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx, ctrly);
20875 }if (right != null) {
20876 right.setCurve (ctrlx, ctrly, ctrlx2, ctrly2, x2, y2);
20877 }}, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20878 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20879 function (src, srcoff, left, leftoff, right, rightoff) {
20880 var x1 = src[srcoff + 0];
20881 var y1 = src[srcoff + 1];
20882 var ctrlx = src[srcoff + 2];
20883 var ctrly = src[srcoff + 3];
20884 var x2 = src[srcoff + 4];
20885 var y2 = src[srcoff + 5];
20886 if (left != null) {
20887 left[leftoff + 0] = x1;
20888 left[leftoff + 1] = y1;
20889 }if (right != null) {
20890 right[rightoff + 4] = x2;
20891 right[rightoff + 5] = y2;
20892 }x1 = (x1 + ctrlx) / 2.0;
20893 y1 = (y1 + ctrly) / 2.0;
20894 x2 = (x2 + ctrlx) / 2.0;
20895 y2 = (y2 + ctrly) / 2.0;
20896 ctrlx = (x1 + x2) / 2.0;
20897 ctrly = (y1 + y2) / 2.0;
20898 if (left != null) {
20899 left[leftoff + 2] = x1;
20900 left[leftoff + 3] = y1;
20901 left[leftoff + 4] = ctrlx;
20902 left[leftoff + 5] = ctrly;
20903 }if (right != null) {
20904 right[rightoff + 0] = ctrlx;
20905 right[rightoff + 1] = ctrly;
20906 right[rightoff + 2] = x2;
20907 right[rightoff + 3] = y2;
20908 }}, "~A,~N,~A,~N,~A,~N");
20909 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20910 function (eqn) {
20911 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, eqn);
20912 }, "~A");
20913 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20914 function (eqn, res) {
20915 var a = eqn[2];
20916 var b = eqn[1];
20917 var c = eqn[0];
20918 var roots = 0;
20919 if (a == 0.0) {
20920 if (b == 0.0) {
20921 return -1;
20922 }res[roots++] = -c / b;
20923 } else {
20924 var d = b * b - 4.0 * a * c;
20925 if (d < 0.0) {
20926 return 0;
20927 }d = Math.sqrt (d);
20928 if (b < 0.0) {
20929 d = -d;
20930 }var q = (b + d) / -2.0;
20931 res[roots++] = q / a;
20932 if (q != 0.0) {
20933 res[roots++] = c / q;
20934 }}return roots;
20935 }, "~A,~A");
20936 Clazz_defineMethod (c$, "contains", 
20937 function (x, y) {
20938 var x1 = this.getX1 ();
20939 var y1 = this.getY1 ();
20940 var xc = this.getCtrlX ();
20941 var yc = this.getCtrlY ();
20942 var x2 = this.getX2 ();
20943 var y2 = this.getY2 ();
20944 var kx = x1 - 2 * xc + x2;
20945 var ky = y1 - 2 * yc + y2;
20946 var dx = x - x1;
20947 var dy = y - y1;
20948 var dxl = x2 - x1;
20949 var dyl = y2 - y1;
20950 var t0 = (dx * ky - dy * kx) / (dxl * ky - dyl * kx);
20951 if (t0 < 0 || t0 > 1 || t0 != t0) {
20952 return false;
20953 }var xb = kx * t0 * t0 + 2 * (xc - x1) * t0 + x1;
20954 var yb = ky * t0 * t0 + 2 * (yc - y1) * t0 + y1;
20955 var xl = dxl * t0 + x1;
20956 var yl = dyl * t0 + y1;
20957 return (x >= xb && x < xl) || (x >= xl && x < xb) || (y >= yb && y < yl) || (y >= yl && y < yb);
20958 }, "~N,~N");
20959 Clazz_defineMethod (c$, "contains", 
20960 function (p) {
20961 return this.contains (p.getX (), p.getY ());
20962 }, "java.awt.geom.Point2D");
20963 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
20964  function (eqn, val, c1, cp, c2) {
20965 eqn[0] = c1 - val;
20966 eqn[1] = cp + cp - c1 - c1;
20967 eqn[2] = c1 - cp - cp + c2;
20968 return;
20969 }, "~A,~N,~N,~N,~N");
20970 c$.evalQuadratic = Clazz_defineMethod (c$, "evalQuadratic", 
20971  function (vals, num, include0, include1, inflect, c1, ctrl, c2) {
20972 var j = 0;
20973 for (var i = 0; i < num; i++) {
20974 var t = vals[i];
20975 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + 2 * inflect[2] * t != 0)) {
20976 var u = 1 - t;
20977 vals[j++] = c1 * u * u + 2 * ctrl * t * u + c2 * t * t;
20978 }}
20979 return j;
20980 }, "~A,~N,~B,~B,~A,~N,~N,~N");
20981 c$.getTag = Clazz_defineMethod (c$, "getTag", 
20982  function (coord, low, high) {
20983 if (coord <= low) {
20984 return (coord < low ? -2 : -1);
20985 }if (coord >= high) {
20986 return (coord > high ? 2 : 1);
20987 }return 0;
20988 }, "~N,~N,~N");
20989 c$.inwards = Clazz_defineMethod (c$, "inwards", 
20990  function (pttag, opt1tag, opt2tag) {
20991 switch (pttag) {
20992 case -2:
20993 case 2:
20994 default:
20995 return false;
20996 case -1:
20997 return (opt1tag >= 0 || opt2tag >= 0);
20998 case 0:
20999 return true;
21000 case 1:
21001 return (opt1tag <= 0 || opt2tag <= 0);
21002 }
21003 }, "~N,~N,~N");
21004 Clazz_defineMethod (c$, "intersects", 
21005 function (x, y, w, h) {
21006 if (w <= 0 || h <= 0) {
21007 return false;
21008 }var x1 = this.getX1 ();
21009 var y1 = this.getY1 ();
21010 var x1tag = java.awt.geom.QuadCurve2D.getTag (x1, x, x + w);
21011 var y1tag = java.awt.geom.QuadCurve2D.getTag (y1, y, y + h);
21012 if (x1tag == 0 && y1tag == 0) {
21013 return true;
21014 }var x2 = this.getX2 ();
21015 var y2 = this.getY2 ();
21016 var x2tag = java.awt.geom.QuadCurve2D.getTag (x2, x, x + w);
21017 var y2tag = java.awt.geom.QuadCurve2D.getTag (y2, y, y + h);
21018 if (x2tag == 0 && y2tag == 0) {
21019 return true;
21020 }var ctrlx = this.getCtrlX ();
21021 var ctrly = this.getCtrlY ();
21022 var ctrlxtag = java.awt.geom.QuadCurve2D.getTag (ctrlx, x, x + w);
21023 var ctrlytag = java.awt.geom.QuadCurve2D.getTag (ctrly, y, y + h);
21024 if (x1tag < 0 && x2tag < 0 && ctrlxtag < 0) {
21025 return false;
21026 }if (y1tag < 0 && y2tag < 0 && ctrlytag < 0) {
21027 return false;
21028 }if (x1tag > 0 && x2tag > 0 && ctrlxtag > 0) {
21029 return false;
21030 }if (y1tag > 0 && y2tag > 0 && ctrlytag > 0) {
21031 return false;
21032 }if (java.awt.geom.QuadCurve2D.inwards (x1tag, x2tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y1tag, y2tag, ctrlytag)) {
21033 return true;
21034 }if (java.awt.geom.QuadCurve2D.inwards (x2tag, x1tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y2tag, y1tag, ctrlytag)) {
21035 return true;
21036 }var xoverlap = (x1tag * x2tag <= 0);
21037 var yoverlap = (y1tag * y2tag <= 0);
21038 if (x1tag == 0 && x2tag == 0 && yoverlap) {
21039 return true;
21040 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
21041 return true;
21042 }var eqn =  Clazz_newDoubleArray (3, 0);
21043 var res =  Clazz_newDoubleArray (3, 0);
21044 if (!yoverlap) {
21045 java.awt.geom.QuadCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly, y2);
21046 return (java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res) == 2 && java.awt.geom.QuadCurve2D.evalQuadratic (res, 2, true, true, null, x1, ctrlx, x2) == 2 && java.awt.geom.QuadCurve2D.getTag (res[0], x, x + w) * java.awt.geom.QuadCurve2D.getTag (res[1], x, x + w) <= 0);
21047 }if (!xoverlap) {
21048 java.awt.geom.QuadCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx, x2);
21049 return (java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res) == 2 && java.awt.geom.QuadCurve2D.evalQuadratic (res, 2, true, true, null, y1, ctrly, y2) == 2 && java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h) * java.awt.geom.QuadCurve2D.getTag (res[1], y, y + h) <= 0);
21050 }var dx = x2 - x1;
21051 var dy = y2 - y1;
21052 var k = y2 * x1 - x2 * y1;
21053 var c1tag;
21054 var c2tag;
21055 if (y1tag == 0) {
21056 c1tag = x1tag;
21057 } else {
21058 c1tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
21059 }if (y2tag == 0) {
21060 c2tag = x2tag;
21061 } else {
21062 c2tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
21063 }if (c1tag * c2tag <= 0) {
21064 return true;
21065 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
21066 java.awt.geom.QuadCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx, x2);
21067 var num = java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
21068 java.awt.geom.QuadCurve2D.evalQuadratic (res, num, true, true, null, y1, ctrly, y2);
21069 c2tag = java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h);
21070 return (c1tag * c2tag <= 0);
21071 }, "~N,~N,~N,~N");
21072 Clazz_defineMethod (c$, "intersects", 
21073 function (r) {
21074 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
21075 }, "java.awt.geom.Rectangle2D");
21076 Clazz_defineMethod (c$, "contains", 
21077 function (x, y, w, h) {
21078 if (w <= 0 || h <= 0) {
21079 return false;
21080 }return (this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h));
21081 }, "~N,~N,~N,~N");
21082 Clazz_defineMethod (c$, "contains", 
21083 function (r) {
21084 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
21085 }, "java.awt.geom.Rectangle2D");
21086 Clazz_overrideMethod (c$, "getBounds", 
21087 function () {
21088 return this.getBounds2D ().getBounds ();
21089 });
21090 Clazz_defineMethod (c$, "getPathIterator", 
21091 function (at) {
21092 return  new java.awt.geom.QuadIterator (this, at);
21093 }, "java.awt.geom.AffineTransform");
21094 Clazz_defineMethod (c$, "getPathIterator", 
21095 function (at, flatness) {
21096 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
21097 }, "java.awt.geom.AffineTransform,~N");
21098 Clazz_defineMethod (c$, "clone", 
21099 function () {
21100 try {
21101 return Clazz_superCall (this, java.awt.geom.QuadCurve2D, "clone", []);
21102 } catch (e) {
21103 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
21104 throw  new InternalError ();
21105 } else {
21106 throw e;
21107 }
21108 }
21109 });
21110 Clazz_pu$h(self.c$);
21111 c$ = Clazz_decorateAsClass (function () {
21112 this.x1 = 0;
21113 this.y1 = 0;
21114 this.ctrlx = 0;
21115 this.ctrly = 0;
21116 this.x2 = 0;
21117 this.y2 = 0;
21118 Clazz_instantialize (this, arguments);
21119 }, java.awt.geom.QuadCurve2D, "Float", java.awt.geom.QuadCurve2D);
21120 Clazz_makeConstructor (c$, 
21121 function () {
21122 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21123 });
21124 Clazz_makeConstructor (c$, 
21125 function (a, b, c, d, e, f) {
21126 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21127 this.setCurve (a, b, c, d, e, f);
21128 }, "~N,~N,~N,~N,~N,~N");
21129 Clazz_overrideMethod (c$, "getX1", 
21130 function () {
21131 return this.x1;
21132 });
21133 Clazz_overrideMethod (c$, "getY1", 
21134 function () {
21135 return this.y1;
21136 });
21137 Clazz_overrideMethod (c$, "getP1", 
21138 function () {
21139 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
21140 });
21141 Clazz_overrideMethod (c$, "getCtrlX", 
21142 function () {
21143 return this.ctrlx;
21144 });
21145 Clazz_overrideMethod (c$, "getCtrlY", 
21146 function () {
21147 return this.ctrly;
21148 });
21149 Clazz_overrideMethod (c$, "getCtrlPt", 
21150 function () {
21151 return  new java.awt.geom.Point2D.Float (this.ctrlx, this.ctrly);
21152 });
21153 Clazz_overrideMethod (c$, "getX2", 
21154 function () {
21155 return this.x2;
21156 });
21157 Clazz_overrideMethod (c$, "getY2", 
21158 function () {
21159 return this.y2;
21160 });
21161 Clazz_overrideMethod (c$, "getP2", 
21162 function () {
21163 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
21164 });
21165 Clazz_defineMethod (c$, "setCurve", 
21166 function (a, b, c, d, e, f) {
21167 this.x1 = a;
21168 this.y1 = b;
21169 this.ctrlx = c;
21170 this.ctrly = d;
21171 this.x2 = e;
21172 this.y2 = f;
21173 }, "~N,~N,~N,~N,~N,~N");
21174 Clazz_defineMethod (c$, "setCurve", 
21175 function (a, b, c, d, e, f) {
21176 this.x1 = a;
21177 this.y1 = b;
21178 this.ctrlx = c;
21179 this.ctrly = d;
21180 this.x2 = e;
21181 this.y2 = f;
21182 }, "~N,~N,~N,~N,~N,~N");
21183 Clazz_overrideMethod (c$, "getBounds2D", 
21184 function () {
21185 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21186 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21187 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21188 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21189 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
21190 });
21191 c$ = Clazz_p0p ();
21192 Clazz_pu$h(self.c$);
21193 c$ = Clazz_decorateAsClass (function () {
21194 this.x1 = 0;
21195 this.y1 = 0;
21196 this.ctrlx = 0;
21197 this.ctrly = 0;
21198 this.x2 = 0;
21199 this.y2 = 0;
21200 Clazz_instantialize (this, arguments);
21201 }, java.awt.geom.QuadCurve2D, "Double", java.awt.geom.QuadCurve2D);
21202 Clazz_makeConstructor (c$, 
21203 function () {
21204 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21205 });
21206 Clazz_makeConstructor (c$, 
21207 function (a, b, c, d, e, f) {
21208 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21209 this.setCurve (a, b, c, d, e, f);
21210 }, "~N,~N,~N,~N,~N,~N");
21211 Clazz_overrideMethod (c$, "getX1", 
21212 function () {
21213 return this.x1;
21214 });
21215 Clazz_overrideMethod (c$, "getY1", 
21216 function () {
21217 return this.y1;
21218 });
21219 Clazz_overrideMethod (c$, "getP1", 
21220 function () {
21221 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
21222 });
21223 Clazz_overrideMethod (c$, "getCtrlX", 
21224 function () {
21225 return this.ctrlx;
21226 });
21227 Clazz_overrideMethod (c$, "getCtrlY", 
21228 function () {
21229 return this.ctrly;
21230 });
21231 Clazz_overrideMethod (c$, "getCtrlPt", 
21232 function () {
21233 return  new java.awt.geom.Point2D.Double (this.ctrlx, this.ctrly);
21234 });
21235 Clazz_overrideMethod (c$, "getX2", 
21236 function () {
21237 return this.x2;
21238 });
21239 Clazz_overrideMethod (c$, "getY2", 
21240 function () {
21241 return this.y2;
21242 });
21243 Clazz_overrideMethod (c$, "getP2", 
21244 function () {
21245 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
21246 });
21247 Clazz_defineMethod (c$, "setCurve", 
21248 function (a, b, c, d, e, f) {
21249 this.x1 = a;
21250 this.y1 = b;
21251 this.ctrlx = c;
21252 this.ctrly = d;
21253 this.x2 = e;
21254 this.y2 = f;
21255 }, "~N,~N,~N,~N,~N,~N");
21256 Clazz_overrideMethod (c$, "getBounds2D", 
21257 function () {
21258 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21259 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21260 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21261 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21262 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
21263 });
21264 c$ = Clazz_p0p ();
21265 Clazz_defineStatics (c$,
21266 "BELOW", -2,
21267 "LOWEDGE", -1,
21268 "INSIDE", 0,
21269 "HIGHEDGE", 1,
21270 "ABOVE", 2);
21271 });
21272 Clazz_declarePackage ("java.awt.geom");
21273 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.QuadIterator", ["java.util.NoSuchElementException"], function () {
21274 c$ = Clazz_decorateAsClass (function () {
21275 this.quad = null;
21276 this.affine = null;
21277 this.index = 0;
21278 Clazz_instantialize (this, arguments);
21279 }, java.awt.geom, "QuadIterator", null, java.awt.geom.PathIterator);
21280 Clazz_makeConstructor (c$, 
21281 function (q, at) {
21282 this.quad = q;
21283 this.affine = at;
21284 }, "java.awt.geom.QuadCurve2D,java.awt.geom.AffineTransform");
21285 Clazz_overrideMethod (c$, "getWindingRule", 
21286 function () {
21287 return 1;
21288 });
21289 Clazz_overrideMethod (c$, "isDone", 
21290 function () {
21291 return (this.index > 1);
21292 });
21293 Clazz_overrideMethod (c$, "next", 
21294 function () {
21295 this.index++;
21296 });
21297 Clazz_defineMethod (c$, "currentSegment", 
21298 function (coords) {
21299 if (this.isDone ()) {
21300 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21301 }var type;
21302 if (this.index == 0) {
21303 coords[0] = this.quad.getX1 ();
21304 coords[1] = this.quad.getY1 ();
21305 type = 0;
21306 } else {
21307 coords[0] = this.quad.getCtrlX ();
21308 coords[1] = this.quad.getCtrlY ();
21309 coords[2] = this.quad.getX2 ();
21310 coords[3] = this.quad.getY2 ();
21311 type = 2;
21312 }if (this.affine != null) {
21313 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21314 }return type;
21315 }, "~A");
21316 Clazz_defineMethod (c$, "currentSegment", 
21317 function (coords) {
21318 if (this.isDone ()) {
21319 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21320 }var type;
21321 if (this.index == 0) {
21322 coords[0] = this.quad.getX1 ();
21323 coords[1] = this.quad.getY1 ();
21324 type = 0;
21325 } else {
21326 coords[0] = this.quad.getCtrlX ();
21327 coords[1] = this.quad.getCtrlY ();
21328 coords[2] = this.quad.getX2 ();
21329 coords[3] = this.quad.getY2 ();
21330 type = 2;
21331 }if (this.affine != null) {
21332 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21333 }return type;
21334 }, "~A");
21335 });
21336 Clazz_declarePackage ("jssun.awt.geom");
21337 Clazz_load (null, "jssun.awt.geom.Curve", ["java.lang.Double", "$.InternalError", "java.awt.geom.IllegalPathStateException"], function () {
21338 c$ = Clazz_decorateAsClass (function () {
21339 this.direction = 0;
21340 Clazz_instantialize (this, arguments);
21341 }, jssun.awt.geom, "Curve");
21342 c$.insertMove = Clazz_defineMethod (c$, "insertMove", 
21343 function (curves, x, y) {
21344 curves.add ( new jssun.awt.geom.Order0 (x, y));
21345 }, "java.util.Vector,~N,~N");
21346 c$.insertLine = Clazz_defineMethod (c$, "insertLine", 
21347 function (curves, x0, y0, x1, y1) {
21348 if (y0 < y1) {
21349 curves.add ( new jssun.awt.geom.Order1 (x0, y0, x1, y1, 1));
21350 } else if (y0 > y1) {
21351 curves.add ( new jssun.awt.geom.Order1 (x1, y1, x0, y0, -1));
21352 } else {
21353 }}, "java.util.Vector,~N,~N,~N,~N");
21354 c$.insertQuad = Clazz_defineMethod (c$, "insertQuad", 
21355 function (curves, x0, y0, coords) {
21356 var y1 = coords[3];
21357 if (y0 > y1) {
21358 jssun.awt.geom.Order2.insert (curves, coords, coords[2], y1, coords[0], coords[1], x0, y0, -1);
21359 } else if (y0 == y1 && y0 == coords[1]) {
21360 return;
21361 } else {
21362 jssun.awt.geom.Order2.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], y1, 1);
21363 }}, "java.util.Vector,~N,~N,~A");
21364 c$.insertCubic = Clazz_defineMethod (c$, "insertCubic", 
21365 function (curves, x0, y0, coords) {
21366 var y1 = coords[5];
21367 if (y0 > y1) {
21368 jssun.awt.geom.Order3.insert (curves, coords, coords[4], y1, coords[2], coords[3], coords[0], coords[1], x0, y0, -1);
21369 } else if (y0 == y1 && y0 == coords[1] && y0 == coords[3]) {
21370 return;
21371 } else {
21372 jssun.awt.geom.Order3.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], coords[3], coords[4], y1, 1);
21373 }}, "java.util.Vector,~N,~N,~A");
21374 c$.pointCrossingsForPath = Clazz_defineMethod (c$, "pointCrossingsForPath", 
21375 function (pi, px, py) {
21376 if (pi.isDone ()) {
21377 return 0;
21378 }var coords =  Clazz_newDoubleArray (6, 0);
21379 if (pi.currentSegment (coords) != 0) {
21380 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21381 }pi.next ();
21382 var movx = coords[0];
21383 var movy = coords[1];
21384 var curx = movx;
21385 var cury = movy;
21386 var endx;
21387 var endy;
21388 var crossings = 0;
21389 while (!pi.isDone ()) {
21390 switch (pi.currentSegment (coords)) {
21391 case 0:
21392 if (cury != movy) {
21393 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21394 }movx = curx = coords[0];
21395 movy = cury = coords[1];
21396 break;
21397 case 1:
21398 endx = coords[0];
21399 endy = coords[1];
21400 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, endx, endy);
21401 curx = endx;
21402 cury = endy;
21403 break;
21404 case 2:
21405 endx = coords[2];
21406 endy = coords[3];
21407 crossings += jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, curx, cury, coords[0], coords[1], endx, endy, 0);
21408 curx = endx;
21409 cury = endy;
21410 break;
21411 case 3:
21412 endx = coords[4];
21413 endy = coords[5];
21414 crossings += jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21415 curx = endx;
21416 cury = endy;
21417 break;
21418 case 4:
21419 if (cury != movy) {
21420 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21421 }curx = movx;
21422 cury = movy;
21423 break;
21424 }
21425 pi.next ();
21426 }
21427 if (cury != movy) {
21428 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21429 }return crossings;
21430 }, "java.awt.geom.PathIterator,~N,~N");
21431 c$.pointCrossingsForLine = Clazz_defineMethod (c$, "pointCrossingsForLine", 
21432 function (px, py, x0, y0, x1, y1) {
21433 if (py < y0 && py < y1) return 0;
21434 if (py >= y0 && py >= y1) return 0;
21435 if (px >= x0 && px >= x1) return 0;
21436 if (px < x0 && px < x1) return (y0 < y1) ? 1 : -1;
21437 var xintercept = x0 + (py - y0) * (x1 - x0) / (y1 - y0);
21438 if (px >= xintercept) return 0;
21439 return (y0 < y1) ? 1 : -1;
21440 }, "~N,~N,~N,~N,~N,~N");
21441 c$.pointCrossingsForQuad = Clazz_defineMethod (c$, "pointCrossingsForQuad", 
21442 function (px, py, x0, y0, xc, yc, x1, y1, level) {
21443 if (py < y0 && py < yc && py < y1) return 0;
21444 if (py >= y0 && py >= yc && py >= y1) return 0;
21445 if (px >= x0 && px >= xc && px >= x1) return 0;
21446 if (px < x0 && px < xc && px < x1) {
21447 if (py >= y0) {
21448 if (py < y1) return 1;
21449 } else {
21450 if (py >= y1) return -1;
21451 }return 0;
21452 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21453 var x0c = (x0 + xc) / 2;
21454 var y0c = (y0 + yc) / 2;
21455 var xc1 = (xc + x1) / 2;
21456 var yc1 = (yc + y1) / 2;
21457 xc = (x0c + xc1) / 2;
21458 yc = (y0c + yc1) / 2;
21459 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21460 return 0;
21461 }return (jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, x0, y0, x0c, y0c, xc, yc, level + 1) + jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, xc, yc, xc1, yc1, x1, y1, level + 1));
21462 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21463 c$.pointCrossingsForCubic = Clazz_defineMethod (c$, "pointCrossingsForCubic", 
21464 function (px, py, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21465 if (py < y0 && py < yc0 && py < yc1 && py < y1) return 0;
21466 if (py >= y0 && py >= yc0 && py >= yc1 && py >= y1) return 0;
21467 if (px >= x0 && px >= xc0 && px >= xc1 && px >= x1) return 0;
21468 if (px < x0 && px < xc0 && px < xc1 && px < x1) {
21469 if (py >= y0) {
21470 if (py < y1) return 1;
21471 } else {
21472 if (py >= y1) return -1;
21473 }return 0;
21474 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21475 var xmid = (xc0 + xc1) / 2;
21476 var ymid = (yc0 + yc1) / 2;
21477 xc0 = (x0 + xc0) / 2;
21478 yc0 = (y0 + yc0) / 2;
21479 xc1 = (xc1 + x1) / 2;
21480 yc1 = (yc1 + y1) / 2;
21481 var xc0m = (xc0 + xmid) / 2;
21482 var yc0m = (yc0 + ymid) / 2;
21483 var xmc1 = (xmid + xc1) / 2;
21484 var ymc1 = (ymid + yc1) / 2;
21485 xmid = (xc0m + xmc1) / 2;
21486 ymid = (yc0m + ymc1) / 2;
21487 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21488 return 0;
21489 }return (jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1) + jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1));
21490 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21491 c$.rectCrossingsForPath = Clazz_defineMethod (c$, "rectCrossingsForPath", 
21492 function (pi, rxmin, rymin, rxmax, rymax) {
21493 if (rxmax <= rxmin || rymax <= rymin) {
21494 return 0;
21495 }if (pi.isDone ()) {
21496 return 0;
21497 }var coords =  Clazz_newDoubleArray (6, 0);
21498 if (pi.currentSegment (coords) != 0) {
21499 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21500 }pi.next ();
21501 var curx;
21502 var cury;
21503 var movx;
21504 var movy;
21505 var endx;
21506 var endy;
21507 curx = movx = coords[0];
21508 cury = movy = coords[1];
21509 var crossings = 0;
21510 while (crossings != -2147483648 && !pi.isDone ()) {
21511 switch (pi.currentSegment (coords)) {
21512 case 0:
21513 if (curx != movx || cury != movy) {
21514 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21515 }movx = curx = coords[0];
21516 movy = cury = coords[1];
21517 break;
21518 case 1:
21519 endx = coords[0];
21520 endy = coords[1];
21521 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, endx, endy);
21522 curx = endx;
21523 cury = endy;
21524 break;
21525 case 2:
21526 endx = coords[2];
21527 endy = coords[3];
21528 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], endx, endy, 0);
21529 curx = endx;
21530 cury = endy;
21531 break;
21532 case 3:
21533 endx = coords[4];
21534 endy = coords[5];
21535 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21536 curx = endx;
21537 cury = endy;
21538 break;
21539 case 4:
21540 if (curx != movx || cury != movy) {
21541 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21542 }curx = movx;
21543 cury = movy;
21544 break;
21545 }
21546 pi.next ();
21547 }
21548 if (crossings != -2147483648 && (curx != movx || cury != movy)) {
21549 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21550 }return crossings;
21551 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
21552 c$.rectCrossingsForLine = Clazz_defineMethod (c$, "rectCrossingsForLine", 
21553 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1) {
21554 if (y0 >= rymax && y1 >= rymax) return crossings;
21555 if (y0 <= rymin && y1 <= rymin) return crossings;
21556 if (x0 <= rxmin && x1 <= rxmin) return crossings;
21557 if (x0 >= rxmax && x1 >= rxmax) {
21558 if (y0 < y1) {
21559 if (y0 <= rymin) crossings++;
21560 if (y1 >= rymax) crossings++;
21561 } else if (y1 < y0) {
21562 if (y1 <= rymin) crossings--;
21563 if (y0 >= rymax) crossings--;
21564 }return crossings;
21565 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21566 return -2147483648;
21567 }var xi0 = x0;
21568 if (y0 < rymin) {
21569 xi0 += ((rymin - y0) * (x1 - x0) / (y1 - y0));
21570 } else if (y0 > rymax) {
21571 xi0 += ((rymax - y0) * (x1 - x0) / (y1 - y0));
21572 }var xi1 = x1;
21573 if (y1 < rymin) {
21574 xi1 += ((rymin - y1) * (x0 - x1) / (y0 - y1));
21575 } else if (y1 > rymax) {
21576 xi1 += ((rymax - y1) * (x0 - x1) / (y0 - y1));
21577 }if (xi0 <= rxmin && xi1 <= rxmin) return crossings;
21578 if (xi0 >= rxmax && xi1 >= rxmax) {
21579 if (y0 < y1) {
21580 if (y0 <= rymin) crossings++;
21581 if (y1 >= rymax) crossings++;
21582 } else if (y1 < y0) {
21583 if (y1 <= rymin) crossings--;
21584 if (y0 >= rymax) crossings--;
21585 }return crossings;
21586 }return -2147483648;
21587 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21588 c$.rectCrossingsForQuad = Clazz_defineMethod (c$, "rectCrossingsForQuad", 
21589 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc, yc, x1, y1, level) {
21590 if (y0 >= rymax && yc >= rymax && y1 >= rymax) return crossings;
21591 if (y0 <= rymin && yc <= rymin && y1 <= rymin) return crossings;
21592 if (x0 <= rxmin && xc <= rxmin && x1 <= rxmin) return crossings;
21593 if (x0 >= rxmax && xc >= rxmax && x1 >= rxmax) {
21594 if (y0 < y1) {
21595 if (y0 <= rymin && y1 > rymin) crossings++;
21596 if (y0 < rymax && y1 >= rymax) crossings++;
21597 } else if (y1 < y0) {
21598 if (y1 <= rymin && y0 > rymin) crossings--;
21599 if (y1 < rymax && y0 >= rymax) crossings--;
21600 }return crossings;
21601 }if ((x0 < rxmax && x0 > rxmin && y0 < rymax && y0 > rymin) || (x1 < rxmax && x1 > rxmin && y1 < rymax && y1 > rymin)) {
21602 return -2147483648;
21603 }if (level > 52) {
21604 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21605 }var x0c = (x0 + xc) / 2;
21606 var y0c = (y0 + yc) / 2;
21607 var xc1 = (xc + x1) / 2;
21608 var yc1 = (yc + y1) / 2;
21609 xc = (x0c + xc1) / 2;
21610 yc = (y0c + yc1) / 2;
21611 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21612 return 0;
21613 }crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x0c, y0c, xc, yc, level + 1);
21614 if (crossings != -2147483648) {
21615 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, xc, yc, xc1, yc1, x1, y1, level + 1);
21616 }return crossings;
21617 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21618 c$.rectCrossingsForCubic = Clazz_defineMethod (c$, "rectCrossingsForCubic", 
21619 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21620 if (y0 >= rymax && yc0 >= rymax && yc1 >= rymax && y1 >= rymax) {
21621 return crossings;
21622 }if (y0 <= rymin && yc0 <= rymin && yc1 <= rymin && y1 <= rymin) {
21623 return crossings;
21624 }if (x0 <= rxmin && xc0 <= rxmin && xc1 <= rxmin && x1 <= rxmin) {
21625 return crossings;
21626 }if (x0 >= rxmax && xc0 >= rxmax && xc1 >= rxmax && x1 >= rxmax) {
21627 if (y0 < y1) {
21628 if (y0 <= rymin && y1 > rymin) crossings++;
21629 if (y0 < rymax && y1 >= rymax) crossings++;
21630 } else if (y1 < y0) {
21631 if (y1 <= rymin && y0 > rymin) crossings--;
21632 if (y1 < rymax && y0 >= rymax) crossings--;
21633 }return crossings;
21634 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21635 return -2147483648;
21636 }if (level > 52) {
21637 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21638 }var xmid = (xc0 + xc1) / 2;
21639 var ymid = (yc0 + yc1) / 2;
21640 xc0 = (x0 + xc0) / 2;
21641 yc0 = (y0 + yc0) / 2;
21642 xc1 = (xc1 + x1) / 2;
21643 yc1 = (yc1 + y1) / 2;
21644 var xc0m = (xc0 + xmid) / 2;
21645 var yc0m = (yc0 + ymid) / 2;
21646 var xmc1 = (xmid + xc1) / 2;
21647 var ymc1 = (ymid + yc1) / 2;
21648 xmid = (xc0m + xmc1) / 2;
21649 ymid = (yc0m + ymc1) / 2;
21650 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21651 return 0;
21652 }crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1);
21653 if (crossings != -2147483648) {
21654 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1);
21655 }return crossings;
21656 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21657 Clazz_makeConstructor (c$, 
21658 function (direction) {
21659 this.direction = direction;
21660 }, "~N");
21661 Clazz_defineMethod (c$, "getDirection", 
21662 function () {
21663 return this.direction;
21664 });
21665 Clazz_defineMethod (c$, "getWithDirection", 
21666 function (direction) {
21667 return (this.direction == direction ? this : this.getReversedCurve ());
21668 }, "~N");
21669 c$.round = Clazz_defineMethod (c$, "round", 
21670 function (v) {
21671 return v;
21672 }, "~N");
21673 c$.orderof = Clazz_defineMethod (c$, "orderof", 
21674 function (x1, x2) {
21675 if (x1 < x2) {
21676 return -1;
21677 }if (x1 > x2) {
21678 return 1;
21679 }return 0;
21680 }, "~N,~N");
21681 c$.signeddiffbits = Clazz_defineMethod (c$, "signeddiffbits", 
21682 function (y1, y2) {
21683 return (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21684 }, "~N,~N");
21685 c$.diffbits = Clazz_defineMethod (c$, "diffbits", 
21686 function (y1, y2) {
21687 return Math.abs (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21688 }, "~N,~N");
21689 c$.prev = Clazz_defineMethod (c$, "prev", 
21690 function (v) {
21691 return Double.longBitsToDouble (Double.doubleToLongBits (v) - 1);
21692 }, "~N");
21693 c$.next = Clazz_defineMethod (c$, "next", 
21694 function (v) {
21695 return Double.longBitsToDouble (Double.doubleToLongBits (v) + 1);
21696 }, "~N");
21697 Clazz_overrideMethod (c$, "toString", 
21698 function () {
21699 return ("Curve[" + this.getOrder () + ", " + ("(" + jssun.awt.geom.Curve.round (this.getX0 ()) + ", " + jssun.awt.geom.Curve.round (this.getY0 ()) + "), ") + this.controlPointString () + ("(" + jssun.awt.geom.Curve.round (this.getX1 ()) + ", " + jssun.awt.geom.Curve.round (this.getY1 ()) + "), ") + (this.direction == 1 ? "D" : "U") + "]");
21700 });
21701 Clazz_defineMethod (c$, "controlPointString", 
21702 function () {
21703 return "";
21704 });
21705 Clazz_defineMethod (c$, "crossingsFor", 
21706 function (x, y) {
21707 if (y >= this.getYTop () && y < this.getYBot ()) {
21708 if (x < this.getXMax () && (x < this.getXMin () || x < this.XforY (y))) {
21709 return 1;
21710 }}return 0;
21711 }, "~N,~N");
21712 Clazz_defineMethod (c$, "accumulateCrossings", 
21713 function (c) {
21714 var xhi = c.getXHi ();
21715 if (this.getXMin () >= xhi) {
21716 return false;
21717 }var xlo = c.getXLo ();
21718 var ylo = c.getYLo ();
21719 var yhi = c.getYHi ();
21720 var y0 = this.getYTop ();
21721 var y1 = this.getYBot ();
21722 var tstart;
21723 var ystart;
21724 var tend;
21725 var yend;
21726 if (y0 < ylo) {
21727 if (y1 <= ylo) {
21728 return false;
21729 }ystart = ylo;
21730 tstart = this.TforY (ylo);
21731 } else {
21732 if (y0 >= yhi) {
21733 return false;
21734 }ystart = y0;
21735 tstart = 0;
21736 }if (y1 > yhi) {
21737 yend = yhi;
21738 tend = this.TforY (yhi);
21739 } else {
21740 yend = y1;
21741 tend = 1;
21742 }var hitLo = false;
21743 var hitHi = false;
21744 while (true) {
21745 var x = this.XforT (tstart);
21746 if (x < xhi) {
21747 if (hitHi || x > xlo) {
21748 return true;
21749 }hitLo = true;
21750 } else {
21751 if (hitLo) {
21752 return true;
21753 }hitHi = true;
21754 }if (tstart >= tend) {
21755 break;
21756 }tstart = this.nextVertical (tstart, tend);
21757 }
21758 if (hitLo) {
21759 c.record (ystart, yend, this.direction);
21760 }return false;
21761 }, "jssun.awt.geom.Crossings");
21762 Clazz_defineMethod (c$, "getSubCurve", 
21763 function (ystart, yend) {
21764 return this.getSubCurve (ystart, yend, this.direction);
21765 }, "~N,~N");
21766 Clazz_defineMethod (c$, "compareTo", 
21767 function (that, yrange) {
21768 var y0 = yrange[0];
21769 var y1 = yrange[1];
21770 y1 = Math.min (Math.min (y1, this.getYBot ()), that.getYBot ());
21771 if (y1 <= yrange[0]) {
21772 System.err.println ("this == " + this);
21773 System.err.println ("that == " + that);
21774 System.out.println ("target range = " + yrange[0] + "=>" + yrange[1]);
21775 throw  new InternalError ("backstepping from " + yrange[0] + " to " + y1);
21776 }yrange[1] = y1;
21777 if (this.getXMax () <= that.getXMin ()) {
21778 if (this.getXMin () == that.getXMax ()) {
21779 return 0;
21780 }return -1;
21781 }if (this.getXMin () >= that.getXMax ()) {
21782 return 1;
21783 }var s0 = this.TforY (y0);
21784 var ys0 = this.YforT (s0);
21785 if (ys0 < y0) {
21786 s0 = this.refineTforY (s0, ys0, y0);
21787 ys0 = this.YforT (s0);
21788 }var s1 = this.TforY (y1);
21789 if (this.YforT (s1) < y0) {
21790 s1 = this.refineTforY (s1, this.YforT (s1), y0);
21791 }var t0 = that.TforY (y0);
21792 var yt0 = that.YforT (t0);
21793 if (yt0 < y0) {
21794 t0 = that.refineTforY (t0, yt0, y0);
21795 yt0 = that.YforT (t0);
21796 }var t1 = that.TforY (y1);
21797 if (that.YforT (t1) < y0) {
21798 t1 = that.refineTforY (t1, that.YforT (t1), y0);
21799 }var xs0 = this.XforT (s0);
21800 var xt0 = that.XforT (t0);
21801 var scale = Math.max (Math.abs (y0), Math.abs (y1));
21802 var ymin = Math.max (scale * 1E-14, 1E-300);
21803 if (this.fairlyClose (xs0, xt0)) {
21804 var bump = ymin;
21805 var maxbump = Math.min (ymin * 1E13, (y1 - y0) * .1);
21806 var y = y0 + bump;
21807 while (y <= y1) {
21808 if (this.fairlyClose (this.XforY (y), that.XforY (y))) {
21809 if ((bump *= 2) > maxbump) {
21810 bump = maxbump;
21811 }} else {
21812 y -= bump;
21813 while (true) {
21814 bump /= 2;
21815 var newy = y + bump;
21816 if (newy <= y) {
21817 break;
21818 }if (this.fairlyClose (this.XforY (newy), that.XforY (newy))) {
21819 y = newy;
21820 }}
21821 break;
21822 }y += bump;
21823 }
21824 if (y > y0) {
21825 if (y < y1) {
21826 yrange[1] = y;
21827 }return 0;
21828 }}if (ymin <= 0) {
21829 System.out.println ("ymin = " + ymin);
21830 }while (s0 < s1 && t0 < t1) {
21831 var sh = this.nextVertical (s0, s1);
21832 var xsh = this.XforT (sh);
21833 var ysh = this.YforT (sh);
21834 var th = that.nextVertical (t0, t1);
21835 var xth = that.XforT (th);
21836 var yth = that.YforT (th);
21837 try {
21838 if (this.findIntersect (that, yrange, ymin, 0, 0, s0, xs0, ys0, sh, xsh, ysh, t0, xt0, yt0, th, xth, yth)) {
21839 break;
21840 }} catch (t) {
21841 System.err.println ("Error: " + t);
21842 System.err.println ("y range was " + yrange[0] + "=>" + yrange[1]);
21843 System.err.println ("s y range is " + ys0 + "=>" + ysh);
21844 System.err.println ("t y range is " + yt0 + "=>" + yth);
21845 System.err.println ("ymin is " + ymin);
21846 return 0;
21847 }
21848 if (ysh < yth) {
21849 if (ysh > yrange[0]) {
21850 if (ysh < yrange[1]) {
21851 yrange[1] = ysh;
21852 }break;
21853 }s0 = sh;
21854 xs0 = xsh;
21855 ys0 = ysh;
21856 } else {
21857 if (yth > yrange[0]) {
21858 if (yth < yrange[1]) {
21859 yrange[1] = yth;
21860 }break;
21861 }t0 = th;
21862 xt0 = xth;
21863 yt0 = yth;
21864 }}
21865 var ymid = (yrange[0] + yrange[1]) / 2;
21866 return jssun.awt.geom.Curve.orderof (this.XforY (ymid), that.XforY (ymid));
21867 }, "jssun.awt.geom.Curve,~A");
21868 Clazz_defineMethod (c$, "findIntersect", 
21869 function (that, yrange, ymin, slevel, tlevel, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1) {
21870 if (ys0 > yt1 || yt0 > ys1) {
21871 return false;
21872 }if (Math.min (xs0, xs1) > Math.max (xt0, xt1) || Math.max (xs0, xs1) < Math.min (xt0, xt1)) {
21873 return false;
21874 }if (s1 - s0 > 0.001) {
21875 var s = (s0 + s1) / 2;
21876 var xs = this.XforT (s);
21877 var ys = this.YforT (s);
21878 if (s == s0 || s == s1) {
21879 System.out.println ("s0 = " + s0);
21880 System.out.println ("s1 = " + s1);
21881 throw  new InternalError ("no s progress!");
21882 }if (t1 - t0 > 0.001) {
21883 var t = (t0 + t1) / 2;
21884 var xt = that.XforT (t);
21885 var yt = that.YforT (t);
21886 if (t == t0 || t == t1) {
21887 System.out.println ("t0 = " + t0);
21888 System.out.println ("t1 = " + t1);
21889 throw  new InternalError ("no t progress!");
21890 }if (ys >= yt0 && yt >= ys0) {
21891 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t, xt, yt)) {
21892 return true;
21893 }}if (ys >= yt) {
21894 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t, xt, yt, t1, xt1, yt1)) {
21895 return true;
21896 }}if (yt >= ys) {
21897 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21898 return true;
21899 }}if (ys1 >= yt && yt1 >= ys) {
21900 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21901 return true;
21902 }}} else {
21903 if (ys >= yt0) {
21904 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t1, xt1, yt1)) {
21905 return true;
21906 }}if (yt1 >= ys) {
21907 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1)) {
21908 return true;
21909 }}}} else if (t1 - t0 > 0.001) {
21910 var t = (t0 + t1) / 2;
21911 var xt = that.XforT (t);
21912 var yt = that.YforT (t);
21913 if (t == t0 || t == t1) {
21914 System.out.println ("t0 = " + t0);
21915 System.out.println ("t1 = " + t1);
21916 throw  new InternalError ("no t progress!");
21917 }if (yt >= ys0) {
21918 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21919 return true;
21920 }}if (ys1 >= yt) {
21921 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21922 return true;
21923 }}} else {
21924 var xlk = xs1 - xs0;
21925 var ylk = ys1 - ys0;
21926 var xnm = xt1 - xt0;
21927 var ynm = yt1 - yt0;
21928 var xmk = xt0 - xs0;
21929 var ymk = yt0 - ys0;
21930 var det = xnm * ylk - ynm * xlk;
21931 if (det != 0) {
21932 var detinv = 1 / det;
21933 var s = (xnm * ymk - ynm * xmk) * detinv;
21934 var t = (xlk * ymk - ylk * xmk) * detinv;
21935 if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {
21936 s = s0 + s * (s1 - s0);
21937 t = t0 + t * (t1 - t0);
21938 if (s < 0 || s > 1 || t < 0 || t > 1) {
21939 System.out.println ("Uh oh!");
21940 }var y = (this.YforT (s) + that.YforT (t)) / 2;
21941 if (y <= yrange[1] && y > yrange[0]) {
21942 yrange[1] = y;
21943 return true;
21944 }}}}return false;
21945 }, "jssun.awt.geom.Curve,~A,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21946 Clazz_defineMethod (c$, "refineTforY", 
21947 function (t0, yt0, y0) {
21948 var t1 = 1;
21949 while (true) {
21950 var th = (t0 + t1) / 2;
21951 if (th == t0 || th == t1) {
21952 return t1;
21953 }var y = this.YforT (th);
21954 if (y < y0) {
21955 t0 = th;
21956 yt0 = y;
21957 } else if (y > y0) {
21958 t1 = th;
21959 } else {
21960 return t1;
21961 }}
21962 }, "~N,~N,~N");
21963 Clazz_defineMethod (c$, "fairlyClose", 
21964 function (v1, v2) {
21965 return (Math.abs (v1 - v2) < Math.max (Math.abs (v1), Math.abs (v2)) * 1E-10);
21966 }, "~N,~N");
21967 Clazz_defineStatics (c$,
21968 "INCREASING", 1,
21969 "DECREASING", -1,
21970 "RECT_INTERSECTS", 0x80000000,
21971 "TMIN", 1E-3);
21972 });
21973 Clazz_declarePackage ("java.awt.geom");
21974 Clazz_load (["java.lang.RuntimeException"], "java.awt.geom.IllegalPathStateException", null, function () {
21975 c$ = Clazz_declareType (java.awt.geom, "IllegalPathStateException", RuntimeException);
21976 Clazz_makeConstructor (c$, 
21977 function () {
21978 Clazz_superConstructor (this, java.awt.geom.IllegalPathStateException, []);
21979 });
21980 });
21981 Clazz_declarePackage ("java.awt.geom");
21982 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.RectIterator", ["java.util.NoSuchElementException"], function () {
21983 c$ = Clazz_decorateAsClass (function () {
21984 this.x = 0;
21985 this.y = 0;
21986 this.w = 0;
21987 this.h = 0;
21988 this.affine = null;
21989 this.index = 0;
21990 Clazz_instantialize (this, arguments);
21991 }, java.awt.geom, "RectIterator", null, java.awt.geom.PathIterator);
21992 Clazz_makeConstructor (c$, 
21993 function (r, at) {
21994 this.x = r.getX ();
21995 this.y = r.getY ();
21996 this.w = r.getWidth ();
21997 this.h = r.getHeight ();
21998 this.affine = at;
21999 if (this.w < 0 || this.h < 0) {
22000 this.index = 6;
22001 }}, "java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform");
22002 Clazz_overrideMethod (c$, "getWindingRule", 
22003 function () {
22004 return 1;
22005 });
22006 Clazz_overrideMethod (c$, "isDone", 
22007 function () {
22008 return this.index > 5;
22009 });
22010 Clazz_overrideMethod (c$, "next", 
22011 function () {
22012 this.index++;
22013 });
22014 Clazz_defineMethod (c$, "currentSegment", 
22015 function (coords) {
22016 if (this.isDone ()) {
22017 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
22018 }if (this.index == 5) {
22019 return 4;
22020 }coords[0] = this.x;
22021 coords[1] = this.y;
22022 if (this.index == 1 || this.index == 2) {
22023 coords[0] += this.w;
22024 }if (this.index == 2 || this.index == 3) {
22025 coords[1] += this.h;
22026 }if (this.affine != null) {
22027 this.affine.transform (coords, 0, coords, 0, 1);
22028 }return (this.index == 0 ? 0 : 1);
22029 }, "~A");
22030 Clazz_defineMethod (c$, "currentSegment", 
22031 function (coords) {
22032 if (this.isDone ()) {
22033 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
22034 }if (this.index == 5) {
22035 return 4;
22036 }coords[0] = this.x;
22037 coords[1] = this.y;
22038 if (this.index == 1 || this.index == 2) {
22039 coords[0] += this.w;
22040 }if (this.index == 2 || this.index == 3) {
22041 coords[1] += this.h;
22042 }if (this.affine != null) {
22043 this.affine.transform (coords, 0, coords, 0, 1);
22044 }return (this.index == 0 ? 0 : 1);
22045 }, "~A");
22046 });
22047 Clazz_declarePackage ("java.awt.event");
22048 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ActionEvent", ["java.awt.event.KeyEvent"], function () {
22049 c$ = Clazz_decorateAsClass (function () {
22050 this.actionCommand = null;
22051 this.when = 0;
22052 this.modifiers = 0;
22053 Clazz_instantialize (this, arguments);
22054 }, java.awt.event, "ActionEvent", java.awt.AWTEvent);
22055 Clazz_makeConstructor (c$, 
22056 function (source, id, command) {
22057 this.construct (source, id, command, 0);
22058 }, "~O,~N,~S");
22059 Clazz_makeConstructor (c$, 
22060 function (source, id, command, modifiers) {
22061 this.construct (source, id, command, 0, modifiers);
22062 }, "~O,~N,~S,~N");
22063 Clazz_makeConstructor (c$, 
22064 function (source, id, command, when, modifiers) {
22065 Clazz_superConstructor (this, java.awt.event.ActionEvent, [source, id]);
22066 this.actionCommand = command;
22067 this.when = when;
22068 this.modifiers = modifiers;
22069 }, "~O,~N,~S,~N,~N");
22070 Clazz_defineMethod (c$, "getActionCommand", 
22071 function () {
22072 return this.actionCommand;
22073 });
22074 Clazz_defineMethod (c$, "getWhen", 
22075 function () {
22076 return this.when;
22077 });
22078 Clazz_defineMethod (c$, "getModifiers", 
22079 function () {
22080 return this.modifiers;
22081 });
22082 Clazz_overrideMethod (c$, "paramString", 
22083 function () {
22084 var typeStr;
22085 switch (this.id) {
22086 case 1001:
22087 typeStr = "ACTION_PERFORMED";
22088 break;
22089 default:
22090 typeStr = "unknown type";
22091 }
22092 return typeStr + ",cmd=" + this.actionCommand + ",when=" + this.when + ",modifiers=" + java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers);
22093 });
22094 Clazz_defineStatics (c$,
22095 "SHIFT_MASK", 1,
22096 "CTRL_MASK", 2,
22097 "META_MASK", 4,
22098 "ALT_MASK", 8,
22099 "ACTION_FIRST", 1001,
22100 "ACTION_LAST", 1001,
22101 "ACTION_PERFORMED", 1001);
22102 });
22103 Clazz_declarePackage ("java.awt.event");
22104 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.KeyEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Toolkit"], function () {
22105 c$ = Clazz_decorateAsClass (function () {
22106 this.isProxyActive = false;
22107 this.keyCode = 0;
22108 this.keyChar = '\0';
22109 this.keyLocation = 0;
22110 Clazz_instantialize (this, arguments);
22111 }, java.awt.event, "KeyEvent", java.awt.event.InputEvent);
22112 Clazz_makeConstructor (c$, 
22113 function (source, id, when, modifiers, keyCode, keyChar, keyLocation) {
22114 Clazz_superConstructor (this, java.awt.event.KeyEvent, [source, id, when, modifiers]);
22115 if (id == 400) {
22116 if (keyChar == '\uffff') {
22117 throw  new IllegalArgumentException ("invalid keyChar");
22118 }if (keyCode != 0) {
22119 throw  new IllegalArgumentException ("invalid keyCode");
22120 }if (keyLocation != 0) {
22121 throw  new IllegalArgumentException ("invalid keyLocation");
22122 }}this.keyCode = keyCode;
22123 this.keyChar = keyChar;
22124 if ((keyLocation < 0) || (keyLocation > 4)) {
22125 throw  new IllegalArgumentException ("invalid keyLocation");
22126 }this.keyLocation = keyLocation;
22127 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22128 this.setNewModifiers ();
22129 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22130 this.setOldModifiers ();
22131 }}, "java.awt.Component,~N,~N,~N,~N,~S,~N");
22132 Clazz_makeConstructor (c$, 
22133 function (source, id, when, modifiers, keyCode, keyChar) {
22134 this.construct (source, id, when, modifiers, keyCode, keyChar, 0);
22135 }, "java.awt.Component,~N,~N,~N,~N,~S");
22136 Clazz_makeConstructor (c$, 
22137 function (source, id, when, modifiers, keyCode) {
22138 this.construct (source, id, when, modifiers, keyCode, String.fromCharCode (keyCode));
22139 }, "java.awt.Component,~N,~N,~N,~N");
22140 Clazz_defineMethod (c$, "getKeyCode", 
22141 function () {
22142 return this.keyCode;
22143 });
22144 Clazz_defineMethod (c$, "setKeyCode", 
22145 function (keyCode) {
22146 this.keyCode = keyCode;
22147 }, "~N");
22148 Clazz_defineMethod (c$, "getKeyChar", 
22149 function () {
22150 return this.keyChar;
22151 });
22152 Clazz_defineMethod (c$, "setKeyChar", 
22153 function (keyChar) {
22154 this.keyChar = keyChar;
22155 }, "~S");
22156 Clazz_defineMethod (c$, "setModifiers", 
22157 function (modifiers) {
22158 this.modifiers = modifiers;
22159 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22160 this.setNewModifiers ();
22161 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22162 this.setOldModifiers ();
22163 }}, "~N");
22164 Clazz_defineMethod (c$, "getKeyLocation", 
22165 function () {
22166 return this.keyLocation;
22167 });
22168 c$.getKeyText = Clazz_defineMethod (c$, "getKeyText", 
22169 function (keyCode) {
22170 if (keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90) {
22171 return String.valueOf (String.fromCharCode (keyCode));
22172 }switch (keyCode) {
22173 case 10:
22174 return java.awt.Toolkit.getProperty ("AWT.enter", "Enter");
22175 case 8:
22176 return java.awt.Toolkit.getProperty ("AWT.backSpace", "Backspace");
22177 case 9:
22178 return java.awt.Toolkit.getProperty ("AWT.tab", "Tab");
22179 case 3:
22180 return java.awt.Toolkit.getProperty ("AWT.cancel", "Cancel");
22181 case 12:
22182 return java.awt.Toolkit.getProperty ("AWT.clear", "Clear");
22183 case 65312:
22184 return java.awt.Toolkit.getProperty ("AWT.compose", "Compose");
22185 case 19:
22186 return java.awt.Toolkit.getProperty ("AWT.pause", "Pause");
22187 case 20:
22188 return java.awt.Toolkit.getProperty ("AWT.capsLock", "Caps Lock");
22189 case 27:
22190 return java.awt.Toolkit.getProperty ("AWT.escape", "Escape");
22191 case 32:
22192 return java.awt.Toolkit.getProperty ("AWT.space", "Space");
22193 case 33:
22194 return java.awt.Toolkit.getProperty ("AWT.pgup", "Page Up");
22195 case 34:
22196 return java.awt.Toolkit.getProperty ("AWT.pgdn", "Page Down");
22197 case 35:
22198 return java.awt.Toolkit.getProperty ("AWT.end", "End");
22199 case 36:
22200 return java.awt.Toolkit.getProperty ("AWT.home", "Home");
22201 case 37:
22202 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22203 case 38:
22204 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22205 case 39:
22206 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22207 case 40:
22208 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22209 case 65368:
22210 return java.awt.Toolkit.getProperty ("AWT.begin", "Begin");
22211 case 16:
22212 return java.awt.Toolkit.getProperty ("AWT.shift", "Shift");
22213 case 17:
22214 return java.awt.Toolkit.getProperty ("AWT.control", "Control");
22215 case 18:
22216 return java.awt.Toolkit.getProperty ("AWT.alt", "Alt");
22217 case 157:
22218 return java.awt.Toolkit.getProperty ("AWT.meta", "Meta");
22219 case 65406:
22220 return java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph");
22221 case 44:
22222 return java.awt.Toolkit.getProperty ("AWT.comma", "Comma");
22223 case 46:
22224 return java.awt.Toolkit.getProperty ("AWT.period", "Period");
22225 case 47:
22226 return java.awt.Toolkit.getProperty ("AWT.slash", "Slash");
22227 case 59:
22228 return java.awt.Toolkit.getProperty ("AWT.semicolon", "Semicolon");
22229 case 61:
22230 return java.awt.Toolkit.getProperty ("AWT.equals", "Equals");
22231 case 91:
22232 return java.awt.Toolkit.getProperty ("AWT.openBracket", "Open Bracket");
22233 case 92:
22234 return java.awt.Toolkit.getProperty ("AWT.backSlash", "Back Slash");
22235 case 93:
22236 return java.awt.Toolkit.getProperty ("AWT.closeBracket", "Close Bracket");
22237 case 106:
22238 return java.awt.Toolkit.getProperty ("AWT.multiply", "NumPad *");
22239 case 107:
22240 return java.awt.Toolkit.getProperty ("AWT.add", "NumPad +");
22241 case 108:
22242 return java.awt.Toolkit.getProperty ("AWT.separator", "NumPad ,");
22243 case 109:
22244 return java.awt.Toolkit.getProperty ("AWT.subtract", "NumPad -");
22245 case 110:
22246 return java.awt.Toolkit.getProperty ("AWT.decimal", "NumPad .");
22247 case 111:
22248 return java.awt.Toolkit.getProperty ("AWT.divide", "NumPad /");
22249 case 127:
22250 return java.awt.Toolkit.getProperty ("AWT.delete", "Delete");
22251 case 144:
22252 return java.awt.Toolkit.getProperty ("AWT.numLock", "Num Lock");
22253 case 145:
22254 return java.awt.Toolkit.getProperty ("AWT.scrollLock", "Scroll Lock");
22255 case 524:
22256 return java.awt.Toolkit.getProperty ("AWT.windows", "Windows");
22257 case 525:
22258 return java.awt.Toolkit.getProperty ("AWT.context", "Context Menu");
22259 case 112:
22260 return java.awt.Toolkit.getProperty ("AWT.f1", "F1");
22261 case 113:
22262 return java.awt.Toolkit.getProperty ("AWT.f2", "F2");
22263 case 114:
22264 return java.awt.Toolkit.getProperty ("AWT.f3", "F3");
22265 case 115:
22266 return java.awt.Toolkit.getProperty ("AWT.f4", "F4");
22267 case 116:
22268 return java.awt.Toolkit.getProperty ("AWT.f5", "F5");
22269 case 117:
22270 return java.awt.Toolkit.getProperty ("AWT.f6", "F6");
22271 case 118:
22272 return java.awt.Toolkit.getProperty ("AWT.f7", "F7");
22273 case 119:
22274 return java.awt.Toolkit.getProperty ("AWT.f8", "F8");
22275 case 120:
22276 return java.awt.Toolkit.getProperty ("AWT.f9", "F9");
22277 case 121:
22278 return java.awt.Toolkit.getProperty ("AWT.f10", "F10");
22279 case 122:
22280 return java.awt.Toolkit.getProperty ("AWT.f11", "F11");
22281 case 123:
22282 return java.awt.Toolkit.getProperty ("AWT.f12", "F12");
22283 case 61440:
22284 return java.awt.Toolkit.getProperty ("AWT.f13", "F13");
22285 case 61441:
22286 return java.awt.Toolkit.getProperty ("AWT.f14", "F14");
22287 case 61442:
22288 return java.awt.Toolkit.getProperty ("AWT.f15", "F15");
22289 case 61443:
22290 return java.awt.Toolkit.getProperty ("AWT.f16", "F16");
22291 case 61444:
22292 return java.awt.Toolkit.getProperty ("AWT.f17", "F17");
22293 case 61445:
22294 return java.awt.Toolkit.getProperty ("AWT.f18", "F18");
22295 case 61446:
22296 return java.awt.Toolkit.getProperty ("AWT.f19", "F19");
22297 case 61447:
22298 return java.awt.Toolkit.getProperty ("AWT.f20", "F20");
22299 case 61448:
22300 return java.awt.Toolkit.getProperty ("AWT.f21", "F21");
22301 case 61449:
22302 return java.awt.Toolkit.getProperty ("AWT.f22", "F22");
22303 case 61450:
22304 return java.awt.Toolkit.getProperty ("AWT.f23", "F23");
22305 case 61451:
22306 return java.awt.Toolkit.getProperty ("AWT.f24", "F24");
22307 case 154:
22308 return java.awt.Toolkit.getProperty ("AWT.printScreen", "Print Screen");
22309 case 155:
22310 return java.awt.Toolkit.getProperty ("AWT.insert", "Insert");
22311 case 156:
22312 return java.awt.Toolkit.getProperty ("AWT.help", "Help");
22313 case 192:
22314 return java.awt.Toolkit.getProperty ("AWT.backQuote", "Back Quote");
22315 case 222:
22316 return java.awt.Toolkit.getProperty ("AWT.quote", "Quote");
22317 case 224:
22318 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22319 case 225:
22320 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22321 case 226:
22322 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22323 case 227:
22324 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22325 case 128:
22326 return java.awt.Toolkit.getProperty ("AWT.deadGrave", "Dead Grave");
22327 case 129:
22328 return java.awt.Toolkit.getProperty ("AWT.deadAcute", "Dead Acute");
22329 case 130:
22330 return java.awt.Toolkit.getProperty ("AWT.deadCircumflex", "Dead Circumflex");
22331 case 131:
22332 return java.awt.Toolkit.getProperty ("AWT.deadTilde", "Dead Tilde");
22333 case 132:
22334 return java.awt.Toolkit.getProperty ("AWT.deadMacron", "Dead Macron");
22335 case 133:
22336 return java.awt.Toolkit.getProperty ("AWT.deadBreve", "Dead Breve");
22337 case 134:
22338 return java.awt.Toolkit.getProperty ("AWT.deadAboveDot", "Dead Above Dot");
22339 case 135:
22340 return java.awt.Toolkit.getProperty ("AWT.deadDiaeresis", "Dead Diaeresis");
22341 case 136:
22342 return java.awt.Toolkit.getProperty ("AWT.deadAboveRing", "Dead Above Ring");
22343 case 137:
22344 return java.awt.Toolkit.getProperty ("AWT.deadDoubleAcute", "Dead Double Acute");
22345 case 138:
22346 return java.awt.Toolkit.getProperty ("AWT.deadCaron", "Dead Caron");
22347 case 139:
22348 return java.awt.Toolkit.getProperty ("AWT.deadCedilla", "Dead Cedilla");
22349 case 140:
22350 return java.awt.Toolkit.getProperty ("AWT.deadOgonek", "Dead Ogonek");
22351 case 141:
22352 return java.awt.Toolkit.getProperty ("AWT.deadIota", "Dead Iota");
22353 case 142:
22354 return java.awt.Toolkit.getProperty ("AWT.deadVoicedSound", "Dead Voiced Sound");
22355 case 143:
22356 return java.awt.Toolkit.getProperty ("AWT.deadSemivoicedSound", "Dead Semivoiced Sound");
22357 case 150:
22358 return java.awt.Toolkit.getProperty ("AWT.ampersand", "Ampersand");
22359 case 151:
22360 return java.awt.Toolkit.getProperty ("AWT.asterisk", "Asterisk");
22361 case 152:
22362 return java.awt.Toolkit.getProperty ("AWT.quoteDbl", "Double Quote");
22363 case 153:
22364 return java.awt.Toolkit.getProperty ("AWT.Less", "Less");
22365 case 160:
22366 return java.awt.Toolkit.getProperty ("AWT.greater", "Greater");
22367 case 161:
22368 return java.awt.Toolkit.getProperty ("AWT.braceLeft", "Left Brace");
22369 case 162:
22370 return java.awt.Toolkit.getProperty ("AWT.braceRight", "Right Brace");
22371 case 512:
22372 return java.awt.Toolkit.getProperty ("AWT.at", "At");
22373 case 513:
22374 return java.awt.Toolkit.getProperty ("AWT.colon", "Colon");
22375 case 514:
22376 return java.awt.Toolkit.getProperty ("AWT.circumflex", "Circumflex");
22377 case 515:
22378 return java.awt.Toolkit.getProperty ("AWT.dollar", "Dollar");
22379 case 516:
22380 return java.awt.Toolkit.getProperty ("AWT.euro", "Euro");
22381 case 517:
22382 return java.awt.Toolkit.getProperty ("AWT.exclamationMark", "Exclamation Mark");
22383 case 518:
22384 return java.awt.Toolkit.getProperty ("AWT.invertedExclamationMark", "Inverted Exclamation Mark");
22385 case 519:
22386 return java.awt.Toolkit.getProperty ("AWT.leftParenthesis", "Left Parenthesis");
22387 case 520:
22388 return java.awt.Toolkit.getProperty ("AWT.numberSign", "Number Sign");
22389 case 45:
22390 return java.awt.Toolkit.getProperty ("AWT.minus", "Minus");
22391 case 521:
22392 return java.awt.Toolkit.getProperty ("AWT.plus", "Plus");
22393 case 522:
22394 return java.awt.Toolkit.getProperty ("AWT.rightParenthesis", "Right Parenthesis");
22395 case 523:
22396 return java.awt.Toolkit.getProperty ("AWT.underscore", "Underscore");
22397 case 24:
22398 return java.awt.Toolkit.getProperty ("AWT.final", "Final");
22399 case 28:
22400 return java.awt.Toolkit.getProperty ("AWT.convert", "Convert");
22401 case 29:
22402 return java.awt.Toolkit.getProperty ("AWT.noconvert", "No Convert");
22403 case 30:
22404 return java.awt.Toolkit.getProperty ("AWT.accept", "Accept");
22405 case 31:
22406 return java.awt.Toolkit.getProperty ("AWT.modechange", "Mode Change");
22407 case 21:
22408 return java.awt.Toolkit.getProperty ("AWT.kana", "Kana");
22409 case 25:
22410 return java.awt.Toolkit.getProperty ("AWT.kanji", "Kanji");
22411 case 240:
22412 return java.awt.Toolkit.getProperty ("AWT.alphanumeric", "Alphanumeric");
22413 case 241:
22414 return java.awt.Toolkit.getProperty ("AWT.katakana", "Katakana");
22415 case 242:
22416 return java.awt.Toolkit.getProperty ("AWT.hiragana", "Hiragana");
22417 case 243:
22418 return java.awt.Toolkit.getProperty ("AWT.fullWidth", "Full-Width");
22419 case 244:
22420 return java.awt.Toolkit.getProperty ("AWT.halfWidth", "Half-Width");
22421 case 245:
22422 return java.awt.Toolkit.getProperty ("AWT.romanCharacters", "Roman Characters");
22423 case 256:
22424 return java.awt.Toolkit.getProperty ("AWT.allCandidates", "All Candidates");
22425 case 257:
22426 return java.awt.Toolkit.getProperty ("AWT.previousCandidate", "Previous Candidate");
22427 case 258:
22428 return java.awt.Toolkit.getProperty ("AWT.codeInput", "Code Input");
22429 case 259:
22430 return java.awt.Toolkit.getProperty ("AWT.japaneseKatakana", "Japanese Katakana");
22431 case 260:
22432 return java.awt.Toolkit.getProperty ("AWT.japaneseHiragana", "Japanese Hiragana");
22433 case 261:
22434 return java.awt.Toolkit.getProperty ("AWT.japaneseRoman", "Japanese Roman");
22435 case 262:
22436 return java.awt.Toolkit.getProperty ("AWT.kanaLock", "Kana Lock");
22437 case 263:
22438 return java.awt.Toolkit.getProperty ("AWT.inputMethodOnOff", "Input Method On/Off");
22439 case 65481:
22440 return java.awt.Toolkit.getProperty ("AWT.again", "Again");
22441 case 65483:
22442 return java.awt.Toolkit.getProperty ("AWT.undo", "Undo");
22443 case 65485:
22444 return java.awt.Toolkit.getProperty ("AWT.copy", "Copy");
22445 case 65487:
22446 return java.awt.Toolkit.getProperty ("AWT.paste", "Paste");
22447 case 65489:
22448 return java.awt.Toolkit.getProperty ("AWT.cut", "Cut");
22449 case 65488:
22450 return java.awt.Toolkit.getProperty ("AWT.find", "Find");
22451 case 65482:
22452 return java.awt.Toolkit.getProperty ("AWT.props", "Props");
22453 case 65480:
22454 return java.awt.Toolkit.getProperty ("AWT.stop", "Stop");
22455 }
22456 if (keyCode >= 96 && keyCode <= 105) {
22457 var numpad = java.awt.Toolkit.getProperty ("AWT.numpad", "NumPad");
22458 var c = String.fromCharCode (keyCode - 96 + 48);
22459 return numpad + "-" + c;
22460 }var unknown = java.awt.Toolkit.getProperty ("AWT.unknown", "Unknown");
22461 return unknown + " keyCode: 0x" + Integer.toString (keyCode, 16);
22462 }, "~N");
22463 c$.getKeyModifiersText = Clazz_defineMethod (c$, "getKeyModifiersText", 
22464 function (modifiers) {
22465 var buf =  new StringBuilder ();
22466 if ((modifiers & 4) != 0) {
22467 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
22468 buf.append ("+");
22469 }if ((modifiers & 2) != 0) {
22470 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
22471 buf.append ("+");
22472 }if ((modifiers & 8) != 0) {
22473 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
22474 buf.append ("+");
22475 }if ((modifiers & 1) != 0) {
22476 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
22477 buf.append ("+");
22478 }if ((modifiers & 32) != 0) {
22479 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
22480 buf.append ("+");
22481 }if ((modifiers & 16) != 0) {
22482 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
22483 buf.append ("+");
22484 }if (buf.length () > 0) {
22485 buf.setLength (buf.length () - 1);
22486 }return buf.toString ();
22487 }, "~N");
22488 Clazz_defineMethod (c$, "isActionKey", 
22489 function () {
22490 switch (this.keyCode) {
22491 case 36:
22492 case 35:
22493 case 33:
22494 case 34:
22495 case 38:
22496 case 40:
22497 case 37:
22498 case 39:
22499 case 65368:
22500 case 226:
22501 case 224:
22502 case 227:
22503 case 225:
22504 case 112:
22505 case 113:
22506 case 114:
22507 case 115:
22508 case 116:
22509 case 117:
22510 case 118:
22511 case 119:
22512 case 120:
22513 case 121:
22514 case 122:
22515 case 123:
22516 case 61440:
22517 case 61441:
22518 case 61442:
22519 case 61443:
22520 case 61444:
22521 case 61445:
22522 case 61446:
22523 case 61447:
22524 case 61448:
22525 case 61449:
22526 case 61450:
22527 case 61451:
22528 case 154:
22529 case 145:
22530 case 20:
22531 case 144:
22532 case 19:
22533 case 155:
22534 case 24:
22535 case 28:
22536 case 29:
22537 case 30:
22538 case 31:
22539 case 21:
22540 case 25:
22541 case 240:
22542 case 241:
22543 case 242:
22544 case 243:
22545 case 244:
22546 case 245:
22547 case 256:
22548 case 257:
22549 case 258:
22550 case 259:
22551 case 260:
22552 case 261:
22553 case 262:
22554 case 263:
22555 case 65481:
22556 case 65483:
22557 case 65485:
22558 case 65487:
22559 case 65489:
22560 case 65488:
22561 case 65482:
22562 case 65480:
22563 case 156:
22564 case 524:
22565 case 525:
22566 return true;
22567 }
22568 return false;
22569 });
22570 Clazz_overrideMethod (c$, "paramString", 
22571 function () {
22572 var str =  new StringBuilder (100);
22573 switch (this.id) {
22574 case 401:
22575 str.append ("KEY_PRESSED");
22576 break;
22577 case 402:
22578 str.append ("KEY_RELEASED");
22579 break;
22580 case 400:
22581 str.append ("KEY_TYPED");
22582 break;
22583 default:
22584 str.append ("unknown type");
22585 break;
22586 }
22587 str.append (",keyCode=").append ("" + this.keyCode);
22588 str.append (",keyText=").append (java.awt.event.KeyEvent.getKeyText (this.keyCode));
22589 str.append (",keyChar=");
22590 switch (this.keyChar) {
22591 case '\b':
22592 str.append (java.awt.event.KeyEvent.getKeyText (8));
22593 break;
22594 case '\t':
22595 str.append (java.awt.event.KeyEvent.getKeyText (9));
22596 break;
22597 case '\n':
22598 str.append (java.awt.event.KeyEvent.getKeyText (10));
22599 break;
22600 case '\u0018':
22601 str.append (java.awt.event.KeyEvent.getKeyText (3));
22602 break;
22603 case '\u001b':
22604 str.append (java.awt.event.KeyEvent.getKeyText (27));
22605 break;
22606 case '\u007f':
22607 str.append (java.awt.event.KeyEvent.getKeyText (127));
22608 break;
22609 case '\uffff':
22610 str.append (java.awt.Toolkit.getProperty ("AWT.undefined", "Undefined"));
22611 str.append (" keyChar");
22612 break;
22613 default:
22614 str.append ("'").append (this.keyChar).append ("'");
22615 break;
22616 }
22617 if (this.getModifiers () != 0) {
22618 str.append (",modifiers=").append (java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers));
22619 }if (this.getModifiersEx () != 0) {
22620 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
22621 }str.append (",keyLocation=");
22622 switch (this.keyLocation) {
22623 case 0:
22624 str.append ("KEY_LOCATION_UNKNOWN");
22625 break;
22626 case 1:
22627 str.append ("KEY_LOCATION_STANDARD");
22628 break;
22629 case 2:
22630 str.append ("KEY_LOCATION_LEFT");
22631 break;
22632 case 3:
22633 str.append ("KEY_LOCATION_RIGHT");
22634 break;
22635 case 4:
22636 str.append ("KEY_LOCATION_NUMPAD");
22637 break;
22638 default:
22639 str.append ("KEY_LOCATION_UNKNOWN");
22640 break;
22641 }
22642 return str.toString ();
22643 });
22644 Clazz_defineMethod (c$, "setNewModifiers", 
22645  function () {
22646 if ((this.modifiers & 1) != 0) {
22647 this.modifiers |= 64;
22648 }if ((this.modifiers & 8) != 0) {
22649 this.modifiers |= 512;
22650 }if ((this.modifiers & 2) != 0) {
22651 this.modifiers |= 128;
22652 }if ((this.modifiers & 4) != 0) {
22653 this.modifiers |= 256;
22654 }if ((this.modifiers & 32) != 0) {
22655 this.modifiers |= 8192;
22656 }if ((this.modifiers & 16) != 0) {
22657 this.modifiers |= 1024;
22658 }});
22659 Clazz_defineMethod (c$, "setOldModifiers", 
22660  function () {
22661 if ((this.modifiers & 64) != 0) {
22662 this.modifiers |= 1;
22663 }if ((this.modifiers & 512) != 0) {
22664 this.modifiers |= 8;
22665 }if ((this.modifiers & 128) != 0) {
22666 this.modifiers |= 2;
22667 }if ((this.modifiers & 256) != 0) {
22668 this.modifiers |= 4;
22669 }if ((this.modifiers & 8192) != 0) {
22670 this.modifiers |= 32;
22671 }if ((this.modifiers & 1024) != 0) {
22672 this.modifiers |= 16;
22673 }});
22674 Clazz_defineStatics (c$,
22675 "KEY_FIRST", 400,
22676 "KEY_LAST", 402,
22677 "KEY_TYPED", 400,
22678 "KEY_PRESSED", 401,
22679 "KEY_RELEASED", 402,
22680 "VK_ENTER", '\n',
22681 "VK_BACK_SPACE", '\b',
22682 "VK_TAB", '\t',
22683 "VK_CANCEL", 0x03,
22684 "VK_CLEAR", 0x0C,
22685 "VK_SHIFT", 0x10,
22686 "VK_CONTROL", 0x11,
22687 "VK_ALT", 0x12,
22688 "VK_PAUSE", 0x13,
22689 "VK_CAPS_LOCK", 0x14,
22690 "VK_ESCAPE", 0x1B,
22691 "VK_SPACE", 0x20,
22692 "VK_PAGE_UP", 0x21,
22693 "VK_PAGE_DOWN", 0x22,
22694 "VK_END", 0x23,
22695 "VK_HOME", 0x24,
22696 "VK_LEFT", 0x25,
22697 "VK_UP", 0x26,
22698 "VK_RIGHT", 0x27,
22699 "VK_DOWN", 0x28,
22700 "VK_COMMA", 0x2C,
22701 "VK_MINUS", 0x2D,
22702 "VK_PERIOD", 0x2E,
22703 "VK_SLASH", 0x2F,
22704 "VK_0", 0x30,
22705 "VK_1", 0x31,
22706 "VK_2", 0x32,
22707 "VK_3", 0x33,
22708 "VK_4", 0x34,
22709 "VK_5", 0x35,
22710 "VK_6", 0x36,
22711 "VK_7", 0x37,
22712 "VK_8", 0x38,
22713 "VK_9", 0x39,
22714 "VK_SEMICOLON", 0x3B,
22715 "VK_EQUALS", 0x3D,
22716 "VK_A", 0x41,
22717 "VK_B", 0x42,
22718 "VK_C", 0x43,
22719 "VK_D", 0x44,
22720 "VK_E", 0x45,
22721 "VK_F", 0x46,
22722 "VK_G", 0x47,
22723 "VK_H", 0x48,
22724 "VK_I", 0x49,
22725 "VK_J", 0x4A,
22726 "VK_K", 0x4B,
22727 "VK_L", 0x4C,
22728 "VK_M", 0x4D,
22729 "VK_N", 0x4E,
22730 "VK_O", 0x4F,
22731 "VK_P", 0x50,
22732 "VK_Q", 0x51,
22733 "VK_R", 0x52,
22734 "VK_S", 0x53,
22735 "VK_T", 0x54,
22736 "VK_U", 0x55,
22737 "VK_V", 0x56,
22738 "VK_W", 0x57,
22739 "VK_X", 0x58,
22740 "VK_Y", 0x59,
22741 "VK_Z", 0x5A,
22742 "VK_OPEN_BRACKET", 0x5B,
22743 "VK_BACK_SLASH", 0x5C,
22744 "VK_CLOSE_BRACKET", 0x5D,
22745 "VK_NUMPAD0", 0x60,
22746 "VK_NUMPAD1", 0x61,
22747 "VK_NUMPAD2", 0x62,
22748 "VK_NUMPAD3", 0x63,
22749 "VK_NUMPAD4", 0x64,
22750 "VK_NUMPAD5", 0x65,
22751 "VK_NUMPAD6", 0x66,
22752 "VK_NUMPAD7", 0x67,
22753 "VK_NUMPAD8", 0x68,
22754 "VK_NUMPAD9", 0x69,
22755 "VK_MULTIPLY", 0x6A,
22756 "VK_ADD", 0x6B,
22757 "VK_SEPARATER", 0x6C,
22758 "VK_SEPARATOR", 108,
22759 "VK_SUBTRACT", 0x6D,
22760 "VK_DECIMAL", 0x6E,
22761 "VK_DIVIDE", 0x6F,
22762 "VK_DELETE", 0x7F,
22763 "VK_NUM_LOCK", 0x90,
22764 "VK_SCROLL_LOCK", 0x91,
22765 "VK_F1", 0x70,
22766 "VK_F2", 0x71,
22767 "VK_F3", 0x72,
22768 "VK_F4", 0x73,
22769 "VK_F5", 0x74,
22770 "VK_F6", 0x75,
22771 "VK_F7", 0x76,
22772 "VK_F8", 0x77,
22773 "VK_F9", 0x78,
22774 "VK_F10", 0x79,
22775 "VK_F11", 0x7A,
22776 "VK_F12", 0x7B,
22777 "VK_F13", 0xF000,
22778 "VK_F14", 0xF001,
22779 "VK_F15", 0xF002,
22780 "VK_F16", 0xF003,
22781 "VK_F17", 0xF004,
22782 "VK_F18", 0xF005,
22783 "VK_F19", 0xF006,
22784 "VK_F20", 0xF007,
22785 "VK_F21", 0xF008,
22786 "VK_F22", 0xF009,
22787 "VK_F23", 0xF00A,
22788 "VK_F24", 0xF00B,
22789 "VK_PRINTSCREEN", 0x9A,
22790 "VK_INSERT", 0x9B,
22791 "VK_HELP", 0x9C,
22792 "VK_META", 0x9D,
22793 "VK_BACK_QUOTE", 0xC0,
22794 "VK_QUOTE", 0xDE,
22795 "VK_KP_UP", 0xE0,
22796 "VK_KP_DOWN", 0xE1,
22797 "VK_KP_LEFT", 0xE2,
22798 "VK_KP_RIGHT", 0xE3,
22799 "VK_DEAD_GRAVE", 0x80,
22800 "VK_DEAD_ACUTE", 0x81,
22801 "VK_DEAD_CIRCUMFLEX", 0x82,
22802 "VK_DEAD_TILDE", 0x83,
22803 "VK_DEAD_MACRON", 0x84,
22804 "VK_DEAD_BREVE", 0x85,
22805 "VK_DEAD_ABOVEDOT", 0x86,
22806 "VK_DEAD_DIAERESIS", 0x87,
22807 "VK_DEAD_ABOVERING", 0x88,
22808 "VK_DEAD_DOUBLEACUTE", 0x89,
22809 "VK_DEAD_CARON", 0x8a,
22810 "VK_DEAD_CEDILLA", 0x8b,
22811 "VK_DEAD_OGONEK", 0x8c,
22812 "VK_DEAD_IOTA", 0x8d,
22813 "VK_DEAD_VOICED_SOUND", 0x8e,
22814 "VK_DEAD_SEMIVOICED_SOUND", 0x8f,
22815 "VK_AMPERSAND", 0x96,
22816 "VK_ASTERISK", 0x97,
22817 "VK_QUOTEDBL", 0x98,
22818 "VK_LESS", 0x99,
22819 "VK_GREATER", 0xa0,
22820 "VK_BRACELEFT", 0xa1,
22821 "VK_BRACERIGHT", 0xa2,
22822 "VK_AT", 0x0200,
22823 "VK_COLON", 0x0201,
22824 "VK_CIRCUMFLEX", 0x0202,
22825 "VK_DOLLAR", 0x0203,
22826 "VK_EURO_SIGN", 0x0204,
22827 "VK_EXCLAMATION_MARK", 0x0205,
22828 "VK_INVERTED_EXCLAMATION_MARK", 0x0206,
22829 "VK_LEFT_PARENTHESIS", 0x0207,
22830 "VK_NUMBER_SIGN", 0x0208,
22831 "VK_PLUS", 0x0209,
22832 "VK_RIGHT_PARENTHESIS", 0x020A,
22833 "VK_UNDERSCORE", 0x020B,
22834 "VK_WINDOWS", 0x020C,
22835 "VK_CONTEXT_MENU", 0x020D,
22836 "VK_FINAL", 0x0018,
22837 "VK_CONVERT", 0x001C,
22838 "VK_NONCONVERT", 0x001D,
22839 "VK_ACCEPT", 0x001E,
22840 "VK_MODECHANGE", 0x001F,
22841 "VK_KANA", 0x0015,
22842 "VK_KANJI", 0x0019,
22843 "VK_ALPHANUMERIC", 0x00F0,
22844 "VK_KATAKANA", 0x00F1,
22845 "VK_HIRAGANA", 0x00F2,
22846 "VK_FULL_WIDTH", 0x00F3,
22847 "VK_HALF_WIDTH", 0x00F4,
22848 "VK_ROMAN_CHARACTERS", 0x00F5,
22849 "VK_ALL_CANDIDATES", 0x0100,
22850 "VK_PREVIOUS_CANDIDATE", 0x0101,
22851 "VK_CODE_INPUT", 0x0102,
22852 "VK_JAPANESE_KATAKANA", 0x0103,
22853 "VK_JAPANESE_HIRAGANA", 0x0104,
22854 "VK_JAPANESE_ROMAN", 0x0105,
22855 "VK_KANA_LOCK", 0x0106,
22856 "VK_INPUT_METHOD_ON_OFF", 0x0107,
22857 "VK_CUT", 0xFFD1,
22858 "VK_COPY", 0xFFCD,
22859 "VK_PASTE", 0xFFCF,
22860 "VK_UNDO", 0xFFCB,
22861 "VK_AGAIN", 0xFFC9,
22862 "VK_FIND", 0xFFD0,
22863 "VK_PROPS", 0xFFCA,
22864 "VK_STOP", 0xFFC8,
22865 "VK_COMPOSE", 0xFF20,
22866 "VK_ALT_GRAPH", 0xFF7E,
22867 "VK_BEGIN", 0xFF58,
22868 "VK_UNDEFINED", 0x0,
22869 "CHAR_UNDEFINED", String.fromCharCode (0xFFFF),
22870 "KEY_LOCATION_UNKNOWN", 0,
22871 "KEY_LOCATION_STANDARD", 1,
22872 "KEY_LOCATION_LEFT", 2,
22873 "KEY_LOCATION_RIGHT", 3,
22874 "KEY_LOCATION_NUMPAD", 4);
22875 });
22876 Clazz_declarePackage ("java.awt.event");
22877 Clazz_load (["java.awt.event.MouseEvent"], "java.awt.event.MouseWheelEvent", null, function () {
22878 c$ = Clazz_decorateAsClass (function () {
22879 this.scrollType = 0;
22880 this.scrollAmount = 0;
22881 this.wheelRotation = 0;
22882 Clazz_instantialize (this, arguments);
22883 }, java.awt.event, "MouseWheelEvent", java.awt.event.MouseEvent);
22884 Clazz_makeConstructor (c$, 
22885 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22886 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation);
22887 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22888 Clazz_makeConstructor (c$, 
22889 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22890 Clazz_superConstructor (this, java.awt.event.MouseWheelEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
22891 this.scrollType = scrollType;
22892 this.scrollAmount = scrollAmount;
22893 this.wheelRotation = wheelRotation;
22894 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22895 Clazz_defineMethod (c$, "getScrollType", 
22896 function () {
22897 return this.scrollType;
22898 });
22899 Clazz_defineMethod (c$, "getScrollAmount", 
22900 function () {
22901 return this.scrollAmount;
22902 });
22903 Clazz_defineMethod (c$, "getWheelRotation", 
22904 function () {
22905 return this.wheelRotation;
22906 });
22907 Clazz_defineMethod (c$, "getUnitsToScroll", 
22908 function () {
22909 return this.scrollAmount * this.wheelRotation;
22910 });
22911 Clazz_defineMethod (c$, "paramString", 
22912 function () {
22913 var scrollTypeStr = null;
22914 if (this.getScrollType () == 0) {
22915 scrollTypeStr = "WHEEL_UNIT_SCROLL";
22916 } else if (this.getScrollType () == 1) {
22917 scrollTypeStr = "WHEEL_BLOCK_SCROLL";
22918 } else {
22919 scrollTypeStr = "unknown scroll type";
22920 }return Clazz_superCall (this, java.awt.event.MouseWheelEvent, "paramString", []) + ",scrollType=" + scrollTypeStr + ",scrollAmount=" + this.getScrollAmount () + ",wheelRotation=" + this.getWheelRotation ();
22921 });
22922 Clazz_defineStatics (c$,
22923 "WHEEL_UNIT_SCROLL", 0,
22924 "WHEEL_BLOCK_SCROLL", 1);
22925 });
22926 Clazz_declarePackage ("javax.swing");
22927 Clazz_load (["javax.swing.Action", "$.ArrayTable"], "javax.swing.AbstractAction", ["java.lang.Boolean", "javax.swing.event.SwingPropertyChangeSupport"], function () {
22928 c$ = Clazz_decorateAsClass (function () {
22929 this.enabled = true;
22930 this.arrayTable = null;
22931 this.changeSupport = null;
22932 Clazz_instantialize (this, arguments);
22933 }, javax.swing, "AbstractAction", null, [javax.swing.Action, Cloneable]);
22934 c$.shouldReconfigure = Clazz_defineMethod (c$, "shouldReconfigure", 
22935 function (e) {
22936 if (e.getPropertyName () == null) {
22937 javax.swing.AbstractAction.RECONFIGURE_ON_NULL = new Boolean (false);
22938 }return false;
22939 }, "java.beans.PropertyChangeEvent");
22940 c$.setEnabledFromAction = Clazz_defineMethod (c$, "setEnabledFromAction", 
22941 function (c, a) {
22942 c.setEnabled ((a != null) ? a.isEnabled () : true);
22943 }, "javax.swing.JComponent,javax.swing.Action");
22944 c$.setToolTipTextFromAction = Clazz_defineMethod (c$, "setToolTipTextFromAction", 
22945 function (c, a) {
22946 c.setToolTipText (a != null ? a.getValue ("ShortDescription") : null);
22947 }, "javax.swing.JComponent,javax.swing.Action");
22948 c$.hasSelectedKey = Clazz_defineMethod (c$, "hasSelectedKey", 
22949 function (a) {
22950 return (a != null && a.getValue ("SwingSelectedKey") != null);
22951 }, "javax.swing.Action");
22952 c$.isSelected = Clazz_defineMethod (c$, "isSelected", 
22953 function (a) {
22954 return Boolean.TRUE.equals (a.getValue ("SwingSelectedKey"));
22955 }, "javax.swing.Action");
22956 Clazz_makeConstructor (c$, 
22957 function () {
22958 });
22959 Clazz_makeConstructor (c$, 
22960 function (name) {
22961 this.putValue ("Name", name);
22962 }, "~S");
22963 Clazz_makeConstructor (c$, 
22964 function (name, icon) {
22965 this.construct (name);
22966 this.putValue ("SmallIcon", icon);
22967 }, "~S,javax.swing.Icon");
22968 Clazz_defineMethod (c$, "getValue", 
22969 function (key) {
22970 if (key === "enabled") {
22971 return this.enabled;
22972 }if (this.arrayTable == null) {
22973 return null;
22974 }return this.arrayTable.get (key);
22975 }, "~S");
22976 Clazz_overrideMethod (c$, "putValue", 
22977 function (key, newValue) {
22978 var oldValue = null;
22979 if (key === "enabled") {
22980 if (newValue == null || !(Clazz_instanceOf (newValue, Boolean))) {
22981 newValue = new Boolean (false);
22982 }oldValue = new Boolean (this.enabled);
22983 this.enabled = (newValue).booleanValue ();
22984 } else {
22985 if (this.arrayTable == null) {
22986 this.arrayTable =  new javax.swing.ArrayTable ();
22987 }if (this.arrayTable.containsKey (key)) oldValue = this.arrayTable.get (key);
22988 if (newValue == null) {
22989 this.arrayTable.remove (key);
22990 } else {
22991 this.arrayTable.put (key, newValue);
22992 }}this.firePropertyChange (key, oldValue, newValue);
22993 }, "~S,~O");
22994 Clazz_defineMethod (c$, "isEnabled", 
22995 function () {
22996 return this.enabled;
22997 });
22998 Clazz_overrideMethod (c$, "setEnabled", 
22999 function (newValue) {
23000 var oldValue = this.enabled;
23001 if (oldValue != newValue) {
23002 this.enabled = newValue;
23003 this.firePropertyChange ("enabled", Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
23004 }}, "~B");
23005 Clazz_defineMethod (c$, "getKeys", 
23006 function () {
23007 if (this.arrayTable == null) {
23008 return null;
23009 }var keys =  new Array (this.arrayTable.size ());
23010 this.arrayTable.getKeys (keys);
23011 return keys;
23012 });
23013 Clazz_defineMethod (c$, "firePropertyChange", 
23014 function (propertyName, oldValue, newValue) {
23015 if (this.changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
23016 return;
23017 }this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
23018 }, "~S,~O,~O");
23019 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
23020 function (listener) {
23021 if (this.changeSupport == null) {
23022 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
23023 }this.changeSupport.addPropertyChangeListener (listener);
23024 }, "java.beans.PropertyChangeListener");
23025 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
23026 function (listener) {
23027 if (this.changeSupport == null) {
23028 return;
23029 }this.changeSupport.removePropertyChangeListener (listener);
23030 }, "java.beans.PropertyChangeListener");
23031 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
23032 function () {
23033 if (this.changeSupport == null) {
23034 return  new Array (0);
23035 }return this.changeSupport.getPropertyChangeListeners ();
23036 });
23037 Clazz_defineMethod (c$, "clone", 
23038 function () {
23039 var newAction = Clazz_superCall (this, javax.swing.AbstractAction, "clone", []);
23040 {
23041 if (this.arrayTable != null) {
23042 newAction.arrayTable = this.arrayTable.clone ();
23043 }}return newAction;
23044 });
23045 Clazz_defineStatics (c$,
23046 "RECONFIGURE_ON_NULL", null);
23047 });
23048 Clazz_declarePackage ("javax.swing");
23049 Clazz_load (["java.awt.ItemSelectable", "java.awt.event.ActionListener", "$.ItemListener", "javax.swing.ActionPropertyChangeListener", "$.JComponent", "$.SwingConstants", "javax.swing.event.ChangeListener"], "javax.swing.AbstractButton", ["java.lang.Boolean", "$.IllegalArgumentException", "java.awt.event.ActionEvent", "$.ItemEvent", "javax.swing.AbstractAction", "$.DefaultButtonModel", "$.OverlayLayout", "$.SwingUtilities", "$.UIManager", "javax.swing.event.ChangeEvent", "javax.swing.plaf.UIResource"], function () {
23050 c$ = Clazz_decorateAsClass (function () {
23051 this.model = null;
23052 this.text = "";
23053 this.margin = null;
23054 this.defaultMargin = null;
23055 this.defaultIcon = null;
23056 this.pressedIcon = null;
23057 this.disabledIcon = null;
23058 this.selectedIcon = null;
23059 this.disabledSelectedIcon = null;
23060 this.rolloverIcon = null;
23061 this.rolloverSelectedIcon = null;
23062 this.$paintBorder = true;
23063 this.paintFocus = true;
23064 this.rolloverEnabled = false;
23065 this.contentAreaFilled = true;
23066 this.verticalAlignment = 0;
23067 this.horizontalAlignment = 0;
23068 this.verticalTextPosition = 0;
23069 this.horizontalTextPosition = 11;
23070 this.iconTextGap = 4;
23071 this.mnemonic = 0;
23072 this.mnemonicIndex = -1;
23073 this.multiClickThreshhold = 0;
23074 this.borderPaintedSet = false;
23075 this.rolloverEnabledSet = false;
23076 this.iconTextGapSet = false;
23077 this.contentAreaFilledSet = false;
23078 this.$setLayout = false;
23079 this.defaultCapable = true;
23080 this.handler = null;
23081 this.changeListener = null;
23082 this.actionListener = null;
23083 this.itemListener = null;
23084 this.changeEvent = null;
23085 this.hideActionText = false;
23086 this.$action = null;
23087 this.actionPropertyChangeListener = null;
23088 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.ButtonChangeListener")) {
23089 javax.swing.AbstractButton.$AbstractButton$ButtonChangeListener$ ();
23090 }
23091 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.Handler")) {
23092 javax.swing.AbstractButton.$AbstractButton$Handler$ ();
23093 }
23094 Clazz_instantialize (this, arguments);
23095 }, javax.swing, "AbstractButton", javax.swing.JComponent, [java.awt.ItemSelectable, javax.swing.SwingConstants]);
23096 Clazz_defineMethod (c$, "setHideActionText", 
23097 function (hideActionText) {
23098 if (hideActionText != this.hideActionText) {
23099 this.hideActionText = hideActionText;
23100 if (this.getAction () != null) {
23101 this.setTextFromAction (this.getAction (), false);
23102 }this.firePropertyChangeBool ("hideActionText", !hideActionText, hideActionText);
23103 }}, "~B");
23104 Clazz_defineMethod (c$, "getHideActionText", 
23105 function () {
23106 return this.hideActionText;
23107 });
23108 Clazz_defineMethod (c$, "getText", 
23109 function () {
23110 return this.text;
23111 });
23112 Clazz_defineMethod (c$, "setText", 
23113 function (text) {
23114 var oldValue = this.text;
23115 this.text = text;
23116 this.firePropertyChangeObject ("text", oldValue, text);
23117 this.updateDisplayedMnemonicIndex (text, this.getMnemonic ());
23118 if (text == null || oldValue == null || !text.equals (oldValue)) {
23119 this.revalidate ();
23120 this.repaint ();
23121 }}, "~S");
23122 Clazz_defineMethod (c$, "isSelected", 
23123 function () {
23124 return this.model.isSelected ();
23125 });
23126 Clazz_defineMethod (c$, "setSelected", 
23127 function (b) {
23128 this.model.setSelected (b);
23129 }, "~B");
23130 Clazz_defineMethod (c$, "doClick", 
23131 function () {
23132 this.doClick (68);
23133 });
23134 Clazz_defineMethod (c$, "doClick", 
23135 function (pressTime) {
23136 }, "~N");
23137 Clazz_defineMethod (c$, "setMargin", 
23138 function (m) {
23139 if (Clazz_instanceOf (m, javax.swing.plaf.UIResource)) {
23140 this.defaultMargin = m;
23141 } else if (Clazz_instanceOf (this.margin, javax.swing.plaf.UIResource)) {
23142 this.defaultMargin = this.margin;
23143 }if (m == null && this.defaultMargin != null) {
23144 m = this.defaultMargin;
23145 }var old = this.margin;
23146 this.margin = m;
23147 this.firePropertyChangeObject ("margin", old, m);
23148 if (old == null || !old.equals (m)) {
23149 this.revalidate ();
23150 this.repaint ();
23151 }}, "java.awt.Insets");
23152 Clazz_defineMethod (c$, "getMargin", 
23153 function () {
23154 return (this.margin == null) ? null : this.margin.clone ();
23155 });
23156 Clazz_defineMethod (c$, "getIcon", 
23157 function () {
23158 return this.defaultIcon;
23159 });
23160 Clazz_defineMethod (c$, "setIcon", 
23161 function (defaultIcon) {
23162 var oldValue = this.defaultIcon;
23163 this.defaultIcon = defaultIcon;
23164 if (defaultIcon !== oldValue && (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource))) {
23165 this.disabledIcon = null;
23166 }this.firePropertyChangeObject ("icon", oldValue, defaultIcon);
23167 if (defaultIcon !== oldValue) {
23168 if (defaultIcon == null || oldValue == null || defaultIcon.getIconWidth () != oldValue.getIconWidth () || defaultIcon.getIconHeight () != oldValue.getIconHeight ()) {
23169 this.revalidate ();
23170 }this.repaint ();
23171 }}, "javax.swing.Icon");
23172 Clazz_defineMethod (c$, "getPressedIcon", 
23173 function () {
23174 return this.pressedIcon;
23175 });
23176 Clazz_defineMethod (c$, "setPressedIcon", 
23177 function (pressedIcon) {
23178 var oldValue = this.pressedIcon;
23179 this.pressedIcon = pressedIcon;
23180 this.firePropertyChangeObject ("pressedIcon", oldValue, pressedIcon);
23181 if (pressedIcon !== oldValue) {
23182 if (this.getModel ().isPressed ()) {
23183 this.repaint ();
23184 }}}, "javax.swing.Icon");
23185 Clazz_defineMethod (c$, "getSelectedIcon", 
23186 function () {
23187 return this.selectedIcon;
23188 });
23189 Clazz_defineMethod (c$, "setSelectedIcon", 
23190 function (selectedIcon) {
23191 var oldValue = this.selectedIcon;
23192 this.selectedIcon = selectedIcon;
23193 if (selectedIcon !== oldValue && Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23194 this.disabledSelectedIcon = null;
23195 }this.firePropertyChangeObject ("selectedIcon", oldValue, selectedIcon);
23196 if (selectedIcon !== oldValue) {
23197 if (this.isSelected ()) {
23198 this.repaint ();
23199 }}}, "javax.swing.Icon");
23200 Clazz_defineMethod (c$, "getRolloverIcon", 
23201 function () {
23202 return this.rolloverIcon;
23203 });
23204 Clazz_defineMethod (c$, "setRolloverIcon", 
23205 function (rolloverIcon) {
23206 var oldValue = this.rolloverIcon;
23207 this.rolloverIcon = rolloverIcon;
23208 this.firePropertyChangeObject ("rolloverIcon", oldValue, rolloverIcon);
23209 this.setRolloverEnabled (true);
23210 if (rolloverIcon !== oldValue) {
23211 this.repaint ();
23212 }}, "javax.swing.Icon");
23213 Clazz_defineMethod (c$, "getRolloverSelectedIcon", 
23214 function () {
23215 return this.rolloverSelectedIcon;
23216 });
23217 Clazz_defineMethod (c$, "setRolloverSelectedIcon", 
23218 function (rolloverSelectedIcon) {
23219 var oldValue = this.rolloverSelectedIcon;
23220 this.rolloverSelectedIcon = rolloverSelectedIcon;
23221 this.firePropertyChangeObject ("rolloverSelectedIcon", oldValue, rolloverSelectedIcon);
23222 this.setRolloverEnabled (true);
23223 if (rolloverSelectedIcon !== oldValue) {
23224 if (this.isSelected ()) {
23225 this.repaint ();
23226 }}}, "javax.swing.Icon");
23227 Clazz_defineMethod (c$, "getDisabledIcon", 
23228 function () {
23229 if (this.disabledIcon == null) {
23230 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.getIcon ());
23231 if (this.disabledIcon != null) {
23232 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
23233 }}return this.disabledIcon;
23234 });
23235 Clazz_defineMethod (c$, "setDisabledIcon", 
23236 function (disabledIcon) {
23237 var oldValue = this.disabledIcon;
23238 this.disabledIcon = disabledIcon;
23239 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
23240 if (disabledIcon !== oldValue) {
23241 if (!this.isEnabled ()) {
23242 this.repaint ();
23243 }}}, "javax.swing.Icon");
23244 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
23245 function () {
23246 if (this.disabledSelectedIcon == null) {
23247 if (this.selectedIcon != null) {
23248 this.disabledSelectedIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledSelectedIcon (this, this.getSelectedIcon ());
23249 } else {
23250 return this.getDisabledIcon ();
23251 }}return this.disabledSelectedIcon;
23252 });
23253 Clazz_defineMethod (c$, "setDisabledSelectedIcon", 
23254 function (disabledSelectedIcon) {
23255 var oldValue = this.disabledSelectedIcon;
23256 this.disabledSelectedIcon = disabledSelectedIcon;
23257 this.firePropertyChangeObject ("disabledSelectedIcon", oldValue, disabledSelectedIcon);
23258 if (disabledSelectedIcon !== oldValue) {
23259 if (disabledSelectedIcon == null || oldValue == null || disabledSelectedIcon.getIconWidth () != oldValue.getIconWidth () || disabledSelectedIcon.getIconHeight () != oldValue.getIconHeight ()) {
23260 this.revalidate ();
23261 }if (!this.isEnabled () && this.isSelected ()) {
23262 this.repaint ();
23263 }}}, "javax.swing.Icon");
23264 Clazz_defineMethod (c$, "getVerticalAlignment", 
23265 function () {
23266 return this.verticalAlignment;
23267 });
23268 Clazz_defineMethod (c$, "setVerticalAlignment", 
23269 function (alignment) {
23270 if (alignment == this.verticalAlignment) return;
23271 var oldValue = this.verticalAlignment;
23272 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
23273 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
23274 this.repaint ();
23275 }, "~N");
23276 Clazz_defineMethod (c$, "getHorizontalAlignment", 
23277 function () {
23278 return this.horizontalAlignment;
23279 });
23280 Clazz_defineMethod (c$, "setHorizontalAlignment", 
23281 function (alignment) {
23282 if (alignment == this.horizontalAlignment) return;
23283 var oldValue = this.horizontalAlignment;
23284 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
23285 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
23286 this.repaint ();
23287 }, "~N");
23288 Clazz_defineMethod (c$, "getVerticalTextPosition", 
23289 function () {
23290 return this.verticalTextPosition;
23291 });
23292 Clazz_defineMethod (c$, "setVerticalTextPosition", 
23293 function (textPosition) {
23294 if (textPosition == this.verticalTextPosition) return;
23295 var oldValue = this.verticalTextPosition;
23296 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
23297 this.firePropertyChangeInt ("verticalTextPosition", oldValue, this.verticalTextPosition);
23298 this.revalidate ();
23299 this.repaint ();
23300 }, "~N");
23301 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
23302 function () {
23303 return this.horizontalTextPosition;
23304 });
23305 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
23306 function (textPosition) {
23307 if (textPosition == this.horizontalTextPosition) return;
23308 var oldValue = this.horizontalTextPosition;
23309 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
23310 this.firePropertyChangeInt ("horizontalTextPosition", oldValue, this.horizontalTextPosition);
23311 this.revalidate ();
23312 this.repaint ();
23313 }, "~N");
23314 Clazz_defineMethod (c$, "getIconTextGap", 
23315 function () {
23316 return this.iconTextGap;
23317 });
23318 Clazz_defineMethod (c$, "setIconTextGap", 
23319 function (iconTextGap) {
23320 var oldValue = this.iconTextGap;
23321 this.iconTextGap = iconTextGap;
23322 this.iconTextGapSet = true;
23323 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
23324 if (iconTextGap != oldValue) {
23325 this.revalidate ();
23326 this.repaint ();
23327 }}, "~N");
23328 Clazz_defineMethod (c$, "checkHorizontalKey", 
23329 function (key, exception) {
23330 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
23331 return key;
23332 } else {
23333 throw  new IllegalArgumentException (exception);
23334 }}, "~N,~S");
23335 Clazz_defineMethod (c$, "checkVerticalKey", 
23336 function (key, exception) {
23337 if ((key == 1) || (key == 0) || (key == 3)) {
23338 return key;
23339 } else {
23340 throw  new IllegalArgumentException (exception);
23341 }}, "~N,~S");
23342 Clazz_defineMethod (c$, "removeNotify", 
23343 function () {
23344 Clazz_superCall (this, javax.swing.AbstractButton, "removeNotify", []);
23345 if (this.isRolloverEnabled ()) {
23346 this.getModel ().setRollover (false);
23347 }});
23348 Clazz_defineMethod (c$, "setActionCommand", 
23349 function (actionCommand) {
23350 this.getModel ().setActionCommand (actionCommand);
23351 }, "~S");
23352 Clazz_defineMethod (c$, "getActionCommand", 
23353 function () {
23354 var ac = this.getModel ().getActionCommand ();
23355 if (ac == null) {
23356 ac = this.getText ();
23357 }return ac;
23358 });
23359 Clazz_defineMethod (c$, "setAction", 
23360 function (a) {
23361 var oldValue = this.getAction ();
23362 if (this.$action == null || !this.$action.equals (a)) {
23363 this.$action = a;
23364 if (oldValue != null) {
23365 this.removeActionListener (oldValue);
23366 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
23367 this.actionPropertyChangeListener = null;
23368 }this.configurePropertiesFromAction (this.$action);
23369 if (this.$action != null) {
23370 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
23371 this.addActionListener (this.$action);
23372 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
23373 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
23374 }this.firePropertyChangeObject ("action", oldValue, this.$action);
23375 }}, "javax.swing.Action");
23376 Clazz_defineMethod (c$, "isListener", 
23377  function (c, a) {
23378 var isListener = false;
23379 var listeners = this.listenerList.getListenerList ();
23380 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23381 if (listeners[i] === c && listeners[i + 1] === a) {
23382 isListener = true;
23383 }}
23384 return isListener;
23385 }, "Class,java.awt.event.ActionListener");
23386 Clazz_defineMethod (c$, "getAction", 
23387 function () {
23388 return this.$action;
23389 });
23390 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
23391 function (a) {
23392 this.setMnemonicFromAction (a);
23393 this.setTextFromAction (a, false);
23394 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
23395 this.setIconFromAction (a);
23396 this.setActionCommandFromAction (a);
23397 javax.swing.AbstractAction.setEnabledFromAction (this, a);
23398 if (javax.swing.AbstractAction.hasSelectedKey (a) && this.shouldUpdateSelectedStateFromAction ()) {
23399 this.setSelectedFromAction (a);
23400 }this.setDisplayedMnemonicIndexFromAction (a, false);
23401 }, "javax.swing.Action");
23402 Clazz_overrideMethod (c$, "clientPropertyChanged", 
23403 function (key, oldValue, newValue) {
23404 if (key === "hideActionText") {
23405 var current = (Clazz_instanceOf (newValue, Boolean)) ? newValue : false;
23406 if (this.getHideActionText () != current) {
23407 this.setHideActionText (current);
23408 }}}, "~O,~O,~O");
23409 Clazz_defineMethod (c$, "shouldUpdateSelectedStateFromAction", 
23410 function () {
23411 return false;
23412 });
23413 Clazz_defineMethod (c$, "actionPropertyChanged", 
23414 function (action, propertyName) {
23415 if (propertyName === "Name") {
23416 this.setTextFromAction (action, true);
23417 } else if (propertyName === "enabled") {
23418 javax.swing.AbstractAction.setEnabledFromAction (this, action);
23419 } else if (propertyName === "ShortDescription") {
23420 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
23421 } else if (propertyName === "SmallIcon") {
23422 this.smallIconChanged (action);
23423 } else if (propertyName === "MnemonicKey") {
23424 this.setMnemonicFromAction (action);
23425 } else if (propertyName === "ActionCommandKey") {
23426 this.setActionCommandFromAction (action);
23427 } else if (propertyName === "SwingSelectedKey" && javax.swing.AbstractAction.hasSelectedKey (action) && this.shouldUpdateSelectedStateFromAction ()) {
23428 this.setSelectedFromAction (action);
23429 } else if (propertyName === "SwingDisplayedMnemonicIndexKey") {
23430 this.setDisplayedMnemonicIndexFromAction (action, true);
23431 } else if (propertyName === "SwingLargeIconKey") {
23432 this.largeIconChanged (action);
23433 }}, "javax.swing.Action,~S");
23434 Clazz_defineMethod (c$, "setDisplayedMnemonicIndexFromAction", 
23435  function (a, fromPropertyChange) {
23436 var iValue = (a == null) ? null : a.getValue ("SwingDisplayedMnemonicIndexKey");
23437 if (fromPropertyChange || iValue != null) {
23438 var value;
23439 if (iValue == null) {
23440 value = -1;
23441 } else {
23442 value = (iValue).intValue ();
23443 var text = this.getText ();
23444 if (text == null || value >= text.length) {
23445 value = -1;
23446 }}this.setDisplayedMnemonicIndex (value);
23447 }}, "javax.swing.Action,~B");
23448 Clazz_defineMethod (c$, "setMnemonicFromAction", 
23449  function (a) {
23450 var n = (a == null) ? null : a.getValue ("MnemonicKey");
23451 this.setMnemonic ((n == null) ? '\0' : n);
23452 }, "javax.swing.Action");
23453 Clazz_defineMethod (c$, "setTextFromAction", 
23454  function (a, propertyChange) {
23455 var hideText = this.getHideActionText ();
23456 if (!propertyChange) {
23457 this.setText ((a != null && !hideText) ? a.getValue ("Name") : null);
23458 } else if (!hideText) {
23459 this.setText (a.getValue ("Name"));
23460 }}, "javax.swing.Action,~B");
23461 Clazz_defineMethod (c$, "setIconFromAction", 
23462 function (a) {
23463 var icon = null;
23464 if (a != null) {
23465 icon = a.getValue ("SwingLargeIconKey");
23466 if (icon == null) {
23467 icon = a.getValue ("SmallIcon");
23468 }}this.setIcon (icon);
23469 }, "javax.swing.Action");
23470 Clazz_defineMethod (c$, "smallIconChanged", 
23471 function (a) {
23472 if (a.getValue ("SwingLargeIconKey") == null) {
23473 this.setIconFromAction (a);
23474 }}, "javax.swing.Action");
23475 Clazz_defineMethod (c$, "largeIconChanged", 
23476 function (a) {
23477 this.setIconFromAction (a);
23478 }, "javax.swing.Action");
23479 Clazz_defineMethod (c$, "setActionCommandFromAction", 
23480  function (a) {
23481 this.setActionCommand ((a != null) ? a.getValue ("ActionCommandKey") : null);
23482 }, "javax.swing.Action");
23483 Clazz_defineMethod (c$, "setSelectedFromAction", 
23484  function (a) {
23485 var selected = false;
23486 if (a != null) {
23487 selected = javax.swing.AbstractAction.isSelected (a);
23488 }if (selected != this.isSelected ()) {
23489 this.setSelected (selected);
23490 if (!selected && this.isSelected ()) {
23491 if (Clazz_instanceOf (this.getModel (), javax.swing.DefaultButtonModel)) {
23492 var group = (this.getModel ()).getGroup ();
23493 if (group != null) {
23494 group.clearSelection ();
23495 }}}}}, "javax.swing.Action");
23496 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
23497 function (a) {
23498 return this.createActionPropertyChangeListener0 (a);
23499 }, "javax.swing.Action");
23500 Clazz_defineMethod (c$, "createActionPropertyChangeListener0", 
23501 function (a) {
23502 return  new javax.swing.AbstractButton.ButtonActionPropertyChangeListener (this, a);
23503 }, "javax.swing.Action");
23504 Clazz_defineMethod (c$, "isBorderPainted", 
23505 function () {
23506 return this.$paintBorder;
23507 });
23508 Clazz_defineMethod (c$, "setBorderPainted", 
23509 function (b) {
23510 var oldValue = this.$paintBorder;
23511 this.$paintBorder = b;
23512 this.borderPaintedSet = true;
23513 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
23514 if (b != oldValue) {
23515 this.revalidate ();
23516 this.repaint ();
23517 }}, "~B");
23518 Clazz_defineMethod (c$, "paintBorder", 
23519 function (g) {
23520 if (this.isBorderPainted ()) {
23521 Clazz_superCall (this, javax.swing.AbstractButton, "paintBorder", [g]);
23522 }}, "java.awt.Graphics");
23523 Clazz_defineMethod (c$, "isFocusPainted", 
23524 function () {
23525 return this.paintFocus;
23526 });
23527 Clazz_defineMethod (c$, "setFocusPainted", 
23528 function (b) {
23529 var oldValue = this.paintFocus;
23530 this.paintFocus = b;
23531 this.firePropertyChangeBool ("focusPainted", oldValue, this.paintFocus);
23532 if (b != oldValue && this.isFocusOwner ()) {
23533 this.revalidate ();
23534 this.repaint ();
23535 }}, "~B");
23536 Clazz_defineMethod (c$, "isContentAreaFilled", 
23537 function () {
23538 return this.contentAreaFilled;
23539 });
23540 Clazz_defineMethod (c$, "setContentAreaFilled", 
23541 function (b) {
23542 var oldValue = this.contentAreaFilled;
23543 this.contentAreaFilled = b;
23544 this.contentAreaFilledSet = true;
23545 this.firePropertyChangeBool ("contentAreaFilled", oldValue, this.contentAreaFilled);
23546 if (b != oldValue) {
23547 this.repaint ();
23548 }}, "~B");
23549 Clazz_defineMethod (c$, "isRolloverEnabled", 
23550 function () {
23551 return this.rolloverEnabled;
23552 });
23553 Clazz_defineMethod (c$, "setRolloverEnabled", 
23554 function (b) {
23555 var oldValue = this.rolloverEnabled;
23556 this.rolloverEnabled = b;
23557 this.rolloverEnabledSet = true;
23558 this.firePropertyChangeBool ("rolloverEnabled", oldValue, this.rolloverEnabled);
23559 if (b != oldValue) {
23560 this.repaint ();
23561 }}, "~B");
23562 Clazz_defineMethod (c$, "getMnemonic", 
23563 function () {
23564 return this.mnemonic;
23565 });
23566 Clazz_defineMethod (c$, "setMnemonic", 
23567 function (mnemonic) {
23568 this.model.setMnemonic (mnemonic);
23569 this.updateMnemonicProperties ();
23570 }, "~N");
23571 Clazz_defineMethod (c$, "setMnemonic", 
23572 function (mnemonic) {
23573 var vk = (mnemonic).charCodeAt (0);
23574 if (vk >= 97 && vk <= 122) vk -= (32);
23575 this.setMnemonic (vk);
23576 }, "~S");
23577 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
23578 function (index) {
23579 var oldValue = this.mnemonicIndex;
23580 if (index == -1) {
23581 this.mnemonicIndex = -1;
23582 } else {
23583 var text = this.getText ();
23584 var textLength = (text == null) ? 0 : text.length;
23585 if (index < -1 || index >= textLength) {
23586 throw  new IllegalArgumentException ("index == " + index);
23587 }}this.mnemonicIndex = index;
23588 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
23589 if (index != oldValue) {
23590 this.revalidate ();
23591 this.repaint ();
23592 }}, "~N");
23593 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
23594 function () {
23595 return this.mnemonicIndex;
23596 });
23597 Clazz_defineMethod (c$, "updateDisplayedMnemonicIndex", 
23598  function (text, mnemonic) {
23599 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, mnemonic));
23600 }, "~S,~N");
23601 Clazz_defineMethod (c$, "updateMnemonicProperties", 
23602  function () {
23603 var newMnemonic = this.model.getMnemonic ();
23604 if (this.mnemonic != newMnemonic) {
23605 var oldValue = this.mnemonic;
23606 this.mnemonic = newMnemonic;
23607 this.firePropertyChangeInt ("mnemonic", oldValue, this.mnemonic);
23608 this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23609 this.revalidate ();
23610 this.repaint ();
23611 }});
23612 Clazz_defineMethod (c$, "setMultiClickThreshhold", 
23613 function (threshhold) {
23614 if (threshhold < 0) {
23615 throw  new IllegalArgumentException ("threshhold must be >= 0");
23616 }this.multiClickThreshhold = threshhold;
23617 }, "~N");
23618 Clazz_defineMethod (c$, "getMultiClickThreshhold", 
23619 function () {
23620 return this.multiClickThreshhold;
23621 });
23622 Clazz_defineMethod (c$, "getModel", 
23623 function () {
23624 return this.model;
23625 });
23626 Clazz_defineMethod (c$, "setModel", 
23627 function (newModel) {
23628 var oldModel = this.getModel ();
23629 if (oldModel != null) {
23630 oldModel.removeChangeListener (this.changeListener);
23631 oldModel.removeActionListener (this.actionListener);
23632 oldModel.removeItemListener (this.itemListener);
23633 this.changeListener = null;
23634 this.actionListener = null;
23635 this.itemListener = null;
23636 }this.model = newModel;
23637 if (newModel != null) {
23638 this.changeListener = this.createChangeListener ();
23639 this.actionListener = this.createActionListener ();
23640 this.itemListener = this.createItemListener ();
23641 newModel.addChangeListener (this.changeListener);
23642 newModel.addActionListener (this.actionListener);
23643 newModel.addItemListener (this.itemListener);
23644 this.updateMnemonicProperties ();
23645 Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [newModel.isEnabled ()]);
23646 } else {
23647 this.mnemonic = 0;
23648 }this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23649 this.firePropertyChangeObject ("model", oldModel, newModel);
23650 if (newModel !== oldModel) {
23651 this.revalidate ();
23652 this.repaint ();
23653 }}, "javax.swing.ButtonModel");
23654 Clazz_overrideMethod (c$, "getUI", 
23655 function () {
23656 return this.ui;
23657 });
23658 Clazz_defineMethod (c$, "setUI", 
23659 function (ui) {
23660 Clazz_superCall (this, javax.swing.AbstractButton, "setUI", [ui]);
23661 if (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource)) {
23662 this.setDisabledIcon (null);
23663 }if (Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23664 this.setDisabledSelectedIcon (null);
23665 }}, "javax.swing.plaf.ButtonUI");
23666 Clazz_overrideMethod (c$, "updateUI", 
23667 function () {
23668 });
23669 Clazz_overrideMethod (c$, "addImpl", 
23670 function (comp, constraints, index) {
23671 if (!this.$setLayout) {
23672 this.setLayout ( new javax.swing.OverlayLayout (this));
23673 }return this.addImplSAEM (comp, constraints, index);
23674 }, "java.awt.Component,~O,~N");
23675 Clazz_defineMethod (c$, "setLayout", 
23676 function (mgr) {
23677 this.$setLayout = true;
23678 Clazz_superCall (this, javax.swing.AbstractButton, "setLayout", [mgr]);
23679 }, "java.awt.LayoutManager");
23680 Clazz_defineMethod (c$, "addChangeListener", 
23681 function (l) {
23682 this.listenerList.add (javax.swing.event.ChangeListener, l);
23683 }, "javax.swing.event.ChangeListener");
23684 Clazz_defineMethod (c$, "removeChangeListener", 
23685 function (l) {
23686 this.listenerList.remove (javax.swing.event.ChangeListener, l);
23687 }, "javax.swing.event.ChangeListener");
23688 Clazz_defineMethod (c$, "getChangeListeners", 
23689 function () {
23690 return (this.listenerList.getListeners (javax.swing.event.ChangeListener));
23691 });
23692 Clazz_defineMethod (c$, "fireStateChanged", 
23693 function () {
23694 var listeners = this.listenerList.getListenerList ();
23695 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23696 if (listeners[i] === javax.swing.event.ChangeListener) {
23697 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
23698 (listeners[i + 1]).stateChanged (this.changeEvent);
23699 }}
23700 });
23701 Clazz_defineMethod (c$, "addActionListener", 
23702 function (l) {
23703 this.listenerList.add (java.awt.event.ActionListener, l);
23704 }, "java.awt.event.ActionListener");
23705 Clazz_defineMethod (c$, "removeActionListener", 
23706 function (l) {
23707 if ((l != null) && (this.getAction () === l)) {
23708 this.setAction (null);
23709 } else {
23710 this.listenerList.remove (java.awt.event.ActionListener, l);
23711 }}, "java.awt.event.ActionListener");
23712 Clazz_defineMethod (c$, "getActionListeners", 
23713 function () {
23714 return (this.listenerList.getListeners (java.awt.event.ActionListener));
23715 });
23716 Clazz_defineMethod (c$, "createChangeListener", 
23717 function () {
23718 return this.getHandler ();
23719 });
23720 Clazz_defineMethod (c$, "fireActionPerformed", 
23721 function (event) {
23722 var listeners = this.listenerList.getListenerList ();
23723 var e = null;
23724 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23725 if (listeners[i] === java.awt.event.ActionListener) {
23726 if (e == null) {
23727 var actionCommand = event.getActionCommand ();
23728 if (actionCommand == null) {
23729 actionCommand = this.getActionCommand ();
23730 }e =  new java.awt.event.ActionEvent (this, 1001, actionCommand, event.getWhen (), event.getModifiers ());
23731 }(listeners[i + 1]).actionPerformed (e);
23732 }}
23733 }, "java.awt.event.ActionEvent");
23734 Clazz_defineMethod (c$, "fireItemStateChanged", 
23735 function (event) {
23736 var listeners = this.listenerList.getListenerList ();
23737 var e = null;
23738 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23739 if (listeners[i] === java.awt.event.ItemListener) {
23740 if (e == null) {
23741 e =  new java.awt.event.ItemEvent (this, 701, this, event.getStateChange ());
23742 }(listeners[i + 1]).itemStateChanged (e);
23743 }}
23744 }, "java.awt.event.ItemEvent");
23745 Clazz_defineMethod (c$, "createActionListener", 
23746 function () {
23747 return this.getHandler ();
23748 });
23749 Clazz_defineMethod (c$, "createItemListener", 
23750 function () {
23751 return this.getHandler ();
23752 });
23753 Clazz_defineMethod (c$, "setEnabled", 
23754 function (b) {
23755 if (!b && this.model.isRollover ()) {
23756 this.model.setRollover (false);
23757 }Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [b]);
23758 this.model.setEnabled (b);
23759 }, "~B");
23760 Clazz_defineMethod (c$, "getLabel", 
23761 function () {
23762 return this.getText ();
23763 });
23764 Clazz_defineMethod (c$, "setLabel", 
23765 function (label) {
23766 this.setText (label);
23767 }, "~S");
23768 Clazz_overrideMethod (c$, "addItemListener", 
23769 function (l) {
23770 this.listenerList.add (java.awt.event.ItemListener, l);
23771 }, "java.awt.event.ItemListener");
23772 Clazz_overrideMethod (c$, "removeItemListener", 
23773 function (l) {
23774 this.listenerList.remove (java.awt.event.ItemListener, l);
23775 }, "java.awt.event.ItemListener");
23776 Clazz_defineMethod (c$, "getItemListeners", 
23777 function () {
23778 return this.listenerList.getListeners (java.awt.event.ItemListener);
23779 });
23780 Clazz_overrideMethod (c$, "getSelectedObjects", 
23781 function () {
23782 if (this.isSelected () == false) {
23783 return null;
23784 }var selectedObjects =  new Array (1);
23785 selectedObjects[0] = this.getText ();
23786 return selectedObjects;
23787 });
23788 Clazz_defineMethod (c$, "init", 
23789 function (text, icon) {
23790 if (text != null) {
23791 this.setText (text);
23792 }if (icon != null) {
23793 this.setIcon (icon);
23794 }this.updateUI ();
23795 this.setAlignmentX (0.0);
23796 this.setAlignmentY (0.5);
23797 }, "~S,javax.swing.Icon");
23798 Clazz_defineMethod (c$, "imageUpdate", 
23799 function (img, infoflags, x, y, w, h) {
23800 var iconDisplayed = this.getIcon ();
23801 if (iconDisplayed == null) {
23802 return false;
23803 }if (!this.model.isEnabled ()) {
23804 if (this.model.isSelected ()) {
23805 iconDisplayed = this.getDisabledSelectedIcon ();
23806 } else {
23807 iconDisplayed = this.getDisabledIcon ();
23808 }} else if (this.model.isPressed () && this.model.isArmed ()) {
23809 iconDisplayed = this.getPressedIcon ();
23810 } else if (this.isRolloverEnabled () && this.model.isRollover ()) {
23811 if (this.model.isSelected ()) {
23812 iconDisplayed = this.getRolloverSelectedIcon ();
23813 } else {
23814 iconDisplayed = this.getRolloverIcon ();
23815 }} else if (this.model.isSelected ()) {
23816 iconDisplayed = this.getSelectedIcon ();
23817 }if (!javax.swing.SwingUtilities.doesIconReferenceImage (iconDisplayed, img)) {
23818 return false;
23819 }return Clazz_superCall (this, javax.swing.AbstractButton, "imageUpdate", [img, infoflags, x, y, w, h]);
23820 }, "java.awt.Image,~N,~N,~N,~N,~N");
23821 Clazz_defineMethod (c$, "setUIProperty", 
23822 function (propertyName, value) {
23823 if (propertyName === "borderPainted") {
23824 if (!this.borderPaintedSet) {
23825 this.setBorderPainted ((value).booleanValue ());
23826 this.borderPaintedSet = false;
23827 }} else if (propertyName === "rolloverEnabled") {
23828 if (!this.rolloverEnabledSet) {
23829 this.setRolloverEnabled ((value).booleanValue ());
23830 this.rolloverEnabledSet = false;
23831 }} else if (propertyName === "iconTextGap") {
23832 if (!this.iconTextGapSet) {
23833 this.setIconTextGap ((value).intValue ());
23834 this.iconTextGapSet = false;
23835 }} else if (propertyName === "contentAreaFilled") {
23836 if (!this.contentAreaFilledSet) {
23837 this.setContentAreaFilled ((value).booleanValue ());
23838 this.contentAreaFilledSet = false;
23839 }} else {
23840 Clazz_superCall (this, javax.swing.AbstractButton, "setUIProperty", [propertyName, value]);
23841 }}, "~S,~O");
23842 Clazz_defineMethod (c$, "paramString", 
23843 function () {
23844 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
23845 var pressedIconString = ((this.pressedIcon != null) && (this.pressedIcon !== this) ? this.pressedIcon.toString () : "");
23846 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
23847 var selectedIconString = ((this.selectedIcon != null) && (this.selectedIcon !== this) ? this.selectedIcon.toString () : "");
23848 var disabledSelectedIconString = ((this.disabledSelectedIcon != null) && (this.disabledSelectedIcon !== this) ? this.disabledSelectedIcon.toString () : "");
23849 var rolloverIconString = ((this.rolloverIcon != null) && (this.rolloverIcon !== this) ? this.rolloverIcon.toString () : "");
23850 var rolloverSelectedIconString = ((this.rolloverSelectedIcon != null) && (this.rolloverSelectedIcon !== this) ? this.rolloverSelectedIcon.toString () : "");
23851 var paintBorderString = (this.$paintBorder ? "true" : "false");
23852 var paintFocusString = (this.paintFocus ? "true" : "false");
23853 var rolloverEnabledString = (this.rolloverEnabled ? "true" : "false");
23854 return Clazz_superCall (this, javax.swing.AbstractButton, "paramString", []) + ",defaultIcon=" + defaultIconString + ",disabledIcon=" + disabledIconString + ",disabledSelectedIcon=" + disabledSelectedIconString + ",margin=" + this.margin + ",paintBorder=" + paintBorderString + ",paintFocus=" + paintFocusString + ",pressedIcon=" + pressedIconString + ",rolloverEnabled=" + rolloverEnabledString + ",rolloverIcon=" + rolloverIconString + ",rolloverSelectedIcon=" + rolloverSelectedIconString + ",selectedIcon=" + selectedIconString + ",text=" + this.text;
23855 });
23856 Clazz_defineMethod (c$, "getHandler", 
23857  function () {
23858 if (this.handler == null) {
23859 this.handler = Clazz_innerTypeInstance (javax.swing.AbstractButton.Handler, this, null);
23860 }return this.handler;
23861 });
23862 c$.$AbstractButton$ButtonChangeListener$ = function () {
23863 Clazz_pu$h(self.c$);
23864 c$ = Clazz_decorateAsClass (function () {
23865 Clazz_prepareCallback (this, arguments);
23866 Clazz_instantialize (this, arguments);
23867 }, javax.swing.AbstractButton, "ButtonChangeListener", null, javax.swing.event.ChangeListener);
23868 Clazz_makeConstructor (c$, 
23869 function () {
23870 });
23871 Clazz_overrideMethod (c$, "stateChanged", 
23872 function (a) {
23873 this.b$["javax.swing.AbstractButton"].getHandler ().stateChanged (a);
23874 }, "javax.swing.event.ChangeEvent");
23875 c$ = Clazz_p0p ();
23876 };
23877 c$.$AbstractButton$Handler$ = function () {
23878 Clazz_pu$h(self.c$);
23879 c$ = Clazz_decorateAsClass (function () {
23880 Clazz_prepareCallback (this, arguments);
23881 Clazz_instantialize (this, arguments);
23882 }, javax.swing.AbstractButton, "Handler", null, [java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.awt.event.ItemListener]);
23883 Clazz_overrideMethod (c$, "stateChanged", 
23884 function (a) {
23885 this.b$["javax.swing.AbstractButton"].updateMnemonicProperties ();
23886 if (this.b$["javax.swing.AbstractButton"].isEnabled () != this.b$["javax.swing.AbstractButton"].model.isEnabled ()) {
23887 this.b$["javax.swing.AbstractButton"].setEnabled (this.b$["javax.swing.AbstractButton"].model.isEnabled ());
23888 }this.b$["javax.swing.AbstractButton"].fireStateChanged ();
23889 this.b$["javax.swing.AbstractButton"].repaint ();
23890 }, "javax.swing.event.ChangeEvent");
23891 Clazz_overrideMethod (c$, "actionPerformed", 
23892 function (a) {
23893 this.b$["javax.swing.AbstractButton"].fireActionPerformed (a);
23894 }, "java.awt.event.ActionEvent");
23895 Clazz_overrideMethod (c$, "itemStateChanged", 
23896 function (a) {
23897 this.b$["javax.swing.AbstractButton"].fireItemStateChanged (a);
23898 if (this.b$["javax.swing.AbstractButton"].shouldUpdateSelectedStateFromAction ()) {
23899 var b = this.b$["javax.swing.AbstractButton"].getAction ();
23900 if (b != null && javax.swing.AbstractAction.hasSelectedKey (b)) {
23901 var c = this.b$["javax.swing.AbstractButton"].isSelected ();
23902 var d = javax.swing.AbstractAction.isSelected (b);
23903 if (d != c) {
23904 b.putValue ("SwingSelectedKey", new Boolean (c));
23905 }}}}, "java.awt.event.ItemEvent");
23906 c$ = Clazz_p0p ();
23907 };
23908 Clazz_pu$h(self.c$);
23909 c$ = Clazz_declareType (javax.swing.AbstractButton, "ButtonActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
23910 Clazz_overrideMethod (c$, "actionPropertyChanged", 
23911 function (a, b, c) {
23912 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
23913 a.configurePropertiesFromAction (b);
23914 } else {
23915 a.actionPropertyChanged (b, c.getPropertyName ());
23916 }}, "javax.swing.AbstractButton,javax.swing.Action,java.beans.PropertyChangeEvent");
23917 c$ = Clazz_p0p ();
23918 Clazz_defineStatics (c$,
23919 "MODEL_CHANGED_PROPERTY", "model",
23920 "TEXT_CHANGED_PROPERTY", "text",
23921 "MNEMONIC_CHANGED_PROPERTY", "mnemonic",
23922 "MARGIN_CHANGED_PROPERTY", "margin",
23923 "VERTICAL_ALIGNMENT_CHANGED_PROPERTY", "verticalAlignment",
23924 "HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY", "horizontalAlignment",
23925 "VERTICAL_TEXT_POSITION_CHANGED_PROPERTY", "verticalTextPosition",
23926 "HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY", "horizontalTextPosition",
23927 "BORDER_PAINTED_CHANGED_PROPERTY", "borderPainted",
23928 "FOCUS_PAINTED_CHANGED_PROPERTY", "focusPainted",
23929 "ROLLOVER_ENABLED_CHANGED_PROPERTY", "rolloverEnabled",
23930 "CONTENT_AREA_FILLED_CHANGED_PROPERTY", "contentAreaFilled",
23931 "ICON_CHANGED_PROPERTY", "icon",
23932 "PRESSED_ICON_CHANGED_PROPERTY", "pressedIcon",
23933 "SELECTED_ICON_CHANGED_PROPERTY", "selectedIcon",
23934 "ROLLOVER_ICON_CHANGED_PROPERTY", "rolloverIcon",
23935 "ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY", "rolloverSelectedIcon",
23936 "DISABLED_ICON_CHANGED_PROPERTY", "disabledIcon",
23937 "DISABLED_SELECTED_ICON_CHANGED_PROPERTY", "disabledSelectedIcon");
23938 });
23939 Clazz_declarePackage ("javax.swing");
23940 Clazz_load (null, "javax.swing.ArrayTable", ["java.util.Hashtable"], function () {
23941 c$ = Clazz_decorateAsClass (function () {
23942 this.table = null;
23943 Clazz_instantialize (this, arguments);
23944 }, javax.swing, "ArrayTable", null, Cloneable);
23945 Clazz_makeConstructor (c$, 
23946 function () {
23947 });
23948 Clazz_defineMethod (c$, "put", 
23949 function (key, value) {
23950 if (this.table == null) {
23951 this.table =  Clazz_newArray (-1, [key, value]);
23952 } else {
23953 var size = this.size ();
23954 if (size < 8) {
23955 if (this.containsKey (key)) {
23956 var tmp = this.table;
23957 for (var i = 0; i < tmp.length - 1; i += 2) {
23958 if (tmp[i].equals (key)) {
23959 tmp[i + 1] = value;
23960 break;
23961 }}
23962 } else {
23963 var array = this.table;
23964 var i = array.length;
23965 var tmp =  new Array (i + 2);
23966 System.arraycopy (array, 0, tmp, 0, i);
23967 tmp[i] = key;
23968 tmp[i + 1] = value;
23969 this.table = tmp;
23970 }} else {
23971 if ((size == 8) && this.isArray ()) {
23972 this.grow ();
23973 }(this.table).put (key, value);
23974 }}}, "~O,~O");
23975 Clazz_defineMethod (c$, "get", 
23976 function (key) {
23977 var value = null;
23978 if (this.table != null) {
23979 if (this.isArray ()) {
23980 var array = this.table;
23981 for (var i = 0; i < array.length - 1; i += 2) {
23982 if (array[i].equals (key)) {
23983 value = array[i + 1];
23984 break;
23985 }}
23986 } else {
23987 value = (this.table).get (key);
23988 }}return value;
23989 }, "~O");
23990 Clazz_defineMethod (c$, "size", 
23991 function () {
23992 var size;
23993 if (this.table == null) return 0;
23994 if (this.isArray ()) {
23995 size = Clazz_doubleToInt ((this.table).length / 2);
23996 } else {
23997 size = (this.table).size ();
23998 }return size;
23999 });
24000 Clazz_defineMethod (c$, "containsKey", 
24001 function (key) {
24002 var contains = false;
24003 if (this.table != null) {
24004 if (this.isArray ()) {
24005 var array = this.table;
24006 for (var i = 0; i < array.length - 1; i += 2) {
24007 if (array[i].equals (key)) {
24008 contains = true;
24009 break;
24010 }}
24011 } else {
24012 contains = (this.table).containsKey (key);
24013 }}return contains;
24014 }, "~O");
24015 Clazz_defineMethod (c$, "remove", 
24016 function (key) {
24017 var value = null;
24018 if (key == null) {
24019 return null;
24020 }if (this.table != null) {
24021 if (this.isArray ()) {
24022 var index = -1;
24023 var array = this.table;
24024 for (var i = array.length - 2; i >= 0; i -= 2) {
24025 if (array[i].equals (key)) {
24026 index = i;
24027 value = array[i + 1];
24028 break;
24029 }}
24030 if (index != -1) {
24031 var tmp =  new Array (array.length - 2);
24032 System.arraycopy (array, 0, tmp, 0, index);
24033 if (index < tmp.length) System.arraycopy (array, index + 2, tmp, index, tmp.length - index);
24034 this.table = (tmp.length == 0) ? null : tmp;
24035 }} else {
24036 value = (this.table).remove (key);
24037 }if (this.size () == 7 && !this.isArray ()) {
24038 this.shrink ();
24039 }}return value;
24040 }, "~O");
24041 Clazz_defineMethod (c$, "clear", 
24042 function () {
24043 this.table = null;
24044 });
24045 Clazz_overrideMethod (c$, "clone", 
24046 function () {
24047 var newArrayTable =  new javax.swing.ArrayTable ();
24048 if (this.isArray ()) {
24049 var array = this.table;
24050 for (var i = 0; i < array.length - 1; i += 2) {
24051 newArrayTable.put (array[i], array[i + 1]);
24052 }
24053 } else {
24054 var tmp = this.table;
24055 var keys = tmp.keys ();
24056 while (keys.hasMoreElements ()) {
24057 var o = keys.nextElement ();
24058 newArrayTable.put (o, tmp.get (o));
24059 }
24060 }return newArrayTable;
24061 });
24062 Clazz_defineMethod (c$, "getKeys", 
24063 function (keys) {
24064 if (this.table == null) {
24065 return null;
24066 }if (this.isArray ()) {
24067 var array = this.table;
24068 if (keys == null) {
24069 keys =  new Array (Clazz_doubleToInt (array.length / 2));
24070 }for (var i = 0, index = 0; i < array.length - 1; i += 2, index++) {
24071 keys[index] = array[i];
24072 }
24073 } else {
24074 var tmp = this.table;
24075 var enum_ = tmp.keys ();
24076 var counter = tmp.size ();
24077 if (keys == null) {
24078 keys =  new Array (counter);
24079 }while (counter > 0) {
24080 keys[--counter] = enum_.nextElement ();
24081 }
24082 }return keys;
24083 }, "~A");
24084 Clazz_defineMethod (c$, "isArray", 
24085  function () {
24086 return (Clazz_instanceOf (this.table, Array));
24087 });
24088 Clazz_defineMethod (c$, "grow", 
24089  function () {
24090 var array = this.table;
24091 var tmp =  new java.util.Hashtable (Clazz_doubleToInt (array.length / 2));
24092 for (var i = 0; i < array.length; i += 2) {
24093 tmp.put (array[i], array[i + 1]);
24094 }
24095 this.table = tmp;
24096 });
24097 Clazz_defineMethod (c$, "shrink", 
24098  function () {
24099 var tmp = this.table;
24100 var array =  new Array (tmp.size () * 2);
24101 var keys = tmp.keys ();
24102 var j = 0;
24103 while (keys.hasMoreElements ()) {
24104 var o = keys.nextElement ();
24105 array[j] = o;
24106 array[j + 1] = tmp.get (o);
24107 j += 2;
24108 }
24109 this.table = array;
24110 });
24111 Clazz_defineStatics (c$,
24112 "ARRAY_BOUNDARY", 8);
24113 });
24114 Clazz_declarePackage ("javax.swing.event");
24115 Clazz_load (["java.beans.PropertyChangeSupport"], "javax.swing.event.SwingPropertyChangeSupport", ["java.lang.NullPointerException", "javax.swing.SwingUtilities"], function () {
24116 c$ = Clazz_decorateAsClass (function () {
24117 this.notifyOnEDT = false;
24118 Clazz_instantialize (this, arguments);
24119 }, javax.swing.event, "SwingPropertyChangeSupport", java.beans.PropertyChangeSupport);
24120 Clazz_makeConstructor (c$, 
24121 function (sourceBean) {
24122 this.construct (sourceBean, false);
24123 }, "~O");
24124 Clazz_makeConstructor (c$, 
24125 function (sourceBean, notifyOnEDT) {
24126 Clazz_superConstructor (this, javax.swing.event.SwingPropertyChangeSupport, [sourceBean]);
24127 this.notifyOnEDT = notifyOnEDT;
24128 }, "~O,~B");
24129 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
24130 function (evt) {
24131 if (evt == null) {
24132 throw  new NullPointerException ();
24133 }if (!this.isNotifyOnEDT () || javax.swing.SwingUtilities.isEventDispatchThread ()) {
24134 Clazz_superCall (this, javax.swing.event.SwingPropertyChangeSupport, "firePropertyChangeEvt", [evt]);
24135 } else {
24136 javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("javax.swing.event.SwingPropertyChangeSupport$1") ? 0 : javax.swing.event.SwingPropertyChangeSupport.$SwingPropertyChangeSupport$1$ ()), Clazz_innerTypeInstance (javax.swing.event.SwingPropertyChangeSupport$1, this, Clazz_cloneFinals ("evt", evt))));
24137 }}, "java.beans.PropertyChangeEvent");
24138 Clazz_defineMethod (c$, "isNotifyOnEDT", 
24139 function () {
24140 return this.notifyOnEDT;
24141 });
24142 c$.$SwingPropertyChangeSupport$1$ = function () {
24143 Clazz_pu$h(self.c$);
24144 c$ = Clazz_declareAnonymous (javax.swing.event, "SwingPropertyChangeSupport$1", null, Runnable);
24145 Clazz_overrideMethod (c$, "run", 
24146 function () {
24147 this.b$["javax.swing.event.SwingPropertyChangeSupport"].firePropertyChangeEvt (this.f$.evt);
24148 });
24149 c$ = Clazz_p0p ();
24150 };
24151 });
24152 Clazz_declarePackage ("javax.swing");
24153 Clazz_load (["javax.swing.JComponent"], "javax.swing.JLayeredPane", ["java.util.ArrayList", "$.Hashtable", "java.awt.Color"], function () {
24154 c$ = Clazz_decorateAsClass (function () {
24155 this.componentToLayer = null;
24156 this.optimizedDrawingPossible = true;
24157 Clazz_instantialize (this, arguments);
24158 }, javax.swing, "JLayeredPane", javax.swing.JComponent);
24159 Clazz_makeConstructor (c$, 
24160 function () {
24161 Clazz_superConstructor (this, javax.swing.JLayeredPane, []);
24162 this.setLayout (null);
24163 });
24164 Clazz_defineMethod (c$, "validateOptimizedDrawing", 
24165  function () {
24166 var layeredComponentFound = false;
24167 {
24168 var layer = null;
24169 for (var c, $c = 0, $$c = this.getComponents (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
24170 layer = null;
24171 if ((Clazz_instanceOf (c, javax.swing.JComponent) && (layer = (c).getClientProperty ("layeredContainerLayer")) != null)) {
24172 if (layer != null && layer.equals (javax.swing.JLayeredPane.FRAME_CONTENT_LAYER)) continue;
24173 layeredComponentFound = true;
24174 break;
24175 }}
24176 }if (layeredComponentFound) this.optimizedDrawingPossible = false;
24177  else this.optimizedDrawingPossible = true;
24178 });
24179 Clazz_overrideMethod (c$, "addImpl", 
24180 function (comp, constraints, index) {
24181 var layer = javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24182 var pos;
24183 if (Clazz_instanceOf (constraints, Integer)) {
24184 layer = (constraints).intValue ();
24185 this.setLayer (comp, layer);
24186 } else layer = this.getLayer (comp);
24187 pos = this.insertIndexForLayer (layer, index);
24188 this.addImplSAEM (comp, constraints, pos);
24189 comp.validate ();
24190 comp.repaint ();
24191 this.validateOptimizedDrawing ();
24192 return comp;
24193 }, "java.awt.Component,~O,~N");
24194 Clazz_defineMethod (c$, "remove", 
24195 function (index) {
24196 var c = this.getComponent (index);
24197 Clazz_superCall (this, javax.swing.JLayeredPane, "remove", [index]);
24198 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24199 this.getComponentToLayer ().remove (c);
24200 }this.validateOptimizedDrawing ();
24201 }, "~N");
24202 Clazz_defineMethod (c$, "removeAll", 
24203 function () {
24204 var children = this.getComponents ();
24205 var cToL = this.getComponentToLayer ();
24206 for (var counter = children.length - 1; counter >= 0; counter--) {
24207 var c = children[counter];
24208 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24209 cToL.remove (c);
24210 }}
24211 Clazz_superCall (this, javax.swing.JLayeredPane, "removeAll", []);
24212 });
24213 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
24214 function () {
24215 return this.optimizedDrawingPossible;
24216 });
24217 c$.putLayer = Clazz_defineMethod (c$, "putLayer", 
24218 function (c, layer) {
24219 var layerObj;
24220 layerObj =  new Integer (layer);
24221 c.putClientProperty ("layeredContainerLayer", layerObj);
24222 }, "javax.swing.JComponent,~N");
24223 c$.getLayer = Clazz_defineMethod (c$, "getLayer", 
24224 function (c) {
24225 var i;
24226 if ((i = c.getClientProperty ("layeredContainerLayer")) != null) return i.intValue ();
24227 return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24228 }, "javax.swing.JComponent");
24229 c$.getLayeredPaneAbove = Clazz_defineMethod (c$, "getLayeredPaneAbove", 
24230 function (c) {
24231 if (c == null) return null;
24232 var parent = c.getParent ();
24233 while (parent != null && !(Clazz_instanceOf (parent, javax.swing.JLayeredPane))) parent = parent.getParent ();
24234
24235 return parent;
24236 }, "java.awt.Component");
24237 Clazz_defineMethod (c$, "setLayer", 
24238 function (c, layer) {
24239 this.setLayer (c, layer, -1);
24240 }, "java.awt.Component,~N");
24241 Clazz_defineMethod (c$, "setLayer", 
24242 function (c, layer, position) {
24243 var layerObj;
24244 layerObj = this.getObjectForLayer (layer);
24245 if (layer == this.getLayer (c) && position == this.getPosition (c)) {
24246 this.repaint (c.getBounds ());
24247 return;
24248 }if (Clazz_instanceOf (c, javax.swing.JComponent)) (c).putClientProperty ("layeredContainerLayer", layerObj);
24249  else this.getComponentToLayer ().put (c, layerObj);
24250 if (c.getParent () == null || c.getParent () !== this) {
24251 this.repaint (c.getBounds ());
24252 return;
24253 }var index = this.insertIndexForLayer (c, layer, position);
24254 this.setComponentZOrder (c, index);
24255 this.repaint (c.getBounds ());
24256 }, "java.awt.Component,~N,~N");
24257 Clazz_defineMethod (c$, "getLayer", 
24258 function (c) {
24259 var i;
24260 if (Clazz_instanceOf (c, javax.swing.JComponent)) i = (c).getClientProperty ("layeredContainerLayer");
24261  else i = this.getComponentToLayer ().get (c);
24262 if (i == null) return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24263 return i.intValue ();
24264 }, "java.awt.Component");
24265 Clazz_defineMethod (c$, "getIndexOf", 
24266 function (c) {
24267 var i;
24268 var count;
24269 count = this.getComponentCount ();
24270 for (i = 0; i < count; i++) {
24271 if (c === this.getComponent (i)) return i;
24272 }
24273 return -1;
24274 }, "java.awt.Component");
24275 Clazz_defineMethod (c$, "moveToFront", 
24276 function (c) {
24277 this.setPosition (c, 0);
24278 }, "java.awt.Component");
24279 Clazz_defineMethod (c$, "moveToBack", 
24280 function (c) {
24281 this.setPosition (c, -1);
24282 }, "java.awt.Component");
24283 Clazz_defineMethod (c$, "setPosition", 
24284 function (c, position) {
24285 this.setLayer (c, this.getLayer (c), position);
24286 }, "java.awt.Component,~N");
24287 Clazz_defineMethod (c$, "getPosition", 
24288 function (c) {
24289 var i;
24290 var count;
24291 var startLayer;
24292 var curLayer;
24293 var startLocation;
24294 var pos = 0;
24295 count = this.getComponentCount ();
24296 startLocation = this.getIndexOf (c);
24297 if (startLocation == -1) return -1;
24298 startLayer = this.getLayer (c);
24299 for (i = startLocation - 1; i >= 0; i--) {
24300 curLayer = this.getLayer (this.getComponent (i));
24301 if (curLayer == startLayer) pos++;
24302  else return pos;
24303 }
24304 return pos;
24305 }, "java.awt.Component");
24306 Clazz_defineMethod (c$, "highestLayer", 
24307 function () {
24308 if (this.getComponentCount () > 0) return this.getLayer (this.getComponent (0));
24309 return 0;
24310 });
24311 Clazz_defineMethod (c$, "lowestLayer", 
24312 function () {
24313 var count = this.getComponentCount ();
24314 if (count > 0) return this.getLayer (this.getComponent (count - 1));
24315 return 0;
24316 });
24317 Clazz_defineMethod (c$, "getComponentCountInLayer", 
24318 function (layer) {
24319 var i;
24320 var count;
24321 var curLayer;
24322 var layerCount = 0;
24323 count = this.getComponentCount ();
24324 for (i = 0; i < count; i++) {
24325 curLayer = this.getLayer (this.getComponent (i));
24326 if (curLayer == layer) {
24327 layerCount++;
24328 } else if (layerCount > 0 || curLayer < layer) {
24329 break;
24330 }}
24331 return layerCount;
24332 }, "~N");
24333 Clazz_defineMethod (c$, "getComponentsInLayer", 
24334 function (layer) {
24335 var i;
24336 var count;
24337 var curLayer;
24338 var layerCount = 0;
24339 var results;
24340 results =  new Array (this.getComponentCountInLayer (layer));
24341 count = this.getComponentCount ();
24342 for (i = 0; i < count; i++) {
24343 curLayer = this.getLayer (this.getComponent (i));
24344 if (curLayer == layer) {
24345 results[layerCount++] = this.getComponent (i);
24346 } else if (layerCount > 0 || curLayer < layer) {
24347 break;
24348 }}
24349 return results;
24350 }, "~N");
24351 Clazz_defineMethod (c$, "paint", 
24352 function (g) {
24353 if (this.isOpaque ()) {
24354 var r = g.getClipBounds ();
24355 var c = this.getBackground ();
24356 if (c == null) c = java.awt.Color.lightGray;
24357 g.setColor (c);
24358 if (r != null) {
24359 g.fillRect (r.x, r.y, r.width, r.height);
24360 } else {
24361 g.fillRect (0, 0, this.getWidth (), this.getHeight ());
24362 }}Clazz_superCall (this, javax.swing.JLayeredPane, "paint", [g]);
24363 }, "java.awt.Graphics");
24364 Clazz_defineMethod (c$, "getComponentToLayer", 
24365 function () {
24366 if (this.componentToLayer == null) this.componentToLayer =  new java.util.Hashtable (4);
24367 return this.componentToLayer;
24368 });
24369 Clazz_defineMethod (c$, "getObjectForLayer", 
24370 function (layer) {
24371 var layerObj;
24372 switch (layer) {
24373 case 0:
24374 layerObj = javax.swing.JLayeredPane.DEFAULT_LAYER;
24375 break;
24376 case 100:
24377 layerObj = javax.swing.JLayeredPane.PALETTE_LAYER;
24378 break;
24379 case 200:
24380 layerObj = javax.swing.JLayeredPane.MODAL_LAYER;
24381 break;
24382 case 300:
24383 layerObj = javax.swing.JLayeredPane.POPUP_LAYER;
24384 break;
24385 case 400:
24386 layerObj = javax.swing.JLayeredPane.DRAG_LAYER;
24387 break;
24388 default:
24389 layerObj =  new Integer (layer);
24390 }
24391 return layerObj;
24392 }, "~N");
24393 Clazz_defineMethod (c$, "insertIndexForLayer", 
24394 function (layer, position) {
24395 return this.insertIndexForLayer (null, layer, position);
24396 }, "~N,~N");
24397 Clazz_defineMethod (c$, "insertIndexForLayer", 
24398  function (comp, layer, position) {
24399 var i;
24400 var count;
24401 var curLayer;
24402 var layerStart = -1;
24403 var layerEnd = -1;
24404 var componentCount = this.getComponentCount ();
24405 var compList =  new java.util.ArrayList (componentCount);
24406 for (var index = 0; index < componentCount; index++) {
24407 if (this.getComponent (index) !== comp) {
24408 compList.add (this.getComponent (index));
24409 }}
24410 count = compList.size ();
24411 for (i = 0; i < count; i++) {
24412 curLayer = this.getLayer (compList.get (i));
24413 if (layerStart == -1 && curLayer == layer) {
24414 layerStart = i;
24415 }if (curLayer < layer) {
24416 if (i == 0) {
24417 layerStart = 0;
24418 layerEnd = 0;
24419 } else {
24420 layerEnd = i;
24421 }break;
24422 }}
24423 if (layerStart == -1 && layerEnd == -1) return count;
24424 if (layerStart != -1 && layerEnd == -1) layerEnd = count;
24425 if (layerEnd != -1 && layerStart == -1) layerStart = layerEnd;
24426 if (position == -1) return layerEnd;
24427 if (position > -1 && layerStart + position <= layerEnd) return layerStart + position;
24428 return layerEnd;
24429 }, "java.awt.Component,~N,~N");
24430 Clazz_defineMethod (c$, "paramString", 
24431 function () {
24432 var optimizedDrawingPossibleString = (this.optimizedDrawingPossible ? "true" : "false");
24433 return Clazz_superCall (this, javax.swing.JLayeredPane, "paramString", []) + ",optimizedDrawingPossible=" + optimizedDrawingPossibleString;
24434 });
24435 c$.DEFAULT_LAYER = c$.prototype.DEFAULT_LAYER =  new Integer (0);
24436 c$.PALETTE_LAYER = c$.prototype.PALETTE_LAYER =  new Integer (100);
24437 c$.MODAL_LAYER = c$.prototype.MODAL_LAYER =  new Integer (200);
24438 c$.POPUP_LAYER = c$.prototype.POPUP_LAYER =  new Integer (300);
24439 c$.DRAG_LAYER = c$.prototype.DRAG_LAYER =  new Integer (400);
24440 c$.FRAME_CONTENT_LAYER = c$.prototype.FRAME_CONTENT_LAYER =  new Integer (-30000);
24441 Clazz_defineStatics (c$,
24442 "LAYER_PROPERTY", "layeredContainerLayer");
24443 });
24444 Clazz_declarePackage ("javax.swing");
24445 Clazz_load (["javax.swing.JComponent"], "javax.swing.JPanel", ["java.lang.Boolean", "java.awt.FlowLayout", "javax.swing.UIManager"], function () {
24446 c$ = Clazz_declareType (javax.swing, "JPanel", javax.swing.JComponent);
24447 Clazz_makeConstructor (c$, 
24448 function (layout, isDoubleBuffered) {
24449 Clazz_superConstructor (this, javax.swing.JPanel, []);
24450 this.setLayout (layout);
24451 this.setUIProperty ("opaque", Boolean.TRUE);
24452 this.updateUI ();
24453 }, "java.awt.LayoutManager,~B");
24454 Clazz_makeConstructor (c$, 
24455 function (layout) {
24456 this.construct (layout, true);
24457 }, "java.awt.LayoutManager");
24458 Clazz_makeConstructor (c$, 
24459 function (isDoubleBuffered) {
24460 this.construct ( new java.awt.FlowLayout (), isDoubleBuffered);
24461 }, "~B");
24462 Clazz_makeConstructor (c$, 
24463 function () {
24464 this.construct (true);
24465 });
24466 Clazz_overrideMethod (c$, "updateUI", 
24467 function () {
24468 this.setUI (javax.swing.UIManager.getUI (this));
24469 });
24470 Clazz_overrideMethod (c$, "getUI", 
24471 function () {
24472 return this.ui;
24473 });
24474 Clazz_overrideMethod (c$, "getUIClassID", 
24475 function () {
24476 return "PanelUI";
24477 });
24478 Clazz_defineStatics (c$,
24479 "$uiClassID", "PanelUI");
24480 });
24481 Clazz_declarePackage ("javax.swing");
24482 Clazz_load (["java.lang.Enum", "java.util.Enumeration", "javax.swing.UIDefaults"], "javax.swing.MultiUIDefaults", ["java.lang.StringBuffer", "java.util.HashSet"], function () {
24483 c$ = Clazz_decorateAsClass (function () {
24484 this.tables = null;
24485 Clazz_instantialize (this, arguments);
24486 }, javax.swing, "MultiUIDefaults", javax.swing.UIDefaults);
24487 Clazz_makeConstructor (c$, 
24488 function (defaults) {
24489 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24490 this.tables = defaults;
24491 }, "~A");
24492 Clazz_makeConstructor (c$, 
24493 function () {
24494 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24495 this.tables =  new Array (0);
24496 });
24497 Clazz_defineMethod (c$, "get", 
24498 function (key) {
24499 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key]);
24500 if (value != null) {
24501 return value;
24502 }for (var i = 0; i < this.tables.length; i++) {
24503 var table = this.tables[i];
24504 value = (table != null) ? table.get (key) : null;
24505 if (value != null) {
24506 return value;
24507 }}
24508 return null;
24509 }, "~O");
24510 Clazz_defineMethod (c$, "get", 
24511 function (key, l) {
24512 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key, l]);
24513 if (value != null) {
24514 return value;
24515 }for (var i = 0; i < this.tables.length; i++) {
24516 var table = this.tables[i];
24517 value = (table != null) ? table.get (key, l) : null;
24518 if (value != null) {
24519 return value;
24520 }}
24521 return null;
24522 }, "~O,java.util.Locale");
24523 Clazz_overrideMethod (c$, "size", 
24524 function () {
24525 return this.entrySet ().size ();
24526 });
24527 Clazz_overrideMethod (c$, "isEmpty", 
24528 function () {
24529 return this.size () == 0;
24530 });
24531 Clazz_overrideMethod (c$, "keys", 
24532 function () {
24533 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS, this.entrySet ());
24534 });
24535 Clazz_overrideMethod (c$, "elements", 
24536 function () {
24537 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS, this.entrySet ());
24538 });
24539 Clazz_defineMethod (c$, "entrySet", 
24540 function () {
24541 var set =  new java.util.HashSet ();
24542 for (var i = this.tables.length - 1; i >= 0; i--) {
24543 if (this.tables[i] != null) {
24544 set.addAll (this.tables[i].entrySet ());
24545 }}
24546 set.addAll (Clazz_superCall (this, javax.swing.MultiUIDefaults, "entrySet", []));
24547 return set;
24548 });
24549 Clazz_defineMethod (c$, "getUIError", 
24550 function (msg) {
24551 if (this.tables.length > 0) {
24552 this.tables[0].getUIError (msg);
24553 } else {
24554 Clazz_superCall (this, javax.swing.MultiUIDefaults, "getUIError", [msg]);
24555 }}, "~S");
24556 Clazz_defineMethod (c$, "remove", 
24557 function (key) {
24558 var value = null;
24559 for (var i = this.tables.length - 1; i >= 0; i--) {
24560 if (this.tables[i] != null) {
24561 var v = this.tables[i].remove (key);
24562 if (v != null) {
24563 value = v;
24564 }}}
24565 var v = Clazz_superCall (this, javax.swing.MultiUIDefaults, "remove", [key]);
24566 if (v != null) {
24567 value = v;
24568 }return value;
24569 }, "~O");
24570 Clazz_defineMethod (c$, "clear", 
24571 function () {
24572 Clazz_superCall (this, javax.swing.MultiUIDefaults, "clear", []);
24573 for (var i = 0; i < this.tables.length; i++) {
24574 var table = this.tables[i];
24575 if (table != null) {
24576 table.clear ();
24577 }}
24578 });
24579 Clazz_overrideMethod (c$, "toString", 
24580 function () {
24581 var buf =  new StringBuffer ();
24582 buf.append ("{");
24583 var keys = this.keys ();
24584 while (keys.hasMoreElements ()) {
24585 var key = keys.nextElement ();
24586 buf.append (key + "=" + this.get (key) + ", ");
24587 }
24588 var length = buf.length ();
24589 if (length > 1) {
24590 buf.$delete (length - 2, length);
24591 }buf.append ("}");
24592 return buf.toString ();
24593 });
24594 Clazz_pu$h(self.c$);
24595 c$ = Clazz_decorateAsClass (function () {
24596 this.iterator = null;
24597 this.type = null;
24598 Clazz_instantialize (this, arguments);
24599 }, javax.swing.MultiUIDefaults, "MultiUIDefaultsEnumerator", null, java.util.Enumeration);
24600 Clazz_makeConstructor (c$, 
24601 function (a, b) {
24602 this.type = a;
24603 this.iterator = b.iterator ();
24604 }, "javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type,java.util.Set");
24605 Clazz_overrideMethod (c$, "hasMoreElements", 
24606 function () {
24607 return this.iterator.hasNext ();
24608 });
24609 Clazz_overrideMethod (c$, "nextElement", 
24610 function () {
24611 switch (this.type) {
24612 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS:
24613 return this.iterator.next ().getKey ();
24614 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS:
24615 return this.iterator.next ().getValue ();
24616 default:
24617 return null;
24618 }
24619 });
24620 Clazz_pu$h(self.c$);
24621 c$ = Clazz_declareType (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator, "Type", Enum);
24622 Clazz_defineEnumConstant (c$, "KEYS", 0, []);
24623 Clazz_defineEnumConstant (c$, "ELEMENTS", 1, []);
24624 c$ = Clazz_p0p ();
24625 c$ = Clazz_p0p ();
24626 });
24627 Clazz_declarePackage ("java.awt");
24628 Clazz_load (null, "java.awt.Font", ["java.awt.font.TextAttribute", "java.awt.geom.AffineTransform", "swingjs.JSToolkit"], function () {
24629 c$ = Clazz_decorateAsClass (function () {
24630 this.family = null;
24631 this.name = null;
24632 this.style = 0;
24633 this.size = 0;
24634 this.pointSize = 0;
24635 this.$hasLayoutAttributes = false;
24636 this.nonIdentityTx = false;
24637 this.hash = 0;
24638 Clazz_instantialize (this, arguments);
24639 }, java.awt, "Font");
24640 Clazz_makeConstructor (c$, 
24641 function (name, style, size) {
24642 this.name = (name != null) ? name : "Default";
24643 this.style = (style & -4) == 0 ? style : 0;
24644 this.size = size;
24645 this.pointSize = size;
24646 }, "~S,~N,~N");
24647 Clazz_makeConstructor (c$, 
24648  function (name, style, sizePts) {
24649 this.name = (name != null) ? name : "Default";
24650 this.style = (style & -4) == 0 ? style : 0;
24651 this.size = Clazz_doubleToInt (sizePts + 0.5);
24652 this.pointSize = sizePts;
24653 }, "~S,~N,~N");
24654 Clazz_makeConstructor (c$, 
24655 function (font) {
24656 this.name = font.name;
24657 this.style = font.style;
24658 this.size = font.size;
24659 this.pointSize = font.pointSize;
24660 }, "java.awt.Font");
24661 Clazz_defineMethod (c$, "getTransform", 
24662 function () {
24663 return  new java.awt.geom.AffineTransform ();
24664 });
24665 Clazz_defineMethod (c$, "getFamily", 
24666 function () {
24667 return (this.family == null ? this.family = swingjs.JSToolkit.getFontFamily (this) : this.family);
24668 });
24669 Clazz_defineMethod (c$, "getName", 
24670 function () {
24671 return this.name;
24672 });
24673 Clazz_defineMethod (c$, "getFontName", 
24674 function () {
24675 return this.name;
24676 });
24677 Clazz_defineMethod (c$, "getStyle", 
24678 function () {
24679 return this.style;
24680 });
24681 Clazz_defineMethod (c$, "getSize", 
24682 function () {
24683 return this.size;
24684 });
24685 Clazz_defineMethod (c$, "getSize2D", 
24686 function () {
24687 return this.pointSize;
24688 });
24689 Clazz_defineMethod (c$, "isPlain", 
24690 function () {
24691 return this.style == 0;
24692 });
24693 Clazz_defineMethod (c$, "isBold", 
24694 function () {
24695 return (this.style & 1) != 0;
24696 });
24697 Clazz_defineMethod (c$, "isItalic", 
24698 function () {
24699 return (this.style & 2) != 0;
24700 });
24701 Clazz_defineMethod (c$, "isTransformed", 
24702 function () {
24703 return this.nonIdentityTx;
24704 });
24705 Clazz_defineMethod (c$, "hasLayoutAttributes", 
24706 function () {
24707 return this.$hasLayoutAttributes;
24708 });
24709 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24710 function (nm) {
24711 return java.awt.Font.getFont (nm, null);
24712 }, "~S");
24713 c$.decode = Clazz_defineMethod (c$, "decode", 
24714 function (str) {
24715 var fontName = str;
24716 var styleName = "";
24717 var fontSize = 12;
24718 var fontStyle = 0;
24719 if (str == null) {
24720 return  new java.awt.Font ("Dialog", fontStyle, fontSize);
24721 }var lastHyphen = str.lastIndexOf ('-');
24722 var lastSpace = str.lastIndexOf (' ');
24723 var sepChar = (lastHyphen > lastSpace) ? '-' : ' ';
24724 var sizeIndex = str.lastIndexOf (sepChar);
24725 var styleIndex = str.lastIndexOf (sepChar, sizeIndex - 1);
24726 var strlen = str.length;
24727 if (sizeIndex > 0 && sizeIndex + 1 < strlen) {
24728 try {
24729 fontSize = Integer.$valueOf (str.substring (sizeIndex + 1)).intValue ();
24730 if (fontSize <= 0) {
24731 fontSize = 12;
24732 }} catch (e) {
24733 if (Clazz_exceptionOf (e, NumberFormatException)) {
24734 styleIndex = sizeIndex;
24735 sizeIndex = strlen;
24736 if (str.charAt (sizeIndex - 1) == sepChar) {
24737 sizeIndex--;
24738 }} else {
24739 throw e;
24740 }
24741 }
24742 }if (styleIndex >= 0 && styleIndex + 1 < strlen) {
24743 styleName = str.substring (styleIndex + 1, sizeIndex);
24744 styleName = styleName.toLowerCase ();
24745 if (styleName.equals ("bolditalic")) {
24746 fontStyle = 3;
24747 } else if (styleName.equals ("italic")) {
24748 fontStyle = 2;
24749 } else if (styleName.equals ("bold")) {
24750 fontStyle = 1;
24751 } else if (styleName.equals ("plain")) {
24752 fontStyle = 0;
24753 } else {
24754 styleIndex = sizeIndex;
24755 if (str.charAt (styleIndex - 1) == sepChar) {
24756 styleIndex--;
24757 }}fontName = str.substring (0, styleIndex);
24758 } else {
24759 var fontEnd = strlen;
24760 if (styleIndex > 0) {
24761 fontEnd = styleIndex;
24762 } else if (sizeIndex > 0) {
24763 fontEnd = sizeIndex;
24764 }if (fontEnd > 0 && str.charAt (fontEnd - 1) == sepChar) {
24765 fontEnd--;
24766 }fontName = str.substring (0, fontEnd);
24767 }return  new java.awt.Font (fontName, fontStyle, fontSize);
24768 }, "~S");
24769 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24770 function (nm, font) {
24771 var str = null;
24772 try {
24773 str = System.getProperty (nm);
24774 } catch (e) {
24775 if (Clazz_exceptionOf (e, SecurityException)) {
24776 } else {
24777 throw e;
24778 }
24779 }
24780 if (str == null) {
24781 return font;
24782 }return java.awt.Font.decode (str);
24783 }, "~S,java.awt.Font");
24784 Clazz_overrideMethod (c$, "hashCode", 
24785 function () {
24786 if (this.hash == 0) {
24787 this.hash = this.name.hashCode () ^ this.style ^ this.size;
24788 }return this.hash;
24789 });
24790 Clazz_overrideMethod (c$, "equals", 
24791 function (obj) {
24792 if (obj === this) {
24793 return true;
24794 }if (obj != null) {
24795 try {
24796 var font = obj;
24797 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)) {
24798 return true;
24799 }} catch (e) {
24800 if (Clazz_exceptionOf (e, ClassCastException)) {
24801 } else {
24802 throw e;
24803 }
24804 }
24805 }return false;
24806 }, "~O");
24807 Clazz_overrideMethod (c$, "toString", 
24808 function () {
24809 var strStyle;
24810 if (this.isBold ()) {
24811 strStyle = this.isItalic () ? "bolditalic" : "bold";
24812 } else {
24813 strStyle = this.isItalic () ? "italic" : "plain";
24814 }return this.getClass ().getName () + "[family=" + this.getFamily () + ",name=" + this.name + ",style=" + strStyle + ",size=" + this.size + "]";
24815 });
24816 Clazz_defineMethod (c$, "getAvailableAttributes", 
24817 function () {
24818 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]);
24819 return attributes;
24820 });
24821 Clazz_defineMethod (c$, "deriveFont", 
24822 function (style, size) {
24823 return  new java.awt.Font (this.name, style, size);
24824 }, "~N,~N");
24825 Clazz_defineMethod (c$, "deriveFont", 
24826 function (size) {
24827 return  new java.awt.Font (this.name, this.style, size);
24828 }, "~N");
24829 Clazz_defineMethod (c$, "deriveFont", 
24830 function (style) {
24831 return  new java.awt.Font (this.name, style, this.size);
24832 }, "~N");
24833 Clazz_defineMethod (c$, "hasUniformLineMetrics", 
24834 function () {
24835 return false;
24836 });
24837 Clazz_overrideMethod (c$, "finalize", 
24838 function () {
24839 });
24840 Clazz_defineStatics (c$,
24841 "DIALOG", "Dialog",
24842 "DIALOG_INPUT", "DialogInput",
24843 "SANS_SERIF", "SansSerif",
24844 "SERIF", "Serif",
24845 "MONOSPACED", "Monospaced",
24846 "PLAIN", 0,
24847 "BOLD", 1,
24848 "ITALIC", 2,
24849 "ROMAN_BASELINE", 0,
24850 "CENTER_BASELINE", 1,
24851 "HANGING_BASELINE", 2,
24852 "TRUETYPE_FONT", 0,
24853 "TYPE1_FONT", 1,
24854 "LAYOUT_LEFT_TO_RIGHT", 0,
24855 "LAYOUT_RIGHT_TO_LEFT", 1,
24856 "LAYOUT_NO_START_CONTEXT", 2,
24857 "LAYOUT_NO_LIMIT_CONTEXT", 4);
24858 });
24859 Clazz_declarePackage ("java.awt.font");
24860 Clazz_load (["java.text.AttributedCharacterIterator", "java.lang.Boolean", "$.Float", "java.util.HashMap"], "java.awt.font.TextAttribute", ["java.io.InvalidObjectException"], function () {
24861 c$ = Clazz_declareType (java.awt.font, "TextAttribute", java.text.AttributedCharacterIterator.Attribute);
24862 Clazz_makeConstructor (c$, 
24863 function (name) {
24864 Clazz_superConstructor (this, java.awt.font.TextAttribute, [name]);
24865 if (this.getClass () === java.awt.font.TextAttribute) {
24866 java.awt.font.TextAttribute.$instanceMap.put (name, this);
24867 }}, "~S");
24868 Clazz_overrideMethod (c$, "readResolve", 
24869 function () {
24870 if (this.getClass () !== java.awt.font.TextAttribute) {
24871 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24872 }var instance = java.awt.font.TextAttribute.$instanceMap.get (this.getName ());
24873 if (instance != null) {
24874 return instance;
24875 } else {
24876 throw  new java.io.InvalidObjectException ("unknown attribute name");
24877 }});
24878 c$.$instanceMap = c$.prototype.$instanceMap =  new java.util.HashMap (29);
24879 c$.FAMILY = c$.prototype.FAMILY =  new java.awt.font.TextAttribute ("family");
24880 c$.WEIGHT = c$.prototype.WEIGHT =  new java.awt.font.TextAttribute ("weight");
24881 c$.WEIGHT_EXTRA_LIGHT = c$.prototype.WEIGHT_EXTRA_LIGHT = Float.$valueOf (0.5);
24882 c$.WEIGHT_LIGHT = c$.prototype.WEIGHT_LIGHT = Float.$valueOf (0.75);
24883 c$.WEIGHT_DEMILIGHT = c$.prototype.WEIGHT_DEMILIGHT = Float.$valueOf (0.875);
24884 c$.WEIGHT_REGULAR = c$.prototype.WEIGHT_REGULAR = Float.$valueOf (1.0);
24885 c$.WEIGHT_SEMIBOLD = c$.prototype.WEIGHT_SEMIBOLD = Float.$valueOf (1.25);
24886 c$.WEIGHT_MEDIUM = c$.prototype.WEIGHT_MEDIUM = Float.$valueOf (1.5);
24887 c$.WEIGHT_DEMIBOLD = c$.prototype.WEIGHT_DEMIBOLD = Float.$valueOf (1.75);
24888 c$.WEIGHT_BOLD = c$.prototype.WEIGHT_BOLD = Float.$valueOf (2.0);
24889 c$.WEIGHT_HEAVY = c$.prototype.WEIGHT_HEAVY = Float.$valueOf (2.25);
24890 c$.WEIGHT_EXTRABOLD = c$.prototype.WEIGHT_EXTRABOLD = Float.$valueOf (2.5);
24891 c$.WEIGHT_ULTRABOLD = c$.prototype.WEIGHT_ULTRABOLD = Float.$valueOf (2.75);
24892 c$.WIDTH = c$.prototype.WIDTH =  new java.awt.font.TextAttribute ("width");
24893 c$.WIDTH_CONDENSED = c$.prototype.WIDTH_CONDENSED = Float.$valueOf (0.75);
24894 c$.WIDTH_SEMI_CONDENSED = c$.prototype.WIDTH_SEMI_CONDENSED = Float.$valueOf (0.875);
24895 c$.WIDTH_REGULAR = c$.prototype.WIDTH_REGULAR = Float.$valueOf (1.0);
24896 c$.WIDTH_SEMI_EXTENDED = c$.prototype.WIDTH_SEMI_EXTENDED = Float.$valueOf (1.25);
24897 c$.WIDTH_EXTENDED = c$.prototype.WIDTH_EXTENDED = Float.$valueOf (1.5);
24898 c$.POSTURE = c$.prototype.POSTURE =  new java.awt.font.TextAttribute ("posture");
24899 c$.POSTURE_REGULAR = c$.prototype.POSTURE_REGULAR = Float.$valueOf (0.0);
24900 c$.POSTURE_OBLIQUE = c$.prototype.POSTURE_OBLIQUE = Float.$valueOf (0.20);
24901 c$.SIZE = c$.prototype.SIZE =  new java.awt.font.TextAttribute ("size");
24902 c$.TRANSFORM = c$.prototype.TRANSFORM =  new java.awt.font.TextAttribute ("transform");
24903 c$.SUPERSCRIPT = c$.prototype.SUPERSCRIPT =  new java.awt.font.TextAttribute ("superscript");
24904 c$.SUPERSCRIPT_SUPER = c$.prototype.SUPERSCRIPT_SUPER = Integer.$valueOf (1);
24905 c$.SUPERSCRIPT_SUB = c$.prototype.SUPERSCRIPT_SUB = Integer.$valueOf (-1);
24906 c$.FONT = c$.prototype.FONT =  new java.awt.font.TextAttribute ("font");
24907 c$.CHAR_REPLACEMENT = c$.prototype.CHAR_REPLACEMENT =  new java.awt.font.TextAttribute ("char_replacement");
24908 c$.FOREGROUND = c$.prototype.FOREGROUND =  new java.awt.font.TextAttribute ("foreground");
24909 c$.BACKGROUND = c$.prototype.BACKGROUND =  new java.awt.font.TextAttribute ("background");
24910 c$.UNDERLINE = c$.prototype.UNDERLINE =  new java.awt.font.TextAttribute ("underline");
24911 c$.UNDERLINE_ON = c$.prototype.UNDERLINE_ON = Integer.$valueOf (0);
24912 c$.STRIKETHROUGH = c$.prototype.STRIKETHROUGH =  new java.awt.font.TextAttribute ("strikethrough");
24913 c$.STRIKETHROUGH_ON = c$.prototype.STRIKETHROUGH_ON = Boolean.TRUE;
24914 c$.RUN_DIRECTION = c$.prototype.RUN_DIRECTION =  new java.awt.font.TextAttribute ("run_direction");
24915 c$.RUN_DIRECTION_LTR = c$.prototype.RUN_DIRECTION_LTR = Boolean.FALSE;
24916 c$.RUN_DIRECTION_RTL = c$.prototype.RUN_DIRECTION_RTL = Boolean.TRUE;
24917 c$.BIDI_EMBEDDING = c$.prototype.BIDI_EMBEDDING =  new java.awt.font.TextAttribute ("bidi_embedding");
24918 c$.JUSTIFICATION = c$.prototype.JUSTIFICATION =  new java.awt.font.TextAttribute ("justification");
24919 c$.JUSTIFICATION_FULL = c$.prototype.JUSTIFICATION_FULL = Float.$valueOf (1.0);
24920 c$.JUSTIFICATION_NONE = c$.prototype.JUSTIFICATION_NONE = Float.$valueOf (0.0);
24921 c$.INPUT_METHOD_HIGHLIGHT = c$.prototype.INPUT_METHOD_HIGHLIGHT =  new java.awt.font.TextAttribute ("input method highlight");
24922 c$.INPUT_METHOD_UNDERLINE = c$.prototype.INPUT_METHOD_UNDERLINE =  new java.awt.font.TextAttribute ("input method underline");
24923 c$.UNDERLINE_LOW_ONE_PIXEL = c$.prototype.UNDERLINE_LOW_ONE_PIXEL = Integer.$valueOf (1);
24924 c$.UNDERLINE_LOW_TWO_PIXEL = c$.prototype.UNDERLINE_LOW_TWO_PIXEL = Integer.$valueOf (2);
24925 c$.UNDERLINE_LOW_DOTTED = c$.prototype.UNDERLINE_LOW_DOTTED = Integer.$valueOf (3);
24926 c$.UNDERLINE_LOW_GRAY = c$.prototype.UNDERLINE_LOW_GRAY = Integer.$valueOf (4);
24927 c$.UNDERLINE_LOW_DASHED = c$.prototype.UNDERLINE_LOW_DASHED = Integer.$valueOf (5);
24928 c$.SWAP_COLORS = c$.prototype.SWAP_COLORS =  new java.awt.font.TextAttribute ("swap_colors");
24929 c$.SWAP_COLORS_ON = c$.prototype.SWAP_COLORS_ON = Boolean.TRUE;
24930 c$.NUMERIC_SHAPING = c$.prototype.NUMERIC_SHAPING =  new java.awt.font.TextAttribute ("numeric_shaping");
24931 c$.KERNING = c$.prototype.KERNING =  new java.awt.font.TextAttribute ("kerning");
24932 c$.KERNING_ON = c$.prototype.KERNING_ON = Integer.$valueOf (1);
24933 c$.LIGATURES = c$.prototype.LIGATURES =  new java.awt.font.TextAttribute ("ligatures");
24934 c$.LIGATURES_ON = c$.prototype.LIGATURES_ON = Integer.$valueOf (1);
24935 c$.TRACKING = c$.prototype.TRACKING =  new java.awt.font.TextAttribute ("tracking");
24936 c$.TRACKING_TIGHT = c$.prototype.TRACKING_TIGHT = Float.$valueOf (-0.04);
24937 c$.TRACKING_LOOSE = c$.prototype.TRACKING_LOOSE = Float.$valueOf (.04);
24938 });
24939 Clazz_declarePackage ("java.text");
24940 Clazz_load (["java.text.CharacterIterator", "java.io.InvalidObjectException", "java.util.HashMap"], "java.text.AttributedCharacterIterator", null, function () {
24941 Clazz_declareInterface (java.text, "AttributedCharacterIterator", java.text.CharacterIterator);
24942 Clazz_pu$h(self.c$);
24943 c$ = Clazz_decorateAsClass (function () {
24944 this.name = null;
24945 Clazz_instantialize (this, arguments);
24946 }, java.text.AttributedCharacterIterator, "Attribute", null, java.io.Serializable);
24947 Clazz_makeConstructor (c$, 
24948 function (a) {
24949 this.name = a;
24950 if (this.getClass () === java.text.AttributedCharacterIterator.Attribute) {
24951 java.text.AttributedCharacterIterator.Attribute.instanceMap.put (a, this);
24952 }}, "~S");
24953 Clazz_overrideMethod (c$, "toString", 
24954 function () {
24955 return this.getClass ().getName () + "(" + this.name + ")";
24956 });
24957 Clazz_defineMethod (c$, "getName", 
24958 function () {
24959 return this.name;
24960 });
24961 Clazz_defineMethod (c$, "readResolve", 
24962 function () {
24963 if (this.getClass () !== java.text.AttributedCharacterIterator.Attribute) {
24964 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24965 }var a = java.text.AttributedCharacterIterator.Attribute.instanceMap.get (this.getName ());
24966 if (a != null) {
24967 return a;
24968 } else {
24969 throw  new java.io.InvalidObjectException ("unknown attribute name");
24970 }});
24971 c$.instanceMap = c$.prototype.instanceMap =  new java.util.HashMap (7);
24972 c$.LANGUAGE = c$.prototype.LANGUAGE =  new java.text.AttributedCharacterIterator.Attribute ("language");
24973 c$.READING = c$.prototype.READING =  new java.text.AttributedCharacterIterator.Attribute ("reading");
24974 c$.INPUT_METHOD_SEGMENT = c$.prototype.INPUT_METHOD_SEGMENT =  new java.text.AttributedCharacterIterator.Attribute ("input_method_segment");
24975 c$ = Clazz_p0p ();
24976 });
24977 Clazz_declarePackage ("java.text");
24978 c$ = Clazz_declareInterface (java.text, "CharacterIterator", Cloneable);
24979 Clazz_defineStatics (c$,
24980 "DONE", '\uFFFF');
24981 Clazz_declarePackage ("java.awt.geom");
24982 Clazz_load (null, "java.awt.geom.Point2D", ["java.lang.Double", "$.InternalError"], function () {
24983 c$ = Clazz_declareType (java.awt.geom, "Point2D", null, Cloneable);
24984 Clazz_makeConstructor (c$, 
24985 function () {
24986 });
24987 Clazz_defineMethod (c$, "setLocation", 
24988 function (p) {
24989 this.setLocation (p.getX (), p.getY ());
24990 }, "java.awt.geom.Point2D");
24991 c$.distanceSq = Clazz_defineMethod (c$, "distanceSq", 
24992 function (x1, y1, x2, y2) {
24993 x1 -= x2;
24994 y1 -= y2;
24995 return (x1 * x1 + y1 * y1);
24996 }, "~N,~N,~N,~N");
24997 c$.distance = Clazz_defineMethod (c$, "distance", 
24998 function (x1, y1, x2, y2) {
24999 x1 -= x2;
25000 y1 -= y2;
25001 return Math.sqrt (x1 * x1 + y1 * y1);
25002 }, "~N,~N,~N,~N");
25003 Clazz_defineMethod (c$, "distanceSq", 
25004 function (px, py) {
25005 px -= this.getX ();
25006 py -= this.getY ();
25007 return (px * px + py * py);
25008 }, "~N,~N");
25009 Clazz_defineMethod (c$, "distanceSq", 
25010 function (pt) {
25011 var px = pt.getX () - this.getX ();
25012 var py = pt.getY () - this.getY ();
25013 return (px * px + py * py);
25014 }, "java.awt.geom.Point2D");
25015 Clazz_defineMethod (c$, "distance", 
25016 function (px, py) {
25017 px -= this.getX ();
25018 py -= this.getY ();
25019 return Math.sqrt (px * px + py * py);
25020 }, "~N,~N");
25021 Clazz_defineMethod (c$, "distance", 
25022 function (pt) {
25023 var px = pt.getX () - this.getX ();
25024 var py = pt.getY () - this.getY ();
25025 return Math.sqrt (px * px + py * py);
25026 }, "java.awt.geom.Point2D");
25027 Clazz_defineMethod (c$, "clone", 
25028 function () {
25029 try {
25030 return Clazz_superCall (this, java.awt.geom.Point2D, "clone", []);
25031 } catch (e) {
25032 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
25033 throw  new InternalError ();
25034 } else {
25035 throw e;
25036 }
25037 }
25038 });
25039 Clazz_overrideMethod (c$, "hashCode", 
25040 function () {
25041 var bits = java.lang.Double.doubleToLongBits (this.getX ());
25042 bits ^= java.lang.Double.doubleToLongBits (this.getY ()) * 31;
25043 return ((bits) ^ ((bits >> 32)));
25044 });
25045 Clazz_defineMethod (c$, "equals", 
25046 function (obj) {
25047 if (Clazz_instanceOf (obj, java.awt.geom.Point2D)) {
25048 var p2d = obj;
25049 return (this.getX () == p2d.getX ()) && (this.getY () == p2d.getY ());
25050 }return Clazz_superCall (this, java.awt.geom.Point2D, "equals", [obj]);
25051 }, "~O");
25052 Clazz_pu$h(self.c$);
25053 c$ = Clazz_decorateAsClass (function () {
25054 this.x = 0;
25055 this.y = 0;
25056 Clazz_instantialize (this, arguments);
25057 }, java.awt.geom.Point2D, "Float", java.awt.geom.Point2D);
25058 Clazz_makeConstructor (c$, 
25059 function () {
25060 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
25061 });
25062 Clazz_makeConstructor (c$, 
25063 function (a, b) {
25064 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
25065 this.x = a;
25066 this.y = b;
25067 }, "~N,~N");
25068 Clazz_overrideMethod (c$, "getX", 
25069 function () {
25070 return this.x;
25071 });
25072 Clazz_overrideMethod (c$, "getY", 
25073 function () {
25074 return this.y;
25075 });
25076 Clazz_defineMethod (c$, "setLocation", 
25077 function (a, b) {
25078 this.x = a;
25079 this.y = b;
25080 }, "~N,~N");
25081 Clazz_defineMethod (c$, "setLocation", 
25082 function (a, b) {
25083 this.x = a;
25084 this.y = b;
25085 }, "~N,~N");
25086 Clazz_overrideMethod (c$, "toString", 
25087 function () {
25088 return "Point2D.Float[" + this.x + ", " + this.y + "]";
25089 });
25090 c$ = Clazz_p0p ();
25091 Clazz_pu$h(self.c$);
25092 c$ = Clazz_decorateAsClass (function () {
25093 this.x = 0;
25094 this.y = 0;
25095 Clazz_instantialize (this, arguments);
25096 }, java.awt.geom.Point2D, "Double", java.awt.geom.Point2D);
25097 Clazz_makeConstructor (c$, 
25098 function () {
25099 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
25100 });
25101 Clazz_makeConstructor (c$, 
25102 function (a, b) {
25103 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
25104 this.x = a;
25105 this.y = b;
25106 }, "~N,~N");
25107 Clazz_overrideMethod (c$, "getX", 
25108 function () {
25109 return this.x;
25110 });
25111 Clazz_overrideMethod (c$, "getY", 
25112 function () {
25113 return this.y;
25114 });
25115 Clazz_defineMethod (c$, "setLocation", 
25116 function (a, b) {
25117 this.x = a;
25118 this.y = b;
25119 }, "~N,~N");
25120 Clazz_overrideMethod (c$, "toString", 
25121 function () {
25122 return "Point2D.Double[" + this.x + ", " + this.y + "]";
25123 });
25124 c$ = Clazz_p0p ();
25125 });
25126 Clazz_declarePackage ("java.awt.geom");
25127 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 () {
25128 c$ = Clazz_decorateAsClass (function () {
25129 this.m00 = 0;
25130 this.m10 = 0;
25131 this.m01 = 0;
25132 this.m11 = 0;
25133 this.m02 = 0;
25134 this.m12 = 0;
25135 this.state = 0;
25136 this.type = 0;
25137 Clazz_instantialize (this, arguments);
25138 }, java.awt.geom, "AffineTransform", null, [Cloneable, java.io.Serializable]);
25139 Clazz_makeConstructor (c$, 
25140  function (m00, m10, m01, m11, m02, m12, state) {
25141 {
25142 switch (arguments.length) { case 0: this.m00 = this.m11 = 1.0;
25143 return;
25144 case 1:
25145 if (Clazz_instanceOf(m00, java.awt.geom.AffineTransform)) {
25146 var Tx = m00; this.m00 =
25147 Tx.m00; this.m10 = Tx.m10; this.m01 = Tx.m01; this.m11 =
25148 Tx.m11; this.m02 = Tx.m02; this.m12 = Tx.m12; this.state =
25149 Tx.state; this.type = Tx.type;
25150 } else {
25151 var flatmatrix = m00;
25152 this.m00 = flatmatrix[0];
25153 this.m10 = flatmatrix[1];
25154 this.m01 = flatmatrix[2];
25155 this.m11 = flatmatrix[3];
25156 if (flatmatrix.length > 5) {
25157 this.m02 = flatmatrix[4];
25158 this.m12 = flatmatrix[5];
25159 }
25160 this.updateState();
25161 }
25162 return;
25163 case 6:
25164 this.m00 = m00;
25165 this.m10 = m10;
25166 this.m01 = m01;
25167 this.m11 = m11;
25168 this.m02 = m02;
25169 this.m12 = m12;
25170 this.updateState();
25171 return;
25172 }
25173 }this.m00 = m00;
25174 this.m10 = m10;
25175 this.m01 = m01;
25176 this.m11 = m11;
25177 this.m02 = m02;
25178 this.m12 = m12;
25179 this.state = state;
25180 this.type = -1;
25181 }, "~N,~N,~N,~N,~N,~N,~N");
25182 c$.getTranslateInstance = Clazz_defineMethod (c$, "getTranslateInstance", 
25183 function (tx, ty) {
25184 var Tx =  new java.awt.geom.AffineTransform ();
25185 Tx.setToTranslation (tx, ty);
25186 return Tx;
25187 }, "~N,~N");
25188 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25189 function (theta) {
25190 var Tx =  new java.awt.geom.AffineTransform ();
25191 Tx.setToRotation (theta);
25192 return Tx;
25193 }, "~N");
25194 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25195 function (theta, anchorx, anchory) {
25196 var Tx =  new java.awt.geom.AffineTransform ();
25197 Tx.setToRotation (theta, anchorx, anchory);
25198 return Tx;
25199 }, "~N,~N,~N");
25200 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25201 function (vecx, vecy) {
25202 var Tx =  new java.awt.geom.AffineTransform ();
25203 Tx.setToRotation (vecx, vecy);
25204 return Tx;
25205 }, "~N,~N");
25206 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25207 function (vecx, vecy, anchorx, anchory) {
25208 var Tx =  new java.awt.geom.AffineTransform ();
25209 Tx.setToRotation (vecx, vecy, anchorx, anchory);
25210 return Tx;
25211 }, "~N,~N,~N,~N");
25212 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25213 function (numquadrants) {
25214 var Tx =  new java.awt.geom.AffineTransform ();
25215 Tx.setToQuadrantRotation (numquadrants);
25216 return Tx;
25217 }, "~N");
25218 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25219 function (numquadrants, anchorx, anchory) {
25220 var Tx =  new java.awt.geom.AffineTransform ();
25221 Tx.setToQuadrantRotation (numquadrants, anchorx, anchory);
25222 return Tx;
25223 }, "~N,~N,~N");
25224 c$.getScaleInstance = Clazz_defineMethod (c$, "getScaleInstance", 
25225 function (sx, sy) {
25226 var Tx =  new java.awt.geom.AffineTransform ();
25227 Tx.setToScale (sx, sy);
25228 return Tx;
25229 }, "~N,~N");
25230 c$.getShearInstance = Clazz_defineMethod (c$, "getShearInstance", 
25231 function (shx, shy) {
25232 var Tx =  new java.awt.geom.AffineTransform ();
25233 Tx.setToShear (shx, shy);
25234 return Tx;
25235 }, "~N,~N");
25236 Clazz_defineMethod (c$, "getType", 
25237 function () {
25238 if (this.type == -1) {
25239 this.calculateType ();
25240 }return this.type;
25241 });
25242 Clazz_defineMethod (c$, "calculateType", 
25243  function () {
25244 var ret = 0;
25245 var sgn0;
25246 var sgn1;
25247 var M0;
25248 var M1;
25249 var M2;
25250 var M3;
25251 this.updateState ();
25252 switch (this.state) {
25253 default:
25254 this.stateError ();
25255 case (7):
25256 ret = 1;
25257 case (6):
25258 if ((M0 = this.m00) * (M2 = this.m01) + (M3 = this.m10) * (M1 = this.m11) != 0) {
25259 this.type = 32;
25260 return;
25261 }sgn0 = (M0 >= 0.0);
25262 sgn1 = (M1 >= 0.0);
25263 if (sgn0 == sgn1) {
25264 if (M0 != M1 || M2 != -M3) {
25265 ret |= (20);
25266 } else if (M0 * M1 - M2 * M3 != 1.0) {
25267 ret |= (18);
25268 } else {
25269 ret |= 16;
25270 }} else {
25271 if (M0 != -M1 || M2 != M3) {
25272 ret |= (84);
25273 } else if (M0 * M1 - M2 * M3 != 1.0) {
25274 ret |= (82);
25275 } else {
25276 ret |= (80);
25277 }}break;
25278 case (5):
25279 ret = 1;
25280 case (4):
25281 sgn0 = ((M0 = this.m01) >= 0.0);
25282 sgn1 = ((M1 = this.m10) >= 0.0);
25283 if (sgn0 != sgn1) {
25284 if (M0 != -M1) {
25285 ret |= (12);
25286 } else if (M0 != 1.0 && M0 != -1.0) {
25287 ret |= (10);
25288 } else {
25289 ret |= 8;
25290 }} else {
25291 if (M0 == M1) {
25292 ret |= (74);
25293 } else {
25294 ret |= (76);
25295 }}break;
25296 case (3):
25297 ret = 1;
25298 case (2):
25299 sgn0 = ((M0 = this.m00) >= 0.0);
25300 sgn1 = ((M1 = this.m11) >= 0.0);
25301 if (sgn0 == sgn1) {
25302 if (sgn0) {
25303 if (M0 == M1) {
25304 ret |= 2;
25305 } else {
25306 ret |= 4;
25307 }} else {
25308 if (M0 != M1) {
25309 ret |= (12);
25310 } else if (M0 != -1.0) {
25311 ret |= (10);
25312 } else {
25313 ret |= 8;
25314 }}} else {
25315 if (M0 == -M1) {
25316 if (M0 == 1.0 || M0 == -1.0) {
25317 ret |= 64;
25318 } else {
25319 ret |= (66);
25320 }} else {
25321 ret |= (68);
25322 }}break;
25323 case (1):
25324 ret = 1;
25325 break;
25326 case (0):
25327 break;
25328 }
25329 this.type = ret;
25330 });
25331 Clazz_defineMethod (c$, "getDeterminant", 
25332 function () {
25333 switch (this.state) {
25334 default:
25335 this.stateError ();
25336 case (7):
25337 case (6):
25338 return this.m00 * this.m11 - this.m01 * this.m10;
25339 case (5):
25340 case (4):
25341 return -(this.m01 * this.m10);
25342 case (3):
25343 case (2):
25344 return this.m00 * this.m11;
25345 case (1):
25346 case (0):
25347 return 1.0;
25348 }
25349 });
25350 Clazz_defineMethod (c$, "updateState", 
25351 function () {
25352 if (this.m01 == 0.0 && this.m10 == 0.0) {
25353 if (this.m00 == 1.0 && this.m11 == 1.0) {
25354 if (this.m02 == 0.0 && this.m12 == 0.0) {
25355 this.state = 0;
25356 this.type = 0;
25357 } else {
25358 this.state = 1;
25359 this.type = 1;
25360 }} else {
25361 if (this.m02 == 0.0 && this.m12 == 0.0) {
25362 this.state = 2;
25363 this.type = -1;
25364 } else {
25365 this.state = (3);
25366 this.type = -1;
25367 }}} else {
25368 if (this.m00 == 0.0 && this.m11 == 0.0) {
25369 if (this.m02 == 0.0 && this.m12 == 0.0) {
25370 this.state = 4;
25371 this.type = -1;
25372 } else {
25373 this.state = (5);
25374 this.type = -1;
25375 }} else {
25376 if (this.m02 == 0.0 && this.m12 == 0.0) {
25377 this.state = (6);
25378 this.type = -1;
25379 } else {
25380 this.state = (7);
25381 this.type = -1;
25382 }}}});
25383 Clazz_defineMethod (c$, "stateError", 
25384  function () {
25385 throw  new InternalError ("missing case in transform state switch");
25386 });
25387 Clazz_defineMethod (c$, "getMatrix", 
25388 function (flatmatrix) {
25389 flatmatrix[0] = this.m00;
25390 flatmatrix[1] = this.m10;
25391 flatmatrix[2] = this.m01;
25392 flatmatrix[3] = this.m11;
25393 if (flatmatrix.length > 5) {
25394 flatmatrix[4] = this.m02;
25395 flatmatrix[5] = this.m12;
25396 }}, "~A");
25397 Clazz_defineMethod (c$, "getScaleX", 
25398 function () {
25399 return this.m00;
25400 });
25401 Clazz_defineMethod (c$, "getScaleY", 
25402 function () {
25403 return this.m11;
25404 });
25405 Clazz_defineMethod (c$, "getShearX", 
25406 function () {
25407 return this.m01;
25408 });
25409 Clazz_defineMethod (c$, "getShearY", 
25410 function () {
25411 return this.m10;
25412 });
25413 Clazz_defineMethod (c$, "getTranslateX", 
25414 function () {
25415 return this.m02;
25416 });
25417 Clazz_defineMethod (c$, "getTranslateY", 
25418 function () {
25419 return this.m12;
25420 });
25421 Clazz_defineMethod (c$, "translate", 
25422 function (tx, ty) {
25423 switch (this.state) {
25424 default:
25425 this.stateError ();
25426 case (7):
25427 this.m02 = tx * this.m00 + ty * this.m01 + this.m02;
25428 this.m12 = tx * this.m10 + ty * this.m11 + this.m12;
25429 if (this.m02 == 0.0 && this.m12 == 0.0) {
25430 this.state = 6;
25431 if (this.type != -1) {
25432 this.type -= 1;
25433 }}return;
25434 case (6):
25435 this.m02 = tx * this.m00 + ty * this.m01;
25436 this.m12 = tx * this.m10 + ty * this.m11;
25437 if (this.m02 != 0.0 || this.m12 != 0.0) {
25438 this.state = 7;
25439 this.type |= 1;
25440 }return;
25441 case (5):
25442 this.m02 = ty * this.m01 + this.m02;
25443 this.m12 = tx * this.m10 + this.m12;
25444 if (this.m02 == 0.0 && this.m12 == 0.0) {
25445 this.state = 4;
25446 if (this.type != -1) {
25447 this.type -= 1;
25448 }}return;
25449 case (4):
25450 this.m02 = ty * this.m01;
25451 this.m12 = tx * this.m10;
25452 if (this.m02 != 0.0 || this.m12 != 0.0) {
25453 this.state = 5;
25454 this.type |= 1;
25455 }return;
25456 case (3):
25457 this.m02 = tx * this.m00 + this.m02;
25458 this.m12 = ty * this.m11 + this.m12;
25459 if (this.m02 == 0.0 && this.m12 == 0.0) {
25460 this.state = 2;
25461 if (this.type != -1) {
25462 this.type -= 1;
25463 }}return;
25464 case (2):
25465 this.m02 = tx * this.m00;
25466 this.m12 = ty * this.m11;
25467 if (this.m02 != 0.0 || this.m12 != 0.0) {
25468 this.state = 3;
25469 this.type |= 1;
25470 }return;
25471 case (1):
25472 this.m02 = tx + this.m02;
25473 this.m12 = ty + this.m12;
25474 if (this.m02 == 0.0 && this.m12 == 0.0) {
25475 this.state = 0;
25476 this.type = 0;
25477 }return;
25478 case (0):
25479 this.m02 = tx;
25480 this.m12 = ty;
25481 if (tx != 0.0 || ty != 0.0) {
25482 this.state = 1;
25483 this.type = 1;
25484 }return;
25485 }
25486 }, "~N,~N");
25487 Clazz_defineMethod (c$, "rotate90", 
25488  function () {
25489 var M0 = this.m00;
25490 this.m00 = this.m01;
25491 this.m01 = -M0;
25492 M0 = this.m10;
25493 this.m10 = this.m11;
25494 this.m11 = -M0;
25495 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25496 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25497 state -= 2;
25498 }this.state = state;
25499 this.type = -1;
25500 });
25501 Clazz_defineMethod (c$, "rotate180", 
25502  function () {
25503 this.m00 = -this.m00;
25504 this.m11 = -this.m11;
25505 var state = this.state;
25506 if ((state & (4)) != 0) {
25507 this.m01 = -this.m01;
25508 this.m10 = -this.m10;
25509 } else {
25510 if (this.m00 == 1.0 && this.m11 == 1.0) {
25511 this.state = state & -3;
25512 } else {
25513 this.state = state | 2;
25514 }}this.type = -1;
25515 });
25516 Clazz_defineMethod (c$, "rotate270", 
25517  function () {
25518 var M0 = this.m00;
25519 this.m00 = -this.m01;
25520 this.m01 = M0;
25521 M0 = this.m10;
25522 this.m10 = -this.m11;
25523 this.m11 = M0;
25524 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25525 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25526 state -= 2;
25527 }this.state = state;
25528 this.type = -1;
25529 });
25530 Clazz_defineMethod (c$, "rotate", 
25531 function (theta) {
25532 var sin = Math.sin (theta);
25533 if (sin == 1.0) {
25534 this.rotate90 ();
25535 } else if (sin == -1.0) {
25536 this.rotate270 ();
25537 } else {
25538 var cos = Math.cos (theta);
25539 if (cos == -1.0) {
25540 this.rotate180 ();
25541 } else if (cos != 1.0) {
25542 var M0;
25543 var M1;
25544 M0 = this.m00;
25545 M1 = this.m01;
25546 this.m00 = cos * M0 + sin * M1;
25547 this.m01 = -sin * M0 + cos * M1;
25548 M0 = this.m10;
25549 M1 = this.m11;
25550 this.m10 = cos * M0 + sin * M1;
25551 this.m11 = -sin * M0 + cos * M1;
25552 this.updateState ();
25553 }}}, "~N");
25554 Clazz_defineMethod (c$, "rotate", 
25555 function (theta, anchorx, anchory) {
25556 this.translate (anchorx, anchory);
25557 this.rotate (theta);
25558 this.translate (-anchorx, -anchory);
25559 }, "~N,~N,~N");
25560 Clazz_defineMethod (c$, "rotate", 
25561 function (vecx, vecy) {
25562 if (vecy == 0.0) {
25563 if (vecx < 0.0) {
25564 this.rotate180 ();
25565 }} else if (vecx == 0.0) {
25566 if (vecy > 0.0) {
25567 this.rotate90 ();
25568 } else {
25569 this.rotate270 ();
25570 }} else {
25571 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25572 var sin = vecy / len;
25573 var cos = vecx / len;
25574 var M0;
25575 var M1;
25576 M0 = this.m00;
25577 M1 = this.m01;
25578 this.m00 = cos * M0 + sin * M1;
25579 this.m01 = -sin * M0 + cos * M1;
25580 M0 = this.m10;
25581 M1 = this.m11;
25582 this.m10 = cos * M0 + sin * M1;
25583 this.m11 = -sin * M0 + cos * M1;
25584 this.updateState ();
25585 }}, "~N,~N");
25586 Clazz_defineMethod (c$, "rotate", 
25587 function (vecx, vecy, anchorx, anchory) {
25588 this.translate (anchorx, anchory);
25589 this.rotate (vecx, vecy);
25590 this.translate (-anchorx, -anchory);
25591 }, "~N,~N,~N,~N");
25592 Clazz_defineMethod (c$, "quadrantRotate", 
25593 function (numquadrants) {
25594 switch (numquadrants & 3) {
25595 case 0:
25596 break;
25597 case 1:
25598 this.rotate90 ();
25599 break;
25600 case 2:
25601 this.rotate180 ();
25602 break;
25603 case 3:
25604 this.rotate270 ();
25605 break;
25606 }
25607 }, "~N");
25608 Clazz_defineMethod (c$, "quadrantRotate", 
25609 function (numquadrants, anchorx, anchory) {
25610 switch (numquadrants & 3) {
25611 case 0:
25612 return;
25613 case 1:
25614 this.m02 += anchorx * (this.m00 - this.m01) + anchory * (this.m01 + this.m00);
25615 this.m12 += anchorx * (this.m10 - this.m11) + anchory * (this.m11 + this.m10);
25616 this.rotate90 ();
25617 break;
25618 case 2:
25619 this.m02 += anchorx * (this.m00 + this.m00) + anchory * (this.m01 + this.m01);
25620 this.m12 += anchorx * (this.m10 + this.m10) + anchory * (this.m11 + this.m11);
25621 this.rotate180 ();
25622 break;
25623 case 3:
25624 this.m02 += anchorx * (this.m00 + this.m01) + anchory * (this.m01 - this.m00);
25625 this.m12 += anchorx * (this.m10 + this.m11) + anchory * (this.m11 - this.m10);
25626 this.rotate270 ();
25627 break;
25628 }
25629 if (this.m02 == 0.0 && this.m12 == 0.0) {
25630 this.state &= -2;
25631 } else {
25632 this.state |= 1;
25633 }}, "~N,~N,~N");
25634 Clazz_defineMethod (c$, "scale", 
25635 function (sx, sy) {
25636 var state = this.state;
25637 switch (state) {
25638 default:
25639 this.stateError ();
25640 case (7):
25641 case (6):
25642 this.m00 *= sx;
25643 this.m11 *= sy;
25644 case (5):
25645 case (4):
25646 this.m01 *= sy;
25647 this.m10 *= sx;
25648 if (this.m01 == 0 && this.m10 == 0) {
25649 state &= 1;
25650 if (this.m00 == 1.0 && this.m11 == 1.0) {
25651 this.type = (state == 0 ? 0 : 1);
25652 } else {
25653 state |= 2;
25654 this.type = -1;
25655 }this.state = state;
25656 }return;
25657 case (3):
25658 case (2):
25659 this.m00 *= sx;
25660 this.m11 *= sy;
25661 if (this.m00 == 1.0 && this.m11 == 1.0) {
25662 this.state = (state &= 1);
25663 this.type = (state == 0 ? 0 : 1);
25664 } else {
25665 this.type = -1;
25666 }return;
25667 case (1):
25668 case (0):
25669 this.m00 = sx;
25670 this.m11 = sy;
25671 if (sx != 1.0 || sy != 1.0) {
25672 this.state = state | 2;
25673 this.type = -1;
25674 }return;
25675 }
25676 }, "~N,~N");
25677 Clazz_defineMethod (c$, "shear", 
25678 function (shx, shy) {
25679 var state = this.state;
25680 switch (state) {
25681 default:
25682 this.stateError ();
25683 case (7):
25684 case (6):
25685 var M0;
25686 var M1;
25687 M0 = this.m00;
25688 M1 = this.m01;
25689 this.m00 = M0 + M1 * shy;
25690 this.m01 = M0 * shx + M1;
25691 M0 = this.m10;
25692 M1 = this.m11;
25693 this.m10 = M0 + M1 * shy;
25694 this.m11 = M0 * shx + M1;
25695 this.updateState ();
25696 return;
25697 case (5):
25698 case (4):
25699 this.m00 = this.m01 * shy;
25700 this.m11 = this.m10 * shx;
25701 if (this.m00 != 0.0 || this.m11 != 0.0) {
25702 this.state = state | 2;
25703 }this.type = -1;
25704 return;
25705 case (3):
25706 case (2):
25707 this.m01 = this.m00 * shx;
25708 this.m10 = this.m11 * shy;
25709 if (this.m01 != 0.0 || this.m10 != 0.0) {
25710 this.state = state | 4;
25711 }this.type = -1;
25712 return;
25713 case (1):
25714 case (0):
25715 this.m01 = shx;
25716 this.m10 = shy;
25717 if (this.m01 != 0.0 || this.m10 != 0.0) {
25718 this.state = state | 2 | 4;
25719 this.type = -1;
25720 }return;
25721 }
25722 }, "~N,~N");
25723 Clazz_defineMethod (c$, "setToIdentity", 
25724 function () {
25725 this.m00 = this.m11 = 1.0;
25726 this.m10 = this.m01 = this.m02 = this.m12 = 0.0;
25727 this.state = 0;
25728 this.type = 0;
25729 });
25730 Clazz_defineMethod (c$, "setToTranslation", 
25731 function (tx, ty) {
25732 this.m00 = 1.0;
25733 this.m10 = 0.0;
25734 this.m01 = 0.0;
25735 this.m11 = 1.0;
25736 this.m02 = tx;
25737 this.m12 = ty;
25738 if (tx != 0.0 || ty != 0.0) {
25739 this.state = 1;
25740 this.type = 1;
25741 } else {
25742 this.state = 0;
25743 this.type = 0;
25744 }}, "~N,~N");
25745 Clazz_defineMethod (c$, "setToRotation", 
25746 function (theta) {
25747 var sin = Math.sin (theta);
25748 var cos;
25749 if (sin == 1.0 || sin == -1.0) {
25750 cos = 0.0;
25751 this.state = 4;
25752 this.type = 8;
25753 } else {
25754 cos = Math.cos (theta);
25755 if (cos == -1.0) {
25756 sin = 0.0;
25757 this.state = 2;
25758 this.type = 8;
25759 } else if (cos == 1.0) {
25760 sin = 0.0;
25761 this.state = 0;
25762 this.type = 0;
25763 } else {
25764 this.state = 6;
25765 this.type = 16;
25766 }}this.m00 = cos;
25767 this.m10 = sin;
25768 this.m01 = -sin;
25769 this.m11 = cos;
25770 this.m02 = 0.0;
25771 this.m12 = 0.0;
25772 }, "~N");
25773 Clazz_defineMethod (c$, "setToRotation", 
25774 function (theta, anchorx, anchory) {
25775 this.setToRotation (theta);
25776 var sin = this.m10;
25777 var oneMinusCos = 1.0 - this.m00;
25778 this.m02 = anchorx * oneMinusCos + anchory * sin;
25779 this.m12 = anchory * oneMinusCos - anchorx * sin;
25780 if (this.m02 != 0.0 || this.m12 != 0.0) {
25781 this.state |= 1;
25782 this.type |= 1;
25783 }}, "~N,~N,~N");
25784 Clazz_defineMethod (c$, "setToRotation", 
25785 function (vecx, vecy) {
25786 var sin;
25787 var cos;
25788 if (vecy == 0) {
25789 sin = 0.0;
25790 if (vecx < 0.0) {
25791 cos = -1.0;
25792 this.state = 2;
25793 this.type = 8;
25794 } else {
25795 cos = 1.0;
25796 this.state = 0;
25797 this.type = 0;
25798 }} else if (vecx == 0) {
25799 cos = 0.0;
25800 sin = (vecy > 0.0) ? 1.0 : -1.0;
25801 this.state = 4;
25802 this.type = 8;
25803 } else {
25804 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25805 cos = vecx / len;
25806 sin = vecy / len;
25807 this.state = 6;
25808 this.type = 16;
25809 }this.m00 = cos;
25810 this.m10 = sin;
25811 this.m01 = -sin;
25812 this.m11 = cos;
25813 this.m02 = 0.0;
25814 this.m12 = 0.0;
25815 }, "~N,~N");
25816 Clazz_defineMethod (c$, "setToRotation", 
25817 function (vecx, vecy, anchorx, anchory) {
25818 this.setToRotation (vecx, vecy);
25819 var sin = this.m10;
25820 var oneMinusCos = 1.0 - this.m00;
25821 this.m02 = anchorx * oneMinusCos + anchory * sin;
25822 this.m12 = anchory * oneMinusCos - anchorx * sin;
25823 if (this.m02 != 0.0 || this.m12 != 0.0) {
25824 this.state |= 1;
25825 this.type |= 1;
25826 }}, "~N,~N,~N,~N");
25827 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25828 function (numquadrants) {
25829 switch (numquadrants & 3) {
25830 case 0:
25831 this.m00 = 1.0;
25832 this.m10 = 0.0;
25833 this.m01 = 0.0;
25834 this.m11 = 1.0;
25835 this.m02 = 0.0;
25836 this.m12 = 0.0;
25837 this.state = 0;
25838 this.type = 0;
25839 break;
25840 case 1:
25841 this.m00 = 0.0;
25842 this.m10 = 1.0;
25843 this.m01 = -1.0;
25844 this.m11 = 0.0;
25845 this.m02 = 0.0;
25846 this.m12 = 0.0;
25847 this.state = 4;
25848 this.type = 8;
25849 break;
25850 case 2:
25851 this.m00 = -1.0;
25852 this.m10 = 0.0;
25853 this.m01 = 0.0;
25854 this.m11 = -1.0;
25855 this.m02 = 0.0;
25856 this.m12 = 0.0;
25857 this.state = 2;
25858 this.type = 8;
25859 break;
25860 case 3:
25861 this.m00 = 0.0;
25862 this.m10 = -1.0;
25863 this.m01 = 1.0;
25864 this.m11 = 0.0;
25865 this.m02 = 0.0;
25866 this.m12 = 0.0;
25867 this.state = 4;
25868 this.type = 8;
25869 break;
25870 }
25871 }, "~N");
25872 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25873 function (numquadrants, anchorx, anchory) {
25874 switch (numquadrants & 3) {
25875 case 0:
25876 this.m00 = 1.0;
25877 this.m10 = 0.0;
25878 this.m01 = 0.0;
25879 this.m11 = 1.0;
25880 this.m02 = 0.0;
25881 this.m12 = 0.0;
25882 this.state = 0;
25883 this.type = 0;
25884 break;
25885 case 1:
25886 this.m00 = 0.0;
25887 this.m10 = 1.0;
25888 this.m01 = -1.0;
25889 this.m11 = 0.0;
25890 this.m02 = anchorx + anchory;
25891 this.m12 = anchory - anchorx;
25892 if (this.m02 == 0.0 && this.m12 == 0.0) {
25893 this.state = 4;
25894 this.type = 8;
25895 } else {
25896 this.state = 5;
25897 this.type = 9;
25898 }break;
25899 case 2:
25900 this.m00 = -1.0;
25901 this.m10 = 0.0;
25902 this.m01 = 0.0;
25903 this.m11 = -1.0;
25904 this.m02 = anchorx + anchorx;
25905 this.m12 = anchory + anchory;
25906 if (this.m02 == 0.0 && this.m12 == 0.0) {
25907 this.state = 2;
25908 this.type = 8;
25909 } else {
25910 this.state = 3;
25911 this.type = 9;
25912 }break;
25913 case 3:
25914 this.m00 = 0.0;
25915 this.m10 = -1.0;
25916 this.m01 = 1.0;
25917 this.m11 = 0.0;
25918 this.m02 = anchorx - anchory;
25919 this.m12 = anchory + anchorx;
25920 if (this.m02 == 0.0 && this.m12 == 0.0) {
25921 this.state = 4;
25922 this.type = 8;
25923 } else {
25924 this.state = 5;
25925 this.type = 9;
25926 }break;
25927 }
25928 }, "~N,~N,~N");
25929 Clazz_defineMethod (c$, "setToScale", 
25930 function (sx, sy) {
25931 this.m00 = sx;
25932 this.m10 = 0.0;
25933 this.m01 = 0.0;
25934 this.m11 = sy;
25935 this.m02 = 0.0;
25936 this.m12 = 0.0;
25937 if (sx != 1.0 || sy != 1.0) {
25938 this.state = 2;
25939 this.type = -1;
25940 } else {
25941 this.state = 0;
25942 this.type = 0;
25943 }}, "~N,~N");
25944 Clazz_defineMethod (c$, "setToShear", 
25945 function (shx, shy) {
25946 this.m00 = 1.0;
25947 this.m01 = shx;
25948 this.m10 = shy;
25949 this.m11 = 1.0;
25950 this.m02 = 0.0;
25951 this.m12 = 0.0;
25952 if (shx != 0.0 || shy != 0.0) {
25953 this.state = (6);
25954 this.type = -1;
25955 } else {
25956 this.state = 0;
25957 this.type = 0;
25958 }}, "~N,~N");
25959 Clazz_defineMethod (c$, "setTransform", 
25960 function (Tx) {
25961 this.m00 = Tx.m00;
25962 this.m10 = Tx.m10;
25963 this.m01 = Tx.m01;
25964 this.m11 = Tx.m11;
25965 this.m02 = Tx.m02;
25966 this.m12 = Tx.m12;
25967 this.state = Tx.state;
25968 this.type = Tx.type;
25969 }, "java.awt.geom.AffineTransform");
25970 Clazz_defineMethod (c$, "setTransform", 
25971 function (m00, m10, m01, m11, m02, m12) {
25972 this.m00 = m00;
25973 this.m10 = m10;
25974 this.m01 = m01;
25975 this.m11 = m11;
25976 this.m02 = m02;
25977 this.m12 = m12;
25978 this.updateState ();
25979 }, "~N,~N,~N,~N,~N,~N");
25980 Clazz_defineMethod (c$, "concatenate", 
25981 function (Tx) {
25982 var M0;
25983 var M1;
25984 var T00;
25985 var T01;
25986 var T10;
25987 var T11;
25988 var T02;
25989 var T12;
25990 var mystate = this.state;
25991 var txstate = Tx.state;
25992 switch ((txstate << 3) | mystate) {
25993 case (0):
25994 case (1):
25995 case (2):
25996 case (3):
25997 case (4):
25998 case (5):
25999 case (6):
26000 case (7):
26001 return;
26002 case (56):
26003 this.m01 = Tx.m01;
26004 this.m10 = Tx.m10;
26005 case (24):
26006 this.m00 = Tx.m00;
26007 this.m11 = Tx.m11;
26008 case (8):
26009 this.m02 = Tx.m02;
26010 this.m12 = Tx.m12;
26011 this.state = txstate;
26012 this.type = Tx.type;
26013 return;
26014 case (48):
26015 this.m01 = Tx.m01;
26016 this.m10 = Tx.m10;
26017 case (16):
26018 this.m00 = Tx.m00;
26019 this.m11 = Tx.m11;
26020 this.state = txstate;
26021 this.type = Tx.type;
26022 return;
26023 case (40):
26024 this.m02 = Tx.m02;
26025 this.m12 = Tx.m12;
26026 case (32):
26027 this.m01 = Tx.m01;
26028 this.m10 = Tx.m10;
26029 this.m00 = this.m11 = 0.0;
26030 this.state = txstate;
26031 this.type = Tx.type;
26032 return;
26033 case (15):
26034 case (14):
26035 case (13):
26036 case (12):
26037 case (11):
26038 case (10):
26039 case (9):
26040 this.translate (Tx.m02, Tx.m12);
26041 return;
26042 case (23):
26043 case (22):
26044 case (21):
26045 case (20):
26046 case (19):
26047 case (18):
26048 case (17):
26049 this.scale (Tx.m00, Tx.m11);
26050 return;
26051 case (39):
26052 case (38):
26053 T01 = Tx.m01;
26054 T10 = Tx.m10;
26055 M0 = this.m00;
26056 this.m00 = this.m01 * T10;
26057 this.m01 = M0 * T01;
26058 M0 = this.m10;
26059 this.m10 = this.m11 * T10;
26060 this.m11 = M0 * T01;
26061 this.type = -1;
26062 return;
26063 case (37):
26064 case (36):
26065 this.m00 = this.m01 * Tx.m10;
26066 this.m01 = 0.0;
26067 this.m11 = this.m10 * Tx.m01;
26068 this.m10 = 0.0;
26069 this.state = mystate ^ (6);
26070 this.type = -1;
26071 return;
26072 case (35):
26073 case (34):
26074 this.m01 = this.m00 * Tx.m01;
26075 this.m00 = 0.0;
26076 this.m10 = this.m11 * Tx.m10;
26077 this.m11 = 0.0;
26078 this.state = mystate ^ (6);
26079 this.type = -1;
26080 return;
26081 case (33):
26082 this.m00 = 0.0;
26083 this.m01 = Tx.m01;
26084 this.m10 = Tx.m10;
26085 this.m11 = 0.0;
26086 this.state = 5;
26087 this.type = -1;
26088 return;
26089 }
26090 T00 = Tx.m00;
26091 T01 = Tx.m01;
26092 T02 = Tx.m02;
26093 T10 = Tx.m10;
26094 T11 = Tx.m11;
26095 T12 = Tx.m12;
26096 switch (mystate) {
26097 default:
26098 this.stateError ();
26099 case (6):
26100 this.state = mystate | txstate;
26101 case (7):
26102 M0 = this.m00;
26103 M1 = this.m01;
26104 this.m00 = T00 * M0 + T10 * M1;
26105 this.m01 = T01 * M0 + T11 * M1;
26106 this.m02 += T02 * M0 + T12 * M1;
26107 M0 = this.m10;
26108 M1 = this.m11;
26109 this.m10 = T00 * M0 + T10 * M1;
26110 this.m11 = T01 * M0 + T11 * M1;
26111 this.m12 += T02 * M0 + T12 * M1;
26112 this.type = -1;
26113 return;
26114 case (5):
26115 case (4):
26116 M0 = this.m01;
26117 this.m00 = T10 * M0;
26118 this.m01 = T11 * M0;
26119 this.m02 += T12 * M0;
26120 M0 = this.m10;
26121 this.m10 = T00 * M0;
26122 this.m11 = T01 * M0;
26123 this.m12 += T02 * M0;
26124 break;
26125 case (3):
26126 case (2):
26127 M0 = this.m00;
26128 this.m00 = T00 * M0;
26129 this.m01 = T01 * M0;
26130 this.m02 += T02 * M0;
26131 M0 = this.m11;
26132 this.m10 = T10 * M0;
26133 this.m11 = T11 * M0;
26134 this.m12 += T12 * M0;
26135 break;
26136 case (1):
26137 this.m00 = T00;
26138 this.m01 = T01;
26139 this.m02 += T02;
26140 this.m10 = T10;
26141 this.m11 = T11;
26142 this.m12 += T12;
26143 this.state = txstate | 1;
26144 this.type = -1;
26145 return;
26146 }
26147 this.updateState ();
26148 }, "java.awt.geom.AffineTransform");
26149 Clazz_defineMethod (c$, "preConcatenate", 
26150 function (Tx) {
26151 var M0;
26152 var M1;
26153 var T00;
26154 var T01;
26155 var T10;
26156 var T11;
26157 var T02;
26158 var T12;
26159 var mystate = this.state;
26160 var txstate = Tx.state;
26161 switch ((txstate << 3) | mystate) {
26162 case (0):
26163 case (1):
26164 case (2):
26165 case (3):
26166 case (4):
26167 case (5):
26168 case (6):
26169 case (7):
26170 return;
26171 case (8):
26172 case (10):
26173 case (12):
26174 case (14):
26175 this.m02 = Tx.m02;
26176 this.m12 = Tx.m12;
26177 this.state = mystate | 1;
26178 this.type |= 1;
26179 return;
26180 case (9):
26181 case (11):
26182 case (13):
26183 case (15):
26184 this.m02 = this.m02 + Tx.m02;
26185 this.m12 = this.m12 + Tx.m12;
26186 return;
26187 case (17):
26188 case (16):
26189 this.state = mystate | 2;
26190 case (23):
26191 case (22):
26192 case (21):
26193 case (20):
26194 case (19):
26195 case (18):
26196 T00 = Tx.m00;
26197 T11 = Tx.m11;
26198 if ((mystate & 4) != 0) {
26199 this.m01 = this.m01 * T00;
26200 this.m10 = this.m10 * T11;
26201 if ((mystate & 2) != 0) {
26202 this.m00 = this.m00 * T00;
26203 this.m11 = this.m11 * T11;
26204 }} else {
26205 this.m00 = this.m00 * T00;
26206 this.m11 = this.m11 * T11;
26207 }if ((mystate & 1) != 0) {
26208 this.m02 = this.m02 * T00;
26209 this.m12 = this.m12 * T11;
26210 }this.type = -1;
26211 return;
26212 case (37):
26213 case (36):
26214 mystate = mystate | 2;
26215 case (33):
26216 case (32):
26217 case (35):
26218 case (34):
26219 this.state = mystate ^ 4;
26220 case (39):
26221 case (38):
26222 T01 = Tx.m01;
26223 T10 = Tx.m10;
26224 M0 = this.m00;
26225 this.m00 = this.m10 * T01;
26226 this.m10 = M0 * T10;
26227 M0 = this.m01;
26228 this.m01 = this.m11 * T01;
26229 this.m11 = M0 * T10;
26230 M0 = this.m02;
26231 this.m02 = this.m12 * T01;
26232 this.m12 = M0 * T10;
26233 this.type = -1;
26234 return;
26235 }
26236 T00 = Tx.m00;
26237 T01 = Tx.m01;
26238 T02 = Tx.m02;
26239 T10 = Tx.m10;
26240 T11 = Tx.m11;
26241 T12 = Tx.m12;
26242 switch (mystate) {
26243 default:
26244 this.stateError ();
26245 case (7):
26246 M0 = this.m02;
26247 M1 = this.m12;
26248 T02 += M0 * T00 + M1 * T01;
26249 T12 += M0 * T10 + M1 * T11;
26250 case (6):
26251 this.m02 = T02;
26252 this.m12 = T12;
26253 M0 = this.m00;
26254 M1 = this.m10;
26255 this.m00 = M0 * T00 + M1 * T01;
26256 this.m10 = M0 * T10 + M1 * T11;
26257 M0 = this.m01;
26258 M1 = this.m11;
26259 this.m01 = M0 * T00 + M1 * T01;
26260 this.m11 = M0 * T10 + M1 * T11;
26261 break;
26262 case (5):
26263 M0 = this.m02;
26264 M1 = this.m12;
26265 T02 += M0 * T00 + M1 * T01;
26266 T12 += M0 * T10 + M1 * T11;
26267 case (4):
26268 this.m02 = T02;
26269 this.m12 = T12;
26270 M0 = this.m10;
26271 this.m00 = M0 * T01;
26272 this.m10 = M0 * T11;
26273 M0 = this.m01;
26274 this.m01 = M0 * T00;
26275 this.m11 = M0 * T10;
26276 break;
26277 case (3):
26278 M0 = this.m02;
26279 M1 = this.m12;
26280 T02 += M0 * T00 + M1 * T01;
26281 T12 += M0 * T10 + M1 * T11;
26282 case (2):
26283 this.m02 = T02;
26284 this.m12 = T12;
26285 M0 = this.m00;
26286 this.m00 = M0 * T00;
26287 this.m10 = M0 * T10;
26288 M0 = this.m11;
26289 this.m01 = M0 * T01;
26290 this.m11 = M0 * T11;
26291 break;
26292 case (1):
26293 M0 = this.m02;
26294 M1 = this.m12;
26295 T02 += M0 * T00 + M1 * T01;
26296 T12 += M0 * T10 + M1 * T11;
26297 case (0):
26298 this.m02 = T02;
26299 this.m12 = T12;
26300 this.m00 = T00;
26301 this.m10 = T10;
26302 this.m01 = T01;
26303 this.m11 = T11;
26304 this.state = mystate | txstate;
26305 this.type = -1;
26306 return;
26307 }
26308 this.updateState ();
26309 }, "java.awt.geom.AffineTransform");
26310 Clazz_defineMethod (c$, "createInverse", 
26311 function () {
26312 var det;
26313 switch (this.state) {
26314 default:
26315 this.stateError ();
26316 case (7):
26317 det = this.m00 * this.m11 - this.m01 * this.m10;
26318 if (Math.abs (det) <= 4.9E-324) {
26319 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26320 }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));
26321 case (6):
26322 det = this.m00 * this.m11 - this.m01 * this.m10;
26323 if (Math.abs (det) <= 4.9E-324) {
26324 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26325 }return  new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, 0.0, 0.0, (6));
26326 case (5):
26327 if (this.m01 == 0.0 || this.m10 == 0.0) {
26328 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26329 }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));
26330 case (4):
26331 if (this.m01 == 0.0 || this.m10 == 0.0) {
26332 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26333 }return  new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, 0.0, 0.0, (4));
26334 case (3):
26335 if (this.m00 == 0.0 || this.m11 == 0.0) {
26336 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26337 }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));
26338 case (2):
26339 if (this.m00 == 0.0 || this.m11 == 0.0) {
26340 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26341 }return  new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, 0.0, 0.0, (2));
26342 case (1):
26343 return  new java.awt.geom.AffineTransform (1.0, 0.0, 0.0, 1.0, -this.m02, -this.m12, (1));
26344 case (0):
26345 return  new java.awt.geom.AffineTransform ();
26346 }
26347 });
26348 Clazz_defineMethod (c$, "invert", 
26349 function () {
26350 var M00;
26351 var M01;
26352 var M02;
26353 var M10;
26354 var M11;
26355 var M12;
26356 var det;
26357 switch (this.state) {
26358 default:
26359 this.stateError ();
26360 case (7):
26361 M00 = this.m00;
26362 M01 = this.m01;
26363 M02 = this.m02;
26364 M10 = this.m10;
26365 M11 = this.m11;
26366 M12 = this.m12;
26367 det = M00 * M11 - M01 * M10;
26368 if (Math.abs (det) <= 4.9E-324) {
26369 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26370 }this.m00 = M11 / det;
26371 this.m10 = -M10 / det;
26372 this.m01 = -M01 / det;
26373 this.m11 = M00 / det;
26374 this.m02 = (M01 * M12 - M11 * M02) / det;
26375 this.m12 = (M10 * M02 - M00 * M12) / det;
26376 break;
26377 case (6):
26378 M00 = this.m00;
26379 M01 = this.m01;
26380 M10 = this.m10;
26381 M11 = this.m11;
26382 det = M00 * M11 - M01 * M10;
26383 if (Math.abs (det) <= 4.9E-324) {
26384 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26385 }this.m00 = M11 / det;
26386 this.m10 = -M10 / det;
26387 this.m01 = -M01 / det;
26388 this.m11 = M00 / det;
26389 break;
26390 case (5):
26391 M01 = this.m01;
26392 M02 = this.m02;
26393 M10 = this.m10;
26394 M12 = this.m12;
26395 if (M01 == 0.0 || M10 == 0.0) {
26396 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26397 }this.m10 = 1.0 / M01;
26398 this.m01 = 1.0 / M10;
26399 this.m02 = -M12 / M10;
26400 this.m12 = -M02 / M01;
26401 break;
26402 case (4):
26403 M01 = this.m01;
26404 M10 = this.m10;
26405 if (M01 == 0.0 || M10 == 0.0) {
26406 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26407 }this.m10 = 1.0 / M01;
26408 this.m01 = 1.0 / M10;
26409 break;
26410 case (3):
26411 M00 = this.m00;
26412 M02 = this.m02;
26413 M11 = this.m11;
26414 M12 = this.m12;
26415 if (M00 == 0.0 || M11 == 0.0) {
26416 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26417 }this.m00 = 1.0 / M00;
26418 this.m11 = 1.0 / M11;
26419 this.m02 = -M02 / M00;
26420 this.m12 = -M12 / M11;
26421 break;
26422 case (2):
26423 M00 = this.m00;
26424 M11 = this.m11;
26425 if (M00 == 0.0 || M11 == 0.0) {
26426 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26427 }this.m00 = 1.0 / M00;
26428 this.m11 = 1.0 / M11;
26429 break;
26430 case (1):
26431 this.m02 = -this.m02;
26432 this.m12 = -this.m12;
26433 break;
26434 case (0):
26435 break;
26436 }
26437 });
26438 Clazz_defineMethod (c$, "transform", 
26439 function (ptSrc, ptDst) {
26440 if (ptDst == null) {
26441 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26442 ptDst =  new java.awt.geom.Point2D.Double ();
26443 } else {
26444 ptDst =  new java.awt.geom.Point2D.Float ();
26445 }}var x = ptSrc.getX ();
26446 var y = ptSrc.getY ();
26447 switch (this.state) {
26448 default:
26449 this.stateError ();
26450 case (7):
26451 ptDst.setLocation (x * this.m00 + y * this.m01 + this.m02, x * this.m10 + y * this.m11 + this.m12);
26452 return ptDst;
26453 case (6):
26454 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26455 return ptDst;
26456 case (5):
26457 ptDst.setLocation (y * this.m01 + this.m02, x * this.m10 + this.m12);
26458 return ptDst;
26459 case (4):
26460 ptDst.setLocation (y * this.m01, x * this.m10);
26461 return ptDst;
26462 case (3):
26463 ptDst.setLocation (x * this.m00 + this.m02, y * this.m11 + this.m12);
26464 return ptDst;
26465 case (2):
26466 ptDst.setLocation (x * this.m00, y * this.m11);
26467 return ptDst;
26468 case (1):
26469 ptDst.setLocation (x + this.m02, y + this.m12);
26470 return ptDst;
26471 case (0):
26472 ptDst.setLocation (x, y);
26473 return ptDst;
26474 }
26475 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26476 Clazz_defineMethod (c$, "transform", 
26477 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26478 if (numPts == 0) return;
26479 if (!JU.AU.isAD (srcPts)) {
26480 var src = srcPts;
26481 var dst = dstPts;
26482 this.transform (src, srcOff, dst, dstOff, numPts);
26483 return;
26484 }var M00;
26485 var M01;
26486 var M02;
26487 var M10;
26488 var M11;
26489 var M12;
26490 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26491 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26492 srcOff = dstOff;
26493 }switch (this.state) {
26494 default:
26495 this.stateError ();
26496 case (7):
26497 M00 = this.m00;
26498 M01 = this.m01;
26499 M02 = this.m02;
26500 M10 = this.m10;
26501 M11 = this.m11;
26502 M12 = this.m12;
26503 while (--numPts >= 0) {
26504 var x = srcPts[srcOff++];
26505 var y = srcPts[srcOff++];
26506 dstPts[dstOff++] = M00 * x + M01 * y + M02;
26507 dstPts[dstOff++] = M10 * x + M11 * y + M12;
26508 }
26509 return;
26510 case (6):
26511 M00 = this.m00;
26512 M01 = this.m01;
26513 M10 = this.m10;
26514 M11 = this.m11;
26515 while (--numPts >= 0) {
26516 var x = srcPts[srcOff++];
26517 var y = srcPts[srcOff++];
26518 dstPts[dstOff++] = M00 * x + M01 * y;
26519 dstPts[dstOff++] = M10 * x + M11 * y;
26520 }
26521 return;
26522 case (5):
26523 M01 = this.m01;
26524 M02 = this.m02;
26525 M10 = this.m10;
26526 M12 = this.m12;
26527 while (--numPts >= 0) {
26528 var x = srcPts[srcOff++];
26529 dstPts[dstOff++] = M01 * srcPts[srcOff++] + M02;
26530 dstPts[dstOff++] = M10 * x + M12;
26531 }
26532 return;
26533 case (4):
26534 M01 = this.m01;
26535 M10 = this.m10;
26536 while (--numPts >= 0) {
26537 var x = srcPts[srcOff++];
26538 dstPts[dstOff++] = M01 * srcPts[srcOff++];
26539 dstPts[dstOff++] = M10 * x;
26540 }
26541 return;
26542 case (3):
26543 M00 = this.m00;
26544 M02 = this.m02;
26545 M11 = this.m11;
26546 M12 = this.m12;
26547 while (--numPts >= 0) {
26548 dstPts[dstOff++] = M00 * srcPts[srcOff++] + M02;
26549 dstPts[dstOff++] = M11 * srcPts[srcOff++] + M12;
26550 }
26551 return;
26552 case (2):
26553 M00 = this.m00;
26554 M11 = this.m11;
26555 while (--numPts >= 0) {
26556 dstPts[dstOff++] = M00 * srcPts[srcOff++];
26557 dstPts[dstOff++] = M11 * srcPts[srcOff++];
26558 }
26559 return;
26560 case (1):
26561 M02 = this.m02;
26562 M12 = this.m12;
26563 while (--numPts >= 0) {
26564 dstPts[dstOff++] = srcPts[srcOff++] + M02;
26565 dstPts[dstOff++] = srcPts[srcOff++] + M12;
26566 }
26567 return;
26568 case (0):
26569 if (srcPts !== dstPts || srcOff != dstOff) {
26570 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26571 }return;
26572 }
26573 }, "~A,~N,~A,~N,~N");
26574 Clazz_defineMethod (c$, "inverseTransform", 
26575 function (ptSrc, ptDst) {
26576 if (ptDst == null) {
26577 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26578 ptDst =  new java.awt.geom.Point2D.Double ();
26579 } else {
26580 ptDst =  new java.awt.geom.Point2D.Float ();
26581 }}var x = ptSrc.getX ();
26582 var y = ptSrc.getY ();
26583 switch (this.state) {
26584 default:
26585 this.stateError ();
26586 case (7):
26587 x -= this.m02;
26588 y -= this.m12;
26589 case (6):
26590 var det = this.m00 * this.m11 - this.m01 * this.m10;
26591 if (Math.abs (det) <= 4.9E-324) {
26592 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26593 }ptDst.setLocation ((x * this.m11 - y * this.m01) / det, (y * this.m00 - x * this.m10) / det);
26594 return ptDst;
26595 case (5):
26596 x -= this.m02;
26597 y -= this.m12;
26598 case (4):
26599 if (this.m01 == 0.0 || this.m10 == 0.0) {
26600 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26601 }ptDst.setLocation (y / this.m10, x / this.m01);
26602 return ptDst;
26603 case (3):
26604 x -= this.m02;
26605 y -= this.m12;
26606 case (2):
26607 if (this.m00 == 0.0 || this.m11 == 0.0) {
26608 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26609 }ptDst.setLocation (x / this.m00, y / this.m11);
26610 return ptDst;
26611 case (1):
26612 ptDst.setLocation (x - this.m02, y - this.m12);
26613 return ptDst;
26614 case (0):
26615 ptDst.setLocation (x, y);
26616 return ptDst;
26617 }
26618 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26619 Clazz_defineMethod (c$, "inverseTransform", 
26620 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26621 var M00;
26622 var M01;
26623 var M02;
26624 var M10;
26625 var M11;
26626 var M12;
26627 var det;
26628 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26629 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26630 srcOff = dstOff;
26631 }switch (this.state) {
26632 default:
26633 this.stateError ();
26634 case (7):
26635 M00 = this.m00;
26636 M01 = this.m01;
26637 M02 = this.m02;
26638 M10 = this.m10;
26639 M11 = this.m11;
26640 M12 = this.m12;
26641 det = M00 * M11 - M01 * M10;
26642 if (Math.abs (det) <= 4.9E-324) {
26643 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26644 }while (--numPts >= 0) {
26645 var x = srcPts[srcOff++] - M02;
26646 var y = srcPts[srcOff++] - M12;
26647 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26648 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26649 }
26650 return;
26651 case (6):
26652 M00 = this.m00;
26653 M01 = this.m01;
26654 M10 = this.m10;
26655 M11 = this.m11;
26656 det = M00 * M11 - M01 * M10;
26657 if (Math.abs (det) <= 4.9E-324) {
26658 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26659 }while (--numPts >= 0) {
26660 var x = srcPts[srcOff++];
26661 var y = srcPts[srcOff++];
26662 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26663 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26664 }
26665 return;
26666 case (5):
26667 M01 = this.m01;
26668 M02 = this.m02;
26669 M10 = this.m10;
26670 M12 = this.m12;
26671 if (M01 == 0.0 || M10 == 0.0) {
26672 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26673 }while (--numPts >= 0) {
26674 var x = srcPts[srcOff++] - M02;
26675 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M10;
26676 dstPts[dstOff++] = x / M01;
26677 }
26678 return;
26679 case (4):
26680 M01 = this.m01;
26681 M10 = this.m10;
26682 if (M01 == 0.0 || M10 == 0.0) {
26683 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26684 }while (--numPts >= 0) {
26685 var x = srcPts[srcOff++];
26686 dstPts[dstOff++] = srcPts[srcOff++] / M10;
26687 dstPts[dstOff++] = x / M01;
26688 }
26689 return;
26690 case (3):
26691 M00 = this.m00;
26692 M02 = this.m02;
26693 M11 = this.m11;
26694 M12 = this.m12;
26695 if (M00 == 0.0 || M11 == 0.0) {
26696 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26697 }while (--numPts >= 0) {
26698 dstPts[dstOff++] = (srcPts[srcOff++] - M02) / M00;
26699 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M11;
26700 }
26701 return;
26702 case (2):
26703 M00 = this.m00;
26704 M11 = this.m11;
26705 if (M00 == 0.0 || M11 == 0.0) {
26706 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26707 }while (--numPts >= 0) {
26708 dstPts[dstOff++] = srcPts[srcOff++] / M00;
26709 dstPts[dstOff++] = srcPts[srcOff++] / M11;
26710 }
26711 return;
26712 case (1):
26713 M02 = this.m02;
26714 M12 = this.m12;
26715 while (--numPts >= 0) {
26716 dstPts[dstOff++] = srcPts[srcOff++] - M02;
26717 dstPts[dstOff++] = srcPts[srcOff++] - M12;
26718 }
26719 return;
26720 case (0):
26721 if (srcPts !== dstPts || srcOff != dstOff) {
26722 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26723 }return;
26724 }
26725 }, "~A,~N,~A,~N,~N");
26726 Clazz_defineMethod (c$, "deltaTransform", 
26727 function (ptSrc, ptDst) {
26728 if (ptDst == null) {
26729 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26730 ptDst =  new java.awt.geom.Point2D.Double ();
26731 } else {
26732 ptDst =  new java.awt.geom.Point2D.Float ();
26733 }}var x = ptSrc.getX ();
26734 var y = ptSrc.getY ();
26735 switch (this.state) {
26736 default:
26737 this.stateError ();
26738 case (7):
26739 case (6):
26740 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26741 return ptDst;
26742 case (5):
26743 case (4):
26744 ptDst.setLocation (y * this.m01, x * this.m10);
26745 return ptDst;
26746 case (3):
26747 case (2):
26748 ptDst.setLocation (x * this.m00, y * this.m11);
26749 return ptDst;
26750 case (1):
26751 case (0):
26752 ptDst.setLocation (x, y);
26753 return ptDst;
26754 }
26755 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26756 Clazz_defineMethod (c$, "deltaTransform", 
26757 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26758 var M00;
26759 var M01;
26760 var M10;
26761 var M11;
26762 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26763 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26764 srcOff = dstOff;
26765 }switch (this.state) {
26766 default:
26767 this.stateError ();
26768 case (7):
26769 case (6):
26770 M00 = this.m00;
26771 M01 = this.m01;
26772 M10 = this.m10;
26773 M11 = this.m11;
26774 while (--numPts >= 0) {
26775 var x = srcPts[srcOff++];
26776 var y = srcPts[srcOff++];
26777 dstPts[dstOff++] = x * M00 + y * M01;
26778 dstPts[dstOff++] = x * M10 + y * M11;
26779 }
26780 return;
26781 case (5):
26782 case (4):
26783 M01 = this.m01;
26784 M10 = this.m10;
26785 while (--numPts >= 0) {
26786 var x = srcPts[srcOff++];
26787 dstPts[dstOff++] = srcPts[srcOff++] * M01;
26788 dstPts[dstOff++] = x * M10;
26789 }
26790 return;
26791 case (3):
26792 case (2):
26793 M00 = this.m00;
26794 M11 = this.m11;
26795 while (--numPts >= 0) {
26796 dstPts[dstOff++] = srcPts[srcOff++] * M00;
26797 dstPts[dstOff++] = srcPts[srcOff++] * M11;
26798 }
26799 return;
26800 case (1):
26801 case (0):
26802 if (srcPts !== dstPts || srcOff != dstOff) {
26803 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26804 }return;
26805 }
26806 }, "~A,~N,~A,~N,~N");
26807 Clazz_defineMethod (c$, "createTransformedShape", 
26808 function (pSrc) {
26809 if (pSrc == null) {
26810 return null;
26811 }return  new java.awt.geom.Path2D.Double (pSrc, this);
26812 }, "java.awt.Shape");
26813 c$._matround = Clazz_defineMethod (c$, "_matround", 
26814  function (matval) {
26815 return Math.rint (matval * 1E15) / 1E15;
26816 }, "~N");
26817 Clazz_overrideMethod (c$, "toString", 
26818 function () {
26819 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) + "]]");
26820 });
26821 Clazz_defineMethod (c$, "isIdentity", 
26822 function () {
26823 return (this.state == 0 || (this.getType () == 0));
26824 });
26825 Clazz_defineMethod (c$, "clone", 
26826 function () {
26827 try {
26828 return Clazz_superCall (this, java.awt.geom.AffineTransform, "clone", []);
26829 } catch (e) {
26830 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
26831 throw  new InternalError ();
26832 } else {
26833 throw e;
26834 }
26835 }
26836 });
26837 Clazz_overrideMethod (c$, "hashCode", 
26838 function () {
26839 var bits = Double.doubleToLongBits (this.m00);
26840 bits = bits * 31 + Double.doubleToLongBits (this.m01);
26841 bits = bits * 31 + Double.doubleToLongBits (this.m02);
26842 bits = bits * 31 + Double.doubleToLongBits (this.m10);
26843 bits = bits * 31 + Double.doubleToLongBits (this.m11);
26844 bits = bits * 31 + Double.doubleToLongBits (this.m12);
26845 return ((bits) ^ ((bits >> 32)));
26846 });
26847 Clazz_overrideMethod (c$, "equals", 
26848 function (obj) {
26849 if (!(Clazz_instanceOf (obj, java.awt.geom.AffineTransform))) {
26850 return false;
26851 }var a = obj;
26852 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));
26853 }, "~O");
26854 Clazz_defineStatics (c$,
26855 "TYPE_UNKNOWN", -1,
26856 "TYPE_IDENTITY", 0,
26857 "TYPE_TRANSLATION", 1,
26858 "TYPE_UNIFORM_SCALE", 2,
26859 "TYPE_GENERAL_SCALE", 4,
26860 "TYPE_MASK_SCALE", (6),
26861 "TYPE_FLIP", 64,
26862 "TYPE_QUADRANT_ROTATION", 8,
26863 "TYPE_GENERAL_ROTATION", 16,
26864 "TYPE_MASK_ROTATION", (24),
26865 "TYPE_GENERAL_TRANSFORM", 32,
26866 "APPLY_IDENTITY", 0,
26867 "APPLY_TRANSLATE", 1,
26868 "APPLY_SCALE", 2,
26869 "APPLY_SHEAR", 4,
26870 "HI_SHIFT", 3,
26871 "HI_IDENTITY", 0,
26872 "HI_TRANSLATE", 8,
26873 "HI_SCALE", 16,
26874 "HI_SHEAR", 32,
26875 "rot90conversion",  Clazz_newIntArray (-1, [4, 5, 4, 5, 2, 3, 6, 7]));
26876 });
26877 Clazz_declarePackage ("java.awt.geom");
26878 Clazz_load (["java.lang.Exception"], "java.awt.geom.NoninvertibleTransformException", null, function () {
26879 c$ = Clazz_declareType (java.awt.geom, "NoninvertibleTransformException", Exception);
26880 });
26881 Clazz_declarePackage ("java.awt.geom");
26882 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 () {
26883 c$ = Clazz_decorateAsClass (function () {
26884 this.pointTypes = null;
26885 this.numTypes = 0;
26886 this.numCoords = 0;
26887 this.windingRule = 0;
26888 Clazz_instantialize (this, arguments);
26889 }, java.awt.geom, "Path2D", null, [java.awt.Shape, Cloneable]);
26890 Clazz_makeConstructor (c$, 
26891 function () {
26892 });
26893 Clazz_makeConstructor (c$, 
26894 function (rule, initialTypes) {
26895 this.setWindingRule (rule);
26896 this.pointTypes =  Clazz_newByteArray (initialTypes, 0);
26897 }, "~N,~N");
26898 Clazz_defineMethod (c$, "closePath", 
26899 function () {
26900 if (this.numTypes == 0 || this.pointTypes[this.numTypes - 1] != 4) {
26901 this.needRoom (true, 0);
26902 this.pointTypes[this.numTypes++] = 4;
26903 }});
26904 Clazz_defineMethod (c$, "append", 
26905 function (s, connect) {
26906 this.append (s.getPathIterator (null), connect);
26907 }, "java.awt.Shape,~B");
26908 Clazz_defineMethod (c$, "getWindingRule", 
26909 function () {
26910 return this.windingRule;
26911 });
26912 Clazz_defineMethod (c$, "setWindingRule", 
26913 function (rule) {
26914 if (rule != 0 && rule != 1) {
26915 throw  new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO");
26916 }this.windingRule = rule;
26917 }, "~N");
26918 Clazz_defineMethod (c$, "getCurrentPoint", 
26919 function () {
26920 var index = this.numCoords;
26921 if (this.numTypes < 1 || index < 1) {
26922 return null;
26923 }if (this.pointTypes[this.numTypes - 1] == 4) {
26924 loop : for (var i = this.numTypes - 2; i > 0; i--) {
26925 switch (this.pointTypes[i]) {
26926 case 0:
26927 break loop;
26928 case 1:
26929 index -= 2;
26930 break;
26931 case 2:
26932 index -= 4;
26933 break;
26934 case 3:
26935 index -= 6;
26936 break;
26937 case 4:
26938 break;
26939 }
26940 }
26941 }return this.getPoint (index - 2);
26942 });
26943 Clazz_defineMethod (c$, "reset", 
26944 function () {
26945 this.numTypes = this.numCoords = 0;
26946 });
26947 Clazz_defineMethod (c$, "createTransformedShape", 
26948 function (at) {
26949 var p2d = this.clone ();
26950 if (at != null) {
26951 p2d.transform (at);
26952 }return p2d;
26953 }, "java.awt.geom.AffineTransform");
26954 Clazz_overrideMethod (c$, "getBounds", 
26955 function () {
26956 return this.getBounds2D ().getBounds ();
26957 });
26958 c$.contains = Clazz_defineMethod (c$, "contains", 
26959 function (pi, x, y) {
26960 if (x * 0.0 + y * 0.0 == 0.0) {
26961 var mask = (pi.getWindingRule () == 1 ? -1 : 1);
26962 var cross = jssun.awt.geom.Curve.pointCrossingsForPath (pi, x, y);
26963 return ((cross & mask) != 0);
26964 } else {
26965 return false;
26966 }}, "java.awt.geom.PathIterator,~N,~N");
26967 c$.contains = Clazz_defineMethod (c$, "contains", 
26968 function (pi, p) {
26969 return java.awt.geom.Path2D.contains (pi, p.getX (), p.getY ());
26970 }, "java.awt.geom.PathIterator,java.awt.geom.Point2D");
26971 Clazz_defineMethod (c$, "contains", 
26972 function (x, y) {
26973 if (x * 0.0 + y * 0.0 == 0.0) {
26974 if (this.numTypes < 2) {
26975 return false;
26976 }var mask = (this.windingRule == 1 ? -1 : 1);
26977 return ((this.pointCrossings (x, y) & mask) != 0);
26978 } else {
26979 return false;
26980 }}, "~N,~N");
26981 Clazz_defineMethod (c$, "contains", 
26982 function (p) {
26983 return this.contains (p.getX (), p.getY ());
26984 }, "java.awt.geom.Point2D");
26985 c$.contains = Clazz_defineMethod (c$, "contains", 
26986 function (pi, x, y, w, h) {
26987 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26988 return false;
26989 }if (w <= 0 || h <= 0) {
26990 return false;
26991 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
26992 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
26993 return (crossings != -2147483648 && (crossings & mask) != 0);
26994 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
26995 c$.contains = Clazz_defineMethod (c$, "contains", 
26996 function (pi, r) {
26997 return java.awt.geom.Path2D.contains (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26998 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
26999 Clazz_defineMethod (c$, "contains", 
27000 function (x, y, w, h) {
27001 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
27002 return false;
27003 }if (w <= 0 || h <= 0) {
27004 return false;
27005 }var mask = (this.windingRule == 1 ? -1 : 2);
27006 var crossings = this.rectCrossings (x, y, x + w, y + h);
27007 return (crossings != -2147483648 && (crossings & mask) != 0);
27008 }, "~N,~N,~N,~N");
27009 Clazz_defineMethod (c$, "contains", 
27010 function (r) {
27011 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
27012 }, "java.awt.geom.Rectangle2D");
27013 c$.intersects = Clazz_defineMethod (c$, "intersects", 
27014 function (pi, x, y, w, h) {
27015 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
27016 return false;
27017 }if (w <= 0 || h <= 0) {
27018 return false;
27019 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
27020 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
27021 return (crossings == -2147483648 || (crossings & mask) != 0);
27022 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
27023 c$.intersects = Clazz_defineMethod (c$, "intersects", 
27024 function (pi, r) {
27025 return java.awt.geom.Path2D.intersects (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
27026 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
27027 Clazz_defineMethod (c$, "intersects", 
27028 function (x, y, w, h) {
27029 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
27030 return false;
27031 }if (w <= 0 || h <= 0) {
27032 return false;
27033 }var mask = (this.windingRule == 1 ? -1 : 2);
27034 var crossings = this.rectCrossings (x, y, x + w, y + h);
27035 return (crossings == -2147483648 || (crossings & mask) != 0);
27036 }, "~N,~N,~N,~N");
27037 Clazz_defineMethod (c$, "intersects", 
27038 function (r) {
27039 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
27040 }, "java.awt.geom.Rectangle2D");
27041 Clazz_overrideMethod (c$, "getPathIterator", 
27042 function (at, flatness) {
27043 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
27044 }, "java.awt.geom.AffineTransform,~N");
27045 Clazz_pu$h(self.c$);
27046 c$ = Clazz_decorateAsClass (function () {
27047 this.typeIdx = 0;
27048 this.pointIdx = 0;
27049 this.path = null;
27050 Clazz_instantialize (this, arguments);
27051 }, java.awt.geom.Path2D, "Iterator", null, java.awt.geom.PathIterator);
27052 Clazz_makeConstructor (c$, 
27053 function (a) {
27054 this.path = a;
27055 }, "java.awt.geom.Path2D");
27056 Clazz_overrideMethod (c$, "getWindingRule", 
27057 function () {
27058 return this.path.getWindingRule ();
27059 });
27060 Clazz_overrideMethod (c$, "isDone", 
27061 function () {
27062 return (this.typeIdx >= this.path.numTypes);
27063 });
27064 Clazz_overrideMethod (c$, "next", 
27065 function () {
27066 var a = this.path.pointTypes[this.typeIdx++];
27067 this.pointIdx += java.awt.geom.Path2D.Iterator.curvecoords[a];
27068 });
27069 Clazz_defineStatics (c$,
27070 "curvecoords",  Clazz_newIntArray (-1, [2, 2, 4, 6, 0]));
27071 c$ = Clazz_p0p ();
27072 Clazz_pu$h(self.c$);
27073 c$ = Clazz_decorateAsClass (function () {
27074 this.floatCoords = null;
27075 Clazz_instantialize (this, arguments);
27076 }, java.awt.geom.Path2D, "Float", java.awt.geom.Path2D);
27077 Clazz_makeConstructor (c$, 
27078 function () {
27079 this.construct (1, 20);
27080 });
27081 Clazz_makeConstructor (c$, 
27082 function (a) {
27083 this.construct (a, 20);
27084 }, "~N");
27085 Clazz_makeConstructor (c$, 
27086 function (a, b) {
27087 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
27088 this.setWindingRule (a);
27089 this.pointTypes =  Clazz_newByteArray (b, 0);
27090 this.floatCoords =  Clazz_newFloatArray (b * 2, 0);
27091 }, "~N,~N");
27092 Clazz_makeConstructor (c$, 
27093 function (a) {
27094 this.construct (a, null);
27095 }, "java.awt.Shape");
27096 Clazz_makeConstructor (c$, 
27097 function (a, b) {
27098 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
27099 this.setPath (a, b);
27100 }, "java.awt.Shape,java.awt.geom.AffineTransform");
27101 Clazz_defineMethod (c$, "setPath", 
27102  function (a, b) {
27103 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
27104 var c = a;
27105 this.setWindingRule (c.windingRule);
27106 this.numTypes = c.numTypes;
27107 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
27108 this.numCoords = c.numCoords;
27109 this.floatCoords = c.cloneCoordsFloat (b);
27110 } else {
27111 var c = a.getPathIterator (b);
27112 this.setWindingRule (c.getWindingRule ());
27113 this.pointTypes =  Clazz_newByteArray (20, 0);
27114 this.floatCoords =  Clazz_newFloatArray (40, 0);
27115 this.append (c, false);
27116 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
27117 Clazz_defineMethod (c$, "cloneCoordsFloat", 
27118 function (a) {
27119 var b;
27120 if (a == null) {
27121 b = java.util.Arrays.copyOf (this.floatCoords, this.floatCoords.length);
27122 } else {
27123 b =  Clazz_newFloatArray (this.floatCoords.length, 0);
27124 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27125 }return b;
27126 }, "java.awt.geom.AffineTransform");
27127 Clazz_overrideMethod (c$, "cloneCoordsDouble", 
27128 function (a) {
27129 var b =  Clazz_newDoubleArray (this.floatCoords.length, 0);
27130 if (a == null) {
27131 for (var c = 0; c < this.numCoords; c++) {
27132 b[c] = this.floatCoords[c];
27133 }
27134 } else {
27135 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27136 }return b;
27137 }, "java.awt.geom.AffineTransform");
27138 Clazz_defineMethod (c$, "append", 
27139 function (a, b) {
27140 {
27141 if (typeof pi == "number") {
27142 this.floatCoords[this.numCoords++] = pi;
27143 this.floatCoords[this.numCoords++] = connect;
27144 return;
27145 }
27146 }var c =  Clazz_newFloatArray (6, 0);
27147 while (!a.isDone ()) {
27148 switch (a.currentSegment (c)) {
27149 case 0:
27150 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27151 this.moveTo (c[0], c[1]);
27152 break;
27153 }if (this.pointTypes[this.numTypes - 1] != 4 && this.floatCoords[this.numCoords - 2] == c[0] && this.floatCoords[this.numCoords - 1] == c[1]) {
27154 break;
27155 }case 1:
27156 this.lineTo (c[0], c[1]);
27157 break;
27158 case 2:
27159 this.quadTo (c[0], c[1], c[2], c[3]);
27160 break;
27161 case 3:
27162 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27163 break;
27164 case 4:
27165 this.closePath ();
27166 break;
27167 }
27168 a.next ();
27169 b = false;
27170 }
27171 }, "java.awt.geom.PathIterator,~B");
27172 Clazz_overrideMethod (c$, "getPoint", 
27173 function (a) {
27174 return  new java.awt.geom.Point2D.Float (this.floatCoords[a], this.floatCoords[a + 1]);
27175 }, "~N");
27176 Clazz_overrideMethod (c$, "needRoom", 
27177 function (a, b) {
27178 if (a && this.numTypes == 0) {
27179 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27180 }var c = this.pointTypes.length;
27181 if (this.numTypes >= c) {
27182 var d = c;
27183 if (d > 500) {
27184 d = 500;
27185 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27186 }c = this.floatCoords.length;
27187 if (this.numCoords + b > c) {
27188 var d = c;
27189 if (d > 1000) {
27190 d = 1000;
27191 }if (d < b) {
27192 d = b;
27193 }this.floatCoords = java.util.Arrays.copyOf (this.floatCoords, c + d);
27194 }}, "~B,~N");
27195 Clazz_defineMethod (c$, "moveTo", 
27196 function (a, b) {
27197 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27198 this.floatCoords[this.numCoords - 2] = a;
27199 this.floatCoords[this.numCoords - 1] = b;
27200 } else {
27201 this.needRoom (false, 2);
27202 this.pointTypes[this.numTypes++] = 0;
27203 this.floatCoords[this.numCoords++] = a;
27204 this.floatCoords[this.numCoords++] = b;
27205 }}, "~N,~N");
27206 Clazz_defineMethod (c$, "moveTo", 
27207 function (a, b) {
27208 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27209 this.floatCoords[this.numCoords - 2] = a;
27210 this.floatCoords[this.numCoords - 1] = b;
27211 } else {
27212 this.needRoom (false, 2);
27213 this.pointTypes[this.numTypes++] = 0;
27214 this.floatCoords[this.numCoords++] = a;
27215 this.floatCoords[this.numCoords++] = b;
27216 }}, "~N,~N");
27217 Clazz_defineMethod (c$, "lineTo", 
27218 function (a, b) {
27219 this.needRoom (true, 2);
27220 this.pointTypes[this.numTypes++] = 1;
27221 this.floatCoords[this.numCoords++] = a;
27222 this.floatCoords[this.numCoords++] = b;
27223 }, "~N,~N");
27224 Clazz_defineMethod (c$, "lineTo", 
27225 function (a, b) {
27226 this.needRoom (true, 2);
27227 this.pointTypes[this.numTypes++] = 1;
27228 this.floatCoords[this.numCoords++] = a;
27229 this.floatCoords[this.numCoords++] = b;
27230 }, "~N,~N");
27231 Clazz_defineMethod (c$, "quadTo", 
27232 function (a, b, c, d) {
27233 this.needRoom (true, 4);
27234 this.pointTypes[this.numTypes++] = 2;
27235 this.floatCoords[this.numCoords++] = a;
27236 this.floatCoords[this.numCoords++] = b;
27237 this.floatCoords[this.numCoords++] = c;
27238 this.floatCoords[this.numCoords++] = d;
27239 }, "~N,~N,~N,~N");
27240 Clazz_defineMethod (c$, "quadTo", 
27241 function (a, b, c, d) {
27242 this.needRoom (true, 4);
27243 this.pointTypes[this.numTypes++] = 2;
27244 this.floatCoords[this.numCoords++] = a;
27245 this.floatCoords[this.numCoords++] = b;
27246 this.floatCoords[this.numCoords++] = c;
27247 this.floatCoords[this.numCoords++] = d;
27248 }, "~N,~N,~N,~N");
27249 Clazz_defineMethod (c$, "curveTo", 
27250 function (a, b, c, d, e, f) {
27251 this.needRoom (true, 6);
27252 this.pointTypes[this.numTypes++] = 3;
27253 this.floatCoords[this.numCoords++] = a;
27254 this.floatCoords[this.numCoords++] = b;
27255 this.floatCoords[this.numCoords++] = c;
27256 this.floatCoords[this.numCoords++] = d;
27257 this.floatCoords[this.numCoords++] = e;
27258 this.floatCoords[this.numCoords++] = f;
27259 }, "~N,~N,~N,~N,~N,~N");
27260 Clazz_defineMethod (c$, "curveTo", 
27261 function (a, b, c, d, e, f) {
27262 this.needRoom (true, 6);
27263 this.pointTypes[this.numTypes++] = 3;
27264 this.floatCoords[this.numCoords++] = a;
27265 this.floatCoords[this.numCoords++] = b;
27266 this.floatCoords[this.numCoords++] = c;
27267 this.floatCoords[this.numCoords++] = d;
27268 this.floatCoords[this.numCoords++] = e;
27269 this.floatCoords[this.numCoords++] = f;
27270 }, "~N,~N,~N,~N,~N,~N");
27271 Clazz_overrideMethod (c$, "pointCrossings", 
27272 function (a, b) {
27273 var c;
27274 var d;
27275 var e;
27276 var f;
27277 var g;
27278 var h;
27279 var i = this.floatCoords;
27280 e = c = i[0];
27281 f = d = i[1];
27282 var j = 0;
27283 var k = 2;
27284 for (var l = 1; l < this.numTypes; l++) {
27285 switch (this.pointTypes[l]) {
27286 case 0:
27287 if (f != d) {
27288 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27289 }c = e = i[k++];
27290 d = f = i[k++];
27291 break;
27292 case 1:
27293 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27294 e = g;
27295 f = h;
27296 break;
27297 case 2:
27298 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27299 e = g;
27300 f = h;
27301 break;
27302 case 3:
27303 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);
27304 e = g;
27305 f = h;
27306 break;
27307 case 4:
27308 if (f != d) {
27309 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27310 }e = c;
27311 f = d;
27312 break;
27313 }
27314 }
27315 if (f != d) {
27316 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27317 }return j;
27318 }, "~N,~N");
27319 Clazz_overrideMethod (c$, "rectCrossings", 
27320 function (a, b, c, d) {
27321 var e = this.floatCoords;
27322 var f;
27323 var g;
27324 var h;
27325 var i;
27326 var j;
27327 var k;
27328 f = h = e[0];
27329 g = i = e[1];
27330 var l = 0;
27331 var m = 2;
27332 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27333 switch (this.pointTypes[n]) {
27334 case 0:
27335 if (f != h || g != i) {
27336 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27337 }h = f = e[m++];
27338 i = g = e[m++];
27339 break;
27340 case 1:
27341 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j = e[m++], k = e[m++]);
27342 f = j;
27343 g = k;
27344 break;
27345 case 2:
27346 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27347 f = j;
27348 g = k;
27349 break;
27350 case 3:
27351 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);
27352 f = j;
27353 g = k;
27354 break;
27355 case 4:
27356 if (f != h || g != i) {
27357 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27358 }f = h;
27359 g = i;
27360 break;
27361 }
27362 }
27363 if (l != -2147483648 && (f != h || g != i)) {
27364 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27365 }return l;
27366 }, "~N,~N,~N,~N");
27367 Clazz_overrideMethod (c$, "transform", 
27368 function (a) {
27369 a.transform (this.floatCoords, 0, this.floatCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27370 }, "java.awt.geom.AffineTransform");
27371 Clazz_overrideMethod (c$, "getBounds2D", 
27372 function () {
27373 var a;
27374 var b;
27375 var c;
27376 var d;
27377 var e = this.numCoords;
27378 if (e > 0) {
27379 b = d = this.floatCoords[--e];
27380 a = c = this.floatCoords[--e];
27381 while (e > 0) {
27382 var f = this.floatCoords[--e];
27383 var g = this.floatCoords[--e];
27384 if (g < a) a = g;
27385 if (f < b) b = f;
27386 if (g > c) c = g;
27387 if (f > d) d = f;
27388 }
27389 } else {
27390 a = b = c = d = 0.0;
27391 }return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
27392 });
27393 Clazz_defineMethod (c$, "getPathIterator", 
27394 function (a) {
27395 if (a == null) {
27396 return  new java.awt.geom.Path2D.Float.CopyIterator (this);
27397 } else {
27398 return  new java.awt.geom.Path2D.Float.TxIterator (this, a);
27399 }}, "java.awt.geom.AffineTransform");
27400 Clazz_overrideMethod (c$, "clone", 
27401 function () {
27402 return  new java.awt.geom.Path2D.Float (this);
27403 });
27404 Clazz_pu$h(self.c$);
27405 c$ = Clazz_decorateAsClass (function () {
27406 this.floatCoords = null;
27407 Clazz_instantialize (this, arguments);
27408 }, java.awt.geom.Path2D.Float, "CopyIterator", java.awt.geom.Path2D.Iterator);
27409 Clazz_makeConstructor (c$, 
27410 function (a) {
27411 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.CopyIterator, [a]);
27412 this.floatCoords = a.floatCoords;
27413 }, "java.awt.geom.Path2D.Float");
27414 Clazz_defineMethod (c$, "currentSegment", 
27415 function (a) {
27416 var b = this.path.pointTypes[this.typeIdx];
27417 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27418 if (c > 0) {
27419 for (var d = 0; d < c; d++) {
27420 a[d] = this.floatCoords[this.pointIdx + d];
27421 }
27422 }return b;
27423 }, "~A");
27424 c$ = Clazz_p0p ();
27425 Clazz_pu$h(self.c$);
27426 c$ = Clazz_decorateAsClass (function () {
27427 this.floatCoords = null;
27428 this.affine = null;
27429 Clazz_instantialize (this, arguments);
27430 }, java.awt.geom.Path2D.Float, "TxIterator", java.awt.geom.Path2D.Iterator);
27431 Clazz_makeConstructor (c$, 
27432 function (a, b) {
27433 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.TxIterator, [a]);
27434 this.floatCoords = a.floatCoords;
27435 this.affine = b;
27436 }, "java.awt.geom.Path2D.Float,java.awt.geom.AffineTransform");
27437 Clazz_defineMethod (c$, "currentSegment", 
27438 function (a) {
27439 var b = this.path.pointTypes[this.typeIdx];
27440 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27441 if (c > 0) {
27442 this.affine.transform (this.floatCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27443 }return b;
27444 }, "~A");
27445 c$ = Clazz_p0p ();
27446 c$ = Clazz_p0p ();
27447 Clazz_pu$h(self.c$);
27448 c$ = Clazz_decorateAsClass (function () {
27449 this.doubleCoords = null;
27450 Clazz_instantialize (this, arguments);
27451 }, java.awt.geom.Path2D, "Double", java.awt.geom.Path2D);
27452 Clazz_makeConstructor (c$, 
27453 function () {
27454 this.construct (1, 20);
27455 });
27456 Clazz_makeConstructor (c$, 
27457 function (a) {
27458 this.construct (a, 20);
27459 }, "~N");
27460 Clazz_makeConstructor (c$, 
27461 function (a, b) {
27462 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, [a, b]);
27463 this.doubleCoords =  Clazz_newDoubleArray (b * 2, 0);
27464 }, "~N,~N");
27465 Clazz_makeConstructor (c$, 
27466 function (a) {
27467 this.construct (a, null);
27468 }, "java.awt.Shape");
27469 Clazz_makeConstructor (c$, 
27470 function (a, b) {
27471 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, []);
27472 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
27473 var c = a;
27474 this.setWindingRule (c.windingRule);
27475 this.numTypes = c.numTypes;
27476 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
27477 this.numCoords = c.numCoords;
27478 this.doubleCoords = c.cloneCoordsDouble (b);
27479 } else {
27480 var c = a.getPathIterator (b);
27481 this.setWindingRule (c.getWindingRule ());
27482 this.pointTypes =  Clazz_newByteArray (20, 0);
27483 this.doubleCoords =  Clazz_newDoubleArray (40, 0);
27484 this.append (c, false);
27485 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
27486 Clazz_overrideMethod (c$, "cloneCoordsFloat", 
27487 function (a) {
27488 var b =  Clazz_newFloatArray (this.doubleCoords.length, 0);
27489 if (a == null) {
27490 for (var c = 0; c < this.numCoords; c++) {
27491 b[c] = this.doubleCoords[c];
27492 }
27493 } else {
27494 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27495 }return b;
27496 }, "java.awt.geom.AffineTransform");
27497 Clazz_defineMethod (c$, "cloneCoordsDouble", 
27498 function (a) {
27499 var b;
27500 if (a == null) {
27501 b = java.util.Arrays.copyOf (this.doubleCoords, this.doubleCoords.length);
27502 } else {
27503 b =  Clazz_newDoubleArray (this.doubleCoords.length, 0);
27504 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27505 }return b;
27506 }, "java.awt.geom.AffineTransform");
27507 Clazz_defineMethod (c$, "append", 
27508 function (a, b) {
27509 {
27510 if (typeof pi == "number") {
27511 this.floatCoords[this.numCoords++] = pi;
27512 this.floatCoords[this.numCoords++] = connect;
27513 return;
27514 }
27515 }var c =  Clazz_newDoubleArray (6, 0);
27516 while (!a.isDone ()) {
27517 switch (a.currentSegment (c)) {
27518 case 0:
27519 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27520 this.moveTo (c[0], c[1]);
27521 break;
27522 }if (this.pointTypes[this.numTypes - 1] != 4 && this.doubleCoords[this.numCoords - 2] == c[0] && this.doubleCoords[this.numCoords - 1] == c[1]) {
27523 break;
27524 }case 1:
27525 this.lineTo (c[0], c[1]);
27526 break;
27527 case 2:
27528 this.quadTo (c[0], c[1], c[2], c[3]);
27529 break;
27530 case 3:
27531 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27532 break;
27533 case 4:
27534 this.closePath ();
27535 break;
27536 }
27537 a.next ();
27538 b = false;
27539 }
27540 }, "java.awt.geom.PathIterator,~B");
27541 Clazz_overrideMethod (c$, "getPoint", 
27542 function (a) {
27543 return  new java.awt.geom.Point2D.Double (this.doubleCoords[a], this.doubleCoords[a + 1]);
27544 }, "~N");
27545 Clazz_overrideMethod (c$, "needRoom", 
27546 function (a, b) {
27547 if (a && this.numTypes == 0) {
27548 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27549 }var c = this.pointTypes.length;
27550 if (this.numTypes >= c) {
27551 var d = c;
27552 if (d > 500) {
27553 d = 500;
27554 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27555 }c = this.doubleCoords.length;
27556 if (this.numCoords + b > c) {
27557 var d = c;
27558 if (d > 1000) {
27559 d = 1000;
27560 }if (d < b) {
27561 d = b;
27562 }this.doubleCoords = java.util.Arrays.copyOf (this.doubleCoords, c + d);
27563 }}, "~B,~N");
27564 Clazz_overrideMethod (c$, "moveTo", 
27565 function (a, b) {
27566 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27567 this.doubleCoords[this.numCoords - 2] = a;
27568 this.doubleCoords[this.numCoords - 1] = b;
27569 } else {
27570 this.needRoom (false, 2);
27571 this.pointTypes[this.numTypes++] = 0;
27572 this.doubleCoords[this.numCoords++] = a;
27573 this.doubleCoords[this.numCoords++] = b;
27574 }}, "~N,~N");
27575 Clazz_overrideMethod (c$, "lineTo", 
27576 function (a, b) {
27577 this.needRoom (true, 2);
27578 this.pointTypes[this.numTypes++] = 1;
27579 this.doubleCoords[this.numCoords++] = a;
27580 this.doubleCoords[this.numCoords++] = b;
27581 }, "~N,~N");
27582 Clazz_overrideMethod (c$, "quadTo", 
27583 function (a, b, c, d) {
27584 this.needRoom (true, 4);
27585 this.pointTypes[this.numTypes++] = 2;
27586 this.doubleCoords[this.numCoords++] = a;
27587 this.doubleCoords[this.numCoords++] = b;
27588 this.doubleCoords[this.numCoords++] = c;
27589 this.doubleCoords[this.numCoords++] = d;
27590 }, "~N,~N,~N,~N");
27591 Clazz_overrideMethod (c$, "curveTo", 
27592 function (a, b, c, d, e, f) {
27593 this.needRoom (true, 6);
27594 this.pointTypes[this.numTypes++] = 3;
27595 this.doubleCoords[this.numCoords++] = a;
27596 this.doubleCoords[this.numCoords++] = b;
27597 this.doubleCoords[this.numCoords++] = c;
27598 this.doubleCoords[this.numCoords++] = d;
27599 this.doubleCoords[this.numCoords++] = e;
27600 this.doubleCoords[this.numCoords++] = f;
27601 }, "~N,~N,~N,~N,~N,~N");
27602 Clazz_overrideMethod (c$, "pointCrossings", 
27603 function (a, b) {
27604 var c;
27605 var d;
27606 var e;
27607 var f;
27608 var g;
27609 var h;
27610 var i = this.doubleCoords;
27611 e = c = i[0];
27612 f = d = i[1];
27613 var j = 0;
27614 var k = 2;
27615 for (var l = 1; l < this.numTypes; l++) {
27616 switch (this.pointTypes[l]) {
27617 case 0:
27618 if (f != d) {
27619 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27620 }c = e = i[k++];
27621 d = f = i[k++];
27622 break;
27623 case 1:
27624 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27625 e = g;
27626 f = h;
27627 break;
27628 case 2:
27629 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27630 e = g;
27631 f = h;
27632 break;
27633 case 3:
27634 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);
27635 e = g;
27636 f = h;
27637 break;
27638 case 4:
27639 if (f != d) {
27640 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27641 }e = c;
27642 f = d;
27643 break;
27644 }
27645 }
27646 if (f != d) {
27647 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27648 }return j;
27649 }, "~N,~N");
27650 Clazz_overrideMethod (c$, "rectCrossings", 
27651 function (a, b, c, d) {
27652 var e = this.doubleCoords;
27653 var f;
27654 var g;
27655 var h;
27656 var i;
27657 var j;
27658 var k;
27659 f = h = e[0];
27660 g = i = e[1];
27661 var l = 0;
27662 var m = 2;
27663 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27664 switch (this.pointTypes[n]) {
27665 case 0:
27666 if (f != h || g != i) {
27667 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27668 }h = f = e[m++];
27669 i = g = e[m++];
27670 break;
27671 case 1:
27672 j = e[m++];
27673 k = e[m++];
27674 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j, k);
27675 f = j;
27676 g = k;
27677 break;
27678 case 2:
27679 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27680 f = j;
27681 g = k;
27682 break;
27683 case 3:
27684 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);
27685 f = j;
27686 g = k;
27687 break;
27688 case 4:
27689 if (f != h || g != i) {
27690 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27691 }f = h;
27692 g = i;
27693 break;
27694 }
27695 }
27696 if (l != -2147483648 && (f != h || g != i)) {
27697 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27698 }return l;
27699 }, "~N,~N,~N,~N");
27700 Clazz_overrideMethod (c$, "transform", 
27701 function (a) {
27702 a.transform (this.doubleCoords, 0, this.doubleCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27703 }, "java.awt.geom.AffineTransform");
27704 Clazz_overrideMethod (c$, "getBounds2D", 
27705 function () {
27706 var a;
27707 var b;
27708 var c;
27709 var d;
27710 var e = this.numCoords;
27711 if (e > 0) {
27712 b = d = this.doubleCoords[--e];
27713 a = c = this.doubleCoords[--e];
27714 while (e > 0) {
27715 var f = this.doubleCoords[--e];
27716 var g = this.doubleCoords[--e];
27717 if (g < a) a = g;
27718 if (f < b) b = f;
27719 if (g > c) c = g;
27720 if (f > d) d = f;
27721 }
27722 } else {
27723 a = b = c = d = 0.0;
27724 }return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
27725 });
27726 Clazz_defineMethod (c$, "getPathIterator", 
27727 function (a) {
27728 if (a == null) {
27729 return  new java.awt.geom.Path2D.Double.CopyIterator (this);
27730 } else {
27731 return  new java.awt.geom.Path2D.Double.TxIterator (this, a);
27732 }}, "java.awt.geom.AffineTransform");
27733 Clazz_overrideMethod (c$, "clone", 
27734 function () {
27735 return  new java.awt.geom.Path2D.Double (this);
27736 });
27737 Clazz_pu$h(self.c$);
27738 c$ = Clazz_decorateAsClass (function () {
27739 this.doubleCoords = null;
27740 Clazz_instantialize (this, arguments);
27741 }, java.awt.geom.Path2D.Double, "CopyIterator", java.awt.geom.Path2D.Iterator);
27742 Clazz_makeConstructor (c$, 
27743 function (a) {
27744 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.CopyIterator, [a]);
27745 this.doubleCoords = a.doubleCoords;
27746 }, "java.awt.geom.Path2D.Double");
27747 Clazz_defineMethod (c$, "currentSegment", 
27748 function (a) {
27749 var b = this.path.pointTypes[this.typeIdx];
27750 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27751 if (c > 0) {
27752 for (var d = 0; d < c; d++) {
27753 a[d] = this.doubleCoords[this.pointIdx + d];
27754 }
27755 }return b;
27756 }, "~A");
27757 Clazz_defineMethod (c$, "currentSegment", 
27758 function (a) {
27759 var b = this.path.pointTypes[this.typeIdx];
27760 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27761 if (c > 0) {
27762 System.arraycopy (this.doubleCoords, this.pointIdx, a, 0, c);
27763 }return b;
27764 }, "~A");
27765 c$ = Clazz_p0p ();
27766 Clazz_pu$h(self.c$);
27767 c$ = Clazz_decorateAsClass (function () {
27768 this.doubleCoords = null;
27769 this.affine = null;
27770 Clazz_instantialize (this, arguments);
27771 }, java.awt.geom.Path2D.Double, "TxIterator", java.awt.geom.Path2D.Iterator);
27772 Clazz_makeConstructor (c$, 
27773 function (a, b) {
27774 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.TxIterator, [a]);
27775 this.doubleCoords = a.doubleCoords;
27776 this.affine = b;
27777 }, "java.awt.geom.Path2D.Double,java.awt.geom.AffineTransform");
27778 Clazz_defineMethod (c$, "currentSegment", 
27779 function (a) {
27780 var b = this.path.pointTypes[this.typeIdx];
27781 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27782 if (c > 0) {
27783 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27784 }return b;
27785 }, "~A");
27786 Clazz_defineMethod (c$, "currentSegment", 
27787 function (a) {
27788 var b = this.path.pointTypes[this.typeIdx];
27789 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27790 if (c > 0) {
27791 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27792 }return b;
27793 }, "~A");
27794 c$ = Clazz_p0p ();
27795 c$ = Clazz_p0p ();
27796 Clazz_defineStatics (c$,
27797 "WIND_EVEN_ODD", 0,
27798 "WIND_NON_ZERO", 1,
27799 "SEG_MOVETO", 0,
27800 "SEG_LINETO", 1,
27801 "SEG_QUADTO", 2,
27802 "SEG_CUBICTO", 3,
27803 "SEG_CLOSE", 4,
27804 "INIT_SIZE", 20,
27805 "EXPAND_MAX", 500);
27806 });
27807 Clazz_declarePackage ("javax.swing");
27808 Clazz_declareInterface (javax.swing, "Icon");
27809 Clazz_declarePackage ("javax.swing");
27810 Clazz_load (["javax.swing.JTextField"], "javax.swing.JPasswordField", ["javax.swing.text.Segment"], function () {
27811 c$ = Clazz_decorateAsClass (function () {
27812 this.echoChar = '\0';
27813 this.echoCharSet = false;
27814 Clazz_instantialize (this, arguments);
27815 }, javax.swing, "JPasswordField", javax.swing.JTextField);
27816 Clazz_makeConstructor (c$, 
27817 function () {
27818 this.construct (null, null, 0);
27819 });
27820 Clazz_makeConstructor (c$, 
27821 function (text) {
27822 this.construct (null, text, 0);
27823 }, "~S");
27824 Clazz_makeConstructor (c$, 
27825 function (columns) {
27826 this.construct (null, null, columns);
27827 }, "~N");
27828 Clazz_makeConstructor (c$, 
27829 function (text, columns) {
27830 this.construct (null, text, columns);
27831 }, "~S,~N");
27832 Clazz_overrideMethod (c$, "getUIClassID", 
27833 function () {
27834 return "PasswordFieldUI";
27835 });
27836 Clazz_defineMethod (c$, "updateUI", 
27837 function () {
27838 if (!this.echoCharSet) {
27839 this.echoChar = '*';
27840 }Clazz_superCall (this, javax.swing.JPasswordField, "updateUI", []);
27841 });
27842 Clazz_defineMethod (c$, "getEchoChar", 
27843 function () {
27844 return this.echoChar;
27845 });
27846 Clazz_defineMethod (c$, "setEchoChar", 
27847 function (c) {
27848 this.echoChar = c;
27849 this.echoCharSet = true;
27850 this.repaint ();
27851 this.revalidate ();
27852 }, "~S");
27853 Clazz_defineMethod (c$, "echoCharIsSet", 
27854 function () {
27855 return this.echoChar.charCodeAt (0) != 0;
27856 });
27857 Clazz_overrideMethod (c$, "cut", 
27858 function () {
27859 });
27860 Clazz_overrideMethod (c$, "copy", 
27861 function () {
27862 });
27863 Clazz_defineMethod (c$, "getPassword", 
27864 function () {
27865 var doc = this.getDocument ();
27866 var txt =  new javax.swing.text.Segment ();
27867 try {
27868 doc.getText (0, doc.getLength (), txt);
27869 } catch (e) {
27870 if (Clazz_exceptionOf (e, javax.swing.text.BadLocationException)) {
27871 return null;
27872 } else {
27873 throw e;
27874 }
27875 }
27876 var retValue =  Clazz_newCharArray (txt.count, '\0');
27877 System.arraycopy (txt.array, txt.offset, retValue, 0, txt.count);
27878 return retValue;
27879 });
27880 Clazz_defineMethod (c$, "paramString", 
27881 function () {
27882 return Clazz_superCall (this, javax.swing.JPasswordField, "paramString", []) + ",echoChar=" + this.echoChar;
27883 });
27884 Clazz_defineMethod (c$, "customSetUIProperty", 
27885 function (propertyName, value) {
27886 if (propertyName === "echoChar") {
27887 if (!this.echoCharSet) {
27888 this.setEchoChar ((value).charValue ());
27889 this.echoCharSet = false;
27890 }return true;
27891 }return false;
27892 }, "~S,~O");
27893 Clazz_defineStatics (c$,
27894 "$$uiClassID", "PasswordFieldUI");
27895 });
27896 Clazz_declarePackage ("javax.swing");
27897 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 () {
27898 c$ = Clazz_decorateAsClass (function () {
27899 this.$action = null;
27900 this.actionPropertyChangeListener = null;
27901 this.horizontalAlignment = 10;
27902 this.columns = 0;
27903 this.columnWidth = 0;
27904 this.command = null;
27905 if (!Clazz_isClassDefined ("javax.swing.JTextField.ScrollRepainter")) {
27906 javax.swing.JTextField.$JTextField$ScrollRepainter$ ();
27907 }
27908 Clazz_instantialize (this, arguments);
27909 }, javax.swing, "JTextField", javax.swing.text.JTextComponent, javax.swing.SwingConstants);
27910 Clazz_makeConstructor (c$, 
27911 function () {
27912 this.construct (null, null, 0);
27913 });
27914 Clazz_makeConstructor (c$, 
27915 function (text) {
27916 this.construct (null, text, 0);
27917 }, "~S");
27918 Clazz_makeConstructor (c$, 
27919 function (columns) {
27920 this.construct (null, null, columns);
27921 }, "~N");
27922 Clazz_makeConstructor (c$, 
27923 function (text, columns) {
27924 this.construct (null, text, columns);
27925 }, "~S,~N");
27926 Clazz_makeConstructor (c$, 
27927 function (doc, text, columns) {
27928 Clazz_superConstructor (this, javax.swing.JTextField);
27929 if (columns < 0) {
27930 throw  new IllegalArgumentException ("columns less than zero.");
27931 }this.columns = columns;
27932 if (doc == null) {
27933 doc = this.createDefaultModel ();
27934 }this.setDocument (doc);
27935 if (text != null) {
27936 this.setText (text);
27937 }}, "javax.swing.text.Document,~S,~N");
27938 Clazz_overrideMethod (c$, "getUIClassID", 
27939 function () {
27940 return "TextFieldUI";
27941 });
27942 Clazz_defineMethod (c$, "setDocument", 
27943 function (doc) {
27944 if (doc != null) {
27945 doc.putProperty ("filterNewlines", Boolean.TRUE);
27946 }Clazz_superCall (this, javax.swing.JTextField, "setDocument", [doc]);
27947 }, "javax.swing.text.Document");
27948 Clazz_overrideMethod (c$, "isValidateRoot", 
27949 function () {
27950 var parent = this.getParent ();
27951 if (Clazz_instanceOf (parent, javax.swing.JViewport)) {
27952 return false;
27953 }return true;
27954 });
27955 Clazz_defineMethod (c$, "getHorizontalAlignment", 
27956 function () {
27957 return this.horizontalAlignment;
27958 });
27959 Clazz_defineMethod (c$, "setHorizontalAlignment", 
27960 function (alignment) {
27961 if (alignment == this.horizontalAlignment) return;
27962 var oldValue = this.horizontalAlignment;
27963 if ((alignment == 2) || (alignment == 0) || (alignment == 4) || (alignment == 10) || (alignment == 11)) {
27964 this.horizontalAlignment = alignment;
27965 } else {
27966 throw  new IllegalArgumentException ("horizontalAlignment");
27967 }this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
27968 this.invalidate ();
27969 this.repaint ();
27970 }, "~N");
27971 Clazz_defineMethod (c$, "createDefaultModel", 
27972 function () {
27973 return swingjs.JSToolkit.getPlainDocument (this);
27974 });
27975 Clazz_defineMethod (c$, "getColumns", 
27976 function () {
27977 return this.columns;
27978 });
27979 Clazz_defineMethod (c$, "setColumns", 
27980 function (columns) {
27981 var oldVal = this.columns;
27982 if (columns < 0) {
27983 throw  new IllegalArgumentException ("columns less than zero.");
27984 }if (columns != oldVal) {
27985 this.columns = columns;
27986 this.invalidate ();
27987 }}, "~N");
27988 Clazz_defineMethod (c$, "getColumnWidth", 
27989 function () {
27990 if (this.columnWidth == 0) {
27991 var metrics = this.getFontMetrics (this.getFont ());
27992 this.columnWidth = metrics.charWidth ('m');
27993 }return this.columnWidth;
27994 });
27995 Clazz_overrideMethod (c$, "getPreferredSize", 
27996 function () {
27997 return this.getPrefSizeJTF ();
27998 });
27999 Clazz_defineMethod (c$, "getPrefSizeJTF", 
28000 function () {
28001 var size = this.getPrefSizeJComp ();
28002 if (this.columns != 0) {
28003 var insets = this.getInsets ();
28004 size.width = this.columns * this.getColumnWidth () + insets.left + insets.right;
28005 }return size;
28006 });
28007 Clazz_defineMethod (c$, "setFont", 
28008 function (f) {
28009 Clazz_superCall (this, javax.swing.JTextField, "setFont", [f]);
28010 this.columnWidth = 0;
28011 }, "java.awt.Font");
28012 Clazz_defineMethod (c$, "addActionListener", 
28013 function (l) {
28014 this.listenerList.add (java.awt.event.ActionListener, l);
28015 }, "java.awt.event.ActionListener");
28016 Clazz_defineMethod (c$, "removeActionListener", 
28017 function (l) {
28018 if ((l != null) && (this.getAction () === l)) {
28019 this.setAction (null);
28020 } else {
28021 this.listenerList.remove (java.awt.event.ActionListener, l);
28022 }}, "java.awt.event.ActionListener");
28023 Clazz_defineMethod (c$, "getActionListeners", 
28024 function () {
28025 return this.listenerList.getListeners (java.awt.event.ActionListener);
28026 });
28027 Clazz_defineMethod (c$, "fireActionPerformed", 
28028 function () {
28029 var listeners = this.listenerList.getListenerList ();
28030 var modifiers = 0;
28031 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
28032 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
28033 modifiers = (currentEvent).getModifiers ();
28034 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
28035 modifiers = (currentEvent).getModifiers ();
28036 }var e =  new java.awt.event.ActionEvent (this, 1001, (this.command != null) ? this.command : this.getText (), java.awt.EventQueue.getMostRecentEventTime (), modifiers);
28037 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28038 if (listeners[i] === java.awt.event.ActionListener) {
28039 (listeners[i + 1]).actionPerformed (e);
28040 }}
28041 });
28042 Clazz_defineMethod (c$, "setActionCommand", 
28043 function (command) {
28044 this.command = command;
28045 }, "~S");
28046 Clazz_defineMethod (c$, "setAction", 
28047 function (a) {
28048 var oldValue = this.getAction ();
28049 if (this.$action == null || !this.$action.equals (a)) {
28050 this.$action = a;
28051 if (oldValue != null) {
28052 this.removeActionListener (oldValue);
28053 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
28054 this.actionPropertyChangeListener = null;
28055 }this.configurePropertiesFromAction (this.$action);
28056 if (this.$action != null) {
28057 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
28058 this.addActionListener (this.$action);
28059 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
28060 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
28061 }this.firePropertyChangeObject ("action", oldValue, this.$action);
28062 }}, "javax.swing.Action");
28063 Clazz_defineMethod (c$, "isListener", 
28064  function (c, a) {
28065 var isListener = false;
28066 var listeners = this.listenerList.getListenerList ();
28067 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28068 if (listeners[i] === c && listeners[i + 1] === a) {
28069 isListener = true;
28070 }}
28071 return isListener;
28072 }, "Class,java.awt.event.ActionListener");
28073 Clazz_defineMethod (c$, "getAction", 
28074 function () {
28075 return this.$action;
28076 });
28077 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
28078 function (a) {
28079 javax.swing.AbstractAction.setEnabledFromAction (this, a);
28080 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
28081 this.setActionCommandFromAction (a);
28082 }, "javax.swing.Action");
28083 Clazz_defineMethod (c$, "actionPropertyChanged", 
28084 function (action, propertyName) {
28085 if (propertyName === "ActionCommandKey") {
28086 this.setActionCommandFromAction (action);
28087 } else if (propertyName === "enabled") {
28088 javax.swing.AbstractAction.setEnabledFromAction (this, action);
28089 } else if (propertyName === "ShortDescription") {
28090 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
28091 }}, "javax.swing.Action,~S");
28092 Clazz_defineMethod (c$, "setActionCommandFromAction", 
28093  function (action) {
28094 this.setActionCommand ((action == null) ? null : action.getValue ("ActionCommandKey"));
28095 }, "javax.swing.Action");
28096 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
28097 function (a) {
28098 return  new javax.swing.JTextField.TextFieldActionPropertyChangeListener (this, a);
28099 }, "javax.swing.Action");
28100 Clazz_defineMethod (c$, "getActions", 
28101 function () {
28102 return javax.swing.text.TextAction.augmentList (Clazz_superCall (this, javax.swing.JTextField, "getActions", []), javax.swing.JTextField.defaultActions);
28103 });
28104 Clazz_defineMethod (c$, "postActionEvent", 
28105 function () {
28106 this.fireActionPerformed ();
28107 });
28108 Clazz_defineMethod (c$, "hasActionListener", 
28109 function () {
28110 var listeners = this.listenerList.getListenerList ();
28111 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28112 if (listeners[i] === java.awt.event.ActionListener) {
28113 return true;
28114 }}
28115 return false;
28116 });
28117 Clazz_defineMethod (c$, "paramString", 
28118 function () {
28119 var horizontalAlignmentString;
28120 if (this.horizontalAlignment == 2) {
28121 horizontalAlignmentString = "LEFT";
28122 } else if (this.horizontalAlignment == 0) {
28123 horizontalAlignmentString = "CENTER";
28124 } else if (this.horizontalAlignment == 4) {
28125 horizontalAlignmentString = "RIGHT";
28126 } else if (this.horizontalAlignment == 10) {
28127 horizontalAlignmentString = "LEADING";
28128 } else if (this.horizontalAlignment == 11) {
28129 horizontalAlignmentString = "TRAILING";
28130 } else horizontalAlignmentString = "";
28131 var commandString = (this.command != null ? this.command : "");
28132 return Clazz_superCall (this, javax.swing.JTextField, "paramString", []) + ",columns=" + this.columns + ",columnWidth=" + this.columnWidth + ",command=" + commandString + ",horizontalAlignment=" + horizontalAlignmentString;
28133 });
28134 c$.$JTextField$ScrollRepainter$ = function () {
28135 Clazz_pu$h(self.c$);
28136 c$ = Clazz_decorateAsClass (function () {
28137 Clazz_prepareCallback (this, arguments);
28138 Clazz_instantialize (this, arguments);
28139 }, javax.swing.JTextField, "ScrollRepainter", null, javax.swing.event.ChangeListener);
28140 Clazz_overrideMethod (c$, "stateChanged", 
28141 function (a) {
28142 this.b$["javax.swing.JTextField"].repaint ();
28143 }, "javax.swing.event.ChangeEvent");
28144 c$ = Clazz_p0p ();
28145 };
28146 Clazz_pu$h(self.c$);
28147 c$ = Clazz_declareType (javax.swing.JTextField, "TextFieldActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
28148 Clazz_overrideMethod (c$, "actionPropertyChanged", 
28149 function (a, b, c) {
28150 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
28151 a.configurePropertiesFromAction (b);
28152 } else {
28153 a.actionPropertyChanged (b, c.getPropertyName ());
28154 }}, "javax.swing.JTextField,javax.swing.Action,java.beans.PropertyChangeEvent");
28155 c$ = Clazz_p0p ();
28156 Clazz_pu$h(self.c$);
28157 c$ = Clazz_declareType (javax.swing.JTextField, "NotifyAction", javax.swing.text.TextAction);
28158 Clazz_makeConstructor (c$, 
28159 function () {
28160 Clazz_superConstructor (this, javax.swing.JTextField.NotifyAction, ["notify-field-accept"]);
28161 });
28162 Clazz_overrideMethod (c$, "actionPerformed", 
28163 function (a) {
28164 var b = this.getFocusedComponent ();
28165 if (Clazz_instanceOf (b, javax.swing.JTextField)) {
28166 var c = b;
28167 c.postActionEvent ();
28168 }}, "java.awt.event.ActionEvent");
28169 Clazz_overrideMethod (c$, "isEnabled", 
28170 function () {
28171 var a = this.getFocusedComponent ();
28172 if (Clazz_instanceOf (a, javax.swing.JTextField)) {
28173 return (a).hasActionListener ();
28174 }return false;
28175 });
28176 c$ = Clazz_p0p ();
28177 Clazz_defineStatics (c$,
28178 "notifyAction", "notify-field-accept");
28179 c$.defaultActions = c$.prototype.defaultActions =  Clazz_newArray (-1, [ new javax.swing.JTextField.NotifyAction ()]);
28180 Clazz_defineStatics (c$,
28181 "$uiClassID", "TextFieldUI");
28182 });
28183 Clazz_declarePackage ("javax.swing");
28184 Clazz_load (["java.beans.PropertyChangeListener"], "javax.swing.ActionPropertyChangeListener", null, function () {
28185 c$ = Clazz_decorateAsClass (function () {
28186 this.action = null;
28187 Clazz_instantialize (this, arguments);
28188 }, javax.swing, "ActionPropertyChangeListener", null, java.beans.PropertyChangeListener);
28189 Clazz_makeConstructor (c$, 
28190 function (c, a) {
28191 this.setTarget (c);
28192 this.action = a;
28193 }, "~O,javax.swing.Action");
28194 Clazz_overrideMethod (c$, "propertyChange", 
28195 function (e) {
28196 var target = this.getTarget ();
28197 if (target == null) {
28198 this.getAction ().removePropertyChangeListener (this);
28199 } else {
28200 this.actionPropertyChanged (target, this.getAction (), e);
28201 }}, "java.beans.PropertyChangeEvent");
28202 Clazz_defineMethod (c$, "setTarget", 
28203  function (c) {
28204 }, "~O");
28205 Clazz_defineMethod (c$, "getTarget", 
28206 function () {
28207 return null;
28208 });
28209 Clazz_defineMethod (c$, "getAction", 
28210 function () {
28211 return this.action;
28212 });
28213 });
28214 Clazz_declarePackage ("javax.swing.event");
28215 Clazz_load (["java.util.EventListener"], "javax.swing.event.ChangeListener", null, function () {
28216 Clazz_declareInterface (javax.swing.event, "ChangeListener", java.util.EventListener);
28217 });
28218 Clazz_declarePackage ("javax.swing");
28219 Clazz_load (null, "javax.swing.ActionMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28220 c$ = Clazz_decorateAsClass (function () {
28221 this.arrayTable = null;
28222 this.parent = null;
28223 Clazz_instantialize (this, arguments);
28224 }, javax.swing, "ActionMap");
28225 Clazz_makeConstructor (c$, 
28226 function () {
28227 });
28228 Clazz_defineMethod (c$, "setParent", 
28229 function (map) {
28230 this.parent = map;
28231 }, "javax.swing.ActionMap");
28232 Clazz_defineMethod (c$, "getParent", 
28233 function () {
28234 return this.parent;
28235 });
28236 Clazz_defineMethod (c$, "put", 
28237 function (key, action) {
28238 if (key == null) {
28239 return;
28240 }if (action == null) {
28241 this.remove (key);
28242 } else {
28243 if (this.arrayTable == null) {
28244 this.arrayTable =  new javax.swing.ArrayTable ();
28245 }this.arrayTable.put (key, action);
28246 }}, "~O,javax.swing.Action");
28247 Clazz_defineMethod (c$, "get", 
28248 function (key) {
28249 var value = (this.arrayTable == null) ? null : this.arrayTable.get (key);
28250 if (value == null) {
28251 var parent = this.getParent ();
28252 if (parent != null) {
28253 return parent.get (key);
28254 }}return value;
28255 }, "~O");
28256 Clazz_defineMethod (c$, "remove", 
28257 function (key) {
28258 if (this.arrayTable != null) {
28259 this.arrayTable.remove (key);
28260 }}, "~O");
28261 Clazz_defineMethod (c$, "clear", 
28262 function () {
28263 if (this.arrayTable != null) {
28264 this.arrayTable.clear ();
28265 }});
28266 Clazz_defineMethod (c$, "keys", 
28267 function () {
28268 if (this.arrayTable == null) {
28269 return null;
28270 }return this.arrayTable.getKeys (null);
28271 });
28272 Clazz_defineMethod (c$, "size", 
28273 function () {
28274 if (this.arrayTable == null) {
28275 return 0;
28276 }return this.arrayTable.size ();
28277 });
28278 Clazz_defineMethod (c$, "allKeys", 
28279 function () {
28280 var count = this.size ();
28281 var parent = this.getParent ();
28282 if (count == 0) {
28283 if (parent != null) {
28284 return parent.allKeys ();
28285 }return this.keys ();
28286 }if (parent == null) {
28287 return this.keys ();
28288 }var keys = this.keys ();
28289 var pKeys = parent.allKeys ();
28290 if (pKeys == null) {
28291 return keys;
28292 }if (keys == null) {
28293 return pKeys;
28294 }var keyMap =  new java.util.HashMap ();
28295 var counter;
28296 for (counter = keys.length - 1; counter >= 0; counter--) {
28297 keyMap.put (keys[counter], keys[counter]);
28298 }
28299 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28300 keyMap.put (pKeys[counter], pKeys[counter]);
28301 }
28302 return keyMap.keySet ().toArray ();
28303 });
28304 });
28305 Clazz_declarePackage ("javax.swing");
28306 Clazz_load (null, "javax.swing.InputMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28307 c$ = Clazz_decorateAsClass (function () {
28308 this.arrayTable = null;
28309 this.parent = null;
28310 Clazz_instantialize (this, arguments);
28311 }, javax.swing, "InputMap");
28312 Clazz_makeConstructor (c$, 
28313 function () {
28314 });
28315 Clazz_defineMethod (c$, "setParent", 
28316 function (map) {
28317 this.parent = map;
28318 }, "javax.swing.InputMap");
28319 Clazz_defineMethod (c$, "getParent", 
28320 function () {
28321 return this.parent;
28322 });
28323 Clazz_defineMethod (c$, "put", 
28324 function (keyStroke, actionMapKey) {
28325 if (keyStroke == null) {
28326 return;
28327 }if (actionMapKey == null) {
28328 this.remove (keyStroke);
28329 } else {
28330 if (this.arrayTable == null) {
28331 this.arrayTable =  new javax.swing.ArrayTable ();
28332 }this.arrayTable.put (keyStroke, actionMapKey);
28333 }}, "javax.swing.KeyStroke,~O");
28334 Clazz_defineMethod (c$, "get", 
28335 function (keyStroke) {
28336 if (this.arrayTable == null) {
28337 var parent = this.getParent ();
28338 if (parent != null) {
28339 return parent.get (keyStroke);
28340 }return null;
28341 }var value = this.arrayTable.get (keyStroke);
28342 if (value == null) {
28343 var parent = this.getParent ();
28344 if (parent != null) {
28345 return parent.get (keyStroke);
28346 }}return value;
28347 }, "javax.swing.KeyStroke");
28348 Clazz_defineMethod (c$, "remove", 
28349 function (key) {
28350 if (this.arrayTable != null) {
28351 this.arrayTable.remove (key);
28352 }}, "javax.swing.KeyStroke");
28353 Clazz_defineMethod (c$, "clear", 
28354 function () {
28355 if (this.arrayTable != null) {
28356 this.arrayTable.clear ();
28357 }});
28358 Clazz_defineMethod (c$, "keys", 
28359 function () {
28360 if (this.arrayTable == null) {
28361 return null;
28362 }var keys =  new Array (this.arrayTable.size ());
28363 this.arrayTable.getKeys (keys);
28364 return keys;
28365 });
28366 Clazz_defineMethod (c$, "size", 
28367 function () {
28368 if (this.arrayTable == null) {
28369 return 0;
28370 }return this.arrayTable.size ();
28371 });
28372 Clazz_defineMethod (c$, "allKeys", 
28373 function () {
28374 var count = this.size ();
28375 var parent = this.getParent ();
28376 if (count == 0) {
28377 if (parent != null) {
28378 return parent.allKeys ();
28379 }return this.keys ();
28380 }if (parent == null) {
28381 return this.keys ();
28382 }var keys = this.keys ();
28383 var pKeys = parent.allKeys ();
28384 if (pKeys == null) {
28385 return keys;
28386 }if (keys == null) {
28387 return pKeys;
28388 }var keyMap =  new java.util.HashMap ();
28389 var counter;
28390 for (counter = keys.length - 1; counter >= 0; counter--) {
28391 keyMap.put (keys[counter], keys[counter]);
28392 }
28393 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28394 keyMap.put (pKeys[counter], pKeys[counter]);
28395 }
28396 var allKeys =  new Array (keyMap.size ());
28397 return keyMap.keySet ().toArray (allKeys);
28398 });
28399 });
28400 Clazz_declarePackage ("javax.swing");
28401 Clazz_declareInterface (javax.swing, "Scrollable");
28402 Clazz_declarePackage ("javax.swing.event");
28403 Clazz_load (["java.util.EventObject"], "javax.swing.event.CaretEvent", null, function () {
28404 c$ = Clazz_declareType (javax.swing.event, "CaretEvent", java.util.EventObject);
28405 });
28406 Clazz_declarePackage ("javax.swing.event");
28407 Clazz_load (["java.util.EventListener"], "javax.swing.event.DocumentListener", null, function () {
28408 Clazz_declareInterface (javax.swing.event, "DocumentListener", java.util.EventListener);
28409 });
28410 Clazz_declarePackage ("javax.swing.event");
28411 Clazz_load (null, "javax.swing.event.EventListenerList", ["java.lang.reflect.Array"], function () {
28412 c$ = Clazz_decorateAsClass (function () {
28413 this.listenerList = null;
28414 Clazz_instantialize (this, arguments);
28415 }, javax.swing.event, "EventListenerList");
28416 Clazz_prepareFields (c$, function () {
28417 this.listenerList = javax.swing.event.EventListenerList.NULL_ARRAY;
28418 });
28419 Clazz_defineMethod (c$, "getListenerList", 
28420 function () {
28421 return this.listenerList;
28422 });
28423 Clazz_defineMethod (c$, "getListeners", 
28424 function (t) {
28425 var lList = this.listenerList;
28426 var n = this.getListenerCount (lList, t);
28427 var result = java.lang.reflect.Array.newInstance (t, n);
28428 var j = 0;
28429 for (var i = lList.length - 2; i >= 0; i -= 2) {
28430 if (lList[i] === t) {
28431 result[j++] = lList[i + 1];
28432 }}
28433 return result;
28434 }, "Class");
28435 Clazz_defineMethod (c$, "getListenerCount", 
28436 function () {
28437 return Clazz_doubleToInt (this.listenerList.length / 2);
28438 });
28439 Clazz_defineMethod (c$, "getListenerCount", 
28440 function (t) {
28441 var lList = this.listenerList;
28442 return this.getListenerCount (lList, t);
28443 }, "Class");
28444 Clazz_defineMethod (c$, "getListenerCount", 
28445  function (list, t) {
28446 var count = 0;
28447 for (var i = 0; i < list.length; i += 2) {
28448 if (t === list[i]) count++;
28449 }
28450 return count;
28451 }, "~A,Class");
28452 Clazz_defineMethod (c$, "add", 
28453 function (t, l) {
28454 if (l == null) {
28455 return;
28456 }if (this.listenerList === javax.swing.event.EventListenerList.NULL_ARRAY) {
28457 this.listenerList =  Clazz_newArray (-1, [t, l]);
28458 } else {
28459 var i = this.listenerList.length;
28460 var tmp =  new Array (i + 2);
28461 System.arraycopy (this.listenerList, 0, tmp, 0, i);
28462 tmp[i] = t;
28463 tmp[i + 1] = l;
28464 this.listenerList = tmp;
28465 }}, "Class,~O");
28466 Clazz_defineMethod (c$, "remove", 
28467 function (t, l) {
28468 if (l == null) {
28469 return;
28470 }var index = -1;
28471 for (var i = this.listenerList.length - 2; i >= 0; i -= 2) {
28472 if ((this.listenerList[i] === t) && (this.listenerList[i + 1].equals (l) == true)) {
28473 index = i;
28474 break;
28475 }}
28476 if (index != -1) {
28477 var tmp =  new Array (this.listenerList.length - 2);
28478 System.arraycopy (this.listenerList, 0, tmp, 0, index);
28479 if (index < tmp.length) System.arraycopy (this.listenerList, index + 2, tmp, index, tmp.length - index);
28480 this.listenerList = (tmp.length == 0) ? javax.swing.event.EventListenerList.NULL_ARRAY : tmp;
28481 }}, "Class,~O");
28482 Clazz_overrideMethod (c$, "toString", 
28483 function () {
28484 var lList = this.listenerList;
28485 var s = "EventListenerList: ";
28486 s += Clazz_doubleToInt (lList.length / 2) + " listeners: ";
28487 for (var i = 0; i <= lList.length - 2; i += 2) {
28488 s += " type " + (lList[i]).getName ();
28489 s += " listener " + lList[i + 1];
28490 }
28491 return s;
28492 });
28493 c$.NULL_ARRAY = c$.prototype.NULL_ARRAY =  new Array (0);
28494 });
28495 Clazz_declarePackage ("javax.swing.event");
28496 Clazz_load (["java.util.EventObject"], "javax.swing.event.ChangeEvent", null, function () {
28497 c$ = Clazz_declareType (javax.swing.event, "ChangeEvent", java.util.EventObject);
28498 });
28499 Clazz_declarePackage ("jssun.swing");
28500 Clazz_load (["jssun.swing.UIClientPropertyKey"], "jssun.swing.StringUIClientPropertyKey", null, function () {
28501 c$ = Clazz_decorateAsClass (function () {
28502 this.key = null;
28503 Clazz_instantialize (this, arguments);
28504 }, jssun.swing, "StringUIClientPropertyKey", null, jssun.swing.UIClientPropertyKey);
28505 Clazz_makeConstructor (c$, 
28506 function (key) {
28507 this.key = key;
28508 }, "~S");
28509 Clazz_overrideMethod (c$, "toString", 
28510 function () {
28511 return this.key;
28512 });
28513 });
28514 Clazz_declarePackage ("jssun.swing");
28515 Clazz_declareInterface (jssun.swing, "UIClientPropertyKey");
28516 Clazz_declarePackage ("java.awt");
28517 Clazz_load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () {
28518 c$ = Clazz_declareType (java.awt, "Graphics2D", java.awt.Graphics);
28519 Clazz_makeConstructor (c$, 
28520 function () {
28521 Clazz_superConstructor (this, java.awt.Graphics2D, []);
28522 });
28523 Clazz_overrideMethod (c$, "draw3DRect", 
28524 function (x, y, width, height, raised) {
28525 var p = this.getPaint ();
28526 var c = this.getColor ();
28527 var brighter = c.brighter ();
28528 var darker = c.darker ();
28529 this.setColor (raised ? brighter : darker);
28530 this.fillRect (x, y, 1, height + 1);
28531 this.fillRect (x + 1, y, width - 1, 1);
28532 this.setColor (raised ? darker : brighter);
28533 this.fillRect (x + 1, y + height, width, 1);
28534 this.fillRect (x + width, y, 1, height);
28535 this.setPaint (p);
28536 }, "~N,~N,~N,~N,~B");
28537 Clazz_overrideMethod (c$, "fill3DRect", 
28538 function (x, y, width, height, raised) {
28539 var p = this.getPaint ();
28540 var c = this.getColor ();
28541 var brighter = c.brighter ();
28542 var darker = c.darker ();
28543 if (!raised) {
28544 this.setColor (darker);
28545 } else if (p !== c) {
28546 this.setColor (c);
28547 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28548 this.setColor (raised ? brighter : darker);
28549 this.fillRect (x, y, 1, height);
28550 this.fillRect (x + 1, y, width - 2, 1);
28551 this.setColor (raised ? darker : brighter);
28552 this.fillRect (x + 1, y + height - 1, width - 1, 1);
28553 this.fillRect (x + width - 1, y, 1, height - 1);
28554 this.setPaint (p);
28555 }, "~N,~N,~N,~N,~B");
28556 });
28557 Clazz_declarePackage ("java.awt");
28558 c$ = Clazz_declareType (java.awt, "Graphics");
28559 Clazz_makeConstructor (c$, 
28560 function () {
28561 });
28562 Clazz_defineMethod (c$, "create", 
28563 function () {
28564 return this.createSwingJS ();
28565 });
28566 Clazz_defineMethod (c$, "create", 
28567 function (x, y, width, height) {
28568 return this.create4 (x, y, width, height);
28569 }, "~N,~N,~N,~N");
28570 Clazz_defineMethod (c$, "create4", 
28571 function (x, y, width, height) {
28572 var g = this.createSwingJS ();
28573 if (g == null) return null;
28574 g.translate (x, y);
28575 g.clipRect (0, 0, width, height);
28576 return g;
28577 }, "~N,~N,~N,~N");
28578 Clazz_defineMethod (c$, "getFontMetrics", 
28579 function () {
28580 return this.getFontMetrics (this.getFont ());
28581 });
28582 Clazz_defineMethod (c$, "drawRect", 
28583 function (x, y, width, height) {
28584 if ((width < 0) || (height < 0)) {
28585 return;
28586 }if (height == 0 || width == 0) {
28587 this.drawLine (x, y, x + width, y + height);
28588 } else {
28589 this.drawLine (x, y, x + width - 1, y);
28590 this.drawLine (x + width, y, x + width, y + height - 1);
28591 this.drawLine (x + width, y + height, x + 1, y + height);
28592 this.drawLine (x, y + height, x, y + 1);
28593 }}, "~N,~N,~N,~N");
28594 Clazz_defineMethod (c$, "draw3DRect", 
28595 function (x, y, width, height, raised) {
28596 var c = this.getColor ();
28597 var brighter = c.brighter ();
28598 var darker = c.darker ();
28599 this.setColor (raised ? brighter : darker);
28600 this.drawLine (x, y, x, y + height);
28601 this.drawLine (x + 1, y, x + width - 1, y);
28602 this.setColor (raised ? darker : brighter);
28603 this.drawLine (x + 1, y + height, x + width, y + height);
28604 this.drawLine (x + width, y, x + width, y + height - 1);
28605 this.setColor (c);
28606 }, "~N,~N,~N,~N,~B");
28607 Clazz_defineMethod (c$, "fill3DRect", 
28608 function (x, y, width, height, raised) {
28609 var c = this.getColor ();
28610 var brighter = c.brighter ();
28611 var darker = c.darker ();
28612 if (!raised) {
28613 this.setColor (darker);
28614 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28615 this.setColor (raised ? brighter : darker);
28616 this.drawLine (x, y, x, y + height - 1);
28617 this.drawLine (x + 1, y, x + width - 2, y);
28618 this.setColor (raised ? darker : brighter);
28619 this.drawLine (x + 1, y + height - 1, x + width - 1, y + height - 1);
28620 this.drawLine (x + width - 1, y, x + width - 1, y + height - 2);
28621 this.setColor (c);
28622 }, "~N,~N,~N,~N,~B");
28623 Clazz_defineMethod (c$, "drawPolygon", 
28624 function (p) {
28625 this.drawPolygon (p.xpoints, p.ypoints, p.npoints);
28626 }, "java.awt.Polygon");
28627 Clazz_defineMethod (c$, "fillPolygon", 
28628 function (p) {
28629 this.fillPolygon (p.xpoints, p.ypoints, p.npoints);
28630 }, "java.awt.Polygon");
28631 Clazz_defineMethod (c$, "drawChars", 
28632 function (data, offset, length, x, y) {
28633 this.drawString ( String.instantialize (data, offset, length), x, y);
28634 }, "~A,~N,~N,~N,~N");
28635 Clazz_defineMethod (c$, "drawBytes", 
28636 function (data, offset, length, x, y) {
28637 this.drawString ( String.instantialize (data, 0, offset, length), x, y);
28638 }, "~A,~N,~N,~N,~N");
28639 Clazz_overrideMethod (c$, "finalize", 
28640 function () {
28641 this.dispose ();
28642 });
28643 Clazz_overrideMethod (c$, "toString", 
28644 function () {
28645 return this.getClass ().getName () + "[font=" + this.getFont () + ",color=" + this.getColor () + "]";
28646 });
28647 Clazz_defineMethod (c$, "getClipRect", 
28648 function () {
28649 return this.getClipBounds ();
28650 });
28651 Clazz_defineMethod (c$, "hitClip", 
28652 function (x, y, width, height) {
28653 var clipRect = this.getClipBounds ();
28654 if (clipRect == null) {
28655 return true;
28656 }return clipRect.intersects (x, y, width, height);
28657 }, "~N,~N,~N,~N");
28658 Clazz_declarePackage ("jssun.font");
28659 Clazz_load (["java.awt.FontMetrics", "java.util.Hashtable"], "jssun.font.FontDesignMetrics", ["java.lang.IndexOutOfBoundsException", "java.awt.Toolkit", "swingjs.JSToolkit"], function () {
28660 c$ = Clazz_decorateAsClass (function () {
28661 this.ascent = 0;
28662 this.descent = 0;
28663 this.leading = 0;
28664 this.height = -1;
28665 Clazz_instantialize (this, arguments);
28666 }, jssun.font, "FontDesignMetrics", java.awt.FontMetrics);
28667 c$.getMetrics = Clazz_defineMethod (c$, "getMetrics", 
28668 function (font) {
28669 var m = null;
28670 var r;
28671 r = jssun.font.FontDesignMetrics.metricsCache.get (font);
28672 if (r != null) {
28673 m = r.get ();
28674 }if (m == null) {
28675 m =  new jssun.font.FontDesignMetrics (font);
28676 jssun.font.FontDesignMetrics.metricsCache.put (font,  new jssun.font.FontDesignMetrics.KeyReference (font, m));
28677 }for (var i = 0; i < jssun.font.FontDesignMetrics.recentMetrics.length; i++) {
28678 if (jssun.font.FontDesignMetrics.recentMetrics[i] === m) {
28679 return m;
28680 }}
28681 {
28682 jssun.font.FontDesignMetrics.recentMetrics[jssun.font.FontDesignMetrics.recentIndex++] = m;
28683 if (jssun.font.FontDesignMetrics.recentIndex == 5) {
28684 jssun.font.FontDesignMetrics.recentIndex = 0;
28685 }}return m;
28686 }, "java.awt.Font");
28687 Clazz_makeConstructor (c$, 
28688  function (font) {
28689 Clazz_superConstructor (this, jssun.font.FontDesignMetrics, [font]);
28690 this.font = font;
28691 this.initMatrixAndMetrics ();
28692 }, "java.awt.Font");
28693 Clazz_defineMethod (c$, "initMatrixAndMetrics", 
28694  function () {
28695 {
28696 //need to calculate ascent, descent, leading, and maxAdvance
28697 }});
28698 Clazz_defineMethod (c$, "charWidth", 
28699 function (ch) {
28700 var s = "";
28701 {
28702 s = "" + ch;
28703 }return this.stringWidth (s);
28704 }, "~S");
28705 Clazz_overrideMethod (c$, "stringWidth", 
28706 function (str) {
28707 return Clazz_doubleToInt (0.5 + this.getWidth (str));
28708 }, "~S");
28709 Clazz_defineMethod (c$, "getWidth", 
28710  function (str) {
28711 return swingjs.JSToolkit.getStringWidth (null, this.font, str);
28712 }, "~S");
28713 Clazz_overrideMethod (c$, "charsWidth", 
28714 function (data, off, len) {
28715 var width = 0;
28716 if (len < 0) {
28717 throw  new IndexOutOfBoundsException ("len=" + len);
28718 }var limit = off + len;
28719 for (var i = off; i < limit; i++) {
28720 var ch = data[i];
28721 width += this.stringWidth ("" + ch);
28722 }
28723 return Clazz_doubleToInt (0.5 + width);
28724 }, "~A,~N,~N");
28725 Clazz_overrideMethod (c$, "getWidths", 
28726 function () {
28727 var widths =  Clazz_newIntArray (256, 0);
28728 return widths;
28729 });
28730 Clazz_defineMethod (c$, "getAscent", 
28731 function () {
28732 if (this.ascent == 0) this.ascent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getAscent ();
28733 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.ascent);
28734 });
28735 Clazz_defineMethod (c$, "getDescent", 
28736 function () {
28737 if (this.descent == 0) this.descent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getDescent ();
28738 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28739 });
28740 Clazz_overrideMethod (c$, "getLeading", 
28741 function () {
28742 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading) - Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28743 });
28744 Clazz_overrideMethod (c$, "getHeight", 
28745 function () {
28746 if (this.height < 0) {
28747 this.height = this.getAscent () + Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading);
28748 }return this.height;
28749 });
28750 Clazz_pu$h(self.c$);
28751 c$ = Clazz_decorateAsClass (function () {
28752 this.key = null;
28753 this.val = null;
28754 Clazz_instantialize (this, arguments);
28755 }, jssun.font.FontDesignMetrics, "KeyReference");
28756 Clazz_makeConstructor (c$, 
28757 function (a, b) {
28758 this.key = a;
28759 this.val = b;
28760 }, "~O,~O");
28761 Clazz_defineMethod (c$, "get", 
28762 function () {
28763 return this.val;
28764 });
28765 Clazz_defineMethod (c$, "dispose", 
28766 function () {
28767 if (jssun.font.FontDesignMetrics.metricsCache.get (this.key) === this) {
28768 jssun.font.FontDesignMetrics.metricsCache.remove (this.key);
28769 }});
28770 c$ = Clazz_p0p ();
28771 Clazz_defineStatics (c$,
28772 "roundingUpValue", 0.95);
28773 c$.metricsCache = c$.prototype.metricsCache =  new java.util.Hashtable ();
28774 Clazz_defineStatics (c$,
28775 "MAXRECENT", 5);
28776 c$.recentMetrics = c$.prototype.recentMetrics =  new Array (5);
28777 Clazz_defineStatics (c$,
28778 "recentIndex", 0);
28779 });
28780 Clazz_declarePackage ("java.awt");
28781 Clazz_load (["java.awt.font.FontRenderContext"], "java.awt.FontMetrics", ["java.lang.Character"], function () {
28782 c$ = Clazz_decorateAsClass (function () {
28783 this.font = null;
28784 Clazz_instantialize (this, arguments);
28785 }, java.awt, "FontMetrics");
28786 Clazz_makeConstructor (c$, 
28787 function (font) {
28788 this.font = font;
28789 }, "java.awt.Font");
28790 Clazz_defineMethod (c$, "getFont", 
28791 function () {
28792 return this.font;
28793 });
28794 Clazz_defineMethod (c$, "getFontRenderContext", 
28795 function () {
28796 return java.awt.FontMetrics.DEFAULT_FRC;
28797 });
28798 Clazz_defineMethod (c$, "getLeading", 
28799 function () {
28800 return 0;
28801 });
28802 Clazz_defineMethod (c$, "getAscent", 
28803 function () {
28804 return this.font.getSize ();
28805 });
28806 Clazz_defineMethod (c$, "getDescent", 
28807 function () {
28808 return 0;
28809 });
28810 Clazz_defineMethod (c$, "getHeight", 
28811 function () {
28812 return this.getLeading () + this.getAscent () + this.getDescent ();
28813 });
28814 Clazz_defineMethod (c$, "getMaxAscent", 
28815 function () {
28816 return this.getAscent ();
28817 });
28818 Clazz_defineMethod (c$, "getMaxDescent", 
28819 function () {
28820 return this.getDescent ();
28821 });
28822 Clazz_defineMethod (c$, "getMaxDecent", 
28823 function () {
28824 return this.getMaxDescent ();
28825 });
28826 Clazz_defineMethod (c$, "getMaxAdvance", 
28827 function () {
28828 return -1;
28829 });
28830 Clazz_defineMethod (c$, "charWidth", 
28831 function (codePoint) {
28832 if (!Character.isValidCodePoint (codePoint)) {
28833 codePoint = 0xffff;
28834 }if (codePoint < 256) {
28835 return this.getWidths ()[codePoint];
28836 } else {
28837 var buffer =  Clazz_newCharArray (2, '\0');
28838 var len = Character.toChars (codePoint, buffer, 0);
28839 return this.charsWidth (buffer, 0, len);
28840 }}, "~N");
28841 Clazz_defineMethod (c$, "charWidth", 
28842 function (ch) {
28843 if (ch.charCodeAt (0) < 256) {
28844 return this.getWidths ()[ch.charCodeAt (0)];
28845 }var data =  Clazz_newCharArray (-1, [ch]);
28846 return this.charsWidth (data, 0, 1);
28847 }, "~S");
28848 Clazz_defineMethod (c$, "stringWidth", 
28849 function (str) {
28850 var len = str.length;
28851 var data =  Clazz_newCharArray (len, '\0');
28852 str.getChars (0, len, data, 0);
28853 return this.charsWidth (data, 0, len);
28854 }, "~S");
28855 Clazz_defineMethod (c$, "charsWidth", 
28856 function (data, off, len) {
28857 return this.stringWidth ( String.instantialize (data, off, len));
28858 }, "~A,~N,~N");
28859 Clazz_defineMethod (c$, "bytesWidth", 
28860 function (data, off, len) {
28861 return this.stringWidth ( String.instantialize (data, 0, off, len));
28862 }, "~A,~N,~N");
28863 Clazz_defineMethod (c$, "getWidths", 
28864 function () {
28865 var widths =  Clazz_newIntArray (256, 0);
28866 for (var ch = String.fromCharCode (0); ch.charCodeAt (0) < 256; ch = String.fromCharCode (ch.charCodeAt (0) + 1)) {
28867 widths[ch.charCodeAt (0)] = this.charWidth (ch);
28868 }
28869 return widths;
28870 });
28871 Clazz_overrideMethod (c$, "toString", 
28872 function () {
28873 return this.getClass ().getName () + "[font=" + this.getFont () + "ascent=" + this.getAscent () + ", descent=" + this.getDescent () + ", height=" + this.getHeight () + "]";
28874 });
28875 c$.DEFAULT_FRC = c$.prototype.DEFAULT_FRC =  new java.awt.font.FontRenderContext (null, false, false);
28876 });
28877 Clazz_declarePackage ("JU");
28878 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 () {
28879 c$ = Clazz_declareType (JU, "PT");
28880 c$.parseInt = Clazz_defineMethod (c$, "parseInt", 
28881 function (str) {
28882 return JU.PT.parseIntNext (str,  Clazz_newIntArray (-1, [0]));
28883 }, "~S");
28884 c$.parseIntNext = Clazz_defineMethod (c$, "parseIntNext", 
28885 function (str, next) {
28886 var cch = str.length;
28887 if (next[0] < 0 || next[0] >= cch) return -2147483648;
28888 return JU.PT.parseIntChecked (str, cch, next);
28889 }, "~S,~A");
28890 c$.parseIntChecked = Clazz_defineMethod (c$, "parseIntChecked", 
28891 function (str, ichMax, next) {
28892 var digitSeen = false;
28893 var value = 0;
28894 var ich = next[0];
28895 if (ich < 0) return -2147483648;
28896 var ch;
28897 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28898
28899 var negative = false;
28900 if (ich < ichMax && str.charCodeAt (ich) == 45) {
28901 negative = true;
28902 ++ich;
28903 }while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28904 value = value * 10 + (ch - 48);
28905 digitSeen = true;
28906 ++ich;
28907 }
28908 if (!digitSeen) value = -2147483648;
28909  else if (negative) value = -value;
28910 next[0] = ich;
28911 return value;
28912 }, "~S,~N,~A");
28913 c$.isWhiteSpace = Clazz_defineMethod (c$, "isWhiteSpace", 
28914 function (str, ich) {
28915 var ch;
28916 return (ich >= 0 && ((ch = str.charAt (ich)) == ' ' || ch == '\t' || ch == '\n'));
28917 }, "~S,~N");
28918 c$.parseFloatChecked = Clazz_defineMethod (c$, "parseFloatChecked", 
28919 function (str, ichMax, next, isStrict) {
28920 var digitSeen = false;
28921 var ich = next[0];
28922 if (isStrict && str.indexOf ('\n') != str.lastIndexOf ('\n')) return NaN;
28923 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28924
28925 var negative = false;
28926 if (ich < ichMax && str.charAt (ich) == '-') {
28927 ++ich;
28928 negative = true;
28929 }var ch = 0;
28930 var ival = 0;
28931 var ival2 = 0;
28932 while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28933 ival = (ival * 10) + (ch - 48) * 1;
28934 ++ich;
28935 digitSeen = true;
28936 }
28937 var isDecimal = false;
28938 var iscale = 0;
28939 var nzero = (ival == 0 ? -1 : 0);
28940 if (ch == 46) {
28941 isDecimal = true;
28942 while (++ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28943 digitSeen = true;
28944 if (nzero < 0) {
28945 if (ch == 48) {
28946 nzero--;
28947 continue;
28948 }nzero = -nzero;
28949 }if (iscale < JU.PT.decimalScale.length) {
28950 ival2 = (ival2 * 10) + (ch - 48) * 1;
28951 iscale++;
28952 }}
28953 }var value;
28954 if (!digitSeen) {
28955 value = NaN;
28956 } else if (ival2 > 0) {
28957 value = ival2 * JU.PT.decimalScale[iscale - 1];
28958 if (nzero > 1) {
28959 if (nzero - 2 < JU.PT.decimalScale.length) {
28960 value *= JU.PT.decimalScale[nzero - 2];
28961 } else {
28962 value *= Math.pow (10, 1 - nzero);
28963 }} else {
28964 value += ival;
28965 }} else {
28966 value = ival;
28967 }var isExponent = false;
28968 if (ich < ichMax && (ch == 69 || ch == 101 || ch == 68)) {
28969 isExponent = true;
28970 if (++ich >= ichMax) return NaN;
28971 ch = str.charCodeAt (ich);
28972 if ((ch == 43) && (++ich >= ichMax)) return NaN;
28973 next[0] = ich;
28974 var exponent = JU.PT.parseIntChecked (str, ichMax, next);
28975 if (exponent == -2147483648) return NaN;
28976 if (exponent > 0 && exponent <= JU.PT.tensScale.length) value *= JU.PT.tensScale[exponent - 1];
28977  else if (exponent < 0 && -exponent <= JU.PT.decimalScale.length) value *= JU.PT.decimalScale[-exponent - 1];
28978  else if (exponent != 0) value *= Math.pow (10, exponent);
28979 } else {
28980 next[0] = ich;
28981 }if (negative) value = -value;
28982 if (value == Infinity) value = 3.4028235E38;
28983 return (!isStrict || (!isExponent || isDecimal) && JU.PT.checkTrailingText (str, next[0], ichMax) ? value : NaN);
28984 }, "~S,~N,~A,~B");
28985 c$.checkTrailingText = Clazz_defineMethod (c$, "checkTrailingText", 
28986 function (str, ich, ichMax) {
28987 var ch;
28988 while (ich < ichMax && (JU.PT.isWhitespace (ch = str.charAt (ich)) || ch == ';')) ++ich;
28989
28990 return (ich == ichMax);
28991 }, "~S,~N,~N");
28992 c$.parseFloatArray = Clazz_defineMethod (c$, "parseFloatArray", 
28993 function (str) {
28994 return JU.PT.parseFloatArrayNext (str,  Clazz_newIntArray (1, 0), null, null, null);
28995 }, "~S");
28996 c$.parseFloatArrayInfested = Clazz_defineMethod (c$, "parseFloatArrayInfested", 
28997 function (tokens, data) {
28998 var len = data.length;
28999 var nTokens = tokens.length;
29000 var n = 0;
29001 var max = 0;
29002 for (var i = 0; i >= 0 && i < len && n < nTokens; i++) {
29003 var f;
29004 while (Float.isNaN (f = JU.PT.parseFloat (tokens[n++])) && n < nTokens) {
29005 }
29006 if (!Float.isNaN (f)) data[(max = i)] = f;
29007 if (n == nTokens) break;
29008 }
29009 return max + 1;
29010 }, "~A,~A");
29011 c$.parseFloatArrayNext = Clazz_defineMethod (c$, "parseFloatArrayNext", 
29012 function (str, next, f, strStart, strEnd) {
29013 var n = 0;
29014 var pt = next[0];
29015 if (pt >= 0) {
29016 if (strStart != null) {
29017 var p = str.indexOf (strStart, pt);
29018 if (p >= 0) next[0] = p + strStart.length;
29019 }str = str.substring (next[0]);
29020 pt = (strEnd == null ? -1 : str.indexOf (strEnd));
29021 if (pt < 0) pt = str.length;
29022  else str = str.substring (0, pt);
29023 next[0] += pt + 1;
29024 var tokens = JU.PT.getTokens (str);
29025 if (f == null) f =  Clazz_newFloatArray (tokens.length, 0);
29026 n = JU.PT.parseFloatArrayInfested (tokens, f);
29027 }if (f == null) return  Clazz_newFloatArray (0, 0);
29028 for (var i = n; i < f.length; i++) f[i] = NaN;
29029
29030 return f;
29031 }, "~S,~A,~A,~S,~S");
29032 c$.parseFloatRange = Clazz_defineMethod (c$, "parseFloatRange", 
29033 function (str, ichMax, next) {
29034 var cch = str.length;
29035 if (ichMax > cch) ichMax = cch;
29036 if (next[0] < 0 || next[0] >= ichMax) return NaN;
29037 return JU.PT.parseFloatChecked (str, ichMax, next, false);
29038 }, "~S,~N,~A");
29039 c$.parseFloatNext = Clazz_defineMethod (c$, "parseFloatNext", 
29040 function (str, next) {
29041 var cch = (str == null ? -1 : str.length);
29042 return (next[0] < 0 || next[0] >= cch ? NaN : JU.PT.parseFloatChecked (str, cch, next, false));
29043 }, "~S,~A");
29044 c$.parseFloatStrict = Clazz_defineMethod (c$, "parseFloatStrict", 
29045 function (str) {
29046 var cch = str.length;
29047 if (cch == 0) return NaN;
29048 return JU.PT.parseFloatChecked (str, cch,  Clazz_newIntArray (-1, [0]), true);
29049 }, "~S");
29050 c$.parseFloat = Clazz_defineMethod (c$, "parseFloat", 
29051 function (str) {
29052 return JU.PT.parseFloatNext (str,  Clazz_newIntArray (-1, [0]));
29053 }, "~S");
29054 c$.parseIntRadix = Clazz_defineMethod (c$, "parseIntRadix", 
29055 function (s, i) {
29056 {
29057 return Integer.parseIntRadix(s, i);
29058 }}, "~S,~N");
29059 c$.getTokens = Clazz_defineMethod (c$, "getTokens", 
29060 function (line) {
29061 return JU.PT.getTokensAt (line, 0);
29062 }, "~S");
29063 c$.parseToken = Clazz_defineMethod (c$, "parseToken", 
29064 function (str) {
29065 return JU.PT.parseTokenNext (str,  Clazz_newIntArray (-1, [0]));
29066 }, "~S");
29067 c$.parseTrimmed = Clazz_defineMethod (c$, "parseTrimmed", 
29068 function (str) {
29069 return JU.PT.parseTrimmedRange (str, 0, str.length);
29070 }, "~S");
29071 c$.parseTrimmedAt = Clazz_defineMethod (c$, "parseTrimmedAt", 
29072 function (str, ichStart) {
29073 return JU.PT.parseTrimmedRange (str, ichStart, str.length);
29074 }, "~S,~N");
29075 c$.parseTrimmedRange = Clazz_defineMethod (c$, "parseTrimmedRange", 
29076 function (str, ichStart, ichMax) {
29077 var cch = str.length;
29078 if (ichMax < cch) cch = ichMax;
29079 if (cch < ichStart) return "";
29080 return JU.PT.parseTrimmedChecked (str, ichStart, cch);
29081 }, "~S,~N,~N");
29082 c$.getTokensAt = Clazz_defineMethod (c$, "getTokensAt", 
29083 function (line, ich) {
29084 if (line == null) return null;
29085 var cchLine = line.length;
29086 if (ich < 0 || ich > cchLine) return null;
29087 var tokenCount = JU.PT.countTokens (line, ich);
29088 var tokens =  new Array (tokenCount);
29089 var next =  Clazz_newIntArray (1, 0);
29090 next[0] = ich;
29091 for (var i = 0; i < tokenCount; ++i) tokens[i] = JU.PT.parseTokenChecked (line, cchLine, next);
29092
29093 return tokens;
29094 }, "~S,~N");
29095 c$.countTokens = Clazz_defineMethod (c$, "countTokens", 
29096 function (line, ich) {
29097 var tokenCount = 0;
29098 if (line != null) {
29099 var ichMax = line.length;
29100 while (true) {
29101 while (ich < ichMax && JU.PT.isWhiteSpace (line, ich)) ++ich;
29102
29103 if (ich == ichMax) break;
29104 ++tokenCount;
29105 do {
29106 ++ich;
29107 } while (ich < ichMax && !JU.PT.isWhiteSpace (line, ich));
29108 }
29109 }return tokenCount;
29110 }, "~S,~N");
29111 c$.parseTokenNext = Clazz_defineMethod (c$, "parseTokenNext", 
29112 function (str, next) {
29113 var cch = str.length;
29114 return (next[0] < 0 || next[0] >= cch ? null : JU.PT.parseTokenChecked (str, cch, next));
29115 }, "~S,~A");
29116 c$.parseTokenRange = Clazz_defineMethod (c$, "parseTokenRange", 
29117 function (str, ichMax, next) {
29118 var cch = str.length;
29119 if (ichMax > cch) ichMax = cch;
29120 return (next[0] < 0 || next[0] >= ichMax ? null : JU.PT.parseTokenChecked (str, ichMax, next));
29121 }, "~S,~N,~A");
29122 c$.parseTokenChecked = Clazz_defineMethod (c$, "parseTokenChecked", 
29123 function (str, ichMax, next) {
29124 var ich = next[0];
29125 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29126
29127 var ichNonWhite = ich;
29128 while (ich < ichMax && !JU.PT.isWhiteSpace (str, ich)) ++ich;
29129
29130 next[0] = ich;
29131 return (ichNonWhite == ich ? null : str.substring (ichNonWhite, ich));
29132 }, "~S,~N,~A");
29133 c$.parseTrimmedChecked = Clazz_defineMethod (c$, "parseTrimmedChecked", 
29134 function (str, ich, ichMax) {
29135 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29136
29137 var ichLast = ichMax - 1;
29138 while (ichLast >= ich && JU.PT.isWhiteSpace (str, ichLast)) --ichLast;
29139
29140 return (ichLast < ich ? "" : str.substring (ich, ichLast + 1));
29141 }, "~S,~N,~N");
29142 c$.dVal = Clazz_defineMethod (c$, "dVal", 
29143 function (s) {
29144 {
29145 if(s==null)
29146 throw new NumberFormatException("null");
29147 var d=parseFloat(s);
29148 if(isNaN(d))
29149 throw new NumberFormatException("Not a Number : "+s);
29150 return d
29151 }}, "~S");
29152 c$.fVal = Clazz_defineMethod (c$, "fVal", 
29153 function (s) {
29154 {
29155 return this.dVal(s);
29156 }}, "~S");
29157 c$.parseIntRange = Clazz_defineMethod (c$, "parseIntRange", 
29158 function (str, ichMax, next) {
29159 var cch = str.length;
29160 if (ichMax > cch) ichMax = cch;
29161 return (next[0] < 0 || next[0] >= ichMax ? -2147483648 : JU.PT.parseIntChecked (str, ichMax, next));
29162 }, "~S,~N,~A");
29163 c$.parseFloatArrayData = Clazz_defineMethod (c$, "parseFloatArrayData", 
29164 function (tokens, data) {
29165 JU.PT.parseFloatArrayDataN (tokens, data, data.length);
29166 }, "~A,~A");
29167 c$.parseFloatArrayDataN = Clazz_defineMethod (c$, "parseFloatArrayDataN", 
29168 function (tokens, data, nData) {
29169 for (var i = nData; --i >= 0; ) data[i] = (i >= tokens.length ? NaN : JU.PT.parseFloat (tokens[i]));
29170
29171 }, "~A,~A,~N");
29172 c$.split = Clazz_defineMethod (c$, "split", 
29173 function (text, run) {
29174 if (text.length == 0) return  new Array (0);
29175 var n = 1;
29176 var i = text.indexOf (run);
29177 var lines;
29178 var runLen = run.length;
29179 if (i < 0 || runLen == 0) {
29180 lines =  new Array (1);
29181 lines[0] = text;
29182 return lines;
29183 }var len = text.length - runLen;
29184 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
29185
29186 lines =  new Array (n);
29187 i = 0;
29188 var ipt = 0;
29189 var pt = 0;
29190 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
29191 lines[pt++] = text.substring (i, ipt);
29192 i = ipt + runLen;
29193 }
29194 if (text.indexOf (run, len) != len) len += runLen;
29195 lines[pt] = text.substring (i, len);
29196 return lines;
29197 }, "~S,~S");
29198 c$.getQuotedStringAt = Clazz_defineMethod (c$, "getQuotedStringAt", 
29199 function (line, ipt0) {
29200 var next =  Clazz_newIntArray (-1, [ipt0]);
29201 return JU.PT.getQuotedStringNext (line, next);
29202 }, "~S,~N");
29203 c$.getQuotedStringNext = Clazz_defineMethod (c$, "getQuotedStringNext", 
29204 function (line, next) {
29205 var i = next[0];
29206 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return "";
29207 var pt = i + 1;
29208 var len = line.length;
29209 while (++i < len && line.charAt (i) != '"') if (line.charAt (i) == '\\') i++;
29210
29211 next[0] = i + 1;
29212 return line.substring (pt, i);
29213 }, "~S,~A");
29214 c$.getCSVString = Clazz_defineMethod (c$, "getCSVString", 
29215 function (line, next) {
29216 var i = next[1];
29217 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return null;
29218 var pt = next[0] = i;
29219 var len = line.length;
29220 var escaped = false;
29221 var haveEscape = false;
29222 while (++i < len && (line.charAt (i) != '"' || (escaped = (i + 1 < len && line.charAt (i + 1) == '"')))) if (escaped) {
29223 escaped = false;
29224 haveEscape = true;
29225 i++;
29226 }
29227 if (i >= len) {
29228 next[1] = -1;
29229 return null;
29230 }next[1] = i + 1;
29231 var s = line.substring (pt + 1, i);
29232 return (haveEscape ? JU.PT.rep (JU.PT.rep (s, "\"\"", "\0"), "\0", "\"") : s);
29233 }, "~S,~A");
29234 c$.isOneOf = Clazz_defineMethod (c$, "isOneOf", 
29235 function (key, semiList) {
29236 if (semiList.length == 0) return false;
29237 if (semiList.charAt (0) != ';') semiList = ";" + semiList + ";";
29238 return key.indexOf (";") < 0 && semiList.indexOf (';' + key + ';') >= 0;
29239 }, "~S,~S");
29240 c$.getQuotedAttribute = Clazz_defineMethod (c$, "getQuotedAttribute", 
29241 function (info, name) {
29242 var i = info.indexOf (name + "=");
29243 return (i < 0 ? null : JU.PT.getQuotedStringAt (info, i));
29244 }, "~S,~S");
29245 c$.approx = Clazz_defineMethod (c$, "approx", 
29246 function (f, n) {
29247 return Math.round (f * n) / n;
29248 }, "~N,~N");
29249 c$.rep = Clazz_defineMethod (c$, "rep", 
29250 function (str, strFrom, strTo) {
29251 if (str == null || strFrom.length == 0 || str.indexOf (strFrom) < 0) return str;
29252 var isOnce = (strTo.indexOf (strFrom) >= 0);
29253 do {
29254 str = str.$replace (strFrom, strTo);
29255 } while (!isOnce && str.indexOf (strFrom) >= 0);
29256 return str;
29257 }, "~S,~S,~S");
29258 c$.formatF = Clazz_defineMethod (c$, "formatF", 
29259 function (value, width, precision, alignLeft, zeroPad) {
29260 return JU.PT.formatS (JU.DF.formatDecimal (value, precision), width, 0, alignLeft, zeroPad);
29261 }, "~N,~N,~N,~B,~B");
29262 c$.formatD = Clazz_defineMethod (c$, "formatD", 
29263 function (value, width, precision, alignLeft, zeroPad, allowOverflow) {
29264 return JU.PT.formatS (JU.DF.formatDecimal (value, -1 - precision), width, 0, alignLeft, zeroPad);
29265 }, "~N,~N,~N,~B,~B,~B");
29266 c$.formatS = Clazz_defineMethod (c$, "formatS", 
29267 function (value, width, precision, alignLeft, zeroPad) {
29268 if (value == null) return "";
29269 var len = value.length;
29270 if (precision != 2147483647 && precision > 0 && precision < len) value = value.substring (0, precision);
29271  else if (precision < 0 && len + precision >= 0) value = value.substring (len + precision + 1);
29272 var padLength = width - value.length;
29273 if (padLength <= 0) return value;
29274 var isNeg = (zeroPad && !alignLeft && value.charAt (0) == '-');
29275 var padChar = (zeroPad ? '0' : ' ');
29276 var padChar0 = (isNeg ? '-' : padChar);
29277 var sb =  new JU.SB ();
29278 if (alignLeft) sb.append (value);
29279 sb.appendC (padChar0);
29280 for (var i = padLength; --i > 0; ) sb.appendC (padChar);
29281
29282 if (!alignLeft) sb.append (isNeg ? padChar + value.substring (1) : value);
29283 return sb.toString ();
29284 }, "~S,~N,~N,~B,~B");
29285 c$.replaceWithCharacter = Clazz_defineMethod (c$, "replaceWithCharacter", 
29286 function (str, strFrom, chTo) {
29287 if (str == null) return null;
29288 for (var i = strFrom.length; --i >= 0; ) str = str.$replace (strFrom.charAt (i), chTo);
29289
29290 return str;
29291 }, "~S,~S,~S");
29292 c$.replaceAllCharacters = Clazz_defineMethod (c$, "replaceAllCharacters", 
29293 function (str, strFrom, strTo) {
29294 for (var i = strFrom.length; --i >= 0; ) {
29295 var chFrom = strFrom.substring (i, i + 1);
29296 str = JU.PT.rep (str, chFrom, strTo);
29297 }
29298 return str;
29299 }, "~S,~S,~S");
29300 c$.trim = Clazz_defineMethod (c$, "trim", 
29301 function (str, chars) {
29302 if (chars.length == 0) return str.trim ();
29303 var len = str.length;
29304 var k = 0;
29305 while (k < len && chars.indexOf (str.charAt (k)) >= 0) k++;
29306
29307 var m = str.length - 1;
29308 while (m > k && chars.indexOf (str.charAt (m)) >= 0) m--;
29309
29310 return str.substring (k, m + 1);
29311 }, "~S,~S");
29312 c$.trimQuotes = Clazz_defineMethod (c$, "trimQuotes", 
29313 function (value) {
29314 return (value != null && value.length > 1 && value.startsWith ("\"") && value.endsWith ("\"") ? value.substring (1, value.length - 1) : value);
29315 }, "~S");
29316 c$.isNonStringPrimitive = Clazz_defineMethod (c$, "isNonStringPrimitive", 
29317 function (info) {
29318 return Clazz_instanceOf (info, Number) || Clazz_instanceOf (info, Boolean);
29319 }, "~O");
29320 c$.arrayGet = Clazz_defineMethod (c$, "arrayGet", 
29321  function (info, i) {
29322 {
29323 return info[i];
29324 }}, "~O,~N");
29325 c$.toJSON = Clazz_defineMethod (c$, "toJSON", 
29326 function (infoType, info) {
29327 if (info == null) return JU.PT.packageJSON (infoType, null);
29328 if (JU.PT.isNonStringPrimitive (info)) return JU.PT.packageJSON (infoType, info.toString ());
29329 var s = null;
29330 var sb = null;
29331 while (true) {
29332 if (Clazz_instanceOf (info, String)) {
29333 s = info;
29334 {
29335 if (typeof s == "undefined") s = "null"
29336 }if (s.indexOf ("{\"") != 0) {
29337 s = JU.PT.rep (s, "\"", "\\\"");
29338 s = JU.PT.rep (s, "\n", "\\n");
29339 s = "\"" + s + "\"";
29340 }break;
29341 }if (Clazz_instanceOf (info, javajs.api.JSONEncodable)) {
29342 if ((s = (info).toJSON ()) == null) s = "null";
29343 break;
29344 }sb =  new JU.SB ();
29345 if (Clazz_instanceOf (info, java.util.Map)) {
29346 sb.append ("{ ");
29347 var sep = "";
29348 for (var key, $key = (info).keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
29349 sb.append (sep).append (JU.PT.packageJSON (key, JU.PT.toJSON (null, (info).get (key))));
29350 sep = ",";
29351 }
29352 sb.append (" }");
29353 break;
29354 }if (Clazz_instanceOf (info, JU.Lst)) {
29355 sb.append ("[ ");
29356 var n = (info).size ();
29357 for (var i = 0; i < n; i++) {
29358 if (i > 0) sb.appendC (',');
29359 sb.append (JU.PT.toJSON (null, (info).get (i)));
29360 }
29361 sb.append (" ]");
29362 break;
29363 }if (Clazz_instanceOf (info, JU.M34)) {
29364 var len = (Clazz_instanceOf (info, JU.M4) ? 4 : 3);
29365 var x =  Clazz_newFloatArray (len, 0);
29366 var m = info;
29367 sb.appendC ('[');
29368 for (var i = 0; i < len; i++) {
29369 if (i > 0) sb.appendC (',');
29370 m.getRow (i, x);
29371 sb.append (JU.PT.toJSON (null, x));
29372 }
29373 sb.appendC (']');
29374 break;
29375 }s = JU.PT.nonArrayString (info);
29376 if (s == null) {
29377 sb.append ("[");
29378 var n = JU.AU.getLength (info);
29379 for (var i = 0; i < n; i++) {
29380 if (i > 0) sb.appendC (',');
29381 sb.append (JU.PT.toJSON (null, JU.PT.arrayGet (info, i)));
29382 }
29383 sb.append ("]");
29384 break;
29385 }info = info.toString ();
29386 }
29387 return JU.PT.packageJSON (infoType, (s == null ? sb.toString () : s));
29388 }, "~S,~O");
29389 c$.nonArrayString = Clazz_defineMethod (c$, "nonArrayString", 
29390 function (x) {
29391 {
29392 var s = x.toString(); return (s.startsWith("[object") &&
29393 s.endsWith("Array]") ? null : s);
29394 }}, "~O");
29395 c$.byteArrayToJSON = Clazz_defineMethod (c$, "byteArrayToJSON", 
29396 function (data) {
29397 var sb =  new JU.SB ();
29398 sb.append ("[");
29399 var n = data.length;
29400 for (var i = 0; i < n; i++) {
29401 if (i > 0) sb.appendC (',');
29402 sb.appendI (data[i] & 0xFF);
29403 }
29404 sb.append ("]");
29405 return sb.toString ();
29406 }, "~A");
29407 c$.packageJSON = Clazz_defineMethod (c$, "packageJSON", 
29408 function (infoType, info) {
29409 return (infoType == null ? info : "\"" + infoType + "\": " + info);
29410 }, "~S,~S");
29411 c$.isAS = Clazz_defineMethod (c$, "isAS", 
29412 function (x) {
29413 {
29414 return Clazz_isAS(x);
29415 }}, "~O");
29416 c$.isASS = Clazz_defineMethod (c$, "isASS", 
29417 function (x) {
29418 {
29419 return Clazz_isASS(x);
29420 }}, "~O");
29421 c$.isAP = Clazz_defineMethod (c$, "isAP", 
29422 function (x) {
29423 {
29424 return Clazz_isAP(x);
29425 }}, "~O");
29426 c$.isAF = Clazz_defineMethod (c$, "isAF", 
29427 function (x) {
29428 {
29429 return Clazz_isAF(x);
29430 }}, "~O");
29431 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
29432 function (x) {
29433 {
29434 return Clazz_isAFloat(x);
29435 }}, "~O");
29436 c$.isAD = Clazz_defineMethod (c$, "isAD", 
29437 function (x) {
29438 {
29439 return Clazz_isAF(x);
29440 }}, "~O");
29441 c$.isADD = Clazz_defineMethod (c$, "isADD", 
29442 function (x) {
29443 {
29444 return Clazz_isAFF(x);
29445 }}, "~O");
29446 c$.isAB = Clazz_defineMethod (c$, "isAB", 
29447 function (x) {
29448 {
29449 return Clazz_isAI(x);
29450 }}, "~O");
29451 c$.isAI = Clazz_defineMethod (c$, "isAI", 
29452 function (x) {
29453 {
29454 return Clazz_isAI(x);
29455 }}, "~O");
29456 c$.isAII = Clazz_defineMethod (c$, "isAII", 
29457 function (x) {
29458 {
29459 return Clazz_isAII(x);
29460 }}, "~O");
29461 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
29462 function (x) {
29463 {
29464 return Clazz_isAFF(x);
29465 }}, "~O");
29466 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
29467 function (x) {
29468 {
29469 return Clazz_isAFFF(x);
29470 }}, "~O");
29471 c$.escapeUrl = Clazz_defineMethod (c$, "escapeUrl", 
29472 function (url) {
29473 url = JU.PT.rep (url, "\n", "");
29474 url = JU.PT.rep (url, "%", "%25");
29475 url = JU.PT.rep (url, "#", "%23");
29476 url = JU.PT.rep (url, "[", "%5B");
29477 url = JU.PT.rep (url, "]", "%5D");
29478 url = JU.PT.rep (url, " ", "%20");
29479 return url;
29480 }, "~S");
29481 c$.esc = Clazz_defineMethod (c$, "esc", 
29482 function (str) {
29483 if (str == null || str.length == 0) return "\"\"";
29484 var haveEscape = false;
29485 var i = 0;
29486 for (; i < "\\\\\tt\rr\nn\"\"".length; i += 2) if (str.indexOf ("\\\\\tt\rr\nn\"\"".charAt (i)) >= 0) {
29487 haveEscape = true;
29488 break;
29489 }
29490 if (haveEscape) while (i < "\\\\\tt\rr\nn\"\"".length) {
29491 var pt = -1;
29492 var ch = "\\\\\tt\rr\nn\"\"".charAt (i++);
29493 var ch2 = "\\\\\tt\rr\nn\"\"".charAt (i++);
29494 var sb =  new JU.SB ();
29495 var pt0 = 0;
29496 while ((pt = str.indexOf (ch, pt + 1)) >= 0) {
29497 sb.append (str.substring (pt0, pt)).appendC ('\\').appendC (ch2);
29498 pt0 = pt + 1;
29499 }
29500 sb.append (str.substring (pt0, str.length));
29501 str = sb.toString ();
29502 }
29503 return "\"" + JU.PT.escUnicode (str) + "\"";
29504 }, "~S");
29505 c$.escUnicode = Clazz_defineMethod (c$, "escUnicode", 
29506 function (str) {
29507 for (var i = str.length; --i >= 0; ) if (str.charCodeAt (i) > 0x7F) {
29508 var s = "0000" + Integer.toHexString (str.charCodeAt (i));
29509 str = str.substring (0, i) + "\\u" + s.substring (s.length - 4) + str.substring (i + 1);
29510 }
29511 return str;
29512 }, "~S");
29513 c$.escF = Clazz_defineMethod (c$, "escF", 
29514 function (f) {
29515 var sf = "" + f;
29516 {
29517 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
29518 sf += ".0";
29519 }return sf;
29520 }, "~N");
29521 c$.join = Clazz_defineMethod (c$, "join", 
29522 function (s, c, i0) {
29523 if (s.length < i0) return null;
29524 var sb =  new JU.SB ();
29525 sb.append (s[i0++]);
29526 for (var i = i0; i < s.length; i++) sb.appendC (c).append (s[i]);
29527
29528 return sb.toString ();
29529 }, "~A,~S,~N");
29530 c$.isLike = Clazz_defineMethod (c$, "isLike", 
29531 function (a, b) {
29532 var areEqual = a.equals (b);
29533 if (areEqual) return true;
29534 var isStart = b.startsWith ("*");
29535 var isEnd = b.endsWith ("*");
29536 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));
29537 }, "~S,~S");
29538 c$.getMapValueNoCase = Clazz_defineMethod (c$, "getMapValueNoCase", 
29539 function (h, key) {
29540 if ("this".equals (key)) return h;
29541 var val = h.get (key);
29542 if (val == null) for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) if (e.getKey ().equalsIgnoreCase (key)) return e.getValue ();
29543
29544 return val;
29545 }, "java.util.Map,~S");
29546 c$.getMapSubset = Clazz_defineMethod (c$, "getMapSubset", 
29547 function (h, key, h2) {
29548 var val = h.get (key);
29549 if (val != null) {
29550 h2.put (key, val);
29551 return;
29552 }for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) {
29553 var k = e.getKey ();
29554 if (JU.PT.isLike (k, key)) h2.put (k, e.getValue ());
29555 }
29556 }, "java.util.Map,~S,java.util.Map");
29557 c$.clean = Clazz_defineMethod (c$, "clean", 
29558 function (s) {
29559 return JU.PT.rep (JU.PT.replaceAllCharacters (s, " \t\n\r", " "), "  ", " ").trim ();
29560 }, "~S");
29561 c$.fdup = Clazz_defineMethod (c$, "fdup", 
29562 function (f, pt, n) {
29563 var ch;
29564 var count = 0;
29565 for (var i = pt; --i >= 1; ) {
29566 if (JU.PT.isDigit (ch = f.charAt (i))) continue;
29567 switch (ch) {
29568 case '.':
29569 if (count++ != 0) return f;
29570 continue;
29571 case '-':
29572 if (i != 1 && f.charAt (i - 1) != '.') return f;
29573 continue;
29574 default:
29575 return f;
29576 }
29577 }
29578 var s = f.substring (0, pt + 1);
29579 var sb =  new JU.SB ();
29580 for (var i = 0; i < n; i++) sb.append (s);
29581
29582 sb.append (f.substring (pt + 1));
29583 return sb.toString ();
29584 }, "~S,~N,~N");
29585 c$.formatString = Clazz_defineMethod (c$, "formatString", 
29586 function (strFormat, key, strT, floatT, doubleT, doOne) {
29587 if (strFormat == null) return null;
29588 if ("".equals (strFormat)) return "";
29589 var len = key.length;
29590 if (strFormat.indexOf ("%") < 0 || len == 0 || strFormat.indexOf (key) < 0) return strFormat;
29591 var strLabel = "";
29592 var ich;
29593 var ichPercent;
29594 var ichKey;
29595 for (ich = 0; (ichPercent = strFormat.indexOf ('%', ich)) >= 0 && (ichKey = strFormat.indexOf (key, ichPercent + 1)) >= 0; ) {
29596 if (ich != ichPercent) strLabel += strFormat.substring (ich, ichPercent);
29597 ich = ichPercent + 1;
29598 if (ichKey > ichPercent + 6) {
29599 strLabel += '%';
29600 continue;
29601 }try {
29602 var alignLeft = false;
29603 if (strFormat.charAt (ich) == '-') {
29604 alignLeft = true;
29605 ++ich;
29606 }var zeroPad = false;
29607 if (strFormat.charAt (ich) == '0') {
29608 zeroPad = true;
29609 ++ich;
29610 }var ch;
29611 var width = 0;
29612 while ((ch = strFormat.charAt (ich)) >= '0' && (ch <= '9')) {
29613 width = (10 * width) + (ch.charCodeAt (0) - 48);
29614 ++ich;
29615 }
29616 var precision = 2147483647;
29617 var isExponential = false;
29618 if (strFormat.charAt (ich) == '.') {
29619 ++ich;
29620 if ((ch = strFormat.charAt (ich)) == '-') {
29621 isExponential = true;
29622 ++ich;
29623 }if ((ch = strFormat.charAt (ich)) >= '0' && ch <= '9') {
29624 precision = ch.charCodeAt (0) - 48;
29625 ++ich;
29626 }if (isExponential) precision = -precision - (strT == null ? 1 : 0);
29627 }var st = strFormat.substring (ich, ich + len);
29628 if (!st.equals (key)) {
29629 ich = ichPercent + 1;
29630 strLabel += '%';
29631 continue;
29632 }ich += len;
29633 if (!Float.isNaN (floatT)) strLabel += JU.PT.formatF (floatT, width, precision, alignLeft, zeroPad);
29634  else if (strT != null) strLabel += JU.PT.formatS (strT, width, precision, alignLeft, zeroPad);
29635  else if (!Double.isNaN (doubleT)) strLabel += JU.PT.formatD (doubleT, width, precision, alignLeft, zeroPad, true);
29636 if (doOne) break;
29637 } catch (ioobe) {
29638 if (Clazz_exceptionOf (ioobe, IndexOutOfBoundsException)) {
29639 ich = ichPercent;
29640 break;
29641 } else {
29642 throw ioobe;
29643 }
29644 }
29645 }
29646 strLabel += strFormat.substring (ich);
29647 return strLabel;
29648 }, "~S,~S,~S,~N,~N,~B");
29649 c$.formatStringS = Clazz_defineMethod (c$, "formatStringS", 
29650 function (strFormat, key, strT) {
29651 return JU.PT.formatString (strFormat, key, strT, NaN, NaN, false);
29652 }, "~S,~S,~S");
29653 c$.formatStringF = Clazz_defineMethod (c$, "formatStringF", 
29654 function (strFormat, key, floatT) {
29655 return JU.PT.formatString (strFormat, key, null, floatT, NaN, false);
29656 }, "~S,~S,~N");
29657 c$.formatStringI = Clazz_defineMethod (c$, "formatStringI", 
29658 function (strFormat, key, intT) {
29659 return JU.PT.formatString (strFormat, key, "" + intT, NaN, NaN, false);
29660 }, "~S,~S,~N");
29661 c$.sprintf = Clazz_defineMethod (c$, "sprintf", 
29662 function (strFormat, list, values) {
29663 if (values == null) return strFormat;
29664 var n = list.length;
29665 if (n == values.length) try {
29666 for (var o = 0; o < n; o++) {
29667 if (values[o] == null) continue;
29668 switch (list.charAt (o)) {
29669 case 's':
29670 strFormat = JU.PT.formatString (strFormat, "s", values[o], NaN, NaN, true);
29671 break;
29672 case 'f':
29673 strFormat = JU.PT.formatString (strFormat, "f", null, (values[o]).floatValue (), NaN, true);
29674 break;
29675 case 'i':
29676 strFormat = JU.PT.formatString (strFormat, "d", "" + values[o], NaN, NaN, true);
29677 strFormat = JU.PT.formatString (strFormat, "i", "" + values[o], NaN, NaN, true);
29678 break;
29679 case 'd':
29680 strFormat = JU.PT.formatString (strFormat, "e", null, NaN, (values[o]).doubleValue (), true);
29681 break;
29682 case 'p':
29683 var pVal = values[o];
29684 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.x, NaN, true);
29685 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.y, NaN, true);
29686 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.z, NaN, true);
29687 break;
29688 case 'q':
29689 var qVal = values[o];
29690 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.x, NaN, true);
29691 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.y, NaN, true);
29692 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.z, NaN, true);
29693 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.w, NaN, true);
29694 break;
29695 case 'S':
29696 var sVal = values[o];
29697 for (var i = 0; i < sVal.length; i++) strFormat = JU.PT.formatString (strFormat, "s", sVal[i], NaN, NaN, true);
29698
29699 break;
29700 case 'F':
29701 var fVal = values[o];
29702 for (var i = 0; i < fVal.length; i++) strFormat = JU.PT.formatString (strFormat, "f", null, fVal[i], NaN, true);
29703
29704 break;
29705 case 'I':
29706 var iVal = values[o];
29707 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "d", "" + iVal[i], NaN, NaN, true);
29708
29709 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "i", "" + iVal[i], NaN, NaN, true);
29710
29711 break;
29712 case 'D':
29713 var dVal = values[o];
29714 for (var i = 0; i < dVal.length; i++) strFormat = JU.PT.formatString (strFormat, "e", null, NaN, dVal[i], true);
29715
29716 }
29717 }
29718 return JU.PT.rep (strFormat, "%%", "%");
29719 } catch (e) {
29720 if (Clazz_exceptionOf (e, Exception)) {
29721 } else {
29722 throw e;
29723 }
29724 }
29725 System.out.println ("TextFormat.sprintf error " + list + " " + strFormat);
29726 return JU.PT.rep (strFormat, "%", "?");
29727 }, "~S,~S,~A");
29728 c$.formatCheck = Clazz_defineMethod (c$, "formatCheck", 
29729 function (strFormat) {
29730 if (strFormat == null || strFormat.indexOf ('p') < 0 && strFormat.indexOf ('q') < 0) return strFormat;
29731 strFormat = JU.PT.rep (strFormat, "%%", "\1");
29732 strFormat = JU.PT.rep (strFormat, "%p", "%6.2p");
29733 strFormat = JU.PT.rep (strFormat, "%q", "%6.2q");
29734 var format = JU.PT.split (strFormat, "%");
29735 var sb =  new JU.SB ();
29736 sb.append (format[0]);
29737 for (var i = 1; i < format.length; i++) {
29738 var f = "%" + format[i];
29739 var pt;
29740 if (f.length >= 3) {
29741 if ((pt = f.indexOf ('p')) >= 0) f = JU.PT.fdup (f, pt, 3);
29742 if ((pt = f.indexOf ('q')) >= 0) f = JU.PT.fdup (f, pt, 4);
29743 }sb.append (f);
29744 }
29745 return sb.toString ().$replace ('\1', '%');
29746 }, "~S");
29747 c$.leftJustify = Clazz_defineMethod (c$, "leftJustify", 
29748 function (s, s1, s2) {
29749 s.append (s2);
29750 var n = s1.length - s2.length;
29751 if (n > 0) s.append (s1.substring (0, n));
29752 }, "JU.SB,~S,~S");
29753 c$.rightJustify = Clazz_defineMethod (c$, "rightJustify", 
29754 function (s, s1, s2) {
29755 var n = s1.length - s2.length;
29756 if (n > 0) s.append (s1.substring (0, n));
29757 s.append (s2);
29758 }, "JU.SB,~S,~S");
29759 c$.safeTruncate = Clazz_defineMethod (c$, "safeTruncate", 
29760 function (f, n) {
29761 if (f > -0.001 && f < 0.001) f = 0;
29762 return (f + "         ").substring (0, n);
29763 }, "~N,~N");
29764 c$.isWild = Clazz_defineMethod (c$, "isWild", 
29765 function (s) {
29766 return s != null && (s.indexOf ("*") >= 0 || s.indexOf ("?") >= 0);
29767 }, "~S");
29768 c$.isMatch = Clazz_defineMethod (c$, "isMatch", 
29769 function (search, match, checkStar, allowInitialStar) {
29770 if (search.equals (match)) return true;
29771 var mLen = match.length;
29772 if (mLen == 0) return false;
29773 var isStar0 = (checkStar && allowInitialStar ? match.charAt (0) == '*' : false);
29774 if (mLen == 1 && isStar0) return true;
29775 var isStar1 = (checkStar && match.endsWith ("*"));
29776 var haveQ = (match.indexOf ('?') >= 0);
29777 if (!haveQ) {
29778 if (isStar0) return (isStar1 ? (mLen < 3 || search.indexOf (match.substring (1, mLen - 1)) >= 0) : search.endsWith (match.substring (1)));
29779  else if (isStar1) return search.startsWith (match.substring (0, mLen - 1));
29780 }var sLen = search.length;
29781 var qqqq = "????";
29782 var nq = 4;
29783 while (nq < sLen) {
29784 qqqq += qqqq;
29785 nq += 4;
29786 }
29787 if (checkStar) {
29788 if (isStar0) {
29789 match = qqqq + match.substring (1);
29790 mLen += nq - 1;
29791 }if (isStar1) {
29792 match = match.substring (0, mLen - 1) + qqqq;
29793 mLen += nq - 1;
29794 }}if (mLen < sLen) return false;
29795 var ich = 0;
29796 while (mLen > sLen) {
29797 if (allowInitialStar && match.charAt (ich) == '?') {
29798 ++ich;
29799 } else if (match.charAt (ich + mLen - 1) != '?') {
29800 return false;
29801 }--mLen;
29802 }
29803 for (var i = sLen; --i >= 0; ) {
29804 var chm = match.charAt (ich + i);
29805 if (chm == '?') continue;
29806 var chs = search.charAt (i);
29807 if (chm != chs && (chm != '\1' || chs != '?')) return false;
29808 }
29809 return true;
29810 }, "~S,~S,~B,~B");
29811 c$.replaceQuotedStrings = Clazz_defineMethod (c$, "replaceQuotedStrings", 
29812 function (s, list, newList) {
29813 var n = list.size ();
29814 for (var i = 0; i < n; i++) {
29815 var name = list.get (i);
29816 var newName = newList.get (i);
29817 if (!newName.equals (name)) s = JU.PT.rep (s, "\"" + name + "\"", "\"" + newName + "\"");
29818 }
29819 return s;
29820 }, "~S,JU.Lst,JU.Lst");
29821 c$.replaceStrings = Clazz_defineMethod (c$, "replaceStrings", 
29822 function (s, list, newList) {
29823 var n = list.size ();
29824 for (var i = 0; i < n; i++) {
29825 var name = list.get (i);
29826 var newName = newList.get (i);
29827 if (!newName.equals (name)) s = JU.PT.rep (s, name, newName);
29828 }
29829 return s;
29830 }, "~S,JU.Lst,JU.Lst");
29831 c$.isDigit = Clazz_defineMethod (c$, "isDigit", 
29832 function (ch) {
29833 var c = (ch).charCodeAt (0);
29834 return (48 <= c && c <= 57);
29835 }, "~S");
29836 c$.isUpperCase = Clazz_defineMethod (c$, "isUpperCase", 
29837 function (ch) {
29838 var c = (ch).charCodeAt (0);
29839 return (65 <= c && c <= 90);
29840 }, "~S");
29841 c$.isLowerCase = Clazz_defineMethod (c$, "isLowerCase", 
29842 function (ch) {
29843 var c = (ch).charCodeAt (0);
29844 return (97 <= c && c <= 122);
29845 }, "~S");
29846 c$.isLetter = Clazz_defineMethod (c$, "isLetter", 
29847 function (ch) {
29848 var c = (ch).charCodeAt (0);
29849 return (65 <= c && c <= 90 || 97 <= c && c <= 122);
29850 }, "~S");
29851 c$.isLetterOrDigit = Clazz_defineMethod (c$, "isLetterOrDigit", 
29852 function (ch) {
29853 var c = (ch).charCodeAt (0);
29854 return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57);
29855 }, "~S");
29856 c$.isWhitespace = Clazz_defineMethod (c$, "isWhitespace", 
29857 function (ch) {
29858 var c = (ch).charCodeAt (0);
29859 return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd);
29860 }, "~S");
29861 c$.fixPtFloats = Clazz_defineMethod (c$, "fixPtFloats", 
29862 function (pt, f) {
29863 pt.x = Math.round (pt.x * f) / f;
29864 pt.y = Math.round (pt.y * f) / f;
29865 pt.z = Math.round (pt.z * f) / f;
29866 }, "JU.T3,~N");
29867 c$.fixDouble = Clazz_defineMethod (c$, "fixDouble", 
29868 function (d, f) {
29869 return Math.round (d * f) / f;
29870 }, "~N,~N");
29871 c$.parseFloatFraction = Clazz_defineMethod (c$, "parseFloatFraction", 
29872 function (s) {
29873 var pt = s.indexOf ("/");
29874 return (pt < 0 ? JU.PT.parseFloat (s) : JU.PT.parseFloat (s.substring (0, pt)) / JU.PT.parseFloat (s.substring (pt + 1)));
29875 }, "~S");
29876 Clazz_defineStatics (c$,
29877 "tensScale",  Clazz_newFloatArray (-1, [10, 100, 1000, 10000, 100000, 1000000]),
29878 "decimalScale",  Clazz_newFloatArray (-1, [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001, 0.00000001, 0.000000001]),
29879 "FLOAT_MIN_SAFE", 2E-45,
29880 "escapable", "\\\\\tt\rr\nn\"\"",
29881 "FRACTIONAL_PRECISION", 100000,
29882 "CARTESIAN_PRECISION", 10000);
29883 });
29884 Clazz_declarePackage ("javajs.api");
29885 Clazz_declareInterface (javajs.api, "JSONEncodable");
29886 Clazz_declarePackage ("JU");
29887 Clazz_load (null, "JU.AU", ["java.util.Arrays", "JU.Lst"], function () {
29888 c$ = Clazz_declareType (JU, "AU");
29889 c$.ensureLength = Clazz_defineMethod (c$, "ensureLength", 
29890 function (array, minimumLength) {
29891 if (array != null && JU.AU.getLength (array) >= minimumLength) return array;
29892 return JU.AU.arrayCopyObject (array, minimumLength);
29893 }, "~O,~N");
29894 c$.ensureLengthS = Clazz_defineMethod (c$, "ensureLengthS", 
29895 function (array, minimumLength) {
29896 if (array != null && array.length >= minimumLength) return array;
29897 return JU.AU.arrayCopyS (array, minimumLength);
29898 }, "~A,~N");
29899 c$.ensureLengthA = Clazz_defineMethod (c$, "ensureLengthA", 
29900 function (array, minimumLength) {
29901 if (array != null && array.length >= minimumLength) return array;
29902 return JU.AU.arrayCopyF (array, minimumLength);
29903 }, "~A,~N");
29904 c$.ensureLengthI = Clazz_defineMethod (c$, "ensureLengthI", 
29905 function (array, minimumLength) {
29906 if (array != null && array.length >= minimumLength) return array;
29907 return JU.AU.arrayCopyI (array, minimumLength);
29908 }, "~A,~N");
29909 c$.ensureLengthShort = Clazz_defineMethod (c$, "ensureLengthShort", 
29910 function (array, minimumLength) {
29911 if (array != null && array.length >= minimumLength) return array;
29912 return JU.AU.arrayCopyShort (array, minimumLength);
29913 }, "~A,~N");
29914 c$.ensureLengthByte = Clazz_defineMethod (c$, "ensureLengthByte", 
29915 function (array, minimumLength) {
29916 if (array != null && array.length >= minimumLength) return array;
29917 return JU.AU.arrayCopyByte (array, minimumLength);
29918 }, "~A,~N");
29919 c$.doubleLength = Clazz_defineMethod (c$, "doubleLength", 
29920 function (array) {
29921 return JU.AU.arrayCopyObject (array, (array == null ? 16 : 2 * JU.AU.getLength (array)));
29922 }, "~O");
29923 c$.doubleLengthS = Clazz_defineMethod (c$, "doubleLengthS", 
29924 function (array) {
29925 return JU.AU.arrayCopyS (array, (array == null ? 16 : 2 * array.length));
29926 }, "~A");
29927 c$.doubleLengthF = Clazz_defineMethod (c$, "doubleLengthF", 
29928 function (array) {
29929 return JU.AU.arrayCopyF (array, (array == null ? 16 : 2 * array.length));
29930 }, "~A");
29931 c$.doubleLengthI = Clazz_defineMethod (c$, "doubleLengthI", 
29932 function (array) {
29933 return JU.AU.arrayCopyI (array, (array == null ? 16 : 2 * array.length));
29934 }, "~A");
29935 c$.doubleLengthShort = Clazz_defineMethod (c$, "doubleLengthShort", 
29936 function (array) {
29937 return JU.AU.arrayCopyShort (array, (array == null ? 16 : 2 * array.length));
29938 }, "~A");
29939 c$.doubleLengthByte = Clazz_defineMethod (c$, "doubleLengthByte", 
29940 function (array) {
29941 return JU.AU.arrayCopyByte (array, (array == null ? 16 : 2 * array.length));
29942 }, "~A");
29943 c$.doubleLengthBool = Clazz_defineMethod (c$, "doubleLengthBool", 
29944 function (array) {
29945 return JU.AU.arrayCopyBool (array, (array == null ? 16 : 2 * array.length));
29946 }, "~A");
29947 c$.deleteElements = Clazz_defineMethod (c$, "deleteElements", 
29948 function (array, firstElement, nElements) {
29949 if (nElements == 0 || array == null) return array;
29950 var oldLength = JU.AU.getLength (array);
29951 if (firstElement >= oldLength) return array;
29952 var n = oldLength - (firstElement + nElements);
29953 if (n < 0) n = 0;
29954 var t = JU.AU.newInstanceO (array, firstElement + n);
29955 if (firstElement > 0) System.arraycopy (array, 0, t, 0, firstElement);
29956 if (n > 0) System.arraycopy (array, firstElement + nElements, t, firstElement, n);
29957 return t;
29958 }, "~O,~N,~N");
29959 c$.arrayCopyObject = Clazz_defineMethod (c$, "arrayCopyObject", 
29960 function (array, newLength) {
29961 if (array == null) {
29962 return null;
29963 }var oldLength = JU.AU.getLength (array);
29964 if (newLength == oldLength) return array;
29965 var t = JU.AU.newInstanceO (array, newLength);
29966 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29967 return t;
29968 }, "~O,~N");
29969 c$.newInstanceO = Clazz_defineMethod (c$, "newInstanceO", 
29970  function (array, n) {
29971 {
29972 if (!array.getClass().getComponentType)
29973 return new Array(n);
29974 }}, "~O,~N");
29975 c$.getLength = Clazz_defineMethod (c$, "getLength", 
29976 function (array) {
29977 {
29978 return array.length
29979 }}, "~O");
29980 c$.arrayCopyS = Clazz_defineMethod (c$, "arrayCopyS", 
29981 function (array, newLength) {
29982 if (newLength < 0) newLength = array.length;
29983 var t =  new Array (newLength);
29984 if (array != null) {
29985 var oldLength = array.length;
29986 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29987 }return t;
29988 }, "~A,~N");
29989 c$.arrayCopyII = Clazz_defineMethod (c$, "arrayCopyII", 
29990 function (array, newLength) {
29991 var t = JU.AU.newInt2 (newLength);
29992 if (array != null) {
29993 var oldLength = array.length;
29994 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29995 }return t;
29996 }, "~A,~N");
29997 c$.arrayCopyPt = Clazz_defineMethod (c$, "arrayCopyPt", 
29998 function (array, newLength) {
29999 if (newLength < 0) newLength = array.length;
30000 var t =  new Array (newLength);
30001 if (array != null) {
30002 var oldLength = array.length;
30003 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30004 }return t;
30005 }, "~A,~N");
30006 c$.arrayCopyF = Clazz_defineMethod (c$, "arrayCopyF", 
30007 function (array, newLength) {
30008 if (newLength < 0) newLength = array.length;
30009 var t =  Clazz_newFloatArray (newLength, 0);
30010 if (array != null) {
30011 var oldLength = array.length;
30012 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30013 }return t;
30014 }, "~A,~N");
30015 c$.arrayCopyI = Clazz_defineMethod (c$, "arrayCopyI", 
30016 function (array, newLength) {
30017 if (newLength < 0) newLength = array.length;
30018 var t =  Clazz_newIntArray (newLength, 0);
30019 if (array != null) {
30020 var oldLength = array.length;
30021 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30022 }return t;
30023 }, "~A,~N");
30024 c$.arrayCopyRangeI = Clazz_defineMethod (c$, "arrayCopyRangeI", 
30025 function (array, i0, n) {
30026 if (array == null) return null;
30027 var oldLength = array.length;
30028 if (n == -1) n = oldLength;
30029 if (n == -2) n = Clazz_doubleToInt (oldLength / 2);
30030 n = n - i0;
30031 var t =  Clazz_newIntArray (n, 0);
30032 System.arraycopy (array, i0, t, 0, n);
30033 return t;
30034 }, "~A,~N,~N");
30035 c$.arrayCopyRangeRevI = Clazz_defineMethod (c$, "arrayCopyRangeRevI", 
30036 function (array, i0, n) {
30037 if (array == null) return null;
30038 var t = JU.AU.arrayCopyRangeI (array, i0, n);
30039 if (n < 0) n = array.length;
30040 for (var i = Clazz_doubleToInt (n / 2); --i >= 0; ) JU.AU.swapInt (t, i, n - 1 - i);
30041
30042 return t;
30043 }, "~A,~N,~N");
30044 c$.arrayCopyShort = Clazz_defineMethod (c$, "arrayCopyShort", 
30045 function (array, newLength) {
30046 if (newLength < 0) newLength = array.length;
30047 var t =  Clazz_newShortArray (newLength, 0);
30048 if (array != null) {
30049 var oldLength = array.length;
30050 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30051 }return t;
30052 }, "~A,~N");
30053 c$.arrayCopyByte = Clazz_defineMethod (c$, "arrayCopyByte", 
30054 function (array, newLength) {
30055 if (newLength < 0) newLength = array.length;
30056 var t =  Clazz_newByteArray (newLength, 0);
30057 if (array != null) {
30058 var oldLength = array.length;
30059 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30060 }return t;
30061 }, "~A,~N");
30062 c$.arrayCopyBool = Clazz_defineMethod (c$, "arrayCopyBool", 
30063 function (array, newLength) {
30064 if (newLength < 0) newLength = array.length;
30065 var t =  Clazz_newBooleanArray (newLength, false);
30066 if (array != null) {
30067 var oldLength = array.length;
30068 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30069 }return t;
30070 }, "~A,~N");
30071 c$.swapInt = Clazz_defineMethod (c$, "swapInt", 
30072 function (array, indexA, indexB) {
30073 var t = array[indexA];
30074 array[indexA] = array[indexB];
30075 array[indexB] = t;
30076 }, "~A,~N,~N");
30077 c$.dumpArray = Clazz_defineMethod (c$, "dumpArray", 
30078 function (msg, A, x1, x2, y1, y2) {
30079 var s = "dumpArray: " + msg + "\n";
30080 for (var x = x1; x <= x2; x++) s += "\t*" + x + "*";
30081
30082 for (var y = y2; y >= y1; y--) {
30083 s += "\n*" + y + "*";
30084 for (var x = x1; x <= x2; x++) s += "\t" + (x < A.length && y < A[x].length ? A[x][y] : NaN);
30085
30086 }
30087 return s;
30088 }, "~S,~A,~N,~N,~N,~N");
30089 c$.dumpIntArray = Clazz_defineMethod (c$, "dumpIntArray", 
30090 function (A, n) {
30091 var str = "";
30092 for (var i = 0; i < n; i++) str += " " + A[i];
30093
30094 return str;
30095 }, "~A,~N");
30096 c$.sortedItem = Clazz_defineMethod (c$, "sortedItem", 
30097 function (v, n) {
30098 if (v.size () == 0) return null;
30099 if (v.size () == 1) return v.get (0);
30100 var keys = v.toArray ( new Array (v.size ()));
30101 java.util.Arrays.sort (keys);
30102 return keys[n % keys.length];
30103 }, "JU.Lst,~N");
30104 c$.createArrayOfArrayList = Clazz_defineMethod (c$, "createArrayOfArrayList", 
30105 function (size) {
30106 return  new Array (size);
30107 }, "~N");
30108 c$.createArrayOfHashtable = Clazz_defineMethod (c$, "createArrayOfHashtable", 
30109 function (size) {
30110 return  new Array (size);
30111 }, "~N");
30112 c$.swap = Clazz_defineMethod (c$, "swap", 
30113 function (o, i, j) {
30114 var oi = o[i];
30115 o[i] = o[j];
30116 o[j] = oi;
30117 }, "~A,~N,~N");
30118 c$.newFloat2 = Clazz_defineMethod (c$, "newFloat2", 
30119 function (n) {
30120 {
30121 return Clazz_newArray(n, null);
30122 }}, "~N");
30123 c$.newInt2 = Clazz_defineMethod (c$, "newInt2", 
30124 function (n) {
30125 {
30126 return Clazz_newArray(n, null);
30127 }}, "~N");
30128 c$.newInt3 = Clazz_defineMethod (c$, "newInt3", 
30129 function (nx, ny) {
30130 {
30131 return Clazz_newArray(nx, null);
30132 }}, "~N,~N");
30133 c$.newFloat3 = Clazz_defineMethod (c$, "newFloat3", 
30134 function (nx, ny) {
30135 {
30136 return Clazz_newArray(nx, null);
30137 }}, "~N,~N");
30138 c$.newInt4 = Clazz_defineMethod (c$, "newInt4", 
30139 function (n) {
30140 {
30141 return Clazz_newArray(n, null);
30142 }}, "~N");
30143 c$.newShort2 = Clazz_defineMethod (c$, "newShort2", 
30144 function (n) {
30145 {
30146 return Clazz_newArray(n, null);
30147 }}, "~N");
30148 c$.newByte2 = Clazz_defineMethod (c$, "newByte2", 
30149 function (n) {
30150 {
30151 return Clazz_newArray(n, null);
30152 }}, "~N");
30153 c$.newDouble2 = Clazz_defineMethod (c$, "newDouble2", 
30154 function (n) {
30155 {
30156 return Clazz_newArray(n, null);
30157 }}, "~N");
30158 c$.removeMapKeys = Clazz_defineMethod (c$, "removeMapKeys", 
30159 function (map, root) {
30160 var list =  new JU.Lst ();
30161 for (var key, $key = map.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) if (key.startsWith (root)) list.addLast (key);
30162
30163 for (var i = list.size (); --i >= 0; ) map.remove (list.get (i));
30164
30165 return list.size ();
30166 }, "java.util.Map,~S");
30167 c$.isAS = Clazz_defineMethod (c$, "isAS", 
30168 function (x) {
30169 {
30170 return Clazz_isAS(x);
30171 }}, "~O");
30172 c$.isASS = Clazz_defineMethod (c$, "isASS", 
30173 function (x) {
30174 {
30175 return Clazz_isASS(x);
30176 }}, "~O");
30177 c$.isAP = Clazz_defineMethod (c$, "isAP", 
30178 function (x) {
30179 {
30180 return Clazz_isAP(x);
30181 }}, "~O");
30182 c$.isAF = Clazz_defineMethod (c$, "isAF", 
30183 function (x) {
30184 {
30185 return Clazz_isAF(x);
30186 }}, "~O");
30187 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
30188 function (x) {
30189 {
30190 return Clazz_isAFloat(x);
30191 }}, "~O");
30192 c$.isAD = Clazz_defineMethod (c$, "isAD", 
30193 function (x) {
30194 {
30195 return Clazz_isAF(x);
30196 }}, "~O");
30197 c$.isADD = Clazz_defineMethod (c$, "isADD", 
30198 function (x) {
30199 {
30200 return Clazz_isAFF(x);
30201 }}, "~O");
30202 c$.isAB = Clazz_defineMethod (c$, "isAB", 
30203 function (x) {
30204 {
30205 return Clazz_isAI(x);
30206 }}, "~O");
30207 c$.isAI = Clazz_defineMethod (c$, "isAI", 
30208 function (x) {
30209 {
30210 return Clazz_isAI(x);
30211 }}, "~O");
30212 c$.isAII = Clazz_defineMethod (c$, "isAII", 
30213 function (x) {
30214 {
30215 return Clazz_isAII(x);
30216 }}, "~O");
30217 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
30218 function (x) {
30219 {
30220 return Clazz_isAFF(x);
30221 }}, "~O");
30222 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
30223 function (x) {
30224 {
30225 return Clazz_isAFFF(x);
30226 }}, "~O");
30227 c$.ensureSignedBytes = Clazz_defineMethod (c$, "ensureSignedBytes", 
30228 function (b) {
30229 if (b != null) {
30230 {
30231 for (var i = b.length; --i >= 0;) { var j = b[i] & 0xFF; if
30232 (j >= 0x80) j -= 0x100; b[i] = j; }
30233 }}return b;
30234 }, "~A");
30235 });
30236 Clazz_declarePackage ("JU");
30237 Clazz_load (["java.util.ArrayList"], "JU.Lst", null, function () {
30238 c$ = Clazz_declareType (JU, "Lst", java.util.ArrayList);
30239 Clazz_defineMethod (c$, "addLast", 
30240 function (v) {
30241 {
30242 return this.add1(v);
30243 }}, "~O");
30244 Clazz_defineMethod (c$, "removeObj", 
30245 function (v) {
30246 {
30247 return this.removeObject(v);
30248 }}, "~O");
30249 });
30250 Clazz_declarePackage ("JU");
30251 Clazz_load (["java.lang.Boolean"], "JU.DF", ["java.lang.Double", "$.Float", "JU.PT", "$.SB"], function () {
30252 c$ = Clazz_declareType (JU, "DF");
30253 c$.setUseNumberLocalization = Clazz_defineMethod (c$, "setUseNumberLocalization", 
30254 function (TF) {
30255 JU.DF.useNumberLocalization[0] = (TF ? Boolean.TRUE : Boolean.FALSE);
30256 }, "~B");
30257 c$.formatDecimalDbl = Clazz_defineMethod (c$, "formatDecimalDbl", 
30258 function (value, decimalDigits) {
30259 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Double.isNaN (value)) return "" + value;
30260 return JU.DF.formatDecimal (value, decimalDigits);
30261 }, "~N,~N");
30262 c$.formatDecimal = Clazz_defineMethod (c$, "formatDecimal", 
30263 function (value, decimalDigits) {
30264 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Float.isNaN (value)) return "" + value;
30265 var n;
30266 if (decimalDigits < 0) {
30267 decimalDigits = -decimalDigits;
30268 if (decimalDigits > JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length;
30269 if (value == 0) return JU.DF.formattingStrings[decimalDigits] + "E+0";
30270 n = 0;
30271 var d;
30272 if (Math.abs (value) < 1) {
30273 n = 10;
30274 d = value * 1e-10;
30275 } else {
30276 n = -10;
30277 d = value * 1e10;
30278 }var s = ("" + d).toUpperCase ();
30279 var i = s.indexOf ("E");
30280 n = JU.PT.parseInt (s.substring (i + 1)) + n;
30281 return (i < 0 ? "" + value : JU.DF.formatDecimal (JU.PT.parseFloat (s.substring (0, i)), decimalDigits - 1) + "E" + (n >= 0 ? "+" : "") + n);
30282 }if (decimalDigits >= JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length - 1;
30283 var s1 = ("" + value).toUpperCase ();
30284 var pt = s1.indexOf (".");
30285 if (pt < 0) return s1 + JU.DF.formattingStrings[decimalDigits].substring (1);
30286 var isNeg = s1.startsWith ("-");
30287 if (isNeg) {
30288 s1 = s1.substring (1);
30289 pt--;
30290 }var pt1 = s1.indexOf ("E-");
30291 if (pt1 > 0) {
30292 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30293 s1 = "0." + "0000000000000000000000000000000000000000".substring (0, -n - 1) + s1.substring (0, 1) + s1.substring (2, pt1);
30294 pt = 1;
30295 }pt1 = s1.indexOf ("E");
30296 if (pt1 > 0) {
30297 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30298 s1 = s1.substring (0, 1) + s1.substring (2, pt1) + "0000000000000000000000000000000000000000";
30299 s1 = s1.substring (0, n + 1) + "." + s1.substring (n + 1);
30300 pt = s1.indexOf (".");
30301 }var len = s1.length;
30302 var pt2 = decimalDigits + pt + 1;
30303 if (pt2 < len && s1.charAt (pt2) >= '5') {
30304 return JU.DF.formatDecimal (value + (isNeg ? -1 : 1) * JU.DF.formatAdds[decimalDigits], decimalDigits);
30305 }var sb = JU.SB.newS (s1.substring (0, (decimalDigits == 0 ? pt : ++pt)));
30306 for (var i = 0; i < decimalDigits; i++, pt++) {
30307 if (pt < len) sb.appendC (s1.charAt (pt));
30308  else sb.appendC ('0');
30309 }
30310 s1 = (isNeg ? "-" : "") + sb;
30311 return (Boolean.TRUE.equals (JU.DF.useNumberLocalization[0]) ? s1 : s1.$replace (',', '.'));
30312 }, "~N,~N");
30313 c$.formatDecimalTrimmed = Clazz_defineMethod (c$, "formatDecimalTrimmed", 
30314 function (x, precision) {
30315 var str = JU.DF.formatDecimalDbl (x, precision);
30316 var m = str.length - 1;
30317 var zero = '0';
30318 while (m >= 0 && str.charAt (m) == zero) m--;
30319
30320 return str.substring (0, m + 1);
30321 }, "~N,~N");
30322 Clazz_defineStatics (c$,
30323 "formattingStrings",  Clazz_newArray (-1, ["0", "0.0", "0.00", "0.000", "0.0000", "0.00000", "0.000000", "0.0000000", "0.00000000", "0.000000000"]),
30324 "zeros", "0000000000000000000000000000000000000000",
30325 "formatAdds",  Clazz_newFloatArray (-1, [0.5, 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005]));
30326 c$.useNumberLocalization = c$.prototype.useNumberLocalization =  Clazz_newArray (-1, [Boolean.TRUE]);
30327 });
30328 Clazz_declarePackage ("JU");
30329 c$ = Clazz_decorateAsClass (function () {
30330 this.sb = null;
30331 this.s = null;
30332 Clazz_instantialize (this, arguments);
30333 }, JU, "SB");
30334 Clazz_makeConstructor (c$, 
30335 function () {
30336 {
30337 this.s = "";
30338 }});
30339 c$.newN = Clazz_defineMethod (c$, "newN", 
30340 function (n) {
30341 {
30342 return new JU.SB();
30343 }}, "~N");
30344 c$.newS = Clazz_defineMethod (c$, "newS", 
30345 function (s) {
30346 {
30347 var sb = new JU.SB();
30348 sb.s = s;
30349 return sb;
30350 }}, "~S");
30351 Clazz_defineMethod (c$, "append", 
30352 function (s) {
30353 {
30354 this.s += s
30355 }return this;
30356 }, "~S");
30357 Clazz_defineMethod (c$, "appendC", 
30358 function (c) {
30359 {
30360 this.s += c;
30361 }return this;
30362 }, "~S");
30363 Clazz_defineMethod (c$, "appendI", 
30364 function (i) {
30365 {
30366 this.s += i
30367 }return this;
30368 }, "~N");
30369 Clazz_defineMethod (c$, "appendB", 
30370 function (b) {
30371 {
30372 this.s += b
30373 }return this;
30374 }, "~B");
30375 Clazz_defineMethod (c$, "appendF", 
30376 function (f) {
30377 {
30378 var sf = "" + f;
30379 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30380 sf += ".0" ;
30381 this.s += sf;
30382 }return this;
30383 }, "~N");
30384 Clazz_defineMethod (c$, "appendD", 
30385 function (d) {
30386 {
30387 var sf = "" + d;
30388 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30389 sf += ".0" ;
30390 this.s += sf;
30391 }return this;
30392 }, "~N");
30393 Clazz_defineMethod (c$, "appendSB", 
30394 function (buf) {
30395 {
30396 this.s += buf.s;
30397 }return this;
30398 }, "JU.SB");
30399 Clazz_defineMethod (c$, "appendO", 
30400 function (data) {
30401 if (data != null) {
30402 {
30403 this.s += data.toString();
30404 }}return this;
30405 }, "~O");
30406 Clazz_defineMethod (c$, "appendCB", 
30407 function (cb, off, len) {
30408 {
30409 for (var i = len,j=off; --i >= 0;)
30410 this.s += cb[j++];
30411 }}, "~A,~N,~N");
30412 Clazz_overrideMethod (c$, "toString", 
30413 function () {
30414 {
30415 return this.s;
30416 }});
30417 Clazz_defineMethod (c$, "length", 
30418 function () {
30419 {
30420 return this.s.length;
30421 }});
30422 Clazz_defineMethod (c$, "indexOf", 
30423 function (s) {
30424 {
30425 return this.s.indexOf(s);
30426 }}, "~S");
30427 Clazz_defineMethod (c$, "charAt", 
30428 function (i) {
30429 {
30430 return this.s.charAt(i);
30431 }}, "~N");
30432 Clazz_defineMethod (c$, "charCodeAt", 
30433 function (i) {
30434 {
30435 return this.s.charCodeAt(i);
30436 }}, "~N");
30437 Clazz_defineMethod (c$, "setLength", 
30438 function (n) {
30439 {
30440 this.s = this.s.substring(0, n);
30441 }}, "~N");
30442 Clazz_defineMethod (c$, "lastIndexOf", 
30443 function (s) {
30444 {
30445 return this.s.lastIndexOf(s);
30446 }}, "~S");
30447 Clazz_defineMethod (c$, "indexOf2", 
30448 function (s, i) {
30449 {
30450 return this.s.indexOf(s, i);
30451 }}, "~S,~N");
30452 Clazz_defineMethod (c$, "substring", 
30453 function (i) {
30454 {
30455 return this.s.substring(i);
30456 }}, "~N");
30457 Clazz_defineMethod (c$, "substring2", 
30458 function (i, j) {
30459 {
30460 return this.s.substring(i, j);
30461 }}, "~N,~N");
30462 Clazz_defineMethod (c$, "toBytes", 
30463 function (off, len) {
30464 if (len < 0) len = this.length () - off;
30465 var b =  Clazz_newByteArray (len, 0);
30466 for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0);
30467
30468 return b;
30469 }, "~N,~N");
30470 Clazz_defineMethod (c$, "replace", 
30471 function (start, end, str) {
30472 {
30473 this.s = this.s.substring(0, start) + str + this.s.substring(end);
30474 }}, "~N,~N,~S");
30475 Clazz_defineMethod (c$, "insert", 
30476 function (offset, str) {
30477 this.replace (offset, offset, str);
30478 }, "~N,~S");
30479 Clazz_declarePackage ("JU");
30480 Clazz_load (null, "JU.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () {
30481 c$ = Clazz_decorateAsClass (function () {
30482 this.m00 = 0;
30483 this.m01 = 0;
30484 this.m02 = 0;
30485 this.m10 = 0;
30486 this.m11 = 0;
30487 this.m12 = 0;
30488 this.m20 = 0;
30489 this.m21 = 0;
30490 this.m22 = 0;
30491 Clazz_instantialize (this, arguments);
30492 }, JU, "M34");
30493 Clazz_defineMethod (c$, "setAA33", 
30494 function (a) {
30495 var x = a.x;
30496 var y = a.y;
30497 var z = a.z;
30498 var angle = a.angle;
30499 var n = Math.sqrt (x * x + y * y + z * z);
30500 n = 1 / n;
30501 x *= n;
30502 y *= n;
30503 z *= n;
30504 var c = Math.cos (angle);
30505 var s = Math.sin (angle);
30506 var omc = 1.0 - c;
30507 this.m00 = (c + x * x * omc);
30508 this.m11 = (c + y * y * omc);
30509 this.m22 = (c + z * z * omc);
30510 var tmp1 = x * y * omc;
30511 var tmp2 = z * s;
30512 this.m01 = (tmp1 - tmp2);
30513 this.m10 = (tmp1 + tmp2);
30514 tmp1 = x * z * omc;
30515 tmp2 = y * s;
30516 this.m02 = (tmp1 + tmp2);
30517 this.m20 = (tmp1 - tmp2);
30518 tmp1 = y * z * omc;
30519 tmp2 = x * s;
30520 this.m12 = (tmp1 - tmp2);
30521 this.m21 = (tmp1 + tmp2);
30522 }, "JU.A4");
30523 Clazz_defineMethod (c$, "rotate", 
30524 function (t) {
30525 this.rotate2 (t, t);
30526 }, "JU.T3");
30527 Clazz_defineMethod (c$, "rotate2", 
30528 function (t, result) {
30529 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);
30530 }, "JU.T3,JU.T3");
30531 Clazz_defineMethod (c$, "setM33", 
30532 function (m1) {
30533 this.m00 = m1.m00;
30534 this.m01 = m1.m01;
30535 this.m02 = m1.m02;
30536 this.m10 = m1.m10;
30537 this.m11 = m1.m11;
30538 this.m12 = m1.m12;
30539 this.m20 = m1.m20;
30540 this.m21 = m1.m21;
30541 this.m22 = m1.m22;
30542 }, "JU.M34");
30543 Clazz_defineMethod (c$, "clear33", 
30544 function () {
30545 this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0;
30546 });
30547 Clazz_defineMethod (c$, "set33", 
30548 function (row, col, v) {
30549 switch (row) {
30550 case 0:
30551 switch (col) {
30552 case 0:
30553 this.m00 = v;
30554 return;
30555 case 1:
30556 this.m01 = v;
30557 return;
30558 case 2:
30559 this.m02 = v;
30560 return;
30561 }
30562 break;
30563 case 1:
30564 switch (col) {
30565 case 0:
30566 this.m10 = v;
30567 return;
30568 case 1:
30569 this.m11 = v;
30570 return;
30571 case 2:
30572 this.m12 = v;
30573 return;
30574 }
30575 break;
30576 case 2:
30577 switch (col) {
30578 case 0:
30579 this.m20 = v;
30580 return;
30581 case 1:
30582 this.m21 = v;
30583 return;
30584 case 2:
30585 this.m22 = v;
30586 return;
30587 }
30588 break;
30589 }
30590 this.err ();
30591 }, "~N,~N,~N");
30592 Clazz_defineMethod (c$, "get33", 
30593 function (row, col) {
30594 switch (row) {
30595 case 0:
30596 switch (col) {
30597 case 0:
30598 return this.m00;
30599 case 1:
30600 return this.m01;
30601 case 2:
30602 return this.m02;
30603 }
30604 break;
30605 case 1:
30606 switch (col) {
30607 case 0:
30608 return this.m10;
30609 case 1:
30610 return this.m11;
30611 case 2:
30612 return this.m12;
30613 }
30614 break;
30615 case 2:
30616 switch (col) {
30617 case 0:
30618 return this.m20;
30619 case 1:
30620 return this.m21;
30621 case 2:
30622 return this.m22;
30623 }
30624 break;
30625 }
30626 this.err ();
30627 return 0;
30628 }, "~N,~N");
30629 Clazz_defineMethod (c$, "setRow33", 
30630 function (row, v) {
30631 switch (row) {
30632 case 0:
30633 this.m00 = v[0];
30634 this.m01 = v[1];
30635 this.m02 = v[2];
30636 return;
30637 case 1:
30638 this.m10 = v[0];
30639 this.m11 = v[1];
30640 this.m12 = v[2];
30641 return;
30642 case 2:
30643 this.m20 = v[0];
30644 this.m21 = v[1];
30645 this.m22 = v[2];
30646 return;
30647 default:
30648 this.err ();
30649 }
30650 }, "~N,~A");
30651 Clazz_defineMethod (c$, "getRow33", 
30652 function (row, v) {
30653 switch (row) {
30654 case 0:
30655 v[0] = this.m00;
30656 v[1] = this.m01;
30657 v[2] = this.m02;
30658 return;
30659 case 1:
30660 v[0] = this.m10;
30661 v[1] = this.m11;
30662 v[2] = this.m12;
30663 return;
30664 case 2:
30665 v[0] = this.m20;
30666 v[1] = this.m21;
30667 v[2] = this.m22;
30668 return;
30669 }
30670 this.err ();
30671 }, "~N,~A");
30672 Clazz_defineMethod (c$, "setColumn33", 
30673 function (column, v) {
30674 switch (column) {
30675 case 0:
30676 this.m00 = v[0];
30677 this.m10 = v[1];
30678 this.m20 = v[2];
30679 break;
30680 case 1:
30681 this.m01 = v[0];
30682 this.m11 = v[1];
30683 this.m21 = v[2];
30684 break;
30685 case 2:
30686 this.m02 = v[0];
30687 this.m12 = v[1];
30688 this.m22 = v[2];
30689 break;
30690 default:
30691 this.err ();
30692 }
30693 }, "~N,~A");
30694 Clazz_defineMethod (c$, "getColumn33", 
30695 function (column, v) {
30696 switch (column) {
30697 case 0:
30698 v[0] = this.m00;
30699 v[1] = this.m10;
30700 v[2] = this.m20;
30701 break;
30702 case 1:
30703 v[0] = this.m01;
30704 v[1] = this.m11;
30705 v[2] = this.m21;
30706 break;
30707 case 2:
30708 v[0] = this.m02;
30709 v[1] = this.m12;
30710 v[2] = this.m22;
30711 break;
30712 default:
30713 this.err ();
30714 }
30715 }, "~N,~A");
30716 Clazz_defineMethod (c$, "add33", 
30717 function (m1) {
30718 this.m00 += m1.m00;
30719 this.m01 += m1.m01;
30720 this.m02 += m1.m02;
30721 this.m10 += m1.m10;
30722 this.m11 += m1.m11;
30723 this.m12 += m1.m12;
30724 this.m20 += m1.m20;
30725 this.m21 += m1.m21;
30726 this.m22 += m1.m22;
30727 }, "JU.M34");
30728 Clazz_defineMethod (c$, "sub33", 
30729 function (m1) {
30730 this.m00 -= m1.m00;
30731 this.m01 -= m1.m01;
30732 this.m02 -= m1.m02;
30733 this.m10 -= m1.m10;
30734 this.m11 -= m1.m11;
30735 this.m12 -= m1.m12;
30736 this.m20 -= m1.m20;
30737 this.m21 -= m1.m21;
30738 this.m22 -= m1.m22;
30739 }, "JU.M34");
30740 Clazz_defineMethod (c$, "mul33", 
30741 function (x) {
30742 this.m00 *= x;
30743 this.m01 *= x;
30744 this.m02 *= x;
30745 this.m10 *= x;
30746 this.m11 *= x;
30747 this.m12 *= x;
30748 this.m20 *= x;
30749 this.m21 *= x;
30750 this.m22 *= x;
30751 }, "~N");
30752 Clazz_defineMethod (c$, "transpose33", 
30753 function () {
30754 var tmp = this.m01;
30755 this.m01 = this.m10;
30756 this.m10 = tmp;
30757 tmp = this.m02;
30758 this.m02 = this.m20;
30759 this.m20 = tmp;
30760 tmp = this.m12;
30761 this.m12 = this.m21;
30762 this.m21 = tmp;
30763 });
30764 Clazz_defineMethod (c$, "setXRot", 
30765 function (angle) {
30766 var c = Math.cos (angle);
30767 var s = Math.sin (angle);
30768 this.m00 = 1.0;
30769 this.m01 = 0.0;
30770 this.m02 = 0.0;
30771 this.m10 = 0.0;
30772 this.m11 = c;
30773 this.m12 = -s;
30774 this.m20 = 0.0;
30775 this.m21 = s;
30776 this.m22 = c;
30777 }, "~N");
30778 Clazz_defineMethod (c$, "setYRot", 
30779 function (angle) {
30780 var c = Math.cos (angle);
30781 var s = Math.sin (angle);
30782 this.m00 = c;
30783 this.m01 = 0.0;
30784 this.m02 = s;
30785 this.m10 = 0.0;
30786 this.m11 = 1.0;
30787 this.m12 = 0.0;
30788 this.m20 = -s;
30789 this.m21 = 0.0;
30790 this.m22 = c;
30791 }, "~N");
30792 Clazz_defineMethod (c$, "setZRot", 
30793 function (angle) {
30794 var c = Math.cos (angle);
30795 var s = Math.sin (angle);
30796 this.m00 = c;
30797 this.m01 = -s;
30798 this.m02 = 0.0;
30799 this.m10 = s;
30800 this.m11 = c;
30801 this.m12 = 0.0;
30802 this.m20 = 0.0;
30803 this.m21 = 0.0;
30804 this.m22 = 1.0;
30805 }, "~N");
30806 Clazz_defineMethod (c$, "determinant3", 
30807 function () {
30808 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);
30809 });
30810 Clazz_defineMethod (c$, "err", 
30811 function () {
30812 throw  new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds");
30813 });
30814 });
30815 Clazz_declarePackage ("JU");
30816 Clazz_load (["JU.M34"], "JU.M4", ["JU.T3"], function () {
30817 c$ = Clazz_decorateAsClass (function () {
30818 this.m03 = 0;
30819 this.m13 = 0;
30820 this.m23 = 0;
30821 this.m30 = 0;
30822 this.m31 = 0;
30823 this.m32 = 0;
30824 this.m33 = 0;
30825 Clazz_instantialize (this, arguments);
30826 }, JU, "M4", JU.M34);
30827 c$.newA16 = Clazz_defineMethod (c$, "newA16", 
30828 function (v) {
30829 var m =  new JU.M4 ();
30830 m.m00 = v[0];
30831 m.m01 = v[1];
30832 m.m02 = v[2];
30833 m.m03 = v[3];
30834 m.m10 = v[4];
30835 m.m11 = v[5];
30836 m.m12 = v[6];
30837 m.m13 = v[7];
30838 m.m20 = v[8];
30839 m.m21 = v[9];
30840 m.m22 = v[10];
30841 m.m23 = v[11];
30842 m.m30 = v[12];
30843 m.m31 = v[13];
30844 m.m32 = v[14];
30845 m.m33 = v[15];
30846 return m;
30847 }, "~A");
30848 c$.newM4 = Clazz_defineMethod (c$, "newM4", 
30849 function (m1) {
30850 var m =  new JU.M4 ();
30851 if (m1 == null) {
30852 m.setIdentity ();
30853 return m;
30854 }m.setToM3 (m1);
30855 m.m03 = m1.m03;
30856 m.m13 = m1.m13;
30857 m.m23 = m1.m23;
30858 m.m30 = m1.m30;
30859 m.m31 = m1.m31;
30860 m.m32 = m1.m32;
30861 m.m33 = m1.m33;
30862 return m;
30863 }, "JU.M4");
30864 c$.newMV = Clazz_defineMethod (c$, "newMV", 
30865 function (m1, t) {
30866 var m =  new JU.M4 ();
30867 m.setMV (m1, t);
30868 return m;
30869 }, "JU.M3,JU.T3");
30870 Clazz_defineMethod (c$, "setZero", 
30871 function () {
30872 this.clear33 ();
30873 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = this.m33 = 0.0;
30874 });
30875 Clazz_defineMethod (c$, "setIdentity", 
30876 function () {
30877 this.setZero ();
30878 this.m00 = this.m11 = this.m22 = this.m33 = 1.0;
30879 });
30880 Clazz_defineMethod (c$, "setM4", 
30881 function (m1) {
30882 this.setM33 (m1);
30883 this.m03 = m1.m03;
30884 this.m13 = m1.m13;
30885 this.m23 = m1.m23;
30886 this.m30 = m1.m30;
30887 this.m31 = m1.m31;
30888 this.m32 = m1.m32;
30889 this.m33 = m1.m33;
30890 return this;
30891 }, "JU.M4");
30892 Clazz_defineMethod (c$, "setMV", 
30893 function (m1, t) {
30894 this.setM33 (m1);
30895 this.setTranslation (t);
30896 this.m33 = 1;
30897 }, "JU.M3,JU.T3");
30898 Clazz_defineMethod (c$, "setToM3", 
30899 function (m1) {
30900 this.setM33 (m1);
30901 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = 0.0;
30902 this.m33 = 1.0;
30903 }, "JU.M34");
30904 Clazz_defineMethod (c$, "setToAA", 
30905 function (a) {
30906 this.setIdentity ();
30907 this.setAA33 (a);
30908 }, "JU.A4");
30909 Clazz_defineMethod (c$, "setA", 
30910 function (m) {
30911 this.m00 = m[0];
30912 this.m01 = m[1];
30913 this.m02 = m[2];
30914 this.m03 = m[3];
30915 this.m10 = m[4];
30916 this.m11 = m[5];
30917 this.m12 = m[6];
30918 this.m13 = m[7];
30919 this.m20 = m[8];
30920 this.m21 = m[9];
30921 this.m22 = m[10];
30922 this.m23 = m[11];
30923 this.m30 = m[12];
30924 this.m31 = m[13];
30925 this.m32 = m[14];
30926 this.m33 = m[15];
30927 }, "~A");
30928 Clazz_defineMethod (c$, "setTranslation", 
30929 function (trans) {
30930 this.m03 = trans.x;
30931 this.m13 = trans.y;
30932 this.m23 = trans.z;
30933 }, "JU.T3");
30934 Clazz_defineMethod (c$, "setElement", 
30935 function (row, col, v) {
30936 if (row < 3 && col < 3) {
30937 this.set33 (row, col, v);
30938 return;
30939 }if (row > 3 || col > 3) this.err ();
30940 switch (row) {
30941 case 0:
30942 this.m03 = v;
30943 return;
30944 case 1:
30945 this.m13 = v;
30946 return;
30947 case 2:
30948 this.m23 = v;
30949 return;
30950 }
30951 switch (col) {
30952 case 0:
30953 this.m30 = v;
30954 return;
30955 case 1:
30956 this.m31 = v;
30957 return;
30958 case 2:
30959 this.m32 = v;
30960 return;
30961 case 3:
30962 this.m33 = v;
30963 return;
30964 }
30965 }, "~N,~N,~N");
30966 Clazz_defineMethod (c$, "getElement", 
30967 function (row, col) {
30968 if (row < 3 && col < 3) return this.get33 (row, col);
30969 if (row > 3 || col > 3) {
30970 this.err ();
30971 return 0;
30972 }switch (row) {
30973 case 0:
30974 return this.m03;
30975 case 1:
30976 return this.m13;
30977 case 2:
30978 return this.m23;
30979 default:
30980 switch (col) {
30981 case 0:
30982 return this.m30;
30983 case 1:
30984 return this.m31;
30985 case 2:
30986 return this.m32;
30987 default:
30988 return this.m33;
30989 }
30990 }
30991 }, "~N,~N");
30992 Clazz_defineMethod (c$, "getTranslation", 
30993 function (trans) {
30994 trans.x = this.m03;
30995 trans.y = this.m13;
30996 trans.z = this.m23;
30997 }, "JU.T3");
30998 Clazz_defineMethod (c$, "getRotationScale", 
30999 function (m1) {
31000 m1.m00 = this.m00;
31001 m1.m01 = this.m01;
31002 m1.m02 = this.m02;
31003 m1.m10 = this.m10;
31004 m1.m11 = this.m11;
31005 m1.m12 = this.m12;
31006 m1.m20 = this.m20;
31007 m1.m21 = this.m21;
31008 m1.m22 = this.m22;
31009 }, "JU.M3");
31010 Clazz_defineMethod (c$, "setRotationScale", 
31011 function (m1) {
31012 this.m00 = m1.m00;
31013 this.m01 = m1.m01;
31014 this.m02 = m1.m02;
31015 this.m10 = m1.m10;
31016 this.m11 = m1.m11;
31017 this.m12 = m1.m12;
31018 this.m20 = m1.m20;
31019 this.m21 = m1.m21;
31020 this.m22 = m1.m22;
31021 }, "JU.M3");
31022 Clazz_defineMethod (c$, "setRowA", 
31023 function (row, v) {
31024 if (row < 3) this.setRow33 (row, v);
31025 switch (row) {
31026 case 0:
31027 this.m03 = v[3];
31028 return;
31029 case 1:
31030 this.m13 = v[3];
31031 return;
31032 case 2:
31033 this.m23 = v[3];
31034 return;
31035 case 3:
31036 this.m30 = v[0];
31037 this.m31 = v[1];
31038 this.m32 = v[2];
31039 this.m33 = v[3];
31040 return;
31041 }
31042 this.err ();
31043 }, "~N,~A");
31044 Clazz_overrideMethod (c$, "getRow", 
31045 function (row, v) {
31046 if (row < 3) this.getRow33 (row, v);
31047 switch (row) {
31048 case 0:
31049 v[3] = this.m03;
31050 return;
31051 case 1:
31052 v[3] = this.m13;
31053 return;
31054 case 2:
31055 v[3] = this.m23;
31056 return;
31057 case 3:
31058 v[0] = this.m30;
31059 v[1] = this.m31;
31060 v[2] = this.m32;
31061 v[3] = this.m33;
31062 return;
31063 }
31064 this.err ();
31065 }, "~N,~A");
31066 Clazz_defineMethod (c$, "setColumn4", 
31067 function (column, x, y, z, w) {
31068 if (column == 0) {
31069 this.m00 = x;
31070 this.m10 = y;
31071 this.m20 = z;
31072 this.m30 = w;
31073 } else if (column == 1) {
31074 this.m01 = x;
31075 this.m11 = y;
31076 this.m21 = z;
31077 this.m31 = w;
31078 } else if (column == 2) {
31079 this.m02 = x;
31080 this.m12 = y;
31081 this.m22 = z;
31082 this.m32 = w;
31083 } else if (column == 3) {
31084 this.m03 = x;
31085 this.m13 = y;
31086 this.m23 = z;
31087 this.m33 = w;
31088 } else {
31089 this.err ();
31090 }}, "~N,~N,~N,~N,~N");
31091 Clazz_defineMethod (c$, "setColumnA", 
31092 function (column, v) {
31093 if (column < 3) this.setColumn33 (column, v);
31094 switch (column) {
31095 case 0:
31096 this.m30 = v[3];
31097 return;
31098 case 1:
31099 this.m31 = v[3];
31100 return;
31101 case 2:
31102 this.m32 = v[3];
31103 return;
31104 case 3:
31105 this.m03 = v[0];
31106 this.m13 = v[1];
31107 this.m23 = v[2];
31108 this.m33 = v[3];
31109 return;
31110 default:
31111 this.err ();
31112 }
31113 }, "~N,~A");
31114 Clazz_defineMethod (c$, "getColumn", 
31115 function (column, v) {
31116 if (column < 3) this.getColumn33 (column, v);
31117 switch (column) {
31118 case 0:
31119 v[3] = this.m30;
31120 return;
31121 case 1:
31122 v[3] = this.m31;
31123 return;
31124 case 2:
31125 v[3] = this.m32;
31126 return;
31127 case 3:
31128 v[0] = this.m03;
31129 v[1] = this.m13;
31130 v[2] = this.m23;
31131 v[3] = this.m33;
31132 return;
31133 default:
31134 this.err ();
31135 }
31136 }, "~N,~A");
31137 Clazz_defineMethod (c$, "sub", 
31138 function (m1) {
31139 this.sub33 (m1);
31140 this.m03 -= m1.m03;
31141 this.m13 -= m1.m13;
31142 this.m23 -= m1.m23;
31143 this.m30 -= m1.m30;
31144 this.m31 -= m1.m31;
31145 this.m32 -= m1.m32;
31146 this.m33 -= m1.m33;
31147 }, "JU.M4");
31148 Clazz_defineMethod (c$, "transpose", 
31149 function () {
31150 this.transpose33 ();
31151 var tmp = this.m03;
31152 this.m03 = this.m30;
31153 this.m30 = tmp;
31154 tmp = this.m13;
31155 this.m13 = this.m31;
31156 this.m31 = tmp;
31157 tmp = this.m23;
31158 this.m23 = this.m32;
31159 this.m32 = tmp;
31160 });
31161 Clazz_defineMethod (c$, "invert", 
31162 function () {
31163 var s = this.determinant4 ();
31164 if (s == 0.0) return this;
31165 s = 1 / s;
31166 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));
31167 this.scale (s);
31168 return this;
31169 });
31170 Clazz_defineMethod (c$, "set", 
31171  function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {
31172 this.m00 = m00;
31173 this.m01 = m01;
31174 this.m02 = m02;
31175 this.m03 = m03;
31176 this.m10 = m10;
31177 this.m11 = m11;
31178 this.m12 = m12;
31179 this.m13 = m13;
31180 this.m20 = m20;
31181 this.m21 = m21;
31182 this.m22 = m22;
31183 this.m23 = m23;
31184 this.m30 = m30;
31185 this.m31 = m31;
31186 this.m32 = m32;
31187 this.m33 = m33;
31188 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
31189 Clazz_defineMethod (c$, "determinant4", 
31190 function () {
31191 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);
31192 });
31193 Clazz_defineMethod (c$, "scale", 
31194  function (scalar) {
31195 this.mul33 (scalar);
31196 this.m03 *= scalar;
31197 this.m13 *= scalar;
31198 this.m23 *= scalar;
31199 this.m30 *= scalar;
31200 this.m31 *= scalar;
31201 this.m32 *= scalar;
31202 this.m33 *= scalar;
31203 }, "~N");
31204 Clazz_defineMethod (c$, "mul", 
31205 function (m1) {
31206 this.mul2 (this, m1);
31207 }, "JU.M4");
31208 Clazz_defineMethod (c$, "mul2", 
31209 function (m1, m2) {
31210 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);
31211 }, "JU.M4,JU.M4");
31212 Clazz_defineMethod (c$, "transform", 
31213 function (vec) {
31214 this.transform2 (vec, vec);
31215 }, "JU.T4");
31216 Clazz_defineMethod (c$, "transform2", 
31217 function (vec, vecOut) {
31218 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);
31219 }, "JU.T4,JU.T4");
31220 Clazz_defineMethod (c$, "rotTrans", 
31221 function (point) {
31222 this.rotTrans2 (point, point);
31223 }, "JU.T3");
31224 Clazz_defineMethod (c$, "rotTrans2", 
31225 function (point, pointOut) {
31226 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);
31227 return pointOut;
31228 }, "JU.T3,JU.T3");
31229 Clazz_defineMethod (c$, "setAsXYRotation", 
31230 function (angle) {
31231 this.setIdentity ();
31232 var c = Math.cos (angle);
31233 var s = Math.sin (angle);
31234 this.m22 = c;
31235 this.m23 = -s;
31236 this.m32 = s;
31237 this.m33 = c;
31238 return this;
31239 }, "~N");
31240 Clazz_defineMethod (c$, "setAsYZRotation", 
31241 function (angle) {
31242 this.setIdentity ();
31243 var c = Math.cos (angle);
31244 var s = Math.sin (angle);
31245 this.m00 = c;
31246 this.m03 = -s;
31247 this.m30 = s;
31248 this.m33 = c;
31249 return this;
31250 }, "~N");
31251 Clazz_defineMethod (c$, "setAsXZRotation", 
31252 function (angle) {
31253 this.setIdentity ();
31254 var c = Math.cos (angle);
31255 var s = Math.sin (angle);
31256 this.m11 = c;
31257 this.m13 = -s;
31258 this.m31 = s;
31259 this.m33 = c;
31260 return this;
31261 }, "~N");
31262 Clazz_overrideMethod (c$, "equals", 
31263 function (o) {
31264 if (!(Clazz_instanceOf (o, JU.M4))) return false;
31265 var m = o;
31266 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);
31267 }, "~O");
31268 Clazz_overrideMethod (c$, "hashCode", 
31269 function () {
31270 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);
31271 });
31272 Clazz_overrideMethod (c$, "toString", 
31273 function () {
31274 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 + "] ]";
31275 });
31276 });
31277 Clazz_declarePackage ("JU");
31278 Clazz_load (["javajs.api.JSONEncodable"], "JU.T3", ["java.lang.Float"], function () {
31279 c$ = Clazz_decorateAsClass (function () {
31280 this.x = 0;
31281 this.y = 0;
31282 this.z = 0;
31283 Clazz_instantialize (this, arguments);
31284 }, JU, "T3", null, [javajs.api.JSONEncodable, java.io.Serializable]);
31285 Clazz_defineMethod (c$, "set", 
31286 function (x, y, z) {
31287 this.x = x;
31288 this.y = y;
31289 this.z = z;
31290 }, "~N,~N,~N");
31291 Clazz_defineMethod (c$, "setA", 
31292 function (t) {
31293 this.x = t[0];
31294 this.y = t[1];
31295 this.z = t[2];
31296 }, "~A");
31297 Clazz_defineMethod (c$, "setT", 
31298 function (t1) {
31299 this.x = t1.x;
31300 this.y = t1.y;
31301 this.z = t1.z;
31302 }, "JU.T3");
31303 Clazz_defineMethod (c$, "add2", 
31304 function (t1, t2) {
31305 this.x = t1.x + t2.x;
31306 this.y = t1.y + t2.y;
31307 this.z = t1.z + t2.z;
31308 }, "JU.T3,JU.T3");
31309 Clazz_defineMethod (c$, "add", 
31310 function (t1) {
31311 this.x += t1.x;
31312 this.y += t1.y;
31313 this.z += t1.z;
31314 }, "JU.T3");
31315 Clazz_defineMethod (c$, "distanceSquared", 
31316 function (p1) {
31317 var dx = this.x - p1.x;
31318 var dy = this.y - p1.y;
31319 var dz = this.z - p1.z;
31320 return (dx * dx + dy * dy + dz * dz);
31321 }, "JU.T3");
31322 Clazz_defineMethod (c$, "distance", 
31323 function (p1) {
31324 return Math.sqrt (this.distanceSquared (p1));
31325 }, "JU.T3");
31326 Clazz_defineMethod (c$, "sub2", 
31327 function (t1, t2) {
31328 this.x = t1.x - t2.x;
31329 this.y = t1.y - t2.y;
31330 this.z = t1.z - t2.z;
31331 }, "JU.T3,JU.T3");
31332 Clazz_defineMethod (c$, "sub", 
31333 function (t1) {
31334 this.x -= t1.x;
31335 this.y -= t1.y;
31336 this.z -= t1.z;
31337 }, "JU.T3");
31338 Clazz_defineMethod (c$, "scale", 
31339 function (s) {
31340 this.x *= s;
31341 this.y *= s;
31342 this.z *= s;
31343 }, "~N");
31344 Clazz_defineMethod (c$, "add3", 
31345 function (a, b, c) {
31346 this.x += a;
31347 this.y += b;
31348 this.z += c;
31349 }, "~N,~N,~N");
31350 Clazz_defineMethod (c$, "scaleT", 
31351 function (p) {
31352 this.x *= p.x;
31353 this.y *= p.y;
31354 this.z *= p.z;
31355 }, "JU.T3");
31356 Clazz_defineMethod (c$, "scaleAdd2", 
31357 function (s, t1, t2) {
31358 this.x = s * t1.x + t2.x;
31359 this.y = s * t1.y + t2.y;
31360 this.z = s * t1.z + t2.z;
31361 }, "~N,JU.T3,JU.T3");
31362 Clazz_defineMethod (c$, "ave", 
31363 function (a, b) {
31364 this.x = (a.x + b.x) / 2;
31365 this.y = (a.y + b.y) / 2;
31366 this.z = (a.z + b.z) / 2;
31367 }, "JU.T3,JU.T3");
31368 Clazz_defineMethod (c$, "dot", 
31369 function (v) {
31370 return this.x * v.x + this.y * v.y + this.z * v.z;
31371 }, "JU.T3");
31372 Clazz_defineMethod (c$, "lengthSquared", 
31373 function () {
31374 return this.x * this.x + this.y * this.y + this.z * this.z;
31375 });
31376 Clazz_defineMethod (c$, "length", 
31377 function () {
31378 return Math.sqrt (this.lengthSquared ());
31379 });
31380 Clazz_defineMethod (c$, "normalize", 
31381 function () {
31382 var d = this.length ();
31383 this.x /= d;
31384 this.y /= d;
31385 this.z /= d;
31386 });
31387 Clazz_defineMethod (c$, "cross", 
31388 function (v1, v2) {
31389 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);
31390 }, "JU.T3,JU.T3");
31391 Clazz_overrideMethod (c$, "hashCode", 
31392 function () {
31393 var bits = 1;
31394 bits = 31 * bits + JU.T3.floatToIntBits0 (this.x);
31395 bits = 31 * bits + JU.T3.floatToIntBits0 (this.y);
31396 bits = 31 * bits + JU.T3.floatToIntBits0 (this.z);
31397 return (bits ^ (bits >> 32));
31398 });
31399 c$.floatToIntBits0 = Clazz_defineMethod (c$, "floatToIntBits0", 
31400 function (f) {
31401 return (f == 0 ? 0 : Float.floatToIntBits (f));
31402 }, "~N");
31403 Clazz_overrideMethod (c$, "equals", 
31404 function (t1) {
31405 if (!(Clazz_instanceOf (t1, JU.T3))) return false;
31406 var t2 = t1;
31407 return (this.x == t2.x && this.y == t2.y && this.z == t2.z);
31408 }, "~O");
31409 Clazz_overrideMethod (c$, "toString", 
31410 function () {
31411 return "{" + this.x + ", " + this.y + ", " + this.z + "}";
31412 });
31413 Clazz_overrideMethod (c$, "toJSON", 
31414 function () {
31415 return "[" + this.x + "," + this.y + "," + this.z + "]";
31416 });
31417 });
31418 Clazz_declarePackage ("javax.swing");
31419 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 () {
31420 c$ = Clazz_decorateAsClass (function () {
31421 this.windowDecorationStyle = 0;
31422 this.menuBar = null;
31423 this.contentPane = null;
31424 this.layeredPane = null;
31425 this.glassPane = null;
31426 this.defaultButton = null;
31427 this.defaultPressAction = null;
31428 this.defaultReleaseAction = null;
31429 this.useTrueDoubleBuffering = true;
31430 if (!Clazz_isClassDefined ("javax.swing.JRootPane.RootLayout")) {
31431 javax.swing.JRootPane.$JRootPane$RootLayout$ ();
31432 }
31433 Clazz_instantialize (this, arguments);
31434 }, javax.swing, "JRootPane", javax.swing.JComponent);
31435 Clazz_makeConstructor (c$, 
31436 function () {
31437 Clazz_superConstructor (this, javax.swing.JRootPane, []);
31438 var appletName = jssun.awt.AppContext.getAppContext ().getThreadGroup ().getName ();
31439 this.setName (appletName + ".JRootPane");
31440 this.setGlassPane (this.createGlassPane ());
31441 this.setLayeredPane (this.createLayeredPane ());
31442 this.setContentPane (this.createContentPane ());
31443 this.setLayout (this.createRootLayout ());
31444 this.updateUI ();
31445 });
31446 Clazz_overrideMethod (c$, "setDoubleBuffered", 
31447 function (aFlag) {
31448 }, "~B");
31449 Clazz_defineMethod (c$, "getWindowDecorationStyle", 
31450 function () {
31451 return this.windowDecorationStyle;
31452 });
31453 Clazz_defineMethod (c$, "setWindowDecorationStyle", 
31454 function (windowDecorationStyle) {
31455 if (windowDecorationStyle < 0 || windowDecorationStyle > 8) {
31456 throw  new IllegalArgumentException ("Invalid decoration style");
31457 }var oldWindowDecorationStyle = this.getWindowDecorationStyle ();
31458 this.windowDecorationStyle = windowDecorationStyle;
31459 this.firePropertyChangeInt ("windowDecorationStyle", oldWindowDecorationStyle, windowDecorationStyle);
31460 }, "~N");
31461 Clazz_overrideMethod (c$, "getUI", 
31462 function () {
31463 return this.ui;
31464 });
31465 Clazz_overrideMethod (c$, "updateUI", 
31466 function () {
31467 this.setUI (javax.swing.UIManager.getUI (this));
31468 });
31469 Clazz_overrideMethod (c$, "getUIClassID", 
31470 function () {
31471 return "RootPaneUI";
31472 });
31473 Clazz_defineMethod (c$, "createLayeredPane", 
31474 function () {
31475 var p =  new javax.swing.JLayeredPane ();
31476 p.setName (this.getName () + ".layeredPane");
31477 return p;
31478 });
31479 Clazz_defineMethod (c$, "createContentPane", 
31480 function () {
31481 var c =  new javax.swing.JPanel ();
31482 c.setName (this.getName () + ".contentPane");
31483 c.setLayout (((Clazz_isClassDefined ("javax.swing.JRootPane$1") ? 0 : javax.swing.JRootPane.$JRootPane$1$ ()), Clazz_innerTypeInstance (javax.swing.JRootPane$1, this, null)));
31484 return c;
31485 });
31486 Clazz_defineMethod (c$, "createGlassPane", 
31487 function () {
31488 var c =  new javax.swing.JPanel ();
31489 c.setName (this.getName () + ".glassPane");
31490 c.setVisible (false);
31491 (c).setOpaque (false);
31492 return c;
31493 });
31494 Clazz_defineMethod (c$, "createRootLayout", 
31495 function () {
31496 return Clazz_innerTypeInstance (javax.swing.JRootPane.RootLayout, this, null);
31497 });
31498 Clazz_defineMethod (c$, "setJMenuBar", 
31499 function (menu) {
31500 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31501 this.menuBar = menu;
31502 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31503 }, "javax.swing.JMenuBar");
31504 Clazz_defineMethod (c$, "setMenuBar", 
31505 function (menu) {
31506 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31507 this.menuBar = menu;
31508 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31509 }, "javax.swing.JMenuBar");
31510 Clazz_defineMethod (c$, "getJMenuBar", 
31511 function () {
31512 return this.menuBar;
31513 });
31514 Clazz_defineMethod (c$, "getMenuBar", 
31515 function () {
31516 return this.menuBar;
31517 });
31518 Clazz_defineMethod (c$, "setContentPane", 
31519 function (content) {
31520 if (content == null) throw  new java.awt.IllegalComponentStateException ("contentPane cannot be set to null.");
31521 if (this.contentPane != null && this.contentPane.getParent () === this.layeredPane) this.layeredPane.remove (this.contentPane);
31522 this.contentPane = content;
31523 this.layeredPane.add (this.contentPane, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31524 }, "java.awt.Container");
31525 Clazz_defineMethod (c$, "getContentPane", 
31526 function () {
31527 return this.contentPane;
31528 });
31529 Clazz_defineMethod (c$, "setLayeredPane", 
31530 function (layered) {
31531 if (layered == null) throw  new java.awt.IllegalComponentStateException ("layeredPane cannot be set to null.");
31532 if (this.layeredPane != null && this.layeredPane.getParent () === this) this.remove (this.layeredPane);
31533 this.layeredPane = layered;
31534 this.add (this.layeredPane, -1);
31535 }, "javax.swing.JLayeredPane");
31536 Clazz_defineMethod (c$, "getLayeredPane", 
31537 function () {
31538 return this.layeredPane;
31539 });
31540 Clazz_defineMethod (c$, "setGlassPane", 
31541 function (glass) {
31542 if (glass == null) {
31543 throw  new NullPointerException ("glassPane cannot be set to null.");
31544 }var visible = false;
31545 if (this.glassPane != null && this.glassPane.getParent () === this) {
31546 this.remove (this.glassPane);
31547 visible = this.glassPane.isVisible ();
31548 }glass.setVisible (visible);
31549 this.glassPane = glass;
31550 this.add (this.glassPane, 0);
31551 if (visible) {
31552 this.repaint ();
31553 }}, "java.awt.Component");
31554 Clazz_defineMethod (c$, "getGlassPane", 
31555 function () {
31556 return this.glassPane;
31557 });
31558 Clazz_overrideMethod (c$, "isValidateRoot", 
31559 function () {
31560 return true;
31561 });
31562 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
31563 function () {
31564 return !this.glassPane.isVisible ();
31565 });
31566 Clazz_defineMethod (c$, "addNotify", 
31567 function () {
31568 Clazz_superCall (this, javax.swing.JRootPane, "addNotify", []);
31569 this.enableEvents (8);
31570 });
31571 Clazz_defineMethod (c$, "setDefaultButton", 
31572 function (defaultButton) {
31573 var oldDefault = this.defaultButton;
31574 if (oldDefault !== defaultButton) {
31575 this.defaultButton = defaultButton;
31576 if (oldDefault != null) {
31577 oldDefault.repaint ();
31578 }if (defaultButton != null) {
31579 defaultButton.repaint ();
31580 }}this.firePropertyChangeObject ("defaultButton", oldDefault, defaultButton);
31581 }, "javax.swing.JButton");
31582 Clazz_defineMethod (c$, "getDefaultButton", 
31583 function () {
31584 return this.defaultButton;
31585 });
31586 Clazz_defineMethod (c$, "setUseTrueDoubleBuffering", 
31587 function (useTrueDoubleBuffering) {
31588 this.useTrueDoubleBuffering = useTrueDoubleBuffering;
31589 }, "~B");
31590 Clazz_defineMethod (c$, "getUseTrueDoubleBuffering", 
31591 function () {
31592 return this.useTrueDoubleBuffering;
31593 });
31594 Clazz_defineMethod (c$, "disableTrueDoubleBuffering", 
31595 function () {
31596 });
31597 Clazz_overrideMethod (c$, "addImpl", 
31598 function (comp, constraints, index) {
31599 this.addImplSAEM (comp, constraints, index);
31600 if (this.glassPane != null && this.glassPane.getParent () === this && this.getComponent (0) !== this.glassPane) {
31601 this.add (this.glassPane, 0);
31602 }return comp;
31603 }, "java.awt.Component,~O,~N");
31604 c$.$JRootPane$RootLayout$ = function () {
31605 Clazz_pu$h(self.c$);
31606 c$ = Clazz_decorateAsClass (function () {
31607 Clazz_prepareCallback (this, arguments);
31608 Clazz_instantialize (this, arguments);
31609 }, javax.swing.JRootPane, "RootLayout", null, java.awt.LayoutManager2);
31610 Clazz_overrideMethod (c$, "preferredLayoutSize", 
31611 function (a) {
31612 var b;
31613 var c;
31614 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31615 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31616 b = this.b$["javax.swing.JRootPane"].contentPane.getPreferredSize ();
31617 } else {
31618 b = a.getSize ();
31619 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31620 c = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31621 } else {
31622 c =  new java.awt.Dimension (0, 0);
31623 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31624 }, "java.awt.Container");
31625 Clazz_overrideMethod (c$, "minimumLayoutSize", 
31626 function (a) {
31627 var b;
31628 var c;
31629 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31630 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31631 b = this.b$["javax.swing.JRootPane"].contentPane.getMinimumSize ();
31632 } else {
31633 b = a.getSize ();
31634 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31635 c = this.b$["javax.swing.JRootPane"].menuBar.getMinimumSize ();
31636 } else {
31637 c =  new java.awt.Dimension (0, 0);
31638 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31639 }, "java.awt.Container");
31640 Clazz_overrideMethod (c$, "maximumLayoutSize", 
31641 function (a) {
31642 var b;
31643 var c;
31644 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31645 if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31646 c = this.b$["javax.swing.JRootPane"].menuBar.getMaximumSize ();
31647 } else {
31648 c =  new java.awt.Dimension (0, 0);
31649 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31650 b = this.b$["javax.swing.JRootPane"].contentPane.getMaximumSize ();
31651 } else {
31652 b =  new java.awt.Dimension (2147483647, 2147483647 - d.top - d.bottom - c.height - 1);
31653 }return  new java.awt.Dimension (Math.min (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31654 }, "java.awt.Container");
31655 Clazz_overrideMethod (c$, "layoutContainer", 
31656 function (a) {
31657 var b = a.getBounds ();
31658 var c = this.b$["javax.swing.JRootPane"].getInsets ();
31659 var d = 0;
31660 var e = b.width - c.right - c.left;
31661 var f = b.height - c.top - c.bottom;
31662 if (this.b$["javax.swing.JRootPane"].layeredPane != null) {
31663 this.b$["javax.swing.JRootPane"].layeredPane.setBounds (c.left, c.top, e, f);
31664 }if (this.b$["javax.swing.JRootPane"].glassPane != null) {
31665 this.b$["javax.swing.JRootPane"].glassPane.setBounds (c.left, c.top, e, f);
31666 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31667 var g = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31668 this.b$["javax.swing.JRootPane"].menuBar.setBounds (0, 0, e, g.height);
31669 d += g.height;
31670 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31671 this.b$["javax.swing.JRootPane"].contentPane.setBounds (0, d, e, f - d);
31672 }}, "java.awt.Container");
31673 Clazz_defineMethod (c$, "addLayoutComponent", 
31674 function (a, b) {
31675 }, "~S,java.awt.Component");
31676 Clazz_overrideMethod (c$, "removeLayoutComponent", 
31677 function (a) {
31678 }, "java.awt.Component");
31679 Clazz_defineMethod (c$, "addLayoutComponent", 
31680 function (a, b) {
31681 }, "java.awt.Component,~O");
31682 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
31683 function (a) {
31684 return 0.0;
31685 }, "java.awt.Container");
31686 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
31687 function (a) {
31688 return 0.0;
31689 }, "java.awt.Container");
31690 Clazz_overrideMethod (c$, "invalidateLayout", 
31691 function (a) {
31692 }, "java.awt.Container");
31693 c$ = Clazz_p0p ();
31694 };
31695 c$.$JRootPane$1$ = function () {
31696 Clazz_pu$h(self.c$);
31697 c$ = Clazz_declareAnonymous (javax.swing, "JRootPane$1", java.awt.BorderLayout);
31698 Clazz_defineMethod (c$, "addLayoutComponent", 
31699 function (comp, constraints) {
31700 if (constraints == null) {
31701 constraints = "Center";
31702 }Clazz_superCall (this, javax.swing.JRootPane$1, "addLayoutComponent", [comp, constraints]);
31703 }, "java.awt.Component,~O");
31704 c$ = Clazz_p0p ();
31705 };
31706 Clazz_pu$h(self.c$);
31707 c$ = Clazz_decorateAsClass (function () {
31708 this.owner = null;
31709 this.root = null;
31710 this.press = false;
31711 Clazz_instantialize (this, arguments);
31712 }, javax.swing.JRootPane, "DefaultAction", javax.swing.AbstractAction);
31713 Clazz_makeConstructor (c$, 
31714 function (a, b) {
31715 Clazz_superConstructor (this, javax.swing.JRootPane.DefaultAction, []);
31716 this.root = a;
31717 this.press = b;
31718 }, "javax.swing.JRootPane,~B");
31719 Clazz_defineMethod (c$, "setOwner", 
31720 function (a) {
31721 this.owner = a;
31722 }, "javax.swing.JButton");
31723 Clazz_overrideMethod (c$, "actionPerformed", 
31724 function (a) {
31725 if (this.owner != null && javax.swing.SwingUtilities.getRootPane (this.owner) === this.root) {
31726 var b = this.owner.getModel ();
31727 if (this.press) {
31728 b.setArmed (true);
31729 b.setPressed (true);
31730 } else {
31731 b.setPressed (false);
31732 }}}, "java.awt.event.ActionEvent");
31733 Clazz_overrideMethod (c$, "isEnabled", 
31734 function () {
31735 return this.owner.getModel ().isEnabled ();
31736 });
31737 c$ = Clazz_p0p ();
31738 Clazz_defineStatics (c$,
31739 "$uiClassID", "RootPaneUI",
31740 "NONE", 0,
31741 "FRAME", 1,
31742 "PLAIN_DIALOG", 2,
31743 "INFORMATION_DIALOG", 3,
31744 "ERROR_DIALOG", 4,
31745 "COLOR_CHOOSER_DIALOG", 5,
31746 "FILE_CHOOSER_DIALOG", 6,
31747 "QUESTION_DIALOG", 7,
31748 "WARNING_DIALOG", 8);
31749 });
31750 Clazz_declarePackage ("javax.swing");
31751 Clazz_load (["javax.swing.AbstractButton", "$.DefaultButtonModel"], "javax.swing.JToggleButton", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.InputEvent", "$.ItemEvent", "javax.swing.UIManager"], function () {
31752 c$ = Clazz_declareType (javax.swing, "JToggleButton", javax.swing.AbstractButton);
31753 Clazz_makeConstructor (c$, 
31754 function () {
31755 this.construct (null, null, false);
31756 });
31757 Clazz_makeConstructor (c$, 
31758 function (icon) {
31759 this.construct (null, icon, false);
31760 }, "javax.swing.Icon");
31761 Clazz_makeConstructor (c$, 
31762 function (icon, selected) {
31763 this.construct (null, icon, selected);
31764 }, "javax.swing.Icon,~B");
31765 Clazz_makeConstructor (c$, 
31766 function (text) {
31767 this.construct (text, null, false);
31768 }, "~S");
31769 Clazz_makeConstructor (c$, 
31770 function (text, selected) {
31771 this.construct (text, null, selected);
31772 }, "~S,~B");
31773 Clazz_makeConstructor (c$, 
31774 function (a) {
31775 this.construct ();
31776 this.setAction (a);
31777 }, "javax.swing.Action");
31778 Clazz_makeConstructor (c$, 
31779 function (text, icon) {
31780 this.construct (text, icon, false);
31781 }, "~S,javax.swing.Icon");
31782 Clazz_makeConstructor (c$, 
31783 function (text, icon, selected) {
31784 Clazz_superConstructor (this, javax.swing.JToggleButton, []);
31785 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
31786 this.model.setSelected (selected);
31787 this.init (text, icon);
31788 }, "~S,javax.swing.Icon,~B");
31789 Clazz_overrideMethod (c$, "updateUI", 
31790 function () {
31791 this.setUI (javax.swing.UIManager.getUI (this));
31792 });
31793 Clazz_overrideMethod (c$, "getUIClassID", 
31794 function () {
31795 return "ToggleButtonUI";
31796 });
31797 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
31798 function () {
31799 return true;
31800 });
31801 Clazz_pu$h(self.c$);
31802 c$ = Clazz_declareType (javax.swing.JToggleButton, "ToggleButtonModel", javax.swing.DefaultButtonModel);
31803 Clazz_makeConstructor (c$, 
31804 function () {
31805 Clazz_superConstructor (this, javax.swing.JToggleButton.ToggleButtonModel, []);
31806 });
31807 Clazz_overrideMethod (c$, "isSelected", 
31808 function () {
31809 return (this.stateMask & 2) != 0;
31810 });
31811 Clazz_overrideMethod (c$, "setSelected", 
31812 function (a) {
31813 var b = this.getGroup ();
31814 if (b != null) {
31815 b.setSelected (this, a);
31816 a = b.isSelected (this);
31817 }if (this.isSelected () == a) {
31818 return;
31819 }if (a) {
31820 this.stateMask |= 2;
31821 } else {
31822 this.stateMask &= -3;
31823 }this.fireStateChanged ();
31824 this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, this.isSelected () ? 1 : 2));
31825 }, "~B");
31826 Clazz_overrideMethod (c$, "setPressed", 
31827 function (a) {
31828 if ((this.isPressed () == a) || !this.isEnabled ()) {
31829 return;
31830 }if (a == false && this.isArmed ()) {
31831 this.setSelected (!this.isSelected ());
31832 }if (a) {
31833 this.stateMask |= 4;
31834 } else {
31835 this.stateMask &= -5;
31836 }this.fireStateChanged ();
31837 if (!this.isPressed () && this.isArmed ()) {
31838 var b = 0;
31839 var c = java.awt.EventQueue.getCurrentEvent ();
31840 if (Clazz_instanceOf (c, java.awt.event.InputEvent)) {
31841 b = (c).getModifiers ();
31842 } else if (Clazz_instanceOf (c, java.awt.event.ActionEvent)) {
31843 b = (c).getModifiers ();
31844 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), b));
31845 }}, "~B");
31846 c$ = Clazz_p0p ();
31847 Clazz_defineStatics (c$,
31848 "$uiClassID", "ToggleButtonUI");
31849 });
31850 Clazz_declarePackage ("javax.swing");
31851 Clazz_load (["java.awt.ItemSelectable"], "javax.swing.ButtonModel", null, function () {
31852 Clazz_declareInterface (javax.swing, "ButtonModel", java.awt.ItemSelectable);
31853 });
31854 Clazz_declarePackage ("javax.swing");
31855 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JRadioButton", ["javax.swing.UIManager"], function () {
31856 c$ = Clazz_declareType (javax.swing, "JRadioButton", javax.swing.JToggleButton);
31857 Clazz_makeConstructor (c$, 
31858 function () {
31859 this.construct (null, null, false);
31860 });
31861 Clazz_makeConstructor (c$, 
31862 function (icon) {
31863 this.construct (null, icon, false);
31864 }, "javax.swing.Icon");
31865 Clazz_makeConstructor (c$, 
31866 function (a) {
31867 this.construct ();
31868 this.setAction (a);
31869 }, "javax.swing.Action");
31870 Clazz_makeConstructor (c$, 
31871 function (icon, selected) {
31872 this.construct (null, icon, selected);
31873 }, "javax.swing.Icon,~B");
31874 Clazz_makeConstructor (c$, 
31875 function (text) {
31876 this.construct (text, null, false);
31877 }, "~S");
31878 Clazz_makeConstructor (c$, 
31879 function (text, selected) {
31880 this.construct (text, null, selected);
31881 }, "~S,~B");
31882 Clazz_makeConstructor (c$, 
31883 function (text, icon) {
31884 this.construct (text, icon, false);
31885 }, "~S,javax.swing.Icon");
31886 Clazz_makeConstructor (c$, 
31887 function (text, icon, selected) {
31888 Clazz_superConstructor (this, javax.swing.JRadioButton, [text, icon, selected]);
31889 this.setBorderPainted (false);
31890 this.setHorizontalAlignment (10);
31891 }, "~S,javax.swing.Icon,~B");
31892 Clazz_overrideMethod (c$, "updateUI", 
31893 function () {
31894 this.setUI (javax.swing.UIManager.getUI (this));
31895 });
31896 Clazz_overrideMethod (c$, "getUIClassID", 
31897 function () {
31898 return "RadioButtonUI";
31899 });
31900 Clazz_overrideMethod (c$, "setIconFromAction", 
31901 function (a) {
31902 }, "javax.swing.Action");
31903 Clazz_defineStatics (c$,
31904 "$$uiClassID", "RadioButtonUI");
31905 });
31906 Clazz_declarePackage ("javax.swing");
31907 Clazz_load (["java.applet.Applet", "javax.swing.RootPaneContainer"], "javax.swing.JApplet", ["java.awt.BorderLayout", "$.Color", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
31908 c$ = Clazz_decorateAsClass (function () {
31909 this.rootPane = null;
31910 this.rootPaneCheckingEnabled = false;
31911 this.transferHandler = null;
31912 Clazz_instantialize (this, arguments);
31913 }, javax.swing, "JApplet", java.applet.Applet, javax.swing.RootPaneContainer);
31914 Clazz_makeConstructor (c$, 
31915 function () {
31916 Clazz_superConstructor (this, javax.swing.JApplet, []);
31917 this.setJApplet ();
31918 });
31919 Clazz_defineMethod (c$, "setJApplet", 
31920  function () {
31921 this.setPanel ();
31922 this.setForeground (java.awt.Color.black);
31923 this.setBackground (java.awt.Color.white);
31924 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
31925 this.setLayout ( new java.awt.BorderLayout ());
31926 this.setRootPane (this.createRootPane ());
31927 this.setRootPaneCheckingEnabled (true);
31928 this.setFocusTraversalPolicyProvider (true);
31929 this.enableEvents (8);
31930 });
31931 Clazz_defineMethod (c$, "createRootPane", 
31932 function () {
31933 var rp =  new javax.swing.JRootPane ();
31934 rp.setOpaque (true);
31935 return rp;
31936 });
31937 Clazz_defineMethod (c$, "setTransferHandler", 
31938 function (newHandler) {
31939 var oldHandler = this.transferHandler;
31940 this.transferHandler = newHandler;
31941 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
31942 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
31943 }, "javax.swing.TransferHandler");
31944 Clazz_defineMethod (c$, "getTransferHandler", 
31945 function () {
31946 return this.transferHandler;
31947 });
31948 Clazz_defineMethod (c$, "paint", 
31949 function (g) {
31950 this.getContentPane ().paint (g);
31951 }, "java.awt.Graphics");
31952 Clazz_overrideMethod (c$, "update", 
31953 function (g) {
31954 this.paint (g);
31955 }, "java.awt.Graphics");
31956 Clazz_defineMethod (c$, "setJMenuBar", 
31957 function (menuBar) {
31958 this.getRootPane ().setMenuBar (menuBar);
31959 }, "javax.swing.JMenuBar");
31960 Clazz_defineMethod (c$, "getJMenuBar", 
31961 function () {
31962 return this.getRootPane ().getMenuBar ();
31963 });
31964 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
31965 function () {
31966 return this.rootPaneCheckingEnabled;
31967 });
31968 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
31969 function (enabled) {
31970 this.rootPaneCheckingEnabled = enabled;
31971 }, "~B");
31972 Clazz_overrideMethod (c$, "addImpl", 
31973 function (comp, constraints, index) {
31974 if (this.isRootPaneCheckingEnabled ()) {
31975 return this.getContentPane ().add (comp, constraints, index);
31976 }return this.addImplSAEM (comp, constraints, index);
31977 }, "java.awt.Component,~O,~N");
31978 Clazz_defineMethod (c$, "remove", 
31979 function (comp) {
31980 if (comp === this.rootPane) {
31981 this.removeChild (comp);
31982 } else {
31983 this.getContentPane ().removeChild (comp);
31984 }}, "java.awt.Component");
31985 Clazz_defineMethod (c$, "setLayout", 
31986 function (manager) {
31987 if (this.isRootPaneCheckingEnabled ()) {
31988 this.getContentPane ().setLayout (manager);
31989 } else {
31990 Clazz_superCall (this, javax.swing.JApplet, "setLayout", [manager]);
31991 }}, "java.awt.LayoutManager");
31992 Clazz_overrideMethod (c$, "getRootPane", 
31993 function () {
31994 return this.rootPane;
31995 });
31996 Clazz_defineMethod (c$, "setRootPane", 
31997 function (root) {
31998 if (this.rootPane != null) {
31999 this.remove (this.rootPane);
32000 }this.rootPane = root;
32001 if (this.rootPane != null) {
32002 var checkingEnabled = this.isRootPaneCheckingEnabled ();
32003 try {
32004 this.setRootPaneCheckingEnabled (false);
32005 this.add (this.rootPane, "Center");
32006 } finally {
32007 this.setRootPaneCheckingEnabled (checkingEnabled);
32008 }
32009 }}, "javax.swing.JRootPane");
32010 Clazz_overrideMethod (c$, "getContentPane", 
32011 function () {
32012 return this.getRootPane ().getContentPane ();
32013 });
32014 Clazz_overrideMethod (c$, "setContentPane", 
32015 function (contentPane) {
32016 this.getRootPane ().setContentPane (contentPane);
32017 }, "java.awt.Container");
32018 Clazz_overrideMethod (c$, "getLayeredPane", 
32019 function () {
32020 return this.getRootPane ().getLayeredPane ();
32021 });
32022 Clazz_overrideMethod (c$, "setLayeredPane", 
32023 function (layeredPane) {
32024 this.getRootPane ().setLayeredPane (layeredPane);
32025 }, "javax.swing.JLayeredPane");
32026 Clazz_overrideMethod (c$, "getGlassPane", 
32027 function () {
32028 return this.getRootPane ().getGlassPane ();
32029 });
32030 Clazz_overrideMethod (c$, "setGlassPane", 
32031 function (glassPane) {
32032 this.getRootPane ().setGlassPane (glassPane);
32033 }, "java.awt.Component");
32034 Clazz_defineMethod (c$, "getGraphics", 
32035 function () {
32036 javax.swing.JComponent.getGraphicsInvoked (this);
32037 return Clazz_superCall (this, javax.swing.JApplet, "getGraphics", []);
32038 });
32039 Clazz_defineMethod (c$, "repaint", 
32040 function (time, x, y, width, height) {
32041 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
32042 System.out.println ("repaintNow " + this);
32043 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
32044 } else {
32045 Clazz_superCall (this, javax.swing.JApplet, "repaint", [time, x, y, width, height]);
32046 }}, "~N,~N,~N,~N,~N");
32047 Clazz_defineMethod (c$, "repaintNow", 
32048 function () {
32049 this.repaint (100, 0, 0, this.getWidth (), this.getHeight ());
32050 });
32051 Clazz_defineMethod (c$, "paramString", 
32052 function () {
32053 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
32054 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
32055 return Clazz_superCall (this, javax.swing.JApplet, "paramString", []) + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
32056 });
32057 });
32058 Clazz_declarePackage ("java.awt");
32059 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 () {
32060 c$ = Clazz_decorateAsClass (function () {
32061 this.queues = null;
32062 this.nextQueue = null;
32063 this.previousQueue = null;
32064 this.dispatchThread = null;
32065 this.threadGroup = null;
32066 this.mostRecentEventTime = 0;
32067 this.currentEvent = null;
32068 this.waitForID = 0;
32069 this.name = null;
32070 Clazz_instantialize (this, arguments);
32071 }, java.awt, "EventQueue");
32072 Clazz_prepareFields (c$, function () {
32073 this.queues =  new Array (4);
32074 this.threadGroup = Thread.currentThread ().getThreadGroup ();
32075 this.mostRecentEventTime = System.currentTimeMillis ();
32076 this.name = "AWT-EventQueue-" + java.awt.EventQueue.nextThreadNum ();
32077 });
32078 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
32079  function () {
32080 return java.awt.EventQueue.threadInitNumber++;
32081 });
32082 c$.noEvents = Clazz_defineMethod (c$, "noEvents", 
32083 function (eventQueue) {
32084 return eventQueue.noEvents ();
32085 }, "java.awt.EventQueue");
32086 c$.getNextQueue = Clazz_defineMethod (c$, "getNextQueue", 
32087 function (eventQueue) {
32088 return eventQueue.nextQueue;
32089 }, "java.awt.EventQueue");
32090 c$.removeSourceEvents = Clazz_defineMethod (c$, "removeSourceEvents", 
32091 function (eventQueue, source, removeAllEvents) {
32092 eventQueue.removeSourceEvents (source, removeAllEvents);
32093 }, "java.awt.EventQueue,~O,~B");
32094 Clazz_makeConstructor (c$, 
32095 function () {
32096 for (var i = 0; i < 4; i++) {
32097 this.queues[i] =  new java.awt.Queue ();
32098 }
32099 });
32100 Clazz_defineMethod (c$, "postEvent", 
32101 function (event) {
32102 jssun.awt.SunToolkit.flushPendingEvents ();
32103 this.postEventPrivate (event);
32104 }, "java.awt.AWTEvent");
32105 Clazz_defineMethod (c$, "postEventPrivate", 
32106 function (theEvent) {
32107 theEvent.isPosted = true;
32108 {
32109 if (this.dispatchThread == null && this.nextQueue == null) {
32110 if (theEvent.getSource () === jssun.awt.AWTAutoShutdown.getInstance ()) {
32111 return;
32112 } else {
32113 this.initDispatchThread ();
32114 }}if (this.nextQueue != null) {
32115 this.nextQueue.postEventPrivate (theEvent);
32116 return;
32117 }this.postEventNow (theEvent, java.awt.EventQueue.getPriority (theEvent));
32118 }}, "java.awt.AWTEvent");
32119 c$.getPriority = Clazz_defineMethod (c$, "getPriority", 
32120  function (theEvent) {
32121 if (Clazz_instanceOf (theEvent, jssun.awt.PeerEvent)) {
32122 var flags = (theEvent).getFlags ();
32123 if ((flags & 2) != 0) return 3;
32124 if ((flags & 1) != 0) return 2;
32125 if ((flags & 4) != 0) return 0;
32126 }switch (theEvent.getID ()) {
32127 case 1201:
32128 case 800:
32129 case 801:
32130 return 0;
32131 default:
32132 return 1;
32133 }
32134 }, "java.awt.AWTEvent");
32135 Clazz_defineMethod (c$, "postEventNow", 
32136  function (theEvent, priority) {
32137 if (this.coalesceEvent (theEvent, priority)) {
32138 return;
32139 }var newItem =  new java.awt.EventQueueItem (theEvent);
32140 this.cacheEQItem (newItem);
32141 if (this.queues[priority].head == null) {
32142 var shouldNotify = this.noEvents ();
32143 this.queues[priority].head = this.queues[priority].tail = newItem;
32144 if (shouldNotify) {
32145 if (theEvent.getSource () !== jssun.awt.AWTAutoShutdown.getInstance ()) {
32146 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (this.dispatchThread);
32147 }}} else {
32148 this.queues[priority].tail.next = newItem;
32149 this.queues[priority].tail = newItem;
32150 }}, "java.awt.AWTEvent,~N");
32151 Clazz_defineMethod (c$, "coalescePaintEvent", 
32152  function (e) {
32153 var sourcePeer = (e.getSource ()).peer;
32154 if (sourcePeer != null) {
32155 sourcePeer.coalescePaintEvent (e);
32156 }var cache = (e.getSource ()).eventCache;
32157 if (cache == null) {
32158 return false;
32159 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32160 if (index != -1 && cache[index] != null) {
32161 var merged = this.mergePaintEvents (e, cache[index].event);
32162 if (merged != null) {
32163 cache[index].event = merged;
32164 return true;
32165 }}return false;
32166 }, "java.awt.event.PaintEvent");
32167 Clazz_defineMethod (c$, "mergePaintEvents", 
32168  function (a, b) {
32169 var aRect = a.getUpdateRect ();
32170 var bRect = b.getUpdateRect ();
32171 if (bRect.contains (aRect)) {
32172 return b;
32173 }if (aRect.contains (bRect)) {
32174 return a;
32175 }return null;
32176 }, "java.awt.event.PaintEvent,java.awt.event.PaintEvent");
32177 Clazz_defineMethod (c$, "coalesceMouseEvent", 
32178  function (e) {
32179 var cache = (e.getSource ()).eventCache;
32180 if (cache == null) {
32181 return false;
32182 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32183 if (index != -1 && cache[index] != null) {
32184 cache[index].event = e;
32185 return true;
32186 }return false;
32187 }, "java.awt.event.MouseEvent");
32188 Clazz_defineMethod (c$, "coalescePeerEvent", 
32189  function (e) {
32190 var cache = (e.getSource ()).eventCache;
32191 if (cache == null) {
32192 return false;
32193 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32194 if (index != -1 && cache[index] != null) {
32195 e = e.coalesceEvents (cache[index].event);
32196 if (e != null) {
32197 cache[index].event = e;
32198 return true;
32199 } else {
32200 cache[index] = null;
32201 }}return false;
32202 }, "jssun.awt.PeerEvent");
32203 Clazz_defineMethod (c$, "coalesceOtherEvent", 
32204  function (e, priority) {
32205 var id = e.getID ();
32206 var source = e.getSource ();
32207 for (var entry = this.queues[priority].head; entry != null; entry = entry.next) {
32208 if (entry.event.getSource () === source && entry.id == id) {
32209 var coalescedEvent = source.coalesceEvents (entry.event, e);
32210 if (coalescedEvent != null) {
32211 entry.event = coalescedEvent;
32212 return true;
32213 }}}
32214 return false;
32215 }, "java.awt.AWTEvent,~N");
32216 Clazz_defineMethod (c$, "coalesceEvent", 
32217  function (e, priority) {
32218 if (!(Clazz_instanceOf (e.getSource (), java.awt.Component))) {
32219 return false;
32220 }if (Clazz_instanceOf (e, jssun.awt.PeerEvent)) {
32221 return this.coalescePeerEvent (e);
32222 }if ((e.getSource ()).isCoalescingEnabled () && this.coalesceOtherEvent (e, priority)) {
32223 return true;
32224 }if (Clazz_instanceOf (e, java.awt.event.PaintEvent)) {
32225 return this.coalescePaintEvent (e);
32226 }if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
32227 return this.coalesceMouseEvent (e);
32228 }return false;
32229 }, "java.awt.AWTEvent,~N");
32230 Clazz_defineMethod (c$, "cacheEQItem", 
32231  function (entry) {
32232 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32233 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32234 var source = entry.event.getSource ();
32235 if (source.eventCache == null) {
32236 source.eventCache =  new Array (5);
32237 }source.eventCache[index] = entry;
32238 }}, "java.awt.EventQueueItem");
32239 Clazz_defineMethod (c$, "uncacheEQItem", 
32240  function (entry) {
32241 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32242 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32243 var source = entry.event.getSource ();
32244 if (source.eventCache == null) {
32245 return;
32246 }source.eventCache[index] = null;
32247 }}, "java.awt.EventQueueItem");
32248 c$.eventToCacheIndex = Clazz_defineMethod (c$, "eventToCacheIndex", 
32249  function (e) {
32250 switch (e.getID ()) {
32251 case 800:
32252 return 0;
32253 case 801:
32254 return 1;
32255 case 503:
32256 return 2;
32257 case 506:
32258 return 3;
32259 default:
32260 return -1;
32261 }
32262 }, "java.awt.AWTEvent");
32263 Clazz_defineMethod (c$, "noEvents", 
32264  function () {
32265 for (var i = 0; i < 4; i++) {
32266 if (this.queues[i].head != null) {
32267 return false;
32268 }}
32269 return true;
32270 });
32271 Clazz_defineMethod (c$, "getNextEvent", 
32272 function () {
32273 jssun.awt.SunToolkit.flushPendingEvents ();
32274 {
32275 for (var i = 3; i >= 0; i--) {
32276 if (this.queues[i].head != null) {
32277 var entry = this.queues[i].head;
32278 this.queues[i].head = entry.next;
32279 if (entry.next == null) {
32280 this.queues[i].tail = null;
32281 }this.uncacheEQItem (entry);
32282 return entry.event;
32283 }}
32284 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this.dispatchThread);
32285 }return null;
32286 });
32287 Clazz_defineMethod (c$, "getNextEventForID", 
32288 function (id) {
32289 jssun.awt.SunToolkit.flushPendingEvents ();
32290 {
32291 for (var i = 0; i < 4; i++) {
32292 for (var entry = this.queues[i].head, prev = null; entry != null; prev = entry, entry = entry.next) {
32293 if (entry.id == id) {
32294 if (prev == null) {
32295 this.queues[i].head = entry.next;
32296 } else {
32297 prev.next = entry.next;
32298 }if (this.queues[i].tail === entry) {
32299 this.queues[i].tail = prev;
32300 }this.uncacheEQItem (entry);
32301 return entry.event;
32302 }}
32303 }
32304 this.waitForID = id;
32305 this.waitForID = 0;
32306 }return null;
32307 }, "~N");
32308 Clazz_defineMethod (c$, "peekEvent", 
32309 function () {
32310 for (var i = 3; i >= 0; i--) {
32311 if (this.queues[i].head != null) {
32312 return this.queues[i].head.event;
32313 }}
32314 return null;
32315 });
32316 Clazz_defineMethod (c$, "peekEvent", 
32317 function (id) {
32318 for (var i = 3; i >= 0; i--) {
32319 var q = this.queues[i].head;
32320 for (; q != null; q = q.next) {
32321 if (q.id == id) {
32322 return q.event;
32323 }}
32324 }
32325 return null;
32326 }, "~N");
32327 Clazz_defineMethod (c$, "dispatchEvent", 
32328 function (event) {
32329 var src = event.getSource ();
32330 this.dispatchEventImpl (event, src, false);
32331 }, "java.awt.AWTEvent");
32332 Clazz_defineMethod (c$, "dispatchEventAndWait", 
32333 function (event, src) {
32334 this.dispatchEventImpl (event, src, true);
32335 }, "java.awt.AWTEvent,~O");
32336 Clazz_defineMethod (c$, "dispatchEventImpl", 
32337  function (event, src, andWait) {
32338 event.isPosted = true;
32339 if (Clazz_instanceOf (event, java.awt.ActiveEvent)) {
32340 this.setCurrentEventAndMostRecentTimeImpl (event);
32341 swingjs.JSToolkit.dispatchEvent (event, null, andWait);
32342 } else if (Clazz_instanceOf (src, java.awt.Component)) {
32343 swingjs.JSToolkit.dispatchEvent (event, src, andWait);
32344 event.dispatched ();
32345 } else if (Clazz_instanceOf (src, jssun.awt.AWTAutoShutdown)) {
32346 if (this.noEvents ()) {
32347 this.dispatchThread.stopDispatching ();
32348 }} else {
32349 System.err.println ("unable to dispatch event: " + event);
32350 }}, "java.awt.AWTEvent,~O,~B");
32351 c$.getMostRecentEventTime = Clazz_defineMethod (c$, "getMostRecentEventTime", 
32352 function () {
32353 return 0;
32354 });
32355 Clazz_defineMethod (c$, "getMostRecentEventTimeEx", 
32356 function () {
32357 return this.mostRecentEventTime;
32358 });
32359 c$.getCurrentEvent = Clazz_defineMethod (c$, "getCurrentEvent", 
32360 function () {
32361 return java.awt.Toolkit.getEventQueue ().getCurrentEventImpl ();
32362 });
32363 Clazz_defineMethod (c$, "getCurrentEventImpl", 
32364  function () {
32365 return (swingjs.JSToolkit.isDispatchThread () ? (this.currentEvent) : null);
32366 });
32367 Clazz_defineMethod (c$, "push", 
32368 function (newEventQueue) {
32369 if (this.nextQueue != null) {
32370 this.nextQueue.push (newEventQueue);
32371 return;
32372 }{
32373 while (this.peekEvent () != null) {
32374 try {
32375 newEventQueue.postEventPrivate (this.getNextEvent ());
32376 } catch (ie) {
32377 if (Clazz_exceptionOf (ie, InterruptedException)) {
32378 } else {
32379 throw ie;
32380 }
32381 }
32382 }
32383 newEventQueue.previousQueue = this;
32384 }if (this.dispatchThread != null) {
32385 this.dispatchThread.stopDispatchingLater ();
32386 }this.nextQueue = newEventQueue;
32387 var appContext = jssun.awt.AppContext.getAppContext ();
32388 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32389 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, newEventQueue);
32390 }}, "java.awt.EventQueue");
32391 Clazz_defineMethod (c$, "pop", 
32392 function () {
32393 var prev = this.previousQueue;
32394 {
32395 {
32396 if (this.nextQueue != null) {
32397 this.nextQueue.pop ();
32398 return;
32399 }if (this.previousQueue == null) {
32400 throw  new java.util.EmptyStackException ();
32401 }this.previousQueue.nextQueue = null;
32402 while (this.peekEvent () != null) {
32403 try {
32404 this.previousQueue.postEventPrivate (this.getNextEvent ());
32405 } catch (ie) {
32406 if (Clazz_exceptionOf (ie, InterruptedException)) {
32407 } else {
32408 throw ie;
32409 }
32410 }
32411 }
32412 var appContext = jssun.awt.AppContext.getAppContext ();
32413 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32414 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, this.previousQueue);
32415 }this.previousQueue = null;
32416 }}var dt = this.dispatchThread;
32417 if (dt != null) {
32418 dt.stopDispatching ();
32419 }});
32420 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
32421 function () {
32422 return swingjs.JSToolkit.isDispatchThread ();
32423 });
32424 Clazz_defineMethod (c$, "initDispatchThread", 
32425 function () {
32426 {
32427 if (this.dispatchThread == null) {
32428 var t =  new java.awt.EventDispatchThread (this.threadGroup, this.name, this);
32429 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (t);
32430 this.dispatchThread = t;
32431 this.dispatchThread.start ();
32432 }}});
32433 Clazz_defineMethod (c$, "detachDispatchThread", 
32434 function () {
32435 this.dispatchThread = null;
32436 });
32437 Clazz_defineMethod (c$, "getDispatchThread", 
32438 function () {
32439 return this.dispatchThread;
32440 });
32441 Clazz_defineMethod (c$, "removeSourceEvents", 
32442 function (source, removeAllEvents) {
32443 jssun.awt.SunToolkit.flushPendingEvents ();
32444 {
32445 for (var i = 0; i < 4; i++) {
32446 var entry = this.queues[i].head;
32447 var prev = null;
32448 while (entry != null) {
32449 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)))) {
32450 if (Clazz_instanceOf (entry.event, java.awt.SequencedEvent)) {
32451 (entry.event).dispose ();
32452 }if (Clazz_instanceOf (entry.event, java.awt.SentEvent)) {
32453 (entry.event).dispose ();
32454 }if (prev == null) {
32455 this.queues[i].head = entry.next;
32456 } else {
32457 prev.next = entry.next;
32458 }this.uncacheEQItem (entry);
32459 } else {
32460 prev = entry;
32461 }entry = entry.next;
32462 }
32463 this.queues[i].tail = prev;
32464 }
32465 }}, "~O,~B");
32466 c$.setCurrentEventAndMostRecentTime = Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTime", 
32467 function (e) {
32468 java.awt.Toolkit.getEventQueue ().setCurrentEventAndMostRecentTimeImpl (e);
32469 }, "java.awt.AWTEvent");
32470 Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTimeImpl", 
32471  function (e) {
32472 if (swingjs.JSToolkit.isDispatchThread ()) {
32473 return;
32474 }this.currentEvent = e;
32475 var mostRecentEventTime2 = -9223372036854775808;
32476 if (Clazz_instanceOf (e, java.awt.event.InputEvent)) {
32477 var ie = e;
32478 mostRecentEventTime2 = ie.getWhen ();
32479 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
32480 var ime = e;
32481 mostRecentEventTime2 = ime.getWhen ();
32482 } else if (Clazz_instanceOf (e, java.awt.event.ActionEvent)) {
32483 var ae = e;
32484 mostRecentEventTime2 = ae.getWhen ();
32485 } else if (Clazz_instanceOf (e, java.awt.event.InvocationEvent)) {
32486 var ie = e;
32487 mostRecentEventTime2 = ie.getWhen ();
32488 }this.mostRecentEventTime = Math.max (this.mostRecentEventTime, mostRecentEventTime2);
32489 }, "java.awt.AWTEvent");
32490 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
32491 function (runnable) {
32492 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), runnable));
32493 }, "Runnable");
32494 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
32495 function (runnable) {
32496 java.awt.EventQueue.invokeAndWaitStatic (java.awt.Toolkit.getDefaultToolkit (), runnable);
32497 }, "Runnable");
32498 c$.invokeAndWaitStatic = Clazz_defineMethod (c$, "invokeAndWaitStatic", 
32499  function (source, runnable) {
32500 if (java.awt.EventQueue.isDispatchThread ()) {
32501 throw  new Error ("Cannot call invokeAndWait from the event dispatcher thread");
32502 }var event =  new java.awt.event.InvocationEvent (source, runnable, null, true);
32503 swingjs.JSToolkit.dispatchEvent (event, null, true);
32504 var eventThrowable = event.getThrowable ();
32505 if (eventThrowable != null) {
32506 throw  new java.lang.reflect.InvocationTargetException (eventThrowable);
32507 }}, "~O,Runnable");
32508 Clazz_defineMethod (c$, "wakeup", 
32509 function (isShutdown) {
32510 {
32511 if (this.nextQueue != null) {
32512 this.nextQueue.wakeup (isShutdown);
32513 } else if (this.dispatchThread != null) {
32514 try {
32515 this.dispatchThread.start ();
32516 } catch (e) {
32517 if (Clazz_exceptionOf (e, IllegalThreadStateException)) {
32518 this.dispatchThread.run ();
32519 } else {
32520 throw e;
32521 }
32522 }
32523 } else if (!isShutdown) {
32524 this.initDispatchThread ();
32525 }}}, "~B");
32526 Clazz_defineStatics (c$,
32527 "threadInitNumber", 0,
32528 "LOW_PRIORITY", 0,
32529 "NORM_PRIORITY", 1,
32530 "HIGH_PRIORITY", 2,
32531 "ULTIMATE_PRIORITY", 3,
32532 "NUM_PRIORITIES", 4,
32533 "PAINT", 0,
32534 "UPDATE", 1,
32535 "MOVE", 2,
32536 "DRAG", 3,
32537 "PEER", 4,
32538 "CACHE_LENGTH", 5);
32539 c$ = Clazz_decorateAsClass (function () {
32540 this.head = null;
32541 this.tail = null;
32542 Clazz_instantialize (this, arguments);
32543 }, java.awt, "Queue");
32544 c$ = Clazz_decorateAsClass (function () {
32545 this.event = null;
32546 this.id = 0;
32547 this.next = null;
32548 Clazz_instantialize (this, arguments);
32549 }, java.awt, "EventQueueItem");
32550 Clazz_makeConstructor (c$, 
32551 function (evt) {
32552 this.event = evt;
32553 this.id = evt.getID ();
32554 }, "java.awt.AWTEvent");
32555 });
32556 Clazz_declarePackage ("java.awt");
32557 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 () {
32558 c$ = Clazz_decorateAsClass (function () {
32559 this.a = null;
32560 this.b = null;
32561 Clazz_instantialize (this, arguments);
32562 }, 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]);
32563 Clazz_makeConstructor (c$, 
32564 function (a, b) {
32565 this.a = a;
32566 this.b = b;
32567 }, "java.util.EventListener,java.util.EventListener");
32568 Clazz_defineMethod (c$, "remove", 
32569 function (oldl) {
32570 if (oldl === this.a) return this.b;
32571 if (oldl === this.b) return this.a;
32572 var a2 = java.awt.AWTEventMulticaster.removeInternal (this.a, oldl);
32573 var b2 = java.awt.AWTEventMulticaster.removeInternal (this.b, oldl);
32574 if (a2 === this.a && b2 === this.b) {
32575 return this;
32576 }return java.awt.AWTEventMulticaster.addInternal (a2, b2);
32577 }, "java.util.EventListener");
32578 Clazz_defineMethod (c$, "componentResized", 
32579 function (e) {
32580 (this.a).componentResized (e);
32581 (this.b).componentResized (e);
32582 }, "java.awt.event.ComponentEvent");
32583 Clazz_defineMethod (c$, "componentMoved", 
32584 function (e) {
32585 (this.a).componentMoved (e);
32586 (this.b).componentMoved (e);
32587 }, "java.awt.event.ComponentEvent");
32588 Clazz_defineMethod (c$, "componentShown", 
32589 function (e) {
32590 (this.a).componentShown (e);
32591 (this.b).componentShown (e);
32592 }, "java.awt.event.ComponentEvent");
32593 Clazz_defineMethod (c$, "componentHidden", 
32594 function (e) {
32595 (this.a).componentHidden (e);
32596 (this.b).componentHidden (e);
32597 }, "java.awt.event.ComponentEvent");
32598 Clazz_defineMethod (c$, "componentAdded", 
32599 function (e) {
32600 (this.a).componentAdded (e);
32601 (this.b).componentAdded (e);
32602 }, "java.awt.event.ContainerEvent");
32603 Clazz_defineMethod (c$, "componentRemoved", 
32604 function (e) {
32605 (this.a).componentRemoved (e);
32606 (this.b).componentRemoved (e);
32607 }, "java.awt.event.ContainerEvent");
32608 Clazz_defineMethod (c$, "focusGained", 
32609 function (e) {
32610 (this.a).focusGained (e);
32611 (this.b).focusGained (e);
32612 }, "java.awt.event.FocusEvent");
32613 Clazz_defineMethod (c$, "focusLost", 
32614 function (e) {
32615 (this.a).focusLost (e);
32616 (this.b).focusLost (e);
32617 }, "java.awt.event.FocusEvent");
32618 Clazz_defineMethod (c$, "keyTyped", 
32619 function (e) {
32620 (this.a).keyTyped (e);
32621 (this.b).keyTyped (e);
32622 }, "java.awt.event.KeyEvent");
32623 Clazz_defineMethod (c$, "keyPressed", 
32624 function (e) {
32625 (this.a).keyPressed (e);
32626 (this.b).keyPressed (e);
32627 }, "java.awt.event.KeyEvent");
32628 Clazz_defineMethod (c$, "keyReleased", 
32629 function (e) {
32630 (this.a).keyReleased (e);
32631 (this.b).keyReleased (e);
32632 }, "java.awt.event.KeyEvent");
32633 Clazz_defineMethod (c$, "mouseClicked", 
32634 function (e) {
32635 (this.a).mouseClicked (e);
32636 (this.b).mouseClicked (e);
32637 }, "java.awt.event.MouseEvent");
32638 Clazz_defineMethod (c$, "mousePressed", 
32639 function (e) {
32640 (this.a).mousePressed (e);
32641 (this.b).mousePressed (e);
32642 }, "java.awt.event.MouseEvent");
32643 Clazz_defineMethod (c$, "mouseReleased", 
32644 function (e) {
32645 (this.a).mouseReleased (e);
32646 (this.b).mouseReleased (e);
32647 }, "java.awt.event.MouseEvent");
32648 Clazz_defineMethod (c$, "mouseEntered", 
32649 function (e) {
32650 (this.a).mouseEntered (e);
32651 (this.b).mouseEntered (e);
32652 }, "java.awt.event.MouseEvent");
32653 Clazz_defineMethod (c$, "mouseExited", 
32654 function (e) {
32655 (this.a).mouseExited (e);
32656 (this.b).mouseExited (e);
32657 }, "java.awt.event.MouseEvent");
32658 Clazz_defineMethod (c$, "mouseDragged", 
32659 function (e) {
32660 (this.a).mouseDragged (e);
32661 (this.b).mouseDragged (e);
32662 }, "java.awt.event.MouseEvent");
32663 Clazz_defineMethod (c$, "mouseMoved", 
32664 function (e) {
32665 (this.a).mouseMoved (e);
32666 (this.b).mouseMoved (e);
32667 }, "java.awt.event.MouseEvent");
32668 Clazz_defineMethod (c$, "windowOpened", 
32669 function (e) {
32670 (this.a).windowOpened (e);
32671 (this.b).windowOpened (e);
32672 }, "java.awt.event.WindowEvent");
32673 Clazz_defineMethod (c$, "windowClosing", 
32674 function (e) {
32675 (this.a).windowClosing (e);
32676 (this.b).windowClosing (e);
32677 }, "java.awt.event.WindowEvent");
32678 Clazz_defineMethod (c$, "windowClosed", 
32679 function (e) {
32680 (this.a).windowClosed (e);
32681 (this.b).windowClosed (e);
32682 }, "java.awt.event.WindowEvent");
32683 Clazz_defineMethod (c$, "windowIconified", 
32684 function (e) {
32685 (this.a).windowIconified (e);
32686 (this.b).windowIconified (e);
32687 }, "java.awt.event.WindowEvent");
32688 Clazz_defineMethod (c$, "windowDeiconified", 
32689 function (e) {
32690 (this.a).windowDeiconified (e);
32691 (this.b).windowDeiconified (e);
32692 }, "java.awt.event.WindowEvent");
32693 Clazz_defineMethod (c$, "windowActivated", 
32694 function (e) {
32695 (this.a).windowActivated (e);
32696 (this.b).windowActivated (e);
32697 }, "java.awt.event.WindowEvent");
32698 Clazz_defineMethod (c$, "windowDeactivated", 
32699 function (e) {
32700 (this.a).windowDeactivated (e);
32701 (this.b).windowDeactivated (e);
32702 }, "java.awt.event.WindowEvent");
32703 Clazz_defineMethod (c$, "windowStateChanged", 
32704 function (e) {
32705 (this.a).windowStateChanged (e);
32706 (this.b).windowStateChanged (e);
32707 }, "java.awt.event.WindowEvent");
32708 Clazz_defineMethod (c$, "windowGainedFocus", 
32709 function (e) {
32710 (this.a).windowGainedFocus (e);
32711 (this.b).windowGainedFocus (e);
32712 }, "java.awt.event.WindowEvent");
32713 Clazz_defineMethod (c$, "windowLostFocus", 
32714 function (e) {
32715 (this.a).windowLostFocus (e);
32716 (this.b).windowLostFocus (e);
32717 }, "java.awt.event.WindowEvent");
32718 Clazz_defineMethod (c$, "actionPerformed", 
32719 function (e) {
32720 (this.a).actionPerformed (e);
32721 (this.b).actionPerformed (e);
32722 }, "java.awt.event.ActionEvent");
32723 Clazz_defineMethod (c$, "itemStateChanged", 
32724 function (e) {
32725 (this.a).itemStateChanged (e);
32726 (this.b).itemStateChanged (e);
32727 }, "java.awt.event.ItemEvent");
32728 Clazz_defineMethod (c$, "adjustmentValueChanged", 
32729 function (e) {
32730 (this.a).adjustmentValueChanged (e);
32731 (this.b).adjustmentValueChanged (e);
32732 }, "java.awt.event.AdjustmentEvent");
32733 Clazz_defineMethod (c$, "textValueChanged", 
32734 function (e) {
32735 (this.a).textValueChanged (e);
32736 (this.b).textValueChanged (e);
32737 }, "java.awt.event.TextEvent");
32738 Clazz_defineMethod (c$, "inputMethodTextChanged", 
32739 function (e) {
32740 (this.a).inputMethodTextChanged (e);
32741 (this.b).inputMethodTextChanged (e);
32742 }, "java.awt.event.InputMethodEvent");
32743 Clazz_defineMethod (c$, "caretPositionChanged", 
32744 function (e) {
32745 (this.a).caretPositionChanged (e);
32746 (this.b).caretPositionChanged (e);
32747 }, "java.awt.event.InputMethodEvent");
32748 Clazz_defineMethod (c$, "hierarchyChanged", 
32749 function (e) {
32750 (this.a).hierarchyChanged (e);
32751 (this.b).hierarchyChanged (e);
32752 }, "java.awt.event.HierarchyEvent");
32753 Clazz_defineMethod (c$, "ancestorMoved", 
32754 function (e) {
32755 (this.a).ancestorMoved (e);
32756 (this.b).ancestorMoved (e);
32757 }, "java.awt.event.HierarchyEvent");
32758 Clazz_defineMethod (c$, "ancestorResized", 
32759 function (e) {
32760 (this.a).ancestorResized (e);
32761 (this.b).ancestorResized (e);
32762 }, "java.awt.event.HierarchyEvent");
32763 Clazz_defineMethod (c$, "mouseWheelMoved", 
32764 function (e) {
32765 (this.a).mouseWheelMoved (e);
32766 (this.b).mouseWheelMoved (e);
32767 }, "java.awt.event.MouseWheelEvent");
32768 c$.add = Clazz_defineMethod (c$, "add", 
32769 function (a, b) {
32770 return java.awt.AWTEventMulticaster.addInternal (a, b);
32771 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32772 c$.add = Clazz_defineMethod (c$, "add", 
32773 function (a, b) {
32774 return java.awt.AWTEventMulticaster.addInternal (a, b);
32775 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32776 c$.add = Clazz_defineMethod (c$, "add", 
32777 function (a, b) {
32778 return java.awt.AWTEventMulticaster.addInternal (a, b);
32779 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32780 c$.add = Clazz_defineMethod (c$, "add", 
32781 function (a, b) {
32782 return java.awt.AWTEventMulticaster.addInternal (a, b);
32783 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32784 c$.add = Clazz_defineMethod (c$, "add", 
32785 function (a, b) {
32786 return java.awt.AWTEventMulticaster.addInternal (a, b);
32787 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32788 c$.add = Clazz_defineMethod (c$, "add", 
32789 function (a, b) {
32790 return java.awt.AWTEventMulticaster.addInternal (a, b);
32791 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32792 c$.add = Clazz_defineMethod (c$, "add", 
32793 function (a, b) {
32794 return java.awt.AWTEventMulticaster.addInternal (a, b);
32795 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32796 c$.add = Clazz_defineMethod (c$, "add", 
32797 function (a, b) {
32798 return java.awt.AWTEventMulticaster.addInternal (a, b);
32799 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32800 c$.add = Clazz_defineMethod (c$, "add", 
32801 function (a, b) {
32802 return java.awt.AWTEventMulticaster.addInternal (a, b);
32803 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32804 c$.add = Clazz_defineMethod (c$, "add", 
32805 function (a, b) {
32806 return java.awt.AWTEventMulticaster.addInternal (a, b);
32807 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32808 c$.add = Clazz_defineMethod (c$, "add", 
32809 function (a, b) {
32810 return java.awt.AWTEventMulticaster.addInternal (a, b);
32811 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32812 c$.add = Clazz_defineMethod (c$, "add", 
32813 function (a, b) {
32814 return java.awt.AWTEventMulticaster.addInternal (a, b);
32815 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32816 c$.add = Clazz_defineMethod (c$, "add", 
32817 function (a, b) {
32818 return java.awt.AWTEventMulticaster.addInternal (a, b);
32819 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32820 c$.add = Clazz_defineMethod (c$, "add", 
32821 function (a, b) {
32822 return java.awt.AWTEventMulticaster.addInternal (a, b);
32823 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32824 c$.add = Clazz_defineMethod (c$, "add", 
32825 function (a, b) {
32826 return java.awt.AWTEventMulticaster.addInternal (a, b);
32827 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32828 c$.add = Clazz_defineMethod (c$, "add", 
32829 function (a, b) {
32830 return java.awt.AWTEventMulticaster.addInternal (a, b);
32831 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32832 c$.add = Clazz_defineMethod (c$, "add", 
32833 function (a, b) {
32834 return java.awt.AWTEventMulticaster.addInternal (a, b);
32835 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32836 c$.remove = Clazz_defineMethod (c$, "remove", 
32837 function (l, oldl) {
32838 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32839 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32840 c$.remove = Clazz_defineMethod (c$, "remove", 
32841 function (l, oldl) {
32842 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32843 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32844 c$.remove = Clazz_defineMethod (c$, "remove", 
32845 function (l, oldl) {
32846 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32847 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32848 c$.remove = Clazz_defineMethod (c$, "remove", 
32849 function (l, oldl) {
32850 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32851 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32852 c$.remove = Clazz_defineMethod (c$, "remove", 
32853 function (l, oldl) {
32854 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32855 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32856 c$.remove = Clazz_defineMethod (c$, "remove", 
32857 function (l, oldl) {
32858 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32859 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32860 c$.remove = Clazz_defineMethod (c$, "remove", 
32861 function (l, oldl) {
32862 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32863 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32864 c$.remove = Clazz_defineMethod (c$, "remove", 
32865 function (l, oldl) {
32866 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32867 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32868 c$.remove = Clazz_defineMethod (c$, "remove", 
32869 function (l, oldl) {
32870 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32871 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32872 c$.remove = Clazz_defineMethod (c$, "remove", 
32873 function (l, oldl) {
32874 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32875 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32876 c$.remove = Clazz_defineMethod (c$, "remove", 
32877 function (l, oldl) {
32878 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32879 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32880 c$.remove = Clazz_defineMethod (c$, "remove", 
32881 function (l, oldl) {
32882 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32883 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32884 c$.remove = Clazz_defineMethod (c$, "remove", 
32885 function (l, oldl) {
32886 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32887 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32888 c$.remove = Clazz_defineMethod (c$, "remove", 
32889 function (l, oldl) {
32890 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32891 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32892 c$.remove = Clazz_defineMethod (c$, "remove", 
32893 function (l, oldl) {
32894 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32895 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32896 c$.remove = Clazz_defineMethod (c$, "remove", 
32897 function (l, oldl) {
32898 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32899 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32900 c$.remove = Clazz_defineMethod (c$, "remove", 
32901 function (l, oldl) {
32902 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32903 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32904 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
32905 function (a, b) {
32906 if (a == null) return b;
32907 if (b == null) return a;
32908 return  new java.awt.AWTEventMulticaster (a, b);
32909 }, "java.util.EventListener,java.util.EventListener");
32910 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
32911 function (l, oldl) {
32912 if (l === oldl || l == null) {
32913 return null;
32914 } else if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32915 return (l).remove (oldl);
32916 } else {
32917 return l;
32918 }}, "java.util.EventListener,java.util.EventListener");
32919 c$.getListenerCount = Clazz_defineMethod (c$, "getListenerCount", 
32920  function (l, listenerType) {
32921 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32922 var mc = l;
32923 return java.awt.AWTEventMulticaster.getListenerCount (mc.a, listenerType) + java.awt.AWTEventMulticaster.getListenerCount (mc.b, listenerType);
32924 } else {
32925 return listenerType.isInstance (l) ? 1 : 0;
32926 }}, "java.util.EventListener,Class");
32927 c$.populateListenerArray = Clazz_defineMethod (c$, "populateListenerArray", 
32928  function (a, l, index) {
32929 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32930 var mc = l;
32931 var lhs = java.awt.AWTEventMulticaster.populateListenerArray (a, mc.a, index);
32932 return java.awt.AWTEventMulticaster.populateListenerArray (a, mc.b, lhs);
32933 } else if (a.getClass ().getComponentType ().isInstance (l)) {
32934 a[index] = l;
32935 return index + 1;
32936 } else {
32937 return index;
32938 }}, "~A,java.util.EventListener,~N");
32939 c$.getListeners = Clazz_defineMethod (c$, "getListeners", 
32940 function (l, listenerType) {
32941 if (listenerType == null) {
32942 throw  new NullPointerException ("Listener type should not be null");
32943 }var n = java.awt.AWTEventMulticaster.getListenerCount (l, listenerType);
32944 var result = java.lang.reflect.Array.newInstance (listenerType, n);
32945 java.awt.AWTEventMulticaster.populateListenerArray (result, l, 0);
32946 return result;
32947 }, "java.util.EventListener,Class");
32948 });
32949 Clazz_declarePackage ("java.awt");
32950 Clazz_load (["java.util.EventObject"], "java.awt.AWTEvent", ["java.awt.Component", "java.awt.peer.LightweightPeer"], function () {
32951 c$ = Clazz_decorateAsClass (function () {
32952 this.bdata = null;
32953 this.id = 0;
32954 this.num = 0;
32955 this.consumed = false;
32956 this.focusManagerIsDispatching = false;
32957 this.isPosted = false;
32958 Clazz_instantialize (this, arguments);
32959 }, java.awt, "AWTEvent", java.util.EventObject);
32960 Clazz_makeConstructor (c$, 
32961 function (event) {
32962 this.construct (event.target, event.id);
32963 }, "java.awt.Event");
32964 Clazz_makeConstructor (c$, 
32965 function (source, id) {
32966 Clazz_superConstructor (this, java.awt.AWTEvent, [source]);
32967 this.id = id;
32968 this.num = ++java.awt.AWTEvent.idnum;
32969 switch (id) {
32970 case 1001:
32971 case 701:
32972 case 601:
32973 case 900:
32974 this.consumed = true;
32975 break;
32976 default:
32977 }
32978 }, "~O,~N");
32979 Clazz_defineMethod (c$, "setSource", 
32980 function (newSource) {
32981 if (this.source === newSource) {
32982 return;
32983 }var comp = null;
32984 if (Clazz_instanceOf (newSource, java.awt.Component)) {
32985 comp = newSource;
32986 while (comp != null && comp.peer != null && (Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer))) {
32987 comp = comp.parent;
32988 }
32989 }this.source = newSource;
32990 }, "~O");
32991 Clazz_defineMethod (c$, "getID", 
32992 function () {
32993 return this.id;
32994 });
32995 Clazz_overrideMethod (c$, "toString", 
32996 function () {
32997 var srcName = null;
32998 if (Clazz_instanceOf (this.source, java.awt.Component)) {
32999 srcName = (this.source).getName ();
33000 }return this.getClass ().getName () + "[" + this.paramString () + "] on " + (srcName != null ? srcName : this.source);
33001 });
33002 Clazz_defineMethod (c$, "paramString", 
33003 function () {
33004 return "";
33005 });
33006 Clazz_defineMethod (c$, "consume", 
33007 function () {
33008 switch (this.id) {
33009 case 401:
33010 case 402:
33011 case 501:
33012 case 502:
33013 case 503:
33014 case 506:
33015 case 504:
33016 case 505:
33017 case 507:
33018 case 1100:
33019 case 1101:
33020 this.consumed = true;
33021 break;
33022 default:
33023 }
33024 });
33025 Clazz_defineMethod (c$, "isConsumed", 
33026 function () {
33027 return this.consumed;
33028 });
33029 Clazz_defineMethod (c$, "copyPrivateDataInto", 
33030 function (that) {
33031 that.bdata = this.bdata;
33032 }, "java.awt.AWTEvent");
33033 Clazz_defineMethod (c$, "dispatched", 
33034 function () {
33035 });
33036 Clazz_defineStatics (c$,
33037 "idnum", 0,
33038 "COMPONENT_EVENT_MASK", 0x01,
33039 "CONTAINER_EVENT_MASK", 0x02,
33040 "FOCUS_EVENT_MASK", 0x04,
33041 "KEY_EVENT_MASK", 0x08,
33042 "MOUSE_EVENT_MASK", 0x10,
33043 "MOUSE_MOTION_EVENT_MASK", 0x20,
33044 "WINDOW_EVENT_MASK", 0x40,
33045 "ACTION_EVENT_MASK", 0x80,
33046 "ADJUSTMENT_EVENT_MASK", 0x100,
33047 "ITEM_EVENT_MASK", 0x200,
33048 "TEXT_EVENT_MASK", 0x400,
33049 "INPUT_METHOD_EVENT_MASK", 0x800,
33050 "INPUT_METHODS_ENABLED_MASK", 0x1000,
33051 "PAINT_EVENT_MASK", 0x2000,
33052 "INVOCATION_EVENT_MASK", 0x4000,
33053 "HIERARCHY_EVENT_MASK", 0x8000,
33054 "HIERARCHY_BOUNDS_EVENT_MASK", 0x10000,
33055 "MOUSE_WHEEL_EVENT_MASK", 0x20000,
33056 "WINDOW_STATE_EVENT_MASK", 0x40000,
33057 "WINDOW_FOCUS_EVENT_MASK", 0x80000,
33058 "RESERVED_ID_MAX", 1999);
33059 });
33060 Clazz_declarePackage ("java.awt.event");
33061 Clazz_load (["java.util.EventListener"], "java.awt.event.AWTEventListener", null, function () {
33062 Clazz_declareInterface (java.awt.event, "AWTEventListener", java.util.EventListener);
33063 });
33064 Clazz_declarePackage ("java.awt");
33065 Clazz_declareInterface (java.awt, "ActiveEvent");
33066 Clazz_declarePackage ("java.awt.event");
33067 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.event.InvocationEvent", ["java.lang.Exception"], function () {
33068 c$ = Clazz_decorateAsClass (function () {
33069 this.runnable = null;
33070 this.notifier = null;
33071 this.catchExceptions = false;
33072 this.exception = null;
33073 this.throwable = null;
33074 this.when = 0;
33075 Clazz_instantialize (this, arguments);
33076 }, java.awt.event, "InvocationEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
33077 Clazz_makeConstructor (c$, 
33078 function (source, runnable) {
33079 this.construct (source, runnable, null, false);
33080 }, "~O,Runnable");
33081 Clazz_makeConstructor (c$, 
33082 function (source, runnable, notifier, catchThrowables) {
33083 this.construct (source, 1200, runnable, notifier, catchThrowables);
33084 }, "~O,Runnable,~O,~B");
33085 Clazz_makeConstructor (c$, 
33086 function (source, id, runnable, notifier, catchThrowables) {
33087 Clazz_superConstructor (this, java.awt.event.InvocationEvent, [source, id]);
33088 this.runnable = runnable;
33089 this.notifier = notifier;
33090 this.catchExceptions = catchThrowables;
33091 this.when = System.currentTimeMillis ();
33092 }, "~O,~N,Runnable,~O,~B");
33093 Clazz_overrideMethod (c$, "dispatch", 
33094 function () {
33095 if (this.catchExceptions) {
33096 try {
33097 this.runnable.run ();
33098 } catch (t) {
33099 if (Clazz_instanceOf (t, Exception)) {
33100 this.exception = t;
33101 }this.throwable = t;
33102 }
33103 } else {
33104 this.runnable.run ();
33105 }if (this.notifier != null) {
33106 {
33107 this.notifier.notifyAll ();
33108 }}});
33109 Clazz_defineMethod (c$, "getException", 
33110 function () {
33111 return (this.catchExceptions) ? this.exception : null;
33112 });
33113 Clazz_defineMethod (c$, "getThrowable", 
33114 function () {
33115 return (this.catchExceptions) ? this.throwable : null;
33116 });
33117 Clazz_defineMethod (c$, "getWhen", 
33118 function () {
33119 return this.when;
33120 });
33121 Clazz_overrideMethod (c$, "paramString", 
33122 function () {
33123 var typeStr;
33124 switch (this.id) {
33125 case 1200:
33126 typeStr = "INVOCATION_DEFAULT";
33127 break;
33128 default:
33129 typeStr = "unknown type";
33130 }
33131 return typeStr + ",runnable=" + this.runnable + ",notifier=" + this.notifier + ",catchExceptions=" + this.catchExceptions + ",when=" + this.when;
33132 });
33133 Clazz_defineStatics (c$,
33134 "SWINGJS_INVOCATION_LOW", 1201,
33135 "INVOCATION_FIRST", 1200,
33136 "INVOCATION_DEFAULT", 1200,
33137 "INVOCATION_LAST", 1201);
33138 });
33139 Clazz_declarePackage ("java.awt.event");
33140 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ComponentEvent", ["java.awt.Component"], function () {
33141 c$ = Clazz_declareType (java.awt.event, "ComponentEvent", java.awt.AWTEvent);
33142 Clazz_defineMethod (c$, "getComponent", 
33143 function () {
33144 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
33145 });
33146 Clazz_overrideMethod (c$, "paramString", 
33147 function () {
33148 var typeStr;
33149 var b = (this.source != null ? (this.source).getBounds () : null);
33150 switch (this.id) {
33151 case 102:
33152 typeStr = "COMPONENT_SHOWN";
33153 break;
33154 case 103:
33155 typeStr = "COMPONENT_HIDDEN";
33156 break;
33157 case 100:
33158 typeStr = "COMPONENT_MOVED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33159 break;
33160 case 101:
33161 typeStr = "COMPONENT_RESIZED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33162 break;
33163 default:
33164 typeStr = "unknown type";
33165 }
33166 return typeStr;
33167 });
33168 Clazz_defineStatics (c$,
33169 "COMPONENT_FIRST", 100,
33170 "COMPONENT_LAST", 103,
33171 "COMPONENT_MOVED", 100,
33172 "COMPONENT_RESIZED", 101,
33173 "COMPONENT_SHOWN", 102,
33174 "COMPONENT_HIDDEN", 103);
33175 });
33176 Clazz_declarePackage ("java.awt.event");
33177 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.MouseEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Point", "$.Toolkit"], function () {
33178 c$ = Clazz_decorateAsClass (function () {
33179 this.x = 0;
33180 this.y = 0;
33181 this.xAbs = 0;
33182 this.yAbs = 0;
33183 this.clickCount = 0;
33184 this.button = 0;
33185 this.popupTrigger = false;
33186 Clazz_instantialize (this, arguments);
33187 }, java.awt.event, "MouseEvent", java.awt.event.InputEvent);
33188 Clazz_defineMethod (c$, "getLocationOnScreen", 
33189 function () {
33190 return  new java.awt.Point (this.xAbs, this.yAbs);
33191 });
33192 Clazz_defineMethod (c$, "getXOnScreen", 
33193 function () {
33194 return this.xAbs;
33195 });
33196 Clazz_defineMethod (c$, "getYOnScreen", 
33197 function () {
33198 return this.yAbs;
33199 });
33200 Clazz_makeConstructor (c$, 
33201 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, button) {
33202 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, button);
33203 var eventLocationOnScreen =  new java.awt.Point (0, 0);
33204 try {
33205 eventLocationOnScreen = source.getLocationOnScreen ();
33206 this.xAbs = eventLocationOnScreen.x + x;
33207 this.yAbs = eventLocationOnScreen.y + y;
33208 } catch (e) {
33209 if (Clazz_exceptionOf (e, java.awt.IllegalComponentStateException)) {
33210 this.xAbs = 0;
33211 this.yAbs = 0;
33212 } else {
33213 throw e;
33214 }
33215 }
33216 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N");
33217 Clazz_makeConstructor (c$, 
33218 function (source, id, when, modifiers, x, y, clickCount, popupTrigger) {
33219 this.construct (source, id, when, modifiers, x, y, clickCount, popupTrigger, 0);
33220 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B");
33221 Clazz_makeConstructor (c$, 
33222 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, button) {
33223 Clazz_superConstructor (this, java.awt.event.MouseEvent, [source, id, when, modifiers]);
33224 this.x = x;
33225 this.y = y;
33226 this.xAbs = xAbs;
33227 this.yAbs = yAbs;
33228 this.clickCount = clickCount;
33229 this.popupTrigger = popupTrigger;
33230 if (button < 0 || button > 3) {
33231 throw  new IllegalArgumentException ("Invalid button value");
33232 }this.button = button;
33233 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
33234 this.setNewModifiers ();
33235 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0 || button != 0)) {
33236 this.setOldModifiers ();
33237 }}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N");
33238 Clazz_defineMethod (c$, "getX", 
33239 function () {
33240 return this.x;
33241 });
33242 Clazz_defineMethod (c$, "getY", 
33243 function () {
33244 return this.y;
33245 });
33246 Clazz_defineMethod (c$, "getPoint", 
33247 function () {
33248 var x;
33249 var y;
33250 {
33251 x = this.x;
33252 y = this.y;
33253 }return  new java.awt.Point (x, y);
33254 });
33255 Clazz_defineMethod (c$, "translatePoint", 
33256 function (x, y) {
33257 this.x += x;
33258 this.y += y;
33259 }, "~N,~N");
33260 Clazz_defineMethod (c$, "getClickCount", 
33261 function () {
33262 return this.clickCount;
33263 });
33264 Clazz_defineMethod (c$, "getButton", 
33265 function () {
33266 return this.button;
33267 });
33268 Clazz_defineMethod (c$, "isPopupTrigger", 
33269 function () {
33270 return this.popupTrigger;
33271 });
33272 c$.getMouseModifiersText = Clazz_defineMethod (c$, "getMouseModifiersText", 
33273 function (modifiers) {
33274 var buf =  new StringBuilder ();
33275 if ((modifiers & 8) != 0) {
33276 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33277 buf.append ("+");
33278 }if ((modifiers & 4) != 0) {
33279 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33280 buf.append ("+");
33281 }if ((modifiers & 2) != 0) {
33282 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33283 buf.append ("+");
33284 }if ((modifiers & 1) != 0) {
33285 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33286 buf.append ("+");
33287 }if ((modifiers & 32) != 0) {
33288 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33289 buf.append ("+");
33290 }if ((modifiers & 16) != 0) {
33291 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33292 buf.append ("+");
33293 }if ((modifiers & 8) != 0) {
33294 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33295 buf.append ("+");
33296 }if ((modifiers & 4) != 0) {
33297 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33298 buf.append ("+");
33299 }if (buf.length () > 0) {
33300 buf.setLength (buf.length () - 1);
33301 }return buf.toString ();
33302 }, "~N");
33303 Clazz_overrideMethod (c$, "paramString", 
33304 function () {
33305 var str =  new StringBuilder (80);
33306 str.append (java.awt.event.MouseEvent.getIdString (this.id));
33307 str.append (",(" + this.x).append ("," + this.y).append ("," + this.when).append (")");
33308 str.append (",absolute(").append ("" + this.xAbs).append (",").append ("" + this.yAbs).append (")");
33309 str.append (",button=").append ("" + this.getButton ());
33310 if (this.getModifiers () != 0) {
33311 str.append (",modifiers=").append (java.awt.event.MouseEvent.getMouseModifiersText (this.modifiers));
33312 }if (this.getModifiersEx () != 0) {
33313 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
33314 }str.append (",clickCount=").append ("" + this.clickCount);
33315 return str.toString ();
33316 });
33317 c$.getIdString = Clazz_defineMethod (c$, "getIdString", 
33318 function (id) {
33319 switch (id) {
33320 case 501:
33321 return "MOUSE_PRESSED";
33322 case 502:
33323 return "MOUSE_RELEASED";
33324 case 500:
33325 return "MOUSE_CLICKED";
33326 case 504:
33327 return "MOUSE_ENTERED";
33328 case 505:
33329 return "MOUSE_EXITED";
33330 case 503:
33331 return "MOUSE_MOVED";
33332 case 506:
33333 return "MOUSE_DRAGGED";
33334 case 507:
33335 return "MOUSE_WHEEL";
33336 default:
33337 return "unknown type";
33338 }
33339 }, "~N");
33340 Clazz_defineMethod (c$, "setNewModifiers", 
33341  function () {
33342 if ((this.modifiers & 16) != 0) {
33343 this.modifiers |= 1024;
33344 }if ((this.modifiers & 8) != 0) {
33345 this.modifiers |= 2048;
33346 }if ((this.modifiers & 4) != 0) {
33347 this.modifiers |= 4096;
33348 }if (this.id == 501 || this.id == 502 || this.id == 500) {
33349 if ((this.modifiers & 16) != 0) {
33350 this.button = 1;
33351 this.modifiers &= -13;
33352 if (this.id != 501) {
33353 this.modifiers &= -1025;
33354 }} else if ((this.modifiers & 8) != 0) {
33355 this.button = 2;
33356 this.modifiers &= -21;
33357 if (this.id != 501) {
33358 this.modifiers &= -2049;
33359 }} else if ((this.modifiers & 4) != 0) {
33360 this.button = 3;
33361 this.modifiers &= -25;
33362 if (this.id != 501) {
33363 this.modifiers &= -4097;
33364 }}}if ((this.modifiers & 8) != 0) {
33365 this.modifiers |= 512;
33366 }if ((this.modifiers & 4) != 0) {
33367 this.modifiers |= 256;
33368 }if ((this.modifiers & 1) != 0) {
33369 this.modifiers |= 64;
33370 }if ((this.modifiers & 2) != 0) {
33371 this.modifiers |= 128;
33372 }if ((this.modifiers & 32) != 0) {
33373 this.modifiers |= 8192;
33374 }});
33375 Clazz_defineMethod (c$, "setOldModifiers", 
33376  function () {
33377 if (this.id == 501 || this.id == 502 || this.id == 500) {
33378 switch (this.button) {
33379 case 1:
33380 this.modifiers |= 16;
33381 break;
33382 case 2:
33383 this.modifiers |= 8;
33384 break;
33385 case 3:
33386 this.modifiers |= 4;
33387 break;
33388 }
33389 } else {
33390 if ((this.modifiers & 1024) != 0) {
33391 this.modifiers |= 16;
33392 }if ((this.modifiers & 2048) != 0) {
33393 this.modifiers |= 8;
33394 }if ((this.modifiers & 4096) != 0) {
33395 this.modifiers |= 4;
33396 }}if ((this.modifiers & 512) != 0) {
33397 this.modifiers |= 8;
33398 }if ((this.modifiers & 256) != 0) {
33399 this.modifiers |= 4;
33400 }if ((this.modifiers & 64) != 0) {
33401 this.modifiers |= 1;
33402 }if ((this.modifiers & 128) != 0) {
33403 this.modifiers |= 2;
33404 }if ((this.modifiers & 8192) != 0) {
33405 this.modifiers |= 32;
33406 }});
33407 Clazz_defineStatics (c$,
33408 "MOUSE_FIRST", 500,
33409 "MOUSE_LAST", 507,
33410 "MOUSE_CLICKED", 500,
33411 "MOUSE_PRESSED", 501,
33412 "MOUSE_RELEASED", 502,
33413 "MOUSE_MOVED", 503,
33414 "MOUSE_ENTERED", 504,
33415 "MOUSE_EXITED", 505,
33416 "MOUSE_DRAGGED", 506,
33417 "MOUSE_WHEEL", 507,
33418 "NOBUTTON", 0,
33419 "BUTTON1", 1,
33420 "BUTTON2", 2,
33421 "BUTTON3", 3);
33422 });
33423 Clazz_declarePackage ("java.awt.event");
33424 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.InputEvent", ["java.lang.StringBuilder", "java.awt.Toolkit"], function () {
33425 c$ = Clazz_decorateAsClass (function () {
33426 this.when = 0;
33427 this.modifiers = 0;
33428 this.canAccessSystemClipboard = false;
33429 Clazz_instantialize (this, arguments);
33430 }, java.awt.event, "InputEvent", java.awt.event.ComponentEvent);
33431 Clazz_makeConstructor (c$, 
33432 function (source, id, when, modifiers) {
33433 Clazz_superConstructor (this, java.awt.event.InputEvent, [source, id]);
33434 this.when = when;
33435 this.modifiers = modifiers;
33436 this.canAccessSystemClipboard = false;
33437 }, "java.awt.Component,~N,~N,~N");
33438 Clazz_defineMethod (c$, "isShiftDown", 
33439 function () {
33440 return (this.modifiers & 1) != 0;
33441 });
33442 Clazz_defineMethod (c$, "isControlDown", 
33443 function () {
33444 return (this.modifiers & 2) != 0;
33445 });
33446 Clazz_defineMethod (c$, "isMetaDown", 
33447 function () {
33448 return (this.modifiers & 4) != 0;
33449 });
33450 Clazz_defineMethod (c$, "isAltDown", 
33451 function () {
33452 return (this.modifiers & 8) != 0;
33453 });
33454 Clazz_defineMethod (c$, "isAltGraphDown", 
33455 function () {
33456 return (this.modifiers & 32) != 0;
33457 });
33458 Clazz_defineMethod (c$, "getWhen", 
33459 function () {
33460 return this.when;
33461 });
33462 Clazz_defineMethod (c$, "getModifiers", 
33463 function () {
33464 return this.modifiers & (-16321);
33465 });
33466 Clazz_defineMethod (c$, "getModifiersEx", 
33467 function () {
33468 return this.modifiers & -64;
33469 });
33470 Clazz_overrideMethod (c$, "consume", 
33471 function () {
33472 this.consumed = true;
33473 });
33474 Clazz_overrideMethod (c$, "isConsumed", 
33475 function () {
33476 return this.consumed;
33477 });
33478 c$.getModifiersExText = Clazz_defineMethod (c$, "getModifiersExText", 
33479 function (modifiers) {
33480 var buf =  new StringBuilder ();
33481 if ((modifiers & 256) != 0) {
33482 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33483 buf.append ("+");
33484 }if ((modifiers & 128) != 0) {
33485 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33486 buf.append ("+");
33487 }if ((modifiers & 512) != 0) {
33488 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33489 buf.append ("+");
33490 }if ((modifiers & 64) != 0) {
33491 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33492 buf.append ("+");
33493 }if ((modifiers & 8192) != 0) {
33494 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33495 buf.append ("+");
33496 }if ((modifiers & 1024) != 0) {
33497 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33498 buf.append ("+");
33499 }if ((modifiers & 2048) != 0) {
33500 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33501 buf.append ("+");
33502 }if ((modifiers & 4096) != 0) {
33503 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33504 buf.append ("+");
33505 }if (buf.length () > 0) {
33506 buf.setLength (buf.length () - 1);
33507 }return buf.toString ();
33508 }, "~N");
33509 Clazz_defineStatics (c$,
33510 "SHIFT_MASK", 1,
33511 "CTRL_MASK", 2,
33512 "META_MASK", 4,
33513 "ALT_MASK", 8,
33514 "ALT_GRAPH_MASK", 32,
33515 "BUTTON1_MASK", 16,
33516 "BUTTON2_MASK", 8,
33517 "BUTTON3_MASK", 4,
33518 "SHIFT_DOWN_MASK", 64,
33519 "CTRL_DOWN_MASK", 128,
33520 "META_DOWN_MASK", 256,
33521 "ALT_DOWN_MASK", 512,
33522 "BUTTON1_DOWN_MASK", 1024,
33523 "BUTTON2_DOWN_MASK", 2048,
33524 "BUTTON3_DOWN_MASK", 4096,
33525 "ALT_GRAPH_DOWN_MASK", 8192,
33526 "FIRST_HIGH_BIT", 16384,
33527 "JDK_1_3_MODIFIERS", 63,
33528 "HIGH_MODIFIERS", -16384);
33529 });
33530 Clazz_declarePackage ("java.awt");
33531 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 () {
33532 c$ = Clazz_decorateAsClass (function () {
33533 this.desktopProperties = null;
33534 this.desktopPropsSupport = null;
33535 this.calls = null;
33536 this.eventListener = null;
33537 this.listener2SelectiveListener = null;
33538 if (!Clazz_isClassDefined ("java.awt.Toolkit.SelectiveAWTEventListener")) {
33539 java.awt.Toolkit.$Toolkit$SelectiveAWTEventListener$ ();
33540 }
33541 Clazz_instantialize (this, arguments);
33542 }, java.awt, "Toolkit");
33543 Clazz_prepareFields (c$, function () {
33544 this.desktopProperties =  new java.util.HashMap ();
33545 this.desktopPropsSupport = java.awt.Toolkit.createPropertyChangeSupport (this);
33546 this.calls =  Clazz_newIntArray (32, 0);
33547 this.listener2SelectiveListener =  new java.util.HashMap ();
33548 });
33549 Clazz_defineMethod (c$, "createComponent", 
33550 function (target) {
33551 if (java.awt.Toolkit.lightweightMarker == null) {
33552 java.awt.Toolkit.lightweightMarker =  new jssun.awt.NullComponentPeer ();
33553 }return java.awt.Toolkit.lightweightMarker;
33554 }, "java.awt.Component");
33555 Clazz_defineMethod (c$, "loadSystemColors", 
33556 function (systemColors) {
33557 }, "~A");
33558 Clazz_defineMethod (c$, "setDynamicLayout", 
33559 function (dynamic) {
33560 }, "~B");
33561 Clazz_defineMethod (c$, "isDynamicLayoutSet", 
33562 function () {
33563 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33564 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutSet ();
33565 } else {
33566 return false;
33567 }});
33568 Clazz_defineMethod (c$, "isDynamicLayoutActive", 
33569 function () {
33570 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33571 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutActive ();
33572 } else {
33573 return false;
33574 }});
33575 Clazz_defineMethod (c$, "getScreenInsets", 
33576 function (gc) {
33577 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33578 return java.awt.Toolkit.getDefaultToolkit ().getScreenInsets (gc);
33579 } else {
33580 return  new java.awt.Insets (0, 0, 0, 0);
33581 }}, "java.awt.GraphicsConfiguration");
33582 c$.getDefaultToolkit = Clazz_defineMethod (c$, "getDefaultToolkit", 
33583 function () {
33584 return (java.awt.Toolkit.toolkit == null ? java.awt.Toolkit.toolkit =  new swingjs.JSToolkit () : java.awt.Toolkit.toolkit);
33585 });
33586 Clazz_defineMethod (c$, "createImage", 
33587 function (imagedata) {
33588 return this.createImage (imagedata, 0, imagedata.length);
33589 }, "~A");
33590 Clazz_defineMethod (c$, "getMenuShortcutKeyMask", 
33591 function () {
33592 return 2;
33593 });
33594 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
33595 function (c) {
33596 return null;
33597 }, "java.awt.Component");
33598 Clazz_defineMethod (c$, "createCustomCursor", 
33599 function (cursor, hotSpot, name) {
33600 return  new java.awt.Cursor (0);
33601 }, "java.awt.Image,java.awt.Point,~S");
33602 Clazz_defineMethod (c$, "isFrameStateSupported", 
33603 function (state) {
33604 return (state == 0);
33605 }, "~N");
33606 c$.getProperty = Clazz_defineMethod (c$, "getProperty", 
33607 function (key, defaultValue) {
33608 if (java.awt.Toolkit.resources != null) {
33609 try {
33610 return java.awt.Toolkit.resources.getString (key);
33611 } catch (e) {
33612 if (Clazz_exceptionOf (e, java.util.MissingResourceException)) {
33613 } else {
33614 throw e;
33615 }
33616 }
33617 }return defaultValue;
33618 }, "~S,~S");
33619 Clazz_defineMethod (c$, "getSystemEventQueue", 
33620 function () {
33621 return this.getSystemEventQueueImpl ();
33622 });
33623 c$.getEventQueue = Clazz_defineMethod (c$, "getEventQueue", 
33624 function () {
33625 return java.awt.Toolkit.getDefaultToolkit ().getSystemEventQueueImpl ();
33626 });
33627 Clazz_defineMethod (c$, "getDesktopProperty", 
33628 function (propertyName) {
33629 if (this.desktopProperties.isEmpty ()) {
33630 this.initializeDesktopProperties ();
33631 }var value;
33632 if (propertyName.equals ("awt.dynamicLayoutSupported")) {
33633 value = this.lazilyLoadDesktopProperty (propertyName);
33634 return value;
33635 }value = this.desktopProperties.get (propertyName);
33636 if (value == null) {
33637 value = this.lazilyLoadDesktopProperty (propertyName);
33638 if (value != null) {
33639 this.setDesktopProperty (propertyName, value);
33640 }}if (Clazz_instanceOf (value, java.awt.RenderingHints)) {
33641 value = (value).clone ();
33642 }return value;
33643 }, "~S");
33644 Clazz_defineMethod (c$, "setDesktopProperty", 
33645 function (name, newValue) {
33646 var oldValue;
33647 {
33648 oldValue = this.desktopProperties.get (name);
33649 this.desktopProperties.put (name, newValue);
33650 }this.desktopPropsSupport.firePropertyChange (name, oldValue, newValue);
33651 }, "~S,~O");
33652 Clazz_defineMethod (c$, "lazilyLoadDesktopProperty", 
33653 function (name) {
33654 return null;
33655 }, "~S");
33656 Clazz_defineMethod (c$, "initializeDesktopProperties", 
33657 function () {
33658 });
33659 Clazz_defineMethod (c$, "addPropertyChangeListener", 
33660 function (name, pcl) {
33661 this.desktopPropsSupport.addPropertyChangeListener (name, pcl);
33662 }, "~S,java.beans.PropertyChangeListener");
33663 Clazz_defineMethod (c$, "removePropertyChangeListener", 
33664 function (name, pcl) {
33665 this.desktopPropsSupport.removePropertyChangeListener (name, pcl);
33666 }, "~S,java.beans.PropertyChangeListener");
33667 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33668 function () {
33669 return this.desktopPropsSupport.getPropertyChangeListeners ();
33670 });
33671 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33672 function (propertyName) {
33673 return this.desktopPropsSupport.getPropertyChangeListeners (propertyName);
33674 }, "~S");
33675 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
33676 function () {
33677 return true;
33678 });
33679 c$.deProxyAWTEventListener = Clazz_defineMethod (c$, "deProxyAWTEventListener", 
33680  function (l) {
33681 var localL = l;
33682 if (localL == null) {
33683 return null;
33684 }if (Clazz_instanceOf (l, java.awt.event.AWTEventListenerProxy)) {
33685 localL = (l).getListener ();
33686 }return localL;
33687 }, "java.awt.event.AWTEventListener");
33688 Clazz_defineMethod (c$, "addAWTEventListener", 
33689 function (listener, eventMask) {
33690 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33691 if (localL == null) {
33692 return;
33693 }{
33694 var selectiveListener = this.listener2SelectiveListener.get (localL);
33695 if (selectiveListener == null) {
33696 selectiveListener = Clazz_innerTypeInstance (java.awt.Toolkit.SelectiveAWTEventListener, this, null, localL, eventMask);
33697 this.listener2SelectiveListener.put (localL, selectiveListener);
33698 this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.add (this.eventListener, selectiveListener);
33699 }selectiveListener.orEventMasks (eventMask);
33700 java.awt.Toolkit.enabledOnToolkitMask |= eventMask;
33701 var mask = eventMask;
33702 for (var i = 0; i < 32; i++) {
33703 if (mask == 0) {
33704 break;
33705 }if ((mask & 1) != 0) {
33706 this.calls[i]++;
33707 }mask >>>= 1;
33708 }
33709 }}, "java.awt.event.AWTEventListener,~N");
33710 Clazz_defineMethod (c$, "removeAWTEventListener", 
33711 function (listener) {
33712 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33713 if (listener == null) {
33714 return;
33715 }{
33716 var selectiveListener = this.listener2SelectiveListener.get (localL);
33717 if (selectiveListener != null) {
33718 this.listener2SelectiveListener.remove (localL);
33719 var listenerCalls = selectiveListener.getCalls ();
33720 for (var i = 0; i < 32; i++) {
33721 this.calls[i] -= listenerCalls[i];
33722 if (this.calls[i] == 0) {
33723 java.awt.Toolkit.enabledOnToolkitMask &= ~(1 << i);
33724 }}
33725 }this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.remove (this.eventListener, (selectiveListener == null) ? localL : selectiveListener);
33726 }}, "java.awt.event.AWTEventListener");
33727 c$.enabledOnToolkit = Clazz_defineMethod (c$, "enabledOnToolkit", 
33728 function (eventMask) {
33729 return (java.awt.Toolkit.enabledOnToolkitMask & eventMask) != 0;
33730 }, "~N");
33731 Clazz_defineMethod (c$, "countAWTEventListeners", 
33732 function (eventMask) {
33733 var ci = 0;
33734 for (; eventMask != 0; eventMask >>>= 1, ci++) {
33735 }
33736 ci--;
33737 return this.calls[ci];
33738 }, "~N");
33739 Clazz_defineMethod (c$, "getAWTEventListeners", 
33740 function () {
33741 {
33742 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33743 var ret =  new Array (la.length);
33744 for (var i = 0; i < la.length; i++) {
33745 var sael = la[i];
33746 var tempL = sael.getListener ();
33747 ret[i] =  new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), tempL);
33748 }
33749 return ret;
33750 }});
33751 Clazz_defineMethod (c$, "getAWTEventListeners", 
33752 function (eventMask) {
33753 {
33754 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33755 var list =  new java.util.ArrayList (la.length);
33756 for (var i = 0; i < la.length; i++) {
33757 var sael = la[i];
33758 if ((sael.getEventMask () & eventMask) == eventMask) {
33759 list.add ( new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), sael.getListener ()));
33760 }}
33761 return list.toArray ( new Array (0));
33762 }}, "~N");
33763 Clazz_defineMethod (c$, "notifyAWTEventListeners", 
33764 function (theEvent) {
33765 var eventListener = this.eventListener;
33766 if (eventListener != null) {
33767 eventListener.eventDispatched (theEvent);
33768 }}, "java.awt.AWTEvent");
33769 c$.createPropertyChangeSupport = Clazz_defineMethod (c$, "createPropertyChangeSupport", 
33770  function (toolkit) {
33771 return  new java.beans.PropertyChangeSupport (toolkit);
33772 }, "java.awt.Toolkit");
33773 c$.$Toolkit$SelectiveAWTEventListener$ = function () {
33774 Clazz_pu$h(self.c$);
33775 c$ = Clazz_decorateAsClass (function () {
33776 Clazz_prepareCallback (this, arguments);
33777 this.listener = null;
33778 this.eventMask = 0;
33779 this.calls = null;
33780 Clazz_instantialize (this, arguments);
33781 }, java.awt.Toolkit, "SelectiveAWTEventListener", null, java.awt.event.AWTEventListener);
33782 Clazz_prepareFields (c$, function () {
33783 this.calls =  Clazz_newIntArray (32, 0);
33784 });
33785 Clazz_defineMethod (c$, "getListener", 
33786 function () {
33787 return this.listener;
33788 });
33789 Clazz_defineMethod (c$, "getEventMask", 
33790 function () {
33791 return this.eventMask;
33792 });
33793 Clazz_defineMethod (c$, "getCalls", 
33794 function () {
33795 return this.calls;
33796 });
33797 Clazz_defineMethod (c$, "orEventMasks", 
33798 function (a) {
33799 this.eventMask |= a;
33800 for (var b = 0; b < 32; b++) {
33801 if (a == 0) {
33802 break;
33803 }if ((a & 1) != 0) {
33804 this.calls[b]++;
33805 }a >>>= 1;
33806 }
33807 }, "~N");
33808 Clazz_makeConstructor (c$, 
33809 function (a, b) {
33810 this.listener = a;
33811 this.eventMask = b;
33812 }, "java.awt.event.AWTEventListener,~N");
33813 Clazz_defineMethod (c$, "eventDispatched", 
33814 function (a) {
33815 var b = 0;
33816 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))) {
33817 var c = 0;
33818 for (var d = b; d != 0; d >>>= 1, c++) {
33819 }
33820 c--;
33821 for (var e = 0; e < this.calls[c]; e++) {
33822 this.listener.eventDispatched (a);
33823 }
33824 }}, "java.awt.AWTEvent");
33825 c$ = Clazz_p0p ();
33826 };
33827 Clazz_pu$h(self.c$);
33828 c$ = Clazz_declareType (java.awt.Toolkit, "ToolkitEventMulticaster", java.awt.AWTEventMulticaster, java.awt.event.AWTEventListener);
33829 c$.add = Clazz_defineMethod (c$, "add", 
33830 function (a, b) {
33831 if (a == null) return b;
33832 if (b == null) return a;
33833 return  new java.awt.Toolkit.ToolkitEventMulticaster (a, b);
33834 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33835 c$.remove = Clazz_defineMethod (c$, "remove", 
33836 function (a, b) {
33837 return java.awt.AWTEventMulticaster.removeInternal (a, b);
33838 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33839 Clazz_defineMethod (c$, "remove", 
33840 function (a) {
33841 if (a === this.a) return this.b;
33842 if (a === this.b) return this.a;
33843 var b = java.awt.AWTEventMulticaster.removeInternal (this.a, a);
33844 var c = java.awt.AWTEventMulticaster.removeInternal (this.b, a);
33845 if (b === this.a && c === this.b) {
33846 return this;
33847 }return java.awt.Toolkit.ToolkitEventMulticaster.add (b, c);
33848 }, "java.util.EventListener");
33849 Clazz_defineMethod (c$, "eventDispatched", 
33850 function (a) {
33851 (this.a).eventDispatched (a);
33852 (this.b).eventDispatched (a);
33853 }, "java.awt.AWTEvent");
33854 c$ = Clazz_p0p ();
33855 Clazz_defineStatics (c$,
33856 "lightweightMarker", null,
33857 "toolkit", null,
33858 "resources", null,
33859 "LONG_BITS", 32,
33860 "enabledOnToolkitMask", 0);
33861 });
33862 Clazz_declarePackage ("java.lang");
33863 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 () {
33864 c$ = Clazz_decorateAsClass (function () {
33865 this.name = null;
33866 this.priority = 5;
33867 this.daemon = false;
33868 this.target = null;
33869 this.group = null;
33870 this.tid = 0;
33871 this.threadStatus = 0;
33872 this.parkBlocker = null;
33873 this.stopBeforeStart = false;
33874 this.throwableFromStop = null;
33875 this.me = null;
33876 this.uncaughtExceptionHandler = null;
33877 this.$interrupted = false;
33878 this.stopped = false;
33879 Clazz_instantialize (this, arguments);
33880 }, java.lang, "Thread", null, Runnable);
33881 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
33882  function () {
33883 return java.lang.Thread.threadInitNumber++;
33884 });
33885 c$.nextThreadID = Clazz_defineMethod (c$, "nextThreadID", 
33886  function () {
33887 return ++java.lang.Thread.threadSeqNumber;
33888 });
33889 c$.currentThread = Clazz_defineMethod (c$, "currentThread", 
33890 function () {
33891 if (java.lang.Thread.thisThread == null) {
33892 java.lang.Thread.thisThread =  new java.lang.Thread ("master");
33893 java.lang.Thread.thisThread.setPriority (5);
33894 }return java.lang.Thread.thisThread;
33895 });
33896 c$.yield = Clazz_defineMethod (c$, "yield", 
33897 function () {
33898 });
33899 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33900 function (millis) {
33901 }, "~N");
33902 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33903 function (millis, nanos) {
33904 if (millis < 0) {
33905 throw  new IllegalArgumentException ("timeout value is negative");
33906 }if (nanos < 0 || nanos > 999999) {
33907 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
33908 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
33909 millis++;
33910 }java.lang.Thread.sleep (millis);
33911 }, "~N,~N");
33912 Clazz_defineMethod (c$, "init", 
33913  function (g, target, name, stackSize) {
33914 this.init (g, target, name, stackSize, null);
33915 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33916 Clazz_defineMethod (c$, "init", 
33917  function (g, target, name, stackSize, acc) {
33918 var parent = (java.lang.Thread.thisThread == null ? null : java.lang.Thread.thisThread);
33919 if (g == null) {
33920 if (g == null && parent != null) {
33921 g = parent.getThreadGroup ();
33922 }}if (g == null) {
33923 g = this.newThreadGroup (null, name);
33924 parent = this;
33925 }g.checkAccess ();
33926 g.addUnstarted ();
33927 this.group = g;
33928 this.priority = parent.getPriority ();
33929 this.name = name;
33930 this.target = target;
33931 this.setPriority (this.priority);
33932 this.tid = java.lang.Thread.nextThreadID ();
33933 this.me = this;
33934 }, "java.lang.ThreadGroup,Runnable,~S,~N,~O");
33935 Clazz_defineMethod (c$, "newThreadGroup", 
33936 function (group, name) {
33937 return  new java.lang.ThreadGroup (group, name);
33938 }, "java.lang.ThreadGroup,~S");
33939 Clazz_makeConstructor (c$, 
33940 function () {
33941 this.init (null, null, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33942 });
33943 Clazz_makeConstructor (c$, 
33944 function (target) {
33945 this.init (null, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33946 }, "Runnable");
33947 Clazz_makeConstructor (c$, 
33948 function (group, target) {
33949 this.init (group, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33950 }, "java.lang.ThreadGroup,Runnable");
33951 Clazz_makeConstructor (c$, 
33952 function (name) {
33953 this.init (null, null, name, 0);
33954 }, "~S");
33955 Clazz_makeConstructor (c$, 
33956 function (group, name) {
33957 this.init (group, null, name, 0);
33958 }, "java.lang.ThreadGroup,~S");
33959 Clazz_makeConstructor (c$, 
33960 function (target, name) {
33961 this.init (null, target, name, 0);
33962 }, "Runnable,~S");
33963 Clazz_makeConstructor (c$, 
33964 function (group, target, name) {
33965 this.init (group, target, name, 0);
33966 }, "java.lang.ThreadGroup,Runnable,~S");
33967 Clazz_makeConstructor (c$, 
33968 function (group, target, name, stackSize) {
33969 this.init (group, target, name, stackSize);
33970 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33971 Clazz_defineMethod (c$, "start", 
33972 function () {
33973 if (this.threadStatus != 0 || this !== this.me) throw  new IllegalThreadStateException ();
33974 this.group.add (this);
33975 this.start0 ();
33976 if (this.stopBeforeStart) {
33977 this.stop0 (this.throwableFromStop);
33978 }});
33979 Clazz_defineMethod (c$, "start0", 
33980  function () {
33981 });
33982 Clazz_defineMethod (c$, "run", 
33983 function () {
33984 if (this.target != null) {
33985 this.target.run ();
33986 }});
33987 Clazz_defineMethod (c$, "stop", 
33988 function () {
33989 if ((this.threadStatus != 0) && !this.isAlive ()) {
33990 return;
33991 }this.stop1 ( new ThreadDeath ());
33992 });
33993 Clazz_defineMethod (c$, "stop", 
33994 function (obj) {
33995 this.stop1 (obj);
33996 }, "Throwable");
33997 Clazz_defineMethod (c$, "stop1", 
33998  function (th) {
33999 if (this.threadStatus != 0) {
34000 this.resume ();
34001 this.stop0 (th);
34002 } else {
34003 if (th == null) {
34004 throw  new NullPointerException ();
34005 }this.stopBeforeStart = true;
34006 this.throwableFromStop = th;
34007 }}, "Throwable");
34008 Clazz_defineMethod (c$, "interrupt", 
34009 function () {
34010 this.interrupt0 ();
34011 });
34012 c$.interrupted = Clazz_defineMethod (c$, "interrupted", 
34013 function () {
34014 return java.lang.Thread.currentThread ().isInterruptedB (true);
34015 });
34016 Clazz_defineMethod (c$, "isInterrupted", 
34017 function () {
34018 return this.isInterruptedB (false);
34019 });
34020 Clazz_defineMethod (c$, "isInterruptedB", 
34021  function (clearInterrupted) {
34022 var wasInt = this.$interrupted;
34023 if (clearInterrupted) this.$interrupted = false;
34024 return wasInt;
34025 }, "~B");
34026 Clazz_defineMethod (c$, "destroy", 
34027 function () {
34028 throw  new NoSuchMethodError ();
34029 });
34030 Clazz_defineMethod (c$, "isAlive", 
34031 function () {
34032 return true;
34033 });
34034 Clazz_defineMethod (c$, "suspend", 
34035 function () {
34036 this.checkAccess ();
34037 this.suspend0 ();
34038 });
34039 Clazz_defineMethod (c$, "resume", 
34040 function () {
34041 this.checkAccess ();
34042 this.resume0 ();
34043 });
34044 Clazz_defineMethod (c$, "setPriority", 
34045 function (newPriority) {
34046 var g;
34047 this.checkAccess ();
34048 if (newPriority > 10 || newPriority < 1) {
34049 throw  new IllegalArgumentException ();
34050 }if ((g = this.getThreadGroup ()) != null) {
34051 if (newPriority > g.getMaxPriority ()) {
34052 newPriority = g.getMaxPriority ();
34053 }this.setPriority0 (this.priority = newPriority);
34054 }}, "~N");
34055 Clazz_defineMethod (c$, "getPriority", 
34056 function () {
34057 return this.priority;
34058 });
34059 Clazz_defineMethod (c$, "setName", 
34060 function (name) {
34061 this.checkAccess ();
34062 this.name = name;
34063 }, "~S");
34064 Clazz_defineMethod (c$, "getName", 
34065 function () {
34066 return this.name;
34067 });
34068 Clazz_defineMethod (c$, "getThreadGroup", 
34069 function () {
34070 return this.group;
34071 });
34072 c$.activeCount = Clazz_defineMethod (c$, "activeCount", 
34073 function () {
34074 return java.lang.Thread.currentThread ().getThreadGroup ().activeCount ();
34075 });
34076 c$.enumerate = Clazz_defineMethod (c$, "enumerate", 
34077 function (tarray) {
34078 return java.lang.Thread.currentThread ().getThreadGroup ().enumerate (tarray);
34079 }, "~A");
34080 Clazz_defineMethod (c$, "countStackFrames", 
34081 function () {
34082 return 0;
34083 });
34084 Clazz_defineMethod (c$, "join", 
34085 function (millis) {
34086 var base = System.currentTimeMillis ();
34087 var now = 0;
34088 if (millis < 0) {
34089 throw  new IllegalArgumentException ("timeout value is negative");
34090 }swingjs.JSToolkit.warn ("Cannot wait in Thread");
34091 if (millis == 0) {
34092 while (this.isAlive ()) {
34093 this.wait (0);
34094 }
34095 } else {
34096 while (this.isAlive ()) {
34097 var delay = millis - now;
34098 if (delay <= 0) {
34099 break;
34100 }this.wait (delay);
34101 now = System.currentTimeMillis () - base;
34102 }
34103 }}, "~N");
34104 Clazz_defineMethod (c$, "join", 
34105 function (millis, nanos) {
34106 if (millis < 0) {
34107 throw  new IllegalArgumentException ("timeout value is negative");
34108 }if (nanos < 0 || nanos > 999999) {
34109 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
34110 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
34111 millis++;
34112 }this.join (millis);
34113 }, "~N,~N");
34114 Clazz_defineMethod (c$, "join", 
34115 function () {
34116 this.join (0);
34117 });
34118 c$.dumpStack = Clazz_defineMethod (c$, "dumpStack", 
34119 function () {
34120  new Exception ("Stack trace").printStackTrace ();
34121 });
34122 Clazz_defineMethod (c$, "setDaemon", 
34123 function (on) {
34124 this.checkAccess ();
34125 if (this.isAlive ()) {
34126 throw  new IllegalThreadStateException ();
34127 }this.daemon = on;
34128 }, "~B");
34129 Clazz_defineMethod (c$, "isDaemon", 
34130 function () {
34131 return this.daemon;
34132 });
34133 Clazz_defineMethod (c$, "checkAccess", 
34134 function () {
34135 });
34136 Clazz_overrideMethod (c$, "toString", 
34137 function () {
34138 var group = this.getThreadGroup ();
34139 if (group != null) {
34140 return "Thread[" + this.getName () + "," + this.getPriority () + "," + group.getName () + "]";
34141 } else {
34142 return "Thread[" + this.getName () + "," + this.getPriority () + "," + "" + "]";
34143 }});
34144 Clazz_defineMethod (c$, "getContextClassLoader", 
34145 function () {
34146 return null;
34147 });
34148 Clazz_defineMethod (c$, "setContextClassLoader", 
34149 function (cl) {
34150 }, "ClassLoader");
34151 c$.holdsLock = Clazz_defineMethod (c$, "holdsLock", 
34152 function (obj) {
34153 return false;
34154 }, "~O");
34155 Clazz_defineMethod (c$, "getStackTrace", 
34156 function () {
34157 return ( new Exception ()).getStackTrace ();
34158 });
34159 c$.getAllStackTraces = Clazz_defineMethod (c$, "getAllStackTraces", 
34160 function () {
34161 var threads = java.lang.Thread.getThreads ();
34162 var traces = java.lang.Thread.dumpThreads (threads);
34163 var m =  new java.util.HashMap (threads.length);
34164 for (var i = 0; i < threads.length; i++) {
34165 var stackTrace = traces[i];
34166 if (stackTrace != null) {
34167 m.put (threads[i], stackTrace);
34168 }}
34169 return m;
34170 });
34171 c$.dumpThreads = Clazz_defineMethod (c$, "dumpThreads", 
34172  function (threads) {
34173 return null;
34174 }, "~A");
34175 c$.getThreads = Clazz_defineMethod (c$, "getThreads", 
34176  function () {
34177 return null;
34178 });
34179 Clazz_defineMethod (c$, "getId", 
34180 function () {
34181 return this.tid;
34182 });
34183 Clazz_defineMethod (c$, "getState", 
34184 function () {
34185 switch (this.threadStatus) {
34186 case 0:
34187 return java.lang.Thread.State.NEW;
34188 case 1:
34189 return java.lang.Thread.State.RUNNABLE;
34190 case 2:
34191 default:
34192 return java.lang.Thread.State.TERMINATED;
34193 case 3:
34194 return java.lang.Thread.State.TIMED_WAITING;
34195 case 4:
34196 return java.lang.Thread.State.WAITING;
34197 }
34198 });
34199 c$.setDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "setDefaultUncaughtExceptionHandler", 
34200 function (eh) {
34201 java.lang.Thread.defaultUncaughtExceptionHandler = eh;
34202 }, "java.lang.Thread.UncaughtExceptionHandler");
34203 c$.getDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "getDefaultUncaughtExceptionHandler", 
34204 function () {
34205 return java.lang.Thread.defaultUncaughtExceptionHandler;
34206 });
34207 Clazz_defineMethod (c$, "getUncaughtExceptionHandler", 
34208 function () {
34209 return this.uncaughtExceptionHandler != null ? this.uncaughtExceptionHandler : this.group;
34210 });
34211 Clazz_defineMethod (c$, "setUncaughtExceptionHandler", 
34212 function (eh) {
34213 this.checkAccess ();
34214 this.uncaughtExceptionHandler = eh;
34215 }, "java.lang.Thread.UncaughtExceptionHandler");
34216 Clazz_defineMethod (c$, "setPriority0", 
34217  function (newPriority) {
34218 }, "~N");
34219 Clazz_defineMethod (c$, "stop0", 
34220  function (o) {
34221 this.stopped = true;
34222 }, "~O");
34223 Clazz_defineMethod (c$, "suspend0", 
34224  function () {
34225 });
34226 Clazz_defineMethod (c$, "resume0", 
34227  function () {
34228 });
34229 Clazz_defineMethod (c$, "interrupt0", 
34230  function () {
34231 this.$interrupted = true;
34232 });
34233 Clazz_pu$h(self.c$);
34234 c$ = Clazz_declareType (java.lang.Thread, "State", Enum);
34235 Clazz_defineEnumConstant (c$, "NEW", 0, []);
34236 Clazz_defineEnumConstant (c$, "RUNNABLE", 1, []);
34237 Clazz_defineEnumConstant (c$, "BLOCKED", 2, []);
34238 Clazz_defineEnumConstant (c$, "WAITING", 3, []);
34239 Clazz_defineEnumConstant (c$, "TIMED_WAITING", 4, []);
34240 Clazz_defineEnumConstant (c$, "TERMINATED", 5, []);
34241 c$ = Clazz_p0p ();
34242 Clazz_declareInterface (java.lang.Thread, "UncaughtExceptionHandler");
34243 Clazz_defineStatics (c$,
34244 "threadInitNumber", 0,
34245 "threadSeqNumber", 0,
34246 "thisThread", null,
34247 "MIN_PRIORITY", 1,
34248 "NORM_PRIORITY", 5,
34249 "MAX_PRIORITY", 10,
34250 "defaultUncaughtExceptionHandler", null);
34251 });
34252 Clazz_declarePackage ("java.lang");
34253 Clazz_load (["java.lang.Thread"], "java.lang.ThreadGroup", ["java.lang.IllegalThreadStateException", "$.ThreadDeath", "java.util.Arrays"], function () {
34254 c$ = Clazz_decorateAsClass (function () {
34255 this.parent = null;
34256 this.name = null;
34257 this.maxPriority = 10;
34258 this.destroyed = false;
34259 this.daemon = false;
34260 this.vmAllowSuspension = false;
34261 this.nUnstartedThreads = 0;
34262 this.nthreads = 0;
34263 this.threads = null;
34264 this.ngroups = 0;
34265 this.groups = null;
34266 this.html5Applet = null;
34267 Clazz_instantialize (this, arguments);
34268 }, java.lang, "ThreadGroup", null, java.lang.Thread.UncaughtExceptionHandler);
34269 Clazz_makeConstructor (c$, 
34270 function (name) {
34271 this.construct (java.lang.Thread.currentThread ().getThreadGroup (), name);
34272 }, "~S");
34273 Clazz_makeConstructor (c$, 
34274 function (parent, name) {
34275 this.name = name;
34276 this.parent = parent;
34277 if (parent != null) {
34278 this.maxPriority = parent.maxPriority;
34279 this.daemon = parent.daemon;
34280 this.vmAllowSuspension = parent.vmAllowSuspension;
34281 parent.add (this);
34282 }}, "java.lang.ThreadGroup,~S");
34283 Clazz_defineMethod (c$, "getName", 
34284 function () {
34285 return this.name;
34286 });
34287 Clazz_defineMethod (c$, "getParent", 
34288 function () {
34289 if (this.parent != null) this.parent.checkAccess ();
34290 return this.parent;
34291 });
34292 Clazz_defineMethod (c$, "getMaxPriority", 
34293 function () {
34294 return this.maxPriority;
34295 });
34296 Clazz_defineMethod (c$, "isDaemon", 
34297 function () {
34298 return this.daemon;
34299 });
34300 Clazz_defineMethod (c$, "isDestroyed", 
34301 function () {
34302 return this.destroyed;
34303 });
34304 Clazz_defineMethod (c$, "setDaemon", 
34305 function (daemon) {
34306 this.checkAccess ();
34307 this.daemon = daemon;
34308 }, "~B");
34309 Clazz_defineMethod (c$, "setMaxPriority", 
34310 function (pri) {
34311 var ngroupsSnapshot;
34312 var groupsSnapshot;
34313 {
34314 this.checkAccess ();
34315 if (pri < 1 || pri > 10) {
34316 return;
34317 }this.maxPriority = (this.parent != null) ? Math.min (pri, this.parent.maxPriority) : pri;
34318 ngroupsSnapshot = this.ngroups;
34319 if (this.groups != null) {
34320 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34321 } else {
34322 groupsSnapshot = null;
34323 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34324 groupsSnapshot[i].setMaxPriority (pri);
34325 }
34326 }, "~N");
34327 Clazz_defineMethod (c$, "parentOf", 
34328 function (g) {
34329 for (; g != null; g = g.parent) {
34330 if (g === this) {
34331 return true;
34332 }}
34333 return false;
34334 }, "java.lang.ThreadGroup");
34335 Clazz_defineMethod (c$, "checkAccess", 
34336 function () {
34337 });
34338 Clazz_defineMethod (c$, "activeCount", 
34339 function () {
34340 var result;
34341 var ngroupsSnapshot;
34342 var groupsSnapshot;
34343 {
34344 if (this.destroyed) {
34345 return 0;
34346 }result = this.nthreads;
34347 ngroupsSnapshot = this.ngroups;
34348 if (this.groups != null) {
34349 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34350 } else {
34351 groupsSnapshot = null;
34352 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34353 result += groupsSnapshot[i].activeCount ();
34354 }
34355 return result;
34356 });
34357 Clazz_defineMethod (c$, "enumerate", 
34358 function (list) {
34359 this.checkAccess ();
34360 return this.enumerate (list, 0, true);
34361 }, "~A");
34362 Clazz_defineMethod (c$, "enumerate", 
34363 function (list, recurse) {
34364 this.checkAccess ();
34365 return this.enumerate (list, 0, recurse);
34366 }, "~A,~B");
34367 Clazz_defineMethod (c$, "enumerate", 
34368  function (list, n, recurse) {
34369 var ngroupsSnapshot = 0;
34370 var groupsSnapshot = null;
34371 {
34372 if (this.destroyed) {
34373 return 0;
34374 }var nt = this.nthreads;
34375 if (nt > list.length - n) {
34376 nt = list.length - n;
34377 }for (var i = 0; i < nt; i++) {
34378 if (this.threads[i].isAlive ()) {
34379 list[n++] = this.threads[i];
34380 }}
34381 if (recurse) {
34382 ngroupsSnapshot = this.ngroups;
34383 if (this.groups != null) {
34384 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34385 } else {
34386 groupsSnapshot = null;
34387 }}}if (recurse) {
34388 for (var i = 0; i < ngroupsSnapshot; i++) {
34389 n = groupsSnapshot[i].enumerate (list, n, true);
34390 }
34391 }return n;
34392 }, "~A,~N,~B");
34393 Clazz_defineMethod (c$, "activeGroupCount", 
34394 function () {
34395 var ngroupsSnapshot;
34396 var groupsSnapshot;
34397 {
34398 if (this.destroyed) {
34399 return 0;
34400 }ngroupsSnapshot = this.ngroups;
34401 if (this.groups != null) {
34402 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34403 } else {
34404 groupsSnapshot = null;
34405 }}var n = ngroupsSnapshot;
34406 for (var i = 0; i < ngroupsSnapshot; i++) {
34407 n += groupsSnapshot[i].activeGroupCount ();
34408 }
34409 return n;
34410 });
34411 Clazz_defineMethod (c$, "enumerate", 
34412 function (list) {
34413 this.checkAccess ();
34414 return this.enumerate (list, 0, true);
34415 }, "~A");
34416 Clazz_defineMethod (c$, "enumerate", 
34417 function (list, recurse) {
34418 this.checkAccess ();
34419 return this.enumerate (list, 0, recurse);
34420 }, "~A,~B");
34421 Clazz_defineMethod (c$, "enumerate", 
34422  function (list, n, recurse) {
34423 var ngroupsSnapshot = 0;
34424 var groupsSnapshot = null;
34425 {
34426 if (this.destroyed) {
34427 return 0;
34428 }var ng = this.ngroups;
34429 if (ng > list.length - n) {
34430 ng = list.length - n;
34431 }if (ng > 0) {
34432 System.arraycopy (this.groups, 0, list, n, ng);
34433 n += ng;
34434 }if (recurse) {
34435 ngroupsSnapshot = this.ngroups;
34436 if (this.groups != null) {
34437 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34438 } else {
34439 groupsSnapshot = null;
34440 }}}if (recurse) {
34441 for (var i = 0; i < ngroupsSnapshot; i++) {
34442 n = groupsSnapshot[i].enumerate (list, n, true);
34443 }
34444 }return n;
34445 }, "~A,~N,~B");
34446 Clazz_defineMethod (c$, "stop", 
34447 function () {
34448 if (this.stopOrSuspend (false)) java.lang.Thread.currentThread ().stop ();
34449 });
34450 Clazz_defineMethod (c$, "interrupt", 
34451 function () {
34452 var ngroupsSnapshot;
34453 var groupsSnapshot;
34454 {
34455 this.checkAccess ();
34456 for (var i = 0; i < this.nthreads; i++) {
34457 this.threads[i].interrupt ();
34458 }
34459 ngroupsSnapshot = this.ngroups;
34460 if (this.groups != null) {
34461 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34462 } else {
34463 groupsSnapshot = null;
34464 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34465 groupsSnapshot[i].interrupt ();
34466 }
34467 });
34468 Clazz_defineMethod (c$, "suspend", 
34469 function () {
34470 if (this.stopOrSuspend (true)) java.lang.Thread.currentThread ().suspend ();
34471 });
34472 Clazz_defineMethod (c$, "stopOrSuspend", 
34473  function (suspend) {
34474 var suicide = false;
34475 var us = java.lang.Thread.currentThread ();
34476 var ngroupsSnapshot;
34477 var groupsSnapshot = null;
34478 {
34479 this.checkAccess ();
34480 for (var i = 0; i < this.nthreads; i++) {
34481 if (this.threads[i] === us) suicide = true;
34482  else if (suspend) this.threads[i].suspend ();
34483  else this.threads[i].stop ();
34484 }
34485 ngroupsSnapshot = this.ngroups;
34486 if (this.groups != null) {
34487 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34488 }}for (var i = 0; i < ngroupsSnapshot; i++) suicide = groupsSnapshot[i].stopOrSuspend (suspend) || suicide;
34489
34490 return suicide;
34491 }, "~B");
34492 Clazz_defineMethod (c$, "resume", 
34493 function () {
34494 var ngroupsSnapshot;
34495 var groupsSnapshot;
34496 {
34497 this.checkAccess ();
34498 for (var i = 0; i < this.nthreads; i++) {
34499 this.threads[i].resume ();
34500 }
34501 ngroupsSnapshot = this.ngroups;
34502 if (this.groups != null) {
34503 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34504 } else {
34505 groupsSnapshot = null;
34506 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34507 groupsSnapshot[i].resume ();
34508 }
34509 });
34510 Clazz_defineMethod (c$, "destroy", 
34511 function () {
34512 var ngroupsSnapshot;
34513 var groupsSnapshot;
34514 {
34515 this.checkAccess ();
34516 if (this.destroyed || (this.nthreads > 0)) {
34517 throw  new IllegalThreadStateException ();
34518 }ngroupsSnapshot = this.ngroups;
34519 if (this.groups != null) {
34520 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34521 } else {
34522 groupsSnapshot = null;
34523 }if (this.parent != null) {
34524 this.destroyed = true;
34525 this.ngroups = 0;
34526 this.groups = null;
34527 this.nthreads = 0;
34528 this.threads = null;
34529 }}for (var i = 0; i < ngroupsSnapshot; i += 1) {
34530 groupsSnapshot[i].destroy ();
34531 }
34532 if (this.parent != null) {
34533 this.parent.remove (this);
34534 }});
34535 Clazz_defineMethod (c$, "add", 
34536  function (g) {
34537 {
34538 if (this.destroyed) {
34539 throw  new IllegalThreadStateException ();
34540 }if (this.groups == null) {
34541 this.groups =  new Array (4);
34542 } else if (this.ngroups == this.groups.length) {
34543 this.groups = java.util.Arrays.copyOf (this.groups, this.ngroups * 2);
34544 }this.groups[this.ngroups] = g;
34545 this.ngroups++;
34546 }}, "java.lang.ThreadGroup");
34547 Clazz_defineMethod (c$, "remove", 
34548  function (g) {
34549 {
34550 if (this.destroyed) {
34551 return;
34552 }for (var i = 0; i < this.ngroups; i++) {
34553 if (this.groups[i] === g) {
34554 this.ngroups -= 1;
34555 System.arraycopy (this.groups, i + 1, this.groups, i, this.ngroups - i);
34556 this.groups[this.ngroups] = null;
34557 break;
34558 }}
34559 if (this.nthreads == 0) {
34560 this.notifyAll ();
34561 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34562 this.destroy ();
34563 }}}, "java.lang.ThreadGroup");
34564 Clazz_defineMethod (c$, "addUnstarted", 
34565 function () {
34566 {
34567 if (this.destroyed) {
34568 throw  new IllegalThreadStateException ();
34569 }this.nUnstartedThreads++;
34570 }});
34571 Clazz_defineMethod (c$, "add", 
34572 function (t) {
34573 {
34574 if (this.destroyed) {
34575 throw  new IllegalThreadStateException ();
34576 }if (this.threads == null) {
34577 this.threads =  new Array (4);
34578 } else if (this.nthreads == this.threads.length) {
34579 this.threads = java.util.Arrays.copyOf (this.threads, this.nthreads * 2);
34580 }this.threads[this.nthreads] = t;
34581 this.nthreads++;
34582 this.nUnstartedThreads--;
34583 }}, "java.lang.Thread");
34584 Clazz_defineMethod (c$, "remove", 
34585 function (t) {
34586 {
34587 if (this.destroyed) {
34588 return;
34589 }for (var i = 0; i < this.nthreads; i++) {
34590 if (this.threads[i] === t) {
34591 System.arraycopy (this.threads, i + 1, this.threads, i, --this.nthreads - i);
34592 this.threads[this.nthreads] = null;
34593 break;
34594 }}
34595 if (this.nthreads == 0) {
34596 this.notifyAll ();
34597 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34598 this.destroy ();
34599 }}}, "java.lang.Thread");
34600 Clazz_defineMethod (c$, "uncaughtException", 
34601 function (t, e) {
34602 if (this.parent != null) {
34603 this.parent.uncaughtException (t, e);
34604 } else {
34605 var ueh = java.lang.Thread.getDefaultUncaughtExceptionHandler ();
34606 if (ueh != null) {
34607 ueh.uncaughtException (t, e);
34608 } else if (!(Clazz_instanceOf (e, ThreadDeath))) {
34609 System.err.print ("Exception in thread \"" + t.getName () + "\" ");
34610 e.printStackTrace (System.err);
34611 }}}, "java.lang.Thread,Throwable");
34612 Clazz_overrideMethod (c$, "toString", 
34613 function () {
34614 return this.getClass ().getName () + "[name=" + this.getName () + ",maxpri=" + this.maxPriority + ",html5Applet=" + this.html5Applet + "]";
34615 });
34616 });
34617 Clazz_declarePackage ("java.awt");
34618 Clazz_load (["java.awt.LayoutManager"], "java.awt.FlowLayout", ["java.awt.Dimension"], function () {
34619 c$ = Clazz_decorateAsClass (function () {
34620 this.align = 0;
34621 this.newAlign = 0;
34622 this.hgap = 0;
34623 this.vgap = 0;
34624 this.alignOnBaseline = false;
34625 Clazz_instantialize (this, arguments);
34626 }, java.awt, "FlowLayout", null, [java.awt.LayoutManager, java.io.Serializable]);
34627 Clazz_makeConstructor (c$, 
34628 function () {
34629 this.construct (1, 5, 5);
34630 });
34631 Clazz_makeConstructor (c$, 
34632 function (align) {
34633 this.construct (align, 5, 5);
34634 }, "~N");
34635 Clazz_makeConstructor (c$, 
34636 function (align, hgap, vgap) {
34637 this.hgap = hgap;
34638 this.vgap = vgap;
34639 this.setAlignment (align);
34640 }, "~N,~N,~N");
34641 Clazz_defineMethod (c$, "getAlignment", 
34642 function () {
34643 return this.newAlign;
34644 });
34645 Clazz_defineMethod (c$, "setAlignment", 
34646 function (align) {
34647 this.newAlign = align;
34648 switch (align) {
34649 case 3:
34650 this.align = 0;
34651 break;
34652 case 4:
34653 this.align = 2;
34654 break;
34655 default:
34656 this.align = align;
34657 break;
34658 }
34659 }, "~N");
34660 Clazz_defineMethod (c$, "getHgap", 
34661 function () {
34662 return this.hgap;
34663 });
34664 Clazz_defineMethod (c$, "setHgap", 
34665 function (hgap) {
34666 this.hgap = hgap;
34667 }, "~N");
34668 Clazz_defineMethod (c$, "getVgap", 
34669 function () {
34670 return this.vgap;
34671 });
34672 Clazz_defineMethod (c$, "setVgap", 
34673 function (vgap) {
34674 this.vgap = vgap;
34675 }, "~N");
34676 Clazz_defineMethod (c$, "setAlignOnBaseline", 
34677 function (alignOnBaseline) {
34678 this.alignOnBaseline = alignOnBaseline;
34679 }, "~B");
34680 Clazz_defineMethod (c$, "getAlignOnBaseline", 
34681 function () {
34682 return this.alignOnBaseline;
34683 });
34684 Clazz_overrideMethod (c$, "addLayoutComponent", 
34685 function (name, comp) {
34686 }, "~S,java.awt.Component");
34687 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34688 function (comp) {
34689 }, "java.awt.Component");
34690 Clazz_overrideMethod (c$, "preferredLayoutSize", 
34691 function (target) {
34692 {
34693 var dim =  new java.awt.Dimension (0, 0);
34694 var nmembers = target.getComponentCount ();
34695 var firstVisibleComponent = true;
34696 var useBaseline = this.getAlignOnBaseline ();
34697 var maxAscent = 0;
34698 var maxDescent = 0;
34699 for (var i = 0; i < nmembers; i++) {
34700 var m = target.getComponent (i);
34701 if (m.isVisible ()) {
34702 var d = m.getPreferredSize ();
34703 dim.height = Math.max (dim.height, d.height);
34704 if (firstVisibleComponent) {
34705 firstVisibleComponent = false;
34706 } else {
34707 dim.width += this.hgap;
34708 }dim.width += d.width;
34709 if (useBaseline) {
34710 var baseline = m.getBaseline (d.width, d.height);
34711 if (baseline >= 0) {
34712 maxAscent = Math.max (maxAscent, baseline);
34713 maxDescent = Math.max (maxDescent, d.height - baseline);
34714 }}}}
34715 if (useBaseline) {
34716 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34717 }var insets = target.getInsets ();
34718 dim.width += insets.left + insets.right + this.hgap * 2;
34719 dim.height += insets.top + insets.bottom + this.vgap * 2;
34720 return dim;
34721 }}, "java.awt.Container");
34722 Clazz_overrideMethod (c$, "minimumLayoutSize", 
34723 function (target) {
34724 {
34725 var useBaseline = this.getAlignOnBaseline ();
34726 var dim =  new java.awt.Dimension (0, 0);
34727 var nmembers = target.getComponentCount ();
34728 var maxAscent = 0;
34729 var maxDescent = 0;
34730 var firstVisibleComponent = true;
34731 for (var i = 0; i < nmembers; i++) {
34732 var m = target.getComponent (i);
34733 if (m.visible) {
34734 var d = m.getMinimumSize ();
34735 dim.height = Math.max (dim.height, d.height);
34736 if (firstVisibleComponent) {
34737 firstVisibleComponent = false;
34738 } else {
34739 dim.width += this.hgap;
34740 }dim.width += d.width;
34741 if (useBaseline) {
34742 var baseline = m.getBaseline (d.width, d.height);
34743 if (baseline >= 0) {
34744 maxAscent = Math.max (maxAscent, baseline);
34745 maxDescent = Math.max (maxDescent, dim.height - baseline);
34746 }}}}
34747 if (useBaseline) {
34748 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34749 }var insets = target.getInsets ();
34750 dim.width += insets.left + insets.right + this.hgap * 2;
34751 dim.height += insets.top + insets.bottom + this.vgap * 2;
34752 return dim;
34753 }}, "java.awt.Container");
34754 Clazz_defineMethod (c$, "moveComponents", 
34755  function (target, x, y, width, height, rowStart, rowEnd, ltr, useBaseline, ascent, descent) {
34756 switch (this.newAlign) {
34757 case 0:
34758 x += ltr ? 0 : width;
34759 break;
34760 case 1:
34761 x += Clazz_doubleToInt (width / 2);
34762 break;
34763 case 2:
34764 x += ltr ? width : 0;
34765 break;
34766 case 3:
34767 break;
34768 case 4:
34769 x += width;
34770 break;
34771 }
34772 var maxAscent = 0;
34773 var nonbaselineHeight = 0;
34774 var baselineOffset = 0;
34775 if (useBaseline) {
34776 var maxDescent = 0;
34777 for (var i = rowStart; i < rowEnd; i++) {
34778 var m = target.getComponent (i);
34779 if (m.visible) {
34780 if (ascent[i] >= 0) {
34781 maxAscent = Math.max (maxAscent, ascent[i]);
34782 maxDescent = Math.max (maxDescent, descent[i]);
34783 } else {
34784 nonbaselineHeight = Math.max (m.getHeight (), nonbaselineHeight);
34785 }}}
34786 height = Math.max (maxAscent + maxDescent, nonbaselineHeight);
34787 baselineOffset = Clazz_doubleToInt ((height - maxAscent - maxDescent) / 2);
34788 }for (var i = rowStart; i < rowEnd; i++) {
34789 var m = target.getComponent (i);
34790 if (m.isVisible ()) {
34791 var cy;
34792 if (useBaseline && ascent[i] >= 0) {
34793 cy = y + baselineOffset + maxAscent - ascent[i];
34794 } else {
34795 cy = y + Clazz_doubleToInt ((height - m.height) / 2);
34796 }if (ltr) {
34797 m.setLocation (x, cy);
34798 } else {
34799 m.setLocation (target.width - x - m.width, cy);
34800 }x += m.width + this.hgap;
34801 }}
34802 return height;
34803 }, "java.awt.Container,~N,~N,~N,~N,~N,~N,~B,~B,~A,~A");
34804 Clazz_overrideMethod (c$, "layoutContainer", 
34805 function (target) {
34806 System.out.println ("FlowLayout laying out " + target);
34807 {
34808 var insets = target.getInsets ();
34809 var maxwidth = target.width - (insets.left + insets.right + this.hgap * 2);
34810 var nmembers = target.getComponentCount ();
34811 var x = 0;
34812 var y = insets.top + this.vgap;
34813 var rowh = 0;
34814 var start = 0;
34815 var ltr = target.getComponentOrientation ().isLeftToRight ();
34816 var useBaseline = this.getAlignOnBaseline ();
34817 var ascent = null;
34818 var descent = null;
34819 if (useBaseline) {
34820 ascent =  Clazz_newIntArray (nmembers, 0);
34821 descent =  Clazz_newIntArray (nmembers, 0);
34822 }for (var i = 0; i < nmembers; i++) {
34823 var m = target.getComponent (i);
34824 if (m.isVisible ()) {
34825 var d = m.getPreferredSize ();
34826 m.setSize (d.width, d.height);
34827 if (useBaseline) {
34828 var baseline = m.getBaseline (d.width, d.height);
34829 if (baseline >= 0) {
34830 ascent[i] = baseline;
34831 descent[i] = d.height - baseline;
34832 } else {
34833 ascent[i] = -1;
34834 }}if ((x == 0) || ((x + d.width) <= maxwidth)) {
34835 if (x > 0) {
34836 x += this.hgap;
34837 }x += d.width;
34838 rowh = Math.max (rowh, d.height);
34839 } else {
34840 rowh = this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, i, ltr, useBaseline, ascent, descent);
34841 x = d.width;
34842 y += this.vgap + rowh;
34843 rowh = d.height;
34844 start = i;
34845 }}}
34846 this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, nmembers, ltr, useBaseline, ascent, descent);
34847 }}, "java.awt.Container");
34848 Clazz_overrideMethod (c$, "toString", 
34849 function () {
34850 var str = "";
34851 switch (this.align) {
34852 case 0:
34853 str = ",align=left";
34854 break;
34855 case 1:
34856 str = ",align=center";
34857 break;
34858 case 2:
34859 str = ",align=right";
34860 break;
34861 case 3:
34862 str = ",align=leading";
34863 break;
34864 case 4:
34865 str = ",align=trailing";
34866 break;
34867 }
34868 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + str + "]";
34869 });
34870 Clazz_defineStatics (c$,
34871 "LEFT", 0,
34872 "CENTER", 1,
34873 "RIGHT", 2,
34874 "LEADING", 3,
34875 "TRAILING", 4);
34876 });
34877 Clazz_declarePackage ("java.awt");
34878 Clazz_load (["java.awt.LayoutManager2"], "java.awt.BorderLayout", ["java.lang.IllegalArgumentException", "java.awt.Dimension"], function () {
34879 c$ = Clazz_decorateAsClass (function () {
34880 this.hgap = 0;
34881 this.vgap = 0;
34882 this.north = null;
34883 this.west = null;
34884 this.east = null;
34885 this.south = null;
34886 this.center = null;
34887 this.firstLine = null;
34888 this.lastLine = null;
34889 this.firstItem = null;
34890 this.lastItem = null;
34891 Clazz_instantialize (this, arguments);
34892 }, java.awt, "BorderLayout", null, [java.awt.LayoutManager2, java.io.Serializable]);
34893 Clazz_makeConstructor (c$, 
34894 function () {
34895 this.construct (0, 0);
34896 });
34897 Clazz_makeConstructor (c$, 
34898 function (hgap, vgap) {
34899 this.hgap = hgap;
34900 this.vgap = vgap;
34901 }, "~N,~N");
34902 Clazz_defineMethod (c$, "getHgap", 
34903 function () {
34904 return this.hgap;
34905 });
34906 Clazz_defineMethod (c$, "setHgap", 
34907 function (hgap) {
34908 this.hgap = hgap;
34909 }, "~N");
34910 Clazz_defineMethod (c$, "getVgap", 
34911 function () {
34912 return this.vgap;
34913 });
34914 Clazz_defineMethod (c$, "setVgap", 
34915 function (vgap) {
34916 this.vgap = vgap;
34917 }, "~N");
34918 Clazz_defineMethod (c$, "addLayoutComponent", 
34919 function (comp, constraints) {
34920 {
34921 if ((constraints == null) || (Clazz_instanceOf (constraints, String))) {
34922 this.addLayoutComponent (constraints, comp);
34923 } else {
34924 throw  new IllegalArgumentException ("cannot add to layout: constraint must be a string (or null)");
34925 }}}, "java.awt.Component,~O");
34926 Clazz_defineMethod (c$, "addLayoutComponent", 
34927 function (name, comp) {
34928 {
34929 if (name == null) {
34930 name = "Center";
34931 }System.out.println ("BorderLayout adding " + name + " " + comp);
34932 if ("Center".equals (name)) {
34933 this.center = comp;
34934 } else if ("North".equals (name)) {
34935 this.north = comp;
34936 } else if ("South".equals (name)) {
34937 this.south = comp;
34938 } else if ("East".equals (name)) {
34939 this.east = comp;
34940 } else if ("West".equals (name)) {
34941 this.west = comp;
34942 } else if ("First".equals (name)) {
34943 this.firstLine = comp;
34944 } else if ("Last".equals (name)) {
34945 this.lastLine = comp;
34946 } else if ("Before".equals (name)) {
34947 this.firstItem = comp;
34948 } else if ("After".equals (name)) {
34949 this.lastItem = comp;
34950 } else {
34951 throw  new IllegalArgumentException ("cannot add to layout: unknown constraint: " + name);
34952 }}}, "~S,java.awt.Component");
34953 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34954 function (comp) {
34955 {
34956 if (comp === this.center) {
34957 this.center = null;
34958 } else if (comp === this.north) {
34959 this.north = null;
34960 } else if (comp === this.south) {
34961 this.south = null;
34962 } else if (comp === this.east) {
34963 this.east = null;
34964 } else if (comp === this.west) {
34965 this.west = null;
34966 }if (comp === this.firstLine) {
34967 this.firstLine = null;
34968 } else if (comp === this.lastLine) {
34969 this.lastLine = null;
34970 } else if (comp === this.firstItem) {
34971 this.firstItem = null;
34972 } else if (comp === this.lastItem) {
34973 this.lastItem = null;
34974 }}}, "java.awt.Component");
34975 Clazz_defineMethod (c$, "getLayoutComponent", 
34976 function (constraints) {
34977 if ("Center".equals (constraints)) {
34978 return this.center;
34979 } else if ("North".equals (constraints)) {
34980 return this.north;
34981 } else if ("South".equals (constraints)) {
34982 return this.south;
34983 } else if ("West".equals (constraints)) {
34984 return this.west;
34985 } else if ("East".equals (constraints)) {
34986 return this.east;
34987 } else if ("First".equals (constraints)) {
34988 return this.firstLine;
34989 } else if ("Last".equals (constraints)) {
34990 return this.lastLine;
34991 } else if ("Before".equals (constraints)) {
34992 return this.firstItem;
34993 } else if ("After".equals (constraints)) {
34994 return this.lastItem;
34995 } else {
34996 throw  new IllegalArgumentException ("cannot get component: unknown constraint: " + constraints);
34997 }}, "~O");
34998 Clazz_defineMethod (c$, "getLayoutComponent", 
34999 function (target, constraints) {
35000 var ltr = target.getComponentOrientation ().isLeftToRight ();
35001 var result = null;
35002 if ("North".equals (constraints)) {
35003 result = (this.firstLine != null) ? this.firstLine : this.north;
35004 } else if ("South".equals (constraints)) {
35005 result = (this.lastLine != null) ? this.lastLine : this.south;
35006 } else if ("West".equals (constraints)) {
35007 result = ltr ? this.firstItem : this.lastItem;
35008 if (result == null) {
35009 result = this.west;
35010 }} else if ("East".equals (constraints)) {
35011 result = ltr ? this.lastItem : this.firstItem;
35012 if (result == null) {
35013 result = this.east;
35014 }} else if ("Center".equals (constraints)) {
35015 result = this.center;
35016 } else {
35017 throw  new IllegalArgumentException ("cannot get component: invalid constraint: " + constraints);
35018 }return result;
35019 }, "java.awt.Container,~O");
35020 Clazz_defineMethod (c$, "getConstraints", 
35021 function (comp) {
35022 if (comp == null) {
35023 return null;
35024 }if (comp === this.center) {
35025 return "Center";
35026 } else if (comp === this.north) {
35027 return "North";
35028 } else if (comp === this.south) {
35029 return "South";
35030 } else if (comp === this.west) {
35031 return "West";
35032 } else if (comp === this.east) {
35033 return "East";
35034 } else if (comp === this.firstLine) {
35035 return "First";
35036 } else if (comp === this.lastLine) {
35037 return "Last";
35038 } else if (comp === this.firstItem) {
35039 return "Before";
35040 } else if (comp === this.lastItem) {
35041 return "After";
35042 }return null;
35043 }, "java.awt.Component");
35044 Clazz_overrideMethod (c$, "minimumLayoutSize", 
35045 function (target) {
35046 {
35047 var dim =  new java.awt.Dimension (0, 0);
35048 var ltr = target.getComponentOrientation ().isLeftToRight ();
35049 var c = null;
35050 if ((c = this.getChild ("East", ltr)) != null) {
35051 var d = c.getMinimumSize ();
35052 dim.width += d.width + this.hgap;
35053 dim.height = Math.max (d.height, dim.height);
35054 }if ((c = this.getChild ("West", ltr)) != null) {
35055 var d = c.getMinimumSize ();
35056 dim.width += d.width + this.hgap;
35057 dim.height = Math.max (d.height, dim.height);
35058 }if ((c = this.getChild ("Center", ltr)) != null) {
35059 var d = c.getMinimumSize ();
35060 dim.width += d.width;
35061 dim.height = Math.max (d.height, dim.height);
35062 }if ((c = this.getChild ("North", ltr)) != null) {
35063 var d = c.getMinimumSize ();
35064 dim.width = Math.max (d.width, dim.width);
35065 dim.height += d.height + this.vgap;
35066 }if ((c = this.getChild ("South", ltr)) != null) {
35067 var d = c.getMinimumSize ();
35068 dim.width = Math.max (d.width, dim.width);
35069 dim.height += d.height + this.vgap;
35070 }var insets = target.getInsets ();
35071 dim.width += insets.left + insets.right;
35072 dim.height += insets.top + insets.bottom;
35073 return dim;
35074 }}, "java.awt.Container");
35075 Clazz_overrideMethod (c$, "preferredLayoutSize", 
35076 function (target) {
35077 {
35078 var dim =  new java.awt.Dimension (0, 0);
35079 var ltr = target.getComponentOrientation ().isLeftToRight ();
35080 var c = null;
35081 if ((c = this.getChild ("East", ltr)) != null) {
35082 var d = c.getPreferredSize ();
35083 dim.width += d.width + this.hgap;
35084 dim.height = Math.max (d.height, dim.height);
35085 }if ((c = this.getChild ("West", ltr)) != null) {
35086 var d = c.getPreferredSize ();
35087 dim.width += d.width + this.hgap;
35088 dim.height = Math.max (d.height, dim.height);
35089 }if ((c = this.getChild ("Center", ltr)) != null) {
35090 var d = c.getPreferredSize ();
35091 dim.width += d.width;
35092 dim.height = Math.max (d.height, dim.height);
35093 }if ((c = this.getChild ("North", ltr)) != null) {
35094 var d = c.getPreferredSize ();
35095 dim.width = Math.max (d.width, dim.width);
35096 dim.height += d.height + this.vgap;
35097 }if ((c = this.getChild ("South", ltr)) != null) {
35098 var d = c.getPreferredSize ();
35099 dim.width = Math.max (d.width, dim.width);
35100 dim.height += d.height + this.vgap;
35101 }var insets = target.getInsets ();
35102 dim.width += insets.left + insets.right;
35103 dim.height += insets.top + insets.bottom;
35104 return dim;
35105 }}, "java.awt.Container");
35106 Clazz_overrideMethod (c$, "maximumLayoutSize", 
35107 function (target) {
35108 return  new java.awt.Dimension (2147483647, 2147483647);
35109 }, "java.awt.Container");
35110 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
35111 function (parent) {
35112 return 0.5;
35113 }, "java.awt.Container");
35114 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
35115 function (parent) {
35116 return 0.5;
35117 }, "java.awt.Container");
35118 Clazz_overrideMethod (c$, "invalidateLayout", 
35119 function (target) {
35120 }, "java.awt.Container");
35121 Clazz_overrideMethod (c$, "layoutContainer", 
35122 function (target) {
35123 System.out.println ("BorderLayout laying out " + target);
35124 {
35125 var insets = target.getInsets ();
35126 var top = insets.top;
35127 var bottom = target.height - insets.bottom;
35128 var left = insets.left;
35129 var right = target.width - insets.right;
35130 var ltr = target.getComponentOrientation ().isLeftToRight ();
35131 var c = null;
35132 if ((c = this.getChild ("North", ltr)) != null) {
35133 c.setSize (right - left, c.height);
35134 var d = c.getPreferredSize ();
35135 c.setBounds (left, top, right - left, d.height);
35136 top += d.height + this.vgap;
35137 }if ((c = this.getChild ("South", ltr)) != null) {
35138 c.setSize (right - left, c.height);
35139 var d = c.getPreferredSize ();
35140 c.setBounds (left, bottom - d.height, right - left, d.height);
35141 bottom -= d.height + this.vgap;
35142 }if ((c = this.getChild ("East", ltr)) != null) {
35143 c.setSize (c.width, bottom - top);
35144 var d = c.getPreferredSize ();
35145 c.setBounds (right - d.width, top, d.width, bottom - top);
35146 right -= d.width + this.hgap;
35147 }if ((c = this.getChild ("West", ltr)) != null) {
35148 c.setSize (c.width, bottom - top);
35149 var d = c.getPreferredSize ();
35150 c.setBounds (left, top, d.width, bottom - top);
35151 left += d.width + this.hgap;
35152 }if ((c = this.getChild ("Center", ltr)) != null) {
35153 c.setBounds (left, top, right - left, bottom - top);
35154 }}}, "java.awt.Container");
35155 Clazz_defineMethod (c$, "getChild", 
35156  function (key, ltr) {
35157 var result = null;
35158 if (key === "North") {
35159 result = (this.firstLine != null) ? this.firstLine : this.north;
35160 } else if (key === "South") {
35161 result = (this.lastLine != null) ? this.lastLine : this.south;
35162 } else if (key === "West") {
35163 result = ltr ? this.firstItem : this.lastItem;
35164 if (result == null) {
35165 result = this.west;
35166 }} else if (key === "East") {
35167 result = ltr ? this.lastItem : this.firstItem;
35168 if (result == null) {
35169 result = this.east;
35170 }} else if (key === "Center") {
35171 result = this.center;
35172 }if (result != null && !result.visible) {
35173 result = null;
35174 }return result;
35175 }, "~S,~B");
35176 Clazz_overrideMethod (c$, "toString", 
35177 function () {
35178 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + "]";
35179 });
35180 Clazz_defineStatics (c$,
35181 "NORTH", "North",
35182 "SOUTH", "South",
35183 "EAST", "East",
35184 "WEST", "West",
35185 "CENTER", "Center",
35186 "BEFORE_FIRST_LINE", "First",
35187 "AFTER_LAST_LINE", "Last",
35188 "BEFORE_LINE_BEGINS", "Before",
35189 "AFTER_LINE_ENDS", "After");
35190 c$.PAGE_START = c$.prototype.PAGE_START = "First";
35191 c$.PAGE_END = c$.prototype.PAGE_END = "Last";
35192 c$.LINE_START = c$.prototype.LINE_START = "Before";
35193 c$.LINE_END = c$.prototype.LINE_END = "After";
35194 });
35195 Clazz_declarePackage ("java.awt");
35196 Clazz_load (["java.awt.LayoutManager"], "java.awt.LayoutManager2", null, function () {
35197 Clazz_declareInterface (java.awt, "LayoutManager2", java.awt.LayoutManager);
35198 });
35199 Clazz_declarePackage ("java.awt");
35200 Clazz_declareInterface (java.awt, "LayoutManager");
35201 Clazz_declarePackage ("java.awt");
35202 Clazz_load (["jssun.awt.SunGraphicsCallback"], "java.awt.GraphicsCallback", null, function () {
35203 c$ = Clazz_declareType (java.awt, "GraphicsCallback", jssun.awt.SunGraphicsCallback);
35204 Clazz_pu$h(self.c$);
35205 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintCallback", java.awt.GraphicsCallback);
35206 Clazz_makeConstructor (c$, 
35207  function () {
35208 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintCallback, []);
35209 });
35210 Clazz_overrideMethod (c$, "run", 
35211 function (a, b) {
35212 a.paint (b);
35213 }, "java.awt.Component,java.awt.Graphics");
35214 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35215 function () {
35216 return java.awt.GraphicsCallback.PaintCallback.instance;
35217 });
35218 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintCallback ();
35219 c$ = Clazz_p0p ();
35220 Clazz_pu$h(self.c$);
35221 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintAllCallback", java.awt.GraphicsCallback);
35222 Clazz_makeConstructor (c$, 
35223  function () {
35224 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintAllCallback, []);
35225 });
35226 Clazz_overrideMethod (c$, "run", 
35227 function (a, b) {
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.PaintAllCallback.instance;
35233 });
35234 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintAllCallback ();
35235 c$ = Clazz_p0p ();
35236 Clazz_pu$h(self.c$);
35237 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintHeavyweightComponentsCallback", java.awt.GraphicsCallback);
35238 Clazz_makeConstructor (c$, 
35239  function () {
35240 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback, []);
35241 });
35242 Clazz_overrideMethod (c$, "run", 
35243 function (a, b) {
35244 if (a.isLightweight ()) {
35245 a.paintHeavyweightComponents (b);
35246 } else {
35247 a.paintAll (b);
35248 }}, "java.awt.Component,java.awt.Graphics");
35249 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35250 function () {
35251 return java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.instance;
35252 });
35253 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback ();
35254 c$ = Clazz_p0p ();
35255 });
35256 Clazz_declarePackage ("java.awt");
35257 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 () {
35258 c$ = Clazz_decorateAsClass (function () {
35259 this.component = null;
35260 this.layoutMgr = null;
35261 this.dispatcher = null;
35262 this.focusCycleRoot = false;
35263 this.focusTraversalPolicyProvider = false;
35264 this.containerListener = null;
35265 this.listeningChildren = 0;
35266 this.listeningBoundsChildren = 0;
35267 this.descendantsCount = 0;
35268 this.preserveBackgroundColor = null;
35269 this.numOfHWComponents = 0;
35270 this.numOfLWComponents = 0;
35271 this.modalComp = null;
35272 this.modalAppContext = null;
35273 Clazz_instantialize (this, arguments);
35274 }, java.awt, "Container", java.awt.Component);
35275 Clazz_makeConstructor (c$, 
35276 function () {
35277 Clazz_superConstructor (this, java.awt.Container, []);
35278 this.component =  new java.util.ArrayList ();
35279 });
35280 Clazz_defineMethod (c$, "initializeFocusTraversalKeys", 
35281 function () {
35282 });
35283 Clazz_defineMethod (c$, "getComponentCount", 
35284 function () {
35285 return this.countComponents ();
35286 });
35287 Clazz_defineMethod (c$, "countComponents", 
35288 function () {
35289 return this.component.size ();
35290 });
35291 Clazz_defineMethod (c$, "getComponent", 
35292 function (n) {
35293 if ((n < 0) || (n >= this.component.size ())) {
35294 throw  new ArrayIndexOutOfBoundsException ("No such child: " + n);
35295 }return this.component.get (n);
35296 }, "~N");
35297 Clazz_defineMethod (c$, "getComponents", 
35298 function () {
35299 return this.getComponents_NoClientCode ();
35300 });
35301 Clazz_defineMethod (c$, "getComponents_NoClientCode", 
35302 function () {
35303 return this.component.toArray (java.awt.Container.EMPTY_ARRAY);
35304 });
35305 Clazz_defineMethod (c$, "getInsets", 
35306 function () {
35307 var peer = this.peer;
35308 if (Clazz_instanceOf (peer, java.awt.peer.ContainerPeer)) {
35309 var cpeer = peer;
35310 return cpeer.getInsets ().clone ();
35311 }return  new java.awt.Insets (0, 0, 0, 0);
35312 });
35313 Clazz_defineMethod (c$, "add", 
35314 function (comp) {
35315 return this.addImpl (comp, null, -1);
35316 }, "java.awt.Component");
35317 Clazz_defineMethod (c$, "add", 
35318 function (name, comp) {
35319 return this.addImpl (comp, name, -1);
35320 }, "~S,java.awt.Component");
35321 Clazz_defineMethod (c$, "add", 
35322 function (comp, index) {
35323 return this.addImpl (comp, null, index);
35324 }, "java.awt.Component,~N");
35325 Clazz_defineMethod (c$, "checkAddToSelf", 
35326  function (comp) {
35327 if (Clazz_instanceOf (comp, java.awt.Container)) {
35328 for (var cn = this; cn != null; cn = cn.parent) {
35329 if (cn === comp) {
35330 throw  new IllegalArgumentException ("adding container's parent to itself");
35331 }}
35332 }}, "java.awt.Component");
35333 Clazz_defineMethod (c$, "checkNotAWindow", 
35334  function (comp) {
35335 if (Clazz_instanceOf (comp, java.awt.Window)) {
35336 throw  new IllegalArgumentException ("adding a window to a container");
35337 }}, "java.awt.Component");
35338 Clazz_defineMethod (c$, "removeDelicately", 
35339  function (comp, newParent, newIndex) {
35340 var index = this.getComponentZOrder (comp);
35341 var needRemoveNotify = java.awt.Container.isRemoveNotifyNeeded (comp, this, newParent);
35342 if (needRemoveNotify) {
35343 comp.removeNotify ();
35344 }if (newParent !== this) {
35345 if (this.layoutMgr != null) {
35346 this.layoutMgr.removeLayoutComponent (comp);
35347 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35348 this.adjustListeningChildren (65536, -comp.numListening (65536));
35349 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35350 comp.parent = null;
35351 this.component.remove (index);
35352 this.invalidateIfValid ();
35353 } else {
35354 this.component.remove (index);
35355 this.component.add (newIndex, comp);
35356 }if (comp.parent == null) {
35357 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35358 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35359 this.dispatchEvent (e);
35360 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35361 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35362 this.updateCursorImmediately ();
35363 }}return needRemoveNotify;
35364 }, "java.awt.Component,java.awt.Container,~N");
35365 Clazz_defineMethod (c$, "canContainFocusOwner", 
35366 function (focusOwnerCandidate) {
35367 if (!(this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ())) {
35368 return false;
35369 }{
35370 if (this.parent != null) {
35371 return this.parent.canContainFocusOwner (focusOwnerCandidate);
35372 }}return true;
35373 }, "java.awt.Component");
35374 Clazz_defineMethod (c$, "hasHeavyweightDescendants", 
35375 function () {
35376 return this.numOfHWComponents > 0;
35377 });
35378 Clazz_defineMethod (c$, "hasLightweightDescendants", 
35379 function () {
35380 return this.numOfLWComponents > 0;
35381 });
35382 Clazz_defineMethod (c$, "getHeavyweightContainer", 
35383 function () {
35384 if (this.peer != null && !(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35385 return this;
35386 } else {
35387 return this.getNativeContainer ();
35388 }});
35389 c$.isRemoveNotifyNeeded = Clazz_defineMethod (c$, "isRemoveNotifyNeeded", 
35390  function (comp, oldContainer, newContainer) {
35391 return false;
35392 }, "java.awt.Component,java.awt.Container,java.awt.Container");
35393 Clazz_defineMethod (c$, "setComponentZOrder", 
35394 function (comp, index) {
35395 {
35396 var curParent = comp.parent;
35397 var oldZindex = this.getComponentZOrder (comp);
35398 if (curParent === this && index == oldZindex) {
35399 return;
35400 }var peerRecreated = (curParent != null) ? curParent.removeDelicately (comp, this, index) : false;
35401 this.addDelicately (comp, curParent, index);
35402 if (!peerRecreated && oldZindex != -1) {
35403 comp.mixOnZOrderChanging (oldZindex, index);
35404 }}}, "java.awt.Component,~N");
35405 Clazz_defineMethod (c$, "reparentTraverse", 
35406  function (parentPeer, child) {
35407 this.checkTreeLock ();
35408 for (var i = 0; i < child.getComponentCount (); i++) {
35409 var comp = child.getComponent (i);
35410 if (comp.isLightweight ()) {
35411 if (Clazz_instanceOf (comp, java.awt.Container)) {
35412 this.reparentTraverse (parentPeer, comp);
35413 }} else {
35414 comp.getPeer ().reparent (parentPeer);
35415 }}
35416 }, "java.awt.peer.ContainerPeer,java.awt.Container");
35417 Clazz_defineMethod (c$, "reparentChild", 
35418  function (comp) {
35419 if (comp == null) {
35420 return;
35421 }if (comp.isLightweight ()) {
35422 if (Clazz_instanceOf (comp, java.awt.Container)) {
35423 this.reparentTraverse (this.getPeer (), comp);
35424 }} else {
35425 comp.getPeer ().reparent (this.getPeer ());
35426 }}, "java.awt.Component");
35427 Clazz_defineMethod (c$, "addDelicately", 
35428  function (comp, curParent, index) {
35429 this.checkTreeLock ();
35430 if (curParent !== this) {
35431 if (index == -1) {
35432 this.component.add (comp);
35433 } else {
35434 this.component.add (index, comp);
35435 }comp.parent = this;
35436 this.adjustListeningChildren (32768, comp.numListening (32768));
35437 this.adjustListeningChildren (65536, comp.numListening (65536));
35438 this.adjustDescendants (comp.countHierarchyMembers ());
35439 } else {
35440 if (index < this.component.size ()) {
35441 this.component.set (index, comp);
35442 }}this.invalidateIfValid ();
35443 if (this.peer != null) {
35444 if (comp.peer == null) {
35445 comp.addNotify ();
35446 } else {
35447 var newNativeContainer = this.getHeavyweightContainer ();
35448 var oldNativeContainer = curParent.getHeavyweightContainer ();
35449 if (oldNativeContainer !== newNativeContainer) {
35450 newNativeContainer.reparentChild (comp);
35451 }if (!comp.isLightweight () && this.isLightweight ()) {
35452 comp.relocateComponent ();
35453 }}}if (curParent !== this) {
35454 if (this.layoutMgr != null) {
35455 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35456 (this.layoutMgr).addLayoutComponent (comp, null);
35457 } else {
35458 this.layoutMgr.addLayoutComponent (null, comp);
35459 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35460 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35461 this.dispatchEvent (e);
35462 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35463 } else {
35464 comp.createHierarchyEvents (1400, comp, this, 1400, java.awt.Toolkit.enabledOnToolkit (32768));
35465 }if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35466 this.updateCursorImmediately ();
35467 }}, "java.awt.Component,java.awt.Container,~N");
35468 Clazz_defineMethod (c$, "checkTreeLock", 
35469  function () {
35470 });
35471 Clazz_defineMethod (c$, "getComponentZOrder", 
35472 function (comp) {
35473 if (comp == null) {
35474 return -1;
35475 }{
35476 if (comp.parent !== this) {
35477 return -1;
35478 }return this.component.indexOf (comp);
35479 }}, "java.awt.Component");
35480 Clazz_defineMethod (c$, "add", 
35481 function (comp, constraints) {
35482 this.addImpl (comp, constraints, -1);
35483 }, "java.awt.Component,~O");
35484 Clazz_defineMethod (c$, "add", 
35485 function (comp, constraints, index) {
35486 return this.addImpl (comp, constraints, index);
35487 }, "java.awt.Component,~O,~N");
35488 Clazz_defineMethod (c$, "addImpl", 
35489 function (comp, constraints, index) {
35490 return this.addImplSAEM (comp, constraints, index);
35491 }, "java.awt.Component,~O,~N");
35492 Clazz_defineMethod (c$, "addImplSAEM", 
35493 function (comp, constraints, index) {
35494 {
35495 if (index > this.component.size () || (index < 0 && index != -1)) {
35496 throw  new IllegalArgumentException ("illegal component position");
35497 }this.checkAddToSelf (comp);
35498 this.checkNotAWindow (comp);
35499 if (comp.parent != null) {
35500 comp.parent.remove (comp);
35501 if (index > this.component.size ()) {
35502 throw  new IllegalArgumentException ("illegal component position");
35503 }}if (index == -1) {
35504 this.component.add (comp);
35505 } else {
35506 this.component.add (index, comp);
35507 }comp.parent = this;
35508 this.adjustListeningChildren (32768, comp.numListening (32768));
35509 this.adjustListeningChildren (65536, comp.numListening (65536));
35510 this.adjustDescendants (comp.countHierarchyMembers ());
35511 this.invalidateIfValid ();
35512 if (this.peer != null) {
35513 comp.addNotify ();
35514 }if (this.layoutMgr != null) {
35515 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35516 (this.layoutMgr).addLayoutComponent (comp, constraints);
35517 } else if (Clazz_instanceOf (constraints, String)) {
35518 this.layoutMgr.addLayoutComponent (constraints, comp);
35519 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35520 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35521 this.dispatchEvent (e);
35522 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35523 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35524 this.updateCursorImmediately ();
35525 }}return comp;
35526 }, "java.awt.Component,~O,~N");
35527 Clazz_defineMethod (c$, "checkGD", 
35528 function (stringID) {
35529 }, "~S");
35530 Clazz_defineMethod (c$, "remove", 
35531 function (index) {
35532 this.removeInt (index);
35533 }, "~N");
35534 Clazz_defineMethod (c$, "removeInt", 
35535 function (index) {
35536 {
35537 if (index < 0 || index >= this.component.size ()) {
35538 throw  new ArrayIndexOutOfBoundsException (index);
35539 }var comp = this.component.get (index);
35540 if (this.peer != null) {
35541 comp.removeNotify ();
35542 }if (this.layoutMgr != null) {
35543 this.layoutMgr.removeLayoutComponent (comp);
35544 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35545 this.adjustListeningChildren (65536, -comp.numListening (65536));
35546 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35547 comp.parent = null;
35548 this.component.remove (index);
35549 this.invalidateIfValid ();
35550 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35551 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35552 this.dispatchEvent (e);
35553 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35554 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35555 this.updateCursorImmediately ();
35556 }}}, "~N");
35557 Clazz_defineMethod (c$, "remove", 
35558 function (comp) {
35559 this.removeChild (comp);
35560 }, "java.awt.Component");
35561 Clazz_defineMethod (c$, "removeChild", 
35562 function (comp) {
35563 {
35564 if (comp.parent === this) {
35565 var index = this.component.indexOf (comp);
35566 if (index >= 0) {
35567 this.remove (index);
35568 }}}}, "java.awt.Component");
35569 Clazz_defineMethod (c$, "removeAll", 
35570 function () {
35571 {
35572 this.adjustListeningChildren (32768, -this.listeningChildren);
35573 this.adjustListeningChildren (65536, -this.listeningBoundsChildren);
35574 this.adjustDescendants (-this.descendantsCount);
35575 while (!this.component.isEmpty ()) {
35576 var comp = this.component.remove (this.component.size () - 1);
35577 if (this.peer != null) {
35578 comp.removeNotify ();
35579 }if (this.layoutMgr != null) {
35580 this.layoutMgr.removeLayoutComponent (comp);
35581 }comp.parent = null;
35582 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35583 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35584 this.dispatchEvent (e);
35585 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35586 }
35587 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35588 this.updateCursorImmediately ();
35589 }this.invalidateIfValid ();
35590 }});
35591 Clazz_defineMethod (c$, "numListening", 
35592 function (mask) {
35593 var superListening = this.numListeningMask (mask);
35594 if (mask == 32768) {
35595 return this.listeningChildren + superListening;
35596 } else if (mask == 65536) {
35597 return this.listeningBoundsChildren + superListening;
35598 } else {
35599 return superListening;
35600 }}, "~N");
35601 Clazz_defineMethod (c$, "adjustListeningChildren", 
35602 function (mask, num) {
35603 if (num == 0) return;
35604 if ((mask & 32768) != 0) {
35605 this.listeningChildren += num;
35606 }if ((mask & 65536) != 0) {
35607 this.listeningBoundsChildren += num;
35608 }this.adjustListeningChildrenOnParent (mask, num);
35609 }, "~N,~N");
35610 Clazz_defineMethod (c$, "adjustDescendants", 
35611 function (num) {
35612 if (num == 0) return;
35613 this.descendantsCount += num;
35614 this.adjustDecendantsOnParent (num);
35615 }, "~N");
35616 Clazz_defineMethod (c$, "adjustDecendantsOnParent", 
35617 function (num) {
35618 if (this.parent != null) {
35619 this.parent.adjustDescendants (num);
35620 }}, "~N");
35621 Clazz_defineMethod (c$, "countHierarchyMembers", 
35622 function () {
35623 return this.descendantsCount + 1;
35624 });
35625 Clazz_defineMethod (c$, "getListenersCount", 
35626  function (id, enabledOnToolkit) {
35627 if (enabledOnToolkit) {
35628 return this.descendantsCount;
35629 }switch (id) {
35630 case 1400:
35631 return this.listeningChildren;
35632 case 1401:
35633 case 1402:
35634 return this.listeningBoundsChildren;
35635 default:
35636 return 0;
35637 }
35638 }, "~N,~B");
35639 Clazz_defineMethod (c$, "createHierarchyEvents", 
35640 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
35641 var listeners = this.getListenersCount (id, enabledOnToolkit);
35642 for (var count = listeners, i = 0; count > 0; i++) {
35643 count -= this.component.get (i).createHierarchyEvents (id, changed, changedParent, changeFlags, enabledOnToolkit);
35644 }
35645 return listeners + this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
35646 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
35647 Clazz_defineMethod (c$, "createChildHierarchyEvents", 
35648 function (id, changeFlags, enabledOnToolkit) {
35649 if (this.component.isEmpty ()) {
35650 return;
35651 }var listeners = this.getListenersCount (id, enabledOnToolkit);
35652 for (var count = listeners, i = 0; count > 0; i++) {
35653 count -= this.component.get (i).createHierarchyEvents (id, this, this.parent, changeFlags, enabledOnToolkit);
35654 }
35655 }, "~N,~N,~B");
35656 Clazz_defineMethod (c$, "getLayout", 
35657 function () {
35658 return this.layoutMgr;
35659 });
35660 Clazz_defineMethod (c$, "setLayout", 
35661 function (mgr) {
35662 this.layoutMgr = mgr;
35663 this.invalidateIfValid ();
35664 }, "java.awt.LayoutManager");
35665 Clazz_overrideMethod (c$, "doLayout", 
35666 function () {
35667 this.layout ();
35668 });
35669 Clazz_overrideMethod (c$, "layout", 
35670 function () {
35671 var layoutMgr = this.layoutMgr;
35672 if (layoutMgr != null) {
35673 layoutMgr.layoutContainer (this);
35674 }});
35675 Clazz_overrideMethod (c$, "invalidate", 
35676 function () {
35677 var layoutMgr = this.layoutMgr;
35678 if (Clazz_instanceOf (layoutMgr, java.awt.LayoutManager2)) {
35679 var lm = layoutMgr;
35680 lm.invalidateLayout (this);
35681 }this.invalidateComp ();
35682 });
35683 Clazz_overrideMethod (c$, "validate", 
35684 function () {
35685 if (!this.isValid ()) {
35686 var updateCur = false;
35687 {
35688 if (!this.isValid () && this.peer != null) {
35689 var p = null;
35690 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35691 p = this.peer;
35692 }if (p != null) {
35693 p.beginValidate ();
35694 }this.validateTree ();
35695 if (p != null) {
35696 p.endValidate ();
35697 updateCur = this.isVisible ();
35698 }}}if (updateCur) {
35699 this.updateCursorImmediately ();
35700 }}});
35701 Clazz_defineMethod (c$, "validateTree", 
35702 function () {
35703 if (!this.isValid ()) {
35704 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35705 (this.peer).beginLayout ();
35706 }this.doLayout ();
35707 for (var i = 0; i < this.component.size (); i++) {
35708 var comp = this.component.get (i);
35709 if ((Clazz_instanceOf (comp, java.awt.Container)) && !(Clazz_instanceOf (comp, java.awt.Window)) && !comp.isValid ()) {
35710 (comp).validateTree ();
35711 } else {
35712 comp.validate ();
35713 }}
35714 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35715 (this.peer).endLayout ();
35716 }}this.validateComponent ();
35717 });
35718 Clazz_defineMethod (c$, "invalidateTree", 
35719 function () {
35720 {
35721 for (var i = 0; i < this.component.size (); i++) {
35722 var comp = this.component.get (i);
35723 if (Clazz_instanceOf (comp, java.awt.Container)) {
35724 (comp).invalidateTree ();
35725 } else {
35726 comp.invalidateIfValid ();
35727 }}
35728 this.invalidateIfValid ();
35729 }});
35730 Clazz_overrideMethod (c$, "setFont", 
35731 function (f) {
35732 var oldfont = this.getFont ();
35733 this.setFontComp (f);
35734 var newfont = this.getFont ();
35735 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
35736 this.invalidateTree ();
35737 }}, "java.awt.Font");
35738 Clazz_overrideMethod (c$, "getPreferredSize", 
35739 function () {
35740 return this.preferredSize ();
35741 });
35742 Clazz_overrideMethod (c$, "preferredSize", 
35743 function () {
35744 var dim = this.prefSize;
35745 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
35746 {
35747 this.prefSize = (this.layoutMgr != null) ? this.layoutMgr.preferredLayoutSize (this) : this.prefSizeComp ();
35748 dim = this.prefSize;
35749 }}return (dim == null ? null :  new java.awt.Dimension (dim));
35750 });
35751 Clazz_overrideMethod (c$, "getMinimumSize", 
35752 function () {
35753 var dim = this.minSize;
35754 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
35755 {
35756 this.minSize = (this.layoutMgr != null) ? this.layoutMgr.minimumLayoutSize (this) : this.minimumSize ();
35757 dim = this.minSize;
35758 }}if (dim != null) {
35759 return  new java.awt.Dimension (dim);
35760 } else {
35761 return dim;
35762 }});
35763 Clazz_overrideMethod (c$, "getMaximumSize", 
35764 function () {
35765 var dim = this.maxSize;
35766 if (dim == null || !(this.isMaximumSizeSet () || this.isValid ())) {
35767 {
35768 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35769 var lm = this.layoutMgr;
35770 this.maxSize = lm.maximumLayoutSize (this);
35771 } else {
35772 this.maxSize = this.getMaxSizeComp ();
35773 }dim = this.maxSize;
35774 }}if (dim != null) {
35775 return  new java.awt.Dimension (dim);
35776 } else {
35777 return dim;
35778 }});
35779 Clazz_overrideMethod (c$, "getAlignmentX", 
35780 function () {
35781 var xAlign;
35782 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35783 {
35784 var lm = this.layoutMgr;
35785 xAlign = lm.getLayoutAlignmentX (this);
35786 }} else {
35787 xAlign = this.getAlignmentXComp ();
35788 }return xAlign;
35789 });
35790 Clazz_overrideMethod (c$, "getAlignmentY", 
35791 function () {
35792 var yAlign;
35793 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35794 {
35795 var lm = this.layoutMgr;
35796 yAlign = lm.getLayoutAlignmentY (this);
35797 }} else {
35798 yAlign = this.getAlignmentYComp ();
35799 }return yAlign;
35800 });
35801 Clazz_overrideMethod (c$, "paint", 
35802 function (g) {
35803 java.awt.GraphicsCallback.PaintCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 2);
35804 }, "java.awt.Graphics");
35805 Clazz_overrideMethod (c$, "update", 
35806 function (g) {
35807 if (this.isShowing ()) {
35808 g.clearRect (0, 0, this.width, this.height);
35809 this.paint (g);
35810 }}, "java.awt.Graphics");
35811 Clazz_defineMethod (c$, "paintComponents", 
35812 function (g) {
35813 if (this.isShowing ()) {
35814 java.awt.GraphicsCallback.PaintAllCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 4);
35815 }}, "java.awt.Graphics");
35816 Clazz_overrideMethod (c$, "lightweightPaint", 
35817 function (g) {
35818 this.lwPaintComp (g);
35819 this.paintHeavyweightComponents (g);
35820 }, "java.awt.Graphics");
35821 Clazz_overrideMethod (c$, "paintHeavyweightComponents", 
35822 function (g) {
35823 if (this.isShowing ()) {
35824 java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 3);
35825 }}, "java.awt.Graphics");
35826 Clazz_defineMethod (c$, "addContainerListener", 
35827 function (l) {
35828 if (l == null) {
35829 return;
35830 }this.containerListener = java.awt.AWTEventMulticaster.add (this.containerListener, l);
35831 this.newEventsOnly = true;
35832 }, "java.awt.event.ContainerListener");
35833 Clazz_defineMethod (c$, "removeContainerListener", 
35834 function (l) {
35835 if (l == null) {
35836 return;
35837 }this.containerListener = java.awt.AWTEventMulticaster.remove (this.containerListener, l);
35838 }, "java.awt.event.ContainerListener");
35839 Clazz_defineMethod (c$, "getContainerListeners", 
35840 function () {
35841 return (this.getListeners (java.awt.event.ContainerListener));
35842 });
35843 Clazz_overrideMethod (c$, "getListeners", 
35844 function (listenerType) {
35845 var l = null;
35846 if (listenerType === java.awt.event.ContainerListener) {
35847 l = this.containerListener;
35848 } else {
35849 return this.getListenersComp (listenerType);
35850 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
35851 }, "Class");
35852 Clazz_overrideMethod (c$, "eventEnabled", 
35853 function (e) {
35854 var id = e.getID ();
35855 if (id == 300 || id == 301) {
35856 if ((this.eventMask & 2) != 0 || this.containerListener != null) {
35857 return true;
35858 }return false;
35859 }return this.eventTypeEnabled (e.id);
35860 }, "java.awt.AWTEvent");
35861 Clazz_overrideMethod (c$, "processEvent", 
35862 function (e) {
35863 this.processEventCont (e);
35864 }, "java.awt.AWTEvent");
35865 Clazz_defineMethod (c$, "processEventCont", 
35866 function (e) {
35867 if (Clazz_instanceOf (e, java.awt.event.ContainerEvent)) {
35868 this.processContainerEvent (e);
35869 return;
35870 }this.processEventComp (e);
35871 }, "java.awt.AWTEvent");
35872 Clazz_defineMethod (c$, "processContainerEvent", 
35873 function (e) {
35874 var listener = this.containerListener;
35875 if (listener != null) {
35876 switch (e.getID ()) {
35877 case 300:
35878 listener.componentAdded (e);
35879 break;
35880 case 301:
35881 listener.componentRemoved (e);
35882 break;
35883 }
35884 }}, "java.awt.event.ContainerEvent");
35885 Clazz_overrideMethod (c$, "dispatchEventImpl", 
35886 function (e) {
35887 if ((this.dispatcher != null) && this.dispatcher.dispatchEvent (e)) {
35888 e.consume ();
35889 if (this.peer != null) {
35890 this.peer.handleEvent (e);
35891 }return;
35892 }this.dispatchEventImplComp (e);
35893 {
35894 switch (e.getID ()) {
35895 case 101:
35896 break;
35897 case 100:
35898 break;
35899 default:
35900 break;
35901 }
35902 }}, "java.awt.AWTEvent");
35903 Clazz_defineMethod (c$, "dispatchEventToSelf", 
35904 function (e) {
35905 this.dispatchEventImplComp (e);
35906 }, "java.awt.AWTEvent");
35907 Clazz_defineMethod (c$, "getMouseEventTarget", 
35908  function (x, y, includeSelf, filter, searchHeavyweights) {
35909 {
35910 if (arguments.length == 3) {
35911 filter = java.awt.Container.MouseEventTargetFilter.FILTER;
35912 searchHeavyWeights = false;
35913 }
35914 }var comp = null;
35915 if (comp == null || comp === this) {
35916 comp = this.getMouseEventTargetImpl (x, y, includeSelf, filter, false, searchHeavyweights);
35917 }return comp;
35918 }, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B");
35919 Clazz_defineMethod (c$, "getMouseEventTargetImpl", 
35920  function (x, y, includeSelf, filter, searchHeavyweightChildren, searchHeavyweightDescendants) {
35921 {
35922 for (var i = 0; i < this.component.size (); i++) {
35923 var comp = this.component.get (i);
35924 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)) {
35925 if (Clazz_instanceOf (comp, java.awt.Container)) {
35926 var child = comp;
35927 var deeper = child.getMouseEventTarget (x - child.x, y - child.y, includeSelf, filter, searchHeavyweightDescendants);
35928 if (deeper != null) {
35929 return deeper;
35930 }} else {
35931 if (filter.accept (comp)) {
35932 return comp;
35933 }}}}
35934 var isPeerOK;
35935 var isMouseOverMe;
35936 isPeerOK = includeSelf;
35937 isMouseOverMe = this.contains (x, y);
35938 if (isMouseOverMe && isPeerOK && filter.accept (this)) {
35939 return this;
35940 }return null;
35941 }}, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B,~B");
35942 Clazz_defineMethod (c$, "proxyEnableEvents", 
35943 function (events) {
35944 if (this.parent != null) {
35945 this.parent.proxyEnableEvents (events);
35946 }if (this.dispatcher != null) {
35947 this.dispatcher.enableEvents (events);
35948 }}, "~N");
35949 Clazz_defineMethod (c$, "deliverEvent", 
35950 function (e) {
35951 var comp = this.getComponentAt (e.x, e.y);
35952 if ((comp != null) && (comp !== this)) {
35953 e.translate (-comp.x, -comp.y);
35954 comp.deliverEvent (e);
35955 } else {
35956 this.postEvent (e);
35957 }}, "java.awt.Event");
35958 Clazz_defineMethod (c$, "getComponentAt", 
35959 function (x, y) {
35960 return this.locate (x, y);
35961 }, "~N,~N");
35962 Clazz_overrideMethod (c$, "locate", 
35963 function (x, y) {
35964 return this;
35965 }, "~N,~N");
35966 Clazz_defineMethod (c$, "getComponentAt", 
35967 function (p) {
35968 return this.getComponentAt (p.x, p.y);
35969 }, "java.awt.Point");
35970 Clazz_defineMethod (c$, "getMousePosition", 
35971 function (allowChildren) {
35972 return null;
35973 }, "~B");
35974 Clazz_overrideMethod (c$, "isSameOrAncestorOf", 
35975 function (comp, allowChildren) {
35976 return this === comp || (allowChildren && this.isParentOf (comp));
35977 }, "java.awt.Component,~B");
35978 Clazz_defineMethod (c$, "findComponentAt", 
35979 function (x, y) {
35980 {
35981 return this.findComponentAt (x, y, true);
35982 }}, "~N,~N");
35983 Clazz_defineMethod (c$, "findComponentAt", 
35984 function (x, y, ignoreEnabled) {
35985 return null;
35986 }, "~N,~N,~B");
35987 Clazz_defineMethod (c$, "findComponentAt", 
35988 function (p) {
35989 return this.findComponentAt (p.x, p.y);
35990 }, "java.awt.Point");
35991 Clazz_defineMethod (c$, "addNotify", 
35992 function () {
35993 {
35994 this.addNotifyComp ();
35995 if (!(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35996 this.setDispatcher ();
35997 }for (var i = 0; i < this.component.size (); i++) {
35998 this.component.get (i).addNotify ();
35999 }
36000 }});
36001 Clazz_defineMethod (c$, "setDispatcher", 
36002 function () {
36003 this.dispatcher =  new java.awt.LightweightDispatcher (this);
36004 });
36005 Clazz_defineMethod (c$, "removeNotify", 
36006 function () {
36007 for (var i = this.component.size () - 1; i >= 0; i--) {
36008 var comp = this.component.get (i);
36009 if (comp != null) {
36010 comp.setAutoFocusTransferOnDisposal (false);
36011 comp.removeNotify ();
36012 comp.setAutoFocusTransferOnDisposal (true);
36013 }}
36014 if (this.dispatcher != null) {
36015 this.dispatcher.dispose ();
36016 this.dispatcher = null;
36017 }this.removeNotifyComp ();
36018 });
36019 Clazz_defineMethod (c$, "isAncestorOf", 
36020 function (c) {
36021 var p;
36022 if (c == null || ((p = c.getParent ()) == null)) {
36023 return false;
36024 }while (p != null) {
36025 if (p === this) {
36026 return true;
36027 }p = p.getParent ();
36028 }
36029 return false;
36030 }, "java.awt.Component");
36031 Clazz_overrideMethod (c$, "paramString", 
36032 function () {
36033 var str = this.paramStringComp ();
36034 var layoutMgr = this.layoutMgr;
36035 if (layoutMgr != null) {
36036 str += ",layout=" + layoutMgr.getClass ().getName ();
36037 }return str;
36038 });
36039 Clazz_defineMethod (c$, "setFocusTraversalKeys", 
36040 function (id, keystrokes) {
36041 }, "~N,java.util.Set");
36042 Clazz_defineMethod (c$, "getFocusTraversalKeys", 
36043 function (id) {
36044 return null;
36045 }, "~N");
36046 Clazz_defineMethod (c$, "areFocusTraversalKeysSet", 
36047 function (id) {
36048 return false;
36049 }, "~N");
36050 Clazz_defineMethod (c$, "isFocusCycleRoot", 
36051 function (container) {
36052 if (this.isFocusCycleRoot () && container === this) {
36053 return true;
36054 } else {
36055 return this.isFocusCycleRootComp (container);
36056 }}, "java.awt.Container");
36057 Clazz_overrideMethod (c$, "containsFocus", 
36058 function () {
36059 return false;
36060 });
36061 Clazz_defineMethod (c$, "isParentOf", 
36062  function (comp) {
36063 {
36064 while (comp != null && comp !== this && !(Clazz_instanceOf (comp, java.awt.Window))) {
36065 comp = comp.getParent ();
36066 }
36067 return (comp === this);
36068 }}, "java.awt.Component");
36069 Clazz_defineMethod (c$, "clearMostRecentFocusOwnerOnHide", 
36070 function () {
36071 });
36072 Clazz_overrideMethod (c$, "clearCurrentFocusCycleRootOnHide", 
36073 function () {
36074 });
36075 Clazz_defineMethod (c$, "getTraversalRoot", 
36076 function () {
36077 return null;
36078 });
36079 Clazz_defineMethod (c$, "isFocusCycleRoot", 
36080 function () {
36081 return this.focusCycleRoot;
36082 });
36083 Clazz_defineMethod (c$, "setFocusTraversalPolicyProvider", 
36084 function (provider) {
36085 var oldProvider;
36086 {
36087 oldProvider = this.focusTraversalPolicyProvider;
36088 this.focusTraversalPolicyProvider = provider;
36089 }this.firePropertyChangeBool ("focusTraversalPolicyProvider", oldProvider, provider);
36090 }, "~B");
36091 Clazz_defineMethod (c$, "isFocusTraversalPolicyProvider", 
36092 function () {
36093 return this.focusTraversalPolicyProvider;
36094 });
36095 Clazz_defineMethod (c$, "transferFocusDownCycle", 
36096 function () {
36097 });
36098 Clazz_defineMethod (c$, "preProcessKeyEvent", 
36099 function (e) {
36100 var parent = this.parent;
36101 if (parent != null) {
36102 parent.preProcessKeyEvent (e);
36103 }}, "java.awt.event.KeyEvent");
36104 Clazz_defineMethod (c$, "postProcessKeyEvent", 
36105 function (e) {
36106 var parent = this.parent;
36107 if (parent != null) {
36108 parent.postProcessKeyEvent (e);
36109 }}, "java.awt.event.KeyEvent");
36110 Clazz_overrideMethod (c$, "postsOldMouseEvents", 
36111 function () {
36112 return true;
36113 });
36114 Clazz_defineMethod (c$, "applyComponentOrientation", 
36115 function (o) {
36116 this.applyCompOrientComp (o);
36117 {
36118 for (var i = 0; i < this.component.size (); i++) {
36119 var comp = this.component.get (i);
36120 comp.applyComponentOrientation (o);
36121 }
36122 }}, "java.awt.ComponentOrientation");
36123 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36124 function (listener) {
36125 this.addPropChangeListenerComp (listener);
36126 }, "java.beans.PropertyChangeListener");
36127 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36128 function (propertyName, listener) {
36129 this.addPropChangeListComp (propertyName, listener);
36130 }, "~S,java.beans.PropertyChangeListener");
36131 Clazz_defineMethod (c$, "increaseComponentCount", 
36132 function (c) {
36133 if (!c.isDisplayable ()) {
36134 throw  new IllegalStateException ("Peer does not exist while invoking the increaseComponentCount() method");
36135 }var addHW = 0;
36136 var addLW = 0;
36137 if (Clazz_instanceOf (c, java.awt.Container)) {
36138 addLW = (c).numOfLWComponents;
36139 addHW = (c).numOfHWComponents;
36140 }if (c.isLightweight ()) {
36141 addLW++;
36142 } else {
36143 addHW++;
36144 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36145 cont.numOfLWComponents += addLW;
36146 cont.numOfHWComponents += addHW;
36147 }
36148 }, "java.awt.Component");
36149 Clazz_defineMethod (c$, "decreaseComponentCount", 
36150 function (c) {
36151 if (!c.isDisplayable ()) {
36152 throw  new IllegalStateException ("Peer does not exist while invoking the decreaseComponentCount() method");
36153 }var subHW = 0;
36154 var subLW = 0;
36155 if (Clazz_instanceOf (c, java.awt.Container)) {
36156 subLW = (c).numOfLWComponents;
36157 subHW = (c).numOfHWComponents;
36158 }if (c.isLightweight ()) {
36159 subLW++;
36160 } else {
36161 subHW++;
36162 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36163 cont.numOfLWComponents -= subLW;
36164 cont.numOfHWComponents -= subHW;
36165 }
36166 }, "java.awt.Component");
36167 Clazz_declareInterface (java.awt.Container, "EventTargetFilter");
36168 Clazz_pu$h(self.c$);
36169 c$ = Clazz_declareType (java.awt.Container, "MouseEventTargetFilter", null, java.awt.Container.EventTargetFilter);
36170 Clazz_makeConstructor (c$, 
36171  function () {
36172 });
36173 Clazz_overrideMethod (c$, "accept", 
36174 function (a) {
36175 return (a.eventMask & 32) != 0 || (a.eventMask & 16) != 0 || (a.eventMask & 131072) != 0 || a.mouseListener != null || a.mouseMotionListener != null || a.mouseWheelListener != null;
36176 }, "java.awt.Component");
36177 c$.FILTER = c$.prototype.FILTER =  new java.awt.Container.MouseEventTargetFilter ();
36178 c$ = Clazz_p0p ();
36179 c$.EMPTY_ARRAY = c$.prototype.EMPTY_ARRAY =  new Array (0);
36180 Clazz_defineStatics (c$,
36181 "INCLUDE_SELF", true,
36182 "SEARCH_HEAVYWEIGHTS", true);
36183 c$ = Clazz_decorateAsClass (function () {
36184 this.nativeContainer = null;
36185 this.mouseEventTarget = null;
36186 this.targetLastEntered = null;
36187 this.isMouseInNativeContainer = false;
36188 this.eventMask = 0;
36189 Clazz_instantialize (this, arguments);
36190 }, java.awt, "LightweightDispatcher", null, java.awt.event.AWTEventListener);
36191 Clazz_makeConstructor (c$, 
36192 function (nativeContainer) {
36193 this.nativeContainer = nativeContainer;
36194 this.mouseEventTarget = null;
36195 this.eventMask = 0;
36196 }, "java.awt.Container");
36197 Clazz_defineMethod (c$, "dispose", 
36198 function () {
36199 this.stopListeningForOtherDrags ();
36200 this.mouseEventTarget = null;
36201 });
36202 Clazz_defineMethod (c$, "enableEvents", 
36203 function (events) {
36204 this.eventMask |= events;
36205 }, "~N");
36206 Clazz_defineMethod (c$, "dispatchEvent", 
36207 function (e) {
36208 var ret = false;
36209 if (Clazz_instanceOf (e, java.awt.event.MouseEvent) && (this.eventMask & 131120) != 0) {
36210 var me = e;
36211 ret = this.processMouseEvent (me);
36212 }return ret;
36213 }, "java.awt.AWTEvent");
36214 Clazz_defineMethod (c$, "isMouseGrab", 
36215  function (e) {
36216 var modifiers = e.getModifiersEx ();
36217 if (e.getID () == 501 || e.getID () == 502) {
36218 switch (e.getButton ()) {
36219 case 1:
36220 modifiers ^= 1024;
36221 break;
36222 case 2:
36223 modifiers ^= 2048;
36224 break;
36225 case 3:
36226 modifiers ^= 4096;
36227 break;
36228 }
36229 }return ((modifiers & (7168)) != 0);
36230 }, "java.awt.event.MouseEvent");
36231 Clazz_defineMethod (c$, "processMouseEvent", 
36232  function (e) {
36233 var id = e.getID ();
36234 var mouseOver = this.nativeContainer.getMouseEventTarget (e.getX (), e.getY (), true);
36235 this.trackMouseEnterExit (mouseOver, e);
36236 if (!this.isMouseGrab (e) && id != 500) {
36237 this.mouseEventTarget = (mouseOver !== this.nativeContainer) ? mouseOver : null;
36238 }if (this.mouseEventTarget != null) {
36239 switch (id) {
36240 case 504:
36241 case 505:
36242 break;
36243 case 501:
36244 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36245 break;
36246 case 502:
36247 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36248 break;
36249 case 500:
36250 if (mouseOver === this.mouseEventTarget) {
36251 this.retargetMouseEvent (mouseOver, id, e);
36252 }break;
36253 case 503:
36254 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36255 break;
36256 case 506:
36257 if (this.isMouseGrab (e)) {
36258 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36259 }break;
36260 case 507:
36261 this.retargetMouseEvent (mouseOver, id, e);
36262 break;
36263 }
36264 e.consume ();
36265 }return e.isConsumed ();
36266 }, "java.awt.event.MouseEvent");
36267 Clazz_defineMethod (c$, "trackMouseEnterExit", 
36268  function (targetOver, e) {
36269 var targetEnter = null;
36270 var id = e.getID ();
36271 if (id != 505 && id != 506 && id != 1500 && this.isMouseInNativeContainer == false) {
36272 this.isMouseInNativeContainer = true;
36273 this.startListeningForOtherDrags ();
36274 } else if (id == 505) {
36275 this.isMouseInNativeContainer = false;
36276 this.stopListeningForOtherDrags ();
36277 }if (this.isMouseInNativeContainer) {
36278 targetEnter = targetOver;
36279 }if (this.targetLastEntered === targetEnter) {
36280 return;
36281 }if (this.targetLastEntered != null) {
36282 this.retargetMouseEvent (this.targetLastEntered, 505, e);
36283 }if (id == 505) {
36284 e.consume ();
36285 }if (targetEnter != null) {
36286 this.retargetMouseEvent (targetEnter, 504, e);
36287 }if (id == 504) {
36288 e.consume ();
36289 }this.targetLastEntered = targetEnter;
36290 }, "java.awt.Component,java.awt.event.MouseEvent");
36291 Clazz_defineMethod (c$, "startListeningForOtherDrags", 
36292  function () {
36293 });
36294 Clazz_defineMethod (c$, "stopListeningForOtherDrags", 
36295  function () {
36296 });
36297 Clazz_overrideMethod (c$, "eventDispatched", 
36298 function (e) {
36299 var isForeignDrag = (Clazz_instanceOf (e, java.awt.event.MouseEvent)) && (e.id == 506) && (e.getSource () !== this.nativeContainer);
36300 if (!isForeignDrag) {
36301 return;
36302 }var srcEvent = e;
36303 var me;
36304 {
36305 var srcComponent = srcEvent.getComponent ();
36306 if (!srcComponent.isShowing ()) {
36307 return;
36308 }var c = this.nativeContainer;
36309 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
36310 c = c.getParent_NoClientCode ();
36311 }
36312 if ((c == null) || (c).isModalBlocked ()) {
36313 return;
36314 }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 ());
36315 (srcEvent).copyPrivateDataInto (me);
36316 }var targetOver = this.nativeContainer.getMouseEventTarget (me.getX (), me.getY (), true);
36317 this.trackMouseEnterExit (targetOver, me);
36318 }, "java.awt.AWTEvent");
36319 Clazz_defineMethod (c$, "retargetMouseEvent", 
36320 function (target, id, e) {
36321 if (target == null) {
36322 return;
36323 }var x = e.getX ();
36324 var y = e.getY ();
36325 var component;
36326 for (component = target; component != null && component !== this.nativeContainer; component = component.getParent ()) {
36327 x -= component.x;
36328 y -= component.y;
36329 }
36330 var retargeted;
36331 if (component != null) {
36332 if (id == 507) {
36333 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 ());
36334 } else {
36335 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 ());
36336 }(e).copyPrivateDataInto (retargeted);
36337 if (target === this.nativeContainer) {
36338 (target).dispatchEventToSelf (retargeted);
36339 } else {
36340 if (this.nativeContainer.modalComp != null) {
36341 if ((this.nativeContainer.modalComp).isAncestorOf (target)) {
36342 target.dispatchEvent (retargeted);
36343 } else {
36344 e.consume ();
36345 }} else {
36346 target.dispatchEvent (retargeted);
36347 }}}}, "java.awt.Component,~N,java.awt.event.MouseEvent");
36348 Clazz_defineStatics (c$,
36349 "LWD_MOUSE_DRAGGED_OVER", 1500,
36350 "MOUSE_MASK", 131120);
36351 });
36352 Clazz_declarePackage ("java.awt");
36353 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 () {
36354 c$ = Clazz_decorateAsClass (function () {
36355 this.threadGroup = null;
36356 this.myThread = null;
36357 this.peer = null;
36358 this.parent = null;
36359 this.appContext = null;
36360 this.x = 0;
36361 this.y = 0;
36362 this.width = 0;
36363 this.height = 0;
36364 this.foreground = null;
36365 this.background = null;
36366 this.font = null;
36367 this.peerFont = null;
36368 this.cursor = null;
36369 this.locale = null;
36370 this.visible = true;
36371 this.enabled = true;
36372 this.valid = false;
36373 this.popups = null;
36374 this.name = null;
36375 this.nameExplicitlySet = false;
36376 this.focusable = true;
36377 this.$isFocusTraversableOverridden = 0;
36378 this.focusTraversalKeysEnabled = false;
36379 this.minSize = null;
36380 this.minSizeSet = false;
36381 this.prefSize = null;
36382 this.prefSizeSet = false;
36383 this.maxSize = null;
36384 this.maxSizeSet = false;
36385 this.componentOrientation = null;
36386 this.newEventsOnly = false;
36387 this.componentListener = null;
36388 this.focusListener = null;
36389 this.hierarchyListener = null;
36390 this.hierarchyBoundsListener = null;
36391 this.keyListener = null;
36392 this.mouseListener = null;
36393 this.mouseMotionListener = null;
36394 this.mouseWheelListener = null;
36395 this.inputMethodListener = null;
36396 this.windowClosingException = null;
36397 this.eventMask = 4096;
36398 this.changeSupport = null;
36399 this.changeSupportLock = null;
36400 this.isPacked = false;
36401 this.boundsOp = 3;
36402 this.isAddNotifyComplete = false;
36403 this.backgroundEraseDisabled = false;
36404 this.htmlName = null;
36405 this.num = 0;
36406 this.graphicsConfig = null;
36407 this.eventCache = null;
36408 this.coalescingEnabled = false;
36409 this.autoFocusTransferOnDisposal = true;
36410 Clazz_instantialize (this, arguments);
36411 }, java.awt, "Component", null, java.awt.image.ImageObserver);
36412 Clazz_prepareFields (c$, function () {
36413 this.componentOrientation = java.awt.ComponentOrientation.UNKNOWN;
36414 this.changeSupportLock =  new Clazz._O ();
36415 this.coalescingEnabled = this.checkCoalescing ();
36416 });
36417 Clazz_defineMethod (c$, "getAppContext", 
36418 function () {
36419 return this.appContext;
36420 });
36421 Clazz_defineMethod (c$, "getChangeSupportLock", 
36422  function () {
36423 return this.changeSupportLock;
36424 });
36425 Clazz_defineMethod (c$, "getBoundsOp", 
36426 function () {
36427 return this.boundsOp;
36428 });
36429 Clazz_defineMethod (c$, "setBoundsOp", 
36430 function (op) {
36431 if (op == 5) {
36432 this.boundsOp = 3;
36433 } else if (this.boundsOp == 3) {
36434 this.boundsOp = op;
36435 }}, "~N");
36436 Clazz_makeConstructor (c$, 
36437 function () {
36438 this.setAppContext ();
36439 });
36440 Clazz_defineMethod (c$, "setAppContext", 
36441 function () {
36442 this.appContext = jssun.awt.AppContext.getAppContext ();
36443 this.num = ++java.awt.Component.incr;
36444 });
36445 Clazz_defineMethod (c$, "getHTMLName", 
36446 function (uid) {
36447 return (this.htmlName == null ? this.htmlName = this.appContext.getThreadGroup ().getName () + "_" + uid + "_" + this.num : this.htmlName);
36448 }, "~S");
36449 Clazz_defineMethod (c$, "constructComponentName", 
36450 function () {
36451 return null;
36452 });
36453 Clazz_defineMethod (c$, "getName", 
36454 function () {
36455 if (this.name == null && !this.nameExplicitlySet) {
36456 {
36457 if (this.name == null && !this.nameExplicitlySet) this.name = this.constructComponentName ();
36458 }}return this.name;
36459 });
36460 Clazz_defineMethod (c$, "setName", 
36461 function (name) {
36462 var oldName;
36463 {
36464 oldName = this.name;
36465 this.name = name;
36466 this.nameExplicitlySet = true;
36467 }this.firePropertyChangeObject ("name", oldName, name);
36468 }, "~S");
36469 Clazz_defineMethod (c$, "getParent", 
36470 function () {
36471 return this.getParent_NoClientCode ();
36472 });
36473 Clazz_defineMethod (c$, "getParent_NoClientCode", 
36474 function () {
36475 return this.parent;
36476 });
36477 Clazz_defineMethod (c$, "getContainer", 
36478 function () {
36479 return this.getParent ();
36480 });
36481 Clazz_defineMethod (c$, "getPeer", 
36482 function () {
36483 return this.peer;
36484 });
36485 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
36486 function () {
36487 return swingjs.JSToolkit.getGraphicsConfiguration ();
36488 });
36489 Clazz_defineMethod (c$, "resetGC", 
36490 function () {
36491 });
36492 Clazz_defineMethod (c$, "getToolkit", 
36493 function () {
36494 return this.getToolkitImpl ();
36495 });
36496 Clazz_defineMethod (c$, "getToolkitImpl", 
36497 function () {
36498 var peer = this.peer;
36499 if ((peer != null) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
36500 return peer.getToolkit ();
36501 }var parent = this.parent;
36502 if (parent != null) {
36503 return parent.getToolkitImpl ();
36504 }return java.awt.Toolkit.getDefaultToolkit ();
36505 });
36506 Clazz_defineMethod (c$, "isValid", 
36507 function () {
36508 return this.valid;
36509 });
36510 Clazz_defineMethod (c$, "isDisplayable", 
36511 function () {
36512 return true;
36513 });
36514 Clazz_defineMethod (c$, "isVisible", 
36515 function () {
36516 return this.isVisible_NoClientCode ();
36517 });
36518 Clazz_defineMethod (c$, "isVisible_NoClientCode", 
36519 function () {
36520 return this.visible;
36521 });
36522 Clazz_defineMethod (c$, "isRecursivelyVisible", 
36523 function () {
36524 return this.visible && (this.parent == null || this.parent.isRecursivelyVisible ());
36525 });
36526 Clazz_defineMethod (c$, "pointRelativeToComponent", 
36527 function (absolute) {
36528 var compCoords = this.getLocationOnScreen ();
36529 return  new java.awt.Point (absolute.x - compCoords.x, absolute.y - compCoords.y);
36530 }, "java.awt.Point");
36531 Clazz_defineMethod (c$, "getMousePosition", 
36532 function () {
36533 return null;
36534 });
36535 Clazz_defineMethod (c$, "isSameOrAncestorOf", 
36536 function (comp, allowChildren) {
36537 return comp === this;
36538 }, "java.awt.Component,~B");
36539 Clazz_defineMethod (c$, "isShowing", 
36540 function () {
36541 if (this.visible) {
36542 var parent = this.parent;
36543 return (parent == null) || parent.isShowing ();
36544 }return false;
36545 });
36546 Clazz_defineMethod (c$, "isEnabled", 
36547 function () {
36548 return this.isEnabledImpl ();
36549 });
36550 Clazz_defineMethod (c$, "isEnabledImpl", 
36551 function () {
36552 return this.enabled;
36553 });
36554 Clazz_defineMethod (c$, "setEnabled", 
36555 function (b) {
36556 this.enable (b);
36557 }, "~B");
36558 Clazz_defineMethod (c$, "enable", 
36559 function () {
36560 if (!this.enabled) {
36561 this.enabled = true;
36562 var peer = this.peer;
36563 if (peer != null) {
36564 peer.setEnabled (true);
36565 if (this.visible) {
36566 this.updateCursorImmediately ();
36567 }}}});
36568 Clazz_defineMethod (c$, "enable", 
36569 function (b) {
36570 if (b) {
36571 this.enable ();
36572 } else {
36573 this.disable ();
36574 }}, "~B");
36575 Clazz_defineMethod (c$, "disable", 
36576 function () {
36577 if (this.enabled) {
36578 this.enabled = false;
36579 var peer = this.peer;
36580 if (peer != null) {
36581 peer.setEnabled (false);
36582 if (this.visible) {
36583 this.updateCursorImmediately ();
36584 }}}});
36585 Clazz_defineMethod (c$, "isDoubleBuffered", 
36586 function () {
36587 return false;
36588 });
36589 Clazz_defineMethod (c$, "setVisible", 
36590 function (b) {
36591 this.show (b);
36592 }, "~B");
36593 Clazz_defineMethod (c$, "show", 
36594 function () {
36595 if (!this.visible) {
36596 this.visible = true;
36597 var peer = this.peer;
36598 if (peer != null) {
36599 peer.setVisible (true);
36600 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36601 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36602 this.repaint ();
36603 }this.updateCursorImmediately ();
36604 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36605 var e =  new java.awt.event.ComponentEvent (this, 102);
36606 java.awt.Toolkit.getEventQueue ().postEvent (e);
36607 }}var parent = this.parent;
36608 if (parent != null) {
36609 parent.invalidate ();
36610 }});
36611 Clazz_defineMethod (c$, "containsFocus", 
36612 function () {
36613 return this.isFocusOwner ();
36614 });
36615 Clazz_defineMethod (c$, "clearCurrentFocusCycleRootOnHide", 
36616 function () {
36617 });
36618 Clazz_defineMethod (c$, "hide", 
36619 function () {
36620 this.isPacked = false;
36621 if (this.visible) {
36622 this.clearCurrentFocusCycleRootOnHide ();
36623 this.visible = false;
36624 this.mixOnHiding (this.isLightweight ());
36625 var peer = this.peer;
36626 if (peer != null) {
36627 peer.setVisible (false);
36628 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36629 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36630 this.repaint ();
36631 }this.updateCursorImmediately ();
36632 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36633 var e =  new java.awt.event.ComponentEvent (this, 103);
36634 java.awt.Toolkit.getEventQueue ().postEvent (e);
36635 }}var parent = this.parent;
36636 if (parent != null) {
36637 parent.invalidate ();
36638 }});
36639 Clazz_defineMethod (c$, "getForeground", 
36640 function () {
36641 var foreground = this.foreground;
36642 if (foreground != null) {
36643 return foreground;
36644 }var parent = this.parent;
36645 return (parent != null) ? parent.getForeground () : null;
36646 });
36647 Clazz_defineMethod (c$, "setForeground", 
36648 function (c) {
36649 var oldColor = this.foreground;
36650 var peer = this.peer;
36651 this.foreground = c;
36652 if (peer != null) {
36653 c = this.getForeground ();
36654 if (c != null) {
36655 peer.setForeground (c);
36656 }}this.firePropertyChangeObject ("foreground", oldColor, c);
36657 }, "java.awt.Color");
36658 Clazz_defineMethod (c$, "isForegroundSet", 
36659 function () {
36660 return (this.foreground != null);
36661 });
36662 Clazz_defineMethod (c$, "getBackground", 
36663 function () {
36664 var background = this.background;
36665 if (background != null) {
36666 return background;
36667 }var parent = this.parent;
36668 return (parent != null) ? parent.getBackground () : null;
36669 });
36670 Clazz_defineMethod (c$, "setBackground", 
36671 function (c) {
36672 var oldColor = this.background;
36673 var peer = this.peer;
36674 this.background = c;
36675 if (peer != null) {
36676 c = this.getBackground ();
36677 if (c != null) {
36678 peer.setBackground (c);
36679 }}this.firePropertyChangeObject ("background", oldColor, c);
36680 }, "java.awt.Color");
36681 Clazz_defineMethod (c$, "isBackgroundSet", 
36682 function () {
36683 return (this.background != null);
36684 });
36685 Clazz_defineMethod (c$, "getFont", 
36686 function () {
36687 return this.getFont_NoClientCode ();
36688 });
36689 Clazz_defineMethod (c$, "getFont_NoClientCode", 
36690 function () {
36691 var font = this.font;
36692 if (font != null) {
36693 return font;
36694 }var parent = this.parent;
36695 return (parent != null) ? parent.getFont_NoClientCode () : null;
36696 });
36697 Clazz_defineMethod (c$, "setFont", 
36698 function (f) {
36699 this.setFontComp (f);
36700 }, "java.awt.Font");
36701 Clazz_defineMethod (c$, "setFontComp", 
36702 function (f) {
36703 var oldFont;
36704 var newFont;
36705 oldFont = this.font;
36706 newFont = this.font = f;
36707 {
36708 {
36709 }var peer = this.peer;
36710 if (peer != null) {
36711 f = this.getFont ();
36712 if (f != null) {
36713 peer.setFont (f);
36714 this.peerFont = f;
36715 }}}this.firePropertyChangeObject ("font", oldFont, newFont);
36716 if (f !== oldFont && (oldFont == null || !oldFont.equals (f))) {
36717 this.invalidateIfValid ();
36718 }}, "java.awt.Font");
36719 Clazz_defineMethod (c$, "isFontSet", 
36720 function () {
36721 return (this.font != null);
36722 });
36723 Clazz_defineMethod (c$, "getLocale", 
36724 function () {
36725 var locale = this.locale;
36726 if (locale != null) {
36727 return locale;
36728 }var parent = this.parent;
36729 if (parent == null) {
36730 throw  new java.awt.IllegalComponentStateException ("This component must have a parent in order to determine its locale");
36731 } else {
36732 return parent.getLocale ();
36733 }});
36734 Clazz_defineMethod (c$, "setLocale", 
36735 function (l) {
36736 var oldValue = this.locale;
36737 this.locale = l;
36738 this.firePropertyChangeObject ("locale", oldValue, l);
36739 this.invalidateIfValid ();
36740 }, "java.util.Locale");
36741 Clazz_defineMethod (c$, "getLocation", 
36742 function () {
36743 return this.location ();
36744 });
36745 Clazz_defineMethod (c$, "getLocationOnScreen", 
36746 function () {
36747 return this.getLocationOnScreen_NoTreeLock ();
36748 });
36749 Clazz_defineMethod (c$, "getLocationOnScreen_NoTreeLock", 
36750 function () {
36751 if (this.isShowing ()) {
36752 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
36753 var host = this.getNativeContainer ();
36754 var pt = host.peer.getLocationOnScreen ();
36755 for (var c = this; c !== host; c = c.getParent ()) {
36756 pt.x += c.x;
36757 pt.y += c.y;
36758 }
36759 return pt;
36760 } else {
36761 var pt = this.peer.getLocationOnScreen ();
36762 return pt;
36763 }} else {
36764 throw  new java.awt.IllegalComponentStateException ("component must be showing on the screen to determine its location");
36765 }});
36766 Clazz_defineMethod (c$, "location", 
36767 function () {
36768 return this.location_NoClientCode ();
36769 });
36770 Clazz_defineMethod (c$, "location_NoClientCode", 
36771  function () {
36772 return  new java.awt.Point (this.x, this.y);
36773 });
36774 Clazz_defineMethod (c$, "setLocation", 
36775 function (x, y) {
36776 this.setBoundsOp (1);
36777 this.setBounds (x, y, this.width, this.height);
36778 }, "~N,~N");
36779 Clazz_defineMethod (c$, "setLocation", 
36780 function (p) {
36781 this.setLocation (p.x, p.y);
36782 }, "java.awt.Point");
36783 Clazz_defineMethod (c$, "getSize", 
36784 function () {
36785 return this.size ();
36786 });
36787 Clazz_defineMethod (c$, "size", 
36788 function () {
36789 return  new java.awt.Dimension (this.width, this.height);
36790 });
36791 Clazz_defineMethod (c$, "setSize", 
36792 function (width, height) {
36793 {
36794 if (arguments.length == 1) {
36795 var d = arguments[0];
36796 width = d.width;
36797 height = d.height;
36798 }
36799 }this.resize (width, height);
36800 }, "~N,~N");
36801 Clazz_defineMethod (c$, "resize", 
36802 function (width, height) {
36803 this.setBoundsOp (2);
36804 this.setBounds (this.x, this.y, width, height);
36805 }, "~N,~N");
36806 Clazz_defineMethod (c$, "setBounds", 
36807 function (x, y, width, height) {
36808 this.reshape (x, y, width, height);
36809 }, "~N,~N,~N,~N");
36810 Clazz_defineMethod (c$, "setBounds", 
36811 function (r) {
36812 this.setBounds (r.x, r.y, r.width, r.height);
36813 }, "java.awt.Rectangle");
36814 Clazz_defineMethod (c$, "reshape", 
36815 function (x, y, width, height) {
36816 try {
36817 this.setBoundsOp (3);
36818 var resized = (this.width != width) || (this.height != height);
36819 var moved = (this.x != x) || (this.y != y);
36820 if (!resized && !moved) {
36821 return;
36822 }var oldX = this.x;
36823 var oldY = this.y;
36824 var oldWidth = this.width;
36825 var oldHeight = this.height;
36826 this.x = x;
36827 this.y = y;
36828 this.width = width;
36829 this.height = height;
36830 if (resized) {
36831 this.isPacked = false;
36832 System.out.println ("C " + swingjs.JSToolkit.getClassName (this) + " resized to " + this.getBounds ());
36833 }var needNotify = true;
36834 this.mixOnReshaping ();
36835 if (this.peer != null) {
36836 this.reshapeNativePeer (x, y, width, height, this.getBoundsOp ());
36837 resized = (oldWidth != this.width) || (oldHeight != this.height);
36838 moved = (oldX != this.x) || (oldY != this.y);
36839 if (Clazz_instanceOf (this, java.awt.Window)) {
36840 needNotify = false;
36841 }if (resized) {
36842 this.invalidate ();
36843 }if (this.parent != null) {
36844 this.parent.invalidateIfValid ();
36845 }}if (needNotify) {
36846 this.notifyNewBounds (resized, moved);
36847 }this.repaintParentIfNeeded (oldX, oldY, oldWidth, oldHeight);
36848 } finally {
36849 this.setBoundsOp (5);
36850 }
36851 }, "~N,~N,~N,~N");
36852 Clazz_defineMethod (c$, "repaintParentIfNeeded", 
36853  function (oldX, oldY, oldWidth, oldHeight) {
36854 if (this.parent != null && Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer) && this.isShowing ()) {
36855 this.parent.repaint (oldX, oldY, oldWidth, oldHeight);
36856 this.repaint ();
36857 }}, "~N,~N,~N,~N");
36858 Clazz_defineMethod (c$, "reshapeNativePeer", 
36859  function (x, y, width, height, op) {
36860 var nativeX = x;
36861 var nativeY = y;
36862 for (var c = this.parent; (c != null) && (Clazz_instanceOf (c.peer, java.awt.peer.LightweightPeer)); c = c.parent) {
36863 nativeX += c.x;
36864 nativeY += c.y;
36865 }
36866 this.peer.setBounds (nativeX, nativeY, width, height, op);
36867 }, "~N,~N,~N,~N,~N");
36868 Clazz_defineMethod (c$, "notifyNewBounds", 
36869  function (resized, moved) {
36870 if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36871 if (resized) {
36872 var e =  new java.awt.event.ComponentEvent (this, 101);
36873 java.awt.Toolkit.getEventQueue ().postEvent (e);
36874 }if (moved) {
36875 var e =  new java.awt.event.ComponentEvent (this, 100);
36876 java.awt.Toolkit.getEventQueue ().postEvent (e);
36877 }} else {
36878 if (Clazz_instanceOf (this, java.awt.Container) && (this).countComponents () > 0) {
36879 var enabledOnToolkit = java.awt.Toolkit.enabledOnToolkit (65536);
36880 if (resized) {
36881 (this).createChildHierarchyEvents (1402, 0, enabledOnToolkit);
36882 }if (moved) {
36883 (this).createChildHierarchyEvents (1401, 0, enabledOnToolkit);
36884 }}}}, "~B,~B");
36885 Clazz_defineMethod (c$, "getX", 
36886 function () {
36887 return this.x;
36888 });
36889 Clazz_defineMethod (c$, "getY", 
36890 function () {
36891 return this.y;
36892 });
36893 Clazz_defineMethod (c$, "getWidth", 
36894 function () {
36895 return this.width;
36896 });
36897 Clazz_defineMethod (c$, "getHeight", 
36898 function () {
36899 return this.height;
36900 });
36901 Clazz_defineMethod (c$, "getBounds", 
36902 function (rv) {
36903 if (rv == null) return  new java.awt.Rectangle (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36904 rv.reshape (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36905 return rv;
36906 }, "java.awt.Rectangle");
36907 Clazz_defineMethod (c$, "getSize", 
36908 function (rv) {
36909 if (rv == null) {
36910 return  new java.awt.Dimension (this.getWidth (), this.getHeight ());
36911 } else {
36912 rv.setSize (this.getWidth (), this.getHeight ());
36913 return rv;
36914 }}, "java.awt.Dimension");
36915 Clazz_defineMethod (c$, "getLocation", 
36916 function (rv) {
36917 if (rv == null) {
36918 return  new java.awt.Point (this.getX (), this.getY ());
36919 } else {
36920 rv.setLocation (this.getX (), this.getY ());
36921 return rv;
36922 }}, "java.awt.Point");
36923 Clazz_defineMethod (c$, "isOpaque", 
36924 function () {
36925 return true;
36926 });
36927 Clazz_defineMethod (c$, "isLightweight", 
36928 function () {
36929 return false;
36930 });
36931 Clazz_defineMethod (c$, "setPreferredSize", 
36932 function (preferredSize) {
36933 this.setPrefSizeComp (preferredSize);
36934 }, "java.awt.Dimension");
36935 Clazz_defineMethod (c$, "setPrefSizeComp", 
36936 function (preferredSize) {
36937 var old = (this.prefSizeSet ? this.prefSize : null);
36938 this.prefSize = preferredSize;
36939 this.prefSizeSet = (preferredSize != null);
36940 this.firePropertyChangeObject ("preferredSize", old, preferredSize);
36941 }, "java.awt.Dimension");
36942 Clazz_defineMethod (c$, "isPreferredSizeSet", 
36943 function () {
36944 return this.prefSizeSet;
36945 });
36946 Clazz_defineMethod (c$, "getPreferredSize", 
36947 function () {
36948 return this.preferredSize ();
36949 });
36950 Clazz_defineMethod (c$, "preferredSize", 
36951 function () {
36952 return this.prefSizeComp ();
36953 });
36954 Clazz_defineMethod (c$, "prefSizeComp", 
36955 function () {
36956 var dim = this.prefSize;
36957 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
36958 this.prefSize = this.getMinimumSize ();
36959 dim = this.prefSize;
36960 }return  new java.awt.Dimension (dim);
36961 });
36962 Clazz_defineMethod (c$, "setMinimumSize", 
36963 function (minimumSize) {
36964 var old;
36965 if (this.minSizeSet) {
36966 old = this.minSize;
36967 } else {
36968 old = null;
36969 }this.minSize = minimumSize;
36970 this.minSizeSet = (minimumSize != null);
36971 this.firePropertyChangeObject ("minimumSize", old, minimumSize);
36972 }, "java.awt.Dimension");
36973 Clazz_defineMethod (c$, "isMinimumSizeSet", 
36974 function () {
36975 return this.minSizeSet;
36976 });
36977 Clazz_defineMethod (c$, "getMinimumSize", 
36978 function () {
36979 return this.minimumSize ();
36980 });
36981 Clazz_defineMethod (c$, "minimumSize", 
36982 function () {
36983 var dim = this.minSize;
36984 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
36985 this.minSize = this.getSize ();
36986 dim = this.minSize;
36987 }return  new java.awt.Dimension (dim);
36988 });
36989 Clazz_defineMethod (c$, "setMaximumSize", 
36990 function (maximumSize) {
36991 var old;
36992 if (this.maxSizeSet) {
36993 old = this.maxSize;
36994 } else {
36995 old = null;
36996 }this.maxSize = maximumSize;
36997 this.maxSizeSet = (maximumSize != null);
36998 this.firePropertyChangeObject ("maximumSize", old, maximumSize);
36999 }, "java.awt.Dimension");
37000 Clazz_defineMethod (c$, "isMaximumSizeSet", 
37001 function () {
37002 return this.maxSizeSet;
37003 });
37004 Clazz_defineMethod (c$, "getMaximumSize", 
37005 function () {
37006 return this.getMaxSizeComp ();
37007 });
37008 Clazz_defineMethod (c$, "getMaxSizeComp", 
37009 function () {
37010 if (this.isMaximumSizeSet ()) {
37011 return  new java.awt.Dimension (this.maxSize);
37012 }return  new java.awt.Dimension (32767, 32767);
37013 });
37014 Clazz_defineMethod (c$, "getAlignmentX", 
37015 function () {
37016 return this.getAlignmentXComp ();
37017 });
37018 Clazz_defineMethod (c$, "getAlignmentXComp", 
37019 function () {
37020 return 0.5;
37021 });
37022 Clazz_defineMethod (c$, "getAlignmentY", 
37023 function () {
37024 return this.getAlignmentYComp ();
37025 });
37026 Clazz_defineMethod (c$, "getAlignmentYComp", 
37027 function () {
37028 return 0.5;
37029 });
37030 Clazz_defineMethod (c$, "getBaseline", 
37031 function (width, height) {
37032 if (width < 0 || height < 0) {
37033 throw  new IllegalArgumentException ("Width and height must be >= 0");
37034 }return -1;
37035 }, "~N,~N");
37036 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
37037 function () {
37038 return java.awt.Component.BaselineResizeBehavior.OTHER;
37039 });
37040 Clazz_defineMethod (c$, "doLayout", 
37041 function () {
37042 this.layout ();
37043 });
37044 Clazz_defineMethod (c$, "layout", 
37045 function () {
37046 });
37047 Clazz_defineMethod (c$, "validate", 
37048 function () {
37049 this.validateComponent ();
37050 });
37051 Clazz_defineMethod (c$, "validateComponent", 
37052 function () {
37053 {
37054 var peer = this.peer;
37055 var wasValid = this.isValid ();
37056 if (!wasValid && peer != null) {
37057 var newfont = this.getFont ();
37058 var oldfont = this.peerFont;
37059 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
37060 peer.setFont (newfont);
37061 this.peerFont = newfont;
37062 }peer.layout ();
37063 }this.valid = true;
37064 if (!wasValid) {
37065 this.mixOnValidating ();
37066 }}});
37067 Clazz_defineMethod (c$, "invalidate", 
37068 function () {
37069 this.invalidateComp ();
37070 });
37071 Clazz_defineMethod (c$, "invalidateComp", 
37072 function () {
37073 this.valid = false;
37074 if (!this.isPreferredSizeSet ()) {
37075 this.prefSize = null;
37076 }if (!this.isMinimumSizeSet ()) {
37077 this.minSize = null;
37078 }if (!this.isMaximumSizeSet ()) {
37079 this.maxSize = null;
37080 }if (this.parent != null) {
37081 this.parent.invalidateIfValid ();
37082 }});
37083 Clazz_defineMethod (c$, "invalidateIfValid", 
37084 function () {
37085 if (this.isValid ()) {
37086 this.invalidate ();
37087 }});
37088 Clazz_defineMethod (c$, "getGraphics", 
37089 function () {
37090 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37091 if (this.parent == null) return null;
37092 var g = this.parent.getGraphics ();
37093 if (g == null) return null;
37094 g.setFont (this.getFont ());
37095 return g;
37096 } else {
37097 var peer = this.peer;
37098 return (peer != null) ? peer.getGraphics () : null;
37099 }});
37100 Clazz_defineMethod (c$, "getTreeLock", 
37101 function () {
37102 return this;
37103 });
37104 Clazz_defineMethod (c$, "getFontMetrics", 
37105 function (font) {
37106 return jssun.font.FontDesignMetrics.getMetrics (font);
37107 }, "java.awt.Font");
37108 Clazz_defineMethod (c$, "setCursor", 
37109 function (cursor) {
37110 this.cursor = cursor;
37111 this.updateCursorImmediately ();
37112 }, "java.awt.Cursor");
37113 Clazz_defineMethod (c$, "updateCursorImmediately", 
37114 function () {
37115 });
37116 Clazz_defineMethod (c$, "getCursor", 
37117 function () {
37118 return this.getCursor_NoClientCode ();
37119 });
37120 Clazz_defineMethod (c$, "getCursor_NoClientCode", 
37121 function () {
37122 var cursor = this.cursor;
37123 if (cursor != null) {
37124 return cursor;
37125 }var parent = this.parent;
37126 if (parent != null) {
37127 return parent.getCursor_NoClientCode ();
37128 } else {
37129 return java.awt.Cursor.getPredefinedCursor (0);
37130 }});
37131 Clazz_defineMethod (c$, "isCursorSet", 
37132 function () {
37133 return (this.cursor != null);
37134 });
37135 Clazz_defineMethod (c$, "paint", 
37136 function (g) {
37137 }, "java.awt.Graphics");
37138 Clazz_defineMethod (c$, "update", 
37139 function (g) {
37140 this.paint (g);
37141 }, "java.awt.Graphics");
37142 Clazz_defineMethod (c$, "paintAll", 
37143 function (g) {
37144 }, "java.awt.Graphics");
37145 Clazz_defineMethod (c$, "lightweightPaint", 
37146 function (g) {
37147 this.lwPaintComp (g);
37148 }, "java.awt.Graphics");
37149 Clazz_defineMethod (c$, "lwPaintComp", 
37150 function (g) {
37151 this.paint (g);
37152 }, "java.awt.Graphics");
37153 Clazz_defineMethod (c$, "paintHeavyweightComponents", 
37154 function (g) {
37155 }, "java.awt.Graphics");
37156 Clazz_defineMethod (c$, "repaint", 
37157 function () {
37158 this.repaintImpl (0, 0, 0, this.width, this.height);
37159 });
37160 Clazz_defineMethod (c$, "repaint", 
37161 function (tm) {
37162 this.repaintImpl (tm, 0, 0, this.width, this.height);
37163 }, "~N");
37164 Clazz_defineMethod (c$, "repaint", 
37165 function (x, y, width, height) {
37166 this.repaintImpl (0, x, y, width, height);
37167 }, "~N,~N,~N,~N");
37168 Clazz_defineMethod (c$, "repaint", 
37169 function (tm, x, y, width, height) {
37170 this.repaintImpl (tm, x, y, width, height);
37171 }, "~N,~N,~N,~N,~N");
37172 Clazz_defineMethod (c$, "repaintImpl", 
37173 function (tm, x, y, width, height) {
37174 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37175 if (this.parent != null) {
37176 var px = this.x + ((x < 0) ? 0 : x);
37177 var py = this.y + ((y < 0) ? 0 : y);
37178 var pwidth = (width > this.width) ? this.width : width;
37179 var pheight = (height > this.height) ? this.height : height;
37180 this.parent.repaint (tm, px, py, pwidth, pheight);
37181 }} else {
37182 if (this.isVisible () && (this.peer != null) && (width > 0) && (height > 0)) {
37183 var e =  new java.awt.event.PaintEvent (this, 801,  new java.awt.Rectangle (x, y, width, height));
37184 java.awt.Toolkit.getEventQueue ().postEvent (e);
37185 }}}, "~N,~N,~N,~N,~N");
37186 Clazz_defineMethod (c$, "print", 
37187 function (g) {
37188 this.paint (g);
37189 }, "java.awt.Graphics");
37190 Clazz_defineMethod (c$, "printAll", 
37191 function (g) {
37192 }, "java.awt.Graphics");
37193 Clazz_defineMethod (c$, "printHeavyweightComponents", 
37194 function (g) {
37195 }, "java.awt.Graphics");
37196 Clazz_overrideMethod (c$, "imageUpdate", 
37197 function (img, infoflags, x, y, w, h) {
37198 return false;
37199 }, "java.awt.Image,~N,~N,~N,~N,~N");
37200 Clazz_defineMethod (c$, "createImage", 
37201 function (producer) {
37202 return this.getToolkit ().createImage (producer);
37203 }, "java.awt.image.ImageProducer");
37204 Clazz_defineMethod (c$, "createImage", 
37205 function (width, height) {
37206 return java.awt.Toolkit.getDefaultToolkit ().createImage (null, width, height);
37207 }, "~N,~N");
37208 Clazz_defineMethod (c$, "createVolatileImage", 
37209 function (width, height) {
37210 return null;
37211 }, "~N,~N");
37212 Clazz_defineMethod (c$, "createVolatileImage", 
37213 function (width, height, caps) {
37214 return this.createVolatileImage (width, height);
37215 }, "~N,~N,java.awt.ImageCapabilities");
37216 Clazz_defineMethod (c$, "prepareImage", 
37217 function (image, observer) {
37218 return this.prepareImage (image, -1, -1, observer);
37219 }, "java.awt.Image,java.awt.image.ImageObserver");
37220 Clazz_defineMethod (c$, "prepareImage", 
37221 function (image, width, height, observer) {
37222 return false;
37223 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37224 Clazz_defineMethod (c$, "checkImage", 
37225 function (image, observer) {
37226 return this.checkImage (image, -1, -1, observer);
37227 }, "java.awt.Image,java.awt.image.ImageObserver");
37228 Clazz_defineMethod (c$, "checkImage", 
37229 function (image, width, height, observer) {
37230 return 0;
37231 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37232 Clazz_defineMethod (c$, "setIgnoreRepaint", 
37233 function (ignoreRepaint) {
37234 }, "~B");
37235 Clazz_defineMethod (c$, "getIgnoreRepaint", 
37236 function () {
37237 return false;
37238 });
37239 Clazz_defineMethod (c$, "contains", 
37240 function (x, y) {
37241 return this.inside (x, y);
37242 }, "~N,~N");
37243 Clazz_defineMethod (c$, "inside", 
37244 function (x, y) {
37245 return (x >= 0) && (x < this.width) && (y >= 0) && (y < this.height);
37246 }, "~N,~N");
37247 Clazz_defineMethod (c$, "getComponentAt", 
37248 function (x, y) {
37249 return this.locate (x, y);
37250 }, "~N,~N");
37251 Clazz_defineMethod (c$, "locate", 
37252 function (x, y) {
37253 return this.contains (x, y) ? this : null;
37254 }, "~N,~N");
37255 Clazz_defineMethod (c$, "getComponentAt", 
37256 function (p) {
37257 return this.getComponentAt (p.x, p.y);
37258 }, "java.awt.Point");
37259 Clazz_defineMethod (c$, "deliverEvent", 
37260 function (e) {
37261 this.postEvent (e);
37262 }, "java.awt.Event");
37263 Clazz_defineMethod (c$, "dispatchEvent", 
37264 function (e) {
37265 this.dispatchEventImpl (e);
37266 }, "java.awt.AWTEvent");
37267 Clazz_defineMethod (c$, "dispatchEventImpl", 
37268 function (e) {
37269 this.dispatchEventImplComp (e);
37270 }, "java.awt.AWTEvent");
37271 Clazz_defineMethod (c$, "dispatchEventImplComp", 
37272 function (e) {
37273 var id = e.getID ();
37274 java.awt.EventQueue.setCurrentEventAndMostRecentTime (e);
37275 if (!e.focusManagerIsDispatching) {
37276 if (e.isPosted) {
37277 e.isPosted = true;
37278 }}if (!e.isConsumed ()) {
37279 if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37280 if (e.isConsumed ()) {
37281 return;
37282 }}}if (this.areInputMethodsEnabled ()) {
37283 if ((Clazz_instanceOf (e, java.awt.event.InputEvent)) || (Clazz_instanceOf (e, java.awt.event.FocusEvent))) {
37284 }} else {
37285 if (id == 1004) {
37286 }}switch (id) {
37287 case 401:
37288 case 402:
37289 var p = ((Clazz_instanceOf (this, java.awt.Container)) ? this : this.parent);
37290 if (p != null) {
37291 p.preProcessKeyEvent (e);
37292 }break;
37293 case 201:
37294 break;
37295 default:
37296 break;
37297 }
37298 if (this.newEventsOnly) {
37299 if (this.eventEnabled (e)) {
37300 this.processEvent (e);
37301 }} else if (id == 507) {
37302 this.autoProcessMouseWheel (e);
37303 } else if (!(Clazz_instanceOf (e, java.awt.event.MouseEvent) && !this.postsOldMouseEvents ())) {
37304 }if (id == 201 && !e.isConsumed ()) {
37305 }if (!(Clazz_instanceOf (e, java.awt.event.KeyEvent))) {
37306 }}, "java.awt.AWTEvent");
37307 Clazz_defineMethod (c$, "autoProcessMouseWheel", 
37308 function (e) {
37309 }, "java.awt.event.MouseWheelEvent");
37310 Clazz_defineMethod (c$, "dispatchMouseWheelToAncestor", 
37311 function (e) {
37312 var newX;
37313 var newY;
37314 newX = e.getX () + this.getX ();
37315 newY = e.getY () + this.getY ();
37316 var newMWE;
37317 {
37318 var anc = this.getParent ();
37319 while (anc != null && !anc.eventEnabled (e)) {
37320 newX += anc.getX ();
37321 newY += anc.getY ();
37322 if (!(Clazz_instanceOf (anc, java.awt.Window))) {
37323 anc = anc.getParent ();
37324 } else {
37325 break;
37326 }}
37327 if (anc != null && anc.eventEnabled (e)) {
37328 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 ());
37329 (e).copyPrivateDataInto (newMWE);
37330 anc.dispatchEventToSelf (newMWE);
37331 }}return true;
37332 }, "java.awt.event.MouseWheelEvent");
37333 Clazz_defineMethod (c$, "checkWindowClosingException", 
37334 function () {
37335 if (this.windowClosingException != null) {
37336 if (Clazz_instanceOf (this, java.awt.Dialog)) {
37337 (this).interruptBlocking ();
37338 } else {
37339 this.windowClosingException.fillInStackTrace ();
37340 this.windowClosingException.printStackTrace ();
37341 this.windowClosingException = null;
37342 }return true;
37343 }return false;
37344 });
37345 Clazz_defineMethod (c$, "areInputMethodsEnabled", 
37346 function () {
37347 return ((this.eventMask & 4096) != 0) && ((this.eventMask & 8) != 0 || this.keyListener != null);
37348 });
37349 Clazz_defineMethod (c$, "eventEnabled", 
37350 function (e) {
37351 return this.eventTypeEnabled (e.id);
37352 }, "java.awt.AWTEvent");
37353 Clazz_defineMethod (c$, "eventTypeEnabled", 
37354 function (type) {
37355 switch (type) {
37356 case 100:
37357 case 101:
37358 case 102:
37359 case 103:
37360 if ((this.eventMask & 1) != 0 || this.componentListener != null) {
37361 return true;
37362 }break;
37363 case 1004:
37364 case 1005:
37365 if ((this.eventMask & 4) != 0 || this.focusListener != null) {
37366 return true;
37367 }break;
37368 case 401:
37369 case 402:
37370 case 400:
37371 if ((this.eventMask & 8) != 0 || this.keyListener != null) {
37372 return true;
37373 }break;
37374 case 501:
37375 case 502:
37376 case 504:
37377 case 505:
37378 case 500:
37379 if ((this.eventMask & 16) != 0 || this.mouseListener != null) {
37380 return true;
37381 }break;
37382 case 503:
37383 case 506:
37384 if ((this.eventMask & 32) != 0 || this.mouseMotionListener != null) {
37385 return true;
37386 }break;
37387 case 507:
37388 if ((this.eventMask & 131072) != 0 || this.mouseWheelListener != null) {
37389 return true;
37390 }break;
37391 case 1100:
37392 case 1101:
37393 if ((this.eventMask & 2048) != 0 || this.inputMethodListener != null) {
37394 return true;
37395 }break;
37396 case 1400:
37397 if ((this.eventMask & 32768) != 0 || this.hierarchyListener != null) {
37398 return true;
37399 }break;
37400 case 1401:
37401 case 1402:
37402 if ((this.eventMask & 65536) != 0 || this.hierarchyBoundsListener != null) {
37403 return true;
37404 }break;
37405 case 1001:
37406 if ((this.eventMask & 128) != 0) {
37407 return true;
37408 }break;
37409 case 900:
37410 if ((this.eventMask & 1024) != 0) {
37411 return true;
37412 }break;
37413 case 701:
37414 if ((this.eventMask & 512) != 0) {
37415 return true;
37416 }break;
37417 case 601:
37418 if ((this.eventMask & 256) != 0) {
37419 return true;
37420 }break;
37421 default:
37422 break;
37423 }
37424 if (type > 1999) {
37425 return true;
37426 }return false;
37427 }, "~N");
37428 Clazz_defineMethod (c$, "postEvent", 
37429 function (e) {
37430 if (this.handleEvent (e)) {
37431 e.consume ();
37432 return true;
37433 }var parent = this.parent;
37434 var eventx = e.x;
37435 var eventy = e.y;
37436 if (parent != null) {
37437 e.translate (this.x, this.y);
37438 if (parent.postEvent (e)) {
37439 e.consume ();
37440 return true;
37441 }e.x = eventx;
37442 e.y = eventy;
37443 }return false;
37444 }, "java.awt.Event");
37445 Clazz_defineMethod (c$, "addComponentListener", 
37446 function (l) {
37447 if (l == null) {
37448 return;
37449 }this.componentListener = java.awt.AWTEventMulticaster.add (this.componentListener, l);
37450 this.newEventsOnly = true;
37451 }, "java.awt.event.ComponentListener");
37452 Clazz_defineMethod (c$, "removeComponentListener", 
37453 function (l) {
37454 if (l == null) {
37455 return;
37456 }this.componentListener = java.awt.AWTEventMulticaster.remove (this.componentListener, l);
37457 }, "java.awt.event.ComponentListener");
37458 Clazz_defineMethod (c$, "getComponentListeners", 
37459 function () {
37460 return (this.getListeners (java.awt.event.ComponentListener));
37461 });
37462 Clazz_defineMethod (c$, "addFocusListener", 
37463 function (l) {
37464 if (l == null) {
37465 return;
37466 }this.focusListener = java.awt.AWTEventMulticaster.add (this.focusListener, l);
37467 this.newEventsOnly = true;
37468 }, "java.awt.event.FocusListener");
37469 Clazz_defineMethod (c$, "removeFocusListener", 
37470 function (l) {
37471 if (l == null) {
37472 return;
37473 }this.focusListener = java.awt.AWTEventMulticaster.remove (this.focusListener, l);
37474 }, "java.awt.event.FocusListener");
37475 Clazz_defineMethod (c$, "getFocusListeners", 
37476 function () {
37477 return (this.getListeners (java.awt.event.FocusListener));
37478 });
37479 Clazz_defineMethod (c$, "addHierarchyListener", 
37480 function (l) {
37481 }, "java.awt.event.HierarchyListener");
37482 Clazz_defineMethod (c$, "removeHierarchyListener", 
37483 function (l) {
37484 }, "java.awt.event.HierarchyListener");
37485 Clazz_defineMethod (c$, "getHierarchyListeners", 
37486 function () {
37487 return (this.getListeners (java.awt.event.HierarchyListener));
37488 });
37489 Clazz_defineMethod (c$, "addHierarchyBoundsListener", 
37490 function (l) {
37491 if (l == null) {
37492 return;
37493 }var notifyAncestors;
37494 {
37495 notifyAncestors = (this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0);
37496 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.add (this.hierarchyBoundsListener, l);
37497 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener != null);
37498 this.newEventsOnly = true;
37499 }if (notifyAncestors) {
37500 {
37501 this.adjustListeningChildrenOnParent (65536, 1);
37502 }}}, "java.awt.event.HierarchyBoundsListener");
37503 Clazz_defineMethod (c$, "removeHierarchyBoundsListener", 
37504 function (l) {
37505 if (l == null) {
37506 return;
37507 }var notifyAncestors;
37508 {
37509 notifyAncestors = (this.hierarchyBoundsListener != null && (this.eventMask & 65536) == 0);
37510 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.remove (this.hierarchyBoundsListener, l);
37511 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener == null);
37512 }if (notifyAncestors) {
37513 {
37514 this.adjustListeningChildrenOnParent (65536, -1);
37515 }}}, "java.awt.event.HierarchyBoundsListener");
37516 Clazz_defineMethod (c$, "numListening", 
37517 function (mask) {
37518 return this.numListeningMask (mask);
37519 }, "~N");
37520 Clazz_defineMethod (c$, "numListeningMask", 
37521 function (mask) {
37522 if ((mask == 32768 && (this.hierarchyListener != null || (this.eventMask & 32768) != 0)) || (mask == 65536 && (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0))) {
37523 return 1;
37524 } else {
37525 return 0;
37526 }}, "~N");
37527 Clazz_defineMethod (c$, "countHierarchyMembers", 
37528 function () {
37529 return 1;
37530 });
37531 Clazz_defineMethod (c$, "createHierarchyEvents", 
37532 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37533 return this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
37534 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37535 Clazz_defineMethod (c$, "createHierEventsComp", 
37536 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37537 switch (id) {
37538 case 1400:
37539 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || enabledOnToolkit) {
37540 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent, changeFlags);
37541 this.dispatchEvent (e);
37542 return 1;
37543 }break;
37544 case 1401:
37545 case 1402:
37546 if (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0 || enabledOnToolkit) {
37547 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent);
37548 this.dispatchEvent (e);
37549 return 1;
37550 }break;
37551 default:
37552 break;
37553 }
37554 return 0;
37555 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37556 Clazz_defineMethod (c$, "getHierarchyBoundsListeners", 
37557 function () {
37558 return (this.getListeners (java.awt.event.HierarchyBoundsListener));
37559 });
37560 Clazz_defineMethod (c$, "adjustListeningChildrenOnParent", 
37561 function (mask, num) {
37562 if (this.parent != null) {
37563 this.parent.adjustListeningChildren (mask, num);
37564 }}, "~N,~N");
37565 Clazz_defineMethod (c$, "addKeyListener", 
37566 function (l) {
37567 if (l == null) {
37568 return;
37569 }this.keyListener = java.awt.AWTEventMulticaster.add (this.keyListener, l);
37570 this.newEventsOnly = true;
37571 }, "java.awt.event.KeyListener");
37572 Clazz_defineMethod (c$, "removeKeyListener", 
37573 function (l) {
37574 if (l == null) {
37575 return;
37576 }this.keyListener = java.awt.AWTEventMulticaster.remove (this.keyListener, l);
37577 }, "java.awt.event.KeyListener");
37578 Clazz_defineMethod (c$, "getKeyListeners", 
37579 function () {
37580 return (this.getListeners (java.awt.event.KeyListener));
37581 });
37582 Clazz_defineMethod (c$, "addMouseListener", 
37583 function (l) {
37584 if (l == null) {
37585 return;
37586 }System.out.println ("C adding mouse listener " + l);
37587 this.mouseListener = java.awt.AWTEventMulticaster.add (this.mouseListener, l);
37588 this.newEventsOnly = true;
37589 }, "java.awt.event.MouseListener");
37590 Clazz_defineMethod (c$, "removeMouseListener", 
37591 function (l) {
37592 if (l == null) {
37593 return;
37594 }this.mouseListener = java.awt.AWTEventMulticaster.remove (this.mouseListener, l);
37595 }, "java.awt.event.MouseListener");
37596 Clazz_defineMethod (c$, "getMouseListeners", 
37597 function () {
37598 return (this.getListeners (java.awt.event.MouseListener));
37599 });
37600 Clazz_defineMethod (c$, "addMouseMotionListener", 
37601 function (l) {
37602 if (l == null) {
37603 return;
37604 }this.mouseMotionListener = java.awt.AWTEventMulticaster.add (this.mouseMotionListener, l);
37605 this.newEventsOnly = true;
37606 }, "java.awt.event.MouseMotionListener");
37607 Clazz_defineMethod (c$, "removeMouseMotionListener", 
37608 function (l) {
37609 if (l == null) {
37610 return;
37611 }this.mouseMotionListener = java.awt.AWTEventMulticaster.remove (this.mouseMotionListener, l);
37612 }, "java.awt.event.MouseMotionListener");
37613 Clazz_defineMethod (c$, "getMouseMotionListeners", 
37614 function () {
37615 return (this.getListeners (java.awt.event.MouseMotionListener));
37616 });
37617 Clazz_defineMethod (c$, "addMouseWheelListener", 
37618 function (l) {
37619 if (l == null) {
37620 return;
37621 }this.mouseWheelListener = java.awt.AWTEventMulticaster.add (this.mouseWheelListener, l);
37622 this.newEventsOnly = true;
37623 }, "java.awt.event.MouseWheelListener");
37624 Clazz_defineMethod (c$, "removeMouseWheelListener", 
37625 function (l) {
37626 if (l == null) {
37627 return;
37628 }this.mouseWheelListener = java.awt.AWTEventMulticaster.remove (this.mouseWheelListener, l);
37629 }, "java.awt.event.MouseWheelListener");
37630 Clazz_defineMethod (c$, "getMouseWheelListeners", 
37631 function () {
37632 return (this.getListeners (java.awt.event.MouseWheelListener));
37633 });
37634 Clazz_defineMethod (c$, "addInputMethodListener", 
37635 function (l) {
37636 if (l == null) {
37637 return;
37638 }this.inputMethodListener = java.awt.AWTEventMulticaster.add (this.inputMethodListener, l);
37639 this.newEventsOnly = true;
37640 }, "java.awt.event.InputMethodListener");
37641 Clazz_defineMethod (c$, "removeInputMethodListener", 
37642 function (l) {
37643 if (l == null) {
37644 return;
37645 }this.inputMethodListener = java.awt.AWTEventMulticaster.remove (this.inputMethodListener, l);
37646 }, "java.awt.event.InputMethodListener");
37647 Clazz_defineMethod (c$, "getInputMethodListeners", 
37648 function () {
37649 return (this.getListeners (java.awt.event.InputMethodListener));
37650 });
37651 Clazz_defineMethod (c$, "getListeners", 
37652 function (listenerType) {
37653 return this.getListenersComp (listenerType);
37654 }, "Class");
37655 Clazz_defineMethod (c$, "getListenersComp", 
37656 function (listenerType) {
37657 var l = null;
37658 if (listenerType === java.awt.event.ComponentListener) {
37659 l = this.componentListener;
37660 } else if (listenerType === java.awt.event.FocusListener) {
37661 l = this.focusListener;
37662 } else if (listenerType === java.awt.event.HierarchyListener) {
37663 l = this.hierarchyListener;
37664 } else if (listenerType === java.awt.event.HierarchyBoundsListener) {
37665 l = this.hierarchyBoundsListener;
37666 } else if (listenerType === java.awt.event.KeyListener) {
37667 l = this.keyListener;
37668 } else if (listenerType === java.awt.event.MouseListener) {
37669 l = this.mouseListener;
37670 } else if (listenerType === java.awt.event.MouseMotionListener) {
37671 l = this.mouseMotionListener;
37672 } else if (listenerType === java.awt.event.MouseWheelListener) {
37673 l = this.mouseWheelListener;
37674 } else if (listenerType === java.awt.event.InputMethodListener) {
37675 l = this.inputMethodListener;
37676 } else if (listenerType === java.beans.PropertyChangeListener) {
37677 return this.getPropertyChangeListeners ();
37678 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
37679 }, "Class");
37680 Clazz_defineMethod (c$, "enableEvents", 
37681 function (eventsToEnable) {
37682 var notifyAncestors = 0;
37683 {
37684 if ((eventsToEnable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) == 0) {
37685 notifyAncestors |= 32768;
37686 }if ((eventsToEnable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0) {
37687 notifyAncestors |= 65536;
37688 }this.eventMask |= eventsToEnable;
37689 this.newEventsOnly = true;
37690 }if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37691 this.parent.proxyEnableEvents (this.eventMask);
37692 }if (notifyAncestors != 0) {
37693 {
37694 this.adjustListeningChildrenOnParent (notifyAncestors, 1);
37695 }}}, "~N");
37696 Clazz_defineMethod (c$, "disableEvents", 
37697 function (eventsToDisable) {
37698 var notifyAncestors = 0;
37699 {
37700 if ((eventsToDisable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) != 0) {
37701 notifyAncestors |= 32768;
37702 }if ((eventsToDisable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) != 0) {
37703 notifyAncestors |= 65536;
37704 }this.eventMask &= ~eventsToDisable;
37705 }if (notifyAncestors != 0) {
37706 {
37707 this.adjustListeningChildrenOnParent (notifyAncestors, -1);
37708 }}}, "~N");
37709 Clazz_defineMethod (c$, "checkCoalescing", 
37710  function () {
37711 if (this.getClass ().getClassLoader () == null) {
37712 return false;
37713 }var clazz = this.getClass ();
37714 {
37715 var value = java.awt.Component.coalesceMap.get (clazz);
37716 if (value != null) {
37717 return value;
37718 }var enabled = Boolean.$valueOf (swingjs.JSToolkit.checkClassMethod (this, "coalesceEvents", "\\java.awt.AWTEvent\\java.awt.AWTEvent"));
37719 java.awt.Component.coalesceMap.put (clazz, enabled);
37720 return enabled;
37721 }});
37722 Clazz_defineMethod (c$, "isCoalescingEnabled", 
37723 function () {
37724 return this.coalescingEnabled;
37725 });
37726 Clazz_defineMethod (c$, "coalesceEvents", 
37727 function (existingEvent, newEvent) {
37728 return null;
37729 }, "java.awt.AWTEvent,java.awt.AWTEvent");
37730 Clazz_defineMethod (c$, "processEvent", 
37731 function (e) {
37732 this.processEventComp (e);
37733 }, "java.awt.AWTEvent");
37734 Clazz_defineMethod (c$, "processEventComp", 
37735 function (e) {
37736 if (Clazz_instanceOf (e, java.awt.event.FocusEvent)) {
37737 this.processFocusEvent (e);
37738 } else if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
37739 switch (e.getID ()) {
37740 case 501:
37741 case 502:
37742 case 500:
37743 case 504:
37744 case 505:
37745 this.processMouseEvent (e);
37746 break;
37747 case 503:
37748 case 506:
37749 this.processMouseMotionEvent (e);
37750 break;
37751 case 507:
37752 this.processMouseWheelEvent (e);
37753 break;
37754 }
37755 } else if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37756 this.processKeyEvent (e);
37757 } else if (Clazz_instanceOf (e, java.awt.event.ComponentEvent)) {
37758 this.processComponentEvent (e);
37759 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
37760 this.processInputMethodEvent (e);
37761 } else if (Clazz_instanceOf (e, java.awt.event.HierarchyEvent)) {
37762 switch (e.getID ()) {
37763 case 1400:
37764 this.processHierarchyEvent (e);
37765 break;
37766 case 1401:
37767 case 1402:
37768 this.processHierarchyBoundsEvent (e);
37769 break;
37770 }
37771 }}, "java.awt.AWTEvent");
37772 Clazz_defineMethod (c$, "processComponentEvent", 
37773 function (e) {
37774 var listener = this.componentListener;
37775 if (listener != null) {
37776 var id = e.getID ();
37777 switch (id) {
37778 case 101:
37779 listener.componentResized (e);
37780 break;
37781 case 100:
37782 listener.componentMoved (e);
37783 break;
37784 case 102:
37785 listener.componentShown (e);
37786 break;
37787 case 103:
37788 listener.componentHidden (e);
37789 break;
37790 }
37791 }}, "java.awt.event.ComponentEvent");
37792 Clazz_defineMethod (c$, "processFocusEvent", 
37793 function (e) {
37794 var listener = this.focusListener;
37795 if (listener != null) {
37796 var id = e.getID ();
37797 switch (id) {
37798 case 1004:
37799 listener.focusGained (e);
37800 break;
37801 case 1005:
37802 listener.focusLost (e);
37803 break;
37804 }
37805 }}, "java.awt.event.FocusEvent");
37806 Clazz_defineMethod (c$, "processKeyEvent", 
37807 function (e) {
37808 var listener = this.keyListener;
37809 if (listener != null) {
37810 var id = e.getID ();
37811 switch (id) {
37812 case 400:
37813 listener.keyTyped (e);
37814 break;
37815 case 401:
37816 listener.keyPressed (e);
37817 break;
37818 case 402:
37819 listener.keyReleased (e);
37820 break;
37821 }
37822 }}, "java.awt.event.KeyEvent");
37823 Clazz_defineMethod (c$, "processMouseEvent", 
37824 function (e) {
37825 var listener = this.mouseListener;
37826 if (listener != null) {
37827 var id = e.getID ();
37828 switch (id) {
37829 case 501:
37830 listener.mousePressed (e);
37831 break;
37832 case 502:
37833 listener.mouseReleased (e);
37834 break;
37835 case 500:
37836 listener.mouseClicked (e);
37837 break;
37838 case 505:
37839 listener.mouseExited (e);
37840 break;
37841 case 504:
37842 listener.mouseEntered (e);
37843 break;
37844 }
37845 }}, "java.awt.event.MouseEvent");
37846 Clazz_defineMethod (c$, "processMouseMotionEvent", 
37847 function (e) {
37848 var listener = this.mouseMotionListener;
37849 if (listener != null) {
37850 var id = e.getID ();
37851 switch (id) {
37852 case 503:
37853 listener.mouseMoved (e);
37854 break;
37855 case 506:
37856 listener.mouseDragged (e);
37857 break;
37858 }
37859 }}, "java.awt.event.MouseEvent");
37860 Clazz_defineMethod (c$, "processMouseWheelEvent", 
37861 function (e) {
37862 var listener = this.mouseWheelListener;
37863 if (listener != null) {
37864 var id = e.getID ();
37865 switch (id) {
37866 case 507:
37867 listener.mouseWheelMoved (e);
37868 break;
37869 }
37870 }}, "java.awt.event.MouseWheelEvent");
37871 Clazz_defineMethod (c$, "postsOldMouseEvents", 
37872 function () {
37873 return false;
37874 });
37875 Clazz_defineMethod (c$, "processInputMethodEvent", 
37876 function (e) {
37877 var listener = this.inputMethodListener;
37878 if (listener != null) {
37879 var id = e.getID ();
37880 switch (id) {
37881 case 1100:
37882 listener.inputMethodTextChanged (e);
37883 break;
37884 case 1101:
37885 listener.caretPositionChanged (e);
37886 break;
37887 }
37888 }}, "java.awt.event.InputMethodEvent");
37889 Clazz_defineMethod (c$, "processHierarchyEvent", 
37890 function (e) {
37891 var listener = this.hierarchyListener;
37892 if (listener != null) {
37893 var id = e.getID ();
37894 switch (id) {
37895 case 1400:
37896 listener.hierarchyChanged (e);
37897 break;
37898 }
37899 }}, "java.awt.event.HierarchyEvent");
37900 Clazz_defineMethod (c$, "processHierarchyBoundsEvent", 
37901 function (e) {
37902 var listener = this.hierarchyBoundsListener;
37903 if (listener != null) {
37904 var id = e.getID ();
37905 switch (id) {
37906 case 1401:
37907 listener.ancestorMoved (e);
37908 break;
37909 case 1402:
37910 listener.ancestorResized (e);
37911 break;
37912 }
37913 }}, "java.awt.event.HierarchyEvent");
37914 Clazz_defineMethod (c$, "handleEvent", 
37915 function (evt) {
37916 switch (evt.id) {
37917 case 504:
37918 return this.mouseEnter (evt, evt.x, evt.y);
37919 case 505:
37920 return this.mouseExit (evt, evt.x, evt.y);
37921 case 503:
37922 return this.mouseMove (evt, evt.x, evt.y);
37923 case 501:
37924 return this.mouseDown (evt, evt.x, evt.y);
37925 case 506:
37926 return this.mouseDrag (evt, evt.x, evt.y);
37927 case 502:
37928 return this.mouseUp (evt, evt.x, evt.y);
37929 case 401:
37930 case 403:
37931 return this.keyDown (evt, evt.key);
37932 case 402:
37933 case 404:
37934 return this.keyUp (evt, evt.key);
37935 case 1001:
37936 return this.action (evt, evt.arg);
37937 case 1004:
37938 return this.gotFocus (evt, evt.arg);
37939 case 1005:
37940 return this.lostFocus (evt, evt.arg);
37941 }
37942 return false;
37943 }, "java.awt.Event");
37944 Clazz_defineMethod (c$, "mouseDown", 
37945 function (evt, x, y) {
37946 return false;
37947 }, "java.awt.Event,~N,~N");
37948 Clazz_defineMethod (c$, "mouseDrag", 
37949 function (evt, x, y) {
37950 return false;
37951 }, "java.awt.Event,~N,~N");
37952 Clazz_defineMethod (c$, "mouseUp", 
37953 function (evt, x, y) {
37954 return false;
37955 }, "java.awt.Event,~N,~N");
37956 Clazz_defineMethod (c$, "mouseMove", 
37957 function (evt, x, y) {
37958 return false;
37959 }, "java.awt.Event,~N,~N");
37960 Clazz_defineMethod (c$, "mouseEnter", 
37961 function (evt, x, y) {
37962 return false;
37963 }, "java.awt.Event,~N,~N");
37964 Clazz_defineMethod (c$, "mouseExit", 
37965 function (evt, x, y) {
37966 return false;
37967 }, "java.awt.Event,~N,~N");
37968 Clazz_defineMethod (c$, "keyDown", 
37969 function (evt, key) {
37970 return false;
37971 }, "java.awt.Event,~N");
37972 Clazz_defineMethod (c$, "keyUp", 
37973 function (evt, key) {
37974 return false;
37975 }, "java.awt.Event,~N");
37976 Clazz_defineMethod (c$, "action", 
37977 function (evt, what) {
37978 return false;
37979 }, "java.awt.Event,~O");
37980 Clazz_defineMethod (c$, "addNotify", 
37981 function () {
37982 this.addNotifyComp ();
37983 });
37984 Clazz_defineMethod (c$, "addNotifyComp", 
37985 function () {
37986 {
37987 var peer = this.peer;
37988 if (peer == null || Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
37989 if (peer == null) {
37990 this.peer = peer = this.getToolkit ().createComponent (this);
37991 }if (this.parent != null) {
37992 var mask = 0;
37993 if ((this.mouseListener != null) || ((this.eventMask & 16) != 0)) {
37994 mask |= 16;
37995 }if ((this.mouseMotionListener != null) || ((this.eventMask & 32) != 0)) {
37996 mask |= 32;
37997 }if ((this.mouseWheelListener != null) || ((this.eventMask & 131072) != 0)) {
37998 mask |= 131072;
37999 }if (this.focusListener != null || (this.eventMask & 4) != 0) {
38000 mask |= 4;
38001 }if (this.keyListener != null || (this.eventMask & 8) != 0) {
38002 mask |= 8;
38003 }if (mask != 0) {
38004 this.parent.proxyEnableEvents (mask);
38005 }}} else {
38006 var parent = this.parent;
38007 if (parent != null && Clazz_instanceOf (parent.peer, java.awt.peer.LightweightPeer)) {
38008 this.relocateComponent ();
38009 }}this.invalidate ();
38010 this.peerFont = this.getFont ();
38011 if (this.getContainer () != null && !this.isAddNotifyComplete) {
38012 this.getContainer ().increaseComponentCount (this);
38013 }if (this.parent != null && this.parent.peer != null) {
38014 var parentContPeer = this.parent.peer;
38015 if (Clazz_instanceOf (parentContPeer, java.awt.peer.LightweightPeer) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
38016 var hwParent = this.getNativeContainer ();
38017 if (hwParent != null && hwParent.peer != null) {
38018 parentContPeer = hwParent.peer;
38019 }}}if (!this.isAddNotifyComplete) {
38020 this.mixOnShowing ();
38021 }this.isAddNotifyComplete = true;
38022 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
38023 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
38024 this.dispatchEvent (e);
38025 }}});
38026 Clazz_defineMethod (c$, "getNativeContainer", 
38027 function () {
38028 var p = this.parent;
38029 while (p != null && Clazz_instanceOf (p.peer, java.awt.peer.LightweightPeer)) {
38030 p = p.getParent ();
38031 }
38032 return p;
38033 });
38034 Clazz_defineMethod (c$, "removeNotify", 
38035 function () {
38036 this.removeNotifyComp ();
38037 });
38038 Clazz_defineMethod (c$, "removeNotifyComp", 
38039 function () {
38040 {
38041 if (this.getContainer () != null && this.isAddNotifyComplete) {
38042 this.getContainer ().decreaseComponentCount (this);
38043 }var p = this.peer;
38044 if (p != null) {
38045 var isLightweight = this.isLightweight ();
38046 this.peer = null;
38047 this.peerFont = null;
38048 java.awt.Toolkit.getEventQueue ().removeSourceEvents (this, false);
38049 p.dispose ();
38050 this.mixOnHiding (isLightweight);
38051 this.isAddNotifyComplete = false;
38052 }if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
38053 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
38054 this.dispatchEvent (e);
38055 }}});
38056 Clazz_defineMethod (c$, "gotFocus", 
38057 function (evt, what) {
38058 return false;
38059 }, "java.awt.Event,~O");
38060 Clazz_defineMethod (c$, "lostFocus", 
38061 function (evt, what) {
38062 return false;
38063 }, "java.awt.Event,~O");
38064 Clazz_defineMethod (c$, "isFocusTraversable", 
38065 function () {
38066 if (this.$isFocusTraversableOverridden == 0) {
38067 this.$isFocusTraversableOverridden = 1;
38068 }return this.focusable;
38069 });
38070 Clazz_defineMethod (c$, "isFocusable", 
38071 function () {
38072 return this.isFocusTraversable ();
38073 });
38074 Clazz_defineMethod (c$, "setFocusable", 
38075 function (focusable) {
38076 var oldFocusable;
38077 {
38078 oldFocusable = this.focusable;
38079 this.focusable = focusable;
38080 }this.$isFocusTraversableOverridden = 2;
38081 this.firePropertyChangeObject ("focusable", new Boolean (oldFocusable), new Boolean (focusable));
38082 }, "~B");
38083 Clazz_defineMethod (c$, "isFocusTraversableOverridden", 
38084 function () {
38085 return (this.$isFocusTraversableOverridden != 1);
38086 });
38087 Clazz_defineMethod (c$, "getFocusTraversalKeysEnabled", 
38088 function () {
38089 return this.focusTraversalKeysEnabled;
38090 });
38091 Clazz_defineMethod (c$, "requestFocus", 
38092 function () {
38093 swingjs.JSToolkit.requestFocus (this);
38094 });
38095 Clazz_defineMethod (c$, "requestFocus", 
38096 function (temporary) {
38097 return swingjs.JSToolkit.requestFocus (this);
38098 }, "~B");
38099 Clazz_defineMethod (c$, "requestFocusInWindow", 
38100 function () {
38101 return swingjs.JSToolkit.requestFocus (this);
38102 });
38103 Clazz_defineMethod (c$, "requestFocusInWindow", 
38104 function (temporary) {
38105 return swingjs.JSToolkit.requestFocus (this);
38106 }, "~B");
38107 Clazz_defineMethod (c$, "getFocusCycleRootAncestor", 
38108 function () {
38109 var rootAncestor = this.parent;
38110 while (rootAncestor != null && !rootAncestor.isFocusCycleRoot ()) {
38111 rootAncestor = rootAncestor.parent;
38112 }
38113 return rootAncestor;
38114 });
38115 Clazz_defineMethod (c$, "isFocusCycleRoot", 
38116 function (container) {
38117 return this.isFocusCycleRootComp (container);
38118 }, "java.awt.Container");
38119 Clazz_defineMethod (c$, "isFocusCycleRootComp", 
38120 function (container) {
38121 var rootAncestor = this.getFocusCycleRootAncestor ();
38122 return (rootAncestor === container);
38123 }, "java.awt.Container");
38124 Clazz_defineMethod (c$, "hasFocus", 
38125 function () {
38126 return swingjs.JSToolkit.hasFocus (this);
38127 });
38128 Clazz_defineMethod (c$, "isFocusOwner", 
38129 function () {
38130 return this.hasFocus ();
38131 });
38132 Clazz_defineMethod (c$, "setAutoFocusTransferOnDisposal", 
38133 function (value) {
38134 this.autoFocusTransferOnDisposal = value;
38135 }, "~B");
38136 Clazz_defineMethod (c$, "isAutoFocusTransferOnDisposal", 
38137 function () {
38138 return this.autoFocusTransferOnDisposal;
38139 });
38140 Clazz_defineMethod (c$, "paramString", 
38141 function () {
38142 return this.paramStringComp ();
38143 });
38144 Clazz_defineMethod (c$, "paramStringComp", 
38145 function () {
38146 var thisName = this.getName ();
38147 var str = (thisName != null ? thisName : "");
38148 if (!this.isValid ()) {
38149 str += ",invalid";
38150 }if (!this.visible) {
38151 str += ",hidden";
38152 }if (!this.enabled) {
38153 str += ",disabled";
38154 }str += ",parent:" + (this.parent == null ? null : this.parent.getName ()) + "," + this.x + "," + this.y + "," + this.width + "x" + this.height;
38155 return str;
38156 });
38157 Clazz_overrideMethod (c$, "toString", 
38158 function () {
38159 return this.getClass ().getName () + "[" + this.paramString () + "]";
38160 });
38161 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38162 function (listener) {
38163 this.addPropChangeListenerComp (listener);
38164 }, "java.beans.PropertyChangeListener");
38165 Clazz_defineMethod (c$, "addPropChangeListenerComp", 
38166 function (listener) {
38167 {
38168 if (listener == null) {
38169 return;
38170 }if (this.changeSupport == null) {
38171 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38172 }this.changeSupport.addPropertyChangeListener1 (listener);
38173 }}, "java.beans.PropertyChangeListener");
38174 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38175 function (listener) {
38176 {
38177 if (listener == null || this.changeSupport == null) {
38178 return;
38179 }this.changeSupport.removePropertyChangeListener (listener);
38180 }}, "java.beans.PropertyChangeListener");
38181 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38182 function () {
38183 {
38184 if (this.changeSupport == null) {
38185 return  new Array (0);
38186 }return this.changeSupport.getPropertyChangeListeners ();
38187 }});
38188 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38189 function (propertyName, listener) {
38190 this.addPropChangeListComp (propertyName, listener);
38191 }, "~S,java.beans.PropertyChangeListener");
38192 Clazz_defineMethod (c$, "addPropChangeListComp", 
38193 function (propertyName, listener) {
38194 {
38195 if (arguments.length == 1) {
38196 addPropertyChangeListener1(propertyName); return; }
38197 }{
38198 if (listener == null) {
38199 return;
38200 }if (this.changeSupport == null) {
38201 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38202 }this.changeSupport.addPropertyChangeListener2 (propertyName, listener);
38203 }}, "~S,java.beans.PropertyChangeListener");
38204 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38205 function (propertyName, listener) {
38206 {
38207 if (listener == null || this.changeSupport == null) {
38208 return;
38209 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
38210 }}, "~S,java.beans.PropertyChangeListener");
38211 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38212 function (propertyName) {
38213 {
38214 if (this.changeSupport == null) {
38215 return  new Array (0);
38216 }return this.changeSupport.getPropertyChangeListeners (propertyName);
38217 }}, "~S");
38218 Clazz_defineMethod (c$, "firePropertyChange", 
38219 function (propertyName, oldValue, newValue) {
38220 this.firePropertyChangeObject (propertyName, oldValue, newValue);
38221 }, "~S,~O,~O");
38222 Clazz_defineMethod (c$, "firePropertyChangeObject", 
38223 function (propertyName, oldValue, newValue) {
38224 var changeSupport;
38225 {
38226 changeSupport = this.changeSupport;
38227 }if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
38228 return;
38229 }changeSupport.firePropertyChange (propertyName, oldValue, newValue);
38230 }, "~S,~O,~O");
38231 Clazz_defineMethod (c$, "firePropertyChange", 
38232 function (propertyName, oldValue, newValue) {
38233 this.firePropertyChangeBool (propertyName, oldValue, newValue);
38234 }, "~S,~B,~B");
38235 Clazz_defineMethod (c$, "firePropertyChangeBool", 
38236 function (propertyName, oldValue, newValue) {
38237 var changeSupport = this.changeSupport;
38238 if (changeSupport == null || oldValue == newValue) {
38239 return;
38240 }changeSupport.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
38241 }, "~S,~B,~B");
38242 Clazz_defineMethod (c$, "firePropertyChange", 
38243 function (propertyName, oldValue, newValue) {
38244 this.firePropertyChangeInt (propertyName, oldValue, newValue);
38245 }, "~S,~N,~N");
38246 Clazz_defineMethod (c$, "firePropertyChangeInt", 
38247 function (propertyName, oldValue, newValue) {
38248 var changeSupport = this.changeSupport;
38249 if (changeSupport == null || oldValue == newValue) {
38250 return;
38251 }changeSupport.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
38252 }, "~S,~N,~N");
38253 Clazz_defineMethod (c$, "firePropertyChange", 
38254 function (propertyName, oldValue, newValue) {
38255 this.firePropertyChangeChar (propertyName, oldValue, newValue);
38256 }, "~S,~S,~S");
38257 Clazz_defineMethod (c$, "firePropertyChangeChar", 
38258 function (propertyName, oldValue, newValue) {
38259 if (this.changeSupport == null || oldValue == newValue) {
38260 return;
38261 }this.firePropertyChangeObject (propertyName,  new Character (oldValue),  new Character (newValue));
38262 }, "~S,~S,~S");
38263 Clazz_defineMethod (c$, "firePropertyChangeShort", 
38264 function (propertyName, oldValue, newValue) {
38265 if (this.changeSupport == null || oldValue == newValue) {
38266 return;
38267 }this.firePropertyChangeObject (propertyName, Short.$valueOf (oldValue), Short.$valueOf (newValue));
38268 }, "~S,~N,~N");
38269 Clazz_defineMethod (c$, "firePropertyChangeLong", 
38270 function (propertyName, oldValue, newValue) {
38271 if (this.changeSupport == null || oldValue == newValue) {
38272 return;
38273 }this.firePropertyChangeObject (propertyName, Long.$valueOf (oldValue), Long.$valueOf (newValue));
38274 }, "~S,~N,~N");
38275 Clazz_defineMethod (c$, "firePropertyChangeFloat", 
38276 function (propertyName, oldValue, newValue) {
38277 if (this.changeSupport == null || oldValue == newValue) {
38278 return;
38279 }this.firePropertyChangeObject (propertyName, Float.$valueOf (oldValue), Float.$valueOf (newValue));
38280 }, "~S,~N,~N");
38281 Clazz_defineMethod (c$, "firePropertyChangeDouble", 
38282 function (propertyName, oldValue, newValue) {
38283 if (this.changeSupport == null || oldValue == newValue) {
38284 return;
38285 }this.firePropertyChangeObject (propertyName, Double.$valueOf (oldValue), Double.$valueOf (newValue));
38286 }, "~S,~N,~N");
38287 Clazz_defineMethod (c$, "setComponentOrientation", 
38288 function (o) {
38289 var oldValue = this.componentOrientation;
38290 this.componentOrientation = o;
38291 this.firePropertyChangeObject ("componentOrientation", oldValue, o);
38292 this.invalidateIfValid ();
38293 }, "java.awt.ComponentOrientation");
38294 Clazz_defineMethod (c$, "getComponentOrientation", 
38295 function () {
38296 return this.componentOrientation;
38297 });
38298 Clazz_defineMethod (c$, "applyComponentOrientation", 
38299 function (orientation) {
38300 this.applyCompOrientComp (orientation);
38301 }, "java.awt.ComponentOrientation");
38302 Clazz_defineMethod (c$, "applyCompOrientComp", 
38303 function (orientation) {
38304 if (orientation == null) {
38305 throw  new NullPointerException ();
38306 }this.setComponentOrientation (orientation);
38307 }, "java.awt.ComponentOrientation");
38308 Clazz_defineMethod (c$, "canBeFocusOwner", 
38309 function () {
38310 if (this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ()) {
38311 return true;
38312 }return false;
38313 });
38314 Clazz_defineMethod (c$, "canBeFocusOwnerRecursively", 
38315 function () {
38316 if (!this.canBeFocusOwner ()) {
38317 return false;
38318 }if (this.parent != null) {
38319 return this.parent.canContainFocusOwner (this);
38320 }return true;
38321 });
38322 Clazz_defineMethod (c$, "relocateComponent", 
38323 function () {
38324 });
38325 Clazz_defineMethod (c$, "getContainingWindow", 
38326 function () {
38327 return jssun.awt.SunToolkit.getContainingWindow (this);
38328 });
38329 c$.isInstanceOf = Clazz_defineMethod (c$, "isInstanceOf", 
38330 function (obj, className) {
38331 if (obj == null) return false;
38332 if (className == null) return false;
38333 var cls = obj.getClass ();
38334 while (cls != null) {
38335 if (cls.getName ().equals (className)) {
38336 return true;
38337 }cls = cls.getSuperclass ();
38338 }
38339 return false;
38340 }, "~O,~S");
38341 Clazz_defineMethod (c$, "areBoundsValid", 
38342 function () {
38343 var cont = this.getContainer ();
38344 return cont == null || cont.isValid () || cont.getLayout () == null;
38345 });
38346 Clazz_defineMethod (c$, "getLocationOnWindow", 
38347 function () {
38348 var curLocation = this.getLocation ();
38349 for (var parent = this.getContainer (); parent != null && !(Clazz_instanceOf (parent, java.awt.Window)); parent = parent.getContainer ()) {
38350 curLocation.x += parent.getX ();
38351 curLocation.y += parent.getY ();
38352 }
38353 return curLocation;
38354 });
38355 Clazz_defineMethod (c$, "getSiblingIndexAbove", 
38356 function () {
38357 var parent = this.getContainer ();
38358 if (parent == null) {
38359 return -1;
38360 }var nextAbove = parent.getComponentZOrder (this) - 1;
38361 return nextAbove < 0 ? -1 : nextAbove;
38362 });
38363 Clazz_defineMethod (c$, "getSiblingIndexBelow", 
38364 function () {
38365 var parent = this.getContainer ();
38366 if (parent == null) {
38367 return -1;
38368 }var nextBelow = parent.getComponentZOrder (this) + 1;
38369 return nextBelow >= parent.getComponentCount () ? -1 : nextBelow;
38370 });
38371 Clazz_defineMethod (c$, "mixOnShowing", 
38372 function () {
38373 });
38374 Clazz_defineMethod (c$, "mixOnHiding", 
38375 function (isLightweight) {
38376 }, "~B");
38377 Clazz_defineMethod (c$, "mixOnReshaping", 
38378 function () {
38379 swingjs.JSToolkit.taintUI (this);
38380 });
38381 Clazz_defineMethod (c$, "mixOnZOrderChanging", 
38382 function (oldZorder, newZorder) {
38383 }, "~N,~N");
38384 Clazz_defineMethod (c$, "mixOnValidating", 
38385 function () {
38386 });
38387 c$.doesClassImplement = Clazz_defineMethod (c$, "doesClassImplement", 
38388  function (cls, interfaceName) {
38389 if (cls == null) return false;
38390 for (var c, $c = 0, $$c = cls.getInterfaces (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
38391 if (c.getName ().equals (interfaceName)) {
38392 return true;
38393 }}
38394 return java.awt.Component.doesClassImplement (cls.getSuperclass (), interfaceName);
38395 }, "Class,~S");
38396 c$.doesImplement = Clazz_defineMethod (c$, "doesImplement", 
38397 function (obj, interfaceName) {
38398 if (obj == null) return false;
38399 if (interfaceName == null) return false;
38400 return java.awt.Component.doesClassImplement (obj.getClass (), interfaceName);
38401 }, "~O,~S");
38402 Clazz_pu$h(self.c$);
38403 c$ = Clazz_declareType (java.awt.Component, "BaselineResizeBehavior", Enum);
38404 Clazz_defineEnumConstant (c$, "CONSTANT_ASCENT", 0, []);
38405 Clazz_defineEnumConstant (c$, "CONSTANT_DESCENT", 1, []);
38406 Clazz_defineEnumConstant (c$, "CENTER_OFFSET", 2, []);
38407 Clazz_defineEnumConstant (c$, "OTHER", 3, []);
38408 c$ = Clazz_p0p ();
38409 Clazz_pu$h(self.c$);
38410 c$ = Clazz_declareType (java.awt.Component, "AWTTreeLock");
38411 c$ = Clazz_p0p ();
38412 Clazz_defineStatics (c$,
38413 "FOCUS_TRAVERSABLE_UNKNOWN", 0,
38414 "FOCUS_TRAVERSABLE_DEFAULT", 1,
38415 "FOCUS_TRAVERSABLE_SET", 2,
38416 "actionListenerK", "actionL",
38417 "adjustmentListenerK", "adjustmentL",
38418 "componentListenerK", "componentL",
38419 "containerListenerK", "containerL",
38420 "focusListenerK", "focusL",
38421 "itemListenerK", "itemL",
38422 "keyListenerK", "keyL",
38423 "mouseListenerK", "mouseL",
38424 "mouseMotionListenerK", "mouseMotionL",
38425 "mouseWheelListenerK", "mouseWheelL",
38426 "textListenerK", "textL",
38427 "ownedWindowK", "ownedL",
38428 "windowListenerK", "windowL",
38429 "inputMethodListenerK", "inputMethodL",
38430 "hierarchyListenerK", "hierarchyL",
38431 "hierarchyBoundsListenerK", "hierarchyBoundsL",
38432 "windowStateListenerK", "windowStateL",
38433 "windowFocusListenerK", "windowFocusL",
38434 "isInc", false,
38435 "incRate", 0,
38436 "TOP_ALIGNMENT", 0.0,
38437 "CENTER_ALIGNMENT", 0.5,
38438 "BOTTOM_ALIGNMENT", 1.0,
38439 "LEFT_ALIGNMENT", 0.0,
38440 "RIGHT_ALIGNMENT", 1.0,
38441 "incr", 0);
38442 c$.coalesceMap = c$.prototype.coalesceMap =  new java.util.HashMap ();
38443 });
38444 Clazz_declarePackage ("jssun.awt");
38445 Clazz_load (null, "jssun.awt.SunGraphicsCallback", ["java.awt.Container", "$.Graphics2D", "jssun.awt.ConstrainableGraphics", "$.Graphics2Delegate"], function () {
38446 c$ = Clazz_declareType (jssun.awt, "SunGraphicsCallback");
38447 Clazz_defineMethod (c$, "constrainGraphics", 
38448 function (g, bounds) {
38449 if (Clazz_instanceOf (g, jssun.awt.ConstrainableGraphics)) {
38450 (g).constrain (bounds.x, bounds.y, bounds.width, bounds.height);
38451 } else {
38452 g.translate (bounds.x, bounds.y);
38453 }g.clipRect (0, 0, bounds.width, bounds.height);
38454 }, "java.awt.Graphics,java.awt.Rectangle");
38455 Clazz_defineMethod (c$, "runOneComponent", 
38456 function (comp, bounds, g, clip, weightFlags) {
38457 if (comp == null || !comp.isLightweight () || !comp.isVisible ()) {
38458 return;
38459 }var lightweight = comp.isLightweight ();
38460 if ((lightweight && (weightFlags & 2) == 0) || (!lightweight && (weightFlags & 1) == 0)) {
38461 return;
38462 }if (bounds == null) {
38463 bounds = comp.getBounds ();
38464 }if (clip == null || clip.intersects (bounds)) {
38465 var cg = g.createSwingJS ();
38466 try {
38467 this.constrainGraphics (cg, bounds);
38468 cg.setFont (comp.getFont ());
38469 cg.setColor (comp.getForeground ());
38470 if (Clazz_instanceOf (cg, java.awt.Graphics2D)) {
38471 (cg).setBackground (comp.getBackground ());
38472 } else if (Clazz_instanceOf (cg, jssun.awt.Graphics2Delegate)) {
38473 (cg).setBackground (comp.getBackground ());
38474 }this.run (comp, cg);
38475 } finally {
38476 cg.dispose ();
38477 }
38478 }}, "java.awt.Component,java.awt.Rectangle,java.awt.Graphics,java.awt.Shape,~N");
38479 Clazz_defineMethod (c$, "runComponents", 
38480 function (comps, g, weightFlags) {
38481 var ncomponents = comps.length;
38482 var clip = g.getClip ();
38483 for (var i = ncomponents - 1; i >= 0; i--) {
38484 this.runOneComponent (comps[i], null, g, clip, weightFlags);
38485 }
38486 }, "~A,java.awt.Graphics,~N");
38487 Clazz_pu$h(self.c$);
38488 c$ = Clazz_declareType (jssun.awt.SunGraphicsCallback, "PaintHeavyweightComponentsCallback", jssun.awt.SunGraphicsCallback);
38489 Clazz_makeConstructor (c$, 
38490  function () {
38491 Clazz_superConstructor (this, jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback, []);
38492 });
38493 Clazz_overrideMethod (c$, "run", 
38494 function (a, b) {
38495 if (!a.isLightweight ()) {
38496 a.paintAll (b);
38497 } else if (Clazz_instanceOf (a, java.awt.Container)) {
38498 this.runComponents ((a).getComponents (), b, 3);
38499 }}, "java.awt.Component,java.awt.Graphics");
38500 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
38501 function () {
38502 return jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback.instance;
38503 });
38504 c$.instance = c$.prototype.instance =  new jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback ();
38505 c$ = Clazz_p0p ();
38506 Clazz_defineStatics (c$,
38507 "HEAVYWEIGHTS", 0x1,
38508 "LIGHTWEIGHTS", 0x2,
38509 "TWO_PASSES", 0x4);
38510 });
38511 Clazz_declarePackage ("javax.swing");
38512 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 () {
38513 c$ = Clazz_decorateAsClass (function () {
38514 this.volatileMap = null;
38515 this.hwDirtyComponents = null;
38516 this.dirtyComponents = null;
38517 this.tmpDirtyComponents = null;
38518 this.invalidComponents = null;
38519 this.runnableList = null;
38520 this.paintDepth = 0;
38521 this.painting = false;
38522 this.repaintRoot = null;
38523 this.paintThread = null;
38524 this.processingRunnable = null;
38525 this.myComponent = null;
38526 this.tmp = null;
38527 if (!Clazz_isClassDefined ("javax.swing.RepaintManager.ProcessingRunnable")) {
38528 javax.swing.RepaintManager.$RepaintManager$ProcessingRunnable$ ();
38529 }
38530 Clazz_instantialize (this, arguments);
38531 }, javax.swing, "RepaintManager");
38532 Clazz_prepareFields (c$, function () {
38533 this.volatileMap =  new java.util.HashMap (1);
38534 this.tmp =  new java.awt.Rectangle ();
38535 });
38536 c$.currentManager = Clazz_defineMethod (c$, "currentManager", 
38537 function (c) {
38538 var appContext = jssun.awt.AppContext.getAppContext ();
38539 var rm = appContext.get (javax.swing.RepaintManager.repaintManagerKey);
38540 if (rm == null) {
38541 rm =  new javax.swing.RepaintManager ();
38542 rm.set (c);
38543 appContext.put (javax.swing.RepaintManager.repaintManagerKey, rm);
38544 }return rm;
38545 }, "java.awt.Component");
38546 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
38547 function (aRepaintManager) {
38548 if (aRepaintManager != null) {
38549 javax.swing.SwingUtilities.appContextPut (javax.swing.RepaintManager.repaintManagerKey, aRepaintManager);
38550 } else {
38551 javax.swing.SwingUtilities.appContextRemove (javax.swing.RepaintManager.repaintManagerKey);
38552 }}, "javax.swing.RepaintManager");
38553 Clazz_makeConstructor (c$, 
38554  function () {
38555 this.processingRunnable = Clazz_innerTypeInstance (javax.swing.RepaintManager.ProcessingRunnable, this, null);
38556 });
38557 Clazz_defineMethod (c$, "set", 
38558  function (c) {
38559 this.myComponent = c;
38560 this.dirtyComponents =  new java.util.IdentityHashMap ();
38561 this.tmpDirtyComponents =  new java.util.IdentityHashMap ();
38562 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38563 }, "java.awt.Component");
38564 Clazz_defineMethod (c$, "addInvalidComponent", 
38565 function (invalidComponent) {
38566 var validateRoot = null;
38567 for (var c = invalidComponent; c != null; c = c.getParent ()) {
38568 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane))) {
38569 return;
38570 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
38571 validateRoot = c;
38572 break;
38573 }}
38574 if (validateRoot == null) {
38575 return;
38576 }var root = null;
38577 for (var c = validateRoot; c != null; c = c.getParent ()) {
38578 if (!c.isVisible ()) {
38579 return;
38580 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
38581 root = c;
38582 break;
38583 }}
38584 if (root == null) {
38585 return;
38586 }if (this.invalidComponents == null) {
38587 this.invalidComponents =  new java.util.ArrayList ();
38588 } else {
38589 var n = this.invalidComponents.size ();
38590 for (var i = 0; i < n; i++) {
38591 if (validateRoot === this.invalidComponents.get (i)) {
38592 return;
38593 }}
38594 }this.invalidComponents.add (validateRoot);
38595 this.scheduleProcessingRunnable (root);
38596 }, "javax.swing.JComponent");
38597 Clazz_defineMethod (c$, "removeInvalidComponent", 
38598 function (component) {
38599 if (this.invalidComponents != null) {
38600 var index = this.invalidComponents.indexOf (component);
38601 if (index != -1) {
38602 this.invalidComponents.remove (index);
38603 }}}, "javax.swing.JComponent");
38604 Clazz_defineMethod (c$, "addDirtyRegion0", 
38605  function (c, x, y, w, h) {
38606 {
38607 var g = c.getGraphics();
38608 if (g == null || g.gc == null)return;
38609 }if ((w <= 0) || (h <= 0) || (c == null)) {
38610 return;
38611 }if ((c.getWidth () <= 0) || (c.getHeight () <= 0)) {
38612 return;
38613 }if (this.extendDirtyRegion (c, x, y, w, h)) {
38614 return;
38615 }var root = null;
38616 for (var p = c; p != null; p = p.getParent ()) {
38617 if (!p.isVisible () || p.getPeer () == null) {
38618 return;
38619 }if ((Clazz_instanceOf (p, java.awt.Window)) || (Clazz_instanceOf (p, java.applet.Applet))) {
38620 if (Clazz_instanceOf (p, java.awt.Frame) && ((p).getExtendedState () & 1) == 1) {
38621 return;
38622 }root = p;
38623 break;
38624 }}
38625 if (root == null) return;
38626 {
38627 if (this.extendDirtyRegion (c, x, y, w, h)) {
38628 return;
38629 }this.dirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38630 }this.scheduleProcessingRunnable (c);
38631 }, "java.awt.Container,~N,~N,~N,~N");
38632 Clazz_defineMethod (c$, "addDirtyRegion", 
38633 function (c, x, y, w, h) {
38634 this.addDirtyRegion0 (c, x, y, w, h);
38635 }, "javax.swing.JComponent,~N,~N,~N,~N");
38636 Clazz_defineMethod (c$, "addDirtyRegion", 
38637 function (window, x, y, w, h) {
38638 this.addDirtyRegion0 (window, x, y, w, h);
38639 }, "java.awt.Window,~N,~N,~N,~N");
38640 Clazz_defineMethod (c$, "addDirtyRegion", 
38641 function (applet, x, y, w, h) {
38642 this.addDirtyRegion0 (applet, x, y, w, h);
38643 }, "java.applet.Applet,~N,~N,~N,~N");
38644 Clazz_defineMethod (c$, "scheduleHeavyWeightPaints", 
38645 function () {
38646 var hws;
38647 {
38648 if (this.hwDirtyComponents.size () == 0) {
38649 return;
38650 }hws = this.hwDirtyComponents;
38651 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38652 }for (var hw, $hw = hws.keySet ().iterator (); $hw.hasNext () && ((hw = $hw.next ()) || true);) {
38653 var dirty = hws.get (hw);
38654 if (Clazz_instanceOf (hw, java.awt.Window)) {
38655 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38656 } else if (Clazz_instanceOf (hw, java.applet.Applet)) {
38657 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38658 } else {
38659 this.addDirtyRegion0 (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38660 }}
38661 });
38662 Clazz_defineMethod (c$, "nativeAddDirtyRegion", 
38663 function (appContext, c, x, y, w, h) {
38664 if (w > 0 && h > 0) {
38665 {
38666 var dirty = this.hwDirtyComponents.get (c);
38667 if (dirty == null) {
38668 this.hwDirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38669 } else {
38670 this.hwDirtyComponents.put (c, javax.swing.SwingUtilities.computeUnion (x, y, w, h, dirty));
38671 }}this.scheduleProcessingRunnable (appContext);
38672 }}, "jssun.awt.AppContext,java.awt.Container,~N,~N,~N,~N");
38673 Clazz_defineMethod (c$, "extendDirtyRegion", 
38674  function (c, x, y, w, h) {
38675 var r = this.dirtyComponents.get (c);
38676 if (r != null) {
38677 javax.swing.SwingUtilities.computeUnion (x, y, w, h, r);
38678 return true;
38679 }return false;
38680 }, "java.awt.Component,~N,~N,~N,~N");
38681 Clazz_defineMethod (c$, "getDirtyRegion", 
38682 function (aComponent) {
38683 var r = null;
38684 {
38685 r = this.dirtyComponents.get (aComponent);
38686 }if (r == null) return  new java.awt.Rectangle (0, 0, 0, 0);
38687  else return  new java.awt.Rectangle (r);
38688 }, "javax.swing.JComponent");
38689 Clazz_defineMethod (c$, "markCompletelyDirty", 
38690 function (aComponent) {
38691 this.addDirtyRegion (aComponent, 0, 0, 2147483647, 2147483647);
38692 }, "javax.swing.JComponent");
38693 Clazz_defineMethod (c$, "markCompletelyClean", 
38694 function (aComponent) {
38695 {
38696 this.dirtyComponents.remove (aComponent);
38697 }}, "javax.swing.JComponent");
38698 Clazz_defineMethod (c$, "isCompletelyDirty", 
38699 function (aComponent) {
38700 var r;
38701 r = this.getDirtyRegion (aComponent);
38702 if (r.width == 2147483647 && r.height == 2147483647) return true;
38703  else return false;
38704 }, "javax.swing.JComponent");
38705 Clazz_defineMethod (c$, "validateInvalidComponents", 
38706 function () {
38707 var ic;
38708 {
38709 if (this.invalidComponents == null) {
38710 return;
38711 }ic = this.invalidComponents;
38712 this.invalidComponents = null;
38713 }var n = ic.size ();
38714 for (var i = 0; i < n; i++) {
38715 var c = ic.get (i);
38716 c.validate ();
38717 }
38718 });
38719 Clazz_defineMethod (c$, "prePaintDirtyRegions", 
38720  function () {
38721 var dirtyComponents;
38722 var runnableList;
38723 {
38724 dirtyComponents = this.dirtyComponents;
38725 runnableList = this.runnableList;
38726 this.runnableList = null;
38727 }if (runnableList != null) {
38728 for (var runnable, $runnable = runnableList.iterator (); $runnable.hasNext () && ((runnable = $runnable.next ()) || true);) {
38729 runnable.run ();
38730 }
38731 }this.paintDirtyRegions ();
38732 if (dirtyComponents.size () > 0) {
38733 this.paintDirtyRegions1 (dirtyComponents);
38734 }});
38735 Clazz_defineMethod (c$, "updateWindows", 
38736  function (dirtyComponents) {
38737 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
38738 if (!(Clazz_instanceOf (toolkit, jssun.awt.SunToolkit) && (toolkit).needUpdateWindow ())) {
38739 return dirtyComponents;
38740 }var windows =  new java.util.HashSet ();
38741 var dirtyComps = dirtyComponents.keySet ();
38742 for (var it = dirtyComps.iterator (); it.hasNext (); ) {
38743 var dirty = it.next ();
38744 var window = Clazz_instanceOf (dirty, java.awt.Window) ? dirty : javax.swing.SwingUtilities.getWindowAncestor (dirty);
38745 if (window != null && !jssun.awt.AWTAccessor.getWindowAccessor ().isOpaque (window)) {
38746 it.remove ();
38747 windows.add (window);
38748 }}
38749 for (var window, $window = windows.iterator (); $window.hasNext () && ((window = $window.next ()) || true);) {
38750 jssun.awt.AWTAccessor.getWindowAccessor ().updateWindow (window, null);
38751 }
38752 return dirtyComponents;
38753 }, "java.util.Map");
38754 Clazz_defineMethod (c$, "paintDirtyRegions", 
38755 function () {
38756 {
38757 var tmp = this.tmpDirtyComponents;
38758 this.tmpDirtyComponents = this.dirtyComponents;
38759 this.dirtyComponents = tmp;
38760 this.dirtyComponents.clear ();
38761 }this.paintDirtyRegions1 (this.tmpDirtyComponents);
38762 });
38763 Clazz_defineMethod (c$, "paintDirtyRegions1", 
38764  function (tmpDirtyComponents) {
38765 if (tmpDirtyComponents.isEmpty ()) {
38766 return;
38767 }this.updateWindows (tmpDirtyComponents);
38768 var roots =  new java.util.ArrayList (tmpDirtyComponents.size ());
38769 for (var dirty, $dirty = tmpDirtyComponents.keySet ().iterator (); $dirty.hasNext () && ((dirty = $dirty.next ()) || true);) {
38770 this.collectDirtyComponents (tmpDirtyComponents, dirty, roots);
38771 }
38772 var count = roots.size ();
38773 this.painting = true;
38774 try {
38775 for (var j = 0; j < count; j++) {
38776 var i = j;
38777 var dirtyComponent = roots.get (j);
38778 var rect = tmpDirtyComponents.get (dirtyComponent);
38779 var localBoundsH = dirtyComponent.getHeight ();
38780 var localBoundsW = dirtyComponent.getWidth ();
38781 javax.swing.SwingUtilities.computeIntersection (0, 0, localBoundsW, localBoundsH, rect);
38782 if (Clazz_instanceOf (dirtyComponent, javax.swing.JComponent)) {
38783 (dirtyComponent).paintImmediately (rect.x, rect.y, rect.width, rect.height);
38784 } else if (dirtyComponent.isShowing ()) {
38785 var g = javax.swing.JComponent.safelyGetGraphics (dirtyComponent, dirtyComponent);
38786 if (g != null) {
38787 try {
38788 dirtyComponent.paint (g);
38789 } finally {
38790 g.dispose ();
38791 }
38792 }}if (this.repaintRoot != null) {
38793 this.adjustRoots (this.repaintRoot, roots, i + 1);
38794 count = roots.size ();
38795 this.repaintRoot.paintImmediately (0, 0, this.repaintRoot.getWidth (), this.repaintRoot.getHeight ());
38796 this.repaintRoot = null;
38797 }}
38798 } finally {
38799 this.painting = false;
38800 }
38801 tmpDirtyComponents.clear ();
38802 }, "java.util.Map");
38803 Clazz_defineMethod (c$, "adjustRoots", 
38804  function (root, roots, index) {
38805 for (var i = roots.size () - 1; i >= index; i--) {
38806 var c = roots.get (i);
38807 for (; ; ) {
38808 if (c === root || c == null || !(Clazz_instanceOf (c, javax.swing.JComponent))) {
38809 break;
38810 }c = c.getParent ();
38811 }
38812 if (c === root) {
38813 roots.remove (i);
38814 }}
38815 }, "javax.swing.JComponent,java.util.List,~N");
38816 Clazz_defineMethod (c$, "collectDirtyComponents", 
38817 function (dirtyComponents, dirtyComponent, roots) {
38818 var dx;
38819 var dy;
38820 var rootDx;
38821 var rootDy;
38822 var component;
38823 var rootDirtyComponent;
38824 var parent;
38825 component = rootDirtyComponent = dirtyComponent;
38826 var x = dirtyComponent.getX ();
38827 var y = dirtyComponent.getY ();
38828 var w = dirtyComponent.getWidth ();
38829 var h = dirtyComponent.getHeight ();
38830 dx = rootDx = 0;
38831 dy = rootDy = 0;
38832 this.tmp.setBounds (dirtyComponents.get (dirtyComponent));
38833 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38834 if (this.tmp.isEmpty ()) {
38835 return;
38836 }for (; ; ) {
38837 if (!(Clazz_instanceOf (component, javax.swing.JComponent))) break;
38838 parent = component.getParent ();
38839 if (parent == null) break;
38840 component = parent;
38841 dx += x;
38842 dy += y;
38843 this.tmp.setLocation (this.tmp.x + x, this.tmp.y + y);
38844 x = component.getX ();
38845 y = component.getY ();
38846 w = component.getWidth ();
38847 h = component.getHeight ();
38848 this.tmp = javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38849 if (this.tmp.isEmpty ()) {
38850 return;
38851 }if (dirtyComponents.get (component) != null) {
38852 rootDirtyComponent = component;
38853 rootDx = dx;
38854 rootDy = dy;
38855 }}
38856 if (dirtyComponent !== rootDirtyComponent) {
38857 var r;
38858 this.tmp.setLocation (this.tmp.x + rootDx - dx, this.tmp.y + rootDy - dy);
38859 r = dirtyComponents.get (rootDirtyComponent);
38860 javax.swing.SwingUtilities.computeUnion (this.tmp.x, this.tmp.y, this.tmp.width, this.tmp.height, r);
38861 }if (!roots.contains (rootDirtyComponent)) roots.add (rootDirtyComponent);
38862 }, "java.util.Map,java.awt.Component,java.util.List");
38863 Clazz_overrideMethod (c$, "toString", 
38864 function () {
38865 var sb =  new StringBuffer ();
38866 if (this.dirtyComponents != null) sb.append ("" + this.dirtyComponents);
38867 return sb.toString ();
38868 });
38869 Clazz_defineMethod (c$, "getOffscreenBuffer", 
38870 function (c, proposedWidth, proposedHeight) {
38871 return null;
38872 }, "java.awt.Component,~N,~N");
38873 Clazz_defineMethod (c$, "getVolatileOffscreenBuffer", 
38874 function (c, proposedWidth, proposedHeight) {
38875 var config = c.getGraphicsConfiguration ();
38876 var maxSize = this.getDoubleBufferMaximumSize ();
38877 var width = proposedWidth < 1 ? 1 : (proposedWidth > maxSize.width ? maxSize.width : proposedWidth);
38878 var height = proposedHeight < 1 ? 1 : (proposedHeight > maxSize.height ? maxSize.height : proposedHeight);
38879 var image = this.volatileMap.get (config);
38880 if (image == null || image.getWidth () < width || image.getHeight () < height) {
38881 if (image != null) {
38882 image.flush ();
38883 }image = config.createCompatibleVolatileImage (width, height);
38884 this.volatileMap.put (config, image);
38885 }return image;
38886 }, "java.awt.Component,~N,~N");
38887 Clazz_defineMethod (c$, "setDoubleBufferMaximumSize", 
38888 function (d) {
38889 }, "java.awt.Dimension");
38890 Clazz_defineMethod (c$, "getDoubleBufferMaximumSize", 
38891 function () {
38892 return null;
38893 });
38894 Clazz_defineMethod (c$, "setDoubleBufferingEnabled", 
38895 function (aFlag) {
38896 }, "~B");
38897 Clazz_defineMethod (c$, "resetDoubleBuffer", 
38898 function () {
38899 });
38900 Clazz_defineMethod (c$, "resetVolatileDoubleBuffer", 
38901 function (gc) {
38902 var image = this.volatileMap.remove (gc);
38903 if (image != null) {
38904 image.flush ();
38905 }}, "java.awt.GraphicsConfiguration");
38906 Clazz_defineMethod (c$, "useVolatileDoubleBuffer", 
38907 function () {
38908 return javax.swing.RepaintManager.volatileImageBufferEnabled;
38909 });
38910 Clazz_defineMethod (c$, "isPaintingThread", 
38911  function () {
38912 return (Thread.currentThread () === this.paintThread);
38913 });
38914 Clazz_defineMethod (c$, "paint", 
38915 function (paintingComponent, bufferComponent, g, x, y, w, h) {
38916 paintingComponent.paintToOffscreen (g, x, y, w, h, x + w, y + h);
38917 }, "javax.swing.JComponent,javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N");
38918 Clazz_defineMethod (c$, "beginPaint", 
38919 function () {
38920 var multiThreadedPaint = false;
38921 var paintDepth = 0;
38922 var currentThread = Thread.currentThread ();
38923 {
38924 paintDepth = this.paintDepth;
38925 if (this.paintThread == null || currentThread === this.paintThread) {
38926 this.paintThread = currentThread;
38927 this.paintDepth++;
38928 } else {
38929 multiThreadedPaint = true;
38930 }}});
38931 Clazz_defineMethod (c$, "endPaint", 
38932 function () {
38933 if (this.isPaintingThread ()) {
38934 }});
38935 Clazz_defineMethod (c$, "doubleBufferingChanged", 
38936 function (rootPane) {
38937 }, "javax.swing.JRootPane");
38938 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38939  function (c) {
38940 this.scheduleProcessingRunnable (c.getAppContext ());
38941 }, "java.awt.Component");
38942 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38943  function (context) {
38944 if (this.processingRunnable.markPending ()) {
38945 jssun.awt.SunToolkit.getSystemEventQueueImplPP (context).postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), this.processingRunnable));
38946 }}, "jssun.awt.AppContext");
38947 c$.$RepaintManager$ProcessingRunnable$ = function () {
38948 Clazz_pu$h(self.c$);
38949 c$ = Clazz_decorateAsClass (function () {
38950 Clazz_prepareCallback (this, arguments);
38951 this.pending = false;
38952 Clazz_instantialize (this, arguments);
38953 }, javax.swing.RepaintManager, "ProcessingRunnable", null, Runnable);
38954 Clazz_defineMethod (c$, "markPending", 
38955 function () {
38956 if (!this.pending) {
38957 this.pending = true;
38958 return true;
38959 }return false;
38960 });
38961 Clazz_overrideMethod (c$, "run", 
38962 function () {
38963 {
38964 this.pending = false;
38965 }this.b$["javax.swing.RepaintManager"].scheduleHeavyWeightPaints ();
38966 this.b$["javax.swing.RepaintManager"].validateInvalidComponents ();
38967 this.b$["javax.swing.RepaintManager"].prePaintDirtyRegions ();
38968 swingjs.JSToolkit.forceRepaint (this.b$["javax.swing.RepaintManager"].myComponent);
38969 });
38970 c$ = Clazz_p0p ();
38971 };
38972 Clazz_defineStatics (c$,
38973 "HANDLE_TOP_LEVEL_PAINT", false);
38974 c$.repaintManagerKey = c$.prototype.repaintManagerKey = javax.swing.RepaintManager;
38975 Clazz_defineStatics (c$,
38976 "volatileImageBufferEnabled", true);
38977 {
38978 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38979 var headless = false;
38980 if (javax.swing.RepaintManager.volatileImageBufferEnabled && headless) {
38981 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38982 }javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT = true;
38983 }});
38984 Clazz_declarePackage ("jssun.awt");
38985 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 () {
38986 c$ = Clazz_decorateAsClass (function () {
38987 this.windowClosingListener = null;
38988 Clazz_instantialize (this, arguments);
38989 }, jssun.awt, "SunToolkit", java.awt.Toolkit, [jssun.awt.WindowClosingSupport, jssun.awt.WindowClosingListener, jssun.awt.ComponentFactory]);
38990 Clazz_makeConstructor (c$, 
38991 function () {
38992 Clazz_superConstructor (this, jssun.awt.SunToolkit, []);
38993 var eventQueue;
38994 eventQueue =  new java.awt.EventQueue ();
38995 var appContext = jssun.awt.AppContext.getAppContext ();
38996 if (appContext != null) {
38997 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
38998 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
38999 appContext.put ("PostEventQueue", postEventQueue);
39000 }});
39001 Clazz_defineMethod (c$, "useBufferPerWindow", 
39002 function () {
39003 return false;
39004 });
39005 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
39006 function () {
39007 var threadGroup = Thread.currentThread ().getThreadGroup ();
39008 return jssun.awt.SunToolkit.createNewAppContext (threadGroup);
39009 });
39010 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
39011 function (threadGroup) {
39012 var eventQueue;
39013 var eqName = System.getProperty ("AWT.EventQueueClass", "java.awt.EventQueue");
39014 try {
39015 eventQueue = Clazz._4Name (eqName).newInstance ();
39016 } catch (e) {
39017 if (Clazz_exceptionOf (e, Exception)) {
39018 System.err.println ("Failed loading " + eqName + ": " + e);
39019 eventQueue =  new java.awt.EventQueue ();
39020 } else {
39021 throw e;
39022 }
39023 }
39024 var appContext =  new jssun.awt.AppContext (threadGroup);
39025 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
39026 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
39027 appContext.put ("PostEventQueue", postEventQueue);
39028 return appContext;
39029 }, "ThreadGroup");
39030 c$.wakeupEventQueue = Clazz_defineMethod (c$, "wakeupEventQueue", 
39031 function (q, isShutdown) {
39032 q.wakeup (isShutdown);
39033 }, "java.awt.EventQueue,~B");
39034 c$.targetToPeer = Clazz_defineMethod (c$, "targetToPeer", 
39035 function (target) {
39036 if (target != null) {
39037 return jssun.awt.AWTAutoShutdown.getInstance ().getPeer (target);
39038 }return null;
39039 }, "~O");
39040 c$.targetCreatedPeer = Clazz_defineMethod (c$, "targetCreatedPeer", 
39041 function (target, peer) {
39042 if (target != null && peer != null) {
39043 jssun.awt.AWTAutoShutdown.getInstance ().registerPeer (target, peer);
39044 }}, "~O,~O");
39045 c$.targetDisposedPeer = Clazz_defineMethod (c$, "targetDisposedPeer", 
39046 function (target, peer) {
39047 if (target != null && peer != null) {
39048 jssun.awt.AWTAutoShutdown.getInstance ().unregisterPeer (target, peer);
39049 }}, "~O,~O");
39050 c$.setAppContext = Clazz_defineMethod (c$, "setAppContext", 
39051  function (target, context) {
39052 if (Clazz_instanceOf (target, java.awt.Component)) {
39053 jssun.awt.AWTAccessor.getComponentAccessor ().setAppContext (target, context);
39054 } else {
39055 return false;
39056 }return true;
39057 }, "~O,jssun.awt.AppContext");
39058 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
39059  function (target) {
39060 if (Clazz_instanceOf (target, java.awt.Component)) {
39061 {
39062 return target.appContext;
39063 }} else {
39064 return null;
39065 }}, "~O");
39066 c$.targetToAppContext = Clazz_defineMethod (c$, "targetToAppContext", 
39067 function (target) {
39068 if (target == null) {
39069 return null;
39070 }var context = jssun.awt.SunToolkit.getAppContext (target);
39071 if (context == null) {
39072 context = jssun.awt.SunToolkit.appContextMap.get (target);
39073 }return context;
39074 }, "~O");
39075 c$.setLWRequestStatus = Clazz_defineMethod (c$, "setLWRequestStatus", 
39076 function (changed, status) {
39077 jssun.awt.AWTAccessor.getWindowAccessor ().setLWRequestStatus (changed, status);
39078 }, "java.awt.Window,~B");
39079 c$.checkAndSetPolicy = Clazz_defineMethod (c$, "checkAndSetPolicy", 
39080 function (cont, isSwingCont) {
39081 }, "java.awt.Container,~B");
39082 c$.insertTargetMapping = Clazz_defineMethod (c$, "insertTargetMapping", 
39083 function (target, appContext) {
39084 if (!jssun.awt.SunToolkit.setAppContext (target, appContext)) {
39085 jssun.awt.SunToolkit.appContextMap.put (target, appContext);
39086 }}, "~O,jssun.awt.AppContext");
39087 c$.postEvent = Clazz_defineMethod (c$, "postEvent", 
39088 function (appContext, event) {
39089 if (event == null) {
39090 throw  new NullPointerException ();
39091 }var postEventQueue = appContext.get ("PostEventQueue");
39092 if (postEventQueue != null) {
39093 postEventQueue.postEvent (event);
39094 }}, "jssun.awt.AppContext,java.awt.AWTEvent");
39095 c$.postPriorityEvent = Clazz_defineMethod (c$, "postPriorityEvent", 
39096 function (e) {
39097 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);
39098 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (e.getSource ()), pe);
39099 }, "java.awt.AWTEvent");
39100 c$.flushPendingEvents = Clazz_defineMethod (c$, "flushPendingEvents", 
39101 function () {
39102 var appContext = jssun.awt.AppContext.getAppContext ();
39103 var postEventQueue = appContext.get ("PostEventQueue");
39104 if (postEventQueue != null) {
39105 postEventQueue.flush ();
39106 }});
39107 c$.isPostEventQueueEmpty = Clazz_defineMethod (c$, "isPostEventQueueEmpty", 
39108 function () {
39109 var appContext = jssun.awt.AppContext.getAppContext ();
39110 var postEventQueue = appContext.get ("PostEventQueue");
39111 return (postEventQueue == null || postEventQueue.noEvents ());
39112 });
39113 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39114 function (target, runnable) {
39115 jssun.awt.SunToolkit.executeOnEventHandlerThread ( new jssun.awt.PeerEvent (target, runnable, 1));
39116 }, "~O,Runnable");
39117 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39118 function (target, runnable, when) {
39119 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)));
39120 }, "~O,Runnable,~N");
39121 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39122 function (peerEvent) {
39123 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (peerEvent.getSource ()), peerEvent);
39124 }, "jssun.awt.PeerEvent");
39125 c$.invokeLaterOnAppContext = Clazz_defineMethod (c$, "invokeLaterOnAppContext", 
39126 function (appContext, dispatcher) {
39127 jssun.awt.SunToolkit.postEvent (appContext,  new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), dispatcher, 1));
39128 }, "jssun.awt.AppContext,Runnable");
39129 c$.isDispatchThreadForAppContext = Clazz_defineMethod (c$, "isDispatchThreadForAppContext", 
39130 function (target) {
39131 var appContext = jssun.awt.SunToolkit.targetToAppContext (target);
39132 var eq = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39133 var next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39134 while (next != null) {
39135 eq = next;
39136 next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39137 }
39138 return (Thread.currentThread () === jssun.awt.AWTAccessor.getEventQueueAccessor ().getDispatchThread (eq));
39139 }, "~O");
39140 Clazz_overrideMethod (c$, "getScreenSize", 
39141 function () {
39142 return  new java.awt.Dimension (this.getScreenWidth (), this.getScreenHeight ());
39143 });
39144 Clazz_overrideMethod (c$, "getFontMetrics", 
39145 function (font) {
39146 return jssun.font.FontDesignMetrics.getMetrics (font);
39147 }, "java.awt.Font");
39148 Clazz_overrideMethod (c$, "getFontList", 
39149 function () {
39150 var hardwiredFontList =  Clazz_newArray (-1, ["Dialog", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
39151 return hardwiredFontList;
39152 });
39153 Clazz_overrideMethod (c$, "createPanel", 
39154 function (target) {
39155 return this.createComponent (target);
39156 }, "java.awt.Panel");
39157 Clazz_defineMethod (c$, "disableBackgroundErase", 
39158 function (component) {
39159 this.disableBackgroundEraseImpl (component);
39160 }, "java.awt.Component");
39161 Clazz_defineMethod (c$, "disableBackgroundEraseImpl", 
39162  function (component) {
39163 jssun.awt.AWTAccessor.getComponentAccessor ().setBackgroundEraseDisabled (component, true);
39164 }, "java.awt.Component");
39165 c$.getSunAwtNoerasebackground = Clazz_defineMethod (c$, "getSunAwtNoerasebackground", 
39166 function () {
39167 return false;
39168 });
39169 c$.getSunAwtErasebackgroundonresize = Clazz_defineMethod (c$, "getSunAwtErasebackgroundonresize", 
39170 function () {
39171 return true;
39172 });
39173 Clazz_defineMethod (c$, "setOverrideRedirect", 
39174 function (target) {
39175 }, "java.awt.Window");
39176 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39177 function (tk, url) {
39178 var img = jssun.awt.SunToolkit.imgCache.get (url);
39179 if (img == null) {
39180 try {
39181 img = tk.createImage (url);
39182 jssun.awt.SunToolkit.imgCache.put (url, img);
39183 } catch (e) {
39184 if (Clazz_exceptionOf (e, Exception)) {
39185 } else {
39186 throw e;
39187 }
39188 }
39189 }return img;
39190 }, "java.awt.Toolkit,java.net.URL");
39191 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39192 function (tk, filename) {
39193 var img = jssun.awt.SunToolkit.imgCache.get (filename);
39194 if (img == null) {
39195 try {
39196 tk.createImage (filename);
39197 jssun.awt.SunToolkit.imgCache.put (filename, img);
39198 } catch (e) {
39199 if (Clazz_exceptionOf (e, Exception)) {
39200 } else {
39201 throw e;
39202 }
39203 }
39204 }return img;
39205 }, "java.awt.Toolkit,~S");
39206 Clazz_defineMethod (c$, "getImage", 
39207 function (filename) {
39208 return jssun.awt.SunToolkit.getImageFromHash (this, filename);
39209 }, "~S");
39210 Clazz_defineMethod (c$, "getImage", 
39211 function (url) {
39212 return jssun.awt.SunToolkit.getImageFromHash (this, url);
39213 }, "java.net.URL");
39214 Clazz_overrideMethod (c$, "checkImage", 
39215 function (img, w, h, o) {
39216 return 0;
39217 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39218 Clazz_overrideMethod (c$, "prepareImage", 
39219 function (img, w, h, o) {
39220 if (w == 0 || h == 0) {
39221 return true;
39222 }return true;
39223 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39224 Clazz_overrideMethod (c$, "getSystemEventQueueImpl", 
39225 function () {
39226 return jssun.awt.SunToolkit.getSystemEventQueueImplPP ();
39227 });
39228 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39229 function () {
39230 return jssun.awt.SunToolkit.getSystemEventQueueImplPP (jssun.awt.AppContext.getAppContext ());
39231 });
39232 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39233 function (appContext) {
39234 var theEventQueue = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39235 return theEventQueue;
39236 }, "jssun.awt.AppContext");
39237 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
39238 function (c) {
39239 return java.awt.Toolkit.getNativeContainer (c);
39240 }, "java.awt.Component");
39241 Clazz_defineMethod (c$, "enableInputMethodsForTextComponent", 
39242 function () {
39243 return false;
39244 });
39245 c$.getStartupLocale = Clazz_defineMethod (c$, "getStartupLocale", 
39246 function () {
39247 if (jssun.awt.SunToolkit.startupLocale == null) {
39248 {
39249 }}return jssun.awt.SunToolkit.startupLocale;
39250 });
39251 Clazz_defineMethod (c$, "getDefaultKeyboardLocale", 
39252 function () {
39253 return jssun.awt.SunToolkit.getStartupLocale ();
39254 });
39255 c$.setDataTransfererClassName = Clazz_defineMethod (c$, "setDataTransfererClassName", 
39256 function (className) {
39257 jssun.awt.SunToolkit.dataTransfererClassName = className;
39258 }, "~S");
39259 c$.getDataTransfererClassName = Clazz_defineMethod (c$, "getDataTransfererClassName", 
39260 function () {
39261 if (jssun.awt.SunToolkit.dataTransfererClassName == null) {
39262 java.awt.Toolkit.getDefaultToolkit ();
39263 }return jssun.awt.SunToolkit.dataTransfererClassName;
39264 });
39265 Clazz_overrideMethod (c$, "getWindowClosingListener", 
39266 function () {
39267 return this.windowClosingListener;
39268 });
39269 Clazz_overrideMethod (c$, "setWindowClosingListener", 
39270 function (wcl) {
39271 this.windowClosingListener = wcl;
39272 }, "jssun.awt.WindowClosingListener");
39273 Clazz_defineMethod (c$, "windowClosingNotify", 
39274 function (event) {
39275 if (this.windowClosingListener != null) {
39276 return this.windowClosingListener.windowClosingNotify (event);
39277 } else {
39278 return null;
39279 }}, "java.awt.event.WindowEvent");
39280 Clazz_defineMethod (c$, "windowClosingDelivered", 
39281 function (event) {
39282 if (this.windowClosingListener != null) {
39283 return this.windowClosingListener.windowClosingDelivered (event);
39284 } else {
39285 return null;
39286 }}, "java.awt.event.WindowEvent");
39287 c$.isModalExcluded = Clazz_defineMethod (c$, "isModalExcluded", 
39288 function (window) {
39289 return true;
39290 }, "java.awt.Window");
39291 c$.isLightweightOrUnknown = Clazz_defineMethod (c$, "isLightweightOrUnknown", 
39292 function (comp) {
39293 if (comp.isLightweight () || !(Clazz_instanceOf (java.awt.Toolkit.getDefaultToolkit (), jssun.awt.SunToolkit))) {
39294 return true;
39295 }return !(Clazz_instanceOf (comp, java.awt.Panel) || Clazz_instanceOf (comp, java.awt.Window));
39296 }, "java.awt.Component");
39297 Clazz_defineMethod (c$, "getDesktopAAHints", 
39298 function () {
39299 return null;
39300 });
39301 c$.getContainingWindow = Clazz_defineMethod (c$, "getContainingWindow", 
39302 function (comp) {
39303 while (comp != null && !(Clazz_instanceOf (comp, java.awt.Window))) {
39304 comp = comp.getParent ();
39305 }
39306 return comp;
39307 }, "java.awt.Component");
39308 Clazz_defineMethod (c$, "isNativeGTKAvailable", 
39309 function () {
39310 return false;
39311 });
39312 Clazz_defineMethod (c$, "isWindowOpacitySupported", 
39313 function () {
39314 return false;
39315 });
39316 Clazz_defineMethod (c$, "isWindowShapingSupported", 
39317 function () {
39318 return false;
39319 });
39320 Clazz_defineMethod (c$, "isWindowTranslucencySupported", 
39321 function () {
39322 return false;
39323 });
39324 Clazz_defineMethod (c$, "isTranslucencyCapable", 
39325 function (gc) {
39326 return false;
39327 }, "java.awt.GraphicsConfiguration");
39328 Clazz_defineMethod (c$, "needUpdateWindow", 
39329 function () {
39330 return false;
39331 });
39332 c$.$SunToolkit$1$ = function () {
39333 Clazz_pu$h(self.c$);
39334 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$1", null, Runnable);
39335 Clazz_overrideMethod (c$, "run", 
39336 function () {
39337 jssun.awt.AWTAccessor.getAWTEventAccessor ().setPosted (this.f$.e);
39338 (this.f$.e.getSource ()).dispatchEvent (this.f$.e);
39339 });
39340 c$ = Clazz_p0p ();
39341 };
39342 c$.$SunToolkit$2$ = function () {
39343 Clazz_pu$h(self.c$);
39344 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$2", jssun.awt.PeerEvent);
39345 Clazz_overrideMethod (c$, "getWhen", 
39346 function () {
39347 return this.f$.when;
39348 });
39349 c$ = Clazz_p0p ();
39350 };
39351 Clazz_defineStatics (c$,
39352 "GRAB_EVENT_MASK", 0x80000000,
39353 "POST_EVENT_QUEUE_KEY", "PostEventQueue");
39354 c$.appContextMap = c$.prototype.appContextMap =  new java.util.HashMap ();
39355 c$.imgCache = c$.prototype.imgCache =  new java.util.HashMap ();
39356 Clazz_defineStatics (c$,
39357 "startupLocale", null,
39358 "dataTransfererClassName", null,
39359 "DESKTOPFONTHINTS", "awt.font.desktophints");
39360 });
39361 Clazz_declarePackage ("java.awt");
39362 Clazz_declareInterface (java.awt, "Conditional");
39363 Clazz_declarePackage ("java.awt.event");
39364 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.PaintEvent", null, function () {
39365 c$ = Clazz_decorateAsClass (function () {
39366 this.updateRect = null;
39367 Clazz_instantialize (this, arguments);
39368 }, java.awt.event, "PaintEvent", java.awt.event.ComponentEvent);
39369 Clazz_makeConstructor (c$, 
39370 function (source, id, updateRect) {
39371 Clazz_superConstructor (this, java.awt.event.PaintEvent, [source, id]);
39372 this.updateRect = updateRect;
39373 }, "java.awt.Component,~N,java.awt.Rectangle");
39374 Clazz_defineMethod (c$, "getUpdateRect", 
39375 function () {
39376 return this.updateRect;
39377 });
39378 Clazz_defineMethod (c$, "setUpdateRect", 
39379 function (updateRect) {
39380 this.updateRect = updateRect;
39381 }, "java.awt.Rectangle");
39382 Clazz_overrideMethod (c$, "paramString", 
39383 function () {
39384 var typeStr;
39385 switch (this.id) {
39386 case 800:
39387 typeStr = "PAINT";
39388 break;
39389 case 801:
39390 typeStr = "UPDATE";
39391 break;
39392 default:
39393 typeStr = "unknown type";
39394 }
39395 return typeStr + ",updateRect=" + (this.updateRect != null ? this.updateRect.toString () : "null");
39396 });
39397 Clazz_defineStatics (c$,
39398 "PAINT_FIRST", 800,
39399 "PAINT_LAST", 801,
39400 "PAINT", 800,
39401 "UPDATE", 801);
39402 });
39403 Clazz_declarePackage ("java.awt");
39404 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 () {
39405 c$ = Clazz_decorateAsClass (function () {
39406 this.theQueue = null;
39407 this.eventFilters = null;
39408 this.modalFiltersCount = 0;
39409 this.filter = null;
39410 this.cond = null;
39411 this.id = 0;
39412 this.doDispatch = true;
39413 if (!Clazz_isClassDefined ("java.awt.EventDispatchThread.StopDispatchEvent")) {
39414 java.awt.EventDispatchThread.$EventDispatchThread$StopDispatchEvent$ ();
39415 }
39416 Clazz_instantialize (this, arguments);
39417 }, java.awt, "EventDispatchThread", swingjs.JSThread);
39418 Clazz_prepareFields (c$, function () {
39419 this.eventFilters =  new java.util.Vector ();
39420 });
39421 Clazz_makeConstructor (c$, 
39422 function (group, name, queue) {
39423 Clazz_superConstructor (this, java.awt.EventDispatchThread, [group, name]);
39424 this.theQueue = queue;
39425 }, "ThreadGroup,~S,java.awt.EventQueue");
39426 Clazz_defineMethod (c$, "stopDispatchingImpl", 
39427 function (wait) {
39428 var stopEvent = Clazz_innerTypeInstance (java.awt.EventDispatchThread.StopDispatchEvent, this, null);
39429 if (Thread.currentThread () !== this) {
39430 this.theQueue.postEventPrivate (stopEvent);
39431 if (wait) {
39432 try {
39433 this.join ();
39434 } catch (e) {
39435 if (Clazz_exceptionOf (e, InterruptedException)) {
39436 } else {
39437 throw e;
39438 }
39439 }
39440 }} else {
39441 stopEvent.dispatch ();
39442 }{
39443 if (this.theQueue.getDispatchThread () === this) {
39444 this.theQueue.detachDispatchThread ();
39445 }}}, "~B");
39446 Clazz_defineMethod (c$, "stopDispatching", 
39447 function () {
39448 this.stopDispatchingImpl (true);
39449 });
39450 Clazz_defineMethod (c$, "stopDispatchingLater", 
39451 function () {
39452 this.stopDispatchingImpl (false);
39453 });
39454 Clazz_overrideMethod (c$, "run", 
39455 function () {
39456 this.pumpEvents (-1, null);
39457 });
39458 Clazz_defineMethod (c$, "pumpEvents", 
39459 function (id, cond) {
39460 this.pumpEventsForHierarchy (id, cond, null);
39461 }, "~N,java.awt.Conditional");
39462 Clazz_defineMethod (c$, "pumpEventsForHierarchy", 
39463 function (id, cond, modalComponent) {
39464 this.pumpEventsForFilter (id, cond,  new java.awt.EventDispatchThread.HierarchyEventFilter (modalComponent));
39465 }, "~N,java.awt.Conditional,java.awt.Component");
39466 Clazz_defineMethod (c$, "pumpEventsForFilter", 
39467 function (id, cond, filter) {
39468 this.filter = filter;
39469 this.cond = cond;
39470 this.id = id;
39471 this.run1 (0);
39472 }, "~N,java.awt.Conditional,java.awt.EventFilter");
39473 Clazz_overrideMethod (c$, "run1", 
39474 function (mode) {
39475 try {
39476 while (true) switch (mode) {
39477 case 0:
39478 this.addEventFilter (this.filter);
39479 mode = 1;
39480 case 1:
39481 if (!this.doDispatch || this.cond != null && !this.cond.evaluate () || this.isInterrupted ()) {
39482 this.doDispatch = false;
39483 return;
39484 }var myid = this.id;
39485 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)));
39486 this.dispatchAndReturn (r, mode);
39487 if (this.isJS) return;
39488 break;
39489 case 2:
39490 this.doDispatch = false;
39491 return;
39492 }
39493
39494 } finally {
39495 if (!this.doDispatch) this.finish ();
39496 }
39497 }, "~N");
39498 Clazz_defineMethod (c$, "dispatchAndReturn", 
39499 function (r, mode) {
39500 var f = null;
39501 var me = this;
39502 {
39503 f = function() {r.run();me.run1(mode)
39504 };
39505 }swingjs.JSToolkit.setTimeout (f, 0, 0);
39506 }, "Runnable,~N");
39507 Clazz_defineMethod (c$, "finish", 
39508  function () {
39509 this.doDispatch = false;
39510 this.removeEventFilter (this.filter);
39511 {
39512 if (this.theQueue.getDispatchThread () === this) {
39513 this.theQueue.detachDispatchThread ();
39514 }if (this.theQueue.peekEvent () != null || !jssun.awt.SunToolkit.isPostEventQueueEmpty ()) {
39515 this.theQueue.initDispatchThread ();
39516 }jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this);
39517 }});
39518 Clazz_defineMethod (c$, "addEventFilter", 
39519 function (filter) {
39520 {
39521 if (!this.eventFilters.contains (filter)) {
39522 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39523 var newFilter = filter;
39524 var k = 0;
39525 for (k = 0; k < this.eventFilters.size (); k++) {
39526 var f = this.eventFilters.get (k);
39527 if (Clazz_instanceOf (f, java.awt.ModalEventFilter)) {
39528 var cf = f;
39529 if (cf.compareTo (newFilter) > 0) {
39530 break;
39531 }}}
39532 this.eventFilters.add (k, filter);
39533 this.modalFiltersCount++;
39534 } else {
39535 this.eventFilters.add (filter);
39536 }}}}, "java.awt.EventFilter");
39537 Clazz_defineMethod (c$, "removeEventFilter", 
39538 function (filter) {
39539 {
39540 if (this.eventFilters.contains (filter)) {
39541 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39542 this.modalFiltersCount--;
39543 }this.eventFilters.remove (filter);
39544 }}}, "java.awt.EventFilter");
39545 Clazz_defineMethod (c$, "pumpOneEventForFilters", 
39546 function (id) {
39547 try {
39548 var event;
39549 var eventOK;
39550 do {
39551 event = (id == -1) ? this.theQueue.getNextEvent () : this.theQueue.getNextEventForID (id);
39552 if (event == null) return (this.doDispatch = false);
39553 eventOK = true;
39554 {
39555 for (var i = this.eventFilters.size () - 1; i >= 0; i--) {
39556 var f = this.eventFilters.get (i);
39557 var accept = f.acceptEvent (event);
39558 if (accept === java.awt.EventFilter.FilterAction.REJECT) {
39559 eventOK = false;
39560 break;
39561 } else if (accept === java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY) {
39562 break;
39563 }}
39564 }if (!eventOK) {
39565 event.consume ();
39566 }} while (eventOK == false);
39567 this.theQueue.dispatchEvent (event);
39568 return this.doDispatch = true;
39569 } catch (e$$) {
39570 if (Clazz_exceptionOf (e$$, ThreadDeath)) {
39571 var death = e$$;
39572 {
39573 return this.doDispatch = false;
39574 }
39575 } else if (Clazz_exceptionOf (e$$, InterruptedException)) {
39576 var interruptedException = e$$;
39577 {
39578 return this.doDispatch = false;
39579 }
39580 } else {
39581 var e = e$$;
39582 {
39583 this.processException (e, this.modalFiltersCount > 0);
39584 }
39585 }
39586 }
39587 return this.doDispatch = true;
39588 }, "~N");
39589 Clazz_defineMethod (c$, "processException", 
39590  function (e, isModal) {
39591 if (!this.handleException (e)) {
39592 if (isModal) {
39593 System.err.println ("Exception occurred during event dispatching:");
39594 e.printStackTrace ();
39595 } else if (Clazz_instanceOf (e, RuntimeException)) {
39596 throw e;
39597 } else if (Clazz_instanceOf (e, Error)) {
39598 throw e;
39599 }}}, "Throwable,~B");
39600 Clazz_defineMethod (c$, "handleException", 
39601  function (thrown) {
39602 return false;
39603 }, "Throwable");
39604 Clazz_defineMethod (c$, "isDispatching", 
39605 function (eq) {
39606 return this.theQueue.equals (eq);
39607 }, "java.awt.EventQueue");
39608 Clazz_defineMethod (c$, "getEventQueue", 
39609 function () {
39610 return this.theQueue;
39611 });
39612 c$.$EventDispatchThread$StopDispatchEvent$ = function () {
39613 Clazz_pu$h(self.c$);
39614 c$ = Clazz_decorateAsClass (function () {
39615 Clazz_prepareCallback (this, arguments);
39616 Clazz_instantialize (this, arguments);
39617 }, java.awt.EventDispatchThread, "StopDispatchEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39618 Clazz_makeConstructor (c$, 
39619 function () {
39620 Clazz_superConstructor (this, java.awt.EventDispatchThread.StopDispatchEvent, [this.b$["java.awt.EventDispatchThread"], 0]);
39621 });
39622 Clazz_overrideMethod (c$, "dispatch", 
39623 function () {
39624 this.b$["java.awt.EventDispatchThread"].doDispatch = false;
39625 });
39626 c$ = Clazz_p0p ();
39627 };
39628 c$.$EventDispatchThread$1$ = function () {
39629 Clazz_pu$h(self.c$);
39630 c$ = Clazz_declareAnonymous (java.awt, "EventDispatchThread$1", null, Runnable);
39631 Clazz_overrideMethod (c$, "run", 
39632 function () {
39633 this.b$["java.awt.EventDispatchThread"].pumpOneEventForFilters (this.f$.myid);
39634 });
39635 c$ = Clazz_p0p ();
39636 };
39637 Clazz_pu$h(self.c$);
39638 c$ = Clazz_decorateAsClass (function () {
39639 this.modalComponent = null;
39640 Clazz_instantialize (this, arguments);
39641 }, java.awt.EventDispatchThread, "HierarchyEventFilter", null, java.awt.EventFilter);
39642 Clazz_makeConstructor (c$, 
39643 function (a) {
39644 this.modalComponent = a;
39645 }, "java.awt.Component");
39646 Clazz_overrideMethod (c$, "acceptEvent", 
39647 function (a) {
39648 if (this.modalComponent != null) {
39649 var b = a.getID ();
39650 var c = (b >= 500) && (b <= 507);
39651 var d = (b >= 1001) && (b <= 1001);
39652 var e = (b == 201);
39653 if (java.awt.Component.isInstanceOf (this.modalComponent, "javax.swing.JInternalFrame")) {
39654 return e ? java.awt.EventFilter.FilterAction.REJECT : java.awt.EventFilter.FilterAction.ACCEPT;
39655 }if (c || d || e) {
39656 var f = a.getSource ();
39657 if (Clazz_instanceOf (f, jssun.awt.ModalExclude)) {
39658 return java.awt.EventFilter.FilterAction.ACCEPT;
39659 } else if (Clazz_instanceOf (f, java.awt.Component)) {
39660 var g = f;
39661 var h = false;
39662 if (Clazz_instanceOf (this.modalComponent, java.awt.Container)) {
39663 while (g !== this.modalComponent && g != null) {
39664 if ((Clazz_instanceOf (g, java.awt.Window)) && (jssun.awt.SunToolkit.isModalExcluded (g))) {
39665 h = true;
39666 break;
39667 }g = g.getParent ();
39668 }
39669 }if (!h && (g !== this.modalComponent)) {
39670 return java.awt.EventFilter.FilterAction.REJECT;
39671 }}}}return java.awt.EventFilter.FilterAction.ACCEPT;
39672 }, "java.awt.AWTEvent");
39673 c$ = Clazz_p0p ();
39674 Clazz_defineStatics (c$,
39675 "ANY_EVENT", -1);
39676 });
39677 Clazz_declarePackage ("java.awt");
39678 Clazz_load (["java.lang.Enum"], "java.awt.EventFilter", null, function () {
39679 Clazz_declareInterface (java.awt, "EventFilter");
39680 Clazz_pu$h(self.c$);
39681 c$ = Clazz_declareType (java.awt.EventFilter, "FilterAction", Enum);
39682 Clazz_defineEnumConstant (c$, "ACCEPT", 0, []);
39683 Clazz_defineEnumConstant (c$, "REJECT", 1, []);
39684 Clazz_defineEnumConstant (c$, "ACCEPT_IMMEDIATELY", 2, []);
39685 c$ = Clazz_p0p ();
39686 });
39687 Clazz_declarePackage ("java.awt");
39688 Clazz_load (["java.awt.EventFilter"], "java.awt.ModalEventFilter", ["java.awt.Component", "$.Dialog", "$.Window", "jssun.awt.ModalExclude"], function () {
39689 c$ = Clazz_decorateAsClass (function () {
39690 this.modalDialog = null;
39691 this.disabled = false;
39692 Clazz_instantialize (this, arguments);
39693 }, java.awt, "ModalEventFilter", null, java.awt.EventFilter);
39694 Clazz_makeConstructor (c$, 
39695 function (modalDialog) {
39696 this.modalDialog = modalDialog;
39697 this.disabled = false;
39698 }, "java.awt.Dialog");
39699 Clazz_defineMethod (c$, "getModalDialog", 
39700 function () {
39701 return this.modalDialog;
39702 });
39703 Clazz_overrideMethod (c$, "acceptEvent", 
39704 function (event) {
39705 if (this.disabled || !this.modalDialog.isVisible ()) {
39706 return java.awt.EventFilter.FilterAction.ACCEPT;
39707 }var eventID = event.getID ();
39708 if ((eventID >= 500 && eventID <= 507) || (eventID >= 1001 && eventID <= 1001) || eventID == 201) {
39709 var o = event.getSource ();
39710 if (Clazz_instanceOf (o, jssun.awt.ModalExclude)) {
39711 } else if (Clazz_instanceOf (o, java.awt.Component)) {
39712 var c = o;
39713 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
39714 c = c.getParent_NoClientCode ();
39715 }
39716 if (c != null) {
39717 return this.acceptWindow (c);
39718 }}}return java.awt.EventFilter.FilterAction.ACCEPT;
39719 }, "java.awt.AWTEvent");
39720 Clazz_defineMethod (c$, "disable", 
39721 function () {
39722 this.disabled = true;
39723 });
39724 Clazz_defineMethod (c$, "compareTo", 
39725 function (another) {
39726 var anotherDialog = another.getModalDialog ();
39727 var c = this.modalDialog;
39728 while (c != null) {
39729 if (c === anotherDialog) {
39730 return 1;
39731 }c = c.getParent_NoClientCode ();
39732 }
39733 c = anotherDialog;
39734 while (c != null) {
39735 if (c === this.modalDialog) {
39736 return -1;
39737 }c = c.getParent_NoClientCode ();
39738 }
39739 var blocker = this.modalDialog.getModalBlocker ();
39740 while (blocker != null) {
39741 if (blocker === anotherDialog) {
39742 return -1;
39743 }blocker = blocker.getModalBlocker ();
39744 }
39745 blocker = anotherDialog.getModalBlocker ();
39746 while (blocker != null) {
39747 if (blocker === this.modalDialog) {
39748 return 1;
39749 }blocker = blocker.getModalBlocker ();
39750 }
39751 return this.modalDialog.getModalityType ().compareTo (anotherDialog.getModalityType ());
39752 }, "java.awt.ModalEventFilter");
39753 c$.createFilterForDialog = Clazz_defineMethod (c$, "createFilterForDialog", 
39754 function (modalDialog) {
39755 switch (modalDialog.getModalityType ()) {
39756 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
39757 return  new java.awt.ModalEventFilter.DocumentModalEventFilter (modalDialog);
39758 case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
39759 return  new java.awt.ModalEventFilter.ApplicationModalEventFilter (modalDialog);
39760 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
39761 return  new java.awt.ModalEventFilter.ToolkitModalEventFilter (modalDialog);
39762 }
39763 return null;
39764 }, "java.awt.Dialog");
39765 Clazz_pu$h(self.c$);
39766 c$ = Clazz_decorateAsClass (function () {
39767 this.appContext = null;
39768 Clazz_instantialize (this, arguments);
39769 }, java.awt.ModalEventFilter, "ToolkitModalEventFilter", java.awt.ModalEventFilter);
39770 Clazz_makeConstructor (c$, 
39771 function (a) {
39772 Clazz_superConstructor (this, java.awt.ModalEventFilter.ToolkitModalEventFilter, [a]);
39773 this.appContext = a.appContext;
39774 }, "java.awt.Dialog");
39775 Clazz_overrideMethod (c$, "acceptWindow", 
39776 function (a) {
39777 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE)) {
39778 return java.awt.EventFilter.FilterAction.ACCEPT;
39779 }if (a.appContext !== this.appContext) {
39780 return java.awt.EventFilter.FilterAction.REJECT;
39781 }while (a != null) {
39782 if (a === this.modalDialog) {
39783 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39784 }a = a.getOwner ();
39785 }
39786 return java.awt.EventFilter.FilterAction.REJECT;
39787 }, "java.awt.Window");
39788 c$ = Clazz_p0p ();
39789 Clazz_pu$h(self.c$);
39790 c$ = Clazz_decorateAsClass (function () {
39791 this.appContext = null;
39792 Clazz_instantialize (this, arguments);
39793 }, java.awt.ModalEventFilter, "ApplicationModalEventFilter", java.awt.ModalEventFilter);
39794 Clazz_makeConstructor (c$, 
39795 function (a) {
39796 Clazz_superConstructor (this, java.awt.ModalEventFilter.ApplicationModalEventFilter, [a]);
39797 this.appContext = a.appContext;
39798 }, "java.awt.Dialog");
39799 Clazz_overrideMethod (c$, "acceptWindow", 
39800 function (a) {
39801 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39802 return java.awt.EventFilter.FilterAction.ACCEPT;
39803 }if (a.appContext === this.appContext) {
39804 while (a != null) {
39805 if (a === this.modalDialog) {
39806 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39807 }a = a.getOwner ();
39808 }
39809 return java.awt.EventFilter.FilterAction.REJECT;
39810 }return java.awt.EventFilter.FilterAction.ACCEPT;
39811 }, "java.awt.Window");
39812 c$ = Clazz_p0p ();
39813 Clazz_pu$h(self.c$);
39814 c$ = Clazz_decorateAsClass (function () {
39815 this.documentRoot = null;
39816 Clazz_instantialize (this, arguments);
39817 }, java.awt.ModalEventFilter, "DocumentModalEventFilter", java.awt.ModalEventFilter);
39818 Clazz_makeConstructor (c$, 
39819 function (a) {
39820 Clazz_superConstructor (this, java.awt.ModalEventFilter.DocumentModalEventFilter, [a]);
39821 this.documentRoot = a.getDocumentRoot ();
39822 }, "java.awt.Dialog");
39823 Clazz_overrideMethod (c$, "acceptWindow", 
39824 function (a) {
39825 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39826 var b = this.modalDialog.getOwner ();
39827 while (b != null) {
39828 if (b === a) {
39829 return java.awt.EventFilter.FilterAction.REJECT;
39830 }b = b.getOwner ();
39831 }
39832 return java.awt.EventFilter.FilterAction.ACCEPT;
39833 }while (a != null) {
39834 if (a === this.modalDialog) {
39835 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39836 }if (a === this.documentRoot) {
39837 return java.awt.EventFilter.FilterAction.REJECT;
39838 }a = a.getOwner ();
39839 }
39840 return java.awt.EventFilter.FilterAction.ACCEPT;
39841 }, "java.awt.Window");
39842 c$ = Clazz_p0p ();
39843 });
39844 Clazz_declarePackage ("java.awt.peer");
39845 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.CanvasPeer", null, function () {
39846 Clazz_declareInterface (java.awt.peer, "CanvasPeer", java.awt.peer.ComponentPeer);
39847 });
39848 Clazz_declarePackage ("java.awt.peer");
39849 c$ = Clazz_declareInterface (java.awt.peer, "ComponentPeer");
39850 Clazz_defineStatics (c$,
39851 "SET_LOCATION", 1,
39852 "SET_SIZE", 2,
39853 "SET_BOUNDS", 3,
39854 "SET_CLIENT_SIZE", 4,
39855 "RESET_OPERATION", 5,
39856 "NO_EMBEDDED_CHECK", (16384),
39857 "DEFAULT_OPERATION", 3);
39858 Clazz_declarePackage ("java.awt.peer");
39859 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.ContainerPeer", null, function () {
39860 Clazz_declareInterface (java.awt.peer, "ContainerPeer", java.awt.peer.ComponentPeer);
39861 });
39862 Clazz_declarePackage ("java.awt.peer");
39863 Clazz_load (["java.awt.peer.WindowPeer"], "java.awt.peer.FramePeer", null, function () {
39864 Clazz_declareInterface (java.awt.peer, "FramePeer", java.awt.peer.WindowPeer);
39865 });
39866 Clazz_declarePackage ("java.awt.peer");
39867 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.LightweightPeer", null, function () {
39868 Clazz_declareInterface (java.awt.peer, "LightweightPeer", java.awt.peer.ComponentPeer);
39869 });
39870 Clazz_declarePackage ("java.awt.peer");
39871 Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.PanelPeer", null, function () {
39872 Clazz_declareInterface (java.awt.peer, "PanelPeer", java.awt.peer.ContainerPeer);
39873 });
39874 Clazz_declarePackage ("java.awt.peer");
39875 Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.WindowPeer", null, function () {
39876 Clazz_declareInterface (java.awt.peer, "WindowPeer", java.awt.peer.ContainerPeer);
39877 });
39878 Clazz_declarePackage ("java.awt");
39879 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.SentEvent", ["java.awt.Toolkit", "jssun.awt.SunToolkit"], function () {
39880 c$ = Clazz_decorateAsClass (function () {
39881 this.$dispatched = false;
39882 this.nested = null;
39883 this.toNotify = null;
39884 Clazz_instantialize (this, arguments);
39885 }, java.awt, "SentEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39886 Clazz_makeConstructor (c$, 
39887 function () {
39888 this.construct (null);
39889 });
39890 Clazz_makeConstructor (c$, 
39891 function (nested) {
39892 this.construct (nested, null);
39893 }, "java.awt.AWTEvent");
39894 Clazz_makeConstructor (c$, 
39895 function (nested, toNotify) {
39896 Clazz_superConstructor (this, java.awt.SentEvent, [(nested != null) ? nested.getSource () : java.awt.Toolkit.getDefaultToolkit (), 1007]);
39897 this.nested = nested;
39898 this.toNotify = toNotify;
39899 }, "java.awt.AWTEvent,jssun.awt.AppContext");
39900 Clazz_overrideMethod (c$, "dispatch", 
39901 function () {
39902 try {
39903 if (this.nested != null) {
39904 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39905 }} finally {
39906 this.$dispatched = true;
39907 if (this.toNotify != null) {
39908 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39909 }{
39910 this.notifyAll ();
39911 }}
39912 });
39913 Clazz_defineMethod (c$, "dispose", 
39914 function () {
39915 this.$dispatched = true;
39916 if (this.toNotify != null) {
39917 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39918 }{
39919 this.notifyAll ();
39920 }});
39921 Clazz_defineStatics (c$,
39922 "ID", 1007);
39923 });
39924 Clazz_declarePackage ("java.awt");
39925 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 () {
39926 c$ = Clazz_decorateAsClass (function () {
39927 this.nested = null;
39928 this.appContext = null;
39929 this.disposed = false;
39930 Clazz_instantialize (this, arguments);
39931 }, java.awt, "SequencedEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39932 Clazz_makeConstructor (c$, 
39933 function (nested) {
39934 Clazz_superConstructor (this, java.awt.SequencedEvent, [nested.getSource (), 1006]);
39935 this.nested = nested;
39936 {
39937 java.awt.SequencedEvent.list.add (this);
39938 }}, "java.awt.AWTEvent");
39939 Clazz_overrideMethod (c$, "dispatch", 
39940 function () {
39941 try {
39942 this.appContext = jssun.awt.AppContext.getAppContext ();
39943 if (java.awt.SequencedEvent.getFirst () !== this) {
39944 if (java.awt.EventQueue.isDispatchThread ()) {
39945 var edt = Thread.currentThread ();
39946 edt.pumpEvents (1007, ((Clazz_isClassDefined ("java.awt.SequencedEvent$1") ? 0 : java.awt.SequencedEvent.$SequencedEvent$1$ ()), Clazz_innerTypeInstance (java.awt.SequencedEvent$1, this, null)));
39947 } else {
39948 while (!this.isFirstOrDisposed ()) {
39949 {
39950 try {
39951 swingjs.JSToolkit.warn ("Cannot wait in SequenceEvent");
39952 java.awt.SequencedEvent.wait (1000);
39953 } catch (e) {
39954 if (Clazz_exceptionOf (e, InterruptedException)) {
39955 break;
39956 } else {
39957 throw e;
39958 }
39959 }
39960 }}
39961 }}if (!this.disposed) {
39962 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39963 }} finally {
39964 this.dispose ();
39965 }
39966 });
39967 c$.isOwnerAppContextDisposed = Clazz_defineMethod (c$, "isOwnerAppContextDisposed", 
39968  function (se) {
39969 if (se != null) {
39970 var target = se.nested.getSource ();
39971 if (Clazz_instanceOf (target, java.awt.Component)) {
39972 return (target).appContext.isDisposed ();
39973 }}return false;
39974 }, "java.awt.SequencedEvent");
39975 Clazz_defineMethod (c$, "isFirstOrDisposed", 
39976 function () {
39977 if (this.disposed) {
39978 return true;
39979 }return this === java.awt.SequencedEvent.getFirstWithContext () || this.disposed;
39980 });
39981 c$.getFirst = Clazz_defineMethod (c$, "getFirst", 
39982  function () {
39983 return java.awt.SequencedEvent.list.getFirst ();
39984 });
39985 c$.getFirstWithContext = Clazz_defineMethod (c$, "getFirstWithContext", 
39986  function () {
39987 var first = java.awt.SequencedEvent.getFirst ();
39988 while (java.awt.SequencedEvent.isOwnerAppContextDisposed (first)) {
39989 first.dispose ();
39990 first = java.awt.SequencedEvent.getFirst ();
39991 }
39992 return first;
39993 });
39994 Clazz_defineMethod (c$, "dispose", 
39995 function () {
39996 {
39997 if (this.disposed) {
39998 return;
39999 }this.disposed = true;
40000 }if (this.appContext != null) {
40001 jssun.awt.SunToolkit.postEvent (this.appContext,  new java.awt.SentEvent ());
40002 }var next = null;
40003 {
40004 java.awt.SequencedEvent.notifyAll ();
40005 if (java.awt.SequencedEvent.list.getFirst () === this) {
40006 java.awt.SequencedEvent.list.removeFirst ();
40007 if (!java.awt.SequencedEvent.list.isEmpty ()) {
40008 next = java.awt.SequencedEvent.list.getFirst ();
40009 }} else {
40010 java.awt.SequencedEvent.list.remove (this);
40011 }}if (next != null && next.appContext != null) {
40012 jssun.awt.SunToolkit.postEvent (next.appContext,  new java.awt.SentEvent ());
40013 }});
40014 c$.$SequencedEvent$1$ = function () {
40015 Clazz_pu$h(self.c$);
40016 c$ = Clazz_declareAnonymous (java.awt, "SequencedEvent$1", null, java.awt.Conditional);
40017 Clazz_overrideMethod (c$, "evaluate", 
40018 function () {
40019 return !this.b$["java.awt.SequencedEvent"].isFirstOrDisposed ();
40020 });
40021 c$ = Clazz_p0p ();
40022 };
40023 Clazz_defineStatics (c$,
40024 "ID", 1006);
40025 c$.list = c$.prototype.list =  new java.util.LinkedList ();
40026 });
40027 Clazz_load(["java.util.AbstractList"],"java.util.AbstractSequentialList",["java.lang.IndexOutOfBoundsException"],function(){
40028 c$=Clazz_declareType(java.util,"AbstractSequentialList",java.util.AbstractList);
40029 Clazz_defineMethod(c$,"add",
40030 function(location,object){
40031 this.listIterator(location).add(object);
40032 },"~N,~O");
40033 Clazz_defineMethod(c$,"addAll",
40034 function(location,collection){
40035 var it=this.listIterator(location);
40036 var colIt=collection.iterator();
40037 var next=it.nextIndex();
40038 while(colIt.hasNext()){
40039 it.add(colIt.next());
40040 it.previous();
40041 }
40042 return next!=it.nextIndex();
40043 },"~N,java.util.Collection");
40044 Clazz_overrideMethod(c$,"get",
40045 function(location){
40046 try{
40047 return this.listIterator(location).next();
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$,"iterator",
40057 function(){
40058 return this.listIterator(0);
40059 });
40060 Clazz_defineMethod(c$,"remove",
40061 function(location){
40062 try{
40063 var it=this.listIterator(location);
40064 var result=it.next();
40065 it.remove();
40066 return result;
40067 }catch(e){
40068 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
40069 throw new IndexOutOfBoundsException();
40070 }else{
40071 throw e;
40072 }
40073 }
40074 },"~N");
40075 Clazz_overrideMethod(c$,"set",
40076 function(location,object){
40077 var it=this.listIterator(location);
40078 var result=it.next();
40079 it.set(object);
40080 return result;
40081 },"~N,~O");
40082 });
40083 Clazz_load(["java.util.AbstractSequentialList","$.List","$.ListIterator","$.Queue"],"java.util.LinkedList",["java.lang.IllegalStateException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.ConcurrentModificationException","$.NoSuchElementException"],function(){
40084 c$=Clazz_decorateAsClass(function(){
40085 this.$size=0;
40086 this.voidLink=null;
40087 Clazz_instantialize(this,arguments);
40088 },java.util,"LinkedList",java.util.AbstractSequentialList,[java.util.List,java.util.Queue,Cloneable,java.io.Serializable]);
40089 Clazz_makeConstructor(c$,
40090 function(){
40091 Clazz_superConstructor(this,java.util.LinkedList,[]);
40092 this.voidLink=new java.util.LinkedList.Link(null,null,null);
40093 this.voidLink.previous=this.voidLink;
40094 this.voidLink.next=this.voidLink;
40095 });
40096 Clazz_makeConstructor(c$,
40097 function(collection){
40098 this.construct();
40099 this.addAll(collection);
40100 },"java.util.Collection");
40101 Clazz_defineMethod(c$,"add",
40102 function(location,object){
40103 if(0<=location&&location<=this.$size){
40104 var link=this.voidLink;
40105 if(location<(Math.floor(this.$size/2))){
40106 for(var i=0;i<=location;i++){
40107 link=link.next;
40108 }
40109 }else{
40110 for(var i=this.$size;i>location;i--){
40111 link=link.previous;
40112 }
40113 }var previous=link.previous;
40114 var newLink=new java.util.LinkedList.Link(object,previous,link);
40115 previous.next=newLink;
40116 link.previous=newLink;
40117 this.$size++;
40118 this.modCount++;
40119 }else{
40120 throw new IndexOutOfBoundsException();
40121 }},"~N,~O");
40122 Clazz_defineMethod(c$,"add",
40123 function(object){
40124 var oldLast=this.voidLink.previous;
40125 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
40126 this.voidLink.previous=newLink;
40127 oldLast.next=newLink;
40128 this.$size++;
40129 this.modCount++;
40130 return true;
40131 },"~O");
40132 Clazz_defineMethod(c$,"addAll",
40133 function(location,collection){
40134 if(location<0||location>this.$size){
40135 throw new IndexOutOfBoundsException();
40136 }var adding=collection.size();
40137 if(adding==0){
40138 return false;
40139 }var previous=this.voidLink;
40140 if(location<(Math.floor(this.$size/2))){
40141 for(var i=0;i<location;i++){
40142 previous=previous.next;
40143 }
40144 }else{
40145 for(var i=this.$size;i>=location;i--){
40146 previous=previous.previous;
40147 }
40148 }var next=previous.next;
40149 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40150 var newLink=new java.util.LinkedList.Link(e,previous,null);
40151 previous.next=newLink;
40152 previous=newLink;
40153 }
40154 previous.next=next;
40155 next.previous=previous;
40156 this.$size+=adding;
40157 this.modCount++;
40158 return true;
40159 },"~N,java.util.Collection");
40160 Clazz_defineMethod(c$,"addAll",
40161 function(collection){
40162 var adding=collection.size();
40163 if(adding==0){
40164 return false;
40165 }var previous=this.voidLink.previous;
40166 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40167 var newLink=new java.util.LinkedList.Link(e,previous,null);
40168 previous.next=newLink;
40169 previous=newLink;
40170 }
40171 previous.next=this.voidLink;
40172 this.voidLink.previous=previous;
40173 this.$size+=adding;
40174 this.modCount++;
40175 return true;
40176 },"java.util.Collection");
40177 Clazz_defineMethod(c$,"addFirst",
40178 function(object){
40179 var oldFirst=this.voidLink.next;
40180 var newLink=new java.util.LinkedList.Link(object,this.voidLink,oldFirst);
40181 this.voidLink.next=newLink;
40182 oldFirst.previous=newLink;
40183 this.$size++;
40184 this.modCount++;
40185 },"~O");
40186 Clazz_defineMethod(c$,"addLast",
40187 function(object){
40188 var oldLast=this.voidLink.previous;
40189 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
40190 this.voidLink.previous=newLink;
40191 oldLast.next=newLink;
40192 this.$size++;
40193 this.modCount++;
40194 },"~O");
40195 Clazz_overrideMethod(c$,"clear",
40196 function(){
40197 if(this.$size>0){
40198 this.$size=0;
40199 this.voidLink.next=this.voidLink;
40200 this.voidLink.previous=this.voidLink;
40201 this.modCount++;
40202 }});
40203 Clazz_overrideMethod(c$,"clone",
40204 function(){
40205 return new java.util.LinkedList(this);
40206 });
40207 Clazz_overrideMethod(c$,"contains",
40208 function(object){
40209 var link=this.voidLink.next;
40210 if(object!=null){
40211 while(link!==this.voidLink){
40212 if(object.equals(link.data)){
40213 return true;
40214 }link=link.next;
40215 }
40216 }else{
40217 while(link!==this.voidLink){
40218 if(link.data==null){
40219 return true;
40220 }link=link.next;
40221 }
40222 }return false;
40223 },"~O");
40224 Clazz_overrideMethod(c$,"get",
40225 function(location){
40226 if(0<=location&&location<this.$size){
40227 var link=this.voidLink;
40228 if(location<(Math.floor(this.$size/2))){
40229 for(var i=0;i<=location;i++){
40230 link=link.next;
40231 }
40232 }else{
40233 for(var i=this.$size;i>location;i--){
40234 link=link.previous;
40235 }
40236 }return link.data;
40237 }throw new IndexOutOfBoundsException();
40238 },"~N");
40239 Clazz_defineMethod(c$,"getFirst",
40240 function(){
40241 var first=this.voidLink.next;
40242 if(first!==this.voidLink){
40243 return first.data;
40244 }throw new java.util.NoSuchElementException();
40245 });
40246 Clazz_defineMethod(c$,"getLast",
40247 function(){
40248 var last=this.voidLink.previous;
40249 if(last!==this.voidLink){
40250 return last.data;
40251 }throw new java.util.NoSuchElementException();
40252 });
40253 Clazz_overrideMethod(c$,"indexOf",
40254 function(object){
40255 var pos=0;
40256 var link=this.voidLink.next;
40257 if(object!=null){
40258 while(link!==this.voidLink){
40259 if(object.equals(link.data)){
40260 return pos;
40261 }link=link.next;
40262 pos++;
40263 }
40264 }else{
40265 while(link!==this.voidLink){
40266 if(link.data==null){
40267 return pos;
40268 }link=link.next;
40269 pos++;
40270 }
40271 }return-1;
40272 },"~O");
40273 Clazz_overrideMethod(c$,"lastIndexOf",
40274 function(object){
40275 var pos=this.$size;
40276 var link=this.voidLink.previous;
40277 if(object!=null){
40278 while(link!==this.voidLink){
40279 pos--;
40280 if(object.equals(link.data)){
40281 return pos;
40282 }link=link.previous;
40283 }
40284 }else{
40285 while(link!==this.voidLink){
40286 pos--;
40287 if(link.data==null){
40288 return pos;
40289 }link=link.previous;
40290 }
40291 }return-1;
40292 },"~O");
40293 Clazz_defineMethod(c$,"listIterator",
40294 function(location){
40295 return new java.util.LinkedList.LinkIterator(this,location);
40296 },"~N");
40297 Clazz_defineMethod(c$,"remove",
40298 function(location){
40299 if(0<=location&&location<this.$size){
40300 var link=this.voidLink;
40301 if(location<(Math.floor(this.$size/2))){
40302 for(var i=0;i<=location;i++){
40303 link=link.next;
40304 }
40305 }else{
40306 for(var i=this.$size;i>location;i--){
40307 link=link.previous;
40308 }
40309 }var previous=link.previous;
40310 var next=link.next;
40311 previous.next=next;
40312 next.previous=previous;
40313 this.$size--;
40314 this.modCount++;
40315 return link.data;
40316 }throw new IndexOutOfBoundsException();
40317 },"~N");
40318 Clazz_defineMethod(c$,"remove",
40319 function(object){
40320 var link=this.voidLink.next;
40321 if(object!=null){
40322 while(link!==this.voidLink&&!object.equals(link.data)){
40323 link=link.next;
40324 }
40325 }else{
40326 while(link!==this.voidLink&&link.data!=null){
40327 link=link.next;
40328 }
40329 }if(link===this.voidLink){
40330 return false;
40331 }var next=link.next;
40332 var previous=link.previous;
40333 previous.next=next;
40334 next.previous=previous;
40335 this.$size--;
40336 this.modCount++;
40337 return true;
40338 },"~O");
40339 Clazz_defineMethod(c$,"removeFirst",
40340 function(){
40341 var first=this.voidLink.next;
40342 if(first!==this.voidLink){
40343 var next=first.next;
40344 this.voidLink.next=next;
40345 next.previous=this.voidLink;
40346 this.$size--;
40347 this.modCount++;
40348 return first.data;
40349 }throw new java.util.NoSuchElementException();
40350 });
40351 Clazz_defineMethod(c$,"removeLast",
40352 function(){
40353 var last=this.voidLink.previous;
40354 if(last!==this.voidLink){
40355 var previous=last.previous;
40356 this.voidLink.previous=previous;
40357 previous.next=this.voidLink;
40358 this.$size--;
40359 this.modCount++;
40360 return last.data;
40361 }throw new java.util.NoSuchElementException();
40362 });
40363 Clazz_overrideMethod(c$,"set",
40364 function(location,object){
40365 if(0<=location&&location<this.$size){
40366 var link=this.voidLink;
40367 if(location<(Math.floor(this.$size/2))){
40368 for(var i=0;i<=location;i++){
40369 link=link.next;
40370 }
40371 }else{
40372 for(var i=this.$size;i>location;i--){
40373 link=link.previous;
40374 }
40375 }var result=link.data;
40376 link.data=object;
40377 return result;
40378 }throw new IndexOutOfBoundsException();
40379 },"~N,~O");
40380 Clazz_overrideMethod(c$,"size",
40381 function(){
40382 return this.$size;
40383 });
40384 Clazz_overrideMethod(c$,"offer",
40385 function(o){
40386 this.add(o);
40387 return true;
40388 },"~O");
40389 Clazz_overrideMethod(c$,"poll",
40390 function(){
40391 return this.$size==0?null:this.removeFirst();
40392 });
40393 Clazz_defineMethod(c$,"remove",
40394 function(){
40395 return this.removeFirst();
40396 });
40397 Clazz_overrideMethod(c$,"peek",
40398 function(){
40399 var first=this.voidLink.next;
40400 return first===this.voidLink?null:first.data;
40401 });
40402 Clazz_overrideMethod(c$,"element",
40403 function(){
40404 return this.getFirst();
40405 });
40406 Clazz_defineMethod(c$,"toArray",
40407 function(){
40408 var index=0;
40409 var contents=new Array(this.$size);
40410 var link=this.voidLink.next;
40411 while(link!==this.voidLink){
40412 contents[index++]=link.data;
40413 link=link.next;
40414 }
40415 return contents;
40416 });
40417 Clazz_defineMethod(c$,"toArray",
40418 function(contents){
40419 var index=0;
40420 if(this.$size>contents.length){
40421 var ct=contents.getClass().getComponentType();
40422 contents=java.lang.reflect.Array.newInstance(ct,this.$size);
40423 }var link=this.voidLink.next;
40424 while(link!==this.voidLink){
40425 contents[index++]=link.data;
40426 link=link.next;
40427 }
40428 if(index<contents.length){
40429 contents[index]=null;
40430 }return contents;
40431 },"~A");
40432 Clazz_pu$h(self.c$);
40433 c$=Clazz_decorateAsClass(function(){
40434 this.data=null;
40435 this.previous=null;
40436 this.next=null;
40437 Clazz_instantialize(this,arguments);
40438 },java.util.LinkedList,"Link");
40439 Clazz_makeConstructor(c$,
40440 function(a,b,c){
40441 this.data=a;
40442 this.previous=b;
40443 this.next=c;
40444 },"~O,java.util.LinkedList.Link,java.util.LinkedList.Link");
40445 c$=Clazz_p0p();
40446 Clazz_pu$h(self.c$);
40447 c$=Clazz_decorateAsClass(function(){
40448 this.pos=0;
40449 this.expectedModCount=0;
40450 this.list=null;
40451 this.link=null;
40452 this.lastLink=null;
40453 Clazz_instantialize(this,arguments);
40454 },java.util.LinkedList,"LinkIterator",null,java.util.ListIterator);
40455 Clazz_makeConstructor(c$,
40456 function(a,b){
40457 this.list=a;
40458 this.expectedModCount=this.list.modCount;
40459 if(0<=b&&b<=this.list.$size){
40460 this.link=this.list.voidLink;
40461 if(b<Math.floor(this.list.$size/2)){
40462 for(this.pos=-1;this.pos+1<b;this.pos++){
40463 this.link=this.link.next;
40464 }
40465 }else{
40466 for(this.pos=this.list.$size;this.pos>=b;this.pos--){
40467 this.link=this.link.previous;
40468 }
40469 }}else{
40470 throw new IndexOutOfBoundsException();
40471 }},"java.util.LinkedList,~N");
40472 Clazz_overrideMethod(c$,"add",
40473 function(a){
40474 if(this.expectedModCount==this.list.modCount){
40475 var b=this.link.next;
40476 var c=new java.util.LinkedList.Link(a,this.link,b);
40477 this.link.next=c;
40478 b.previous=c;
40479 this.link=c;
40480 this.lastLink=null;
40481 this.pos++;
40482 this.expectedModCount++;
40483 this.list.$size++;
40484 this.list.modCount++;
40485 }else{
40486 throw new java.util.ConcurrentModificationException();
40487 }},"~O");
40488 Clazz_overrideMethod(c$,"hasNext",
40489 function(){
40490 return this.link.next!==this.list.voidLink;
40491 });
40492 Clazz_overrideMethod(c$,"hasPrevious",
40493 function(){
40494 return this.link!==this.list.voidLink;
40495 });
40496 Clazz_overrideMethod(c$,"next",
40497 function(){
40498 if(this.expectedModCount==this.list.modCount){
40499 var a=this.link.next;
40500 if(a!==this.list.voidLink){
40501 this.lastLink=this.link=a;
40502 this.pos++;
40503 return this.link.data;
40504 }throw new java.util.NoSuchElementException();
40505 }throw new java.util.ConcurrentModificationException();
40506 });
40507 Clazz_overrideMethod(c$,"nextIndex",
40508 function(){
40509 return this.pos+1;
40510 });
40511 Clazz_overrideMethod(c$,"previous",
40512 function(){
40513 if(this.expectedModCount==this.list.modCount){
40514 if(this.link!==this.list.voidLink){
40515 this.lastLink=this.link;
40516 this.link=this.link.previous;
40517 this.pos--;
40518 return this.lastLink.data;
40519 }throw new java.util.NoSuchElementException();
40520 }throw new java.util.ConcurrentModificationException();
40521 });
40522 Clazz_overrideMethod(c$,"previousIndex",
40523 function(){
40524 return this.pos;
40525 });
40526 Clazz_overrideMethod(c$,"remove",
40527 function(){
40528 if(this.expectedModCount==this.list.modCount){
40529 if(this.lastLink!=null){
40530 var a=this.lastLink.next;
40531 var b=this.lastLink.previous;
40532 a.previous=b;
40533 b.next=a;
40534 if(this.lastLink===this.link){
40535 this.pos--;
40536 }this.link=b;
40537 this.lastLink=null;
40538 this.expectedModCount++;
40539 this.list.$size--;
40540 this.list.modCount++;
40541 }else{
40542 throw new IllegalStateException();
40543 }}else{
40544 throw new java.util.ConcurrentModificationException();
40545 }});
40546 Clazz_overrideMethod(c$,"set",
40547 function(a){
40548 if(this.expectedModCount==this.list.modCount){
40549 if(this.lastLink!=null){
40550 this.lastLink.data=a;
40551 }else{
40552 throw new IllegalStateException();
40553 }}else{
40554 throw new java.util.ConcurrentModificationException();
40555 }},"~O");
40556 c$=Clazz_p0p();
40557 });
40558 Clazz_declarePackage ("JU");
40559 Clazz_load (["JU.T3"], "JU.V3", null, function () {
40560 c$ = Clazz_declareType (JU, "V3", JU.T3);
40561 Clazz_makeConstructor (c$, 
40562 function () {
40563 });
40564 c$.newV = Clazz_defineMethod (c$, "newV", 
40565 function (t) {
40566 return JU.V3.new3 (t.x, t.y, t.z);
40567 }, "JU.T3");
40568 c$.newVsub = Clazz_defineMethod (c$, "newVsub", 
40569 function (t1, t2) {
40570 return JU.V3.new3 (t1.x - t2.x, t1.y - t2.y, t1.z - t2.z);
40571 }, "JU.T3,JU.T3");
40572 c$.new3 = Clazz_defineMethod (c$, "new3", 
40573 function (x, y, z) {
40574 var v =  new JU.V3 ();
40575 v.x = x;
40576 v.y = y;
40577 v.z = z;
40578 return v;
40579 }, "~N,~N,~N");
40580 Clazz_defineMethod (c$, "angle", 
40581 function (v1) {
40582 var xx = this.y * v1.z - this.z * v1.y;
40583 var yy = this.z * v1.x - this.x * v1.z;
40584 var zz = this.x * v1.y - this.y * v1.x;
40585 var cross = Math.sqrt (xx * xx + yy * yy + zz * zz);
40586 return Math.abs (Math.atan2 (cross, this.dot (v1)));
40587 }, "JU.V3");
40588 });
40589 Clazz_declarePackage ("javax.swing");
40590 Clazz_load (["java.util.Vector"], "javax.swing.ButtonGroup", null, function () {
40591 c$ = Clazz_decorateAsClass (function () {
40592 this.buttons = null;
40593 this.selection = null;
40594 Clazz_instantialize (this, arguments);
40595 }, javax.swing, "ButtonGroup");
40596 Clazz_prepareFields (c$, function () {
40597 this.buttons =  new java.util.Vector ();
40598 });
40599 Clazz_makeConstructor (c$, 
40600 function () {
40601 });
40602 Clazz_defineMethod (c$, "add", 
40603 function (b) {
40604 if (b == null) {
40605 return;
40606 }this.buttons.addElement (b);
40607 if (b.isSelected ()) {
40608 if (this.selection == null) {
40609 this.selection = b.getModel ();
40610 } else {
40611 b.setSelected (false);
40612 }}b.getModel ().setGroup (this);
40613 }, "javax.swing.AbstractButton");
40614 Clazz_defineMethod (c$, "remove", 
40615 function (b) {
40616 if (b == null) {
40617 return;
40618 }this.buttons.removeElement (b);
40619 if (b.getModel () === this.selection) {
40620 this.selection = null;
40621 }b.getModel ().setGroup (null);
40622 }, "javax.swing.AbstractButton");
40623 Clazz_defineMethod (c$, "clearSelection", 
40624 function () {
40625 if (this.selection != null) {
40626 var oldSelection = this.selection;
40627 this.selection = null;
40628 oldSelection.setSelected (false);
40629 }});
40630 Clazz_defineMethod (c$, "getElements", 
40631 function () {
40632 return this.buttons.elements ();
40633 });
40634 Clazz_defineMethod (c$, "getSelection", 
40635 function () {
40636 return this.selection;
40637 });
40638 Clazz_defineMethod (c$, "setSelected", 
40639 function (m, b) {
40640 if (b && m != null && m !== this.selection) {
40641 var oldSelection = this.selection;
40642 this.selection = m;
40643 if (oldSelection != null) {
40644 oldSelection.setSelected (false);
40645 }m.setSelected (true);
40646 }}, "javax.swing.ButtonModel,~B");
40647 Clazz_defineMethod (c$, "isSelected", 
40648 function (m) {
40649 return (m === this.selection);
40650 }, "javax.swing.ButtonModel");
40651 Clazz_defineMethod (c$, "getButtonCount", 
40652 function () {
40653 if (this.buttons == null) {
40654 return 0;
40655 } else {
40656 return this.buttons.size ();
40657 }});
40658 });
40659 Clazz_declarePackage ("javax.swing");
40660 Clazz_load (["jssun.awt.PaintEventDispatcher"], "javax.swing.SwingPaintEventDispatcher", ["javax.swing.RootPaneContainer", "jssun.awt.SunToolkit"], function () {
40661 c$ = Clazz_declareType (javax.swing, "SwingPaintEventDispatcher", jssun.awt.PaintEventDispatcher);
40662 Clazz_overrideMethod (c$, "shouldDoNativeBackgroundErase", 
40663 function (c) {
40664 return javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND || !(Clazz_instanceOf (c, javax.swing.RootPaneContainer));
40665 }, "java.awt.Component");
40666 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
40667 function (c, r) {
40668 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
40669 var appContext = jssun.awt.SunToolkit.targetToAppContext (c);
40670 return true;
40671 }return Clazz_superCall (this, javax.swing.SwingPaintEventDispatcher, "queueSurfaceDataReplacing", [c, r]);
40672 }, "java.awt.Component,Runnable");
40673 Clazz_defineStatics (c$,
40674 "SHOW_FROM_DOUBLE_BUFFER", false,
40675 "ERASE_BACKGROUND", false);
40676 {
40677 javax.swing.SwingPaintEventDispatcher.SHOW_FROM_DOUBLE_BUFFER = false;
40678 javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND = true;
40679 }});
40680 Clazz_declarePackage ("jssun.awt");
40681 Clazz_load (["java.util.HashSet", "$.IdentityHashMap"], "jssun.awt.AWTAutoShutdown", ["java.awt.AWTEvent"], function () {
40682 c$ = Clazz_decorateAsClass (function () {
40683 this.busyThreadSet = null;
40684 this.toolkitThreadBusy = false;
40685 this.peerMap = null;
40686 Clazz_instantialize (this, arguments);
40687 }, jssun.awt, "AWTAutoShutdown", null, Runnable);
40688 Clazz_prepareFields (c$, function () {
40689 this.busyThreadSet =  new java.util.HashSet (7);
40690 this.peerMap =  new java.util.IdentityHashMap ();
40691 });
40692 Clazz_makeConstructor (c$, 
40693  function () {
40694 });
40695 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
40696 function () {
40697 return (jssun.awt.AWTAutoShutdown.theInstance == null ? (jssun.awt.AWTAutoShutdown.theInstance =  new jssun.awt.AWTAutoShutdown ()) : jssun.awt.AWTAutoShutdown.theInstance);
40698 });
40699 c$.notifyToolkitThreadBusy = Clazz_defineMethod (c$, "notifyToolkitThreadBusy", 
40700 function () {
40701 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (true);
40702 });
40703 c$.notifyToolkitThreadFree = Clazz_defineMethod (c$, "notifyToolkitThreadFree", 
40704 function () {
40705 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (false);
40706 });
40707 Clazz_defineMethod (c$, "notifyThreadBusy", 
40708 function (thread) {
40709 this.busyThreadSet.add (thread);
40710 }, "Thread");
40711 Clazz_defineMethod (c$, "notifyThreadFree", 
40712 function (thread) {
40713 this.busyThreadSet.remove (thread);
40714 }, "Thread");
40715 Clazz_defineMethod (c$, "notifyPeerMapUpdated", 
40716 function () {
40717 if (!this.isReadyToShutdown ()) {
40718 this.activateBlockerThread ();
40719 }});
40720 Clazz_defineMethod (c$, "isReadyToShutdown", 
40721  function () {
40722 return (!this.toolkitThreadBusy && this.peerMap.isEmpty () && this.busyThreadSet.isEmpty ());
40723 });
40724 Clazz_defineMethod (c$, "setToolkitBusy", 
40725  function (busy) {
40726 if (busy != this.toolkitThreadBusy) {
40727 if (busy != this.toolkitThreadBusy) {
40728 if (busy) {
40729 this.toolkitThreadBusy = busy;
40730 } else {
40731 this.toolkitThreadBusy = busy;
40732 }}}}, "~B");
40733 Clazz_overrideMethod (c$, "run", 
40734 function () {
40735 });
40736 c$.getShutdownEvent = Clazz_defineMethod (c$, "getShutdownEvent", 
40737 function () {
40738 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));
40739 });
40740 Clazz_defineMethod (c$, "activateBlockerThread", 
40741  function () {
40742 });
40743 Clazz_defineMethod (c$, "registerPeer", 
40744 function (target, peer) {
40745 this.peerMap.put (target, peer);
40746 this.notifyPeerMapUpdated ();
40747 }, "~O,~O");
40748 Clazz_defineMethod (c$, "unregisterPeer", 
40749 function (target, peer) {
40750 if (this.peerMap.get (target) === peer) {
40751 this.peerMap.remove (target);
40752 }}, "~O,~O");
40753 Clazz_defineMethod (c$, "getPeer", 
40754 function (target) {
40755 return this.peerMap.get (target);
40756 }, "~O");
40757 Clazz_defineMethod (c$, "dumpPeers", 
40758 function (aLog) {
40759 aLog.fine ("Mapped peers:");
40760 for (var key, $key = this.peerMap.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
40761 aLog.fine (key + "->" + this.peerMap.get (key));
40762 }
40763 }, "java.util.logging.Logger");
40764 c$.$AWTAutoShutdown$1$ = function () {
40765 Clazz_pu$h(self.c$);
40766 c$ = Clazz_declareAnonymous (jssun.awt, "AWTAutoShutdown$1", java.awt.AWTEvent);
40767 c$ = Clazz_p0p ();
40768 };
40769 Clazz_defineStatics (c$,
40770 "theInstance", null);
40771 });
40772 Clazz_declarePackage ("jssun.awt");
40773 c$ = Clazz_decorateAsClass (function () {
40774 this.event = null;
40775 this.next = null;
40776 Clazz_instantialize (this, arguments);
40777 }, jssun.awt, "EventQueueItem");
40778 Clazz_makeConstructor (c$, 
40779 function (evt) {
40780 this.event = evt;
40781 }, "java.awt.AWTEvent");
40782 Clazz_declarePackage ("jssun.awt");
40783 Clazz_declareInterface (jssun.awt, "ModalExclude");
40784 Clazz_declarePackage ("jssun.awt");
40785 Clazz_load (["java.awt.peer.CanvasPeer", "$.LightweightPeer", "$.PanelPeer"], "jssun.awt.NullComponentPeer", ["java.lang.IllegalStateException", "$.UnsupportedOperationException", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle"], function () {
40786 c$ = Clazz_declareType (jssun.awt, "NullComponentPeer", null, [java.awt.peer.LightweightPeer, java.awt.peer.CanvasPeer, java.awt.peer.PanelPeer]);
40787 Clazz_overrideMethod (c$, "isObscured", 
40788 function () {
40789 return false;
40790 });
40791 Clazz_overrideMethod (c$, "canDetermineObscurity", 
40792 function () {
40793 return false;
40794 });
40795 Clazz_overrideMethod (c$, "isFocusable", 
40796 function () {
40797 return false;
40798 });
40799 Clazz_overrideMethod (c$, "setVisible", 
40800 function (b) {
40801 }, "~B");
40802 Clazz_defineMethod (c$, "show", 
40803 function () {
40804 });
40805 Clazz_defineMethod (c$, "hide", 
40806 function () {
40807 });
40808 Clazz_overrideMethod (c$, "setEnabled", 
40809 function (b) {
40810 }, "~B");
40811 Clazz_defineMethod (c$, "enable", 
40812 function () {
40813 });
40814 Clazz_defineMethod (c$, "disable", 
40815 function () {
40816 });
40817 Clazz_overrideMethod (c$, "paint", 
40818 function (g) {
40819 }, "java.awt.Graphics");
40820 Clazz_overrideMethod (c$, "repaint", 
40821 function (tm, x, y, width, height) {
40822 }, "~N,~N,~N,~N,~N");
40823 Clazz_overrideMethod (c$, "print", 
40824 function (g) {
40825 }, "java.awt.Graphics");
40826 Clazz_overrideMethod (c$, "setBounds", 
40827 function (x, y, width, height, op) {
40828 }, "~N,~N,~N,~N,~N");
40829 Clazz_defineMethod (c$, "reshape", 
40830 function (x, y, width, height) {
40831 }, "~N,~N,~N,~N");
40832 Clazz_overrideMethod (c$, "coalescePaintEvent", 
40833 function (e) {
40834 }, "java.awt.event.PaintEvent");
40835 Clazz_defineMethod (c$, "handleEvent", 
40836 function (e) {
40837 return false;
40838 }, "java.awt.Event");
40839 Clazz_defineMethod (c$, "handleEvent", 
40840 function (arg0) {
40841 }, "java.awt.AWTEvent");
40842 Clazz_overrideMethod (c$, "getPreferredSize", 
40843 function () {
40844 return  new java.awt.Dimension (1, 1);
40845 });
40846 Clazz_overrideMethod (c$, "getMinimumSize", 
40847 function () {
40848 return  new java.awt.Dimension (1, 1);
40849 });
40850 Clazz_overrideMethod (c$, "getToolkit", 
40851 function () {
40852 return null;
40853 });
40854 Clazz_overrideMethod (c$, "getColorModel", 
40855 function () {
40856 return null;
40857 });
40858 Clazz_overrideMethod (c$, "getGraphics", 
40859 function () {
40860 return null;
40861 });
40862 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
40863 function () {
40864 return null;
40865 });
40866 Clazz_overrideMethod (c$, "getFontMetrics", 
40867 function (font) {
40868 return null;
40869 }, "java.awt.Font");
40870 Clazz_overrideMethod (c$, "dispose", 
40871 function () {
40872 });
40873 Clazz_overrideMethod (c$, "setForeground", 
40874 function (c) {
40875 }, "java.awt.Color");
40876 Clazz_overrideMethod (c$, "setBackground", 
40877 function (c) {
40878 }, "java.awt.Color");
40879 Clazz_overrideMethod (c$, "setFont", 
40880 function (f) {
40881 }, "java.awt.Font");
40882 Clazz_overrideMethod (c$, "updateCursorImmediately", 
40883 function () {
40884 });
40885 Clazz_defineMethod (c$, "setCursor", 
40886 function (cursor) {
40887 }, "java.awt.Cursor");
40888 Clazz_overrideMethod (c$, "requestFocus", 
40889 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
40890 return false;
40891 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
40892 Clazz_defineMethod (c$, "createImage", 
40893 function (producer) {
40894 return null;
40895 }, "java.awt.image.ImageProducer");
40896 Clazz_defineMethod (c$, "createImage", 
40897 function (width, height) {
40898 return null;
40899 }, "~N,~N");
40900 Clazz_overrideMethod (c$, "prepareImage", 
40901 function (img, w, h, o) {
40902 return false;
40903 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40904 Clazz_overrideMethod (c$, "checkImage", 
40905 function (img, w, h, o) {
40906 return 0;
40907 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40908 Clazz_defineMethod (c$, "preferredSize", 
40909 function () {
40910 return this.getPreferredSize ();
40911 });
40912 Clazz_defineMethod (c$, "minimumSize", 
40913 function () {
40914 return this.getMinimumSize ();
40915 });
40916 Clazz_overrideMethod (c$, "getLocationOnScreen", 
40917 function () {
40918 return  new java.awt.Point (0, 0);
40919 });
40920 Clazz_overrideMethod (c$, "getInsets", 
40921 function () {
40922 return this.insets ();
40923 });
40924 Clazz_overrideMethod (c$, "beginValidate", 
40925 function () {
40926 });
40927 Clazz_overrideMethod (c$, "endValidate", 
40928 function () {
40929 });
40930 Clazz_defineMethod (c$, "insets", 
40931 function () {
40932 return  new java.awt.Insets (0, 0, 0, 0);
40933 });
40934 Clazz_defineMethod (c$, "isPaintPending", 
40935 function () {
40936 return false;
40937 });
40938 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
40939 function () {
40940 return false;
40941 });
40942 Clazz_overrideMethod (c$, "createVolatileImage", 
40943 function (width, height) {
40944 return null;
40945 }, "~N,~N");
40946 Clazz_overrideMethod (c$, "beginLayout", 
40947 function () {
40948 });
40949 Clazz_overrideMethod (c$, "endLayout", 
40950 function () {
40951 });
40952 Clazz_overrideMethod (c$, "getBackBuffer", 
40953 function () {
40954 throw  new IllegalStateException ("Page-flipping is not allowed on a lightweight component");
40955 });
40956 Clazz_overrideMethod (c$, "destroyBuffers", 
40957 function () {
40958 });
40959 Clazz_overrideMethod (c$, "isReparentSupported", 
40960 function () {
40961 return false;
40962 });
40963 Clazz_overrideMethod (c$, "reparent", 
40964 function (newNativeParent) {
40965 throw  new UnsupportedOperationException ();
40966 }, "java.awt.peer.ContainerPeer");
40967 Clazz_defineMethod (c$, "restack", 
40968 function () {
40969 throw  new UnsupportedOperationException ();
40970 });
40971 Clazz_defineMethod (c$, "isRestackSupported", 
40972 function () {
40973 return false;
40974 });
40975 Clazz_overrideMethod (c$, "layout", 
40976 function () {
40977 });
40978 Clazz_overrideMethod (c$, "getBounds", 
40979 function () {
40980 return  new java.awt.Rectangle (0, 0, 0, 0);
40981 });
40982 });
40983 Clazz_declarePackage ("jssun.awt");
40984 Clazz_load (null, "jssun.awt.PaintEventDispatcher", ["java.awt.Rectangle", "java.awt.event.PaintEvent"], function () {
40985 c$ = Clazz_declareType (jssun.awt, "PaintEventDispatcher");
40986 c$.setPaintEventDispatcher = Clazz_defineMethod (c$, "setPaintEventDispatcher", 
40987 function (dispatcher) {
40988 {
40989 jssun.awt.PaintEventDispatcher.dispatcher = dispatcher;
40990 }}, "jssun.awt.PaintEventDispatcher");
40991 c$.getPaintEventDispatcher = Clazz_defineMethod (c$, "getPaintEventDispatcher", 
40992 function () {
40993 {
40994 if (jssun.awt.PaintEventDispatcher.dispatcher == null) {
40995 jssun.awt.PaintEventDispatcher.dispatcher =  new jssun.awt.PaintEventDispatcher ();
40996 }return jssun.awt.PaintEventDispatcher.dispatcher;
40997 }});
40998 Clazz_defineMethod (c$, "createPaintEvent", 
40999 function (target, x, y, w, h) {
41000 return  new java.awt.event.PaintEvent (target, 800,  new java.awt.Rectangle (x, y, w, h));
41001 }, "java.awt.Component,~N,~N,~N,~N");
41002 Clazz_defineMethod (c$, "shouldDoNativeBackgroundErase", 
41003 function (c) {
41004 return true;
41005 }, "java.awt.Component");
41006 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
41007 function (c, r) {
41008 return false;
41009 }, "java.awt.Component,Runnable");
41010 Clazz_defineStatics (c$,
41011 "dispatcher", null);
41012 });
41013 Clazz_declarePackage ("jssun.awt");
41014 Clazz_load (null, "jssun.awt.PostEventQueue", ["jssun.awt.EventQueueItem", "$.SunToolkit", "swingjs.JSToolkit"], function () {
41015 c$ = Clazz_decorateAsClass (function () {
41016 this.queueHead = null;
41017 this.queueTail = null;
41018 this.eventQueue = null;
41019 Clazz_instantialize (this, arguments);
41020 }, jssun.awt, "PostEventQueue");
41021 Clazz_makeConstructor (c$, 
41022 function (eq) {
41023 this.eventQueue = eq;
41024 }, "java.awt.EventQueue");
41025 Clazz_defineMethod (c$, "noEvents", 
41026 function () {
41027 return this.queueHead == null;
41028 });
41029 Clazz_defineMethod (c$, "flush", 
41030 function () {
41031 if (this.queueHead != null) {
41032 var tempQueue;
41033 {
41034 tempQueue = this.queueHead;
41035 this.queueHead = this.queueTail = null;
41036 while (tempQueue != null) {
41037 swingjs.JSToolkit.alert ("postevent IS NOT IMPLEMENTED " + tempQueue.event);
41038 this.eventQueue.postEvent (tempQueue.event);
41039 tempQueue = tempQueue.next;
41040 }
41041 }}});
41042 Clazz_defineMethod (c$, "postEvent", 
41043 function (event) {
41044 var item =  new jssun.awt.EventQueueItem (event);
41045 {
41046 if (this.queueHead == null) {
41047 this.queueHead = this.queueTail = item;
41048 } else {
41049 this.queueTail.next = item;
41050 this.queueTail = item;
41051 }}jssun.awt.SunToolkit.wakeupEventQueue (this.eventQueue, false);
41052 }, "java.awt.AWTEvent");
41053 });
41054 Clazz_declarePackage ("jssun.java2d");
41055 Clazz_load (["java.awt.Graphics2D"], "jssun.java2d.SunGraphics2D", ["java.awt.geom.AffineTransform"], function () {
41056 c$ = Clazz_decorateAsClass (function () {
41057 this.transformState = 0;
41058 this.foregroundColor = null;
41059 this.backgroundColor = null;
41060 this.$transform = null;
41061 this.transX = 0;
41062 this.transY = 0;
41063 this.hints = null;
41064 Clazz_instantialize (this, arguments);
41065 }, jssun.java2d, "SunGraphics2D", java.awt.Graphics2D);
41066 Clazz_defineMethod (c$, "clone", 
41067 function () {
41068 return this.clone0 ();
41069 });
41070 Clazz_defineMethod (c$, "clone0", 
41071 function () {
41072 try {
41073 var g;
41074 {
41075 g = Clazz_clone(this);
41076 }g.$transform =  new java.awt.geom.AffineTransform (this.$transform);
41077 if (this.hints != null) {
41078 g.hints = this.hints.clone ();
41079 }return g;
41080 } catch (e) {
41081 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
41082 } else {
41083 throw e;
41084 }
41085 }
41086 return null;
41087 });
41088 Clazz_defineMethod (c$, "create", 
41089 function () {
41090 return this.clone0 ();
41091 });
41092 Clazz_defineStatics (c$,
41093 "TRANSFORM_GENERIC", 4,
41094 "TRANSFORM_TRANSLATESCALE", 3,
41095 "TRANSFORM_ANY_TRANSLATE", 2,
41096 "TRANSFORM_INT_TRANSLATE", 1,
41097 "TRANSFORM_ISIDENT", 0);
41098 });
41099 Clazz_declarePackage ("javax.swing");
41100 Clazz_load (null, "javax.swing.UIManager", ["java.util.ArrayList", "java.util.Locale", "javax.swing.RepaintManager", "$.SwingPaintEventDispatcher", "$.SwingUtilities", "jssun.awt.PaintEventDispatcher", "swingjs.JSToolkit"], function () {
41101 c$ = Clazz_declareType (javax.swing, "UIManager");
41102 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
41103 function () {
41104 return javax.swing.UIManager.uid;
41105 });
41106 c$.getInstalledLookAndFeels = Clazz_defineMethod (c$, "getInstalledLookAndFeels", 
41107 function () {
41108 return javax.swing.UIManager.installedLAFs;
41109 });
41110 c$.setInstalledLookAndFeels = Clazz_defineMethod (c$, "setInstalledLookAndFeels", 
41111 function (infos) {
41112 swingjs.JSToolkit.notImplemented (null);
41113 }, "~A");
41114 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
41115 function (info) {
41116 swingjs.JSToolkit.notImplemented (null);
41117 }, "javax.swing.UIManager.LookAndFeelInfo");
41118 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
41119 function (name, className) {
41120 swingjs.JSToolkit.notImplemented (null);
41121 }, "~S,~S");
41122 c$.getLookAndFeel = Clazz_defineMethod (c$, "getLookAndFeel", 
41123 function () {
41124 return (javax.swing.UIManager.laf == null ? (javax.swing.UIManager.laf = swingjs.JSToolkit.getInstance ("swingjs.plaf.HTML5LookAndFeel")) : javax.swing.UIManager.laf);
41125 });
41126 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
41127 function (newLookAndFeel) {
41128 }, "javax.swing.LookAndFeel");
41129 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
41130 function (className) {
41131 var lnfClass = javax.swing.SwingUtilities.loadSystemClass (className);
41132 javax.swing.UIManager.setLookAndFeel ((lnfClass.newInstance ()));
41133 }, "~S");
41134 c$.getSystemLookAndFeelClassName = Clazz_defineMethod (c$, "getSystemLookAndFeelClassName", 
41135 function () {
41136 return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName ();
41137 });
41138 c$.getCrossPlatformLookAndFeelClassName = Clazz_defineMethod (c$, "getCrossPlatformLookAndFeelClassName", 
41139 function () {
41140 return "swingjs.plaf.HTML5LookAndFeel";
41141 });
41142 c$.getDefaults = Clazz_defineMethod (c$, "getDefaults", 
41143 function () {
41144 javax.swing.UIManager.maybeInitialize ();
41145 return javax.swing.UIManager.uid;
41146 });
41147 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41148 function (key) {
41149 return javax.swing.UIManager.getDefaults ().getFont (key);
41150 }, "~O");
41151 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41152 function (key, l) {
41153 return javax.swing.UIManager.getDefaults ().getFont (key, l);
41154 }, "~O,java.util.Locale");
41155 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41156 function (key) {
41157 return javax.swing.UIManager.getDefaults ().getColor (key);
41158 }, "~O");
41159 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41160 function (key, l) {
41161 return javax.swing.UIManager.getDefaults ().getColor (key, l);
41162 }, "~O,java.util.Locale");
41163 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41164 function (key) {
41165 return javax.swing.UIManager.getDefaults ().getIcon (key);
41166 }, "~O");
41167 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41168 function (key, l) {
41169 return javax.swing.UIManager.getDefaults ().getIcon (key, l);
41170 }, "~O,java.util.Locale");
41171 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41172 function (key) {
41173 return javax.swing.UIManager.getDefaults ().getBorder (key);
41174 }, "~O");
41175 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41176 function (key, l) {
41177 return javax.swing.UIManager.getDefaults ().getBorder (key, l);
41178 }, "~O,java.util.Locale");
41179 c$.getString = Clazz_defineMethod (c$, "getString", 
41180 function (key) {
41181 return javax.swing.UIManager.getDefaults ().getString (key);
41182 }, "~O");
41183 c$.getString = Clazz_defineMethod (c$, "getString", 
41184 function (key, l) {
41185 return javax.swing.UIManager.getDefaults ().getString (key, l);
41186 }, "~O,java.util.Locale");
41187 c$.getString = Clazz_defineMethod (c$, "getString", 
41188 function (key, c) {
41189 var l = (c == null) ? java.util.Locale.getDefault () : c.getLocale ();
41190 return javax.swing.UIManager.getString (key, l);
41191 }, "~O,java.awt.Component");
41192 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41193 function (key) {
41194 return javax.swing.UIManager.getDefaults ().getInt (key);
41195 }, "~O");
41196 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41197 function (key, l) {
41198 return javax.swing.UIManager.getDefaults ().getInt (key, l);
41199 }, "~O,java.util.Locale");
41200 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41201 function (key) {
41202 return javax.swing.UIManager.getDefaults ().getBoolean (key);
41203 }, "~O");
41204 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41205 function (key, l) {
41206 return javax.swing.UIManager.getDefaults ().getBoolean (key, l);
41207 }, "~O,java.util.Locale");
41208 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41209 function (key) {
41210 return javax.swing.UIManager.getDefaults ().getInsets (key);
41211 }, "~O");
41212 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41213 function (key, l) {
41214 return javax.swing.UIManager.getDefaults ().getInsets (key, l);
41215 }, "~O,java.util.Locale");
41216 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41217 function (key) {
41218 return javax.swing.UIManager.getDefaults ().getDimension (key);
41219 }, "~O");
41220 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41221 function (key, l) {
41222 return javax.swing.UIManager.getDefaults ().getDimension (key, l);
41223 }, "~O,java.util.Locale");
41224 c$.get = Clazz_defineMethod (c$, "get", 
41225 function (key) {
41226 return javax.swing.UIManager.getDefaults ().get (key);
41227 }, "~O");
41228 c$.get = Clazz_defineMethod (c$, "get", 
41229 function (key, l) {
41230 return javax.swing.UIManager.getDefaults ().get (key, l);
41231 }, "~O,java.util.Locale");
41232 c$.put = Clazz_defineMethod (c$, "put", 
41233 function (key, value) {
41234 return javax.swing.UIManager.getDefaults ().put (key, value);
41235 }, "~O,~O");
41236 c$.getUI = Clazz_defineMethod (c$, "getUI", 
41237 function (target) {
41238 javax.swing.UIManager.maybeInitialize ();
41239 var ui = null;
41240 ui = javax.swing.UIManager.getDefaults ().getUI (target);
41241 if (ui == null) System.out.println (target.getUIClassID () + " has not been implemented");
41242 return ui;
41243 }, "javax.swing.JComponent");
41244 c$.addPropertyChangeListener = Clazz_defineMethod (c$, "addPropertyChangeListener", 
41245 function (listener) {
41246 }, "java.beans.PropertyChangeListener");
41247 c$.removePropertyChangeListener = Clazz_defineMethod (c$, "removePropertyChangeListener", 
41248 function (listener) {
41249 }, "java.beans.PropertyChangeListener");
41250 c$.getPropertyChangeListeners = Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41251 function () {
41252 return  new Array (0);
41253 });
41254 c$.maybeInitialize = Clazz_defineMethod (c$, "maybeInitialize", 
41255  function () {
41256 if (javax.swing.UIManager.uid == null) {
41257 javax.swing.UIManager.uid = swingjs.JSToolkit.getLookAndFeelDefaults ();
41258 javax.swing.UIManager.initialize ();
41259 }});
41260 c$.initialize = Clazz_defineMethod (c$, "initialize", 
41261  function () {
41262 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
41263 jssun.awt.PaintEventDispatcher.setPaintEventDispatcher ( new javax.swing.SwingPaintEventDispatcher ());
41264 }});
41265 Clazz_pu$h(self.c$);
41266 c$ = Clazz_decorateAsClass (function () {
41267 this.name = null;
41268 this.className = null;
41269 Clazz_instantialize (this, arguments);
41270 }, javax.swing.UIManager, "LookAndFeelInfo");
41271 Clazz_makeConstructor (c$, 
41272 function (a, b) {
41273 this.name = a;
41274 this.className = b;
41275 }, "~S,~S");
41276 Clazz_defineMethod (c$, "getName", 
41277 function () {
41278 return this.name;
41279 });
41280 Clazz_defineMethod (c$, "getClassName", 
41281 function () {
41282 return this.className;
41283 });
41284 Clazz_overrideMethod (c$, "toString", 
41285 function () {
41286 return this.getClass ().getName () + "[" + this.getName () + " " + this.getClassName () + "]";
41287 });
41288 c$ = Clazz_p0p ();
41289 Clazz_defineStatics (c$,
41290 "installedLAFs", null);
41291 {
41292 var iLAFs =  new java.util.ArrayList (4);
41293 iLAFs.add ( new javax.swing.UIManager.LookAndFeelInfo ("HTML5", "swingjs.plaf.HTML5LookAndFeel"));
41294 javax.swing.UIManager.installedLAFs = iLAFs.toArray ( new Array (iLAFs.size ()));
41295 }Clazz_defineStatics (c$,
41296 "laf", null,
41297 "uid", null);
41298 });
41299 Clazz_declarePackage ("javax.swing");
41300 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 () {
41301 c$ = Clazz_decorateAsClass (function () {
41302 this.changeSupport = null;
41303 this.resourceBundles = null;
41304 this.defaultLocale = null;
41305 this.resourceCache = null;
41306 Clazz_instantialize (this, arguments);
41307 }, javax.swing, "UIDefaults", java.util.Hashtable);
41308 Clazz_prepareFields (c$, function () {
41309 this.defaultLocale = java.util.Locale.getDefault ();
41310 });
41311 Clazz_makeConstructor (c$, 
41312 function () {
41313 this.construct (700, .75);
41314 });
41315 Clazz_makeConstructor (c$, 
41316 function (initialCapacity, loadFactor) {
41317 Clazz_superConstructor (this, javax.swing.UIDefaults, [initialCapacity, loadFactor]);
41318 this.resourceCache =  new java.util.HashMap ();
41319 }, "~N,~N");
41320 Clazz_makeConstructor (c$, 
41321 function (keyValueList) {
41322 Clazz_superConstructor (this, javax.swing.UIDefaults, [Clazz_doubleToInt (keyValueList.length / 2)]);
41323 for (var i = 0; i < keyValueList.length; i += 2) {
41324 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], keyValueList[i + 1]]);
41325 }
41326 }, "~A");
41327 Clazz_defineMethod (c$, "get", 
41328 function (key) {
41329 var value = this.getFromHashtable (key);
41330 return (value != null) ? value : this.getFromResourceBundle (key, null);
41331 }, "~O");
41332 Clazz_defineMethod (c$, "getFromHashtable", 
41333  function (key) {
41334 var value = Clazz_superCall (this, javax.swing.UIDefaults, "get", [key]);
41335 if (value == null && (Clazz_instanceOf (key, String))) {
41336 var skey = key;
41337 if (skey.endsWith (".font") || skey.endsWith (".background") || skey.endsWith (".foreground")) value = Clazz_superCall (this, javax.swing.UIDefaults, "get", ["*" + skey.substring (skey.lastIndexOf ("."))]);
41338 }if ((value !== javax.swing.UIDefaults.PENDING) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue)) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue))) {
41339 return value;
41340 }if (!(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue))) {
41341 return value;
41342 }if (Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue)) {
41343 try {
41344 value = (value).createValue (this);
41345 } finally {
41346 if (value == null) {
41347 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]);
41348 } else {
41349 Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41350 }}
41351 } else {
41352 value = (value).createValue (this);
41353 }return value;
41354 }, "~O");
41355 Clazz_defineMethod (c$, "get", 
41356 function (key, l) {
41357 var value = this.getFromHashtable (key);
41358 return (value != null) ? value : this.getFromResourceBundle (key, l);
41359 }, "~O,java.util.Locale");
41360 Clazz_defineMethod (c$, "getFromResourceBundle", 
41361  function (key, l) {
41362 if (this.resourceBundles == null || this.resourceBundles.isEmpty () || !(Clazz_instanceOf (key, String))) {
41363 return null;
41364 }if (l == null) {
41365 if (this.defaultLocale == null) return null;
41366  else l = this.defaultLocale;
41367 }{
41368 return this.getResourceCache (l).get (key);
41369 }}, "~O,java.util.Locale");
41370 Clazz_defineMethod (c$, "getResourceCache", 
41371  function (l) {
41372 return null;
41373 }, "java.util.Locale");
41374 Clazz_defineMethod (c$, "put", 
41375 function (key, value) {
41376 var oldValue = (value == null) ? Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]) : Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41377 if (Clazz_instanceOf (key, String)) {
41378 this.firePropertyChange (key, oldValue, value);
41379 }return oldValue;
41380 }, "~O,~O");
41381 Clazz_defineMethod (c$, "putDefaults", 
41382 function (keyValueList) {
41383 for (var i = 0, max = keyValueList.length; i < max; i += 2) {
41384 var value = keyValueList[i + 1];
41385 if (value == null) {
41386 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [keyValueList[i]]);
41387 } else {
41388 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], value]);
41389 }}
41390 this.firePropertyChange ("UIDefaults", null, null);
41391 }, "~A");
41392 Clazz_defineMethod (c$, "getFont", 
41393 function (key) {
41394 var value = this.get (key);
41395 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41396 }, "~O");
41397 Clazz_defineMethod (c$, "getFont", 
41398 function (key, l) {
41399 var value = this.get (key, l);
41400 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41401 }, "~O,java.util.Locale");
41402 Clazz_defineMethod (c$, "getColor", 
41403 function (key) {
41404 var value = this.get (key);
41405 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41406 }, "~O");
41407 Clazz_defineMethod (c$, "getColor", 
41408 function (key, l) {
41409 var value = this.get (key, l);
41410 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41411 }, "~O,java.util.Locale");
41412 Clazz_defineMethod (c$, "getIcon", 
41413 function (key) {
41414 var value = this.get (key);
41415 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41416 }, "~O");
41417 Clazz_defineMethod (c$, "getIcon", 
41418 function (key, l) {
41419 var value = this.get (key, l);
41420 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41421 }, "~O,java.util.Locale");
41422 Clazz_defineMethod (c$, "getBorder", 
41423 function (key) {
41424 var value = this.get (key);
41425 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41426 }, "~O");
41427 Clazz_defineMethod (c$, "getBorder", 
41428 function (key, l) {
41429 var value = this.get (key, l);
41430 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41431 }, "~O,java.util.Locale");
41432 Clazz_defineMethod (c$, "getString", 
41433 function (key) {
41434 var value = this.get (key);
41435 return (Clazz_instanceOf (value, String)) ? value : null;
41436 }, "~O");
41437 Clazz_defineMethod (c$, "getString", 
41438 function (key, l) {
41439 var value = this.get (key, l);
41440 return (Clazz_instanceOf (value, String)) ? value : null;
41441 }, "~O,java.util.Locale");
41442 Clazz_defineMethod (c$, "getInt", 
41443 function (key) {
41444 var value = this.get (key);
41445 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41446 }, "~O");
41447 Clazz_defineMethod (c$, "getInt", 
41448 function (key, l) {
41449 var value = this.get (key, l);
41450 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41451 }, "~O,java.util.Locale");
41452 Clazz_defineMethod (c$, "getBoolean", 
41453 function (key) {
41454 var value = this.get (key);
41455 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41456 }, "~O");
41457 Clazz_defineMethod (c$, "getBoolean", 
41458 function (key, l) {
41459 var value = this.get (key, l);
41460 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41461 }, "~O,java.util.Locale");
41462 Clazz_defineMethod (c$, "getInsets", 
41463 function (key) {
41464 var value = this.get (key);
41465 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41466 }, "~O");
41467 Clazz_defineMethod (c$, "getInsets", 
41468 function (key, l) {
41469 var value = this.get (key, l);
41470 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41471 }, "~O,java.util.Locale");
41472 Clazz_defineMethod (c$, "getDimension", 
41473 function (key) {
41474 var value = this.get (key);
41475 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41476 }, "~O");
41477 Clazz_defineMethod (c$, "getDimension", 
41478 function (key, l) {
41479 var value = this.get (key, l);
41480 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41481 }, "~O,java.util.Locale");
41482 Clazz_defineMethod (c$, "getUIClass", 
41483 function (uiClassID, uiClassLoader) {
41484 try {
41485 var className = this.get (uiClassID);
41486 if (className != null) {
41487 var cls = this.get (className);
41488 if (cls == null) {
41489 if (uiClassLoader == null) {
41490 cls = javax.swing.SwingUtilities.loadSystemClass (className);
41491 } else {
41492 cls = uiClassLoader.loadClass (className);
41493 }if (cls != null) {
41494 this.put (className, cls);
41495 }}return cls;
41496 }} catch (e$$) {
41497 if (Clazz_exceptionOf (e$$, ClassNotFoundException)) {
41498 var e = e$$;
41499 {
41500 return null;
41501 }
41502 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
41503 var e = e$$;
41504 {
41505 return null;
41506 }
41507 } else {
41508 throw e$$;
41509 }
41510 }
41511 return null;
41512 }, "~S,ClassLoader");
41513 Clazz_defineMethod (c$, "getUIClass", 
41514 function (uiClassID) {
41515 return this.getUIClass (uiClassID, null);
41516 }, "~S");
41517 Clazz_defineMethod (c$, "getUIError", 
41518 function (msg) {
41519 System.err.println ("UIDefaults.getUI() failed: " + msg);
41520 try {
41521 throw  new Error ();
41522 } catch (e) {
41523 e.printStackTrace ();
41524 }
41525 }, "~S");
41526 Clazz_defineMethod (c$, "getUI", 
41527 function (target) {
41528 return swingjs.JSToolkit.getComponentUI (target);
41529 }, "javax.swing.JComponent");
41530 Clazz_defineMethod (c$, "addPropertyChangeListener", 
41531 function (listener) {
41532 if (this.changeSupport == null) {
41533 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
41534 }this.changeSupport.addPropertyChangeListener (listener);
41535 }, "java.beans.PropertyChangeListener");
41536 Clazz_defineMethod (c$, "removePropertyChangeListener", 
41537 function (listener) {
41538 if (this.changeSupport != null) {
41539 this.changeSupport.removePropertyChangeListener (listener);
41540 }}, "java.beans.PropertyChangeListener");
41541 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41542 function () {
41543 if (this.changeSupport == null) {
41544 return  new Array (0);
41545 }return this.changeSupport.getPropertyChangeListeners ();
41546 });
41547 Clazz_defineMethod (c$, "firePropertyChange", 
41548 function (propertyName, oldValue, newValue) {
41549 if (this.changeSupport != null) {
41550 this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
41551 }}, "~S,~O,~O");
41552 Clazz_defineMethod (c$, "addResourceBundle", 
41553 function (bundleName) {
41554 if (bundleName == null) {
41555 return;
41556 }if (this.resourceBundles == null) {
41557 this.resourceBundles =  new java.util.Vector (5);
41558 }if (!this.resourceBundles.contains (bundleName)) {
41559 this.resourceBundles.add (bundleName);
41560 this.resourceCache.clear ();
41561 }}, "~S");
41562 Clazz_defineMethod (c$, "removeResourceBundle", 
41563 function (bundleName) {
41564 if (this.resourceBundles != null) {
41565 this.resourceBundles.remove (bundleName);
41566 }this.resourceCache.clear ();
41567 }, "~S");
41568 Clazz_defineMethod (c$, "setDefaultLocale", 
41569 function (l) {
41570 this.defaultLocale = l;
41571 }, "java.util.Locale");
41572 Clazz_defineMethod (c$, "getDefaultLocale", 
41573 function () {
41574 return this.defaultLocale;
41575 });
41576 Clazz_declareInterface (javax.swing.UIDefaults, "LazyValue");
41577 Clazz_declareInterface (javax.swing.UIDefaults, "ActiveValue");
41578 c$.PENDING = c$.prototype.PENDING =  String.instantialize ("Pending");
41579 });
41580 Clazz_declarePackage ("javax.swing");
41581 Clazz_load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () {
41582 c$ = Clazz_declareType (javax.swing, "LookAndFeel");
41583 c$.installColors = Clazz_defineMethod (c$, "installColors", 
41584 function (c, defaultBgName, defaultFgName) {
41585 var bg = c.getBackground ();
41586 if (bg == null || Clazz_instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName));
41587 var fg = c.getForeground ();
41588 if (fg == null || Clazz_instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName));
41589 }, "javax.swing.JComponent,~S,~S");
41590 c$.installColorsAndFont = Clazz_defineMethod (c$, "installColorsAndFont", 
41591 function (c, defaultBgName, defaultFgName, defaultFontName) {
41592 var f = c.getFont ();
41593 if (f == null || Clazz_instanceOf (f, javax.swing.plaf.UIResource)) {
41594 c.setFont (javax.swing.UIManager.getFont (defaultFontName));
41595 }javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName);
41596 }, "javax.swing.JComponent,~S,~S,~S");
41597 c$.installBorder = Clazz_defineMethod (c$, "installBorder", 
41598 function (c, defaultBorderName) {
41599 swingjs.JSToolkit.notImplemented (null);
41600 }, "javax.swing.JComponent,~S");
41601 c$.uninstallBorder = Clazz_defineMethod (c$, "uninstallBorder", 
41602 function (c) {
41603 swingjs.JSToolkit.notImplemented (null);
41604 }, "javax.swing.JComponent");
41605 c$.installProperty = Clazz_defineMethod (c$, "installProperty", 
41606 function (c, propertyName, propertyValue) {
41607 if (Clazz_instanceOf (c, javax.swing.JPasswordField)) {
41608 if (!(c).customSetUIProperty (propertyName, propertyValue)) {
41609 c.setUIProperty (propertyName, propertyValue);
41610 }} else {
41611 c.setUIProperty (propertyName, propertyValue);
41612 }}, "javax.swing.JComponent,~S,~O");
41613 c$.makeKeyBindings = Clazz_defineMethod (c$, "makeKeyBindings", 
41614 function (keyBindingList) {
41615 swingjs.JSToolkit.notImplemented (null);
41616 return null;
41617 }, "~A");
41618 c$.makeInputMap = Clazz_defineMethod (c$, "makeInputMap", 
41619 function (keys) {
41620 swingjs.JSToolkit.notImplemented (null);
41621 return null;
41622 }, "~A");
41623 c$.makeComponentInputMap = Clazz_defineMethod (c$, "makeComponentInputMap", 
41624 function (c, keys) {
41625 swingjs.JSToolkit.notImplemented (null);
41626 return null;
41627 }, "javax.swing.JComponent,~A");
41628 c$.loadKeyBindings = Clazz_defineMethod (c$, "loadKeyBindings", 
41629 function (retMap, keys) {
41630 swingjs.JSToolkit.notImplemented (null);
41631 }, "javax.swing.InputMap,~A");
41632 c$.makeIcon = Clazz_defineMethod (c$, "makeIcon", 
41633 function (baseClass, gifFile) {
41634 swingjs.JSToolkit.notImplemented (null);
41635 return null;
41636 }, "Class,~S");
41637 Clazz_defineMethod (c$, "getLayoutStyle", 
41638 function () {
41639 return jssun.swing.DefaultLayoutStyle.getInstance ();
41640 });
41641 Clazz_defineMethod (c$, "provideErrorFeedback", 
41642 function (component) {
41643 swingjs.JSToolkit.notImplemented (null);
41644 }, "java.awt.Component");
41645 c$.getDesktopPropertyValue = Clazz_defineMethod (c$, "getDesktopPropertyValue", 
41646 function (systemPropertyName, fallbackValue) {
41647 swingjs.JSToolkit.notImplemented (null);
41648 return fallbackValue;
41649 }, "~S,~O");
41650 Clazz_defineMethod (c$, "getDisabledIcon", 
41651 function (component, icon) {
41652 swingjs.JSToolkit.notImplemented (null);
41653 return null;
41654 }, "javax.swing.JComponent,javax.swing.Icon");
41655 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
41656 function (component, icon) {
41657 return this.getDisabledIcon (component, icon);
41658 }, "javax.swing.JComponent,javax.swing.Icon");
41659 Clazz_defineMethod (c$, "getSupportsWindowDecorations", 
41660 function () {
41661 return false;
41662 });
41663 Clazz_defineMethod (c$, "initialize", 
41664 function () {
41665 });
41666 Clazz_defineMethod (c$, "uninitialize", 
41667 function () {
41668 });
41669 Clazz_defineMethod (c$, "getDefaults", 
41670 function () {
41671 return null;
41672 });
41673 Clazz_overrideMethod (c$, "toString", 
41674 function () {
41675 return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]";
41676 });
41677 });
41678 Clazz_declarePackage ("javax.swing");
41679 Clazz_load (["java.lang.Enum"], "javax.swing.DropMode", null, function () {
41680 c$ = Clazz_declareType (javax.swing, "DropMode", Enum);
41681 Clazz_defineEnumConstant (c$, "USE_SELECTION", 0, []);
41682 Clazz_defineEnumConstant (c$, "ON", 1, []);
41683 Clazz_defineEnumConstant (c$, "INSERT", 2, []);
41684 Clazz_defineEnumConstant (c$, "INSERT_ROWS", 3, []);
41685 Clazz_defineEnumConstant (c$, "INSERT_COLS", 4, []);
41686 Clazz_defineEnumConstant (c$, "ON_OR_INSERT", 5, []);
41687 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_ROWS", 6, []);
41688 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_COLS", 7, []);
41689 });
41690 Clazz_declarePackage ("java.awt.font");
41691 Clazz_load (null, "java.awt.font.FontRenderContext", ["java.awt.RenderingHints", "java.awt.geom.AffineTransform"], function () {
41692 c$ = Clazz_decorateAsClass (function () {
41693 this.tx = null;
41694 this.aaHintValue = null;
41695 this.fmHintValue = null;
41696 this.defaulting = false;
41697 Clazz_instantialize (this, arguments);
41698 }, java.awt.font, "FontRenderContext");
41699 Clazz_makeConstructor (c$, 
41700 function () {
41701 this.defaulting = true;
41702 });
41703 Clazz_makeConstructor (c$, 
41704 function (tx, isAntiAliased, usesFractionalMetrics) {
41705 if (tx != null && !tx.isIdentity ()) {
41706 this.tx =  new java.awt.geom.AffineTransform (tx);
41707 }}, "java.awt.geom.AffineTransform,~B,~B");
41708 Clazz_makeConstructor (c$, 
41709 function (tx, aaHint, fmHint) {
41710 if (tx != null && !tx.isIdentity ()) {
41711 this.tx =  new java.awt.geom.AffineTransform (tx);
41712 }this.aaHintValue = aaHint;
41713 this.fmHintValue = fmHint;
41714 }, "java.awt.geom.AffineTransform,~O,~O");
41715 Clazz_defineMethod (c$, "isTransformed", 
41716 function () {
41717 if (!this.defaulting) {
41718 return this.tx != null;
41719 } else {
41720 return !this.getTransform ().isIdentity ();
41721 }});
41722 Clazz_defineMethod (c$, "getTransformType", 
41723 function () {
41724 if (!this.defaulting) {
41725 if (this.tx == null) {
41726 return 0;
41727 } else {
41728 return this.tx.getType ();
41729 }} else {
41730 return this.getTransform ().getType ();
41731 }});
41732 Clazz_defineMethod (c$, "getTransform", 
41733 function () {
41734 return (this.tx == null) ?  new java.awt.geom.AffineTransform () :  new java.awt.geom.AffineTransform (this.tx);
41735 });
41736 Clazz_defineMethod (c$, "isAntiAliased", 
41737 function () {
41738 return !(this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF || this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
41739 });
41740 Clazz_defineMethod (c$, "usesFractionalMetrics", 
41741 function () {
41742 return !(this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF || this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT);
41743 });
41744 Clazz_defineMethod (c$, "getAntiAliasingHint", 
41745 function () {
41746 if (this.defaulting) {
41747 if (this.isAntiAliased ()) {
41748 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON;
41749 } else {
41750 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF;
41751 }}return this.aaHintValue;
41752 });
41753 Clazz_defineMethod (c$, "getFractionalMetricsHint", 
41754 function () {
41755 if (this.defaulting) {
41756 if (this.usesFractionalMetrics ()) {
41757 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_ON;
41758 } else {
41759 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF;
41760 }}return this.fmHintValue;
41761 });
41762 Clazz_defineMethod (c$, "equals", 
41763 function (obj) {
41764 try {
41765 return this.equals (obj);
41766 } catch (e) {
41767 if (Clazz_exceptionOf (e, ClassCastException)) {
41768 return false;
41769 } else {
41770 throw e;
41771 }
41772 }
41773 }, "~O");
41774 Clazz_defineMethod (c$, "equals", 
41775 function (rhs) {
41776 if (this === rhs) {
41777 return true;
41778 }if (rhs == null) {
41779 return false;
41780 }if (!rhs.defaulting && !this.defaulting) {
41781 if (rhs.aaHintValue === this.aaHintValue && rhs.fmHintValue === this.fmHintValue) {
41782 return this.tx == null ? rhs.tx == null : this.tx.equals (rhs.tx);
41783 }return false;
41784 } else {
41785 return rhs.getAntiAliasingHint () === this.getAntiAliasingHint () && rhs.getFractionalMetricsHint () === this.getFractionalMetricsHint () && rhs.getTransform ().equals (this.getTransform ());
41786 }}, "java.awt.font.FontRenderContext");
41787 Clazz_defineMethod (c$, "hashCode", 
41788 function () {
41789 var hash = this.tx == null ? 0 : this.tx.hashCode ();
41790 if (this.defaulting) {
41791 hash += this.getAntiAliasingHint ().hashCode ();
41792 hash += this.getFractionalMetricsHint ().hashCode ();
41793 } else {
41794 hash += this.aaHintValue.hashCode ();
41795 hash += this.fmHintValue.hashCode ();
41796 }return hash;
41797 });
41798 });
41799 Clazz_declarePackage ("java.awt.event");
41800 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.InputMethodEvent", null, function () {
41801 c$ = Clazz_decorateAsClass (function () {
41802 this.when = 0;
41803 this.text = null;
41804 this.committedCharacterCount = 0;
41805 Clazz_instantialize (this, arguments);
41806 }, java.awt.event, "InputMethodEvent", java.awt.AWTEvent);
41807 Clazz_defineMethod (c$, "getText", 
41808 function () {
41809 return this.text;
41810 });
41811 Clazz_defineMethod (c$, "getCommittedCharacterCount", 
41812 function () {
41813 return this.committedCharacterCount;
41814 });
41815 Clazz_defineMethod (c$, "getWhen", 
41816 function () {
41817 return this.when;
41818 });
41819 Clazz_defineStatics (c$,
41820 "INPUT_METHOD_FIRST", 1100,
41821 "INPUT_METHOD_TEXT_CHANGED", 1100,
41822 "CARET_POSITION_CHANGED", 1101,
41823 "INPUT_METHOD_LAST", 1101);
41824 });
41825 Clazz_declarePackage ("javax.swing");
41826 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 () {
41827 c$ = Clazz_decorateAsClass (function () {
41828 this.isViewSizeSet = false;
41829 this.lastPaintPosition = null;
41830 this.backingStore = false;
41831 this.backingStoreImage = null;
41832 this.scrollUnderway = false;
41833 this.viewListener = null;
41834 this.changeEvent = null;
41835 this.scrollMode = 1;
41836 this.repaintAll = false;
41837 this.waitingForRepaint = false;
41838 this.inBlitPaint = false;
41839 this.hasHadValidView = false;
41840 if (!Clazz_isClassDefined ("javax.swing.JViewport.ViewListener")) {
41841 javax.swing.JViewport.$JViewport$ViewListener$ ();
41842 }
41843 Clazz_instantialize (this, arguments);
41844 }, javax.swing, "JViewport", javax.swing.JComponent);
41845 Clazz_makeConstructor (c$, 
41846 function () {
41847 Clazz_superConstructor (this, javax.swing.JViewport);
41848 this.setLayout (this.createLayoutManager ());
41849 this.setOpaque (true);
41850 this.updateUI ();
41851 this.setInheritsPopupMenu (true);
41852 });
41853 Clazz_overrideMethod (c$, "getUI", 
41854 function () {
41855 return this.ui;
41856 });
41857 Clazz_overrideMethod (c$, "updateUI", 
41858 function () {
41859 this.setUI (javax.swing.UIManager.getUI (this));
41860 });
41861 Clazz_overrideMethod (c$, "getUIClassID", 
41862 function () {
41863 return "ViewportUI";
41864 });
41865 Clazz_overrideMethod (c$, "addImpl", 
41866 function (child, constraints, index) {
41867 this.setView (child);
41868 return child;
41869 }, "java.awt.Component,~O,~N");
41870 Clazz_defineMethod (c$, "remove", 
41871 function (child) {
41872 child.removeComponentListener (this.viewListener);
41873 this.removeChild (child);
41874 }, "java.awt.Component");
41875 Clazz_overrideMethod (c$, "scrollRectToVisible", 
41876 function (contentRect) {
41877 var view = this.getView ();
41878 if (view == null) {
41879 return;
41880 } else {
41881 if (!view.isValid ()) {
41882 this.validateView ();
41883 }var dx = 0;
41884 var dy = 0;
41885 dx = this.positionAdjustment (this.getWidth (), contentRect.width, contentRect.x);
41886 dy = this.positionAdjustment (this.getHeight (), contentRect.height, contentRect.y);
41887 if (dx != 0 || dy != 0) {
41888 var viewPosition = this.getViewPosition ();
41889 var viewSize = view.getSize ();
41890 var startX = viewPosition.x;
41891 var startY = viewPosition.y;
41892 var extent = this.getExtentSize ();
41893 viewPosition.x -= dx;
41894 viewPosition.y -= dy;
41895 if (view.isValid ()) {
41896 if (this.getParent ().getComponentOrientation ().isLeftToRight ()) {
41897 if (viewPosition.x + extent.width > viewSize.width) {
41898 viewPosition.x = Math.max (0, viewSize.width - extent.width);
41899 } else if (viewPosition.x < 0) {
41900 viewPosition.x = 0;
41901 }} else {
41902 if (extent.width > viewSize.width) {
41903 viewPosition.x = viewSize.width - extent.width;
41904 } else {
41905 viewPosition.x = Math.max (0, Math.min (viewSize.width - extent.width, viewPosition.x));
41906 }}if (viewPosition.y + extent.height > viewSize.height) {
41907 viewPosition.y = Math.max (0, viewSize.height - extent.height);
41908 } else if (viewPosition.y < 0) {
41909 viewPosition.y = 0;
41910 }}if (viewPosition.x != startX || viewPosition.y != startY) {
41911 this.setViewPosition (viewPosition);
41912 this.scrollUnderway = false;
41913 }}}}, "java.awt.Rectangle");
41914 Clazz_defineMethod (c$, "validateView", 
41915  function () {
41916 var validateRoot = null;
41917 for (var c = this; c != null; c = c.getParent ()) {
41918 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane)) || !c.isLightweight ()) {
41919 return;
41920 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
41921 validateRoot = c;
41922 break;
41923 }}
41924 if (validateRoot == null) {
41925 return;
41926 }var root = null;
41927 for (var c = validateRoot; c != null; c = c.getParent ()) {
41928 if (!c.isLightweight ()) {
41929 return;
41930 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
41931 root = c;
41932 break;
41933 }}
41934 if (root == null) {
41935 return;
41936 }validateRoot.validate ();
41937 var rm = javax.swing.RepaintManager.currentManager (this);
41938 if (rm != null) {
41939 rm.removeInvalidComponent (validateRoot);
41940 }});
41941 Clazz_defineMethod (c$, "positionAdjustment", 
41942  function (parentWidth, childWidth, childAt) {
41943 if (childAt >= 0 && childWidth + childAt <= parentWidth) {
41944 return 0;
41945 }if (childAt <= 0 && childWidth + childAt >= parentWidth) {
41946 return 0;
41947 }if (childAt > 0 && childWidth <= parentWidth) {
41948 return -childAt + parentWidth - childWidth;
41949 }if (childAt >= 0 && childWidth >= parentWidth) {
41950 return -childAt;
41951 }if (childAt <= 0 && childWidth <= parentWidth) {
41952 return -childAt;
41953 }if (childAt < 0 && childWidth >= parentWidth) {
41954 return -childAt + parentWidth - childWidth;
41955 }return 0;
41956 }, "~N,~N,~N");
41957 Clazz_overrideMethod (c$, "setBorder", 
41958 function (border) {
41959 if (border != null) {
41960 throw  new IllegalArgumentException ("JViewport.setBorder() not supported");
41961 }}, "javax.swing.border.Border");
41962 Clazz_defineMethod (c$, "getInsets", 
41963 function () {
41964 return  new java.awt.Insets (0, 0, 0, 0);
41965 });
41966 Clazz_defineMethod (c$, "getInsets", 
41967 function (insets) {
41968 insets.left = insets.top = insets.right = insets.bottom = 0;
41969 return insets;
41970 }, "java.awt.Insets");
41971 Clazz_defineMethod (c$, "getBackingStoreGraphics", 
41972  function (g) {
41973 var bsg = this.backingStoreImage.getGraphics ();
41974 bsg.setColor (g.getColor ());
41975 bsg.setFont (g.getFont ());
41976 bsg.setClip (g.getClipBounds ());
41977 return bsg;
41978 }, "java.awt.Graphics");
41979 Clazz_defineMethod (c$, "paintViaBackingStore", 
41980  function (g) {
41981 var bsg = this.getBackingStoreGraphics (g);
41982 try {
41983 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41984 g.drawImage (this.backingStoreImage, 0, 0, this);
41985 } finally {
41986 bsg.dispose ();
41987 }
41988 }, "java.awt.Graphics");
41989 Clazz_defineMethod (c$, "paintViaBackingStore", 
41990  function (g, oClip) {
41991 var bsg = this.getBackingStoreGraphics (g);
41992 try {
41993 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41994 g.setClip (oClip);
41995 g.drawImage (this.backingStoreImage, 0, 0, this);
41996 } finally {
41997 bsg.dispose ();
41998 }
41999 }, "java.awt.Graphics,java.awt.Rectangle");
42000 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
42001 function () {
42002 return false;
42003 });
42004 Clazz_overrideMethod (c$, "isPaintingOrigin", 
42005 function () {
42006 if (this.scrollMode == 2) {
42007 return true;
42008 }return false;
42009 });
42010 Clazz_defineMethod (c$, "getViewLocation", 
42011  function () {
42012 var view = this.getView ();
42013 if (view != null) {
42014 return view.getLocation ();
42015 } else {
42016 return  new java.awt.Point (0, 0);
42017 }});
42018 Clazz_defineMethod (c$, "paint", 
42019 function (g) {
42020 var width = this.getWidth ();
42021 var height = this.getHeight ();
42022 if ((width <= 0) || (height <= 0)) {
42023 return;
42024 }if (this.inBlitPaint) {
42025 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
42026 return;
42027 }if (this.repaintAll) {
42028 this.repaintAll = false;
42029 var clipB = g.getClipBounds ();
42030 } else if (this.waitingForRepaint) {
42031 var clipB = g.getClipBounds ();
42032 if (clipB.width >= this.getWidth () && clipB.height >= this.getHeight ()) {
42033 this.waitingForRepaint = false;
42034 }}if (!this.backingStore || this.isBlitting () || this.getView () == null) {
42035 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
42036 this.lastPaintPosition = this.getViewLocation ();
42037 return;
42038 }var viewBounds = this.getView ().getBounds ();
42039 if (!this.isOpaque ()) {
42040 g.clipRect (0, 0, viewBounds.width, viewBounds.height);
42041 }if (this.backingStoreImage == null) {
42042 this.backingStoreImage = this.createImage (width, height);
42043 var clip = g.getClipBounds ();
42044 if (clip.width != width || clip.height != height) {
42045 if (!this.isOpaque ()) {
42046 g.setClip (0, 0, Math.min (viewBounds.width, width), Math.min (viewBounds.height, height));
42047 } else {
42048 g.setClip (0, 0, width, height);
42049 }this.paintViaBackingStore (g, clip);
42050 } else {
42051 this.paintViaBackingStore (g);
42052 }} else {
42053 if (!this.scrollUnderway || this.lastPaintPosition.equals (this.getViewLocation ())) {
42054 this.paintViaBackingStore (g);
42055 } else {
42056 var blitFrom =  new java.awt.Point ();
42057 var blitTo =  new java.awt.Point ();
42058 var blitSize =  new java.awt.Dimension ();
42059 var blitPaint =  new java.awt.Rectangle ();
42060 var newLocation = this.getViewLocation ();
42061 var dx = newLocation.x - this.lastPaintPosition.x;
42062 var dy = newLocation.y - this.lastPaintPosition.y;
42063 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
42064 if (!canBlit) {
42065 this.paintViaBackingStore (g);
42066 } else {
42067 var bdx = blitTo.x - blitFrom.x;
42068 var bdy = blitTo.y - blitFrom.y;
42069 var clip = g.getClipBounds ();
42070 g.setClip (0, 0, width, height);
42071 var bsg = this.getBackingStoreGraphics (g);
42072 try {
42073 bsg.copyArea (blitFrom.x, blitFrom.y, blitSize.width, blitSize.height, bdx, bdy);
42074 g.setClip (clip.x, clip.y, clip.width, clip.height);
42075 var r = viewBounds.intersection (blitPaint);
42076 bsg.setClip (r);
42077 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
42078 g.drawImage (this.backingStoreImage, 0, 0, this);
42079 } finally {
42080 bsg.dispose ();
42081 }
42082 }}}this.lastPaintPosition = this.getViewLocation ();
42083 this.scrollUnderway = false;
42084 }, "java.awt.Graphics");
42085 Clazz_defineMethod (c$, "reshape", 
42086 function (x, y, w, h) {
42087 var sizeChanged = (this.getWidth () != w) || (this.getHeight () != h);
42088 if (sizeChanged) {
42089 this.backingStoreImage = null;
42090 }Clazz_superCall (this, javax.swing.JViewport, "reshape", [x, y, w, h]);
42091 if (sizeChanged) {
42092 this.fireStateChanged ();
42093 }}, "~N,~N,~N,~N");
42094 Clazz_defineMethod (c$, "setScrollMode", 
42095 function (mode) {
42096 this.scrollMode = mode;
42097 if (mode == 2) {
42098 this.backingStore = true;
42099 } else {
42100 this.backingStore = false;
42101 }}, "~N");
42102 Clazz_defineMethod (c$, "getScrollMode", 
42103 function () {
42104 return this.scrollMode;
42105 });
42106 Clazz_defineMethod (c$, "isBackingStoreEnabled", 
42107 function () {
42108 return this.scrollMode == 2;
42109 });
42110 Clazz_defineMethod (c$, "setBackingStoreEnabled", 
42111 function (enabled) {
42112 if (enabled) {
42113 this.setScrollMode (2);
42114 } else {
42115 this.setScrollMode (1);
42116 }}, "~B");
42117 Clazz_defineMethod (c$, "isBlitting", 
42118  function () {
42119 var view = this.getView ();
42120 return (this.scrollMode == 1) && (Clazz_instanceOf (view, javax.swing.JComponent)) && (view).isOpaque ();
42121 });
42122 Clazz_defineMethod (c$, "getView", 
42123 function () {
42124 return (this.getComponentCount () > 0) ? this.getComponent (0) : null;
42125 });
42126 Clazz_defineMethod (c$, "setView", 
42127 function (view) {
42128 var n = this.getComponentCount ();
42129 for (var i = n - 1; i >= 0; i--) {
42130 this.remove (this.getComponent (i));
42131 }
42132 this.isViewSizeSet = false;
42133 if (view != null) {
42134 this.addImplSAEM (view, null, -1);
42135 this.viewListener = this.createViewListener ();
42136 view.addComponentListener (this.viewListener);
42137 }if (this.hasHadValidView) {
42138 this.fireStateChanged ();
42139 } else if (view != null) {
42140 this.hasHadValidView = true;
42141 }this.revalidate ();
42142 this.repaint ();
42143 }, "java.awt.Component");
42144 Clazz_defineMethod (c$, "getViewSize", 
42145 function () {
42146 var view = this.getView ();
42147 if (view == null) {
42148 return  new java.awt.Dimension (0, 0);
42149 } else if (this.isViewSizeSet) {
42150 return view.getSize ();
42151 } else {
42152 return view.getPreferredSize ();
42153 }});
42154 Clazz_defineMethod (c$, "setViewSize", 
42155 function (newSize) {
42156 var view = this.getView ();
42157 if (view != null) {
42158 var oldSize = view.getSize ();
42159 if (!newSize.equals (oldSize)) {
42160 this.scrollUnderway = false;
42161 view.setSize (newSize);
42162 this.isViewSizeSet = true;
42163 this.fireStateChanged ();
42164 }}}, "java.awt.Dimension");
42165 Clazz_defineMethod (c$, "getViewPosition", 
42166 function () {
42167 var view = this.getView ();
42168 if (view != null) {
42169 var p = view.getLocation ();
42170 p.x = -p.x;
42171 p.y = -p.y;
42172 return p;
42173 } else {
42174 return  new java.awt.Point (0, 0);
42175 }});
42176 Clazz_defineMethod (c$, "setViewPosition", 
42177 function (p) {
42178 var view = this.getView ();
42179 if (view == null) {
42180 return;
42181 }var oldX;
42182 var oldY;
42183 var x = p.x;
42184 var y = p.y;
42185 if (Clazz_instanceOf (view, javax.swing.JComponent)) {
42186 var c = view;
42187 oldX = c.getX ();
42188 oldY = c.getY ();
42189 } else {
42190 var r = view.getBounds ();
42191 oldX = r.x;
42192 oldY = r.y;
42193 }var newX = -x;
42194 var newY = -y;
42195 if ((oldX != newX) || (oldY != newY)) {
42196 if (!this.waitingForRepaint && this.isBlitting () && this.canUseWindowBlitter ()) {
42197 var rm = javax.swing.RepaintManager.currentManager (this);
42198 var jview = view;
42199 var dirty = rm.getDirtyRegion (jview);
42200 if (dirty == null || !dirty.contains (jview.getVisibleRect ())) {
42201 rm.beginPaint ();
42202 try {
42203 var g = javax.swing.JComponent.safelyGetGraphics (this, javax.swing.SwingUtilities.getRoot (this));
42204 this.flushViewDirtyRegion (g, dirty);
42205 view.setLocation (newX, newY);
42206 g.setClip (0, 0, this.getWidth (), Math.min (this.getHeight (), jview.getHeight ()));
42207 this.repaintAll = (this.windowBlitPaint (g) && this.needsRepaintAfterBlit ());
42208 g.dispose ();
42209 rm.markCompletelyClean (this.getParent ());
42210 rm.markCompletelyClean (this);
42211 rm.markCompletelyClean (jview);
42212 } finally {
42213 rm.endPaint ();
42214 }
42215 } else {
42216 view.setLocation (newX, newY);
42217 this.repaintAll = false;
42218 }} else {
42219 this.scrollUnderway = true;
42220 view.setLocation (newX, newY);
42221 this.repaintAll = false;
42222 }this.fireStateChanged ();
42223 }}, "java.awt.Point");
42224 Clazz_defineMethod (c$, "getViewRect", 
42225 function () {
42226 return  new java.awt.Rectangle (this.getViewPosition (), this.getExtentSize ());
42227 });
42228 Clazz_defineMethod (c$, "computeBlit", 
42229 function (dx, dy, blitFrom, blitTo, blitSize, blitPaint) {
42230 var dxAbs = Math.abs (dx);
42231 var dyAbs = Math.abs (dy);
42232 var extentSize = this.getExtentSize ();
42233 if ((dx == 0) && (dy != 0) && (dyAbs < extentSize.height)) {
42234 if (dy < 0) {
42235 blitFrom.y = -dy;
42236 blitTo.y = 0;
42237 blitPaint.y = extentSize.height + dy;
42238 } else {
42239 blitFrom.y = 0;
42240 blitTo.y = dy;
42241 blitPaint.y = 0;
42242 }blitPaint.x = blitFrom.x = blitTo.x = 0;
42243 blitSize.width = extentSize.width;
42244 blitSize.height = extentSize.height - dyAbs;
42245 blitPaint.width = extentSize.width;
42246 blitPaint.height = dyAbs;
42247 return true;
42248 } else if ((dy == 0) && (dx != 0) && (dxAbs < extentSize.width)) {
42249 if (dx < 0) {
42250 blitFrom.x = -dx;
42251 blitTo.x = 0;
42252 blitPaint.x = extentSize.width + dx;
42253 } else {
42254 blitFrom.x = 0;
42255 blitTo.x = dx;
42256 blitPaint.x = 0;
42257 }blitPaint.y = blitFrom.y = blitTo.y = 0;
42258 blitSize.width = extentSize.width - dxAbs;
42259 blitSize.height = extentSize.height;
42260 blitPaint.width = dxAbs;
42261 blitPaint.height = extentSize.height;
42262 return true;
42263 } else {
42264 return false;
42265 }}, "~N,~N,java.awt.Point,java.awt.Point,java.awt.Dimension,java.awt.Rectangle");
42266 Clazz_defineMethod (c$, "getExtentSize", 
42267 function () {
42268 return this.getSize ();
42269 });
42270 Clazz_defineMethod (c$, "toViewCoordinates", 
42271 function (size) {
42272 return  new java.awt.Dimension (size);
42273 }, "java.awt.Dimension");
42274 Clazz_defineMethod (c$, "toViewCoordinates", 
42275 function (p) {
42276 return  new java.awt.Point (p);
42277 }, "java.awt.Point");
42278 Clazz_defineMethod (c$, "setExtentSize", 
42279 function (newExtent) {
42280 var oldExtent = this.getExtentSize ();
42281 if (!newExtent.equals (oldExtent)) {
42282 this.setSize (newExtent);
42283 this.fireStateChanged ();
42284 }}, "java.awt.Dimension");
42285 Clazz_defineMethod (c$, "createViewListener", 
42286 function () {
42287 return Clazz_innerTypeInstance (javax.swing.JViewport.ViewListener, this, null);
42288 });
42289 Clazz_defineMethod (c$, "createLayoutManager", 
42290 function () {
42291 return javax.swing.ViewportLayout.SHARED_INSTANCE;
42292 });
42293 Clazz_defineMethod (c$, "addChangeListener", 
42294 function (l) {
42295 this.listenerList.add (javax.swing.event.ChangeListener, l);
42296 }, "javax.swing.event.ChangeListener");
42297 Clazz_defineMethod (c$, "removeChangeListener", 
42298 function (l) {
42299 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42300 }, "javax.swing.event.ChangeListener");
42301 Clazz_defineMethod (c$, "getChangeListeners", 
42302 function () {
42303 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42304 });
42305 Clazz_defineMethod (c$, "fireStateChanged", 
42306 function () {
42307 var listeners = this.listenerList.getListenerList ();
42308 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42309 if (listeners[i] === javax.swing.event.ChangeListener) {
42310 if (this.changeEvent == null) {
42311 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42312 }(listeners[i + 1]).stateChanged (this.changeEvent);
42313 }}
42314 });
42315 Clazz_defineMethod (c$, "repaint", 
42316 function (tm, x, y, w, h) {
42317 var parent = this.getParent ();
42318 if (parent != null) parent.repaint (tm, x + this.getX (), y + this.getY (), w, h);
42319  else Clazz_superCall (this, javax.swing.JViewport, "repaint", [tm, x, y, w, h]);
42320 }, "~N,~N,~N,~N,~N");
42321 Clazz_defineMethod (c$, "paramString", 
42322 function () {
42323 var isViewSizeSetString = (this.isViewSizeSet ? "true" : "false");
42324 var lastPaintPositionString = (this.lastPaintPosition != null ? this.lastPaintPosition.toString () : "");
42325 var scrollUnderwayString = (this.scrollUnderway ? "true" : "false");
42326 return Clazz_superCall (this, javax.swing.JViewport, "paramString", []) + ",isViewSizeSet=" + isViewSizeSetString + ",lastPaintPosition=" + lastPaintPositionString + ",scrollUnderway=" + scrollUnderwayString;
42327 });
42328 Clazz_defineMethod (c$, "firePropertyChangeObject", 
42329 function (propertyName, oldValue, newValue) {
42330 Clazz_superCall (this, javax.swing.JViewport, "firePropertyChangeObject", [propertyName, oldValue, newValue]);
42331 if (propertyName.equals (javax.swing.JViewport.EnableWindowBlit)) {
42332 if (newValue != null) {
42333 this.setScrollMode (1);
42334 } else {
42335 this.setScrollMode (0);
42336 }}}, "~S,~O,~O");
42337 Clazz_defineMethod (c$, "needsRepaintAfterBlit", 
42338  function () {
42339 var heavyParent = this.getParent ();
42340 while (heavyParent != null && heavyParent.isLightweight ()) {
42341 heavyParent = heavyParent.getParent ();
42342 }
42343 if (heavyParent != null) {
42344 }return true;
42345 });
42346 Clazz_defineMethod (c$, "flushViewDirtyRegion", 
42347  function (g, dirty) {
42348 var view = this.getView ();
42349 if (dirty != null && dirty.width > 0 && dirty.height > 0) {
42350 dirty.x += view.getX ();
42351 dirty.y += view.getY ();
42352 var clip = g.getClipBounds ();
42353 if (clip == null) {
42354 g.setClip (0, 0, this.getWidth (), this.getHeight ());
42355 }g.clipRect (dirty.x, dirty.y, dirty.width, dirty.height);
42356 clip = g.getClipBounds ();
42357 if (clip.width > 0 && clip.height > 0) {
42358 this.paintView (g);
42359 }}}, "java.awt.Graphics,java.awt.Rectangle");
42360 Clazz_defineMethod (c$, "windowBlitPaint", 
42361  function (g) {
42362 var width = this.getWidth ();
42363 var height = this.getHeight ();
42364 if ((width == 0) || (height == 0)) {
42365 return false;
42366 }var retValue;
42367 var rm = javax.swing.RepaintManager.currentManager (this);
42368 var view = this.getView ();
42369 if (this.lastPaintPosition == null || this.lastPaintPosition.equals (this.getViewLocation ())) {
42370 this.paintView (g);
42371 retValue = false;
42372 } else {
42373 var blitFrom =  new java.awt.Point ();
42374 var blitTo =  new java.awt.Point ();
42375 var blitSize =  new java.awt.Dimension ();
42376 var blitPaint =  new java.awt.Rectangle ();
42377 var newLocation = this.getViewLocation ();
42378 var dx = newLocation.x - this.lastPaintPosition.x;
42379 var dy = newLocation.y - this.lastPaintPosition.y;
42380 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
42381 if (!canBlit) {
42382 this.paintView (g);
42383 retValue = false;
42384 } else {
42385 var r = view.getBounds ().intersection (blitPaint);
42386 r.x -= view.getX ();
42387 r.y -= view.getY ();
42388 this.blitDoubleBuffered (view, g, r.x, r.y, r.width, r.height, blitFrom.x, blitFrom.y, blitTo.x, blitTo.y, blitSize.width, blitSize.height);
42389 retValue = true;
42390 }}this.lastPaintPosition = this.getViewLocation ();
42391 return retValue;
42392 }, "java.awt.Graphics");
42393 Clazz_defineMethod (c$, "blitDoubleBuffered", 
42394  function (view, g, clipX, clipY, clipW, clipH, blitFromX, blitFromY, blitToX, blitToY, blitW, blitH) {
42395 var rm = javax.swing.RepaintManager.currentManager (this);
42396 var bdx = blitToX - blitFromX;
42397 var bdy = blitToY - blitFromY;
42398 var x = view.getX ();
42399 var y = view.getY ();
42400 g.translate (x, y);
42401 g.setClip (clipX, clipY, clipW, clipH);
42402 view.paintForceDoubleBuffered (g);
42403 g.translate (-x, -y);
42404 }, "javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
42405 Clazz_defineMethod (c$, "paintView", 
42406  function (g) {
42407 var clip = g.getClipBounds ();
42408 var view = this.getView ();
42409 if (view.getWidth () >= this.getWidth ()) {
42410 var x = view.getX ();
42411 var y = view.getY ();
42412 g.translate (x, y);
42413 g.setClip (clip.x - x, clip.y - y, clip.width, clip.height);
42414 view.paintForceDoubleBuffered (g);
42415 g.translate (-x, -y);
42416 g.setClip (clip.x, clip.y, clip.width, clip.height);
42417 } else {
42418 try {
42419 this.inBlitPaint = true;
42420 this.paintForceDoubleBuffered (g);
42421 } finally {
42422 this.inBlitPaint = false;
42423 }
42424 }}, "java.awt.Graphics");
42425 Clazz_defineMethod (c$, "canUseWindowBlitter", 
42426  function () {
42427 if (!this.isShowing () || (!(Clazz_instanceOf (this.getParent (), javax.swing.JComponent)) && !(Clazz_instanceOf (this.getView (), javax.swing.JComponent)))) {
42428 return false;
42429 }if (this.isPainting ()) {
42430 return false;
42431 }var dirtyRegion = javax.swing.RepaintManager.currentManager (this).getDirtyRegion (this.getParent ());
42432 if (dirtyRegion != null && dirtyRegion.width > 0 && dirtyRegion.height > 0) {
42433 return false;
42434 }var clip =  new java.awt.Rectangle (0, 0, this.getWidth (), this.getHeight ());
42435 var oldClip =  new java.awt.Rectangle ();
42436 var tmp2 = null;
42437 var parent;
42438 var lastParent = null;
42439 var x;
42440 var y;
42441 var w;
42442 var h;
42443 for (parent = this; parent != null && javax.swing.JComponent.isLightweightComponent (parent); parent = parent.getParent ()) {
42444 x = parent.getX ();
42445 y = parent.getY ();
42446 w = parent.getWidth ();
42447 h = parent.getHeight ();
42448 oldClip.setBounds (clip);
42449 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, clip);
42450 if (!clip.equals (oldClip)) return false;
42451 if (lastParent != null && Clazz_instanceOf (parent, javax.swing.JComponent) && !(parent).isOptimizedDrawingEnabled ()) {
42452 var comps = parent.getComponents ();
42453 var index = 0;
42454 for (var i = comps.length - 1; i >= 0; i--) {
42455 if (comps[i] === lastParent) {
42456 index = i - 1;
42457 break;
42458 }}
42459 while (index >= 0) {
42460 tmp2 = comps[index].getBounds (tmp2);
42461 if (tmp2.intersects (clip)) return false;
42462 index--;
42463 }
42464 }clip.x += x;
42465 clip.y += y;
42466 lastParent = parent;
42467 }
42468 if (parent == null) {
42469 return false;
42470 }return true;
42471 });
42472 c$.$JViewport$ViewListener$ = function () {
42473 Clazz_pu$h(self.c$);
42474 c$ = Clazz_decorateAsClass (function () {
42475 Clazz_prepareCallback (this, arguments);
42476 Clazz_instantialize (this, arguments);
42477 }, javax.swing.JViewport, "ViewListener", java.awt.event.ComponentAdapter);
42478 Clazz_overrideMethod (c$, "componentResized", 
42479 function (a) {
42480 this.b$["javax.swing.JViewport"].fireStateChanged ();
42481 this.b$["javax.swing.JViewport"].revalidate ();
42482 }, "java.awt.event.ComponentEvent");
42483 c$ = Clazz_p0p ();
42484 };
42485 Clazz_defineStatics (c$,
42486 "$uiClassID", "ViewportUI",
42487 "EnableWindowBlit", "EnableWindowBlit",
42488 "BLIT_SCROLL_MODE", 1,
42489 "BACKINGSTORE_SCROLL_MODE", 2,
42490 "SIMPLE_SCROLL_MODE", 0);
42491 });
42492 Clazz_declarePackage ("java.awt.event");
42493 Clazz_load (["java.awt.event.ComponentListener"], "java.awt.event.ComponentAdapter", null, function () {
42494 c$ = Clazz_declareType (java.awt.event, "ComponentAdapter", null, java.awt.event.ComponentListener);
42495 Clazz_overrideMethod (c$, "componentResized", 
42496 function (e) {
42497 }, "java.awt.event.ComponentEvent");
42498 Clazz_overrideMethod (c$, "componentMoved", 
42499 function (e) {
42500 }, "java.awt.event.ComponentEvent");
42501 Clazz_overrideMethod (c$, "componentShown", 
42502 function (e) {
42503 }, "java.awt.event.ComponentEvent");
42504 Clazz_overrideMethod (c$, "componentHidden", 
42505 function (e) {
42506 }, "java.awt.event.ComponentEvent");
42507 });
42508 Clazz_declarePackage ("javax.swing");
42509 Clazz_load (["java.awt.Container"], "javax.swing.CellRendererPane", null, function () {
42510 c$ = Clazz_declareType (javax.swing, "CellRendererPane", java.awt.Container);
42511 Clazz_makeConstructor (c$, 
42512 function () {
42513 Clazz_superConstructor (this, javax.swing.CellRendererPane);
42514 this.setLayout (null);
42515 this.setVisible (false);
42516 });
42517 Clazz_overrideMethod (c$, "invalidate", 
42518 function () {
42519 });
42520 Clazz_overrideMethod (c$, "paint", 
42521 function (g) {
42522 }, "java.awt.Graphics");
42523 Clazz_overrideMethod (c$, "update", 
42524 function (g) {
42525 }, "java.awt.Graphics");
42526 Clazz_overrideMethod (c$, "addImpl", 
42527 function (x, constraints, index) {
42528 if (x.getParent () === this) {
42529 return null;
42530 } else {
42531 return this.addImplSAEM (x, constraints, index);
42532 }}, "java.awt.Component,~O,~N");
42533 Clazz_defineMethod (c$, "paintComponent", 
42534 function (g, c, p, x, y, w, h, shouldValidate) {
42535 if (c == null) {
42536 if (p != null) {
42537 var oldColor = g.getColor ();
42538 g.setColor (p.getBackground ());
42539 g.fillRect (x, y, w, h);
42540 g.setColor (oldColor);
42541 }return;
42542 }if (c.getParent () !== this) {
42543 this.add (c);
42544 }c.setBounds (x, y, w, h);
42545 if (shouldValidate) {
42546 c.validate ();
42547 }var cg = g.create4 (x, y, w, h);
42548 try {
42549 c.paint (cg);
42550 } finally {
42551 cg.dispose ();
42552 }
42553 c.setBounds (-w, -h, 0, 0);
42554 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N,~B");
42555 Clazz_defineMethod (c$, "paintComponent", 
42556 function (g, c, p, x, y, w, h) {
42557 this.paintComponent (g, c, p, x, y, w, h, false);
42558 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
42559 Clazz_defineMethod (c$, "paintComponent", 
42560 function (g, c, p, r) {
42561 this.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
42562 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
42563 });
42564 Clazz_declarePackage ("jssun.awt");
42565 c$ = Clazz_declareType (jssun.awt, "AWTAccessor");
42566 c$.setWindowAccessor = Clazz_defineMethod (c$, "setWindowAccessor", 
42567 function (wa) {
42568 jssun.awt.AWTAccessor.windowAccessor = wa;
42569 }, "jssun.awt.AWTAccessor.WindowAccessor");
42570 c$.getWindowAccessor = Clazz_defineMethod (c$, "getWindowAccessor", 
42571 function () {
42572 return jssun.awt.AWTAccessor.windowAccessor;
42573 });
42574 c$.setComponentAccessor = Clazz_defineMethod (c$, "setComponentAccessor", 
42575 function (ca) {
42576 jssun.awt.AWTAccessor.componentAccessor = ca;
42577 }, "jssun.awt.AWTAccessor.ComponentAccessor");
42578 c$.getComponentAccessor = Clazz_defineMethod (c$, "getComponentAccessor", 
42579 function () {
42580 return jssun.awt.AWTAccessor.componentAccessor;
42581 });
42582 c$.setAWTEventAccessor = Clazz_defineMethod (c$, "setAWTEventAccessor", 
42583 function (aea) {
42584 jssun.awt.AWTAccessor.awtEventAccessor = aea;
42585 }, "jssun.awt.AWTAccessor.AWTEventAccessor");
42586 c$.getAWTEventAccessor = Clazz_defineMethod (c$, "getAWTEventAccessor", 
42587 function () {
42588 return jssun.awt.AWTAccessor.awtEventAccessor;
42589 });
42590 c$.setEventQueueAccessor = Clazz_defineMethod (c$, "setEventQueueAccessor", 
42591 function (eqa) {
42592 jssun.awt.AWTAccessor.eventQueueAccessor = eqa;
42593 }, "jssun.awt.AWTAccessor.EventQueueAccessor");
42594 c$.getEventQueueAccessor = Clazz_defineMethod (c$, "getEventQueueAccessor", 
42595 function () {
42596 return jssun.awt.AWTAccessor.eventQueueAccessor;
42597 });
42598 Clazz_declareInterface (jssun.awt.AWTAccessor, "WindowAccessor");
42599 Clazz_declareInterface (jssun.awt.AWTAccessor, "ComponentAccessor");
42600 Clazz_declareInterface (jssun.awt.AWTAccessor, "KeyboardFocusManagerAccessor");
42601 Clazz_declareInterface (jssun.awt.AWTAccessor, "AWTEventAccessor");
42602 Clazz_declareInterface (jssun.awt.AWTAccessor, "EventQueueAccessor");
42603 Clazz_declareInterface (jssun.awt.AWTAccessor, "CursorAccessor");
42604 Clazz_declareInterface (jssun.awt.AWTAccessor, "ClientPropertyKeyAccessor");
42605 Clazz_defineStatics (c$,
42606 "componentAccessor", null,
42607 "windowAccessor", null,
42608 "awtEventAccessor", null,
42609 "eventQueueAccessor", null);
42610 Clazz_declarePackage ("javax.swing");
42611 Clazz_load (["java.awt.LayoutManager"], "javax.swing.ViewportLayout", ["java.awt.Dimension", "javax.swing.Scrollable"], function () {
42612 c$ = Clazz_declareType (javax.swing, "ViewportLayout", null, java.awt.LayoutManager);
42613 Clazz_overrideMethod (c$, "addLayoutComponent", 
42614 function (name, c) {
42615 }, "~S,java.awt.Component");
42616 Clazz_overrideMethod (c$, "removeLayoutComponent", 
42617 function (c) {
42618 }, "java.awt.Component");
42619 Clazz_overrideMethod (c$, "preferredLayoutSize", 
42620 function (parent) {
42621 var view = (parent).getView ();
42622 if (view == null) {
42623 return  new java.awt.Dimension (0, 0);
42624 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42625 return (view).getPreferredScrollableViewportSize ();
42626 } else {
42627 return view.getPreferredSize ();
42628 }}, "java.awt.Container");
42629 Clazz_overrideMethod (c$, "minimumLayoutSize", 
42630 function (parent) {
42631 return  new java.awt.Dimension (4, 4);
42632 }, "java.awt.Container");
42633 Clazz_overrideMethod (c$, "layoutContainer", 
42634 function (parent) {
42635 var vp = parent;
42636 var view = vp.getView ();
42637 var scrollableView = null;
42638 if (view == null) {
42639 return;
42640 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42641 scrollableView = view;
42642 }var insets = vp.getInsets ();
42643 var viewPrefSize = view.getPreferredSize ();
42644 var vpSize = vp.getSize ();
42645 var extentSize = vp.toViewCoordinates (vpSize);
42646 var viewSize =  new java.awt.Dimension (viewPrefSize);
42647 if (scrollableView != null) {
42648 if (scrollableView.getScrollableTracksViewportWidth ()) {
42649 viewSize.width = vpSize.width;
42650 }if (scrollableView.getScrollableTracksViewportHeight ()) {
42651 viewSize.height = vpSize.height;
42652 }}var viewPosition = vp.getViewPosition ();
42653 if (scrollableView == null || vp.getParent () == null || vp.getParent ().getComponentOrientation ().isLeftToRight ()) {
42654 if ((viewPosition.x + extentSize.width) > viewSize.width) {
42655 viewPosition.x = Math.max (0, viewSize.width - extentSize.width);
42656 }} else {
42657 if (extentSize.width > viewSize.width) {
42658 viewPosition.x = viewSize.width - extentSize.width;
42659 } else {
42660 viewPosition.x = Math.max (0, Math.min (viewSize.width - extentSize.width, viewPosition.x));
42661 }}if ((viewPosition.y + extentSize.height) > viewSize.height) {
42662 viewPosition.y = Math.max (0, viewSize.height - extentSize.height);
42663 }if (scrollableView == null) {
42664 if ((viewPosition.x == 0) && (vpSize.width > viewPrefSize.width)) {
42665 viewSize.width = vpSize.width;
42666 }if ((viewPosition.y == 0) && (vpSize.height > viewPrefSize.height)) {
42667 viewSize.height = vpSize.height;
42668 }}vp.setViewPosition (viewPosition);
42669 vp.setViewSize (viewSize);
42670 }, "java.awt.Container");
42671 c$.SHARED_INSTANCE = c$.prototype.SHARED_INSTANCE =  new javax.swing.ViewportLayout ();
42672 });
42673 Clazz_declarePackage ("javax.swing.event");
42674 Clazz_load (["java.util.EventListener"], "javax.swing.event.CaretListener", null, function () {
42675 Clazz_declareInterface (javax.swing.event, "CaretListener", java.util.EventListener);
42676 });
42677 Clazz_declarePackage ("javax.swing");
42678 Clazz_load (["javax.swing.BoundedRangeModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultBoundedRangeModel", ["java.lang.IllegalArgumentException", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
42679 c$ = Clazz_decorateAsClass (function () {
42680 this.changeEvent = null;
42681 this.listenerList = null;
42682 this.value = 0;
42683 this.extent = 0;
42684 this.min = 0;
42685 this.max = 100;
42686 this.isAdjusting = false;
42687 Clazz_instantialize (this, arguments);
42688 }, javax.swing, "DefaultBoundedRangeModel", null, javax.swing.BoundedRangeModel);
42689 Clazz_prepareFields (c$, function () {
42690 this.listenerList =  new javax.swing.event.EventListenerList ();
42691 });
42692 Clazz_makeConstructor (c$, 
42693 function () {
42694 });
42695 Clazz_makeConstructor (c$, 
42696 function (value, extent, min, max) {
42697 if ((max >= min) && (value >= min) && ((value + extent) >= value) && ((value + extent) <= max)) {
42698 this.value = value;
42699 this.extent = extent;
42700 this.min = min;
42701 this.max = max;
42702 } else {
42703 throw  new IllegalArgumentException ("invalid range properties");
42704 }}, "~N,~N,~N,~N");
42705 Clazz_overrideMethod (c$, "getValue", 
42706 function () {
42707 return this.value;
42708 });
42709 Clazz_overrideMethod (c$, "getExtent", 
42710 function () {
42711 return this.extent;
42712 });
42713 Clazz_overrideMethod (c$, "getMinimum", 
42714 function () {
42715 return this.min;
42716 });
42717 Clazz_overrideMethod (c$, "getMaximum", 
42718 function () {
42719 return this.max;
42720 });
42721 Clazz_overrideMethod (c$, "setValue", 
42722 function (n) {
42723 n = Math.min (n, 2147483647 - this.extent);
42724 var newValue = Math.max (n, this.min);
42725 if (newValue + this.extent > this.max) {
42726 newValue = this.max - this.extent;
42727 }this.setRangeProperties (newValue, this.extent, this.min, this.max, this.isAdjusting);
42728 }, "~N");
42729 Clazz_overrideMethod (c$, "setExtent", 
42730 function (n) {
42731 var newExtent = Math.max (0, n);
42732 if (this.value + newExtent > this.max) {
42733 newExtent = this.max - this.value;
42734 }this.setRangeProperties (this.value, newExtent, this.min, this.max, this.isAdjusting);
42735 }, "~N");
42736 Clazz_overrideMethod (c$, "setMinimum", 
42737 function (n) {
42738 var newMax = Math.max (n, this.max);
42739 var newValue = Math.max (n, this.value);
42740 var newExtent = Math.min (newMax - newValue, this.extent);
42741 this.setRangeProperties (newValue, newExtent, n, newMax, this.isAdjusting);
42742 }, "~N");
42743 Clazz_overrideMethod (c$, "setMaximum", 
42744 function (n) {
42745 var newMin = Math.min (n, this.min);
42746 var newExtent = Math.min (n - newMin, this.extent);
42747 var newValue = Math.min (n - newExtent, this.value);
42748 this.setRangeProperties (newValue, newExtent, newMin, n, this.isAdjusting);
42749 }, "~N");
42750 Clazz_overrideMethod (c$, "setValueIsAdjusting", 
42751 function (b) {
42752 this.setRangeProperties (this.value, this.extent, this.min, this.max, b);
42753 }, "~B");
42754 Clazz_overrideMethod (c$, "getValueIsAdjusting", 
42755 function () {
42756 return this.isAdjusting;
42757 });
42758 Clazz_overrideMethod (c$, "setRangeProperties", 
42759 function (newValue, newExtent, newMin, newMax, adjusting) {
42760 if (newMin > newMax) {
42761 newMin = newMax;
42762 }if (newValue > newMax) {
42763 newMax = newValue;
42764 }if (newValue < newMin) {
42765 newMin = newValue;
42766 }if ((newExtent + newValue) > newMax) {
42767 newExtent = newMax - newValue;
42768 }if (newExtent < 0) {
42769 newExtent = 0;
42770 }var isChange = (newValue != this.value) || (newExtent != this.extent) || (newMin != this.min) || (newMax != this.max) || (adjusting != this.isAdjusting);
42771 if (isChange) {
42772 this.value = newValue;
42773 this.extent = newExtent;
42774 this.min = newMin;
42775 this.max = newMax;
42776 this.isAdjusting = adjusting;
42777 this.fireStateChanged ();
42778 }}, "~N,~N,~N,~N,~B");
42779 Clazz_overrideMethod (c$, "addChangeListener", 
42780 function (l) {
42781 this.listenerList.add (javax.swing.event.ChangeListener, l);
42782 }, "javax.swing.event.ChangeListener");
42783 Clazz_overrideMethod (c$, "removeChangeListener", 
42784 function (l) {
42785 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42786 }, "javax.swing.event.ChangeListener");
42787 Clazz_defineMethod (c$, "getChangeListeners", 
42788 function () {
42789 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42790 });
42791 Clazz_defineMethod (c$, "fireStateChanged", 
42792 function () {
42793 var listeners = this.listenerList.getListenerList ();
42794 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42795 if (listeners[i] === javax.swing.event.ChangeListener) {
42796 if (this.changeEvent == null) {
42797 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42798 }(listeners[i + 1]).stateChanged (this.changeEvent);
42799 }}
42800 });
42801 Clazz_overrideMethod (c$, "toString", 
42802 function () {
42803 var modelString = "value=" + this.getValue () + ", " + "extent=" + this.getExtent () + ", " + "min=" + this.getMinimum () + ", " + "max=" + this.getMaximum () + ", " + "adj=" + this.getValueIsAdjusting ();
42804 return this.getClass ().getName () + "[" + modelString + "]";
42805 });
42806 Clazz_defineMethod (c$, "getListeners", 
42807 function (listenerType) {
42808 return this.listenerList.getListeners (listenerType);
42809 }, "Class");
42810 });
42811 Clazz_declarePackage ("javax.swing");
42812 Clazz_declareInterface (javax.swing, "BoundedRangeModel");
42813 Clazz_declarePackage ("javax.swing");
42814 Clazz_load (["java.awt.AWTKeyStroke"], "javax.swing.KeyStroke", null, function () {
42815 c$ = Clazz_declareType (javax.swing, "KeyStroke", java.awt.AWTKeyStroke);
42816 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42817 function (keyChar) {
42818 {
42819 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42820 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar);
42821 }}, "~S");
42822 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42823 function (keyChar, onKeyRelease) {
42824 return  new javax.swing.KeyStroke (keyChar, 0, 0, onKeyRelease);
42825 }, "~S,~B");
42826 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42827 function (keyChar, modifiers) {
42828 {
42829 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42830 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar, modifiers);
42831 }}, "Character,~N");
42832 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42833 function (keyCode, modifiers, onKeyRelease) {
42834 {
42835 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42836 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers, onKeyRelease);
42837 }}, "~N,~N,~B");
42838 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42839 function (keyCode, modifiers) {
42840 {
42841 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42842 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers);
42843 }}, "~N,~N");
42844 c$.getKeyStrokeForEvent = Clazz_defineMethod (c$, "getKeyStrokeForEvent", 
42845 function (anEvent) {
42846 {
42847 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42848 return java.awt.AWTKeyStroke.getAWTKeyStrokeForEvent (anEvent);
42849 }}, "java.awt.event.KeyEvent");
42850 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42851 function (s) {
42852 if (s == null || s.length == 0) {
42853 return null;
42854 }{
42855 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42856 try {
42857 return java.awt.AWTKeyStroke.getAWTKeyStroke (s);
42858 } catch (e) {
42859 if (Clazz_exceptionOf (e, IllegalArgumentException)) {
42860 return null;
42861 } else {
42862 throw e;
42863 }
42864 }
42865 }}, "~S");
42866 });
42867 Clazz_declarePackage ("java.awt");
42868 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 () {
42869 c$ = Clazz_decorateAsClass (function () {
42870 this.keyChar = '\uffff';
42871 this.keyCode = 0;
42872 this.modifiers = 0;
42873 this.onKeyRelease = false;
42874 Clazz_instantialize (this, arguments);
42875 }, java.awt, "AWTKeyStroke");
42876 c$.getAWTKeyStrokeClass = Clazz_defineMethod (c$, "getAWTKeyStrokeClass", 
42877  function () {
42878 var clazz = jssun.awt.AppContext.getAppContext ().get (java.awt.AWTKeyStroke);
42879 if (clazz == null) {
42880 clazz = java.awt.AWTKeyStroke;
42881 jssun.awt.AppContext.getAppContext ().put (java.awt.AWTKeyStroke, java.awt.AWTKeyStroke);
42882 }return clazz;
42883 });
42884 Clazz_makeConstructor (c$, 
42885 function () {
42886 });
42887 Clazz_makeConstructor (c$, 
42888 function (keyChar, keyCode, modifiers, onKeyRelease) {
42889 this.keyChar = keyChar;
42890 this.keyCode = keyCode;
42891 this.modifiers = modifiers;
42892 this.onKeyRelease = onKeyRelease;
42893 }, "~S,~N,~N,~B");
42894 c$.registerSubclass = Clazz_defineMethod (c$, "registerSubclass", 
42895 function (subclass) {
42896 }, "Class");
42897 c$.getCachedStroke = Clazz_defineMethod (c$, "getCachedStroke", 
42898  function (keyChar, keyCode, modifiers, onKeyRelease) {
42899 return null;
42900 }, "~S,~N,~N,~B");
42901 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42902 function (keyChar) {
42903 return java.awt.AWTKeyStroke.getCachedStroke (keyChar, 0, 0, false);
42904 }, "~S");
42905 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42906 function (keyChar, modifiers) {
42907 if (keyChar == null) {
42908 throw  new IllegalArgumentException ("keyChar cannot be null");
42909 }return java.awt.AWTKeyStroke.getCachedStroke (keyChar.charValue (), 0, modifiers, false);
42910 }, "Character,~N");
42911 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42912 function (keyCode, modifiers, onKeyRelease) {
42913 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, onKeyRelease);
42914 }, "~N,~N,~B");
42915 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42916 function (keyCode, modifiers) {
42917 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, false);
42918 }, "~N,~N");
42919 c$.getAWTKeyStrokeForEvent = Clazz_defineMethod (c$, "getAWTKeyStrokeForEvent", 
42920 function (anEvent) {
42921 var id = anEvent.getID ();
42922 switch (id) {
42923 case 401:
42924 case 402:
42925 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', anEvent.getKeyCode (), anEvent.getModifiers (), (id == 402));
42926 case 400:
42927 return java.awt.AWTKeyStroke.getCachedStroke (anEvent.getKeyChar (), 0, anEvent.getModifiers (), false);
42928 default:
42929 return null;
42930 }
42931 }, "java.awt.event.KeyEvent");
42932 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42933 function (s) {
42934 if (s == null) {
42935 throw  new IllegalArgumentException ("String cannot be null");
42936 }var errmsg = "String formatted incorrectly";
42937 var st =  new java.util.StringTokenizer (s, " ");
42938 var mask = 0;
42939 var released = false;
42940 var typed = false;
42941 var pressed = false;
42942 {
42943 if (java.awt.AWTKeyStroke.modifierKeywords == null) {
42944 var uninitializedMap =  new java.util.HashMap (8, 1.0);
42945 uninitializedMap.put ("shift", Integer.$valueOf (65));
42946 uninitializedMap.put ("control", Integer.$valueOf (130));
42947 uninitializedMap.put ("ctrl", Integer.$valueOf (130));
42948 uninitializedMap.put ("meta", Integer.$valueOf (260));
42949 uninitializedMap.put ("alt", Integer.$valueOf (520));
42950 uninitializedMap.put ("altGraph", Integer.$valueOf (8224));
42951 uninitializedMap.put ("button1", Integer.$valueOf (1024));
42952 uninitializedMap.put ("button2", Integer.$valueOf (2048));
42953 uninitializedMap.put ("button3", Integer.$valueOf (4096));
42954 java.awt.AWTKeyStroke.modifierKeywords = java.util.Collections.synchronizedMap (uninitializedMap);
42955 }}var count = st.countTokens ();
42956 for (var i = 1; i <= count; i++) {
42957 var token = st.nextToken ();
42958 if (typed) {
42959 if (token.length != 1 || i != count) {
42960 throw  new IllegalArgumentException ("String formatted incorrectly");
42961 }return java.awt.AWTKeyStroke.getCachedStroke (token.charAt (0), 0, mask, false);
42962 }if (pressed || released || i == count) {
42963 if (i != count) {
42964 throw  new IllegalArgumentException ("String formatted incorrectly");
42965 }var keyCodeName = "VK_" + token;
42966 var keyCode = java.awt.AWTKeyStroke.getVKValue (keyCodeName);
42967 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, mask, released);
42968 }if (token.equals ("released")) {
42969 released = true;
42970 continue;
42971 }if (token.equals ("pressed")) {
42972 pressed = true;
42973 continue;
42974 }if (token.equals ("typed")) {
42975 typed = true;
42976 continue;
42977 }var tokenMask = java.awt.AWTKeyStroke.modifierKeywords.get (token);
42978 if (tokenMask != null) {
42979 mask |= tokenMask.intValue ();
42980 } else {
42981 throw  new IllegalArgumentException ("String formatted incorrectly");
42982 }}
42983 throw  new IllegalArgumentException ("String formatted incorrectly");
42984 }, "~S");
42985 c$.getVKCollection = Clazz_defineMethod (c$, "getVKCollection", 
42986  function () {
42987 if (java.awt.AWTKeyStroke.vks == null) {
42988 java.awt.AWTKeyStroke.vks =  new java.awt.VKCollection ();
42989 }return java.awt.AWTKeyStroke.vks;
42990 });
42991 c$.getVKValue = Clazz_defineMethod (c$, "getVKValue", 
42992  function (key) {
42993 var vkCollect = java.awt.AWTKeyStroke.getVKCollection ();
42994 var value = vkCollect.findCode (key);
42995 if (value == null) {
42996 var keyCode = 0;
42997 var errmsg = "String formatted incorrectly";
42998 try {
42999 keyCode = java.awt.event.KeyEvent.getField (key).getInt (java.awt.event.KeyEvent);
43000 } catch (e$$) {
43001 if (Clazz_exceptionOf (e$$, NoSuchFieldException)) {
43002 var nsfe = e$$;
43003 {
43004 throw  new IllegalArgumentException ("String formatted incorrectly");
43005 }
43006 } else if (Clazz_exceptionOf (e$$, IllegalAccessException)) {
43007 var iae = e$$;
43008 {
43009 throw  new IllegalArgumentException ("String formatted incorrectly");
43010 }
43011 } else {
43012 throw e$$;
43013 }
43014 }
43015 value = Integer.$valueOf (keyCode);
43016 vkCollect.put (key, value);
43017 }return value.intValue ();
43018 }, "~S");
43019 Clazz_defineMethod (c$, "getKeyChar", 
43020 function () {
43021 return this.keyChar;
43022 });
43023 Clazz_defineMethod (c$, "getKeyCode", 
43024 function () {
43025 return this.keyCode;
43026 });
43027 Clazz_defineMethod (c$, "getModifiers", 
43028 function () {
43029 return this.modifiers;
43030 });
43031 Clazz_defineMethod (c$, "isOnKeyRelease", 
43032 function () {
43033 return this.onKeyRelease;
43034 });
43035 Clazz_defineMethod (c$, "getKeyEventType", 
43036 function () {
43037 if (this.keyCode == 0) {
43038 return 400;
43039 } else {
43040 return (this.onKeyRelease) ? 402 : 401;
43041 }});
43042 Clazz_overrideMethod (c$, "hashCode", 
43043 function () {
43044 return (((this.keyChar).charCodeAt (0)) + 1) * (2 * (this.keyCode + 1)) * (this.modifiers + 1) + (this.onKeyRelease ? 1 : 2);
43045 });
43046 Clazz_defineMethod (c$, "equals", 
43047 function (anObject) {
43048 if (Clazz_instanceOf (anObject, java.awt.AWTKeyStroke)) {
43049 var ks = anObject;
43050 return (ks.keyChar == this.keyChar && ks.keyCode == this.keyCode && ks.onKeyRelease == this.onKeyRelease && ks.modifiers == this.modifiers);
43051 }return false;
43052 }, "~O");
43053 Clazz_overrideMethod (c$, "toString", 
43054 function () {
43055 if (this.keyCode == 0) {
43056 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + "typed " + this.keyChar;
43057 } else {
43058 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + (this.onKeyRelease ? "released" : "pressed") + " " + java.awt.AWTKeyStroke.getVKText (this.keyCode);
43059 }});
43060 c$.getModifiersText = Clazz_defineMethod (c$, "getModifiersText", 
43061 function (modifiers) {
43062 var buf =  new StringBuilder ();
43063 if ((modifiers & 64) != 0) {
43064 buf.append ("shift ");
43065 }if ((modifiers & 128) != 0) {
43066 buf.append ("ctrl ");
43067 }if ((modifiers & 256) != 0) {
43068 buf.append ("meta ");
43069 }if ((modifiers & 512) != 0) {
43070 buf.append ("alt ");
43071 }if ((modifiers & 8192) != 0) {
43072 buf.append ("altGraph ");
43073 }if ((modifiers & 1024) != 0) {
43074 buf.append ("button1 ");
43075 }if ((modifiers & 2048) != 0) {
43076 buf.append ("button2 ");
43077 }if ((modifiers & 4096) != 0) {
43078 buf.append ("button3 ");
43079 }return buf.toString ();
43080 }, "~N");
43081 c$.getVKText = Clazz_defineMethod (c$, "getVKText", 
43082 function (keyCode) {
43083 return "UNKNOWN";
43084 }, "~N");
43085 Clazz_defineMethod (c$, "readResolve", 
43086 function () {
43087 {
43088 var newClass = this.getClass ();
43089 var awtKeyStrokeClass = java.awt.AWTKeyStroke.getAWTKeyStrokeClass ();
43090 if (!newClass.equals (awtKeyStrokeClass)) {
43091 java.awt.AWTKeyStroke.registerSubclass (newClass);
43092 }return java.awt.AWTKeyStroke.getCachedStroke (this.keyChar, this.keyCode, this.modifiers, this.onKeyRelease);
43093 }});
43094 Clazz_defineStatics (c$,
43095 "modifierKeywords", null,
43096 "vks", null);
43097 c$ = Clazz_decorateAsClass (function () {
43098 this.code2name = null;
43099 this.name2code = null;
43100 Clazz_instantialize (this, arguments);
43101 }, java.awt, "VKCollection");
43102 Clazz_makeConstructor (c$, 
43103 function () {
43104 this.code2name =  new java.util.HashMap ();
43105 this.name2code =  new java.util.HashMap ();
43106 });
43107 Clazz_defineMethod (c$, "put", 
43108 function (name, code) {
43109 this.code2name.put (code, name);
43110 this.name2code.put (name, code);
43111 }, "~S,Integer");
43112 Clazz_defineMethod (c$, "findCode", 
43113 function (name) {
43114 return this.name2code.get (name);
43115 }, "~S");
43116 Clazz_defineMethod (c$, "findName", 
43117 function (code) {
43118 return this.code2name.get (code);
43119 }, "Integer");
43120 });
43121 Clazz_load(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){
43122 c$=Clazz_decorateAsClass(function(){
43123 this.string=null;
43124 this.delimiters=null;
43125 this.returnDelimiters=false;
43126 this.position=0;
43127 Clazz_instantialize(this,arguments);
43128 },java.util,"StringTokenizer",null,java.util.Enumeration);
43129 Clazz_makeConstructor(c$,
43130 function(string){
43131 this.construct(string," \t\n\r\f",false);
43132 },"~S");
43133 Clazz_makeConstructor(c$,
43134 function(string,delimiters){
43135 this.construct(string,delimiters,false);
43136 },"~S,~S");
43137 Clazz_makeConstructor(c$,
43138 function(string,delimiters,returnDelimiters){
43139 if(string!=null){
43140 this.string=string;
43141 this.delimiters=delimiters;
43142 this.returnDelimiters=returnDelimiters;
43143 this.position=0;
43144 }else throw new NullPointerException();
43145 },"~S,~S,~B");
43146 Clazz_defineMethod(c$,"countTokens",
43147 function(){
43148 var count=0;
43149 var inToken=false;
43150 for(var i=this.position,length=this.string.length;i<length;i++){
43151 if(this.delimiters.indexOf(this.string.charAt(i),0)>=0){
43152 if(this.returnDelimiters)count++;
43153 if(inToken){
43154 count++;
43155 inToken=false;
43156 }}else{
43157 inToken=true;
43158 }}
43159 if(inToken)count++;
43160 return count;
43161 });
43162 Clazz_overrideMethod(c$,"hasMoreElements",
43163 function(){
43164 return this.hasMoreTokens();
43165 });
43166 Clazz_defineMethod(c$,"hasMoreTokens",
43167 function(){
43168 var length=this.string.length;
43169 if(this.position<length){
43170 if(this.returnDelimiters)return true;
43171 for(var i=this.position;i<length;i++)if(this.delimiters.indexOf(this.string.charAt(i),0)==-1)return true;
43172
43173 }return false;
43174 });
43175 Clazz_overrideMethod(c$,"nextElement",
43176 function(){
43177 return this.nextToken();
43178 });
43179 Clazz_defineMethod(c$,"nextToken",
43180 function(){
43181 var i=this.position;
43182 var length=this.string.length;
43183 if(i<length){
43184 if(this.returnDelimiters){
43185 if(this.delimiters.indexOf(this.string.charAt(this.position),0)>=0)return String.valueOf(this.string.charAt(this.position++));
43186 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);
43187
43188 return this.string.substring(i);
43189 }while(i<length&&this.delimiters.indexOf(this.string.charAt(i),0)>=0)i++;
43190
43191 this.position=i;
43192 if(i<length){
43193 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);
43194
43195 return this.string.substring(i);
43196 }}throw new java.util.NoSuchElementException();
43197 });
43198 Clazz_defineMethod(c$,"nextToken",
43199 function(delims){
43200 this.delimiters=delims;
43201 return this.nextToken();
43202 },"~S");
43203 });
43204 Clazz_declarePackage ("javax.swing");
43205 Clazz_load (["javax.swing.InputMap"], "javax.swing.ComponentInputMap", ["java.lang.IllegalArgumentException"], function () {
43206 c$ = Clazz_decorateAsClass (function () {
43207 this.component = null;
43208 Clazz_instantialize (this, arguments);
43209 }, javax.swing, "ComponentInputMap", javax.swing.InputMap);
43210 Clazz_makeConstructor (c$, 
43211 function (component) {
43212 Clazz_superConstructor (this, javax.swing.ComponentInputMap, []);
43213 this.component = component;
43214 if (component == null) {
43215 throw  new IllegalArgumentException ("ComponentInputMaps must be associated with a non-null JComponent");
43216 }}, "javax.swing.JComponent");
43217 Clazz_defineMethod (c$, "setParent", 
43218 function (map) {
43219 if (this.getParent () === map) {
43220 return;
43221 }if (map != null && (!(Clazz_instanceOf (map, javax.swing.ComponentInputMap)) || (map).getComponent () !== this.getComponent ())) {
43222 throw  new IllegalArgumentException ("ComponentInputMaps must have a parent ComponentInputMap associated with the same component");
43223 }Clazz_superCall (this, javax.swing.ComponentInputMap, "setParent", [map]);
43224 this.getComponent ().componentInputMapChanged (this);
43225 }, "javax.swing.InputMap");
43226 Clazz_defineMethod (c$, "getComponent", 
43227 function () {
43228 return this.component;
43229 });
43230 Clazz_defineMethod (c$, "put", 
43231 function (keyStroke, actionMapKey) {
43232 Clazz_superCall (this, javax.swing.ComponentInputMap, "put", [keyStroke, actionMapKey]);
43233 if (this.getComponent () != null) {
43234 this.getComponent ().componentInputMapChanged (this);
43235 }}, "javax.swing.KeyStroke,~O");
43236 Clazz_defineMethod (c$, "remove", 
43237 function (key) {
43238 Clazz_superCall (this, javax.swing.ComponentInputMap, "remove", [key]);
43239 if (this.getComponent () != null) {
43240 this.getComponent ().componentInputMapChanged (this);
43241 }}, "javax.swing.KeyStroke");
43242 Clazz_defineMethod (c$, "clear", 
43243 function () {
43244 var oldSize = this.size ();
43245 Clazz_superCall (this, javax.swing.ComponentInputMap, "clear", []);
43246 if (oldSize > 0 && this.getComponent () != null) {
43247 this.getComponent ().componentInputMapChanged (this);
43248 }});
43249 });
43250 Clazz_declarePackage ("jssun.swing");
43251 Clazz_load (["javax.swing.LayoutStyle"], "jssun.swing.DefaultLayoutStyle", ["java.lang.IllegalArgumentException", "$.NullPointerException", "javax.swing.Icon", "$.JCheckBox", "$.JLabel", "$.JRadioButton", "$.UIManager", "javax.swing.plaf.UIResource"], function () {
43252 c$ = Clazz_declareType (jssun.swing, "DefaultLayoutStyle", javax.swing.LayoutStyle);
43253 c$.getInstance = Clazz_overrideMethod (c$, "getInstance", 
43254 function () {
43255 return jssun.swing.DefaultLayoutStyle.INSTANCE;
43256 });
43257 Clazz_overrideMethod (c$, "getPreferredGap", 
43258 function (component1, component2, type, position, parent) {
43259 if (component1 == null || component2 == null || type == null) {
43260 throw  new NullPointerException ();
43261 }this.checkPosition (position);
43262 if (type === javax.swing.LayoutStyle.ComponentPlacement.INDENT && (position == 3 || position == 7)) {
43263 var indent = this.getIndent (component1, position);
43264 if (indent > 0) {
43265 return indent;
43266 }}return (type === javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) ? 12 : 6;
43267 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,java.awt.Container");
43268 Clazz_overrideMethod (c$, "getContainerGap", 
43269 function (component, position, parent) {
43270 if (component == null) {
43271 throw  new NullPointerException ();
43272 }this.checkPosition (position);
43273 return 6;
43274 }, "javax.swing.JComponent,~N,java.awt.Container");
43275 Clazz_defineMethod (c$, "isLabelAndNonlabel", 
43276 function (c1, c2, position) {
43277 if (position == 3 || position == 7) {
43278 var c1Label = (Clazz_instanceOf (c1, javax.swing.JLabel));
43279 var c2Label = (Clazz_instanceOf (c2, javax.swing.JLabel));
43280 return ((c1Label || c2Label) && (c1Label != c2Label));
43281 }return false;
43282 }, "javax.swing.JComponent,javax.swing.JComponent,~N");
43283 Clazz_defineMethod (c$, "getButtonGap", 
43284 function (source, target, position, offset) {
43285 offset -= this.getButtonGap (source, position);
43286 if (offset > 0) {
43287 offset -= this.getButtonGap (target, this.flipDirection (position));
43288 }if (offset < 0) {
43289 return 0;
43290 }return offset;
43291 }, "javax.swing.JComponent,javax.swing.JComponent,~N,~N");
43292 Clazz_defineMethod (c$, "getButtonGap", 
43293 function (source, position, offset) {
43294 offset -= this.getButtonGap (source, position);
43295 return Math.max (offset, 0);
43296 }, "javax.swing.JComponent,~N,~N");
43297 Clazz_defineMethod (c$, "getButtonGap", 
43298 function (c, position) {
43299 var classID = c.getUIClassID ();
43300 if ((classID === "CheckBoxUI" || classID === "RadioButtonUI") && !(c).isBorderPainted ()) {
43301 var border = c.getBorder ();
43302 if (Clazz_instanceOf (border, javax.swing.plaf.UIResource)) {
43303 return this.getInset (c, position);
43304 }}return 0;
43305 }, "javax.swing.JComponent,~N");
43306 Clazz_defineMethod (c$, "checkPosition", 
43307  function (position) {
43308 if (position != 1 && position != 5 && position != 7 && position != 3) {
43309 throw  new IllegalArgumentException ();
43310 }}, "~N");
43311 Clazz_defineMethod (c$, "flipDirection", 
43312 function (position) {
43313 switch (position) {
43314 case 1:
43315 return 5;
43316 case 5:
43317 return 1;
43318 case 3:
43319 return 7;
43320 case 7:
43321 return 3;
43322 }
43323 return 0;
43324 }, "~N");
43325 Clazz_defineMethod (c$, "getIndent", 
43326 function (c, position) {
43327 var classID = c.getUIClassID ();
43328 if (classID === "CheckBoxUI" || classID === "RadioButtonUI") {
43329 var button = c;
43330 var insets = c.getInsets ();
43331 var icon = this.getIcon (button);
43332 var gap = button.getIconTextGap ();
43333 if (this.isLeftAligned (button, position)) {
43334 return insets.left + icon.getIconWidth () + gap;
43335 } else if (this.isRightAligned (button, position)) {
43336 return insets.right + icon.getIconWidth () + gap;
43337 }}return 0;
43338 }, "javax.swing.JComponent,~N");
43339 Clazz_defineMethod (c$, "getIcon", 
43340  function (button) {
43341 var icon = button.getIcon ();
43342 if (icon != null) {
43343 return icon;
43344 }var key = null;
43345 if (Clazz_instanceOf (button, javax.swing.JCheckBox)) {
43346 key = "CheckBox.icon";
43347 } else if (Clazz_instanceOf (button, javax.swing.JRadioButton)) {
43348 key = "RadioButton.icon";
43349 }if (key != null) {
43350 var oIcon = javax.swing.UIManager.get (key);
43351 if (Clazz_instanceOf (oIcon, javax.swing.Icon)) {
43352 return oIcon;
43353 }}return null;
43354 }, "javax.swing.AbstractButton");
43355 Clazz_defineMethod (c$, "isLeftAligned", 
43356  function (button, position) {
43357 if (position == 7) {
43358 var ltr = button.getComponentOrientation ().isLeftToRight ();
43359 var hAlign = button.getHorizontalAlignment ();
43360 return ((ltr && (hAlign == 2 || hAlign == 10)) || (!ltr && (hAlign == 11)));
43361 }return false;
43362 }, "javax.swing.AbstractButton,~N");
43363 Clazz_defineMethod (c$, "isRightAligned", 
43364  function (button, position) {
43365 if (position == 3) {
43366 var ltr = button.getComponentOrientation ().isLeftToRight ();
43367 var hAlign = button.getHorizontalAlignment ();
43368 return ((ltr && (hAlign == 4 || hAlign == 11)) || (!ltr && (hAlign == 10)));
43369 }return false;
43370 }, "javax.swing.AbstractButton,~N");
43371 Clazz_defineMethod (c$, "getInset", 
43372  function (c, position) {
43373 return this.getInset (c.getInsets (), position);
43374 }, "javax.swing.JComponent,~N");
43375 Clazz_defineMethod (c$, "getInset", 
43376  function (insets, position) {
43377 if (insets == null) {
43378 return 0;
43379 }switch (position) {
43380 case 1:
43381 return insets.top;
43382 case 5:
43383 return insets.bottom;
43384 case 3:
43385 return insets.right;
43386 case 7:
43387 return insets.left;
43388 }
43389 return 0;
43390 }, "java.awt.Insets,~N");
43391 c$.INSTANCE = c$.prototype.INSTANCE =  new jssun.swing.DefaultLayoutStyle ();
43392 });
43393 Clazz_declarePackage ("javax.swing");
43394 Clazz_load (["java.lang.Enum"], "javax.swing.LayoutStyle", ["javax.swing.UIManager", "jssun.awt.AppContext"], function () {
43395 c$ = Clazz_declareType (javax.swing, "LayoutStyle");
43396 c$.setInstance = Clazz_defineMethod (c$, "setInstance", 
43397 function (style) {
43398 {
43399 if (style == null) {
43400 jssun.awt.AppContext.getAppContext ().remove (javax.swing.LayoutStyle);
43401 } else {
43402 jssun.awt.AppContext.getAppContext ().put (javax.swing.LayoutStyle, style);
43403 }}}, "javax.swing.LayoutStyle");
43404 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
43405 function () {
43406 var style;
43407 {
43408 style = jssun.awt.AppContext.getAppContext ().get (javax.swing.LayoutStyle);
43409 }if (style == null) {
43410 return javax.swing.UIManager.getLookAndFeel ().getLayoutStyle ();
43411 }return style;
43412 });
43413 Clazz_makeConstructor (c$, 
43414 function () {
43415 });
43416 Clazz_pu$h(self.c$);
43417 c$ = Clazz_declareType (javax.swing.LayoutStyle, "ComponentPlacement", Enum);
43418 Clazz_defineEnumConstant (c$, "RELATED", 0, []);
43419 Clazz_defineEnumConstant (c$, "UNRELATED", 1, []);
43420 Clazz_defineEnumConstant (c$, "INDENT", 2, []);
43421 c$ = Clazz_p0p ();
43422 });
43423 Clazz_declarePackage ("javax.swing");
43424 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JCheckBox", ["java.lang.Boolean", "javax.swing.UIManager"], function () {
43425 c$ = Clazz_decorateAsClass (function () {
43426 this.flat = false;
43427 Clazz_instantialize (this, arguments);
43428 }, javax.swing, "JCheckBox", javax.swing.JToggleButton);
43429 Clazz_makeConstructor (c$, 
43430 function () {
43431 this.construct (null, null, false);
43432 });
43433 Clazz_makeConstructor (c$, 
43434 function (icon) {
43435 this.construct (null, icon, false);
43436 }, "javax.swing.Icon");
43437 Clazz_makeConstructor (c$, 
43438 function (icon, selected) {
43439 this.construct (null, icon, selected);
43440 }, "javax.swing.Icon,~B");
43441 Clazz_makeConstructor (c$, 
43442 function (text) {
43443 this.construct (text, null, false);
43444 }, "~S");
43445 Clazz_makeConstructor (c$, 
43446 function (a) {
43447 this.construct ();
43448 this.setAction (a);
43449 }, "javax.swing.Action");
43450 Clazz_makeConstructor (c$, 
43451 function (text, selected) {
43452 this.construct (text, null, selected);
43453 }, "~S,~B");
43454 Clazz_makeConstructor (c$, 
43455 function (text, icon) {
43456 this.construct (text, icon, false);
43457 }, "~S,javax.swing.Icon");
43458 Clazz_makeConstructor (c$, 
43459 function (text, icon, selected) {
43460 Clazz_superConstructor (this, javax.swing.JCheckBox, [text, icon, selected]);
43461 this.setUIProperty ("borderPainted", Boolean.FALSE);
43462 this.setHorizontalAlignment (10);
43463 }, "~S,javax.swing.Icon,~B");
43464 Clazz_defineMethod (c$, "setBorderPaintedFlat", 
43465 function (b) {
43466 var oldValue = this.flat;
43467 this.flat = b;
43468 this.firePropertyChangeBool ("borderPaintedFlat", oldValue, this.flat);
43469 if (b != oldValue) {
43470 this.revalidate ();
43471 this.repaint ();
43472 }}, "~B");
43473 Clazz_defineMethod (c$, "isBorderPaintedFlat", 
43474 function () {
43475 return this.flat;
43476 });
43477 Clazz_overrideMethod (c$, "updateUI", 
43478 function () {
43479 this.setUI (javax.swing.UIManager.getUI (this));
43480 });
43481 Clazz_overrideMethod (c$, "getUIClassID", 
43482 function () {
43483 return "CheckBoxUI";
43484 });
43485 Clazz_overrideMethod (c$, "setIconFromAction", 
43486 function (a) {
43487 }, "javax.swing.Action");
43488 Clazz_defineStatics (c$,
43489 "BORDER_PAINTED_FLAT_CHANGED_PROPERTY", "borderPaintedFlat",
43490 "$$uiClassID", "CheckBoxUI");
43491 });
43492 Clazz_declarePackage ("java.awt");
43493 Clazz_declareInterface (java.awt, "ItemSelectable");
43494 Clazz_declarePackage ("java.awt.event");
43495 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ItemEvent", null, function () {
43496 c$ = Clazz_decorateAsClass (function () {
43497 this.item = null;
43498 this.stateChange = 0;
43499 Clazz_instantialize (this, arguments);
43500 }, java.awt.event, "ItemEvent", java.awt.AWTEvent);
43501 Clazz_makeConstructor (c$, 
43502 function (source, id, item, stateChange) {
43503 Clazz_superConstructor (this, java.awt.event.ItemEvent, [source, id]);
43504 this.item = item;
43505 this.stateChange = stateChange;
43506 }, "java.awt.ItemSelectable,~N,~O,~N");
43507 Clazz_defineMethod (c$, "getItemSelectable", 
43508 function () {
43509 return this.source;
43510 });
43511 Clazz_defineMethod (c$, "getItem", 
43512 function () {
43513 return this.item;
43514 });
43515 Clazz_defineMethod (c$, "getStateChange", 
43516 function () {
43517 return this.stateChange;
43518 });
43519 Clazz_overrideMethod (c$, "paramString", 
43520 function () {
43521 var typeStr;
43522 switch (this.id) {
43523 case 701:
43524 typeStr = "ITEM_STATE_CHANGED";
43525 break;
43526 default:
43527 typeStr = "unknown type";
43528 }
43529 var stateStr;
43530 switch (this.stateChange) {
43531 case 1:
43532 stateStr = "SELECTED";
43533 break;
43534 case 2:
43535 stateStr = "DESELECTED";
43536 break;
43537 default:
43538 stateStr = "unknown type";
43539 }
43540 return typeStr + ",item=" + this.item + ",stateChange=" + stateStr;
43541 });
43542 Clazz_defineStatics (c$,
43543 "ITEM_FIRST", 701,
43544 "ITEM_LAST", 701,
43545 "ITEM_STATE_CHANGED", 701,
43546 "SELECTED", 1,
43547 "DESELECTED", 2);
43548 });
43549 Clazz_declarePackage ("javax.swing");
43550 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 () {
43551 c$ = Clazz_decorateAsClass (function () {
43552 this.stateMask = 0;
43553 this.actionCommand = null;
43554 this.group = null;
43555 this.mnemonic = 0;
43556 this.changeEvent = null;
43557 this.listenerList = null;
43558 this.menuItem = false;
43559 Clazz_instantialize (this, arguments);
43560 }, javax.swing, "DefaultButtonModel", null, javax.swing.ButtonModel);
43561 Clazz_prepareFields (c$, function () {
43562 this.listenerList =  new javax.swing.event.EventListenerList ();
43563 });
43564 Clazz_makeConstructor (c$, 
43565 function () {
43566 this.stateMask = 0;
43567 this.setEnabled (true);
43568 });
43569 Clazz_overrideMethod (c$, "setActionCommand", 
43570 function (actionCommand) {
43571 this.actionCommand = actionCommand;
43572 }, "~S");
43573 Clazz_overrideMethod (c$, "getActionCommand", 
43574 function () {
43575 return this.actionCommand;
43576 });
43577 Clazz_overrideMethod (c$, "isArmed", 
43578 function () {
43579 return (this.stateMask & 1) != 0;
43580 });
43581 Clazz_overrideMethod (c$, "isSelected", 
43582 function () {
43583 return (this.stateMask & 2) != 0;
43584 });
43585 Clazz_overrideMethod (c$, "isEnabled", 
43586 function () {
43587 return (this.stateMask & 8) != 0;
43588 });
43589 Clazz_overrideMethod (c$, "isPressed", 
43590 function () {
43591 return (this.stateMask & 4) != 0;
43592 });
43593 Clazz_overrideMethod (c$, "isRollover", 
43594 function () {
43595 return (this.stateMask & 16) != 0;
43596 });
43597 Clazz_overrideMethod (c$, "setArmed", 
43598 function (b) {
43599 if (this.isMenuItem () && javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
43600 if ((this.isArmed () == b)) {
43601 return;
43602 }} else {
43603 if ((this.isArmed () == b) || !this.isEnabled ()) {
43604 return;
43605 }}if (b) {
43606 this.stateMask |= 1;
43607 } else {
43608 this.stateMask &= -2;
43609 }this.fireStateChanged ();
43610 }, "~B");
43611 Clazz_overrideMethod (c$, "setEnabled", 
43612 function (b) {
43613 if (this.isEnabled () == b) {
43614 return;
43615 }if (b) {
43616 this.stateMask |= 8;
43617 } else {
43618 this.stateMask &= -9;
43619 this.stateMask &= -2;
43620 this.stateMask &= -5;
43621 }this.fireStateChanged ();
43622 }, "~B");
43623 Clazz_overrideMethod (c$, "setSelected", 
43624 function (b) {
43625 if (this.isSelected () == b) {
43626 return;
43627 }if (b) {
43628 this.stateMask |= 2;
43629 } else {
43630 this.stateMask &= -3;
43631 }this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, b ? 1 : 2));
43632 this.fireStateChanged ();
43633 }, "~B");
43634 Clazz_overrideMethod (c$, "setPressed", 
43635 function (b) {
43636 if ((this.isPressed () == b) || !this.isEnabled ()) {
43637 return;
43638 }if (b) {
43639 this.stateMask |= 4;
43640 } else {
43641 this.stateMask &= -5;
43642 }if (!this.isPressed () && this.isArmed ()) {
43643 var modifiers = 0;
43644 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
43645 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
43646 modifiers = (currentEvent).getModifiers ();
43647 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
43648 modifiers = (currentEvent).getModifiers ();
43649 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), modifiers));
43650 }this.fireStateChanged ();
43651 }, "~B");
43652 Clazz_overrideMethod (c$, "setRollover", 
43653 function (b) {
43654 if ((this.isRollover () == b) || !this.isEnabled ()) {
43655 return;
43656 }if (b) {
43657 this.stateMask |= 16;
43658 } else {
43659 this.stateMask &= -17;
43660 }this.fireStateChanged ();
43661 }, "~B");
43662 Clazz_overrideMethod (c$, "setMnemonic", 
43663 function (key) {
43664 this.mnemonic = key;
43665 this.fireStateChanged ();
43666 }, "~N");
43667 Clazz_overrideMethod (c$, "getMnemonic", 
43668 function () {
43669 return this.mnemonic;
43670 });
43671 Clazz_overrideMethod (c$, "addChangeListener", 
43672 function (l) {
43673 this.listenerList.add (javax.swing.event.ChangeListener, l);
43674 }, "javax.swing.event.ChangeListener");
43675 Clazz_overrideMethod (c$, "removeChangeListener", 
43676 function (l) {
43677 this.listenerList.remove (javax.swing.event.ChangeListener, l);
43678 }, "javax.swing.event.ChangeListener");
43679 Clazz_defineMethod (c$, "getChangeListeners", 
43680 function () {
43681 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
43682 });
43683 Clazz_defineMethod (c$, "fireStateChanged", 
43684 function () {
43685 var listeners = this.listenerList.getListenerList ();
43686 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43687 if (listeners[i] === javax.swing.event.ChangeListener) {
43688 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
43689 (listeners[i + 1]).stateChanged (this.changeEvent);
43690 }}
43691 });
43692 Clazz_overrideMethod (c$, "addActionListener", 
43693 function (l) {
43694 this.listenerList.add (java.awt.event.ActionListener, l);
43695 }, "java.awt.event.ActionListener");
43696 Clazz_overrideMethod (c$, "removeActionListener", 
43697 function (l) {
43698 this.listenerList.remove (java.awt.event.ActionListener, l);
43699 }, "java.awt.event.ActionListener");
43700 Clazz_defineMethod (c$, "getActionListeners", 
43701 function () {
43702 return this.listenerList.getListeners (java.awt.event.ActionListener);
43703 });
43704 Clazz_defineMethod (c$, "fireActionPerformed", 
43705 function (e) {
43706 var listeners = this.listenerList.getListenerList ();
43707 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43708 if (listeners[i] === java.awt.event.ActionListener) {
43709 (listeners[i + 1]).actionPerformed (e);
43710 }}
43711 }, "java.awt.event.ActionEvent");
43712 Clazz_overrideMethod (c$, "addItemListener", 
43713 function (l) {
43714 this.listenerList.add (java.awt.event.ItemListener, l);
43715 }, "java.awt.event.ItemListener");
43716 Clazz_overrideMethod (c$, "removeItemListener", 
43717 function (l) {
43718 this.listenerList.remove (java.awt.event.ItemListener, l);
43719 }, "java.awt.event.ItemListener");
43720 Clazz_defineMethod (c$, "getItemListeners", 
43721 function () {
43722 return this.listenerList.getListeners (java.awt.event.ItemListener);
43723 });
43724 Clazz_defineMethod (c$, "fireItemStateChanged", 
43725 function (e) {
43726 var listeners = this.listenerList.getListenerList ();
43727 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43728 if (listeners[i] === java.awt.event.ItemListener) {
43729 (listeners[i + 1]).itemStateChanged (e);
43730 }}
43731 }, "java.awt.event.ItemEvent");
43732 Clazz_defineMethod (c$, "getListeners", 
43733 function (listenerType) {
43734 return this.listenerList.getListeners (listenerType);
43735 }, "Class");
43736 Clazz_overrideMethod (c$, "getSelectedObjects", 
43737 function () {
43738 return null;
43739 });
43740 Clazz_overrideMethod (c$, "setGroup", 
43741 function (group) {
43742 this.group = group;
43743 }, "javax.swing.ButtonGroup");
43744 Clazz_defineMethod (c$, "getGroup", 
43745 function () {
43746 return this.group;
43747 });
43748 Clazz_defineMethod (c$, "isMenuItem", 
43749 function () {
43750 return this.menuItem;
43751 });
43752 Clazz_defineMethod (c$, "setMenuItem", 
43753 function (menuItem) {
43754 this.menuItem = menuItem;
43755 }, "~B");
43756 Clazz_defineStatics (c$,
43757 "ARMED", 1,
43758 "SELECTED", 2,
43759 "PRESSED", 4,
43760 "ENABLED", 8,
43761 "ROLLOVER", 16);
43762 });
43763 Clazz_declarePackage ("javax.swing");
43764 Clazz_load (["java.awt.LayoutManager2"], "javax.swing.OverlayLayout", ["java.awt.AWTError", "$.Dimension", "javax.swing.SizeRequirements"], function () {
43765 c$ = Clazz_decorateAsClass (function () {
43766 this.target = null;
43767 this.xChildren = null;
43768 this.yChildren = null;
43769 this.xTotal = null;
43770 this.yTotal = null;
43771 Clazz_instantialize (this, arguments);
43772 }, javax.swing, "OverlayLayout", null, java.awt.LayoutManager2);
43773 Clazz_makeConstructor (c$, 
43774 function (target) {
43775 this.target = target;
43776 }, "java.awt.Container");
43777 Clazz_defineMethod (c$, "getTarget", 
43778 function () {
43779 return this.target;
43780 });
43781 Clazz_overrideMethod (c$, "invalidateLayout", 
43782 function (target) {
43783 this.checkContainer (target);
43784 this.xChildren = null;
43785 this.yChildren = null;
43786 this.xTotal = null;
43787 this.yTotal = null;
43788 }, "java.awt.Container");
43789 Clazz_defineMethod (c$, "addLayoutComponent", 
43790 function (name, comp) {
43791 this.invalidateLayout (comp.getParent ());
43792 }, "~S,java.awt.Component");
43793 Clazz_overrideMethod (c$, "removeLayoutComponent", 
43794 function (comp) {
43795 this.invalidateLayout (comp.getParent ());
43796 }, "java.awt.Component");
43797 Clazz_defineMethod (c$, "addLayoutComponent", 
43798 function (comp, constraints) {
43799 this.invalidateLayout (comp.getParent ());
43800 }, "java.awt.Component,~O");
43801 Clazz_overrideMethod (c$, "preferredLayoutSize", 
43802 function (target) {
43803 this.checkContainer (target);
43804 this.checkRequests ();
43805 var size =  new java.awt.Dimension (this.xTotal.preferred, this.yTotal.preferred);
43806 var insets = target.getInsets ();
43807 size.width += insets.left + insets.right;
43808 size.height += insets.top + insets.bottom;
43809 return size;
43810 }, "java.awt.Container");
43811 Clazz_overrideMethod (c$, "minimumLayoutSize", 
43812 function (target) {
43813 this.checkContainer (target);
43814 this.checkRequests ();
43815 var size =  new java.awt.Dimension (this.xTotal.minimum, this.yTotal.minimum);
43816 var insets = target.getInsets ();
43817 size.width += insets.left + insets.right;
43818 size.height += insets.top + insets.bottom;
43819 return size;
43820 }, "java.awt.Container");
43821 Clazz_overrideMethod (c$, "maximumLayoutSize", 
43822 function (target) {
43823 this.checkContainer (target);
43824 this.checkRequests ();
43825 var size =  new java.awt.Dimension (this.xTotal.maximum, this.yTotal.maximum);
43826 var insets = target.getInsets ();
43827 size.width += insets.left + insets.right;
43828 size.height += insets.top + insets.bottom;
43829 return size;
43830 }, "java.awt.Container");
43831 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
43832 function (target) {
43833 this.checkContainer (target);
43834 this.checkRequests ();
43835 return this.xTotal.alignment;
43836 }, "java.awt.Container");
43837 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
43838 function (target) {
43839 this.checkContainer (target);
43840 this.checkRequests ();
43841 return this.yTotal.alignment;
43842 }, "java.awt.Container");
43843 Clazz_overrideMethod (c$, "layoutContainer", 
43844 function (target) {
43845 this.checkContainer (target);
43846 this.checkRequests ();
43847 var nChildren = target.getComponentCount ();
43848 var xOffsets =  Clazz_newIntArray (nChildren, 0);
43849 var xSpans =  Clazz_newIntArray (nChildren, 0);
43850 var yOffsets =  Clazz_newIntArray (nChildren, 0);
43851 var ySpans =  Clazz_newIntArray (nChildren, 0);
43852 var alloc = target.getSize ();
43853 var $in = target.getInsets ();
43854 alloc.width -= $in.left + $in.right;
43855 alloc.height -= $in.top + $in.bottom;
43856 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.width, this.xTotal, this.xChildren, xOffsets, xSpans);
43857 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.height, this.yTotal, this.yChildren, yOffsets, ySpans);
43858 for (var i = 0; i < nChildren; i++) {
43859 var c = target.getComponent (i);
43860 c.setBounds ($in.left + xOffsets[i], $in.top + yOffsets[i], xSpans[i], ySpans[i]);
43861 }
43862 }, "java.awt.Container");
43863 Clazz_defineMethod (c$, "checkContainer", 
43864 function (target) {
43865 if (this.target !== target) {
43866 throw  new java.awt.AWTError ("OverlayLayout can't be shared");
43867 }}, "java.awt.Container");
43868 Clazz_defineMethod (c$, "checkRequests", 
43869 function () {
43870 if (this.xChildren == null || this.yChildren == null) {
43871 var n = this.target.getComponentCount ();
43872 this.xChildren =  new Array (n);
43873 this.yChildren =  new Array (n);
43874 for (var i = 0; i < n; i++) {
43875 var c = this.target.getComponent (i);
43876 var min = c.getMinimumSize ();
43877 var typ = c.getPreferredSize ();
43878 var max = c.getMaximumSize ();
43879 this.xChildren[i] =  new javax.swing.SizeRequirements (min.width, typ.width, max.width, c.getAlignmentX ());
43880 this.yChildren[i] =  new javax.swing.SizeRequirements (min.height, typ.height, max.height, c.getAlignmentY ());
43881 }
43882 this.xTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.xChildren);
43883 this.yTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.yChildren);
43884 }});
43885 });
43886 Clazz_declarePackage ("javax.swing");
43887 c$ = Clazz_decorateAsClass (function () {
43888 this.minimum = 0;
43889 this.preferred = 0;
43890 this.maximum = 0;
43891 this.alignment = 0;
43892 Clazz_instantialize (this, arguments);
43893 }, javax.swing, "SizeRequirements");
43894 Clazz_makeConstructor (c$, 
43895 function () {
43896 this.minimum = 0;
43897 this.preferred = 0;
43898 this.maximum = 0;
43899 this.alignment = 0.5;
43900 });
43901 Clazz_makeConstructor (c$, 
43902 function (min, pref, max, a) {
43903 this.minimum = min;
43904 this.preferred = pref;
43905 this.maximum = max;
43906 this.alignment = a > 1.0 ? 1.0 : a < 0.0 ? 0.0 : a;
43907 }, "~N,~N,~N,~N");
43908 Clazz_overrideMethod (c$, "toString", 
43909 function () {
43910 return "[" + this.minimum + "," + this.preferred + "," + this.maximum + "]@" + this.alignment;
43911 });
43912 c$.getTiledSizeRequirements = Clazz_defineMethod (c$, "getTiledSizeRequirements", 
43913 function (children) {
43914 var total =  new javax.swing.SizeRequirements ();
43915 for (var i = 0; i < children.length; i++) {
43916 var req = children[i];
43917 total.minimum = Math.min (total.minimum + req.minimum, 2147483647);
43918 total.preferred = Math.min (total.preferred + req.preferred, 2147483647);
43919 total.maximum = Math.min (total.maximum + req.maximum, 2147483647);
43920 }
43921 return total;
43922 }, "~A");
43923 c$.getAlignedSizeRequirements = Clazz_defineMethod (c$, "getAlignedSizeRequirements", 
43924 function (children) {
43925 var totalAscent =  new javax.swing.SizeRequirements ();
43926 var totalDescent =  new javax.swing.SizeRequirements ();
43927 for (var i = 0; i < children.length; i++) {
43928 var req = children[i];
43929 var ascent = Clazz_floatToInt (req.alignment * req.minimum);
43930 var descent = req.minimum - ascent;
43931 totalAscent.minimum = Math.max (ascent, totalAscent.minimum);
43932 totalDescent.minimum = Math.max (descent, totalDescent.minimum);
43933 ascent = Clazz_floatToInt (req.alignment * req.preferred);
43934 descent = req.preferred - ascent;
43935 totalAscent.preferred = Math.max (ascent, totalAscent.preferred);
43936 totalDescent.preferred = Math.max (descent, totalDescent.preferred);
43937 ascent = Clazz_floatToInt (req.alignment * req.maximum);
43938 descent = req.maximum - ascent;
43939 totalAscent.maximum = Math.max (ascent, totalAscent.maximum);
43940 totalDescent.maximum = Math.max (descent, totalDescent.maximum);
43941 }
43942 var min = Math.min (totalAscent.minimum + totalDescent.minimum, 2147483647);
43943 var pref = Math.min (totalAscent.preferred + totalDescent.preferred, 2147483647);
43944 var max = Math.min (totalAscent.maximum + totalDescent.maximum, 2147483647);
43945 var alignment = 0.0;
43946 if (min > 0) {
43947 alignment = totalAscent.minimum / min;
43948 alignment = alignment > 1.0 ? 1.0 : alignment < 0.0 ? 0.0 : alignment;
43949 }return  new javax.swing.SizeRequirements (min, pref, max, alignment);
43950 }, "~A");
43951 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43952 function (allocated, total, children, offsets, spans) {
43953 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, true);
43954 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
43955 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43956 function (allocated, total, children, offsets, spans, forward) {
43957 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, forward);
43958 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43959 c$.calcTiled = Clazz_defineMethod (c$, "calcTiled", 
43960 function (allocated, total, children, offsets, spans, forward) {
43961 var min = 0;
43962 var pref = 0;
43963 var max = 0;
43964 for (var i = 0; i < children.length; i++) {
43965 min += children[i].minimum;
43966 pref += children[i].preferred;
43967 max += children[i].maximum;
43968 }
43969 if (allocated >= pref) {
43970 javax.swing.SizeRequirements.expandedTile (allocated, min, pref, max, children, offsets, spans, forward);
43971 } else {
43972 javax.swing.SizeRequirements.compressedTile (allocated, min, pref, max, children, offsets, spans, forward);
43973 }}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43974 c$.compressedTile = Clazz_defineMethod (c$, "compressedTile", 
43975  function (allocated, min, pref, max, request, offsets, spans, forward) {
43976 var totalPlay = Math.min (pref - allocated, pref - min);
43977 var factor = (pref - min == 0) ? 0.0 : totalPlay / (pref - min);
43978 var totalOffset;
43979 if (forward) {
43980 totalOffset = 0;
43981 for (var i = 0; i < spans.length; i++) {
43982 offsets[i] = totalOffset;
43983 var req = request[i];
43984 var play = factor * (req.preferred - req.minimum);
43985 spans[i] = Clazz_floatToInt (req.preferred - play);
43986 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
43987 }
43988 } else {
43989 totalOffset = allocated;
43990 for (var i = 0; i < spans.length; i++) {
43991 var req = request[i];
43992 var play = factor * (req.preferred - req.minimum);
43993 spans[i] = Clazz_floatToInt (req.preferred - play);
43994 offsets[i] = totalOffset - spans[i];
43995 totalOffset = Math.max (totalOffset - spans[i], 0);
43996 }
43997 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
43998 c$.expandedTile = Clazz_defineMethod (c$, "expandedTile", 
43999  function (allocated, min, pref, max, request, offsets, spans, forward) {
44000 var totalPlay = Math.min (allocated - pref, max - pref);
44001 var factor = (max - pref == 0) ? 0.0 : totalPlay / (max - pref);
44002 var totalOffset;
44003 if (forward) {
44004 totalOffset = 0;
44005 for (var i = 0; i < spans.length; i++) {
44006 offsets[i] = totalOffset;
44007 var req = request[i];
44008 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
44009 spans[i] = Math.min (req.preferred + play, 2147483647);
44010 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
44011 }
44012 } else {
44013 totalOffset = allocated;
44014 for (var i = 0; i < spans.length; i++) {
44015 var req = request[i];
44016 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
44017 spans[i] = Math.min (req.preferred + play, 2147483647);
44018 offsets[i] = totalOffset - spans[i];
44019 totalOffset = Math.max (totalOffset - spans[i], 0);
44020 }
44021 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
44022 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
44023 function (allocated, total, children, offsets, spans) {
44024 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, true);
44025 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
44026 c$.calcAligned = Clazz_defineMethod (c$, "calcAligned", 
44027 function (allocated, total, children, offsets, spans, normal) {
44028 var totalAlignment = normal ? total.alignment : 1.0 - total.alignment;
44029 var totalAscent = Clazz_floatToInt (allocated * totalAlignment);
44030 var totalDescent = allocated - totalAscent;
44031 for (var i = 0; i < children.length; i++) {
44032 var req = children[i];
44033 var alignment = normal ? req.alignment : 1.0 - req.alignment;
44034 var maxAscent = Clazz_floatToInt (req.maximum * alignment);
44035 var maxDescent = req.maximum - maxAscent;
44036 var ascent = Math.min (totalAscent, maxAscent);
44037 var descent = Math.min (totalDescent, maxDescent);
44038 offsets[i] = totalAscent - ascent;
44039 spans[i] = Math.min (ascent + descent, 2147483647);
44040 }
44041 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
44042 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
44043 function (allocated, total, children, offsets, spans, normal) {
44044 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, normal);
44045 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
44046 c$.adjustSizes = Clazz_defineMethod (c$, "adjustSizes", 
44047 function (delta, children) {
44048 return  Clazz_newIntArray (0, 0);
44049 }, "~N,~A");
44050 Clazz_declarePackage ("javax.swing");
44051 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JLabel", ["java.lang.IllegalArgumentException", "javax.swing.SwingUtilities", "$.UIManager"], function () {
44052 c$ = Clazz_decorateAsClass (function () {
44053 this.mnemonic = '\0';
44054 this.mnemonicIndex = -1;
44055 this.text = "";
44056 this.defaultIcon = null;
44057 this.disabledIcon = null;
44058 this.disabledIconSet = false;
44059 this.verticalAlignment = 0;
44060 this.horizontalAlignment = 10;
44061 this.verticalTextPosition = 0;
44062 this.horizontalTextPosition = 11;
44063 this.iconTextGap = 4;
44064 this.labelFor = null;
44065 Clazz_instantialize (this, arguments);
44066 }, javax.swing, "JLabel", javax.swing.JComponent, javax.swing.SwingConstants);
44067 Clazz_makeConstructor (c$, 
44068 function (text, icon, horizontalAlignment) {
44069 Clazz_superConstructor (this, javax.swing.JLabel, []);
44070 this.setText (text);
44071 this.setIcon (icon);
44072 this.setHorizontalAlignment (horizontalAlignment);
44073 this.updateUI ();
44074 this.setAlignmentX (0.0);
44075 }, "~S,javax.swing.Icon,~N");
44076 Clazz_makeConstructor (c$, 
44077 function (text, horizontalAlignment) {
44078 this.construct (text, null, horizontalAlignment);
44079 }, "~S,~N");
44080 Clazz_makeConstructor (c$, 
44081 function (text) {
44082 this.construct (text, null, 10);
44083 }, "~S");
44084 Clazz_makeConstructor (c$, 
44085 function (image, horizontalAlignment) {
44086 this.construct (null, image, horizontalAlignment);
44087 }, "javax.swing.Icon,~N");
44088 Clazz_makeConstructor (c$, 
44089 function (image) {
44090 this.construct (null, image, 0);
44091 }, "javax.swing.Icon");
44092 Clazz_makeConstructor (c$, 
44093 function () {
44094 this.construct ("", null, 10);
44095 });
44096 Clazz_overrideMethod (c$, "getUI", 
44097 function () {
44098 return this.ui;
44099 });
44100 Clazz_defineMethod (c$, "setUI", 
44101 function (ui) {
44102 Clazz_superCall (this, javax.swing.JLabel, "setUI", [ui]);
44103 if (!this.disabledIconSet && this.disabledIcon != null) {
44104 this.setDisabledIcon (null);
44105 }}, "javax.swing.plaf.LabelUI");
44106 Clazz_overrideMethod (c$, "updateUI", 
44107 function () {
44108 this.setUI (javax.swing.UIManager.getUI (this));
44109 });
44110 Clazz_overrideMethod (c$, "getUIClassID", 
44111 function () {
44112 return "LabelUI";
44113 });
44114 Clazz_defineMethod (c$, "getText", 
44115 function () {
44116 return this.text;
44117 });
44118 Clazz_defineMethod (c$, "setText", 
44119 function (text) {
44120 var oldValue = this.text;
44121 this.text = text;
44122 this.firePropertyChangeObject ("text", oldValue, text);
44123 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, this.getDisplayedMnemonic ()));
44124 if (text == null || oldValue == null || !text.equals (oldValue)) {
44125 this.revalidate ();
44126 this.repaint ();
44127 }}, "~S");
44128 Clazz_defineMethod (c$, "getIcon", 
44129 function () {
44130 return this.defaultIcon;
44131 });
44132 Clazz_defineMethod (c$, "setIcon", 
44133 function (icon) {
44134 var oldValue = this.defaultIcon;
44135 this.defaultIcon = icon;
44136 if ((this.defaultIcon !== oldValue) && !this.disabledIconSet) {
44137 this.disabledIcon = null;
44138 }this.firePropertyChangeObject ("icon", oldValue, this.defaultIcon);
44139 if (this.defaultIcon !== oldValue) {
44140 if ((this.defaultIcon == null) || (oldValue == null) || (this.defaultIcon.getIconWidth () != oldValue.getIconWidth ()) || (this.defaultIcon.getIconHeight () != oldValue.getIconHeight ())) {
44141 this.revalidate ();
44142 }this.repaint ();
44143 }}, "javax.swing.Icon");
44144 Clazz_defineMethod (c$, "getDisabledIcon", 
44145 function () {
44146 if (!this.disabledIconSet && this.disabledIcon == null && this.defaultIcon != null) {
44147 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.defaultIcon);
44148 if (this.disabledIcon != null) {
44149 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
44150 }}return this.disabledIcon;
44151 });
44152 Clazz_defineMethod (c$, "setDisabledIcon", 
44153 function (disabledIcon) {
44154 var oldValue = this.disabledIcon;
44155 this.disabledIcon = disabledIcon;
44156 this.disabledIconSet = (disabledIcon != null);
44157 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
44158 if (disabledIcon !== oldValue) {
44159 if (disabledIcon == null || oldValue == null || disabledIcon.getIconWidth () != oldValue.getIconWidth () || disabledIcon.getIconHeight () != oldValue.getIconHeight ()) {
44160 this.revalidate ();
44161 }if (!this.isEnabled ()) {
44162 this.repaint ();
44163 }}}, "javax.swing.Icon");
44164 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44165 function (key) {
44166 var oldKey = this.mnemonic;
44167 this.mnemonic = key;
44168 this.firePropertyChangeInt ("displayedMnemonic", oldKey, this.mnemonic);
44169 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (this.getText (), this.mnemonic));
44170 if (key != oldKey) {
44171 this.revalidate ();
44172 this.repaint ();
44173 }}, "~N");
44174 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44175 function (aChar) {
44176 var vk = (aChar).charCodeAt (0);
44177 if (vk >= 97 && vk <= 122) vk -= (32);
44178 this.setDisplayedMnemonic (vk);
44179 }, "~S");
44180 Clazz_defineMethod (c$, "getDisplayedMnemonic", 
44181 function () {
44182 return this.mnemonic;
44183 });
44184 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
44185 function (index) {
44186 var oldValue = this.mnemonicIndex;
44187 if (index == -1) {
44188 this.mnemonicIndex = -1;
44189 } else {
44190 var text = this.getText ();
44191 var textLength = (text == null) ? 0 : text.length;
44192 if (index < -1 || index >= textLength) {
44193 throw  new IllegalArgumentException ("index == " + index);
44194 }}this.mnemonicIndex = index;
44195 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
44196 if (index != oldValue) {
44197 this.revalidate ();
44198 this.repaint ();
44199 }}, "~N");
44200 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
44201 function () {
44202 return this.mnemonicIndex;
44203 });
44204 Clazz_defineMethod (c$, "checkHorizontalKey", 
44205 function (key, message) {
44206 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
44207 return key;
44208 } else {
44209 throw  new IllegalArgumentException (message);
44210 }}, "~N,~S");
44211 Clazz_defineMethod (c$, "checkVerticalKey", 
44212 function (key, message) {
44213 if ((key == 1) || (key == 0) || (key == 3)) {
44214 return key;
44215 } else {
44216 throw  new IllegalArgumentException (message);
44217 }}, "~N,~S");
44218 Clazz_defineMethod (c$, "getIconTextGap", 
44219 function () {
44220 return this.iconTextGap;
44221 });
44222 Clazz_defineMethod (c$, "setIconTextGap", 
44223 function (iconTextGap) {
44224 var oldValue = this.iconTextGap;
44225 this.iconTextGap = iconTextGap;
44226 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
44227 if (iconTextGap != oldValue) {
44228 this.revalidate ();
44229 this.repaint ();
44230 }}, "~N");
44231 Clazz_defineMethod (c$, "getVerticalAlignment", 
44232 function () {
44233 return this.verticalAlignment;
44234 });
44235 Clazz_defineMethod (c$, "setVerticalAlignment", 
44236 function (alignment) {
44237 if (alignment == this.verticalAlignment) return;
44238 var oldValue = this.verticalAlignment;
44239 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
44240 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
44241 this.repaint ();
44242 }, "~N");
44243 Clazz_defineMethod (c$, "getHorizontalAlignment", 
44244 function () {
44245 return this.horizontalAlignment;
44246 });
44247 Clazz_defineMethod (c$, "setHorizontalAlignment", 
44248 function (alignment) {
44249 if (alignment == this.horizontalAlignment) return;
44250 var oldValue = this.horizontalAlignment;
44251 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
44252 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
44253 this.repaint ();
44254 }, "~N");
44255 Clazz_defineMethod (c$, "getVerticalTextPosition", 
44256 function () {
44257 return this.verticalTextPosition;
44258 });
44259 Clazz_defineMethod (c$, "setVerticalTextPosition", 
44260 function (textPosition) {
44261 if (textPosition == this.verticalTextPosition) return;
44262 var old = this.verticalTextPosition;
44263 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
44264 this.firePropertyChangeInt ("verticalTextPosition", old, this.verticalTextPosition);
44265 this.revalidate ();
44266 this.repaint ();
44267 }, "~N");
44268 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
44269 function () {
44270 return this.horizontalTextPosition;
44271 });
44272 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
44273 function (textPosition) {
44274 var old = this.horizontalTextPosition;
44275 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
44276 this.firePropertyChangeInt ("horizontalTextPosition", old, this.horizontalTextPosition);
44277 this.revalidate ();
44278 this.repaint ();
44279 }, "~N");
44280 Clazz_defineMethod (c$, "imageUpdate", 
44281 function (img, infoflags, x, y, w, h) {
44282 if (!this.isShowing () || !javax.swing.SwingUtilities.doesIconReferenceImage (this.getIcon (), img) && !javax.swing.SwingUtilities.doesIconReferenceImage (this.disabledIcon, img)) {
44283 return false;
44284 }return Clazz_superCall (this, javax.swing.JLabel, "imageUpdate", [img, infoflags, x, y, w, h]);
44285 }, "java.awt.Image,~N,~N,~N,~N,~N");
44286 Clazz_defineMethod (c$, "paramString", 
44287 function () {
44288 var textString = (this.text != null ? this.text : "");
44289 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
44290 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
44291 var labelForString = (this.labelFor != null ? this.labelFor.toString () : "");
44292 var verticalAlignmentString;
44293 if (this.verticalAlignment == 1) {
44294 verticalAlignmentString = "TOP";
44295 } else if (this.verticalAlignment == 0) {
44296 verticalAlignmentString = "CENTER";
44297 } else if (this.verticalAlignment == 3) {
44298 verticalAlignmentString = "BOTTOM";
44299 } else verticalAlignmentString = "";
44300 var horizontalAlignmentString;
44301 if (this.horizontalAlignment == 2) {
44302 horizontalAlignmentString = "LEFT";
44303 } else if (this.horizontalAlignment == 0) {
44304 horizontalAlignmentString = "CENTER";
44305 } else if (this.horizontalAlignment == 4) {
44306 horizontalAlignmentString = "RIGHT";
44307 } else if (this.horizontalAlignment == 10) {
44308 horizontalAlignmentString = "LEADING";
44309 } else if (this.horizontalAlignment == 11) {
44310 horizontalAlignmentString = "TRAILING";
44311 } else horizontalAlignmentString = "";
44312 var verticalTextPositionString;
44313 if (this.verticalTextPosition == 1) {
44314 verticalTextPositionString = "TOP";
44315 } else if (this.verticalTextPosition == 0) {
44316 verticalTextPositionString = "CENTER";
44317 } else if (this.verticalTextPosition == 3) {
44318 verticalTextPositionString = "BOTTOM";
44319 } else verticalTextPositionString = "";
44320 var horizontalTextPositionString;
44321 if (this.horizontalTextPosition == 2) {
44322 horizontalTextPositionString = "LEFT";
44323 } else if (this.horizontalTextPosition == 0) {
44324 horizontalTextPositionString = "CENTER";
44325 } else if (this.horizontalTextPosition == 4) {
44326 horizontalTextPositionString = "RIGHT";
44327 } else if (this.horizontalTextPosition == 10) {
44328 horizontalTextPositionString = "LEADING";
44329 } else if (this.horizontalTextPosition == 11) {
44330 horizontalTextPositionString = "TRAILING";
44331 } else horizontalTextPositionString = "";
44332 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;
44333 });
44334 Clazz_defineMethod (c$, "getLabelFor", 
44335 function () {
44336 return this.labelFor;
44337 });
44338 Clazz_defineMethod (c$, "setLabelFor", 
44339 function (c) {
44340 var oldC = this.labelFor;
44341 this.labelFor = c;
44342 this.firePropertyChangeObject ("labelFor", oldC, c);
44343 if (Clazz_instanceOf (oldC, javax.swing.JComponent)) {
44344 (oldC).putClientProperty ("labeledBy", null);
44345 }if (Clazz_instanceOf (c, javax.swing.JComponent)) {
44346 (c).putClientProperty ("labeledBy", this);
44347 }}, "java.awt.Component");
44348 Clazz_defineStatics (c$,
44349 "$uiClassID", "LabelUI",
44350 "LABELED_BY_PROPERTY", "labeledBy");
44351 });
44352 Clazz_declarePackage ("javax.swing.border");
44353 Clazz_declareInterface (javax.swing.border, "Border");
44354 Clazz_declarePackage ("javax.swing");
44355 Clazz_declareInterface (javax.swing, "RootPaneContainer");
44356 Clazz_declarePackage ("javax.swing.event");
44357 Clazz_load (["java.awt.event.MouseEvent"], "javax.swing.event.MenuDragMouseEvent", null, function () {
44358 c$ = Clazz_decorateAsClass (function () {
44359 this.path = null;
44360 this.manager = null;
44361 Clazz_instantialize (this, arguments);
44362 }, javax.swing.event, "MenuDragMouseEvent", java.awt.event.MouseEvent);
44363 Clazz_makeConstructor (c$, 
44364 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, p, m) {
44365 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, clickCount, popupTrigger]);
44366 this.path = p;
44367 this.manager = m;
44368 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44369 Clazz_makeConstructor (c$, 
44370 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, p, m) {
44371 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
44372 this.path = p;
44373 this.manager = m;
44374 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44375 Clazz_defineMethod (c$, "getPath", 
44376 function () {
44377 return this.path;
44378 });
44379 Clazz_defineMethod (c$, "getMenuSelectionManager", 
44380 function () {
44381 return this.manager;
44382 });
44383 });
44384 Clazz_declarePackage ("jssun.swing");
44385 Clazz_load (["javax.swing.Action"], "jssun.swing.UIAction", null, function () {
44386 c$ = Clazz_decorateAsClass (function () {
44387 this.name = null;
44388 Clazz_instantialize (this, arguments);
44389 }, jssun.swing, "UIAction", null, javax.swing.Action);
44390 Clazz_makeConstructor (c$, 
44391 function (name) {
44392 this.name = name;
44393 }, "~S");
44394 Clazz_defineMethod (c$, "getName", 
44395 function () {
44396 return this.name;
44397 });
44398 Clazz_overrideMethod (c$, "getValue", 
44399 function (key) {
44400 if (key === "Name") {
44401 return this.name;
44402 }return null;
44403 }, "~S");
44404 Clazz_overrideMethod (c$, "putValue", 
44405 function (key, value) {
44406 }, "~S,~O");
44407 Clazz_overrideMethod (c$, "setEnabled", 
44408 function (b) {
44409 }, "~B");
44410 Clazz_defineMethod (c$, "isEnabled", 
44411 function () {
44412 return this.isEnabled (null);
44413 });
44414 Clazz_defineMethod (c$, "isEnabled", 
44415 function (sender) {
44416 return true;
44417 }, "~O");
44418 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
44419 function (listener) {
44420 }, "java.beans.PropertyChangeListener");
44421 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
44422 function (listener) {
44423 }, "java.beans.PropertyChangeListener");
44424 });
44425 Clazz_declarePackage ("jssun.awt");
44426 Clazz_declareInterface (jssun.awt, "RequestFocusController");
44427 Clazz_declarePackage ("javax.swing");
44428 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 () {
44429 c$ = Clazz_decorateAsClass (function () {
44430 this.firstInvisibleAncestor = null;
44431 this.listenerList = null;
44432 this.root = null;
44433 Clazz_instantialize (this, arguments);
44434 }, javax.swing, "AncestorNotifier", null, [java.awt.event.ComponentListener, java.beans.PropertyChangeListener]);
44435 Clazz_prepareFields (c$, function () {
44436 this.listenerList =  new javax.swing.event.EventListenerList ();
44437 });
44438 Clazz_makeConstructor (c$, 
44439 function (root) {
44440 this.root = root;
44441 this.addListeners (root, true);
44442 }, "javax.swing.JComponent");
44443 Clazz_defineMethod (c$, "addAncestorListener", 
44444 function (l) {
44445 this.listenerList.add (javax.swing.event.AncestorListener, l);
44446 }, "javax.swing.event.AncestorListener");
44447 Clazz_defineMethod (c$, "removeAncestorListener", 
44448 function (l) {
44449 this.listenerList.remove (javax.swing.event.AncestorListener, l);
44450 }, "javax.swing.event.AncestorListener");
44451 Clazz_defineMethod (c$, "getAncestorListeners", 
44452 function () {
44453 return this.listenerList.getListeners (javax.swing.event.AncestorListener);
44454 });
44455 Clazz_defineMethod (c$, "fireAncestorAdded", 
44456 function (source, id, ancestor, ancestorParent) {
44457 var listeners = this.listenerList.getListenerList ();
44458 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44459 if (listeners[i] === javax.swing.event.AncestorListener) {
44460 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44461 (listeners[i + 1]).ancestorAdded (ancestorEvent);
44462 }}
44463 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44464 Clazz_defineMethod (c$, "fireAncestorRemoved", 
44465 function (source, id, ancestor, ancestorParent) {
44466 var listeners = this.listenerList.getListenerList ();
44467 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44468 if (listeners[i] === javax.swing.event.AncestorListener) {
44469 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44470 (listeners[i + 1]).ancestorRemoved (ancestorEvent);
44471 }}
44472 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44473 Clazz_defineMethod (c$, "fireAncestorMoved", 
44474 function (source, id, ancestor, ancestorParent) {
44475 var listeners = this.listenerList.getListenerList ();
44476 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44477 if (listeners[i] === javax.swing.event.AncestorListener) {
44478 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44479 (listeners[i + 1]).ancestorMoved (ancestorEvent);
44480 }}
44481 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44482 Clazz_defineMethod (c$, "removeAllListeners", 
44483 function () {
44484 this.removeListeners (this.root);
44485 });
44486 Clazz_defineMethod (c$, "addListeners", 
44487 function (ancestor, addToFirst) {
44488 var a;
44489 this.firstInvisibleAncestor = null;
44490 for (a = ancestor; this.firstInvisibleAncestor == null; a = a.getParent ()) {
44491 if (addToFirst || a !== ancestor) {
44492 a.addComponentListener (this);
44493 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44494 var jAncestor = a;
44495 jAncestor.addPropertyChangeListener (this);
44496 }}if (!a.isVisible () || a.getParent () == null || Clazz_instanceOf (a, java.awt.Window)) {
44497 this.firstInvisibleAncestor = a;
44498 }}
44499 if (Clazz_instanceOf (this.firstInvisibleAncestor, java.awt.Window) && this.firstInvisibleAncestor.isVisible ()) {
44500 this.firstInvisibleAncestor = null;
44501 }}, "java.awt.Component,~B");
44502 Clazz_defineMethod (c$, "removeListeners", 
44503 function (ancestor) {
44504 var a;
44505 for (a = ancestor; a != null; a = a.getParent ()) {
44506 a.removeComponentListener (this);
44507 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44508 var jAncestor = a;
44509 jAncestor.removePropertyChangeListener (this);
44510 }if (a === this.firstInvisibleAncestor || Clazz_instanceOf (a, java.awt.Window)) {
44511 break;
44512 }}
44513 }, "java.awt.Component");
44514 Clazz_overrideMethod (c$, "componentResized", 
44515 function (e) {
44516 }, "java.awt.event.ComponentEvent");
44517 Clazz_overrideMethod (c$, "componentMoved", 
44518 function (e) {
44519 var source = e.getComponent ();
44520 this.fireAncestorMoved (this.root, 3, source, source.getParent ());
44521 }, "java.awt.event.ComponentEvent");
44522 Clazz_overrideMethod (c$, "componentShown", 
44523 function (e) {
44524 var ancestor = e.getComponent ();
44525 if (ancestor === this.firstInvisibleAncestor) {
44526 this.addListeners (ancestor, false);
44527 if (this.firstInvisibleAncestor == null) {
44528 this.fireAncestorAdded (this.root, 1, ancestor, ancestor.getParent ());
44529 }}}, "java.awt.event.ComponentEvent");
44530 Clazz_overrideMethod (c$, "componentHidden", 
44531 function (e) {
44532 var ancestor = e.getComponent ();
44533 var needsNotify = this.firstInvisibleAncestor == null;
44534 if (!(Clazz_instanceOf (ancestor, java.awt.Window))) {
44535 this.removeListeners (ancestor.getParent ());
44536 }this.firstInvisibleAncestor = ancestor;
44537 if (needsNotify) {
44538 this.fireAncestorRemoved (this.root, 2, ancestor, ancestor.getParent ());
44539 }}, "java.awt.event.ComponentEvent");
44540 Clazz_overrideMethod (c$, "propertyChange", 
44541 function (evt) {
44542 var s = evt.getPropertyName ();
44543 if (s != null && (s.equals ("parent") || s.equals ("ancestor"))) {
44544 var component = evt.getSource ();
44545 if (evt.getNewValue () != null) {
44546 if (component === this.firstInvisibleAncestor) {
44547 this.addListeners (component, false);
44548 if (this.firstInvisibleAncestor == null) {
44549 this.fireAncestorAdded (this.root, 1, component, component.getParent ());
44550 }}} else {
44551 var needsNotify = this.firstInvisibleAncestor == null;
44552 var oldParent = evt.getOldValue ();
44553 this.removeListeners (oldParent);
44554 this.firstInvisibleAncestor = component;
44555 if (needsNotify) {
44556 this.fireAncestorRemoved (this.root, 2, component, oldParent);
44557 }}}}, "java.beans.PropertyChangeEvent");
44558 });
44559 Clazz_declarePackage ("javax.swing.event");
44560 Clazz_load (["java.awt.AWTEvent"], "javax.swing.event.AncestorEvent", null, function () {
44561 c$ = Clazz_decorateAsClass (function () {
44562 this.ancestor = null;
44563 this.ancestorParent = null;
44564 Clazz_instantialize (this, arguments);
44565 }, javax.swing.event, "AncestorEvent", java.awt.AWTEvent);
44566 Clazz_makeConstructor (c$, 
44567 function (source, id, ancestor, ancestorParent) {
44568 Clazz_superConstructor (this, javax.swing.event.AncestorEvent, [source, id]);
44569 this.ancestor = ancestor;
44570 this.ancestorParent = ancestorParent;
44571 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44572 Clazz_defineMethod (c$, "getAncestor", 
44573 function () {
44574 return this.ancestor;
44575 });
44576 Clazz_defineMethod (c$, "getAncestorParent", 
44577 function () {
44578 return this.ancestorParent;
44579 });
44580 Clazz_defineMethod (c$, "getComponent", 
44581 function () {
44582 return this.getSource ();
44583 });
44584 Clazz_defineStatics (c$,
44585 "ANCESTOR_ADDED", 1,
44586 "ANCESTOR_REMOVED", 2,
44587 "ANCESTOR_MOVED", 3);
44588 });
44589 Clazz_declarePackage ("javax.swing.event");
44590 Clazz_load (["java.util.EventListener"], "javax.swing.event.AncestorListener", null, function () {
44591 Clazz_declareInterface (javax.swing.event, "AncestorListener", java.util.EventListener);
44592 });
44593 Clazz_declarePackage ("javax.swing");
44594 Clazz_load (["java.lang.Enum"], "javax.swing.ClientPropertyKey", null, function () {
44595 c$ = Clazz_declareType (javax.swing, "ClientPropertyKey", Enum);
44596 Clazz_makeConstructor (c$, 
44597  function (reportValueNotSerializable) {
44598 }, "~B");
44599 Clazz_defineEnumConstant (c$, "JComponent_INPUT_VERIFIER", 0, [true]);
44600 Clazz_defineEnumConstant (c$, "JComponent_TRANSFER_HANDLER", 1, [true]);
44601 Clazz_defineEnumConstant (c$, "JComponent_ANCESTOR_NOTIFIER", 2, [true]);
44602 Clazz_defineEnumConstant (c$, "PopupFactory_FORCE_HEAVYWEIGHT_POPUP", 3, [true]);
44603 });
44604 Clazz_declarePackage ("javax.swing");
44605 Clazz_load (["java.awt.Dialog", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JDialog", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
44606 c$ = Clazz_decorateAsClass (function () {
44607 this.defaultCloseOperation = 1;
44608 this.rootPane = null;
44609 this.rootPaneCheckingEnabled = false;
44610 this.transferHandler = null;
44611 Clazz_instantialize (this, arguments);
44612 }, javax.swing, "JDialog", java.awt.Dialog, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
44613 Clazz_makeConstructor (c$, 
44614 function () {
44615 this.construct (Clazz_castNullAs ("java.awt.Frame"), false);
44616 });
44617 Clazz_makeConstructor (c$, 
44618 function (owner) {
44619 this.construct (owner, false);
44620 }, "java.awt.Frame");
44621 Clazz_makeConstructor (c$, 
44622 function (owner, modal) {
44623 this.construct (owner, null, modal);
44624 }, "java.awt.Frame,~B");
44625 Clazz_makeConstructor (c$, 
44626 function (owner, title) {
44627 this.construct (owner, title, false);
44628 }, "java.awt.Frame,~S");
44629 Clazz_makeConstructor (c$, 
44630 function (owner, title, modal) {
44631 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal]);
44632 if (owner == null) {
44633 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44634 this.addWindowListener (ownerShutdownListener);
44635 }this.dialogInit ();
44636 }, "java.awt.Frame,~S,~B");
44637 Clazz_makeConstructor (c$, 
44638 function (owner, title, modal, gc) {
44639 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal, gc]);
44640 if (owner == null) {
44641 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44642 this.addWindowListener (ownerShutdownListener);
44643 }this.dialogInit ();
44644 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44645 Clazz_makeConstructor (c$, 
44646 function (owner) {
44647 this.construct (owner, false);
44648 }, "java.awt.Dialog");
44649 Clazz_makeConstructor (c$, 
44650 function (owner, modal) {
44651 this.construct (owner, null, modal);
44652 }, "java.awt.Dialog,~B");
44653 Clazz_makeConstructor (c$, 
44654 function (owner, title) {
44655 this.construct (owner, title, false);
44656 }, "java.awt.Dialog,~S");
44657 Clazz_makeConstructor (c$, 
44658 function (owner, title, modal) {
44659 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal]);
44660 this.dialogInit ();
44661 }, "java.awt.Dialog,~S,~B");
44662 Clazz_makeConstructor (c$, 
44663 function (owner, title, modal, gc) {
44664 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal, gc]);
44665 this.dialogInit ();
44666 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44667 Clazz_makeConstructor (c$, 
44668 function (owner) {
44669 this.construct (owner, java.awt.Dialog.ModalityType.MODELESS);
44670 }, "java.awt.Window");
44671 Clazz_makeConstructor (c$, 
44672 function (owner, modalityType) {
44673 this.construct (owner, null, modalityType);
44674 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44675 Clazz_makeConstructor (c$, 
44676 function (owner, title) {
44677 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44678 }, "java.awt.Window,~S");
44679 Clazz_makeConstructor (c$, 
44680 function (owner, title, modalityType) {
44681 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType]);
44682 this.dialogInit ();
44683 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44684 Clazz_makeConstructor (c$, 
44685 function (owner, title, modalityType, gc) {
44686 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType, gc]);
44687 this.dialogInit ();
44688 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44689 Clazz_defineMethod (c$, "dialogInit", 
44690 function () {
44691 this.enableEvents (72);
44692 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
44693 this.setRootPane (this.createRootPane ());
44694 this.setRootPaneCheckingEnabled (true);
44695 if (javax.swing.JDialog.isDefaultLookAndFeelDecorated ()) {
44696 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
44697 if (supportsWindowDecorations) {
44698 this.setUndecorated (true);
44699 this.getRootPane ().setWindowDecorationStyle (2);
44700 }}});
44701 Clazz_defineMethod (c$, "createRootPane", 
44702 function () {
44703 var rp =  new javax.swing.JRootPane ();
44704 rp.setOpaque (true);
44705 return rp;
44706 });
44707 Clazz_defineMethod (c$, "processWindowEvent", 
44708 function (e) {
44709 Clazz_superCall (this, javax.swing.JDialog, "processWindowEvent", [e]);
44710 if (e.getID () == 201) {
44711 switch (this.defaultCloseOperation) {
44712 case 1:
44713 this.setVisible (false);
44714 break;
44715 case 2:
44716 this.dispose ();
44717 break;
44718 case 0:
44719 default:
44720 break;
44721 }
44722 }}, "java.awt.event.WindowEvent");
44723 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
44724 function (operation) {
44725 if (operation != 0 && operation != 1 && operation != 2) {
44726 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");
44727 }var oldValue = this.defaultCloseOperation;
44728 this.defaultCloseOperation = operation;
44729 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
44730 }, "~N");
44731 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
44732 function () {
44733 return this.defaultCloseOperation;
44734 });
44735 Clazz_defineMethod (c$, "setTransferHandler", 
44736 function (newHandler) {
44737 var oldHandler = this.transferHandler;
44738 this.transferHandler = newHandler;
44739 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
44740 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
44741 }, "javax.swing.TransferHandler");
44742 Clazz_defineMethod (c$, "getTransferHandler", 
44743 function () {
44744 return this.transferHandler;
44745 });
44746 Clazz_overrideMethod (c$, "update", 
44747 function (g) {
44748 this.paint (g);
44749 }, "java.awt.Graphics");
44750 Clazz_defineMethod (c$, "setJMenuBar", 
44751 function (menu) {
44752 this.getRootPane ().setMenuBar (menu);
44753 }, "javax.swing.JMenuBar");
44754 Clazz_defineMethod (c$, "getJMenuBar", 
44755 function () {
44756 return this.getRootPane ().getMenuBar ();
44757 });
44758 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
44759 function () {
44760 return this.rootPaneCheckingEnabled;
44761 });
44762 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
44763 function (enabled) {
44764 this.rootPaneCheckingEnabled = enabled;
44765 }, "~B");
44766 Clazz_overrideMethod (c$, "addImpl", 
44767 function (comp, constraints, index) {
44768 if (this.isRootPaneCheckingEnabled ()) {
44769 return this.getContentPane ().add (comp, constraints, index);
44770 }return this.addImplSAEM (comp, constraints, index);
44771 }, "java.awt.Component,~O,~N");
44772 Clazz_defineMethod (c$, "remove", 
44773 function (comp) {
44774 if (comp === this.rootPane) {
44775 this.removeChild (comp);
44776 } else {
44777 this.getContentPane ().removeChild (comp);
44778 }}, "java.awt.Component");
44779 Clazz_defineMethod (c$, "setLayout", 
44780 function (manager) {
44781 if (this.isRootPaneCheckingEnabled ()) {
44782 this.getContentPane ().setLayout (manager);
44783 } else {
44784 Clazz_superCall (this, javax.swing.JDialog, "setLayout", [manager]);
44785 }}, "java.awt.LayoutManager");
44786 Clazz_overrideMethod (c$, "getRootPane", 
44787 function () {
44788 return this.rootPane;
44789 });
44790 Clazz_defineMethod (c$, "setRootPane", 
44791 function (root) {
44792 if (this.rootPane != null) {
44793 this.remove (this.rootPane);
44794 }this.rootPane = root;
44795 if (this.rootPane != null) {
44796 var checkingEnabled = this.isRootPaneCheckingEnabled ();
44797 try {
44798 this.setRootPaneCheckingEnabled (false);
44799 this.add (this.rootPane, "Center");
44800 } finally {
44801 this.setRootPaneCheckingEnabled (checkingEnabled);
44802 }
44803 }}, "javax.swing.JRootPane");
44804 Clazz_overrideMethod (c$, "getContentPane", 
44805 function () {
44806 return this.getRootPane ().getContentPane ();
44807 });
44808 Clazz_overrideMethod (c$, "setContentPane", 
44809 function (contentPane) {
44810 this.getRootPane ().setContentPane (contentPane);
44811 }, "java.awt.Container");
44812 Clazz_overrideMethod (c$, "getLayeredPane", 
44813 function () {
44814 return this.getRootPane ().getLayeredPane ();
44815 });
44816 Clazz_overrideMethod (c$, "setLayeredPane", 
44817 function (layeredPane) {
44818 this.getRootPane ().setLayeredPane (layeredPane);
44819 }, "javax.swing.JLayeredPane");
44820 Clazz_overrideMethod (c$, "getGlassPane", 
44821 function () {
44822 return this.getRootPane ().getGlassPane ();
44823 });
44824 Clazz_overrideMethod (c$, "setGlassPane", 
44825 function (glassPane) {
44826 this.getRootPane ().setGlassPane (glassPane);
44827 }, "java.awt.Component");
44828 Clazz_defineMethod (c$, "getGraphics", 
44829 function () {
44830 javax.swing.JComponent.getGraphicsInvoked (this);
44831 return Clazz_superCall (this, javax.swing.JDialog, "getGraphics", []);
44832 });
44833 Clazz_defineMethod (c$, "repaint", 
44834 function (time, x, y, width, height) {
44835 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
44836 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
44837 } else {
44838 Clazz_superCall (this, javax.swing.JDialog, "repaint", [time, x, y, width, height]);
44839 }}, "~N,~N,~N,~N,~N");
44840 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
44841 function (defaultLookAndFeelDecorated) {
44842 if (defaultLookAndFeelDecorated) {
44843 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
44844 } else {
44845 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
44846 }}, "~B");
44847 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
44848 function () {
44849 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JDialog.defaultLookAndFeelDecoratedKey);
44850 if (defaultLookAndFeelDecorated == null) {
44851 defaultLookAndFeelDecorated = Boolean.FALSE;
44852 }return defaultLookAndFeelDecorated.booleanValue ();
44853 });
44854 Clazz_defineMethod (c$, "paramString", 
44855 function () {
44856 var defaultCloseOperationString;
44857 if (this.defaultCloseOperation == 1) {
44858 defaultCloseOperationString = "HIDE_ON_CLOSE";
44859 } else if (this.defaultCloseOperation == 2) {
44860 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
44861 } else if (this.defaultCloseOperation == 0) {
44862 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
44863 } else defaultCloseOperationString = "";
44864 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
44865 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
44866 return Clazz_superCall (this, javax.swing.JDialog, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
44867 });
44868 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
44869 });
44870 Clazz_declarePackage ("java.awt");
44871 Clazz_load (["java.lang.Enum", "java.awt.Window"], "java.awt.Dialog", ["java.lang.IllegalArgumentException", "java.awt.Frame", "$.IllegalComponentStateException"], function () {
44872 c$ = Clazz_decorateAsClass (function () {
44873 this.resizable = true;
44874 this.undecorated = false;
44875 this.modal = false;
44876 this.modalityType = null;
44877 this.title = null;
44878 this.isInHide = false;
44879 this.isInDispose = false;
44880 Clazz_instantialize (this, arguments);
44881 }, java.awt, "Dialog", java.awt.Window);
44882 Clazz_makeConstructor (c$, 
44883 function (owner) {
44884 this.construct (owner, "", false);
44885 }, "java.awt.Frame");
44886 Clazz_makeConstructor (c$, 
44887 function (owner, modal) {
44888 this.construct (owner, "", modal);
44889 }, "java.awt.Frame,~B");
44890 Clazz_makeConstructor (c$, 
44891 function (owner, title) {
44892 this.construct (owner, title, false);
44893 }, "java.awt.Frame,~S");
44894 Clazz_makeConstructor (c$, 
44895 function (owner, title, modal) {
44896 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44897 }, "java.awt.Frame,~S,~B");
44898 Clazz_makeConstructor (c$, 
44899 function (owner, title, modal, gc) {
44900 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44901 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44902 Clazz_makeConstructor (c$, 
44903 function (owner) {
44904 this.construct (owner, "", false);
44905 }, "java.awt.Dialog");
44906 Clazz_makeConstructor (c$, 
44907 function (owner, title) {
44908 this.construct (owner, title, false);
44909 }, "java.awt.Dialog,~S");
44910 Clazz_makeConstructor (c$, 
44911 function (owner, title, modal) {
44912 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44913 }, "java.awt.Dialog,~S,~B");
44914 Clazz_makeConstructor (c$, 
44915 function (owner, title, modal, gc) {
44916 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44917 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44918 Clazz_makeConstructor (c$, 
44919 function (owner) {
44920 this.construct (owner, null, java.awt.Dialog.ModalityType.MODELESS);
44921 }, "java.awt.Window");
44922 Clazz_makeConstructor (c$, 
44923 function (owner, title) {
44924 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44925 }, "java.awt.Window,~S");
44926 Clazz_makeConstructor (c$, 
44927 function (owner, modalityType) {
44928 this.construct (owner, null, modalityType);
44929 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44930 Clazz_makeConstructor (c$, 
44931 function (owner, title, modalityType) {
44932 Clazz_superConstructor (this, java.awt.Dialog, [owner]);
44933 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44934 throw  new IllegalArgumentException ("Wrong parent window");
44935 }this.title = title;
44936 this.setModalityType (modalityType);
44937 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44938 Clazz_makeConstructor (c$, 
44939 function (owner, title, modalityType, gc) {
44940 Clazz_superConstructor (this, java.awt.Dialog, [owner, gc]);
44941 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44942 throw  new IllegalArgumentException ("wrong owner window");
44943 }this.title = title;
44944 this.setModalityType (modalityType);
44945 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44946 Clazz_overrideMethod (c$, "constructComponentName", 
44947 function () {
44948 {
44949 return "dialog" + java.awt.Dialog.$nameCounter++;
44950 }});
44951 Clazz_defineMethod (c$, "addNotify", 
44952 function () {
44953 {
44954 if (this.parent != null) {
44955 this.parent.addNotify ();
44956 }Clazz_superCall (this, java.awt.Dialog, "addNotify", []);
44957 }});
44958 Clazz_defineMethod (c$, "isModal", 
44959 function () {
44960 return this.isModal_NoClientCode ();
44961 });
44962 Clazz_defineMethod (c$, "isModal_NoClientCode", 
44963 function () {
44964 return this.modalityType !== java.awt.Dialog.ModalityType.MODELESS;
44965 });
44966 Clazz_defineMethod (c$, "setModal", 
44967 function (modal) {
44968 this.modal = modal;
44969 this.setModalityType (modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44970 }, "~B");
44971 Clazz_defineMethod (c$, "getModalityType", 
44972 function () {
44973 return this.modalityType;
44974 });
44975 Clazz_defineMethod (c$, "setModalityType", 
44976 function (type) {
44977 if (type == null) {
44978 type = java.awt.Dialog.ModalityType.MODELESS;
44979 }if (this.modalityType === type) {
44980 return;
44981 }this.checkModalityPermission (type);
44982 this.modalityType = type;
44983 this.modal = (this.modalityType !== java.awt.Dialog.ModalityType.MODELESS);
44984 }, "java.awt.Dialog.ModalityType");
44985 Clazz_defineMethod (c$, "getTitle", 
44986 function () {
44987 return this.title;
44988 });
44989 Clazz_defineMethod (c$, "setTitle", 
44990 function (title) {
44991 var oldTitle = this.title;
44992 {
44993 this.title = title;
44994 }this.firePropertyChangeObject ("title", oldTitle, title);
44995 }, "~S");
44996 Clazz_defineMethod (c$, "show", 
44997 function () {
44998 });
44999 Clazz_defineMethod (c$, "modalityPushed", 
45000 function () {
45001 });
45002 Clazz_defineMethod (c$, "modalityPopped", 
45003 function () {
45004 });
45005 Clazz_defineMethod (c$, "interruptBlocking", 
45006 function () {
45007 if (this.isModal ()) {
45008 this.disposeImpl ();
45009 } else if (this.windowClosingException != null) {
45010 this.windowClosingException.fillInStackTrace ();
45011 this.windowClosingException.printStackTrace ();
45012 this.windowClosingException = null;
45013 }});
45014 Clazz_defineMethod (c$, "hideAndDisposePreHandler", 
45015  function () {
45016 this.isInHide = true;
45017 });
45018 Clazz_defineMethod (c$, "hideAndDisposeHandler", 
45019  function () {
45020 this.isInHide = false;
45021 });
45022 Clazz_defineMethod (c$, "hide", 
45023 function () {
45024 this.hideAndDisposePreHandler ();
45025 Clazz_superCall (this, java.awt.Dialog, "hide", []);
45026 if (!this.isInDispose) {
45027 this.hideAndDisposeHandler ();
45028 }});
45029 Clazz_defineMethod (c$, "doDispose", 
45030 function () {
45031 this.isInDispose = true;
45032 Clazz_superCall (this, java.awt.Dialog, "doDispose", []);
45033 this.hideAndDisposeHandler ();
45034 this.isInDispose = false;
45035 });
45036 Clazz_defineMethod (c$, "isResizable", 
45037 function () {
45038 return this.resizable;
45039 });
45040 Clazz_defineMethod (c$, "setResizable", 
45041 function (resizable) {
45042 var testvalid = false;
45043 {
45044 this.resizable = resizable;
45045 }if (testvalid) {
45046 this.invalidateIfValid ();
45047 }}, "~B");
45048 Clazz_defineMethod (c$, "setUndecorated", 
45049 function (undecorated) {
45050 {
45051 if (this.isDisplayable ()) {
45052 throw  new java.awt.IllegalComponentStateException ("The dialog is displayable.");
45053 }this.undecorated = undecorated;
45054 }}, "~B");
45055 Clazz_defineMethod (c$, "isUndecorated", 
45056 function () {
45057 return this.undecorated;
45058 });
45059 Clazz_defineMethod (c$, "paramString", 
45060 function () {
45061 var str = Clazz_superCall (this, java.awt.Dialog, "paramString", []) + "," + this.modalityType;
45062 if (this.title != null) {
45063 str += ",title=" + this.title;
45064 }return str;
45065 });
45066 Clazz_defineMethod (c$, "modalShow", 
45067 function () {
45068 });
45069 Clazz_defineMethod (c$, "modalHide", 
45070 function () {
45071 });
45072 Clazz_defineMethod (c$, "shouldBlock", 
45073 function (w) {
45074 if (!this.isVisible_NoClientCode () || (!w.isVisible_NoClientCode () && !w.isInShow) || this.isInHide || (w === this) || !this.isModal_NoClientCode ()) {
45075 return false;
45076 }if ((Clazz_instanceOf (w, java.awt.Dialog)) && (w).isInHide) {
45077 return false;
45078 }var blockerToCheck = this;
45079 while (blockerToCheck != null) {
45080 var c = w;
45081 while ((c != null) && (c !== blockerToCheck)) {
45082 c = c.getParent_NoClientCode ();
45083 }
45084 if (c === blockerToCheck) {
45085 return false;
45086 }blockerToCheck = blockerToCheck.getModalBlocker ();
45087 }
45088 switch (this.modalityType) {
45089 case java.awt.Dialog.ModalityType.MODELESS:
45090 return false;
45091 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
45092 if (w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
45093 var c = this;
45094 while ((c != null) && (c !== w)) {
45095 c = c.getParent_NoClientCode ();
45096 }
45097 return c === w;
45098 } else {
45099 return this.getDocumentRoot () === w.getDocumentRoot ();
45100 }case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
45101 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE) && (this.appContext === w.appContext);
45102 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
45103 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
45104 }
45105 return false;
45106 }, "java.awt.Window");
45107 Clazz_defineMethod (c$, "checkModalityPermission", 
45108  function (mt) {
45109 }, "java.awt.Dialog.ModalityType");
45110 Clazz_pu$h(self.c$);
45111 c$ = Clazz_declareType (java.awt.Dialog, "ModalityType", Enum);
45112 Clazz_defineEnumConstant (c$, "MODELESS", 0, []);
45113 Clazz_defineEnumConstant (c$, "DOCUMENT_MODAL", 1, []);
45114 Clazz_defineEnumConstant (c$, "APPLICATION_MODAL", 2, []);
45115 Clazz_defineEnumConstant (c$, "TOOLKIT_MODAL", 3, []);
45116 c$ = Clazz_p0p ();
45117 Clazz_pu$h(self.c$);
45118 c$ = Clazz_declareType (java.awt.Dialog, "ModalExclusionType", Enum);
45119 Clazz_defineEnumConstant (c$, "NO_EXCLUDE", 0, []);
45120 Clazz_defineEnumConstant (c$, "APPLICATION_EXCLUDE", 1, []);
45121 Clazz_defineEnumConstant (c$, "TOOLKIT_EXCLUDE", 2, []);
45122 c$ = Clazz_p0p ();
45123 c$.DEFAULT_MODALITY_TYPE = c$.prototype.DEFAULT_MODALITY_TYPE = java.awt.Dialog.ModalityType.APPLICATION_MODAL;
45124 Clazz_defineStatics (c$,
45125 "$base", "dialog",
45126 "$nameCounter", 0);
45127 });
45128 Clazz_declarePackage ("javax.swing");
45129 c$ = Clazz_declareInterface (javax.swing, "WindowConstants");
45130 Clazz_defineStatics (c$,
45131 "DO_NOTHING_ON_CLOSE", 0,
45132 "HIDE_ON_CLOSE", 1,
45133 "DISPOSE_ON_CLOSE", 2,
45134 "EXIT_ON_CLOSE", 3);
45135 Clazz_declarePackage ("javax.swing");
45136 Clazz_load (["java.awt.Frame", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JFrame", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
45137 c$ = Clazz_decorateAsClass (function () {
45138 this.defaultCloseOperation = 1;
45139 this.transferHandler = null;
45140 this.rootPane = null;
45141 this.rootPaneCheckingEnabled = false;
45142 Clazz_instantialize (this, arguments);
45143 }, javax.swing, "JFrame", java.awt.Frame, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
45144 Clazz_makeConstructor (c$, 
45145 function () {
45146 Clazz_superConstructor (this, javax.swing.JFrame);
45147 this.frameInit ();
45148 });
45149 Clazz_makeConstructor (c$, 
45150 function (gc) {
45151 Clazz_superConstructor (this, javax.swing.JFrame, [gc]);
45152 this.frameInit ();
45153 }, "java.awt.GraphicsConfiguration");
45154 Clazz_makeConstructor (c$, 
45155 function (title) {
45156 Clazz_superConstructor (this, javax.swing.JFrame, [title]);
45157 this.frameInit ();
45158 }, "~S");
45159 Clazz_makeConstructor (c$, 
45160 function (title, gc) {
45161 Clazz_superConstructor (this, javax.swing.JFrame, [title, gc]);
45162 this.frameInit ();
45163 }, "~S,java.awt.GraphicsConfiguration");
45164 Clazz_defineMethod (c$, "frameInit", 
45165 function () {
45166 this.enableEvents (72);
45167 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45168 this.setRootPane (this.createRootPane ());
45169 this.setBackground (javax.swing.UIManager.getColor ("control"));
45170 this.setRootPaneCheckingEnabled (true);
45171 if (javax.swing.JFrame.isDefaultLookAndFeelDecorated ()) {
45172 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
45173 if (supportsWindowDecorations) {
45174 this.setUndecorated (true);
45175 this.getRootPane ().setWindowDecorationStyle (1);
45176 }}});
45177 Clazz_defineMethod (c$, "createRootPane", 
45178 function () {
45179 var rp =  new javax.swing.JRootPane ();
45180 rp.setOpaque (true);
45181 return rp;
45182 });
45183 Clazz_defineMethod (c$, "processWindowEvent", 
45184 function (e) {
45185 Clazz_superCall (this, javax.swing.JFrame, "processWindowEvent", [e]);
45186 if (e.getID () == 201) {
45187 switch (this.defaultCloseOperation) {
45188 case 1:
45189 this.setVisible (false);
45190 break;
45191 case 2:
45192 this.dispose ();
45193 break;
45194 case 0:
45195 default:
45196 break;
45197 case 3:
45198 System.exit (0);
45199 break;
45200 }
45201 }}, "java.awt.event.WindowEvent");
45202 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
45203 function (operation) {
45204 if (operation != 0 && operation != 1 && operation != 2 && operation != 3) {
45205 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE");
45206 }if (this.defaultCloseOperation != operation) {
45207 if (operation == 3) {
45208 var security = System.getSecurityManager ();
45209 if (security != null) {
45210 security.checkExit (0);
45211 }}var oldValue = this.defaultCloseOperation;
45212 this.defaultCloseOperation = operation;
45213 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
45214 }}, "~N");
45215 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
45216 function () {
45217 return this.defaultCloseOperation;
45218 });
45219 Clazz_defineMethod (c$, "setTransferHandler", 
45220 function (newHandler) {
45221 var oldHandler = this.transferHandler;
45222 this.transferHandler = newHandler;
45223 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45224 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45225 }, "javax.swing.TransferHandler");
45226 Clazz_defineMethod (c$, "getTransferHandler", 
45227 function () {
45228 return this.transferHandler;
45229 });
45230 Clazz_overrideMethod (c$, "update", 
45231 function (g) {
45232 this.paint (g);
45233 }, "java.awt.Graphics");
45234 Clazz_defineMethod (c$, "setJMenuBar", 
45235 function (menubar) {
45236 this.getRootPane ().setMenuBar (menubar);
45237 }, "javax.swing.JMenuBar");
45238 Clazz_defineMethod (c$, "getJMenuBar", 
45239 function () {
45240 return this.getRootPane ().getMenuBar ();
45241 });
45242 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45243 function () {
45244 return this.rootPaneCheckingEnabled;
45245 });
45246 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45247 function (enabled) {
45248 this.rootPaneCheckingEnabled = enabled;
45249 }, "~B");
45250 Clazz_overrideMethod (c$, "addImpl", 
45251 function (comp, constraints, index) {
45252 if (this.isRootPaneCheckingEnabled ()) {
45253 return this.getContentPane ().add (comp, constraints, index);
45254 }return this.addImplSAEM (comp, constraints, index);
45255 }, "java.awt.Component,~O,~N");
45256 Clazz_defineMethod (c$, "remove", 
45257 function (comp) {
45258 if (comp === this.rootPane) {
45259 this.removeChild (comp);
45260 } else {
45261 this.getContentPane ().removeChild (comp);
45262 }}, "java.awt.Component");
45263 Clazz_defineMethod (c$, "setLayout", 
45264 function (manager) {
45265 if (this.isRootPaneCheckingEnabled ()) {
45266 this.getContentPane ().setLayout (manager);
45267 } else {
45268 Clazz_superCall (this, javax.swing.JFrame, "setLayout", [manager]);
45269 }}, "java.awt.LayoutManager");
45270 Clazz_overrideMethod (c$, "getRootPane", 
45271 function () {
45272 return this.rootPane;
45273 });
45274 Clazz_defineMethod (c$, "setRootPane", 
45275 function (root) {
45276 if (this.rootPane != null) {
45277 this.remove (this.rootPane);
45278 }this.rootPane = root;
45279 if (this.rootPane != null) {
45280 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45281 try {
45282 this.setRootPaneCheckingEnabled (false);
45283 this.add (this.rootPane, "Center");
45284 } finally {
45285 this.setRootPaneCheckingEnabled (checkingEnabled);
45286 }
45287 }}, "javax.swing.JRootPane");
45288 Clazz_overrideMethod (c$, "getContentPane", 
45289 function () {
45290 return this.getRootPane ().getContentPane ();
45291 });
45292 Clazz_overrideMethod (c$, "setContentPane", 
45293 function (contentPane) {
45294 this.getRootPane ().setContentPane (contentPane);
45295 }, "java.awt.Container");
45296 Clazz_overrideMethod (c$, "getLayeredPane", 
45297 function () {
45298 return this.getRootPane ().getLayeredPane ();
45299 });
45300 Clazz_overrideMethod (c$, "setLayeredPane", 
45301 function (layeredPane) {
45302 this.getRootPane ().setLayeredPane (layeredPane);
45303 }, "javax.swing.JLayeredPane");
45304 Clazz_overrideMethod (c$, "getGlassPane", 
45305 function () {
45306 return this.getRootPane ().getGlassPane ();
45307 });
45308 Clazz_overrideMethod (c$, "setGlassPane", 
45309 function (glassPane) {
45310 this.getRootPane ().setGlassPane (glassPane);
45311 }, "java.awt.Component");
45312 Clazz_defineMethod (c$, "getGraphics", 
45313 function () {
45314 javax.swing.JComponent.getGraphicsInvoked (this);
45315 return Clazz_superCall (this, javax.swing.JFrame, "getGraphics", []);
45316 });
45317 Clazz_defineMethod (c$, "repaint", 
45318 function (time, x, y, width, height) {
45319 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45320 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45321 } else {
45322 Clazz_superCall (this, javax.swing.JFrame, "repaint", [time, x, y, width, height]);
45323 }}, "~N,~N,~N,~N,~N");
45324 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
45325 function (defaultLookAndFeelDecorated) {
45326 if (defaultLookAndFeelDecorated) {
45327 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
45328 } else {
45329 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
45330 }}, "~B");
45331 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
45332 function () {
45333 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JFrame.defaultLookAndFeelDecoratedKey);
45334 if (defaultLookAndFeelDecorated == null) {
45335 defaultLookAndFeelDecorated = Boolean.FALSE;
45336 }return defaultLookAndFeelDecorated.booleanValue ();
45337 });
45338 Clazz_defineMethod (c$, "paramString", 
45339 function () {
45340 var defaultCloseOperationString;
45341 if (this.defaultCloseOperation == 1) {
45342 defaultCloseOperationString = "HIDE_ON_CLOSE";
45343 } else if (this.defaultCloseOperation == 2) {
45344 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
45345 } else if (this.defaultCloseOperation == 0) {
45346 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
45347 } else if (this.defaultCloseOperation == 3) {
45348 defaultCloseOperationString = "EXIT_ON_CLOSE";
45349 } else defaultCloseOperationString = "";
45350 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
45351 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45352 return Clazz_superCall (this, javax.swing.JFrame, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45353 });
45354 Clazz_defineStatics (c$,
45355 "EXIT_ON_CLOSE", 3);
45356 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
45357 });
45358 Clazz_declarePackage ("javax.swing");
45359 Clazz_load (["java.awt.Window", "javax.swing.RootPaneContainer"], "javax.swing.JWindow", ["javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
45360 c$ = Clazz_decorateAsClass (function () {
45361 this.rootPane = null;
45362 this.rootPaneCheckingEnabled = false;
45363 this.transferHandler = null;
45364 Clazz_instantialize (this, arguments);
45365 }, javax.swing, "JWindow", java.awt.Window, javax.swing.RootPaneContainer);
45366 Clazz_makeConstructor (c$, 
45367 function () {
45368 this.construct (Clazz_castNullAs ("java.awt.Frame"));
45369 });
45370 Clazz_makeConstructor (c$, 
45371 function (gc) {
45372 this.construct (null, gc);
45373 Clazz_superCall (this, javax.swing.JWindow, "setFocusableWindowState", [false]);
45374 }, "java.awt.GraphicsConfiguration");
45375 Clazz_makeConstructor (c$, 
45376 function (owner) {
45377 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45378 if (owner == null) {
45379 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45380 this.addWindowListener (ownerShutdownListener);
45381 }this.windowInit ();
45382 }, "java.awt.Frame");
45383 Clazz_makeConstructor (c$, 
45384 function (owner) {
45385 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45386 if (owner == null) {
45387 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45388 this.addWindowListener (ownerShutdownListener);
45389 }this.windowInit ();
45390 }, "java.awt.Window");
45391 Clazz_makeConstructor (c$, 
45392 function (owner, gc) {
45393 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, gc]);
45394 if (owner == null) {
45395 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45396 this.addWindowListener (ownerShutdownListener);
45397 }this.windowInit ();
45398 }, "java.awt.Window,java.awt.GraphicsConfiguration");
45399 Clazz_defineMethod (c$, "windowInit", 
45400 function () {
45401 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45402 this.setRootPane (this.createRootPane ());
45403 this.setRootPaneCheckingEnabled (true);
45404 });
45405 Clazz_defineMethod (c$, "createRootPane", 
45406 function () {
45407 var rp =  new javax.swing.JRootPane ();
45408 rp.setOpaque (true);
45409 return rp;
45410 });
45411 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45412 function () {
45413 return this.rootPaneCheckingEnabled;
45414 });
45415 Clazz_defineMethod (c$, "setTransferHandler", 
45416 function (newHandler) {
45417 var oldHandler = this.transferHandler;
45418 this.transferHandler = newHandler;
45419 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45420 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45421 }, "javax.swing.TransferHandler");
45422 Clazz_defineMethod (c$, "getTransferHandler", 
45423 function () {
45424 return this.transferHandler;
45425 });
45426 Clazz_overrideMethod (c$, "update", 
45427 function (g) {
45428 this.paint (g);
45429 }, "java.awt.Graphics");
45430 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45431 function (enabled) {
45432 this.rootPaneCheckingEnabled = enabled;
45433 }, "~B");
45434 Clazz_overrideMethod (c$, "addImpl", 
45435 function (comp, constraints, index) {
45436 if (this.isRootPaneCheckingEnabled ()) {
45437 return this.getContentPane ().add (comp, constraints, index);
45438 }return this.addImplSAEM (comp, constraints, index);
45439 }, "java.awt.Component,~O,~N");
45440 Clazz_defineMethod (c$, "remove", 
45441 function (comp) {
45442 if (comp === this.rootPane) {
45443 this.removeChild (comp);
45444 } else {
45445 this.getContentPane ().removeChild (comp);
45446 }}, "java.awt.Component");
45447 Clazz_defineMethod (c$, "setLayout", 
45448 function (manager) {
45449 if (this.isRootPaneCheckingEnabled ()) {
45450 this.getContentPane ().setLayout (manager);
45451 } else {
45452 Clazz_superCall (this, javax.swing.JWindow, "setLayout", [manager]);
45453 }}, "java.awt.LayoutManager");
45454 Clazz_overrideMethod (c$, "getRootPane", 
45455 function () {
45456 return this.rootPane;
45457 });
45458 Clazz_defineMethod (c$, "setRootPane", 
45459 function (root) {
45460 if (this.rootPane != null) {
45461 this.remove (this.rootPane);
45462 }this.rootPane = root;
45463 if (this.rootPane != null) {
45464 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45465 try {
45466 this.setRootPaneCheckingEnabled (false);
45467 this.add (this.rootPane, "Center");
45468 } finally {
45469 this.setRootPaneCheckingEnabled (checkingEnabled);
45470 }
45471 }}, "javax.swing.JRootPane");
45472 Clazz_overrideMethod (c$, "getContentPane", 
45473 function () {
45474 return this.getRootPane ().getContentPane ();
45475 });
45476 Clazz_overrideMethod (c$, "setContentPane", 
45477 function (contentPane) {
45478 this.getRootPane ().setContentPane (contentPane);
45479 }, "java.awt.Container");
45480 Clazz_overrideMethod (c$, "getLayeredPane", 
45481 function () {
45482 return this.getRootPane ().getLayeredPane ();
45483 });
45484 Clazz_overrideMethod (c$, "setLayeredPane", 
45485 function (layeredPane) {
45486 this.getRootPane ().setLayeredPane (layeredPane);
45487 }, "javax.swing.JLayeredPane");
45488 Clazz_overrideMethod (c$, "getGlassPane", 
45489 function () {
45490 return this.getRootPane ().getGlassPane ();
45491 });
45492 Clazz_overrideMethod (c$, "setGlassPane", 
45493 function (glassPane) {
45494 this.getRootPane ().setGlassPane (glassPane);
45495 }, "java.awt.Component");
45496 Clazz_defineMethod (c$, "getGraphics", 
45497 function () {
45498 javax.swing.JComponent.getGraphicsInvoked (this);
45499 return Clazz_superCall (this, javax.swing.JWindow, "getGraphics", []);
45500 });
45501 Clazz_defineMethod (c$, "repaint", 
45502 function (time, x, y, width, height) {
45503 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45504 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45505 } else {
45506 Clazz_superCall (this, javax.swing.JWindow, "repaint", [time, x, y, width, height]);
45507 }}, "~N,~N,~N,~N,~N");
45508 Clazz_defineMethod (c$, "paramString", 
45509 function () {
45510 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45511 return Clazz_superCall (this, javax.swing.JWindow, "paramString", []) + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45512 });
45513 });
45514 Clazz_declarePackage ("javax.swing");
45515 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 () {
45516 c$ = Clazz_decorateAsClass (function () {
45517 this.containerMap = null;
45518 this.componentKeyStrokeMap = null;
45519 if (!Clazz_isClassDefined ("javax.swing.KeyboardManager.ComponentKeyStrokePair")) {
45520 javax.swing.KeyboardManager.$KeyboardManager$ComponentKeyStrokePair$ ();
45521 }
45522 Clazz_instantialize (this, arguments);
45523 }, javax.swing, "KeyboardManager");
45524 Clazz_prepareFields (c$, function () {
45525 this.containerMap =  new java.util.Hashtable ();
45526 this.componentKeyStrokeMap =  new java.util.Hashtable ();
45527 });
45528 c$.getCurrentManager = Clazz_defineMethod (c$, "getCurrentManager", 
45529 function () {
45530 return javax.swing.KeyboardManager.currentManager;
45531 });
45532 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
45533 function (km) {
45534 javax.swing.KeyboardManager.currentManager = km;
45535 }, "javax.swing.KeyboardManager");
45536 Clazz_defineMethod (c$, "registerKeyStroke", 
45537 function (k, c) {
45538 var topContainer = javax.swing.KeyboardManager.getTopAncestor (c);
45539 if (topContainer == null) {
45540 return;
45541 }var keyMap = this.containerMap.get (topContainer);
45542 if (keyMap == null) {
45543 keyMap = this.registerNewTopContainer (topContainer);
45544 }var tmp = keyMap.get (k);
45545 if (tmp == null) {
45546 keyMap.put (k, c);
45547 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45548 var v = tmp;
45549 if (!v.contains (c)) {
45550 v.addElement (c);
45551 }} else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45552 if (tmp !== c) {
45553 var v =  new java.util.Vector ();
45554 v.addElement (tmp);
45555 v.addElement (c);
45556 keyMap.put (k, v);
45557 }} else {
45558 System.out.println ("Unexpected condition in registerKeyStroke");
45559 Thread.dumpStack ();
45560 }this.componentKeyStrokeMap.put (Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, k), topContainer);
45561 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45562 c$.getTopAncestor = Clazz_defineMethod (c$, "getTopAncestor", 
45563  function (c) {
45564 for (var p = c.getParent (); p != null; p = p.getParent ()) {
45565 if (Clazz_instanceOf (p, java.awt.Window) && (p).isFocusableWindow () || Clazz_instanceOf (p, java.applet.Applet)) {
45566 return p;
45567 }}
45568 return null;
45569 }, "javax.swing.JComponent");
45570 Clazz_defineMethod (c$, "unregisterKeyStroke", 
45571 function (ks, c) {
45572 var ckp = Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, ks);
45573 var topContainer = this.componentKeyStrokeMap.get (ckp);
45574 if (topContainer == null) {
45575 return;
45576 }var keyMap = this.containerMap.get (topContainer);
45577 if (keyMap == null) {
45578 Thread.dumpStack ();
45579 return;
45580 }var tmp = keyMap.get (ks);
45581 if (tmp == null) {
45582 Thread.dumpStack ();
45583 return;
45584 }if (Clazz_instanceOf (tmp, javax.swing.JComponent) && tmp === c) {
45585 keyMap.remove (ks);
45586 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45587 var v = tmp;
45588 v.removeElement (c);
45589 if (v.isEmpty ()) {
45590 keyMap.remove (ks);
45591 }}if (keyMap.isEmpty ()) {
45592 this.containerMap.remove (topContainer);
45593 }this.componentKeyStrokeMap.remove (ckp);
45594 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45595 Clazz_defineMethod (c$, "fireKeyboardAction", 
45596 function (e, pressed, topAncestor) {
45597 if (e.isConsumed ()) {
45598 System.out.println ("Aquired pre-used event!");
45599 Thread.dumpStack ();
45600 }var ks;
45601 if (e.getID () == 400) {
45602 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
45603 } else {
45604 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), !pressed);
45605 }var keyMap = this.containerMap.get (topAncestor);
45606 if (keyMap != null) {
45607 var tmp = keyMap.get (ks);
45608 if (tmp == null) {
45609 } else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45610 var c = tmp;
45611 if (c.isShowing () && c.isEnabled ()) {
45612 this.fireBinding (c, ks, e, pressed);
45613 }} else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45614 var v = tmp;
45615 for (var counter = v.size () - 1; counter >= 0; counter--) {
45616 var c = v.elementAt (counter);
45617 if (c.isShowing () && c.isEnabled ()) {
45618 this.fireBinding (c, ks, e, pressed);
45619 if (e.isConsumed ()) return true;
45620 }}
45621 } else {
45622 System.out.println ("Unexpected condition in fireKeyboardAction " + tmp);
45623 Thread.dumpStack ();
45624 }}if (e.isConsumed ()) {
45625 return true;
45626 }if (keyMap != null) {
45627 var v = keyMap.get (javax.swing.JMenuBar);
45628 if (v != null) {
45629 var iter = v.elements ();
45630 while (iter.hasMoreElements ()) {
45631 var mb = iter.nextElement ();
45632 if (mb.isShowing () && mb.isEnabled ()) {
45633 this.fireBinding (mb, ks, e, pressed);
45634 if (e.isConsumed ()) {
45635 return true;
45636 }}}
45637 }}return e.isConsumed ();
45638 }, "java.awt.event.KeyEvent,~B,java.awt.Container");
45639 Clazz_defineMethod (c$, "fireBinding", 
45640 function (c, ks, e, pressed) {
45641 if (c.processKeyBinding (ks, e, 2, pressed)) {
45642 e.consume ();
45643 }}, "javax.swing.JComponent,javax.swing.KeyStroke,java.awt.event.KeyEvent,~B");
45644 Clazz_defineMethod (c$, "registerMenuBar", 
45645 function (mb) {
45646 var top = javax.swing.KeyboardManager.getTopAncestor (mb);
45647 if (top == null) {
45648 return;
45649 }var keyMap = this.containerMap.get (top);
45650 if (keyMap == null) {
45651 keyMap = this.registerNewTopContainer (top);
45652 }var menuBars = keyMap.get (javax.swing.JMenuBar);
45653 if (menuBars == null) {
45654 menuBars =  new java.util.Vector ();
45655 keyMap.put (javax.swing.JMenuBar, menuBars);
45656 }if (!menuBars.contains (mb)) {
45657 menuBars.addElement (mb);
45658 }}, "javax.swing.JMenuBar");
45659 Clazz_defineMethod (c$, "unregisterMenuBar", 
45660 function (mb) {
45661 var topContainer = javax.swing.KeyboardManager.getTopAncestor (mb);
45662 if (topContainer == null) {
45663 return;
45664 }var keyMap = this.containerMap.get (topContainer);
45665 if (keyMap != null) {
45666 var v = keyMap.get (javax.swing.JMenuBar);
45667 if (v != null) {
45668 v.removeElement (mb);
45669 if (v.isEmpty ()) {
45670 keyMap.remove (javax.swing.JMenuBar);
45671 if (keyMap.isEmpty ()) {
45672 this.containerMap.remove (topContainer);
45673 }}}}}, "javax.swing.JMenuBar");
45674 Clazz_defineMethod (c$, "registerNewTopContainer", 
45675 function (topContainer) {
45676 var keyMap =  new java.util.Hashtable ();
45677 this.containerMap.put (topContainer, keyMap);
45678 return keyMap;
45679 }, "java.awt.Container");
45680 c$.$KeyboardManager$ComponentKeyStrokePair$ = function () {
45681 Clazz_pu$h(self.c$);
45682 c$ = Clazz_decorateAsClass (function () {
45683 Clazz_prepareCallback (this, arguments);
45684 this.component = null;
45685 this.keyStroke = null;
45686 Clazz_instantialize (this, arguments);
45687 }, javax.swing.KeyboardManager, "ComponentKeyStrokePair");
45688 Clazz_makeConstructor (c$, 
45689 function (a, b) {
45690 this.component = a;
45691 this.keyStroke = b;
45692 }, "~O,~O");
45693 Clazz_defineMethod (c$, "equals", 
45694 function (a) {
45695 if (!(Clazz_instanceOf (a, javax.swing.KeyboardManager.ComponentKeyStrokePair))) {
45696 return false;
45697 }var b = a;
45698 return ((this.component.equals (b.component)) && (this.keyStroke.equals (b.keyStroke)));
45699 }, "~O");
45700 Clazz_defineMethod (c$, "hashCode", 
45701 function () {
45702 return this.component.hashCode () * this.keyStroke.hashCode ();
45703 });
45704 c$ = Clazz_p0p ();
45705 };
45706 c$.currentManager = c$.prototype.currentManager =  new javax.swing.KeyboardManager ();
45707 });
45708 Clazz_declarePackage ("javax.swing");
45709 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 () {
45710 c$ = Clazz_decorateAsClass (function () {
45711 this.selectionModel = null;
45712 this.$paintBorder = true;
45713 this.margin = null;
45714 Clazz_instantialize (this, arguments);
45715 }, javax.swing, "JMenuBar", javax.swing.JComponent, javax.swing.MenuElement);
45716 Clazz_makeConstructor (c$, 
45717 function () {
45718 Clazz_superConstructor (this, javax.swing.JMenuBar);
45719 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
45720 this.updateUI ();
45721 });
45722 Clazz_overrideMethod (c$, "getUI", 
45723 function () {
45724 return this.ui;
45725 });
45726 Clazz_overrideMethod (c$, "updateUI", 
45727 function () {
45728 this.setUI (javax.swing.UIManager.getUI (this));
45729 });
45730 Clazz_overrideMethod (c$, "getUIClassID", 
45731 function () {
45732 return "MenuBarUI";
45733 });
45734 Clazz_defineMethod (c$, "getSelectionModel", 
45735 function () {
45736 return this.selectionModel;
45737 });
45738 Clazz_defineMethod (c$, "setSelectionModel", 
45739 function (model) {
45740 var oldValue = this.selectionModel;
45741 this.selectionModel = model;
45742 this.firePropertyChangeObject ("selectionModel", oldValue, this.selectionModel);
45743 }, "javax.swing.SingleSelectionModel");
45744 Clazz_defineMethod (c$, "add", 
45745 function (c) {
45746 Clazz_superCall (this, javax.swing.JMenuBar, "add", [c]);
45747 return c;
45748 }, "javax.swing.JMenu");
45749 Clazz_defineMethod (c$, "getMenu", 
45750 function (index) {
45751 var c = this.getComponentAtIndex (index);
45752 if (Clazz_instanceOf (c, javax.swing.JMenu)) return c;
45753 return null;
45754 }, "~N");
45755 Clazz_defineMethod (c$, "getMenuCount", 
45756 function () {
45757 return this.getComponentCount ();
45758 });
45759 Clazz_defineMethod (c$, "setHelpMenu", 
45760 function (menu) {
45761 throw  new Error ("setHelpMenu() not yet implemented.");
45762 }, "javax.swing.JMenu");
45763 Clazz_defineMethod (c$, "getHelpMenu", 
45764 function () {
45765 throw  new Error ("getHelpMenu() not yet implemented.");
45766 });
45767 Clazz_defineMethod (c$, "getComponentAtIndex", 
45768 function (i) {
45769 if (i < 0 || i >= this.getComponentCount ()) {
45770 return null;
45771 }return this.getComponent (i);
45772 }, "~N");
45773 Clazz_defineMethod (c$, "getComponentIndex", 
45774 function (c) {
45775 var ncomponents = this.getComponentCount ();
45776 var component = this.getComponents ();
45777 for (var i = 0; i < ncomponents; i++) {
45778 var comp = component[i];
45779 if (comp === c) return i;
45780 }
45781 return -1;
45782 }, "java.awt.Component");
45783 Clazz_defineMethod (c$, "setSelected", 
45784 function (sel) {
45785 var model = this.getSelectionModel ();
45786 var index = this.getComponentIndex (sel);
45787 model.setSelectedIndex (index);
45788 }, "java.awt.Component");
45789 Clazz_defineMethod (c$, "isSelected", 
45790 function () {
45791 return this.selectionModel.isSelected ();
45792 });
45793 Clazz_defineMethod (c$, "isBorderPainted", 
45794 function () {
45795 return this.$paintBorder;
45796 });
45797 Clazz_defineMethod (c$, "setBorderPainted", 
45798 function (b) {
45799 var oldValue = this.$paintBorder;
45800 this.$paintBorder = b;
45801 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
45802 if (b != oldValue) {
45803 this.revalidate ();
45804 this.repaint ();
45805 }}, "~B");
45806 Clazz_defineMethod (c$, "paintBorder", 
45807 function (g) {
45808 if (this.isBorderPainted ()) {
45809 Clazz_superCall (this, javax.swing.JMenuBar, "paintBorder", [g]);
45810 }}, "java.awt.Graphics");
45811 Clazz_defineMethod (c$, "setMargin", 
45812 function (m) {
45813 var old = this.margin;
45814 this.margin = m;
45815 this.firePropertyChangeObject ("margin", old, m);
45816 if (old == null || !old.equals (m)) {
45817 this.revalidate ();
45818 this.repaint ();
45819 }}, "java.awt.Insets");
45820 Clazz_defineMethod (c$, "getMargin", 
45821 function () {
45822 if (this.margin == null) {
45823 return  new java.awt.Insets (0, 0, 0, 0);
45824 } else {
45825 return this.margin;
45826 }});
45827 Clazz_defineMethod (c$, "processMouseEvent", 
45828 function (event, path, manager) {
45829 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
45830 Clazz_defineMethod (c$, "processKeyEvent", 
45831 function (e, path, manager) {
45832 }, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
45833 Clazz_overrideMethod (c$, "menuSelectionChanged", 
45834 function (isIncluded) {
45835 }, "~B");
45836 Clazz_defineMethod (c$, "getSubElements", 
45837 function () {
45838 var result;
45839 var tmp =  new java.util.Vector ();
45840 var c = this.getComponentCount ();
45841 var i;
45842 var m;
45843 for (i = 0; i < c; i++) {
45844 m = this.getComponent (i);
45845 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
45846 }
45847 result =  new Array (tmp.size ());
45848 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
45849
45850 return result;
45851 });
45852 Clazz_defineMethod (c$, "getComponent", 
45853 function () {
45854 return this;
45855 });
45856 Clazz_defineMethod (c$, "paramString", 
45857 function () {
45858 var paintBorderString = (this.$paintBorder ? "true" : "false");
45859 var marginString = (this.margin != null ? this.margin.toString () : "");
45860 return Clazz_superCall (this, javax.swing.JMenuBar, "paramString", []) + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
45861 });
45862 Clazz_defineMethod (c$, "processKeyBinding", 
45863 function (ks, e, condition, pressed) {
45864 var retValue = Clazz_superCall (this, javax.swing.JMenuBar, "processKeyBinding", [ks, e, condition, pressed]);
45865 if (!retValue) {
45866 var subElements = this.getSubElements ();
45867 for (var i = 0; i < subElements.length; i++) {
45868 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45869 return true;
45870 }}
45871 }return retValue;
45872 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45873 c$.processBindingForKeyStrokeRecursive = Clazz_defineMethod (c$, "processBindingForKeyStrokeRecursive", 
45874 function (elem, ks, e, condition, pressed) {
45875 if (elem == null) {
45876 return false;
45877 }var c = elem.getComponent ();
45878 if (!(c.isVisible () || (Clazz_instanceOf (c, javax.swing.JPopupMenu))) || !c.isEnabled ()) {
45879 return false;
45880 }if (c != null && Clazz_instanceOf (c, javax.swing.JComponent) && (c).processKeyBinding (ks, e, condition, pressed)) {
45881 return true;
45882 }var subElements = elem.getSubElements ();
45883 for (var i = 0; i < subElements.length; i++) {
45884 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45885 return true;
45886 }}
45887 return false;
45888 }, "javax.swing.MenuElement,javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45889 Clazz_defineMethod (c$, "addNotify", 
45890 function () {
45891 Clazz_superCall (this, javax.swing.JMenuBar, "addNotify", []);
45892 javax.swing.KeyboardManager.getCurrentManager ().registerMenuBar (this);
45893 });
45894 Clazz_defineMethod (c$, "removeNotify", 
45895 function () {
45896 Clazz_superCall (this, javax.swing.JMenuBar, "removeNotify", []);
45897 javax.swing.KeyboardManager.getCurrentManager ().unregisterMenuBar (this);
45898 });
45899 Clazz_defineStatics (c$,
45900 "$uiClassID", "MenuBarUI");
45901 });
45902 Clazz_declarePackage ("javax.swing");
45903 Clazz_declareInterface (javax.swing, "MenuElement");
45904 Clazz_declarePackage ("javax.swing");
45905 Clazz_load (["javax.swing.SingleSelectionModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultSingleSelectionModel", ["javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
45906 c$ = Clazz_decorateAsClass (function () {
45907 this.changeEvent = null;
45908 this.listenerList = null;
45909 this.index = -1;
45910 Clazz_instantialize (this, arguments);
45911 }, javax.swing, "DefaultSingleSelectionModel", null, javax.swing.SingleSelectionModel);
45912 Clazz_prepareFields (c$, function () {
45913 this.listenerList =  new javax.swing.event.EventListenerList ();
45914 });
45915 Clazz_overrideMethod (c$, "getSelectedIndex", 
45916 function () {
45917 return this.index;
45918 });
45919 Clazz_overrideMethod (c$, "setSelectedIndex", 
45920 function (index) {
45921 if (this.index != index) {
45922 this.index = index;
45923 this.fireStateChanged ();
45924 }}, "~N");
45925 Clazz_overrideMethod (c$, "clearSelection", 
45926 function () {
45927 this.setSelectedIndex (-1);
45928 });
45929 Clazz_overrideMethod (c$, "isSelected", 
45930 function () {
45931 var ret = false;
45932 if (this.getSelectedIndex () != -1) {
45933 ret = true;
45934 }return ret;
45935 });
45936 Clazz_overrideMethod (c$, "addChangeListener", 
45937 function (l) {
45938 this.listenerList.add (javax.swing.event.ChangeListener, l);
45939 }, "javax.swing.event.ChangeListener");
45940 Clazz_overrideMethod (c$, "removeChangeListener", 
45941 function (l) {
45942 this.listenerList.remove (javax.swing.event.ChangeListener, l);
45943 }, "javax.swing.event.ChangeListener");
45944 Clazz_defineMethod (c$, "getChangeListeners", 
45945 function () {
45946 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
45947 });
45948 Clazz_defineMethod (c$, "fireStateChanged", 
45949 function () {
45950 var listeners = this.listenerList.getListenerList ();
45951 for (var i = listeners.length - 2; i >= 0; i -= 2) {
45952 if (listeners[i] === javax.swing.event.ChangeListener) {
45953 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
45954 (listeners[i + 1]).stateChanged (this.changeEvent);
45955 }}
45956 });
45957 Clazz_defineMethod (c$, "getListeners", 
45958 function (listenerType) {
45959 return this.listenerList.getListeners (listenerType);
45960 }, "Class");
45961 });
45962 Clazz_declarePackage ("javax.swing");
45963 Clazz_declareInterface (javax.swing, "SingleSelectionModel");
45964 Clazz_declarePackage ("javax.swing");
45965 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 () {
45966 c$ = Clazz_decorateAsClass (function () {
45967 this.$popupMenu = null;
45968 this.menuChangeListener = null;
45969 this.menuEvent = null;
45970 this.delay = 0;
45971 this.customMenuLocation = null;
45972 this.popupListener = null;
45973 if (!Clazz_isClassDefined ("javax.swing.JMenu.MenuChangeListener")) {
45974 javax.swing.JMenu.$JMenu$MenuChangeListener$ ();
45975 }
45976 if (!Clazz_isClassDefined ("javax.swing.JMenu.WinListener")) {
45977 javax.swing.JMenu.$JMenu$WinListener$ ();
45978 }
45979 Clazz_instantialize (this, arguments);
45980 }, javax.swing, "JMenu", javax.swing.JMenuItem, javax.swing.MenuElement);
45981 Clazz_makeConstructor (c$, 
45982 function () {
45983 Clazz_superConstructor (this, javax.swing.JMenu, []);
45984 this.init0 ("", null, -2147483648);
45985 });
45986 Clazz_makeConstructor (c$, 
45987 function (s) {
45988 Clazz_superConstructor (this, javax.swing.JMenu, []);
45989 this.init0 (s, null, -2147483648);
45990 }, "~S");
45991 Clazz_makeConstructor (c$, 
45992 function (a) {
45993 Clazz_superConstructor (this, javax.swing.JMenu, []);
45994 this.init0 ("", null, -2147483648);
45995 this.setAction (a);
45996 }, "javax.swing.Action");
45997 Clazz_makeConstructor (c$, 
45998 function (s, b) {
45999 Clazz_superConstructor (this, javax.swing.JMenu, []);
46000 this.init0 (s, null, -2147483648);
46001 }, "~S,~B");
46002 Clazz_overrideMethod (c$, "initFocusability", 
46003 function () {
46004 });
46005 Clazz_overrideMethod (c$, "updateUI", 
46006 function () {
46007 this.setUI (javax.swing.UIManager.getUI (this));
46008 if (this.$popupMenu != null) {
46009 this.$popupMenu.setUI (javax.swing.UIManager.getUI (this.$popupMenu));
46010 }});
46011 Clazz_overrideMethod (c$, "getUIClassID", 
46012 function () {
46013 return "MenuUI";
46014 });
46015 Clazz_defineMethod (c$, "setModel", 
46016 function (newModel) {
46017 var oldModel = this.getModel ();
46018 Clazz_superCall (this, javax.swing.JMenu, "setModel", [newModel]);
46019 if (oldModel != null && this.menuChangeListener != null) {
46020 oldModel.removeChangeListener (this.menuChangeListener);
46021 this.menuChangeListener = null;
46022 }this.model = newModel;
46023 if (newModel != null) {
46024 this.menuChangeListener = this.createMenuChangeListener ();
46025 newModel.addChangeListener (this.menuChangeListener);
46026 }}, "javax.swing.ButtonModel");
46027 Clazz_overrideMethod (c$, "isSelected", 
46028 function () {
46029 return this.getModel ().isSelected ();
46030 });
46031 Clazz_overrideMethod (c$, "setSelected", 
46032 function (b) {
46033 var model = this.getModel ();
46034 if (b != model.isSelected ()) {
46035 this.getModel ().setSelected (b);
46036 }}, "~B");
46037 Clazz_defineMethod (c$, "isPopupMenuVisible", 
46038 function () {
46039 this.ensurePopupMenuCreated ();
46040 return this.$popupMenu.isVisible ();
46041 });
46042 Clazz_defineMethod (c$, "setPopupMenuVisible", 
46043 function (b) {
46044 var isVisible = this.isPopupMenuVisible ();
46045 if (b != isVisible && (this.isEnabled () || !b)) {
46046 this.ensurePopupMenuCreated ();
46047 if ((b == true) && this.isShowing ()) {
46048 var p = this.getCustomMenuLocation ();
46049 if (p == null) {
46050 p = this.getPopupMenuOrigin ();
46051 }this.getPopupMenu ().show (this, p.x, p.y);
46052 } else {
46053 this.getPopupMenu ().setVisible (false);
46054 }}}, "~B");
46055 Clazz_defineMethod (c$, "getPopupMenuOrigin", 
46056 function () {
46057 var x = 0;
46058 var y = 0;
46059 var pm = this.getPopupMenu ();
46060 var s = this.getSize ();
46061 var pmSize = pm.getSize ();
46062 if (pmSize.width == 0) {
46063 pmSize = pm.getPreferredSize ();
46064 }var position = this.getLocationOnScreen ();
46065 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
46066 var gc = this.getGraphicsConfiguration ();
46067 var screenBounds =  new java.awt.Rectangle (toolkit.getScreenSize ());
46068 if (gc != null) {
46069 screenBounds = gc.getBounds ();
46070 var screenInsets = toolkit.getScreenInsets (gc);
46071 screenBounds.width -= Math.abs (screenInsets.left + screenInsets.right);
46072 screenBounds.height -= Math.abs (screenInsets.top + screenInsets.bottom);
46073 position.x -= Math.abs (screenInsets.left);
46074 position.y -= Math.abs (screenInsets.top);
46075 }var parent = this.getParent ();
46076 if (Clazz_instanceOf (parent, javax.swing.JPopupMenu)) {
46077 var xOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetX");
46078 var yOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetY");
46079 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
46080 x = s.width + xOffset;
46081 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
46082 x = 0 - xOffset - pmSize.width;
46083 }} else {
46084 x = 0 - xOffset - pmSize.width;
46085 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
46086 x = s.width + xOffset;
46087 }}y = yOffset;
46088 if (position.y + y + pmSize.height >= screenBounds.height + screenBounds.y && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
46089 y = s.height - yOffset - pmSize.height;
46090 }} else {
46091 var xOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetX");
46092 var yOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetY");
46093 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
46094 x = xOffset;
46095 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
46096 x = s.width - xOffset - pmSize.width;
46097 }} else {
46098 x = s.width - xOffset - pmSize.width;
46099 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
46100 x = xOffset;
46101 }}y = s.height + yOffset;
46102 if (position.y + y + pmSize.height >= screenBounds.height && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
46103 y = 0 - yOffset - pmSize.height;
46104 }}return  new java.awt.Point (x, y);
46105 });
46106 Clazz_defineMethod (c$, "getDelay", 
46107 function () {
46108 return this.delay;
46109 });
46110 Clazz_defineMethod (c$, "setDelay", 
46111 function (d) {
46112 if (d < 0) throw  new IllegalArgumentException ("Delay must be a positive integer");
46113 this.delay = d;
46114 }, "~N");
46115 Clazz_defineMethod (c$, "ensurePopupMenuCreated", 
46116  function () {
46117 if (this.$popupMenu == null) {
46118 this.$popupMenu =  new javax.swing.JPopupMenu ();
46119 this.$popupMenu.setInvoker (this);
46120 this.popupListener = this.createWinListener (this.$popupMenu);
46121 }});
46122 Clazz_defineMethod (c$, "getCustomMenuLocation", 
46123  function () {
46124 return this.customMenuLocation;
46125 });
46126 Clazz_defineMethod (c$, "setMenuLocation", 
46127 function (x, y) {
46128 this.customMenuLocation =  new java.awt.Point (x, y);
46129 if (this.$popupMenu != null) this.$popupMenu.setLocation (x, y);
46130 }, "~N,~N");
46131 Clazz_defineMethod (c$, "add", 
46132 function (menuItem) {
46133 this.ensurePopupMenuCreated ();
46134 return this.$popupMenu.add (menuItem);
46135 }, "javax.swing.JMenuItem");
46136 Clazz_defineMethod (c$, "add", 
46137 function (c) {
46138 this.ensurePopupMenuCreated ();
46139 this.$popupMenu.add (c);
46140 return c;
46141 }, "java.awt.Component");
46142 Clazz_defineMethod (c$, "add", 
46143 function (c, index) {
46144 this.ensurePopupMenuCreated ();
46145 this.$popupMenu.add (c, index);
46146 return c;
46147 }, "java.awt.Component,~N");
46148 Clazz_defineMethod (c$, "add", 
46149 function (s) {
46150 return this.add ( new javax.swing.JMenuItem (s));
46151 }, "~S");
46152 Clazz_defineMethod (c$, "add", 
46153 function (a) {
46154 var mi = this.createActionComponent (a);
46155 mi.setAction (a);
46156 this.add (mi);
46157 return mi;
46158 }, "javax.swing.Action");
46159 Clazz_defineMethod (c$, "createActionComponent", 
46160 function (a) {
46161 var mi = ((Clazz_isClassDefined ("javax.swing.JMenu$1") ? 0 : javax.swing.JMenu.$JMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JMenu$1, this, null));
46162 mi.setHorizontalTextPosition (11);
46163 mi.setVerticalTextPosition (0);
46164 return mi;
46165 }, "javax.swing.Action");
46166 Clazz_defineMethod (c$, "createActionChangeListener", 
46167 function (b) {
46168 return b.createActionPropertyChangeListener0 (b.getAction ());
46169 }, "javax.swing.JMenuItem");
46170 Clazz_defineMethod (c$, "addSeparator", 
46171 function () {
46172 this.ensurePopupMenuCreated ();
46173 this.$popupMenu.addSeparator ();
46174 });
46175 Clazz_defineMethod (c$, "insert", 
46176 function (s, pos) {
46177 if (pos < 0) {
46178 throw  new IllegalArgumentException ("index less than zero.");
46179 }this.ensurePopupMenuCreated ();
46180 this.$popupMenu.insert ( new javax.swing.JMenuItem (s), pos);
46181 }, "~S,~N");
46182 Clazz_defineMethod (c$, "insert", 
46183 function (mi, pos) {
46184 if (pos < 0) {
46185 throw  new IllegalArgumentException ("index less than zero.");
46186 }this.ensurePopupMenuCreated ();
46187 this.$popupMenu.insert (mi, pos);
46188 return mi;
46189 }, "javax.swing.JMenuItem,~N");
46190 Clazz_defineMethod (c$, "insert", 
46191 function (a, pos) {
46192 if (pos < 0) {
46193 throw  new IllegalArgumentException ("index less than zero.");
46194 }this.ensurePopupMenuCreated ();
46195 var mi =  new javax.swing.JMenuItem (a);
46196 mi.setHorizontalTextPosition (11);
46197 mi.setVerticalTextPosition (0);
46198 this.$popupMenu.insert (mi, pos);
46199 return mi;
46200 }, "javax.swing.Action,~N");
46201 Clazz_defineMethod (c$, "insertSeparator", 
46202 function (index) {
46203 if (index < 0) {
46204 throw  new IllegalArgumentException ("index less than zero.");
46205 }this.ensurePopupMenuCreated ();
46206 this.$popupMenu.insert ( new javax.swing.JPopupMenu.Separator (), index);
46207 }, "~N");
46208 Clazz_defineMethod (c$, "getItem", 
46209 function (pos) {
46210 if (pos < 0) {
46211 throw  new IllegalArgumentException ("index less than zero.");
46212 }var c = this.getMenuComponent (pos);
46213 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) {
46214 var mi = c;
46215 return mi;
46216 }return null;
46217 }, "~N");
46218 Clazz_defineMethod (c$, "getItemCount", 
46219 function () {
46220 return this.getMenuComponentCount ();
46221 });
46222 Clazz_defineMethod (c$, "isTearOff", 
46223 function () {
46224 throw  new Error ("boolean isTearOff() {} not yet implemented");
46225 });
46226 Clazz_defineMethod (c$, "remove", 
46227 function (pos) {
46228 if (pos < 0) {
46229 throw  new IllegalArgumentException ("index less than zero.");
46230 }if (pos > this.getItemCount ()) {
46231 throw  new IllegalArgumentException ("index greater than the number of items.");
46232 }if (this.$popupMenu != null) this.$popupMenu.remove (pos);
46233 }, "~N");
46234 Clazz_defineMethod (c$, "remove", 
46235 function (c) {
46236 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) if (this.$popupMenu != null) this.$popupMenu.remove (c);
46237 if (this.$popupMenu != null) this.$popupMenu.remove (c);
46238 }, "java.awt.Component");
46239 Clazz_defineMethod (c$, "removeAll", 
46240 function () {
46241 if (this.$popupMenu != null) this.$popupMenu.removeAll ();
46242 });
46243 Clazz_defineMethod (c$, "getMenuComponentCount", 
46244 function () {
46245 var componentCount = 0;
46246 if (this.$popupMenu != null) componentCount = this.$popupMenu.getComponentCount ();
46247 return componentCount;
46248 });
46249 Clazz_defineMethod (c$, "getMenuComponent", 
46250 function (n) {
46251 if (this.$popupMenu != null) return this.$popupMenu.getComponent (n);
46252 return null;
46253 }, "~N");
46254 Clazz_defineMethod (c$, "getMenuComponents", 
46255 function () {
46256 if (this.$popupMenu != null) return this.$popupMenu.getComponents ();
46257 return  new Array (0);
46258 });
46259 Clazz_defineMethod (c$, "isTopLevelMenu", 
46260 function () {
46261 if (Clazz_instanceOf (this.getParent (), javax.swing.JMenuBar)) return true;
46262 return false;
46263 });
46264 Clazz_defineMethod (c$, "isMenuComponent", 
46265 function (c) {
46266 if (c === this) return true;
46267 if (Clazz_instanceOf (c, javax.swing.JPopupMenu)) {
46268 var comp = c;
46269 if (comp === this.getPopupMenu ()) return true;
46270 }var ncomponents = this.getMenuComponentCount ();
46271 var component = this.getMenuComponents ();
46272 for (var i = 0; i < ncomponents; i++) {
46273 var comp = component[i];
46274 if (comp === c) return true;
46275 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
46276 var subMenu = comp;
46277 if (subMenu.isMenuComponent (c)) return true;
46278 }}
46279 return false;
46280 }, "java.awt.Component");
46281 Clazz_defineMethod (c$, "getPopupMenu", 
46282 function () {
46283 this.ensurePopupMenuCreated ();
46284 return this.$popupMenu;
46285 });
46286 Clazz_defineMethod (c$, "addMenuListener", 
46287 function (l) {
46288 this.listenerList.add (javax.swing.event.MenuListener, l);
46289 }, "javax.swing.event.MenuListener");
46290 Clazz_defineMethod (c$, "removeMenuListener", 
46291 function (l) {
46292 this.listenerList.remove (javax.swing.event.MenuListener, l);
46293 }, "javax.swing.event.MenuListener");
46294 Clazz_defineMethod (c$, "getMenuListeners", 
46295 function () {
46296 return this.listenerList.getListeners (javax.swing.event.MenuListener);
46297 });
46298 Clazz_defineMethod (c$, "fireMenuSelected", 
46299 function () {
46300 var listeners = this.listenerList.getListenerList ();
46301 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46302 if (listeners[i] === javax.swing.event.MenuListener) {
46303 if (listeners[i + 1] == null) {
46304 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46305 } else {
46306 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46307 (listeners[i + 1]).menuSelected (this.menuEvent);
46308 }}}
46309 });
46310 Clazz_defineMethod (c$, "fireMenuDeselected", 
46311 function () {
46312 var listeners = this.listenerList.getListenerList ();
46313 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46314 if (listeners[i] === javax.swing.event.MenuListener) {
46315 if (listeners[i + 1] == null) {
46316 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46317 } else {
46318 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46319 (listeners[i + 1]).menuDeselected (this.menuEvent);
46320 }}}
46321 });
46322 Clazz_defineMethod (c$, "fireMenuCanceled", 
46323 function () {
46324 var listeners = this.listenerList.getListenerList ();
46325 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46326 if (listeners[i] === javax.swing.event.MenuListener) {
46327 if (listeners[i + 1] == null) {
46328 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46329 } else {
46330 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46331 (listeners[i + 1]).menuCanceled (this.menuEvent);
46332 }}}
46333 });
46334 Clazz_overrideMethod (c$, "configureAcceleratorFromAction", 
46335 function (a) {
46336 }, "javax.swing.Action");
46337 Clazz_defineMethod (c$, "createMenuChangeListener", 
46338  function () {
46339 return Clazz_innerTypeInstance (javax.swing.JMenu.MenuChangeListener, this, null);
46340 });
46341 Clazz_defineMethod (c$, "createWinListener", 
46342 function (p) {
46343 return Clazz_innerTypeInstance (javax.swing.JMenu.WinListener, this, null, p);
46344 }, "javax.swing.JPopupMenu");
46345 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46346 function (isIncluded) {
46347 this.setSelected (isIncluded);
46348 }, "~B");
46349 Clazz_overrideMethod (c$, "getSubElements", 
46350 function () {
46351 if (this.$popupMenu == null) return  new Array (0);
46352  else {
46353 var result =  new Array (1);
46354 result[0] = this.$popupMenu;
46355 return result;
46356 }});
46357 Clazz_defineMethod (c$, "getComponent", 
46358 function () {
46359 return this;
46360 });
46361 Clazz_defineMethod (c$, "applyComponentOrientation", 
46362 function (o) {
46363 Clazz_superCall (this, javax.swing.JMenu, "applyComponentOrientation", [o]);
46364 if (this.$popupMenu != null) {
46365 var ncomponents = this.getMenuComponentCount ();
46366 for (var i = 0; i < ncomponents; ++i) {
46367 this.getMenuComponent (i).applyComponentOrientation (o);
46368 }
46369 this.$popupMenu.setComponentOrientation (o);
46370 }}, "java.awt.ComponentOrientation");
46371 Clazz_defineMethod (c$, "setComponentOrientation", 
46372 function (o) {
46373 Clazz_superCall (this, javax.swing.JMenu, "setComponentOrientation", [o]);
46374 if (this.$popupMenu != null) {
46375 this.$popupMenu.setComponentOrientation (o);
46376 }}, "java.awt.ComponentOrientation");
46377 Clazz_overrideMethod (c$, "setAccelerator", 
46378 function (keyStroke) {
46379 throw  new Error ("setAccelerator() is not defined for JMenu.  Use setMnemonic() instead.");
46380 }, "javax.swing.KeyStroke");
46381 Clazz_defineMethod (c$, "processKeyEvent", 
46382 function (evt) {
46383 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46384 if (evt.isConsumed ()) return;
46385 Clazz_superCall (this, javax.swing.JMenu, "processKeyEvent", [evt]);
46386 }, "java.awt.event.KeyEvent");
46387 Clazz_defineMethod (c$, "doClick", 
46388 function (pressTime) {
46389 var me = this.buildMenuElementArray (this);
46390 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
46391 }, "~N");
46392 Clazz_defineMethod (c$, "buildMenuElementArray", 
46393  function (leaf) {
46394 var elements =  new java.util.Vector ();
46395 var current = leaf.getPopupMenu ();
46396 var pop;
46397 var menu;
46398 var bar;
46399 while (true) {
46400 if (Clazz_instanceOf (current, javax.swing.JPopupMenu)) {
46401 pop = current;
46402 elements.insertElementAt (pop, 0);
46403 current = pop.getInvoker ();
46404 } else if (Clazz_instanceOf (current, javax.swing.JMenu)) {
46405 menu = current;
46406 elements.insertElementAt (menu, 0);
46407 current = menu.getParent ();
46408 } else if (Clazz_instanceOf (current, javax.swing.JMenuBar)) {
46409 bar = current;
46410 elements.insertElementAt (bar, 0);
46411 var me =  new Array (elements.size ());
46412 elements.copyInto (me);
46413 return me;
46414 }}
46415 }, "javax.swing.JMenu");
46416 c$.$JMenu$MenuChangeListener$ = function () {
46417 Clazz_pu$h(self.c$);
46418 c$ = Clazz_decorateAsClass (function () {
46419 Clazz_prepareCallback (this, arguments);
46420 this.isSelected = false;
46421 Clazz_instantialize (this, arguments);
46422 }, javax.swing.JMenu, "MenuChangeListener", null, javax.swing.event.ChangeListener);
46423 Clazz_overrideMethod (c$, "stateChanged", 
46424 function (a) {
46425 var b = a.getSource ();
46426 var c = b.isSelected ();
46427 if (c != this.isSelected) {
46428 if (c == true) {
46429 this.b$["javax.swing.JMenu"].fireMenuSelected ();
46430 } else {
46431 this.b$["javax.swing.JMenu"].fireMenuDeselected ();
46432 }this.isSelected = c;
46433 }}, "javax.swing.event.ChangeEvent");
46434 c$ = Clazz_p0p ();
46435 };
46436 c$.$JMenu$WinListener$ = function () {
46437 Clazz_pu$h(self.c$);
46438 c$ = Clazz_decorateAsClass (function () {
46439 Clazz_prepareCallback (this, arguments);
46440 this.popupMenu = null;
46441 Clazz_instantialize (this, arguments);
46442 }, javax.swing.JMenu, "WinListener", java.awt.event.WindowAdapter);
46443 Clazz_makeConstructor (c$, 
46444 function (a) {
46445 Clazz_superConstructor (this, javax.swing.JMenu.WinListener, []);
46446 this.popupMenu = a;
46447 }, "javax.swing.JPopupMenu");
46448 Clazz_overrideMethod (c$, "windowClosing", 
46449 function (a) {
46450 this.b$["javax.swing.JMenu"].setSelected (false);
46451 }, "java.awt.event.WindowEvent");
46452 c$ = Clazz_p0p ();
46453 };
46454 c$.$JMenu$1$ = function () {
46455 Clazz_pu$h(self.c$);
46456 c$ = Clazz_declareAnonymous (javax.swing, "JMenu$1", javax.swing.JMenuItem);
46457 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
46458 function (a) {
46459 var pcl = this.b$["javax.swing.JMenu"].createActionChangeListener (this);
46460 if (pcl == null) {
46461 pcl = Clazz_superCall (this, javax.swing.JMenu$1, "createActionPropertyChangeListener", [a]);
46462 }return pcl;
46463 }, "javax.swing.Action");
46464 c$ = Clazz_p0p ();
46465 };
46466 Clazz_defineStatics (c$,
46467 "$$uiClassID", "MenuUI");
46468 });
46469 Clazz_declarePackage ("java.awt.event");
46470 Clazz_load (["java.awt.event.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.event.WindowAdapter", null, function () {
46471 c$ = Clazz_declareType (java.awt.event, "WindowAdapter", null, [java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.awt.event.WindowFocusListener]);
46472 Clazz_overrideMethod (c$, "windowOpened", 
46473 function (e) {
46474 }, "java.awt.event.WindowEvent");
46475 Clazz_overrideMethod (c$, "windowClosing", 
46476 function (e) {
46477 }, "java.awt.event.WindowEvent");
46478 Clazz_overrideMethod (c$, "windowClosed", 
46479 function (e) {
46480 }, "java.awt.event.WindowEvent");
46481 Clazz_overrideMethod (c$, "windowIconified", 
46482 function (e) {
46483 }, "java.awt.event.WindowEvent");
46484 Clazz_overrideMethod (c$, "windowDeiconified", 
46485 function (e) {
46486 }, "java.awt.event.WindowEvent");
46487 Clazz_overrideMethod (c$, "windowActivated", 
46488 function (e) {
46489 }, "java.awt.event.WindowEvent");
46490 Clazz_overrideMethod (c$, "windowDeactivated", 
46491 function (e) {
46492 }, "java.awt.event.WindowEvent");
46493 Clazz_overrideMethod (c$, "windowStateChanged", 
46494 function (e) {
46495 }, "java.awt.event.WindowEvent");
46496 Clazz_overrideMethod (c$, "windowGainedFocus", 
46497 function (e) {
46498 }, "java.awt.event.WindowEvent");
46499 Clazz_overrideMethod (c$, "windowLostFocus", 
46500 function (e) {
46501 }, "java.awt.event.WindowEvent");
46502 });
46503 Clazz_declarePackage ("javax.swing");
46504 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 () {
46505 c$ = Clazz_decorateAsClass (function () {
46506 this.isMouseDragged = false;
46507 this.accelerator = null;
46508 Clazz_instantialize (this, arguments);
46509 }, javax.swing, "JMenuItem", javax.swing.AbstractButton, javax.swing.MenuElement);
46510 Clazz_makeConstructor (c$, 
46511 function () {
46512 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46513 this.init0 (null, null, -2147483648);
46514 });
46515 Clazz_makeConstructor (c$, 
46516 function (icon) {
46517 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46518 this.init0 (null, icon, -2147483648);
46519 }, "javax.swing.Icon");
46520 Clazz_makeConstructor (c$, 
46521 function (text) {
46522 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46523 this.init0 (text, null, -2147483648);
46524 }, "~S");
46525 Clazz_makeConstructor (c$, 
46526 function (a) {
46527 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46528 this.init0 (null, null, -2147483648);
46529 this.setAction (a);
46530 }, "javax.swing.Action");
46531 Clazz_makeConstructor (c$, 
46532 function (text, icon) {
46533 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46534 this.init0 (text, icon, -2147483648);
46535 }, "~S,javax.swing.Icon");
46536 Clazz_makeConstructor (c$, 
46537 function (text, mnemonic) {
46538 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46539 this.init0 (text, null, mnemonic);
46540 }, "~S,~N");
46541 Clazz_defineMethod (c$, "setModel", 
46542 function (newModel) {
46543 Clazz_superCall (this, javax.swing.JMenuItem, "setModel", [newModel]);
46544 if (Clazz_instanceOf (newModel, javax.swing.DefaultButtonModel)) {
46545 (newModel).setMenuItem (true);
46546 }}, "javax.swing.ButtonModel");
46547 Clazz_defineMethod (c$, "initFocusability", 
46548 function () {
46549 this.setFocusable (false);
46550 });
46551 Clazz_defineMethod (c$, "init0", 
46552 function (text, icon, mnemonic) {
46553 this.setModel ( new javax.swing.DefaultButtonModel ());
46554 this.init (text, icon);
46555 if (mnemonic >= 0) this.setMnemonic (mnemonic);
46556 this.initFocusability ();
46557 }, "~S,javax.swing.Icon,~N");
46558 Clazz_overrideMethod (c$, "init", 
46559 function (text, icon) {
46560 this.updateUI ();
46561 if (text != null) this.setText (text);
46562 if (icon != null) this.setIcon (icon);
46563 this.addFocusListener ( new javax.swing.JMenuItem.MenuItemFocusListener ());
46564 this.setUIProperty ("borderPainted", Boolean.FALSE);
46565 this.setFocusPainted (false);
46566 this.setHorizontalTextPosition (11);
46567 this.setHorizontalAlignment (10);
46568 }, "~S,javax.swing.Icon");
46569 Clazz_overrideMethod (c$, "updateUI", 
46570 function () {
46571 this.setUI (javax.swing.UIManager.getUI (this));
46572 });
46573 Clazz_overrideMethod (c$, "getUIClassID", 
46574 function () {
46575 return "MenuItemUI";
46576 });
46577 Clazz_defineMethod (c$, "setArmed", 
46578 function (b) {
46579 var model = this.getModel ();
46580 if (model.isArmed () != b) {
46581 model.setArmed (b);
46582 }}, "~B");
46583 Clazz_defineMethod (c$, "isArmed", 
46584 function () {
46585 var model = this.getModel ();
46586 return model.isArmed ();
46587 });
46588 Clazz_defineMethod (c$, "setEnabled", 
46589 function (b) {
46590 if (!b && !javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
46591 this.setArmed (false);
46592 }Clazz_superCall (this, javax.swing.JMenuItem, "setEnabled", [b]);
46593 }, "~B");
46594 Clazz_overrideMethod (c$, "alwaysOnTop", 
46595 function () {
46596 return true;
46597 });
46598 Clazz_defineMethod (c$, "setAccelerator", 
46599 function (keyStroke) {
46600 var oldAccelerator = this.accelerator;
46601 this.accelerator = keyStroke;
46602 this.repaint ();
46603 this.revalidate ();
46604 this.firePropertyChangeObject ("accelerator", oldAccelerator, this.accelerator);
46605 }, "javax.swing.KeyStroke");
46606 Clazz_defineMethod (c$, "getAccelerator", 
46607 function () {
46608 return this.accelerator;
46609 });
46610 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
46611 function (a) {
46612 Clazz_superCall (this, javax.swing.JMenuItem, "configurePropertiesFromAction", [a]);
46613 this.configureAcceleratorFromAction (a);
46614 }, "javax.swing.Action");
46615 Clazz_overrideMethod (c$, "setIconFromAction", 
46616 function (a) {
46617 var icon = null;
46618 if (a != null) {
46619 icon = a.getValue ("SmallIcon");
46620 }this.setIcon (icon);
46621 }, "javax.swing.Action");
46622 Clazz_overrideMethod (c$, "largeIconChanged", 
46623 function (a) {
46624 }, "javax.swing.Action");
46625 Clazz_overrideMethod (c$, "smallIconChanged", 
46626 function (a) {
46627 this.setIconFromAction (a);
46628 }, "javax.swing.Action");
46629 Clazz_defineMethod (c$, "configureAcceleratorFromAction", 
46630 function (a) {
46631 var ks = (a == null) ? null : a.getValue ("AcceleratorKey");
46632 this.setAccelerator (ks);
46633 }, "javax.swing.Action");
46634 Clazz_defineMethod (c$, "actionPropertyChanged", 
46635 function (action, propertyName) {
46636 if (propertyName === "AcceleratorKey") {
46637 this.configureAcceleratorFromAction (action);
46638 } else {
46639 Clazz_superCall (this, javax.swing.JMenuItem, "actionPropertyChanged", [action, propertyName]);
46640 }}, "javax.swing.Action,~S");
46641 Clazz_defineMethod (c$, "processMouseEvent", 
46642 function (e, path, manager) {
46643 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));
46644 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
46645 Clazz_defineMethod (c$, "processKeyEvent", 
46646 function (e, path, manager) {
46647 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
46648 this.processMenuKeyEvent (mke);
46649 if (mke.isConsumed ()) {
46650 e.consume ();
46651 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
46652 Clazz_defineMethod (c$, "processMenuDragMouseEvent", 
46653 function (e) {
46654 switch (e.getID ()) {
46655 case 504:
46656 this.isMouseDragged = false;
46657 this.fireMenuDragMouseEntered (e);
46658 break;
46659 case 505:
46660 this.isMouseDragged = false;
46661 this.fireMenuDragMouseExited (e);
46662 break;
46663 case 506:
46664 this.isMouseDragged = true;
46665 this.fireMenuDragMouseDragged (e);
46666 break;
46667 case 502:
46668 if (this.isMouseDragged) this.fireMenuDragMouseReleased (e);
46669 break;
46670 default:
46671 break;
46672 }
46673 }, "javax.swing.event.MenuDragMouseEvent");
46674 Clazz_defineMethod (c$, "processMenuKeyEvent", 
46675 function (e) {
46676 switch (e.getID ()) {
46677 case 401:
46678 this.fireMenuKeyPressed (e);
46679 break;
46680 case 402:
46681 this.fireMenuKeyReleased (e);
46682 break;
46683 case 400:
46684 this.fireMenuKeyTyped (e);
46685 break;
46686 default:
46687 break;
46688 }
46689 }, "javax.swing.event.MenuKeyEvent");
46690 Clazz_defineMethod (c$, "fireMenuDragMouseEntered", 
46691 function (event) {
46692 var listeners = this.listenerList.getListenerList ();
46693 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46694 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46695 (listeners[i + 1]).menuDragMouseEntered (event);
46696 }}
46697 }, "javax.swing.event.MenuDragMouseEvent");
46698 Clazz_defineMethod (c$, "fireMenuDragMouseExited", 
46699 function (event) {
46700 var listeners = this.listenerList.getListenerList ();
46701 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46702 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46703 (listeners[i + 1]).menuDragMouseExited (event);
46704 }}
46705 }, "javax.swing.event.MenuDragMouseEvent");
46706 Clazz_defineMethod (c$, "fireMenuDragMouseDragged", 
46707 function (event) {
46708 var listeners = this.listenerList.getListenerList ();
46709 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46710 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46711 (listeners[i + 1]).menuDragMouseDragged (event);
46712 }}
46713 }, "javax.swing.event.MenuDragMouseEvent");
46714 Clazz_defineMethod (c$, "fireMenuDragMouseReleased", 
46715 function (event) {
46716 var listeners = this.listenerList.getListenerList ();
46717 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46718 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46719 (listeners[i + 1]).menuDragMouseReleased (event);
46720 }}
46721 }, "javax.swing.event.MenuDragMouseEvent");
46722 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
46723 function (event) {
46724 var listeners = this.listenerList.getListenerList ();
46725 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46726 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46727 (listeners[i + 1]).menuKeyPressed (event);
46728 }}
46729 }, "javax.swing.event.MenuKeyEvent");
46730 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
46731 function (event) {
46732 var listeners = this.listenerList.getListenerList ();
46733 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46734 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46735 (listeners[i + 1]).menuKeyReleased (event);
46736 }}
46737 }, "javax.swing.event.MenuKeyEvent");
46738 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
46739 function (event) {
46740 var listeners = this.listenerList.getListenerList ();
46741 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46742 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46743 (listeners[i + 1]).menuKeyTyped (event);
46744 }}
46745 }, "javax.swing.event.MenuKeyEvent");
46746 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46747 function (isIncluded) {
46748 this.setArmed (isIncluded);
46749 }, "~B");
46750 Clazz_overrideMethod (c$, "getSubElements", 
46751 function () {
46752 return  new Array (0);
46753 });
46754 Clazz_defineMethod (c$, "getComponent", 
46755 function () {
46756 return this;
46757 });
46758 Clazz_defineMethod (c$, "addMenuDragMouseListener", 
46759 function (l) {
46760 this.listenerList.add (javax.swing.event.MenuDragMouseListener, l);
46761 }, "javax.swing.event.MenuDragMouseListener");
46762 Clazz_defineMethod (c$, "removeMenuDragMouseListener", 
46763 function (l) {
46764 this.listenerList.remove (javax.swing.event.MenuDragMouseListener, l);
46765 }, "javax.swing.event.MenuDragMouseListener");
46766 Clazz_defineMethod (c$, "getMenuDragMouseListeners", 
46767 function () {
46768 return this.listenerList.getListeners (javax.swing.event.MenuDragMouseListener);
46769 });
46770 Clazz_defineMethod (c$, "addMenuKeyListener", 
46771 function (l) {
46772 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
46773 }, "javax.swing.event.MenuKeyListener");
46774 Clazz_defineMethod (c$, "removeMenuKeyListener", 
46775 function (l) {
46776 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
46777 }, "javax.swing.event.MenuKeyListener");
46778 Clazz_defineMethod (c$, "getMenuKeyListeners", 
46779 function () {
46780 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
46781 });
46782 Clazz_pu$h(self.c$);
46783 c$ = Clazz_declareType (javax.swing.JMenuItem, "MenuItemFocusListener", null, java.awt.event.FocusListener);
46784 Clazz_overrideMethod (c$, "focusGained", 
46785 function (a) {
46786 }, "java.awt.event.FocusEvent");
46787 Clazz_overrideMethod (c$, "focusLost", 
46788 function (a) {
46789 var b = a.getSource ();
46790 if (b.isFocusPainted ()) {
46791 b.repaint ();
46792 }}, "java.awt.event.FocusEvent");
46793 c$ = Clazz_p0p ();
46794 Clazz_defineStatics (c$,
46795 "$uiClassID", "MenuItemUI");
46796 });
46797 Clazz_declarePackage ("javax.swing");
46798 Clazz_load (["javax.swing.JMenuItem", "$.SwingConstants"], "javax.swing.JCheckBoxMenuItem", ["javax.swing.JToggleButton"], function () {
46799 c$ = Clazz_declareType (javax.swing, "JCheckBoxMenuItem", javax.swing.JMenuItem, javax.swing.SwingConstants);
46800 Clazz_makeConstructor (c$, 
46801 function () {
46802 this.construct (null, null, false);
46803 });
46804 Clazz_makeConstructor (c$, 
46805 function (icon) {
46806 this.construct (null, icon, false);
46807 }, "javax.swing.Icon");
46808 Clazz_makeConstructor (c$, 
46809 function (text) {
46810 this.construct (text, null, false);
46811 }, "~S");
46812 Clazz_makeConstructor (c$, 
46813 function (a) {
46814 this.construct ();
46815 this.setAction (a);
46816 }, "javax.swing.Action");
46817 Clazz_makeConstructor (c$, 
46818 function (text, icon) {
46819 this.construct (text, icon, false);
46820 }, "~S,javax.swing.Icon");
46821 Clazz_makeConstructor (c$, 
46822 function (text, b) {
46823 this.construct (text, null, b);
46824 }, "~S,~B");
46825 Clazz_makeConstructor (c$, 
46826 function (text, icon, b) {
46827 Clazz_superConstructor (this, javax.swing.JCheckBoxMenuItem, [text, icon]);
46828 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
46829 this.setSelected (b);
46830 this.setFocusable (false);
46831 }, "~S,javax.swing.Icon,~B");
46832 Clazz_overrideMethod (c$, "getUIClassID", 
46833 function () {
46834 return "CheckBoxMenuItemUI";
46835 });
46836 Clazz_defineMethod (c$, "getState", 
46837 function () {
46838 return this.isSelected ();
46839 });
46840 Clazz_defineMethod (c$, "setState", 
46841 function (b) {
46842 this.setSelected (b);
46843 }, "~B");
46844 Clazz_overrideMethod (c$, "getSelectedObjects", 
46845 function () {
46846 if (this.isSelected () == false) return null;
46847 var selectedObjects =  new Array (1);
46848 selectedObjects[0] = this.getText ();
46849 return selectedObjects;
46850 });
46851 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
46852 function () {
46853 return true;
46854 });
46855 Clazz_defineStatics (c$,
46856 "$$uiClassID", "CheckBoxMenuItemUI");
46857 });
46858 Clazz_declarePackage ("javax.swing");
46859 Clazz_load (["javax.swing.JMenuItem"], "javax.swing.JRadioButtonMenuItem", ["javax.swing.JToggleButton"], function () {
46860 c$ = Clazz_declareType (javax.swing, "JRadioButtonMenuItem", javax.swing.JMenuItem);
46861 Clazz_makeConstructor (c$, 
46862 function () {
46863 this.construct (null, null, false);
46864 });
46865 Clazz_makeConstructor (c$, 
46866 function (icon) {
46867 this.construct (null, icon, false);
46868 }, "javax.swing.Icon");
46869 Clazz_makeConstructor (c$, 
46870 function (text) {
46871 this.construct (text, null, false);
46872 }, "~S");
46873 Clazz_makeConstructor (c$, 
46874 function (a) {
46875 this.construct ();
46876 this.setAction (a);
46877 }, "javax.swing.Action");
46878 Clazz_makeConstructor (c$, 
46879 function (text, icon) {
46880 this.construct (text, icon, false);
46881 }, "~S,javax.swing.Icon");
46882 Clazz_makeConstructor (c$, 
46883 function (text, selected) {
46884 this.construct (text);
46885 this.setSelected (selected);
46886 }, "~S,~B");
46887 Clazz_makeConstructor (c$, 
46888 function (icon, selected) {
46889 this.construct (null, icon, selected);
46890 }, "javax.swing.Icon,~B");
46891 Clazz_makeConstructor (c$, 
46892 function (text, icon, selected) {
46893 Clazz_superConstructor (this, javax.swing.JRadioButtonMenuItem, [text, icon]);
46894 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
46895 this.setSelected (selected);
46896 this.setFocusable (false);
46897 }, "~S,javax.swing.Icon,~B");
46898 Clazz_overrideMethod (c$, "getUIClassID", 
46899 function () {
46900 return "RadioButtonMenuItemUI";
46901 });
46902 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
46903 function () {
46904 return true;
46905 });
46906 Clazz_defineStatics (c$,
46907 "$$uiClassID", "RadioButtonMenuItemUI");
46908 });
46909 Clazz_declarePackage ("javax.swing.event");
46910 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuDragMouseListener", null, function () {
46911 Clazz_declareInterface (javax.swing.event, "MenuDragMouseListener", java.util.EventListener);
46912 });
46913 Clazz_declarePackage ("javax.swing.event");
46914 Clazz_load (["java.awt.event.KeyEvent"], "javax.swing.event.MenuKeyEvent", null, function () {
46915 c$ = Clazz_decorateAsClass (function () {
46916 this.path = null;
46917 this.manager = null;
46918 Clazz_instantialize (this, arguments);
46919 }, javax.swing.event, "MenuKeyEvent", java.awt.event.KeyEvent);
46920 Clazz_makeConstructor (c$, 
46921 function (source, id, when, modifiers, keyCode, keyChar, p, m) {
46922 Clazz_superConstructor (this, javax.swing.event.MenuKeyEvent, [source, id, when, modifiers, keyCode, keyChar]);
46923 this.path = p;
46924 this.manager = m;
46925 }, "java.awt.Component,~N,~N,~N,~N,~S,~A,javax.swing.MenuSelectionManager");
46926 Clazz_defineMethod (c$, "getPath", 
46927 function () {
46928 return this.path;
46929 });
46930 Clazz_defineMethod (c$, "getMenuSelectionManager", 
46931 function () {
46932 return this.manager;
46933 });
46934 });
46935 Clazz_declarePackage ("javax.swing.event");
46936 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuKeyListener", null, function () {
46937 Clazz_declareInterface (javax.swing.event, "MenuKeyListener", java.util.EventListener);
46938 });
46939 Clazz_declarePackage ("javax.swing");
46940 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 () {
46941 c$ = Clazz_decorateAsClass (function () {
46942 this.invoker = null;
46943 this.popup = null;
46944 this.frame = null;
46945 this.desiredLocationX = 0;
46946 this.desiredLocationY = 0;
46947 this.label = null;
46948 this.$paintBorder = true;
46949 this.margin = null;
46950 this.lightWeightPopup = true;
46951 this.selectionModel = null;
46952 Clazz_instantialize (this, arguments);
46953 }, javax.swing, "JPopupMenu", javax.swing.JComponent, javax.swing.MenuElement);
46954 c$.setDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "setDefaultLightWeightPopupEnabled", 
46955 function (aFlag) {
46956 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.$valueOf (aFlag));
46957 }, "~B");
46958 c$.getDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "getDefaultLightWeightPopupEnabled", 
46959 function () {
46960 var b = javax.swing.SwingUtilities.appContextGet (javax.swing.JPopupMenu.defaultLWPopupEnabledKey);
46961 if (b == null) {
46962 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.TRUE);
46963 return true;
46964 }return b.booleanValue ();
46965 });
46966 Clazz_makeConstructor (c$, 
46967 function () {
46968 this.construct (null);
46969 });
46970 Clazz_makeConstructor (c$, 
46971 function (label) {
46972 Clazz_superConstructor (this, javax.swing.JPopupMenu, []);
46973 this.label = label;
46974 this.lightWeightPopup = javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled ();
46975 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
46976 this.enableEvents (16);
46977 this.updateUI ();
46978 }, "~S");
46979 Clazz_overrideMethod (c$, "getUI", 
46980 function () {
46981 return this.ui;
46982 });
46983 Clazz_overrideMethod (c$, "updateUI", 
46984 function () {
46985 this.setUI (javax.swing.UIManager.getUI (this));
46986 });
46987 Clazz_overrideMethod (c$, "getUIClassID", 
46988 function () {
46989 return "PopupMenuUI";
46990 });
46991 Clazz_defineMethod (c$, "processKeyEvent", 
46992 function (evt) {
46993 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46994 if (evt.isConsumed ()) {
46995 return;
46996 }Clazz_superCall (this, javax.swing.JPopupMenu, "processKeyEvent", [evt]);
46997 }, "java.awt.event.KeyEvent");
46998 Clazz_defineMethod (c$, "getSelectionModel", 
46999 function () {
47000 return this.selectionModel;
47001 });
47002 Clazz_defineMethod (c$, "setSelectionModel", 
47003 function (model) {
47004 this.selectionModel = model;
47005 }, "javax.swing.SingleSelectionModel");
47006 Clazz_defineMethod (c$, "add", 
47007 function (menuItem) {
47008 Clazz_superCall (this, javax.swing.JPopupMenu, "add", [menuItem]);
47009 return menuItem;
47010 }, "javax.swing.JMenuItem");
47011 Clazz_defineMethod (c$, "add", 
47012 function (s) {
47013 return this.add ( new javax.swing.JMenuItem (s));
47014 }, "~S");
47015 Clazz_defineMethod (c$, "add", 
47016 function (a) {
47017 var mi = this.createActionComponent (a);
47018 mi.setAction (a);
47019 this.add (mi);
47020 return mi;
47021 }, "javax.swing.Action");
47022 Clazz_defineMethod (c$, "adjustPopupLocationToFitScreen", 
47023 function (xposition, yposition) {
47024 var p =  new java.awt.Point (xposition, yposition);
47025 if (javax.swing.JPopupMenu.popupPostionFixDisabled == true || java.awt.GraphicsEnvironment.isHeadless ()) return p;
47026 return p;
47027 }, "~N,~N");
47028 Clazz_defineMethod (c$, "createActionComponent", 
47029 function (a) {
47030 var mi = ((Clazz_isClassDefined ("javax.swing.JPopupMenu$1") ? 0 : javax.swing.JPopupMenu.$JPopupMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JPopupMenu$1, this, null));
47031 mi.setHorizontalTextPosition (11);
47032 mi.setVerticalTextPosition (0);
47033 return mi;
47034 }, "javax.swing.Action");
47035 Clazz_defineMethod (c$, "createActionChangeListener", 
47036 function (b) {
47037 return b.createActionPropertyChangeListener0 (b.getAction ());
47038 }, "javax.swing.JMenuItem");
47039 Clazz_defineMethod (c$, "remove", 
47040 function (pos) {
47041 if (pos < 0) {
47042 throw  new IllegalArgumentException ("index less than zero.");
47043 }if (pos > this.getComponentCount () - 1) {
47044 throw  new IllegalArgumentException ("index greater than the number of items.");
47045 }Clazz_superCall (this, javax.swing.JPopupMenu, "remove", [pos]);
47046 }, "~N");
47047 Clazz_defineMethod (c$, "setLightWeightPopupEnabled", 
47048 function (aFlag) {
47049 this.lightWeightPopup = aFlag;
47050 }, "~B");
47051 Clazz_defineMethod (c$, "isLightWeightPopupEnabled", 
47052 function () {
47053 return this.lightWeightPopup;
47054 });
47055 Clazz_defineMethod (c$, "getLabel", 
47056 function () {
47057 return this.label;
47058 });
47059 Clazz_defineMethod (c$, "setLabel", 
47060 function (label) {
47061 var oldValue = this.label;
47062 this.label = label;
47063 this.firePropertyChangeObject ("label", oldValue, label);
47064 this.invalidate ();
47065 this.repaint ();
47066 }, "~S");
47067 Clazz_defineMethod (c$, "addSeparator", 
47068 function () {
47069 this.add ( new javax.swing.JPopupMenu.Separator ());
47070 });
47071 Clazz_defineMethod (c$, "insert", 
47072 function (a, index) {
47073 var mi = this.createActionComponent (a);
47074 mi.setAction (a);
47075 this.insert (mi, index);
47076 }, "javax.swing.Action,~N");
47077 Clazz_defineMethod (c$, "insert", 
47078 function (component, index) {
47079 if (index < 0) {
47080 throw  new IllegalArgumentException ("index less than zero.");
47081 }var nitems = this.getComponentCount ();
47082 var tempItems =  new java.util.Vector ();
47083 for (var i = index; i < nitems; i++) {
47084 tempItems.addElement (this.getComponent (index));
47085 this.remove (index);
47086 }
47087 this.add (component);
47088 for (var i = 0; i < tempItems.size (); i++) {
47089 this.add (tempItems.elementAt (i));
47090 }
47091 }, "java.awt.Component,~N");
47092 Clazz_defineMethod (c$, "addPopupMenuListener", 
47093 function (l) {
47094 this.listenerList.add (javax.swing.event.PopupMenuListener, l);
47095 }, "javax.swing.event.PopupMenuListener");
47096 Clazz_defineMethod (c$, "removePopupMenuListener", 
47097 function (l) {
47098 this.listenerList.remove (javax.swing.event.PopupMenuListener, l);
47099 }, "javax.swing.event.PopupMenuListener");
47100 Clazz_defineMethod (c$, "getPopupMenuListeners", 
47101 function () {
47102 return this.listenerList.getListeners (javax.swing.event.PopupMenuListener);
47103 });
47104 Clazz_defineMethod (c$, "addMenuKeyListener", 
47105 function (l) {
47106 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
47107 }, "javax.swing.event.MenuKeyListener");
47108 Clazz_defineMethod (c$, "removeMenuKeyListener", 
47109 function (l) {
47110 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
47111 }, "javax.swing.event.MenuKeyListener");
47112 Clazz_defineMethod (c$, "getMenuKeyListeners", 
47113 function () {
47114 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
47115 });
47116 Clazz_defineMethod (c$, "firePopupMenuWillBecomeVisible", 
47117 function () {
47118 var listeners = this.listenerList.getListenerList ();
47119 var e = null;
47120 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47121 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47122 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47123 (listeners[i + 1]).popupMenuWillBecomeVisible (e);
47124 }}
47125 });
47126 Clazz_defineMethod (c$, "firePopupMenuWillBecomeInvisible", 
47127 function () {
47128 var listeners = this.listenerList.getListenerList ();
47129 var e = null;
47130 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47131 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47132 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47133 (listeners[i + 1]).popupMenuWillBecomeInvisible (e);
47134 }}
47135 });
47136 Clazz_defineMethod (c$, "firePopupMenuCanceled", 
47137 function () {
47138 var listeners = this.listenerList.getListenerList ();
47139 var e = null;
47140 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47141 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47142 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47143 (listeners[i + 1]).popupMenuCanceled (e);
47144 }}
47145 });
47146 Clazz_overrideMethod (c$, "alwaysOnTop", 
47147 function () {
47148 return true;
47149 });
47150 Clazz_defineMethod (c$, "pack", 
47151 function () {
47152 if (this.popup != null) {
47153 var pref = this.getPreferredSize ();
47154 if (pref == null || pref.width != this.getWidth () || pref.height != this.getHeight ()) {
47155 this.popup = this.getPopup ();
47156 } else {
47157 this.validate ();
47158 }}});
47159 Clazz_overrideMethod (c$, "setVisible", 
47160 function (b) {
47161 if (b == this.isVisible ()) return;
47162 if (b == false) {
47163 var doCanceled = this.getClientProperty ("JPopupMenu.firePopupMenuCanceled");
47164 if (doCanceled != null && doCanceled === Boolean.TRUE) {
47165 this.putClientProperty ("JPopupMenu.firePopupMenuCanceled", Boolean.FALSE);
47166 this.firePopupMenuCanceled ();
47167 }this.getSelectionModel ().clearSelection ();
47168 } else {
47169 if (this.isPopupMenu ()) {
47170 var me =  new Array (1);
47171 me[0] = this;
47172 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
47173 }}if (b) {
47174 this.firePopupMenuWillBecomeVisible ();
47175 this.popup = this.getPopup ();
47176 this.firePropertyChangeObject ("visible", Boolean.FALSE, Boolean.TRUE);
47177 } else if (this.popup != null) {
47178 this.firePopupMenuWillBecomeInvisible ();
47179 this.popup.hide ();
47180 this.popup = null;
47181 this.firePropertyChangeObject ("visible", Boolean.TRUE, Boolean.FALSE);
47182 if (this.isPopupMenu ()) {
47183 javax.swing.MenuSelectionManager.defaultManager ().clearSelectedPath ();
47184 }}}, "~B");
47185 Clazz_defineMethod (c$, "getPopup", 
47186  function () {
47187 var oldPopup = this.popup;
47188 if (oldPopup != null) {
47189 oldPopup.hide ();
47190 }var popupFactory = javax.swing.PopupFactory.getSharedInstance ();
47191 if (this.isLightWeightPopupEnabled ()) {
47192 popupFactory.setPopupType (0);
47193 } else {
47194 popupFactory.setPopupType (1);
47195 }var p = this.adjustPopupLocationToFitScreen (this.desiredLocationX, this.desiredLocationY);
47196 this.desiredLocationX = p.x;
47197 this.desiredLocationY = p.y;
47198 var newPopup = this.getUI ().getPopup (this, this.desiredLocationX, this.desiredLocationY);
47199 popupFactory.setPopupType (0);
47200 newPopup.show ();
47201 return newPopup;
47202 });
47203 Clazz_overrideMethod (c$, "isVisible", 
47204 function () {
47205 if (this.popup != null) return true;
47206  else return false;
47207 });
47208 Clazz_defineMethod (c$, "setLocation", 
47209 function (x, y) {
47210 var oldX = this.desiredLocationX;
47211 var oldY = this.desiredLocationY;
47212 this.desiredLocationX = x;
47213 this.desiredLocationY = y;
47214 if (this.popup != null && (x != oldX || y != oldY)) {
47215 this.popup = this.getPopup ();
47216 }}, "~N,~N");
47217 Clazz_defineMethod (c$, "isPopupMenu", 
47218  function () {
47219 return ((this.invoker != null) && !(Clazz_instanceOf (this.invoker, javax.swing.JMenu)));
47220 });
47221 Clazz_defineMethod (c$, "getInvoker", 
47222 function () {
47223 return this.invoker;
47224 });
47225 Clazz_defineMethod (c$, "setInvoker", 
47226 function (invoker) {
47227 var oldInvoker = this.invoker;
47228 this.invoker = invoker;
47229 if ((oldInvoker !== this.invoker) && (this.ui != null)) {
47230 this.ui.uninstallUI (this);
47231 this.ui.installUI (this);
47232 }this.invalidate ();
47233 }, "java.awt.Component");
47234 Clazz_defineMethod (c$, "show", 
47235 function (invoker, x, y) {
47236 this.setInvoker (invoker);
47237 var newFrame = javax.swing.JPopupMenu.getFrame (invoker);
47238 if (newFrame !== this.frame) {
47239 if (newFrame != null) {
47240 this.frame = newFrame;
47241 if (this.popup != null) {
47242 this.setVisible (false);
47243 }}}var invokerOrigin;
47244 if (invoker != null) {
47245 invokerOrigin = invoker.getLocationOnScreen ();
47246 var lx;
47247 var ly;
47248 lx = (invokerOrigin.x) + (x);
47249 ly = (invokerOrigin.y) + (y);
47250 if (lx > 2147483647) lx = 2147483647;
47251 if (lx < -2147483648) lx = -2147483648;
47252 if (ly > 2147483647) ly = 2147483647;
47253 if (ly < -2147483648) ly = -2147483648;
47254 this.setLocation (lx, ly);
47255 } else {
47256 this.setLocation (x, y);
47257 }this.setVisible (true);
47258 }, "java.awt.Component,~N,~N");
47259 Clazz_defineMethod (c$, "getRootPopupMenu", 
47260 function () {
47261 var mp = this;
47262 while ((mp != null) && (mp.isPopupMenu () != true) && (mp.getInvoker () != null) && (mp.getInvoker ().getParent () != null) && (Clazz_instanceOf (mp.getInvoker ().getParent (), javax.swing.JPopupMenu))) {
47263 mp = mp.getInvoker ().getParent ();
47264 }
47265 return mp;
47266 });
47267 Clazz_defineMethod (c$, "getComponentAtIndex", 
47268 function (i) {
47269 return this.getComponent (i);
47270 }, "~N");
47271 Clazz_defineMethod (c$, "getComponentIndex", 
47272 function (c) {
47273 var ncomponents = this.getComponentCount ();
47274 var component = this.getComponents ();
47275 for (var i = 0; i < ncomponents; i++) {
47276 var comp = component[i];
47277 if (comp === c) return i;
47278 }
47279 return -1;
47280 }, "java.awt.Component");
47281 Clazz_defineMethod (c$, "setPopupSize", 
47282 function (d) {
47283 var oldSize = this.getPreferredSize ();
47284 this.setPreferredSize (d);
47285 if (this.popup != null) {
47286 var newSize = this.getPreferredSize ();
47287 if (!oldSize.equals (newSize)) {
47288 this.popup = this.getPopup ();
47289 }}}, "java.awt.Dimension");
47290 Clazz_defineMethod (c$, "setPopupSize", 
47291 function (width, height) {
47292 this.setPopupSize ( new java.awt.Dimension (width, height));
47293 }, "~N,~N");
47294 Clazz_defineMethod (c$, "setSelected", 
47295 function (sel) {
47296 var model = this.getSelectionModel ();
47297 var index = this.getComponentIndex (sel);
47298 model.setSelectedIndex (index);
47299 }, "java.awt.Component");
47300 Clazz_defineMethod (c$, "isBorderPainted", 
47301 function () {
47302 return this.$paintBorder;
47303 });
47304 Clazz_defineMethod (c$, "setBorderPainted", 
47305 function (b) {
47306 this.$paintBorder = b;
47307 this.repaint ();
47308 }, "~B");
47309 Clazz_defineMethod (c$, "paintBorder", 
47310 function (g) {
47311 if (this.isBorderPainted ()) {
47312 Clazz_superCall (this, javax.swing.JPopupMenu, "paintBorder", [g]);
47313 }}, "java.awt.Graphics");
47314 Clazz_defineMethod (c$, "getMargin", 
47315 function () {
47316 if (this.margin == null) {
47317 return  new java.awt.Insets (0, 0, 0, 0);
47318 } else {
47319 return this.margin;
47320 }});
47321 Clazz_defineMethod (c$, "isSubPopupMenu", 
47322 function (popup) {
47323 var ncomponents = this.getComponentCount ();
47324 var component = this.getComponents ();
47325 for (var i = 0; i < ncomponents; i++) {
47326 var comp = component[i];
47327 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
47328 var menu = comp;
47329 var subPopup = menu.getPopupMenu ();
47330 if (subPopup === popup) return true;
47331 if (subPopup.isSubPopupMenu (popup)) return true;
47332 }}
47333 return false;
47334 }, "javax.swing.JPopupMenu");
47335 c$.getFrame = Clazz_defineMethod (c$, "getFrame", 
47336  function (c) {
47337 var w = c;
47338 while (!(Clazz_instanceOf (w, java.awt.Frame)) && (w != null)) {
47339 w = w.getParent ();
47340 }
47341 return w;
47342 }, "java.awt.Component");
47343 Clazz_defineMethod (c$, "paramString", 
47344 function () {
47345 var labelString = (this.label != null ? this.label : "");
47346 var paintBorderString = (this.$paintBorder ? "true" : "false");
47347 var marginString = (this.margin != null ? this.margin.toString () : "");
47348 var lightWeightPopupEnabledString = (this.isLightWeightPopupEnabled () ? "true" : "false");
47349 return Clazz_superCall (this, javax.swing.JPopupMenu, "paramString", []) + ",desiredLocationX=" + this.desiredLocationX + ",desiredLocationY=" + this.desiredLocationY + ",label=" + labelString + ",lightWeightPopupEnabled=" + lightWeightPopupEnabledString + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
47350 });
47351 Clazz_defineMethod (c$, "processMouseEvent", 
47352 function (event, path, manager) {
47353 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
47354 Clazz_defineMethod (c$, "processKeyEvent", 
47355 function (e, path, manager) {
47356 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
47357 this.processMenuKeyEvent (mke);
47358 if (mke.isConsumed ()) {
47359 e.consume ();
47360 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
47361 Clazz_defineMethod (c$, "processMenuKeyEvent", 
47362  function (e) {
47363 switch (e.getID ()) {
47364 case 401:
47365 this.fireMenuKeyPressed (e);
47366 break;
47367 case 402:
47368 this.fireMenuKeyReleased (e);
47369 break;
47370 case 400:
47371 this.fireMenuKeyTyped (e);
47372 break;
47373 default:
47374 break;
47375 }
47376 }, "javax.swing.event.MenuKeyEvent");
47377 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
47378  function (event) {
47379 var listeners = this.listenerList.getListenerList ();
47380 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47381 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47382 (listeners[i + 1]).menuKeyPressed (event);
47383 }}
47384 }, "javax.swing.event.MenuKeyEvent");
47385 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
47386  function (event) {
47387 var listeners = this.listenerList.getListenerList ();
47388 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47389 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47390 (listeners[i + 1]).menuKeyReleased (event);
47391 }}
47392 }, "javax.swing.event.MenuKeyEvent");
47393 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
47394  function (event) {
47395 var listeners = this.listenerList.getListenerList ();
47396 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47397 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47398 (listeners[i + 1]).menuKeyTyped (event);
47399 }}
47400 }, "javax.swing.event.MenuKeyEvent");
47401 Clazz_overrideMethod (c$, "menuSelectionChanged", 
47402 function (isIncluded) {
47403 if (Clazz_instanceOf (this.invoker, javax.swing.JMenu)) {
47404 var m = this.invoker;
47405 if (isIncluded) m.setPopupMenuVisible (true);
47406  else m.setPopupMenuVisible (false);
47407 }if (this.isPopupMenu () && !isIncluded) this.setVisible (false);
47408 }, "~B");
47409 Clazz_overrideMethod (c$, "getSubElements", 
47410 function () {
47411 var result;
47412 var tmp =  new java.util.Vector ();
47413 var c = this.getComponentCount ();
47414 var i;
47415 var m;
47416 for (i = 0; i < c; i++) {
47417 m = this.getComponent (i);
47418 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
47419 }
47420 result =  new Array (tmp.size ());
47421 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
47422
47423 return result;
47424 });
47425 Clazz_defineMethod (c$, "getComponent", 
47426 function () {
47427 return this;
47428 });
47429 Clazz_defineMethod (c$, "isPopupTrigger", 
47430 function (e) {
47431 return this.getUI ().isPopupTrigger (e);
47432 }, "java.awt.event.MouseEvent");
47433 c$.$JPopupMenu$1$ = function () {
47434 Clazz_pu$h(self.c$);
47435 c$ = Clazz_declareAnonymous (javax.swing, "JPopupMenu$1", javax.swing.JMenuItem);
47436 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
47437 function (a) {
47438 var pcl = this.b$["javax.swing.JPopupMenu"].createActionChangeListener (this);
47439 if (pcl == null) {
47440 pcl = Clazz_superCall (this, javax.swing.JPopupMenu$1, "createActionPropertyChangeListener", [a]);
47441 }return pcl;
47442 }, "javax.swing.Action");
47443 c$ = Clazz_p0p ();
47444 };
47445 Clazz_pu$h(self.c$);
47446 c$ = Clazz_declareType (javax.swing.JPopupMenu, "Separator", javax.swing.JSeparator);
47447 Clazz_makeConstructor (c$, 
47448 function () {
47449 Clazz_superConstructor (this, javax.swing.JPopupMenu.Separator, [0]);
47450 });
47451 Clazz_overrideMethod (c$, "getUIClassID", 
47452 function () {
47453 return "PopupMenuSeparatorUI";
47454 });
47455 c$ = Clazz_p0p ();
47456 Clazz_defineStatics (c$,
47457 "$uiClassID", "PopupMenuUI");
47458 c$.defaultLWPopupEnabledKey = c$.prototype.defaultLWPopupEnabledKey =  new Clazz._O ();
47459 Clazz_defineStatics (c$,
47460 "popupPostionFixDisabled", false);
47461 });
47462 Clazz_declarePackage ("javax.swing");
47463 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JSeparator", ["java.lang.IllegalArgumentException", "javax.swing.UIManager"], function () {
47464 c$ = Clazz_decorateAsClass (function () {
47465 this.orientation = 0;
47466 Clazz_instantialize (this, arguments);
47467 }, javax.swing, "JSeparator", javax.swing.JComponent, javax.swing.SwingConstants);
47468 Clazz_makeConstructor (c$, 
47469 function () {
47470 this.construct (0);
47471 });
47472 Clazz_makeConstructor (c$, 
47473 function (orientation) {
47474 Clazz_superConstructor (this, javax.swing.JSeparator, []);
47475 this.checkOrientation (orientation);
47476 this.orientation = orientation;
47477 this.setFocusable (false);
47478 this.updateUI ();
47479 }, "~N");
47480 Clazz_overrideMethod (c$, "getUI", 
47481 function () {
47482 return this.ui;
47483 });
47484 Clazz_overrideMethod (c$, "updateUI", 
47485 function () {
47486 this.setUI (javax.swing.UIManager.getUI (this));
47487 });
47488 Clazz_overrideMethod (c$, "getUIClassID", 
47489 function () {
47490 return "SeparatorUI";
47491 });
47492 Clazz_defineMethod (c$, "getOrientation", 
47493 function () {
47494 return this.orientation;
47495 });
47496 Clazz_defineMethod (c$, "setOrientation", 
47497 function (orientation) {
47498 if (this.orientation == orientation) {
47499 return;
47500 }var oldValue = this.orientation;
47501 this.checkOrientation (orientation);
47502 this.orientation = orientation;
47503 this.firePropertyChangeInt ("orientation", oldValue, orientation);
47504 this.revalidate ();
47505 this.repaint ();
47506 }, "~N");
47507 Clazz_defineMethod (c$, "checkOrientation", 
47508  function (orientation) {
47509 switch (orientation) {
47510 case 1:
47511 case 0:
47512 break;
47513 default:
47514 throw  new IllegalArgumentException ("orientation must be one of: VERTICAL, HORIZONTAL");
47515 }
47516 }, "~N");
47517 Clazz_defineMethod (c$, "paramString", 
47518 function () {
47519 var orientationString = (this.orientation == 0 ? "HORIZONTAL" : "VERTICAL");
47520 return Clazz_superCall (this, javax.swing.JSeparator, "paramString", []) + ",orientation=" + orientationString;
47521 });
47522 Clazz_defineStatics (c$,
47523 "$uiClassID", "SeparatorUI");
47524 });
47525 Clazz_declarePackage ("javax.swing");
47526 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 () {
47527 c$ = Clazz_decorateAsClass (function () {
47528 this.selection = null;
47529 this.changeEvent = null;
47530 this.listenerList = null;
47531 Clazz_instantialize (this, arguments);
47532 }, javax.swing, "MenuSelectionManager");
47533 Clazz_prepareFields (c$, function () {
47534 this.selection =  new java.util.Vector ();
47535 this.listenerList =  new javax.swing.event.EventListenerList ();
47536 });
47537 c$.defaultManager = Clazz_defineMethod (c$, "defaultManager", 
47538 function () {
47539 {
47540 var context = jssun.awt.AppContext.getAppContext ();
47541 var msm = context.get (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY);
47542 if (msm == null) {
47543 msm =  new javax.swing.MenuSelectionManager ();
47544 context.put (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY, msm);
47545 }return msm;
47546 }});
47547 Clazz_defineMethod (c$, "setSelectedPath", 
47548 function (path) {
47549 var i;
47550 var c;
47551 var currentSelectionCount = this.selection.size ();
47552 var firstDifference = 0;
47553 if (path == null) {
47554 path =  new Array (0);
47555 }for (i = 0, c = path.length; i < c; i++) {
47556 if (i < currentSelectionCount && this.selection.elementAt (i) === path[i]) firstDifference++;
47557  else break;
47558 }
47559 for (i = currentSelectionCount - 1; i >= firstDifference; i--) {
47560 var me = this.selection.elementAt (i);
47561 this.selection.removeElementAt (i);
47562 me.menuSelectionChanged (false);
47563 }
47564 for (i = firstDifference, c = path.length; i < c; i++) {
47565 if (path[i] != null) {
47566 this.selection.addElement (path[i]);
47567 path[i].menuSelectionChanged (true);
47568 }}
47569 this.fireStateChanged ();
47570 }, "~A");
47571 Clazz_defineMethod (c$, "getSelectedPath", 
47572 function () {
47573 var res =  new Array (this.selection.size ());
47574 var i;
47575 var c;
47576 for (i = 0, c = this.selection.size (); i < c; i++) res[i] = this.selection.elementAt (i);
47577
47578 return res;
47579 });
47580 Clazz_defineMethod (c$, "clearSelectedPath", 
47581 function () {
47582 if (this.selection.size () > 0) {
47583 this.setSelectedPath (null);
47584 }});
47585 Clazz_defineMethod (c$, "addChangeListener", 
47586 function (l) {
47587 this.listenerList.add (javax.swing.event.ChangeListener, l);
47588 }, "javax.swing.event.ChangeListener");
47589 Clazz_defineMethod (c$, "removeChangeListener", 
47590 function (l) {
47591 this.listenerList.remove (javax.swing.event.ChangeListener, l);
47592 }, "javax.swing.event.ChangeListener");
47593 Clazz_defineMethod (c$, "getChangeListeners", 
47594 function () {
47595 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
47596 });
47597 Clazz_defineMethod (c$, "fireStateChanged", 
47598 function () {
47599 var listeners = this.listenerList.getListenerList ();
47600 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47601 if (listeners[i] === javax.swing.event.ChangeListener) {
47602 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
47603 (listeners[i + 1]).stateChanged (this.changeEvent);
47604 }}
47605 });
47606 Clazz_defineMethod (c$, "processMouseEvent", 
47607 function (event) {
47608 var screenX;
47609 var screenY;
47610 var p;
47611 var i;
47612 var j;
47613 var d;
47614 var mc;
47615 var r2;
47616 var cWidth;
47617 var cHeight;
47618 var menuElement;
47619 var subElements;
47620 var path;
47621 var tmp;
47622 var selectionSize;
47623 p = event.getPoint ();
47624 var source = event.getSource ();
47625 if (!source.isShowing ()) {
47626 return;
47627 }var type = event.getID ();
47628 var modifiers = event.getModifiers ();
47629 if ((type == 504 || type == 505) && ((modifiers & (28)) != 0)) {
47630 return;
47631 }javax.swing.SwingUtilities.convertPointToScreen (p, source);
47632 screenX = p.x;
47633 screenY = p.y;
47634 tmp = this.selection.clone ();
47635 selectionSize = tmp.size ();
47636 var success = false;
47637 for (i = selectionSize - 1; i >= 0 && success == false; i--) {
47638 menuElement = tmp.elementAt (i);
47639 subElements = menuElement.getSubElements ();
47640 path = null;
47641 for (j = 0, d = subElements.length; j < d && success == false; j++) {
47642 if (subElements[j] == null) continue;
47643 mc = subElements[j].getComponent ();
47644 if (!mc.isShowing ()) continue;
47645 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47646 cWidth = (mc).getWidth ();
47647 cHeight = (mc).getHeight ();
47648 } else {
47649 r2 = mc.getBounds ();
47650 cWidth = r2.width;
47651 cHeight = r2.height;
47652 }p.x = screenX;
47653 p.y = screenY;
47654 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47655 if ((p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight)) {
47656 var k;
47657 if (path == null) {
47658 path =  new Array (i + 2);
47659 for (k = 0; k <= i; k++) path[k] = tmp.elementAt (k);
47660
47661 }path[i + 1] = subElements[j];
47662 var currentSelection = this.getSelectedPath ();
47663 if (currentSelection[currentSelection.length - 1] !== path[i + 1] && (currentSelection.length < 2 || currentSelection[currentSelection.length - 2] !== path[i + 1])) {
47664 var oldMC = currentSelection[currentSelection.length - 1].getComponent ();
47665 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);
47666 currentSelection[currentSelection.length - 1].processMouseEvent (exitEvent, path, this);
47667 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);
47668 subElements[j].processMouseEvent (enterEvent, path, this);
47669 }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);
47670 subElements[j].processMouseEvent (mouseEvent, path, this);
47671 success = true;
47672 event.consume ();
47673 }}
47674 }
47675 }, "java.awt.event.MouseEvent");
47676 Clazz_defineMethod (c$, "componentForPoint", 
47677 function (source, sourcePoint) {
47678 var screenX;
47679 var screenY;
47680 var p = sourcePoint;
47681 var i;
47682 var j;
47683 var d;
47684 var mc;
47685 var r2;
47686 var cWidth;
47687 var cHeight;
47688 var menuElement;
47689 var subElements;
47690 var tmp;
47691 var selectionSize;
47692 javax.swing.SwingUtilities.convertPointToScreen (p, source);
47693 screenX = p.x;
47694 screenY = p.y;
47695 tmp = this.selection.clone ();
47696 selectionSize = tmp.size ();
47697 for (i = selectionSize - 1; i >= 0; i--) {
47698 menuElement = tmp.elementAt (i);
47699 subElements = menuElement.getSubElements ();
47700 for (j = 0, d = subElements.length; j < d; j++) {
47701 if (subElements[j] == null) continue;
47702 mc = subElements[j].getComponent ();
47703 if (!mc.isShowing ()) continue;
47704 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47705 cWidth = (mc).getWidth ();
47706 cHeight = (mc).getHeight ();
47707 } else {
47708 r2 = mc.getBounds ();
47709 cWidth = r2.width;
47710 cHeight = r2.height;
47711 }p.x = screenX;
47712 p.y = screenY;
47713 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47714 if (p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight) {
47715 return mc;
47716 }}
47717 }
47718 return null;
47719 }, "java.awt.Component,java.awt.Point");
47720 Clazz_defineMethod (c$, "processKeyEvent", 
47721 function (e) {
47722 var sel2 =  new Array (0);
47723 sel2 = this.selection.toArray (sel2);
47724 var selSize = sel2.length;
47725 var path;
47726 if (selSize < 1) {
47727 return;
47728 }for (var i = selSize - 1; i >= 0; i--) {
47729 var elem = sel2[i];
47730 var subs = elem.getSubElements ();
47731 path = null;
47732 for (var j = 0; j < subs.length; j++) {
47733 if (subs[j] == null || !subs[j].getComponent ().isShowing () || !subs[j].getComponent ().isEnabled ()) {
47734 continue;
47735 }if (path == null) {
47736 path =  new Array (i + 2);
47737 System.arraycopy (sel2, 0, path, 0, i + 1);
47738 }path[i + 1] = subs[j];
47739 subs[j].processKeyEvent (e, path, this);
47740 if (e.isConsumed ()) {
47741 return;
47742 }}
47743 }
47744 path =  new Array (1);
47745 path[0] = sel2[0];
47746 path[0].processKeyEvent (e, path, this);
47747 if (e.isConsumed ()) {
47748 return;
47749 }}, "java.awt.event.KeyEvent");
47750 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47751 function (c) {
47752 if (this.selection.size () > 0) {
47753 var me = this.selection.elementAt (0);
47754 return this.isComponentPartOfCurrentMenu (me, c);
47755 } else return false;
47756 }, "java.awt.Component");
47757 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47758  function (root, c) {
47759 var children;
47760 var i;
47761 var d;
47762 if (root == null) return false;
47763 if (root.getComponent () === c) return true;
47764  else {
47765 children = root.getSubElements ();
47766 for (i = 0, d = children.length; i < d; i++) {
47767 if (this.isComponentPartOfCurrentMenu (children[i], c)) return true;
47768 }
47769 }return false;
47770 }, "javax.swing.MenuElement,java.awt.Component");
47771 c$.MENU_SELECTION_MANAGER_KEY = c$.prototype.MENU_SELECTION_MANAGER_KEY =  new Clazz._O ();
47772 });
47773 Clazz_declarePackage ("javax.swing");
47774 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 () {
47775 c$ = Clazz_decorateAsClass (function () {
47776 this.popupType = 0;
47777 Clazz_instantialize (this, arguments);
47778 }, javax.swing, "PopupFactory");
47779 c$.setSharedInstance = Clazz_defineMethod (c$, "setSharedInstance", 
47780 function (factory) {
47781 if (factory == null) {
47782 throw  new IllegalArgumentException ("PopupFactory can not be null");
47783 }javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.SharedInstanceKey, factory);
47784 }, "javax.swing.PopupFactory");
47785 c$.getSharedInstance = Clazz_defineMethod (c$, "getSharedInstance", 
47786 function () {
47787 var factory = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.SharedInstanceKey);
47788 if (factory == null) {
47789 factory =  new javax.swing.PopupFactory ();
47790 javax.swing.PopupFactory.setSharedInstance (factory);
47791 }return factory;
47792 });
47793 Clazz_defineMethod (c$, "setPopupType", 
47794 function (type) {
47795 this.popupType = type;
47796 }, "~N");
47797 Clazz_defineMethod (c$, "getPopupType", 
47798 function () {
47799 return this.popupType;
47800 });
47801 Clazz_defineMethod (c$, "getPopup", 
47802 function (owner, contents, x, y) {
47803 if (contents == null) {
47804 throw  new IllegalArgumentException ("Popup.getPopup must be passed non-null contents");
47805 }var popupType = this.getPopupType (owner, contents, x, y);
47806 var popup = this.getPopup (owner, contents, x, y, popupType);
47807 if (popup == null) {
47808 popup = this.getPopup (owner, contents, x, y, 2);
47809 }return popup;
47810 }, "java.awt.Component,java.awt.Component,~N,~N");
47811 Clazz_defineMethod (c$, "getPopupType", 
47812  function (owner, contents, ownerX, ownerY) {
47813 var popupType = this.getPopupType ();
47814 if (owner == null || this.invokerInHeavyWeightPopup (owner)) {
47815 popupType = 2;
47816 } else if (popupType == 0 && !(Clazz_instanceOf (contents, javax.swing.JToolTip)) && !(Clazz_instanceOf (contents, javax.swing.JPopupMenu))) {
47817 popupType = 1;
47818 }var c = owner;
47819 while (c != null) {
47820 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
47821 if ((c).getClientProperty (javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP) === Boolean.TRUE) {
47822 popupType = 2;
47823 break;
47824 }}c = c.getParent ();
47825 }
47826 return popupType;
47827 }, "java.awt.Component,java.awt.Component,~N,~N");
47828 Clazz_defineMethod (c$, "getPopup", 
47829  function (owner, contents, ownerX, ownerY, popupType) {
47830 switch (popupType) {
47831 case 0:
47832 return this.getLightWeightPopup (owner, contents, ownerX, ownerY);
47833 case 1:
47834 return this.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47835 case 2:
47836 return this.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47837 }
47838 return null;
47839 }, "java.awt.Component,java.awt.Component,~N,~N,~N");
47840 Clazz_defineMethod (c$, "getLightWeightPopup", 
47841  function (owner, contents, ownerX, ownerY) {
47842 return javax.swing.PopupFactory.LightWeightPopup.getLightWeightPopup (owner, contents, ownerX, ownerY);
47843 }, "java.awt.Component,java.awt.Component,~N,~N");
47844 Clazz_defineMethod (c$, "getMediumWeightPopup", 
47845  function (owner, contents, ownerX, ownerY) {
47846 return javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47847 }, "java.awt.Component,java.awt.Component,~N,~N");
47848 Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47849  function (owner, contents, ownerX, ownerY) {
47850 return javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47851 }, "java.awt.Component,java.awt.Component,~N,~N");
47852 Clazz_defineMethod (c$, "invokerInHeavyWeightPopup", 
47853  function (i) {
47854 if (i != null) {
47855 var parent;
47856 for (parent = i.getParent (); parent != null; parent = parent.getParent ()) {
47857 if (Clazz_instanceOf (parent, javax.swing.Popup.HeavyWeightWindow)) {
47858 return true;
47859 }}
47860 }return false;
47861 }, "java.awt.Component");
47862 Clazz_pu$h(self.c$);
47863 c$ = Clazz_declareType (javax.swing.PopupFactory, "HeavyWeightPopup", javax.swing.Popup);
47864 c$.getHeavyWeightPopup = Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47865 function (a, b, c, d) {
47866 var e = (a != null) ? javax.swing.SwingUtilities.getWindowAncestor (a) : null;
47867 var f = null;
47868 if (e != null) {
47869 f = javax.swing.PopupFactory.HeavyWeightPopup.getRecycledHeavyWeightPopup (e);
47870 }var g = false;
47871 if (b != null && b.isFocusable ()) {
47872 if (Clazz_instanceOf (b, javax.swing.JPopupMenu)) {
47873 var h = b;
47874 var i = h.getComponents ();
47875 for (var j = 0; j < i.length; j++) {
47876 if (!(Clazz_instanceOf (i[j], javax.swing.MenuElement)) && !(Clazz_instanceOf (i[j], javax.swing.JSeparator))) {
47877 g = true;
47878 break;
47879 }}
47880 }}if (f == null || (f.getComponent ()).getFocusableWindowState () != g) {
47881 if (f != null) {
47882 f._dispose ();
47883 }f =  new javax.swing.PopupFactory.HeavyWeightPopup ();
47884 }f.reset (a, b, c, d);
47885 if (g) {
47886 var h = f.getComponent ();
47887 h.setFocusableWindowState (true);
47888 h.setName ("###focusableSwingPopup###");
47889 }return f;
47890 }, "java.awt.Component,java.awt.Component,~N,~N");
47891 c$.getRecycledHeavyWeightPopup = Clazz_defineMethod (c$, "getRecycledHeavyWeightPopup", 
47892  function (a) {
47893 {
47894 var b;
47895 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47896 if (c.containsKey (a)) {
47897 b = c.get (a);
47898 } else {
47899 return null;
47900 }var d;
47901 if ((d = b.size ()) > 0) {
47902 var e = b.get (0);
47903 b.remove (0);
47904 return e;
47905 }return null;
47906 }}, "java.awt.Window");
47907 c$.getHeavyWeightPopupCache = Clazz_defineMethod (c$, "getHeavyWeightPopupCache", 
47908  function () {
47909 {
47910 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey);
47911 if (a == null) {
47912 a =  new java.util.HashMap (2);
47913 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey, a);
47914 }return a;
47915 }});
47916 c$.recycleHeavyWeightPopup = Clazz_defineMethod (c$, "recycleHeavyWeightPopup", 
47917  function (a) {
47918 {
47919 var b;
47920 var c = javax.swing.SwingUtilities.getWindowAncestor (a.getComponent ());
47921 var d = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47922 if (Clazz_instanceOf (c, javax.swing.Popup.DefaultFrame) || !(c).isVisible ()) {
47923 a._dispose ();
47924 return;
47925 } else if (d.containsKey (c)) {
47926 b = d.get (c);
47927 } else {
47928 b =  new java.util.ArrayList ();
47929 d.put (c, b);
47930 var e = c;
47931 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))));
47932 }if (b.size () < 5) {
47933 b.add (a);
47934 } else {
47935 a._dispose ();
47936 }}}, "javax.swing.PopupFactory.HeavyWeightPopup");
47937 Clazz_defineMethod (c$, "hide", 
47938 function () {
47939 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "hide", []);
47940 javax.swing.PopupFactory.HeavyWeightPopup.recycleHeavyWeightPopup (this);
47941 });
47942 Clazz_defineMethod (c$, "dispose", 
47943 function () {
47944 });
47945 Clazz_defineMethod (c$, "_dispose", 
47946 function () {
47947 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "dispose", []);
47948 });
47949 c$.$PopupFactory$HeavyWeightPopup$1$ = function () {
47950 Clazz_pu$h(self.c$);
47951 c$ = Clazz_declareAnonymous (javax.swing, "PopupFactory$HeavyWeightPopup$1", java.awt.event.WindowAdapter);
47952 Clazz_overrideMethod (c$, "windowClosed", 
47953 function (a) {
47954 var b;
47955 {
47956 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47957 b = c.remove (this.f$.e);
47958 }if (b != null) {
47959 for (var c = b.size () - 1; c >= 0; c--) {
47960 (b.get (c))._dispose ();
47961 }
47962 }}, "java.awt.event.WindowEvent");
47963 c$ = Clazz_p0p ();
47964 };
47965 c$.heavyWeightPopupCacheKey = c$.prototype.heavyWeightPopupCacheKey =  new Clazz._O ();
47966 c$ = Clazz_p0p ();
47967 Clazz_pu$h(self.c$);
47968 c$ = Clazz_decorateAsClass (function () {
47969 this.owner = null;
47970 this.x = 0;
47971 this.y = 0;
47972 Clazz_instantialize (this, arguments);
47973 }, javax.swing.PopupFactory, "ContainerPopup", javax.swing.Popup);
47974 Clazz_overrideMethod (c$, "hide", 
47975 function () {
47976 var a = this.getComponent ();
47977 if (a != null) {
47978 var b = a.getParent ();
47979 if (b != null) {
47980 var c = a.getBounds ();
47981 b.remove (a);
47982 b.repaint (c.x, c.y, c.width, c.height);
47983 }}this.owner = null;
47984 });
47985 Clazz_overrideMethod (c$, "pack", 
47986 function () {
47987 var a = this.getComponent ();
47988 if (a != null) {
47989 a.setSize (a.getPreferredSize ());
47990 }});
47991 Clazz_defineMethod (c$, "reset", 
47992 function (a, b, c, d) {
47993 if ((Clazz_instanceOf (a, javax.swing.JFrame)) || (Clazz_instanceOf (a, javax.swing.JDialog)) || (Clazz_instanceOf (a, javax.swing.JWindow))) {
47994 a = (a).getLayeredPane ();
47995 }Clazz_superCall (this, javax.swing.PopupFactory.ContainerPopup, "reset", [a, b, c, d]);
47996 this.x = c;
47997 this.y = d;
47998 this.owner = a;
47999 }, "java.awt.Component,java.awt.Component,~N,~N");
48000 Clazz_defineMethod (c$, "overlappedByOwnedWindow", 
48001 function () {
48002 var a = this.getComponent ();
48003 if (this.owner != null && a != null) {
48004 var b = javax.swing.SwingUtilities.getWindowAncestor (this.owner);
48005 if (b == null) {
48006 return false;
48007 }var c = b.getOwnedWindows ();
48008 if (c != null) {
48009 var d = a.getBounds ();
48010 for (var e = 0; e < c.length; e++) {
48011 var f = c[e];
48012 if (f.isVisible () && d.intersects (f.getBounds ())) {
48013 return true;
48014 }}
48015 }}return false;
48016 });
48017 Clazz_defineMethod (c$, "fitsOnScreen", 
48018 function () {
48019 var a = this.getComponent ();
48020 if (this.owner != null && a != null) {
48021 var b;
48022 var c = a.getWidth ();
48023 var d = a.getHeight ();
48024 for (b = this.owner.getParent (); b != null; b = b.getParent ()) {
48025 if (Clazz_instanceOf (b, javax.swing.JFrame) || Clazz_instanceOf (b, javax.swing.JDialog) || Clazz_instanceOf (b, javax.swing.JWindow)) {
48026 var e = b.getBounds ();
48027 var f = b.getInsets ();
48028 e.x += f.left;
48029 e.y += f.top;
48030 e.width -= (f.left + f.right);
48031 e.height -= (f.top + f.bottom);
48032 var g = b.getGraphicsConfiguration ();
48033 var h = this.getContainerPopupArea (g);
48034 return e.intersection (h).contains (this.x, this.y, c, d);
48035 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
48036 var e = b.getBounds ();
48037 var f = b.getLocationOnScreen ();
48038 e.x = f.x;
48039 e.y = f.y;
48040 return e.contains (this.x, this.y, c, d);
48041 } else if (Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) {
48042 break;
48043 }}
48044 }return false;
48045 });
48046 Clazz_defineMethod (c$, "getContainerPopupArea", 
48047 function (a) {
48048 var b;
48049 var c = java.awt.Toolkit.getDefaultToolkit ();
48050 var d;
48051 if (a != null) {
48052 b = a.getBounds ();
48053 d = c.getScreenInsets (a);
48054 } else {
48055 b =  new java.awt.Rectangle (c.getScreenSize ());
48056 d =  new java.awt.Insets (0, 0, 0, 0);
48057 }b.x += d.left;
48058 b.y += d.top;
48059 b.width -= (d.left + d.right);
48060 b.height -= (d.top + d.bottom);
48061 return b;
48062 }, "java.awt.GraphicsConfiguration");
48063 c$ = Clazz_p0p ();
48064 Clazz_pu$h(self.c$);
48065 c$ = Clazz_declareType (javax.swing.PopupFactory, "LightWeightPopup", javax.swing.PopupFactory.ContainerPopup);
48066 c$.getLightWeightPopup = Clazz_defineMethod (c$, "getLightWeightPopup", 
48067 function (a, b, c, d) {
48068 var e = null;
48069 if (e == null) {
48070 e =  new javax.swing.PopupFactory.LightWeightPopup ();
48071 }e.reset (a, b, c, d);
48072 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
48073 e.hide ();
48074 return null;
48075 }return e;
48076 }, "java.awt.Component,java.awt.Component,~N,~N");
48077 Clazz_defineMethod (c$, "hide", 
48078 function () {
48079 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "hide", []);
48080 var a = this.getComponent ();
48081 a.removeAll ();
48082 });
48083 Clazz_overrideMethod (c$, "show", 
48084 function () {
48085 var a = null;
48086 if (this.owner != null) {
48087 a = (Clazz_instanceOf (this.owner, java.awt.Container) ? this.owner : this.owner.getParent ());
48088 }for (var b = a; b != null; b = b.getParent ()) {
48089 if (Clazz_instanceOf (b, javax.swing.JRootPane)) {
48090 a = (b).getLayeredPane ();
48091 } else if (Clazz_instanceOf (b, java.awt.Window)) {
48092 if (a == null) {
48093 a = b;
48094 }break;
48095 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
48096 break;
48097 }}
48098 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (a, this.x, this.y);
48099 var d = this.getComponent ();
48100 d.setLocation (c.x, c.y);
48101 if (Clazz_instanceOf (a, javax.swing.JLayeredPane)) {
48102 (a).add (d, javax.swing.JLayeredPane.POPUP_LAYER, 0);
48103 } else {
48104 a.add (d);
48105 }});
48106 Clazz_overrideMethod (c$, "createComponent", 
48107 function (a) {
48108 var b =  new javax.swing.JPanel ( new java.awt.BorderLayout (), true);
48109 b.setOpaque (true);
48110 return b;
48111 }, "java.awt.Component");
48112 Clazz_defineMethod (c$, "reset", 
48113 function (a, b, c, d) {
48114 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "reset", [a, b, c, d]);
48115 var e = this.getComponent ();
48116 e.setOpaque (b.isOpaque ());
48117 e.setLocation (c, d);
48118 e.add (b, "Center");
48119 b.invalidate ();
48120 this.pack ();
48121 }, "java.awt.Component,java.awt.Component,~N,~N");
48122 c$.lightWeightPopupCacheKey = c$.prototype.lightWeightPopupCacheKey =  new Clazz._O ();
48123 c$ = Clazz_p0p ();
48124 Clazz_pu$h(self.c$);
48125 c$ = Clazz_decorateAsClass (function () {
48126 this.rootPane = null;
48127 Clazz_instantialize (this, arguments);
48128 }, javax.swing.PopupFactory, "MediumWeightPopup", javax.swing.PopupFactory.ContainerPopup);
48129 c$.getMediumWeightPopup = Clazz_defineMethod (c$, "getMediumWeightPopup", 
48130 function (a, b, c, d) {
48131 var e = javax.swing.PopupFactory.MediumWeightPopup.getRecycledMediumWeightPopup ();
48132 if (e == null) {
48133 e =  new javax.swing.PopupFactory.MediumWeightPopup ();
48134 }e.reset (a, b, c, d);
48135 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
48136 e.hide ();
48137 return null;
48138 }return e;
48139 }, "java.awt.Component,java.awt.Component,~N,~N");
48140 c$.getMediumWeightPopupCache = Clazz_defineMethod (c$, "getMediumWeightPopupCache", 
48141  function () {
48142 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey);
48143 if (a == null) {
48144 a =  new java.util.ArrayList ();
48145 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey, a);
48146 }return a;
48147 });
48148 c$.recycleMediumWeightPopup = Clazz_defineMethod (c$, "recycleMediumWeightPopup", 
48149  function (a) {
48150 {
48151 var b = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
48152 if (b.size () < 5) {
48153 b.add (a);
48154 }}}, "javax.swing.PopupFactory.MediumWeightPopup");
48155 c$.getRecycledMediumWeightPopup = Clazz_defineMethod (c$, "getRecycledMediumWeightPopup", 
48156  function () {
48157 {
48158 var a = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
48159 var b;
48160 if ((b = a.size ()) > 0) {
48161 var c = a.get (0);
48162 a.remove (0);
48163 return c;
48164 }return null;
48165 }});
48166 Clazz_defineMethod (c$, "hide", 
48167 function () {
48168 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "hide", []);
48169 this.rootPane.getContentPane ().removeAll ();
48170 javax.swing.PopupFactory.MediumWeightPopup.recycleMediumWeightPopup (this);
48171 });
48172 Clazz_overrideMethod (c$, "show", 
48173 function () {
48174 var a = this.getComponent ();
48175 var b = null;
48176 if (this.owner != null) {
48177 b = this.owner.getParent ();
48178 }while (!(Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) && (b != null)) {
48179 b = b.getParent ();
48180 }
48181 if (Clazz_instanceOf (b, javax.swing.RootPaneContainer)) {
48182 b = (b).getLayeredPane ();
48183 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
48184 a.setVisible (false);
48185 a.setLocation (c.x, c.y);
48186 (b).add (a, javax.swing.JLayeredPane.POPUP_LAYER, 0);
48187 } else {
48188 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
48189 a.setLocation (c.x, c.y);
48190 a.setVisible (false);
48191 b.add (a);
48192 }a.setVisible (true);
48193 });
48194 Clazz_overrideMethod (c$, "createComponent", 
48195 function (a) {
48196 var b =  new javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent ();
48197 this.rootPane =  new javax.swing.JRootPane ();
48198 this.rootPane.setOpaque (true);
48199 b.add (this.rootPane, "Center");
48200 return b;
48201 }, "java.awt.Component");
48202 Clazz_defineMethod (c$, "reset", 
48203 function (a, b, c, d) {
48204 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "reset", [a, b, c, d]);
48205 var e = this.getComponent ();
48206 e.setLocation (c, d);
48207 this.rootPane.getContentPane ().add (b, "Center");
48208 b.invalidate ();
48209 e.validate ();
48210 this.pack ();
48211 }, "java.awt.Component,java.awt.Component,~N,~N");
48212 Clazz_pu$h(self.c$);
48213 c$ = Clazz_declareType (javax.swing.PopupFactory.MediumWeightPopup, "MediumWeightComponent", java.awt.Panel, javax.swing.SwingHeavyWeight);
48214 Clazz_makeConstructor (c$, 
48215 function () {
48216 Clazz_superConstructor (this, javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent, [ new java.awt.BorderLayout ()]);
48217 });
48218 c$ = Clazz_p0p ();
48219 c$.mediumWeightPopupCacheKey = c$.prototype.mediumWeightPopupCacheKey =  new Clazz._O ();
48220 c$ = Clazz_p0p ();
48221 c$.SharedInstanceKey = c$.prototype.SharedInstanceKey =  new Clazz._O ();
48222 Clazz_defineStatics (c$,
48223 "MAX_CACHE_SIZE", 5,
48224 "LIGHT_WEIGHT_POPUP", 0,
48225 "MEDIUM_WEIGHT_POPUP", 1,
48226 "HEAVY_WEIGHT_POPUP", 2);
48227 });
48228 Clazz_declarePackage ("javax.swing");
48229 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 () {
48230 c$ = Clazz_decorateAsClass (function () {
48231 this.component = null;
48232 Clazz_instantialize (this, arguments);
48233 }, javax.swing, "Popup");
48234 Clazz_makeConstructor (c$, 
48235 function (owner, contents, x, y) {
48236 this.construct ();
48237 if (contents == null) {
48238 throw  new IllegalArgumentException ("Contents must be non-null");
48239 }this.reset (owner, contents, x, y);
48240 }, "java.awt.Component,java.awt.Component,~N,~N");
48241 Clazz_makeConstructor (c$, 
48242 function () {
48243 });
48244 Clazz_defineMethod (c$, "show", 
48245 function () {
48246 var component = this.getComponent ();
48247 if (component != null) {
48248 component.show ();
48249 }});
48250 Clazz_defineMethod (c$, "hide", 
48251 function () {
48252 var component = this.getComponent ();
48253 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48254 component.hide ();
48255 (component).getContentPane ().removeAll ();
48256 }this.dispose ();
48257 });
48258 Clazz_defineMethod (c$, "dispose", 
48259 function () {
48260 var component = this.getComponent ();
48261 var window = javax.swing.SwingUtilities.getWindowAncestor (component);
48262 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48263 (component).dispose ();
48264 component = null;
48265 }if (Clazz_instanceOf (window, javax.swing.Popup.DefaultFrame)) {
48266 window.dispose ();
48267 }});
48268 Clazz_defineMethod (c$, "reset", 
48269 function (owner, contents, ownerX, ownerY) {
48270 if (this.getComponent () == null) {
48271 this.component = this.createComponent (owner);
48272 }var c = this.getComponent ();
48273 if (Clazz_instanceOf (c, javax.swing.JWindow)) {
48274 var component = this.getComponent ();
48275 component.setLocation (ownerX, ownerY);
48276 component.getContentPane ().add (contents, "Center");
48277 contents.invalidate ();
48278 if (component.isVisible ()) {
48279 this.pack ();
48280 }}}, "java.awt.Component,java.awt.Component,~N,~N");
48281 Clazz_defineMethod (c$, "pack", 
48282 function () {
48283 var component = this.getComponent ();
48284 if (Clazz_instanceOf (component, java.awt.Window)) {
48285 (component).pack ();
48286 }});
48287 Clazz_defineMethod (c$, "getParentWindow", 
48288  function (owner) {
48289 var window = null;
48290 if (Clazz_instanceOf (owner, java.awt.Window)) {
48291 window = owner;
48292 } else if (owner != null) {
48293 window = javax.swing.SwingUtilities.getWindowAncestor (owner);
48294 }if (window == null) {
48295 window =  new javax.swing.Popup.DefaultFrame ();
48296 }return window;
48297 }, "java.awt.Component");
48298 Clazz_defineMethod (c$, "createComponent", 
48299 function (owner) {
48300 return  new javax.swing.Popup.HeavyWeightWindow (this.getParentWindow (owner));
48301 }, "java.awt.Component");
48302 Clazz_defineMethod (c$, "getComponent", 
48303 function () {
48304 return this.component;
48305 });
48306 Clazz_pu$h(self.c$);
48307 c$ = Clazz_declareType (javax.swing.Popup, "HeavyWeightWindow", javax.swing.JWindow);
48308 Clazz_makeConstructor (c$, 
48309 function (a) {
48310 Clazz_superConstructor (this, javax.swing.Popup.HeavyWeightWindow, [a]);
48311 this.setFocusableWindowState (false);
48312 var b = java.awt.Toolkit.getDefaultToolkit ();
48313 if (Clazz_instanceOf (b, jssun.awt.SunToolkit)) {
48314 (b).setOverrideRedirect (this);
48315 }this.getRootPane ().setUseTrueDoubleBuffering (false);
48316 try {
48317 this.setAlwaysOnTop (true);
48318 } catch (se) {
48319 if (Clazz_exceptionOf (se, SecurityException)) {
48320 } else {
48321 throw se;
48322 }
48323 }
48324 }, "java.awt.Window");
48325 Clazz_overrideMethod (c$, "update", 
48326 function (a) {
48327 this.paint (a);
48328 }, "java.awt.Graphics");
48329 Clazz_defineMethod (c$, "show", 
48330 function () {
48331 this.pack ();
48332 if (this.getWidth () > 0 && this.getHeight () > 0) {
48333 Clazz_superCall (this, javax.swing.Popup.HeavyWeightWindow, "show", []);
48334 }});
48335 c$ = Clazz_p0p ();
48336 Clazz_pu$h(self.c$);
48337 c$ = Clazz_declareType (javax.swing.Popup, "DefaultFrame", java.awt.Frame);
48338 c$ = Clazz_p0p ();
48339 });
48340 Clazz_declarePackage ("javax.swing");
48341 Clazz_declareInterface (javax.swing, "SwingHeavyWeight");
48342 Clazz_declarePackage ("javax.swing");
48343 Clazz_load (["javax.swing.JComponent"], "javax.swing.JToolTip", ["javax.swing.UIManager"], function () {
48344 c$ = Clazz_decorateAsClass (function () {
48345 this.tipText = null;
48346 this.$component = null;
48347 Clazz_instantialize (this, arguments);
48348 }, javax.swing, "JToolTip", javax.swing.JComponent);
48349 Clazz_makeConstructor (c$, 
48350 function () {
48351 Clazz_superConstructor (this, javax.swing.JToolTip, []);
48352 this.setOpaque (true);
48353 this.updateUI ();
48354 });
48355 Clazz_overrideMethod (c$, "getUI", 
48356 function () {
48357 return this.ui;
48358 });
48359 Clazz_overrideMethod (c$, "updateUI", 
48360 function () {
48361 this.setUI (javax.swing.UIManager.getUI (this));
48362 });
48363 Clazz_overrideMethod (c$, "getUIClassID", 
48364 function () {
48365 return "ToolTipUI";
48366 });
48367 Clazz_defineMethod (c$, "setTipText", 
48368 function (tipText) {
48369 var oldValue = this.tipText;
48370 this.tipText = tipText;
48371 this.firePropertyChangeObject ("tiptext", oldValue, tipText);
48372 }, "~S");
48373 Clazz_defineMethod (c$, "getTipText", 
48374 function () {
48375 return this.tipText;
48376 });
48377 Clazz_defineMethod (c$, "setComponent", 
48378 function (c) {
48379 var oldValue = this.$component;
48380 this.$component = c;
48381 this.firePropertyChangeObject ("component", oldValue, c);
48382 }, "javax.swing.JComponent");
48383 Clazz_defineMethod (c$, "getComponent", 
48384 function () {
48385 return this.$component;
48386 });
48387 Clazz_overrideMethod (c$, "alwaysOnTop", 
48388 function () {
48389 return true;
48390 });
48391 Clazz_defineMethod (c$, "paramString", 
48392 function () {
48393 var tipTextString = (this.tipText != null ? this.tipText : "");
48394 return Clazz_superCall (this, javax.swing.JToolTip, "paramString", []) + ",tipText=" + tipTextString;
48395 });
48396 Clazz_defineStatics (c$,
48397 "$uiClassID", "ToolTipUI");
48398 });
48399 Clazz_declarePackage ("javax.swing.event");
48400 Clazz_load (["java.util.EventObject"], "javax.swing.event.PopupMenuEvent", null, function () {
48401 c$ = Clazz_declareType (javax.swing.event, "PopupMenuEvent", java.util.EventObject);
48402 });
48403 Clazz_declarePackage ("javax.swing.event");
48404 Clazz_load (["java.util.EventListener"], "javax.swing.event.PopupMenuListener", null, function () {
48405 Clazz_declareInterface (javax.swing.event, "PopupMenuListener", java.util.EventListener);
48406 });
48407 Clazz_declarePackage ("javax.swing.event");
48408 Clazz_load (["java.util.EventObject"], "javax.swing.event.MenuEvent", null, function () {
48409 c$ = Clazz_declareType (javax.swing.event, "MenuEvent", java.util.EventObject);
48410 });
48411 Clazz_declarePackage ("javax.swing.event");
48412 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuListener", null, function () {
48413 Clazz_declareInterface (javax.swing.event, "MenuListener", java.util.EventListener);
48414 });
48415 Clazz_declarePackage ("javax.swing.border");
48416 Clazz_load (["javax.swing.border.Border"], "javax.swing.border.AbstractBorder", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Component", "$.Insets", "$.Rectangle"], function () {
48417 c$ = Clazz_declareType (javax.swing.border, "AbstractBorder", null, javax.swing.border.Border);
48418 Clazz_overrideMethod (c$, "paintBorder", 
48419 function (c, g, x, y, width, height) {
48420 }, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N");
48421 Clazz_defineMethod (c$, "getBorderInsets", 
48422 function (c) {
48423 return  new java.awt.Insets (0, 0, 0, 0);
48424 }, "java.awt.Component");
48425 Clazz_defineMethod (c$, "getBorderInsets", 
48426 function (c, insets) {
48427 insets.left = insets.top = insets.right = insets.bottom = 0;
48428 return insets;
48429 }, "java.awt.Component,java.awt.Insets");
48430 Clazz_overrideMethod (c$, "isBorderOpaque", 
48431 function () {
48432 return false;
48433 });
48434 Clazz_defineMethod (c$, "getInteriorRectangle", 
48435 function (c, x, y, width, height) {
48436 return javax.swing.border.AbstractBorder.getInteriorRectangle (c, this, x, y, width, height);
48437 }, "java.awt.Component,~N,~N,~N,~N");
48438 c$.getInteriorRectangle = Clazz_defineMethod (c$, "getInteriorRectangle", 
48439 function (c, b, x, y, width, height) {
48440 var insets;
48441 if (b != null) insets = b.getBorderInsets (c);
48442  else insets =  new java.awt.Insets (0, 0, 0, 0);
48443 return  new java.awt.Rectangle (x + insets.left, y + insets.top, width - insets.right - insets.left, height - insets.top - insets.bottom);
48444 }, "java.awt.Component,javax.swing.border.Border,~N,~N,~N,~N");
48445 Clazz_defineMethod (c$, "getBaseline", 
48446 function (c, width, height) {
48447 if (width < 0 || height < 0) {
48448 throw  new IllegalArgumentException ("Width and height must be >= 0");
48449 }return -1;
48450 }, "java.awt.Component,~N,~N");
48451 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
48452 function (c) {
48453 if (c == null) {
48454 throw  new NullPointerException ("Component must be non-null");
48455 }return java.awt.Component.BaselineResizeBehavior.OTHER;
48456 }, "java.awt.Component");
48457 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
48458 function (c) {
48459 return c.getComponentOrientation ().isLeftToRight ();
48460 }, "java.awt.Component");
48461 });
48462 Clazz_declarePackage ("jssun.awt");
48463 Clazz_load (["java.awt.event.InvocationEvent"], "jssun.awt.PeerEvent", null, function () {
48464 c$ = Clazz_decorateAsClass (function () {
48465 this.flags = 0;
48466 Clazz_instantialize (this, arguments);
48467 }, jssun.awt, "PeerEvent", java.awt.event.InvocationEvent);
48468 Clazz_makeConstructor (c$, 
48469 function (source, runnable, flags) {
48470 this.construct (source, runnable, null, false, flags);
48471 }, "~O,Runnable,~N");
48472 Clazz_makeConstructor (c$, 
48473 function (source, runnable, notifier, catchExceptions, flags) {
48474 Clazz_superConstructor (this, jssun.awt.PeerEvent, [source, runnable, notifier, catchExceptions]);
48475 this.flags = flags;
48476 }, "~O,Runnable,~O,~B,~N");
48477 Clazz_defineMethod (c$, "getFlags", 
48478 function () {
48479 return this.flags;
48480 });
48481 Clazz_defineMethod (c$, "coalesceEvents", 
48482 function (newEvent) {
48483 return null;
48484 }, "jssun.awt.PeerEvent");
48485 Clazz_defineStatics (c$,
48486 "PRIORITY_EVENT", 0x01,
48487 "ULTIMATE_PRIORITY_EVENT", 0x02,
48488 "LOW_PRIORITY_EVENT", 0x04);
48489 });
48490 Clazz_declarePackage ("jssun.awt.image");
48491 Clazz_load (["jssun.awt.image.InputStreamImageSource"], "jssun.awt.image.URLImageSource", ["java.net.URL"], function () {
48492 c$ = Clazz_decorateAsClass (function () {
48493 this.url = null;
48494 this.conn = null;
48495 this.actualHost = null;
48496 this.actualPort = 0;
48497 Clazz_instantialize (this, arguments);
48498 }, jssun.awt.image, "URLImageSource", jssun.awt.image.InputStreamImageSource);
48499 Clazz_makeConstructor (c$, 
48500 function (u) {
48501 Clazz_superConstructor (this, jssun.awt.image.URLImageSource, []);
48502 this.url = u;
48503 }, "java.net.URL");
48504 Clazz_makeConstructor (c$, 
48505 function (href) {
48506 this.construct ( new java.net.URL (null, href));
48507 }, "~S");
48508 Clazz_makeConstructor (c$, 
48509 function (u, uc) {
48510 this.construct (u);
48511 this.conn = uc;
48512 }, "java.net.URL,java.net.URLConnection");
48513 Clazz_makeConstructor (c$, 
48514 function (uc) {
48515 this.construct (uc.getURL (), uc);
48516 }, "java.net.URLConnection");
48517 Clazz_overrideMethod (c$, "checkSecurity", 
48518 function (context, quiet) {
48519 if (this.actualHost != null) {
48520 try {
48521 var security = System.getSecurityManager ();
48522 if (security != null) {
48523 security.checkConnect (this.actualHost, this.actualPort, context);
48524 }} catch (e) {
48525 if (Clazz_exceptionOf (e, SecurityException)) {
48526 if (!quiet) {
48527 throw e;
48528 }return false;
48529 } else {
48530 throw e;
48531 }
48532 }
48533 }return true;
48534 }, "~O,~B");
48535 Clazz_defineMethod (c$, "getDecoder", 
48536 function () {
48537 return null;
48538 });
48539 });
48540 Clazz_declarePackage ("jssun.awt.image");
48541 Clazz_load (["java.awt.image.ImageProducer", "jssun.awt.image.ImageFetchable"], "jssun.awt.image.InputStreamImageSource", ["java.lang.SecurityException", "$.Thread", "jssun.awt.image.ImageConsumerQueue", "$.ImageFetcher"], function () {
48542 c$ = Clazz_decorateAsClass (function () {
48543 this.consumers = null;
48544 this.decoder = null;
48545 this.decoders = null;
48546 this.awaitingFetch = false;
48547 Clazz_instantialize (this, arguments);
48548 }, jssun.awt.image, "InputStreamImageSource", null, [java.awt.image.ImageProducer, jssun.awt.image.ImageFetchable]);
48549 Clazz_defineMethod (c$, "countConsumers", 
48550 function (cq) {
48551 var i = 0;
48552 while (cq != null) {
48553 i++;
48554 cq = cq.next;
48555 }
48556 return i;
48557 }, "jssun.awt.image.ImageConsumerQueue");
48558 Clazz_defineMethod (c$, "countConsumers", 
48559 function () {
48560 var id = this.decoders;
48561 var i = this.countConsumers (this.consumers);
48562 while (id != null) {
48563 i += this.countConsumers (id.queue);
48564 id = id.next;
48565 }
48566 return i;
48567 });
48568 Clazz_defineMethod (c$, "addConsumer", 
48569 function (ic) {
48570 this.addConsumer (ic, false);
48571 }, "java.awt.image.ImageConsumer");
48572 Clazz_defineMethod (c$, "printQueue", 
48573 function (cq, prefix) {
48574 while (cq != null) {
48575 System.out.println (prefix + cq);
48576 cq = cq.next;
48577 }
48578 }, "jssun.awt.image.ImageConsumerQueue,~S");
48579 Clazz_defineMethod (c$, "printQueues", 
48580 function (title) {
48581 System.out.println (title + "[ -----------");
48582 this.printQueue (this.consumers, "  ");
48583 for (var id = this.decoders; id != null; id = id.next) {
48584 System.out.println ("    " + id);
48585 this.printQueue (id.queue, "      ");
48586 }
48587 System.out.println ("----------- ]" + title);
48588 }, "~S");
48589 Clazz_defineMethod (c$, "addConsumer", 
48590 function (ic, produce) {
48591 for (var id = this.decoders; id != null; id = id.next) {
48592 if (id.isConsumer (ic)) {
48593 return;
48594 }}
48595 var cq = this.consumers;
48596 while (cq != null && cq.consumer !== ic) {
48597 cq = cq.next;
48598 }
48599 if (cq == null) {
48600 cq =  new jssun.awt.image.ImageConsumerQueue (this, ic);
48601 cq.next = this.consumers;
48602 this.consumers = cq;
48603 } else {
48604 if (!cq.secure) {
48605 var context = null;
48606 var security = System.getSecurityManager ();
48607 if (security != null) {
48608 context = security.getSecurityContext ();
48609 }if (cq.securityContext == null) {
48610 cq.securityContext = context;
48611 } else if (!cq.securityContext.equals (context)) {
48612 this.errorConsumer (cq, false);
48613 throw  new SecurityException ("Applets are trading image data!");
48614 }}cq.interested = true;
48615 }if (produce && this.decoder == null) {
48616 this.startProduction ();
48617 }}, "java.awt.image.ImageConsumer,~B");
48618 Clazz_overrideMethod (c$, "isConsumer", 
48619 function (ic) {
48620 for (var id = this.decoders; id != null; id = id.next) {
48621 if (id.isConsumer (ic)) {
48622 return true;
48623 }}
48624 return jssun.awt.image.ImageConsumerQueue.isConsumer (this.consumers, ic);
48625 }, "java.awt.image.ImageConsumer");
48626 Clazz_defineMethod (c$, "errorAllConsumers", 
48627  function (cq, needReload) {
48628 while (cq != null) {
48629 if (cq.interested) {
48630 this.errorConsumer (cq, needReload);
48631 }cq = cq.next;
48632 }
48633 }, "jssun.awt.image.ImageConsumerQueue,~B");
48634 Clazz_defineMethod (c$, "errorConsumer", 
48635  function (cq, needReload) {
48636 cq.consumer.imageComplete (1);
48637 this.removeConsumer (cq.consumer);
48638 }, "jssun.awt.image.ImageConsumerQueue,~B");
48639 Clazz_overrideMethod (c$, "removeConsumer", 
48640 function (ic) {
48641 for (var id = this.decoders; id != null; id = id.next) {
48642 id.removeConsumer (ic);
48643 }
48644 this.consumers = jssun.awt.image.ImageConsumerQueue.removeConsumer (this.consumers, ic, false);
48645 }, "java.awt.image.ImageConsumer");
48646 Clazz_defineMethod (c$, "startProduction", 
48647 function (ic) {
48648 this.addConsumer (ic, true);
48649 }, "java.awt.image.ImageConsumer");
48650 Clazz_defineMethod (c$, "startProduction", 
48651  function () {
48652 if (!this.awaitingFetch) {
48653 jssun.awt.image.ImageFetcher.add (this);
48654 this.awaitingFetch = true;
48655 }});
48656 Clazz_overrideMethod (c$, "requestTopDownLeftRightResend", 
48657 function (ic) {
48658 }, "java.awt.image.ImageConsumer");
48659 Clazz_defineMethod (c$, "decoderForType", 
48660 function (is, content_type) {
48661 return null;
48662 }, "java.io.InputStream,~S");
48663 Clazz_defineMethod (c$, "getDecoder", 
48664 function (is) {
48665 return null;
48666 }, "java.io.InputStream");
48667 Clazz_overrideMethod (c$, "doFetch", 
48668 function () {
48669 {
48670 if (this.consumers == null) {
48671 this.awaitingFetch = false;
48672 return;
48673 }}var imgd = this.getDecoder ();
48674 if (imgd == null) {
48675 this.badDecoder ();
48676 } else {
48677 this.setDecoder (imgd);
48678 try {
48679 imgd.produceImage ();
48680 } catch (e$$) {
48681 if (Clazz_exceptionOf (e$$, java.io.IOException)) {
48682 var e = e$$;
48683 {
48684 e.printStackTrace ();
48685 }
48686 } else if (Clazz_exceptionOf (e$$, jssun.awt.image.ImageFormatException)) {
48687 var e = e$$;
48688 {
48689 e.printStackTrace ();
48690 }
48691 } else {
48692 throw e$$;
48693 }
48694 } finally {
48695 this.removeDecoder (imgd);
48696 if (Thread.currentThread ().isInterrupted () || !Thread.currentThread ().isAlive ()) {
48697 this.errorAllConsumers (imgd.queue, true);
48698 } else {
48699 this.errorAllConsumers (imgd.queue, false);
48700 }}
48701 }});
48702 Clazz_defineMethod (c$, "badDecoder", 
48703  function () {
48704 var cq;
48705 {
48706 cq = this.consumers;
48707 this.consumers = null;
48708 this.awaitingFetch = false;
48709 }this.errorAllConsumers (cq, false);
48710 });
48711 Clazz_defineMethod (c$, "setDecoder", 
48712  function (mydecoder) {
48713 var cq;
48714 {
48715 mydecoder.next = this.decoders;
48716 this.decoders = mydecoder;
48717 this.decoder = mydecoder;
48718 cq = this.consumers;
48719 mydecoder.queue = cq;
48720 this.consumers = null;
48721 this.awaitingFetch = false;
48722 }}, "jssun.awt.image.ImageDecoder");
48723 Clazz_defineMethod (c$, "removeDecoder", 
48724  function (mydecoder) {
48725 this.doneDecoding (mydecoder);
48726 var idprev = null;
48727 for (var id = this.decoders; id != null; id = id.next) {
48728 if (id === mydecoder) {
48729 if (idprev == null) {
48730 this.decoders = id.next;
48731 } else {
48732 idprev.next = id.next;
48733 }break;
48734 }idprev = id;
48735 }
48736 }, "jssun.awt.image.ImageDecoder");
48737 Clazz_defineMethod (c$, "doneDecoding", 
48738 function (mydecoder) {
48739 if (this.decoder === mydecoder) {
48740 this.decoder = null;
48741 if (this.consumers != null) {
48742 this.startProduction ();
48743 }}}, "jssun.awt.image.ImageDecoder");
48744 Clazz_defineMethod (c$, "latchConsumers", 
48745 function (id) {
48746 this.doneDecoding (id);
48747 }, "jssun.awt.image.ImageDecoder");
48748 Clazz_defineMethod (c$, "flush", 
48749 function () {
48750 this.decoder = null;
48751 });
48752 });
48753 Clazz_declarePackage ("java.awt.image");
48754 Clazz_declareInterface (java.awt.image, "ImageProducer");
48755 Clazz_declarePackage ("jssun.awt.image");
48756 Clazz_declareInterface (jssun.awt.image, "ImageFetchable");
48757 Clazz_declarePackage ("jssun.awt.image");
48758 c$ = Clazz_decorateAsClass (function () {
48759 this.next = null;
48760 this.consumer = null;
48761 this.interested = false;
48762 this.securityContext = null;
48763 this.secure = false;
48764 Clazz_instantialize (this, arguments);
48765 }, jssun.awt.image, "ImageConsumerQueue");
48766 c$.removeConsumer = Clazz_defineMethod (c$, "removeConsumer", 
48767 function (cqbase, ic, stillinterested) {
48768 var cqprev = null;
48769 for (var cq = cqbase; cq != null; cq = cq.next) {
48770 if (cq.consumer === ic) {
48771 if (cqprev == null) {
48772 cqbase = cq.next;
48773 } else {
48774 cqprev.next = cq.next;
48775 }cq.interested = stillinterested;
48776 break;
48777 }cqprev = cq;
48778 }
48779 return cqbase;
48780 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer,~B");
48781 c$.isConsumer = Clazz_defineMethod (c$, "isConsumer", 
48782 function (cqbase, ic) {
48783 for (var cq = cqbase; cq != null; cq = cq.next) {
48784 if (cq.consumer === ic) {
48785 return true;
48786 }}
48787 return false;
48788 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer");
48789 Clazz_makeConstructor (c$, 
48790 function (src, ic) {
48791 this.consumer = ic;
48792 this.interested = true;
48793 this.secure = true;
48794 }, "jssun.awt.image.InputStreamImageSource,java.awt.image.ImageConsumer");
48795 Clazz_overrideMethod (c$, "toString", 
48796 function () {
48797 return ("[" + this.consumer + ", " + (this.interested ? "" : "not ") + "interested" + (this.securityContext != null ? ", " + this.securityContext : "") + "]");
48798 });
48799 Clazz_declarePackage ("jssun.awt.image");
48800 Clazz_load (["java.lang.Thread", "$.StringBuffer"], ["jssun.awt.image.FetcherInfo", "$.ImageFetcher"], ["java.util.Vector", "jssun.awt.AppContext"], function () {
48801 c$ = Clazz_declareType (jssun.awt.image, "ImageFetcher", Thread);
48802 Clazz_makeConstructor (c$, 
48803  function (threadGroup, index) {
48804 Clazz_superConstructor (this, jssun.awt.image.ImageFetcher, [threadGroup, "Image Fetcher " + index]);
48805 this.setDaemon (true);
48806 }, "ThreadGroup,~N");
48807 c$.add = Clazz_defineMethod (c$, "add", 
48808 function (src) {
48809 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48810 {
48811 if (!info.waitList.contains (src)) {
48812 info.waitList.addElement (src);
48813 if (info.numWaiting == 0 && info.numFetchers < info.fetchers.length) {
48814 jssun.awt.image.ImageFetcher.createFetchers (info);
48815 }info.waitList.notify ();
48816 }}}, "jssun.awt.image.ImageFetchable");
48817 c$.remove = Clazz_defineMethod (c$, "remove", 
48818 function (src) {
48819 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48820 {
48821 if (info.waitList.contains (src)) {
48822 info.waitList.removeElement (src);
48823 }}}, "jssun.awt.image.ImageFetchable");
48824 c$.isFetcher = Clazz_defineMethod (c$, "isFetcher", 
48825 function (t) {
48826 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48827 {
48828 for (var i = 0; i < info.fetchers.length; i++) {
48829 if (info.fetchers[i] === t) {
48830 return true;
48831 }}
48832 }return false;
48833 }, "Thread");
48834 c$.amFetcher = Clazz_defineMethod (c$, "amFetcher", 
48835 function () {
48836 return jssun.awt.image.ImageFetcher.isFetcher (Thread.currentThread ());
48837 });
48838 c$.nextImage = Clazz_defineMethod (c$, "nextImage", 
48839  function () {
48840 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48841 {
48842 var src = null;
48843 var end = System.currentTimeMillis () + 5000;
48844 while (src == null) {
48845 while (info.waitList.size () == 0) {
48846 var now = System.currentTimeMillis ();
48847 if (now >= end) {
48848 return null;
48849 }try {
48850 info.numWaiting++;
48851 info.waitList.wait (end - now);
48852 } catch (e) {
48853 if (Clazz_exceptionOf (e, InterruptedException)) {
48854 return null;
48855 } else {
48856 throw e;
48857 }
48858 } finally {
48859 info.numWaiting--;
48860 }
48861 }
48862 src = info.waitList.elementAt (0);
48863 info.waitList.removeElement (src);
48864 }
48865 return src;
48866 }});
48867 Clazz_overrideMethod (c$, "run", 
48868 function () {
48869 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48870 try {
48871 this.fetchloop ();
48872 } catch (e) {
48873 if (Clazz_exceptionOf (e, Exception)) {
48874 e.printStackTrace ();
48875 } else {
48876 throw e;
48877 }
48878 } finally {
48879 {
48880 var me = Thread.currentThread ();
48881 for (var i = 0; i < info.fetchers.length; i++) {
48882 if (info.fetchers[i] === me) {
48883 info.fetchers[i] = null;
48884 info.numFetchers--;
48885 }}
48886 }}
48887 });
48888 Clazz_defineMethod (c$, "fetchloop", 
48889  function () {
48890 var me = Thread.currentThread ();
48891 while (jssun.awt.image.ImageFetcher.isFetcher (me)) {
48892 Thread.interrupted ();
48893 me.setPriority (8);
48894 var src = jssun.awt.image.ImageFetcher.nextImage ();
48895 if (src == null) {
48896 return;
48897 }try {
48898 src.doFetch ();
48899 } catch (e) {
48900 if (Clazz_exceptionOf (e, Exception)) {
48901 System.err.println ("Uncaught error fetching image:");
48902 e.printStackTrace ();
48903 } else {
48904 throw e;
48905 }
48906 }
48907 jssun.awt.image.ImageFetcher.stoppingAnimation (me);
48908 }
48909 });
48910 c$.startingAnimation = Clazz_defineMethod (c$, "startingAnimation", 
48911 function () {
48912 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48913 var me = Thread.currentThread ();
48914 {
48915 for (var i = 0; i < info.fetchers.length; i++) {
48916 if (info.fetchers[i] === me) {
48917 info.fetchers[i] = null;
48918 info.numFetchers--;
48919 me.setName ("Image Animator " + i);
48920 if (info.waitList.size () > info.numWaiting) {
48921 jssun.awt.image.ImageFetcher.createFetchers (info);
48922 }return;
48923 }}
48924 }me.setPriority (2);
48925 me.setName ("Image Animator");
48926 });
48927 c$.stoppingAnimation = Clazz_defineMethod (c$, "stoppingAnimation", 
48928  function (me) {
48929 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48930 {
48931 var index = -1;
48932 for (var i = 0; i < info.fetchers.length; i++) {
48933 if (info.fetchers[i] === me) {
48934 return;
48935 }if (info.fetchers[i] == null) {
48936 index = i;
48937 }}
48938 if (index >= 0) {
48939 info.fetchers[index] = me;
48940 info.numFetchers++;
48941 me.setName ("Image Fetcher " + index);
48942 return;
48943 }}}, "Thread");
48944 c$.createFetchers = Clazz_defineMethod (c$, "createFetchers", 
48945  function (info) {
48946 var appContext = jssun.awt.AppContext.getAppContext ();
48947 var threadGroup = appContext.getThreadGroup ();
48948 var fetcherThreadGroup;
48949 try {
48950 if (threadGroup.getParent () != null) {
48951 fetcherThreadGroup = threadGroup;
48952 } else {
48953 threadGroup = Thread.currentThread ().getThreadGroup ();
48954 var parent = threadGroup.getParent ();
48955 while ((parent != null) && (parent.getParent () != null)) {
48956 threadGroup = parent;
48957 parent = threadGroup.getParent ();
48958 }
48959 fetcherThreadGroup = threadGroup;
48960 }} catch (e) {
48961 if (Clazz_exceptionOf (e, SecurityException)) {
48962 fetcherThreadGroup = appContext.getThreadGroup ();
48963 } else {
48964 throw e;
48965 }
48966 }
48967 var fetcherGroup = fetcherThreadGroup;
48968 for (var i = 0; i < info.fetchers.length; i++) {
48969 if (info.fetchers[i] == null) {
48970 info.fetchers[i] =  new jssun.awt.image.ImageFetcher (fetcherGroup, i);
48971 info.fetchers[i].start ();
48972 info.numFetchers++;
48973 break;
48974 }}
48975 return;
48976 }, "jssun.awt.image.FetcherInfo");
48977 Clazz_defineStatics (c$,
48978 "HIGH_PRIORITY", 8,
48979 "LOW_PRIORITY", 3,
48980 "ANIM_PRIORITY", 2,
48981 "TIMEOUT", 5000);
48982 c$ = Clazz_decorateAsClass (function () {
48983 this.fetchers = null;
48984 this.numFetchers = 0;
48985 this.numWaiting = 0;
48986 this.waitList = null;
48987 Clazz_instantialize (this, arguments);
48988 }, jssun.awt.image, "FetcherInfo");
48989 Clazz_makeConstructor (c$, 
48990  function () {
48991 this.fetchers =  new Array (4);
48992 this.numFetchers = 0;
48993 this.numWaiting = 0;
48994 this.waitList =  new java.util.Vector ();
48995 });
48996 c$.getFetcherInfo = Clazz_defineMethod (c$, "getFetcherInfo", 
48997 function () {
48998 var appContext = jssun.awt.AppContext.getAppContext ();
48999 {
49000 var info = appContext.get (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY);
49001 if (info == null) {
49002 info =  new jssun.awt.image.FetcherInfo ();
49003 appContext.put (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY, info);
49004 }return info;
49005 }});
49006 Clazz_defineStatics (c$,
49007 "MAX_NUM_FETCHERS_PER_APPCONTEXT", 4);
49008 c$.FETCHER_INFO_KEY = c$.prototype.FETCHER_INFO_KEY =  new StringBuffer ("FetcherInfo");
49009 });
49010 Clazz_declarePackage ("java.awt.event");
49011 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.FocusEvent", ["jssun.awt.AppContext", "$.SunToolkit"], function () {
49012 c$ = Clazz_decorateAsClass (function () {
49013 this.temporary = false;
49014 this.opposite = null;
49015 Clazz_instantialize (this, arguments);
49016 }, java.awt.event, "FocusEvent", java.awt.event.ComponentEvent);
49017 Clazz_makeConstructor (c$, 
49018 function (source, id, temporary, opposite) {
49019 Clazz_superConstructor (this, java.awt.event.FocusEvent, [source, id]);
49020 this.temporary = temporary;
49021 this.opposite = opposite;
49022 }, "java.awt.Component,~N,~B,java.awt.Component");
49023 Clazz_makeConstructor (c$, 
49024 function (source, id, temporary) {
49025 this.construct (source, id, temporary, null);
49026 }, "java.awt.Component,~N,~B");
49027 Clazz_makeConstructor (c$, 
49028 function (source, id) {
49029 this.construct (source, id, false);
49030 }, "java.awt.Component,~N");
49031 Clazz_defineMethod (c$, "isTemporary", 
49032 function () {
49033 return this.temporary;
49034 });
49035 Clazz_defineMethod (c$, "getOppositeComponent", 
49036 function () {
49037 if (this.opposite == null) {
49038 return null;
49039 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
49040 });
49041 Clazz_overrideMethod (c$, "paramString", 
49042 function () {
49043 var typeStr;
49044 switch (this.id) {
49045 case 1004:
49046 typeStr = "FOCUS_GAINED";
49047 break;
49048 case 1005:
49049 typeStr = "FOCUS_LOST";
49050 break;
49051 default:
49052 typeStr = "unknown type";
49053 }
49054 return typeStr + (this.temporary ? ",temporary" : ",permanent") + ",opposite=" + this.getOppositeComponent ();
49055 });
49056 Clazz_defineStatics (c$,
49057 "FOCUS_FIRST", 1004,
49058 "FOCUS_LAST", 1005,
49059 "FOCUS_GAINED", 1004,
49060 "FOCUS_LOST", 1005);
49061 });
49062 Clazz_declarePackage ("java.awt.event");
49063 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.HierarchyEvent", ["java.awt.Component"], function () {
49064 c$ = Clazz_decorateAsClass (function () {
49065 this.changed = null;
49066 this.changedParent = null;
49067 this.changeFlags = 0;
49068 Clazz_instantialize (this, arguments);
49069 }, java.awt.event, "HierarchyEvent", java.awt.AWTEvent);
49070 Clazz_makeConstructor (c$, 
49071 function (source, id, changed, changedParent) {
49072 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
49073 this.changed = changed;
49074 this.changedParent = changedParent;
49075 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container");
49076 Clazz_makeConstructor (c$, 
49077 function (source, id, changed, changedParent, changeFlags) {
49078 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
49079 this.changed = changed;
49080 this.changedParent = changedParent;
49081 this.changeFlags = changeFlags;
49082 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container,~N");
49083 Clazz_defineMethod (c$, "getComponent", 
49084 function () {
49085 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
49086 });
49087 Clazz_defineMethod (c$, "getChanged", 
49088 function () {
49089 return this.changed;
49090 });
49091 Clazz_defineMethod (c$, "getChangedParent", 
49092 function () {
49093 return this.changedParent;
49094 });
49095 Clazz_defineMethod (c$, "getChangeFlags", 
49096 function () {
49097 return this.changeFlags;
49098 });
49099 Clazz_overrideMethod (c$, "paramString", 
49100 function () {
49101 var typeStr;
49102 switch (this.id) {
49103 case 1401:
49104 typeStr = "ANCESTOR_MOVED (" + this.changed + "," + this.changedParent + ")";
49105 break;
49106 case 1402:
49107 typeStr = "ANCESTOR_RESIZED (" + this.changed + "," + this.changedParent + ")";
49108 break;
49109 case 1400:
49110 {
49111 typeStr = "HIERARCHY_CHANGED (";
49112 var first = true;
49113 if ((this.changeFlags & 1) != 0) {
49114 first = false;
49115 typeStr += "PARENT_CHANGED";
49116 }if ((this.changeFlags & 2) != 0) {
49117 if (first) {
49118 first = false;
49119 } else {
49120 typeStr += ",";
49121 }typeStr += "DISPLAYABILITY_CHANGED";
49122 }if ((this.changeFlags & 4) != 0) {
49123 if (first) {
49124 first = false;
49125 } else {
49126 typeStr += ",";
49127 }typeStr += "SHOWING_CHANGED";
49128 }if (!first) {
49129 typeStr += ",";
49130 }typeStr += this.changed + "," + this.changedParent + ")";
49131 break;
49132 }default:
49133 typeStr = "unknown type";
49134 }
49135 return typeStr;
49136 });
49137 Clazz_defineStatics (c$,
49138 "HIERARCHY_FIRST", 1400,
49139 "HIERARCHY_CHANGED", 1400,
49140 "ANCESTOR_MOVED", 1401,
49141 "ANCESTOR_RESIZED", 1402,
49142 "HIERARCHY_LAST", 1402,
49143 "PARENT_CHANGED", 0x1,
49144 "DISPLAYABILITY_CHANGED", 0x2,
49145 "SHOWING_CHANGED", 0x4);
49146 });
49147 Clazz_declarePackage ("jssun.awt");
49148 Clazz_declareInterface (jssun.awt, "ConstrainableGraphics");
49149 Clazz_declarePackage ("jssun.awt");
49150 Clazz_declareInterface (jssun.awt, "Graphics2Delegate");
49151 Clazz_declarePackage ("java.awt.event");
49152 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.ContainerEvent", ["java.awt.Container"], function () {
49153 c$ = Clazz_decorateAsClass (function () {
49154 this.child = null;
49155 Clazz_instantialize (this, arguments);
49156 }, java.awt.event, "ContainerEvent", java.awt.event.ComponentEvent);
49157 Clazz_makeConstructor (c$, 
49158 function (source, id, child) {
49159 Clazz_superConstructor (this, java.awt.event.ContainerEvent, [source, id]);
49160 this.child = child;
49161 }, "java.awt.Component,~N,java.awt.Component");
49162 Clazz_defineMethod (c$, "getContainer", 
49163 function () {
49164 return (Clazz_instanceOf (this.source, java.awt.Container)) ? this.source : null;
49165 });
49166 Clazz_defineMethod (c$, "getChild", 
49167 function () {
49168 return this.child;
49169 });
49170 Clazz_overrideMethod (c$, "paramString", 
49171 function () {
49172 var typeStr;
49173 switch (this.id) {
49174 case 300:
49175 typeStr = "COMPONENT_ADDED";
49176 break;
49177 case 301:
49178 typeStr = "COMPONENT_REMOVED";
49179 break;
49180 default:
49181 typeStr = "unknown type";
49182 }
49183 return typeStr + ",child=" + this.child.getName ();
49184 });
49185 Clazz_defineStatics (c$,
49186 "CONTAINER_FIRST", 300,
49187 "CONTAINER_LAST", 301,
49188 "COMPONENT_ADDED", 300,
49189 "COMPONENT_REMOVED", 301);
49190 });
49191 Clazz_declarePackage ("jssun.applet");
49192 Clazz_load (["java.util.EventObject"], "jssun.applet.AppletEvent", null, function () {
49193 c$ = Clazz_decorateAsClass (function () {
49194 this.arg = null;
49195 this.id = 0;
49196 Clazz_instantialize (this, arguments);
49197 }, jssun.applet, "AppletEvent", java.util.EventObject);
49198 Clazz_makeConstructor (c$, 
49199 function (source, id, argument) {
49200 Clazz_superConstructor (this, jssun.applet.AppletEvent, [source]);
49201 this.arg = argument;
49202 this.id = id;
49203 }, "~O,~N,~O");
49204 Clazz_defineMethod (c$, "getID", 
49205 function () {
49206 return this.id;
49207 });
49208 Clazz_defineMethod (c$, "getArgument", 
49209 function () {
49210 return this.arg;
49211 });
49212 Clazz_overrideMethod (c$, "toString", 
49213 function () {
49214 var str = this.getClass ().getName () + "[source=" + this.source + " + id=" + this.id;
49215 if (this.arg != null) {
49216 str += " + arg=" + this.arg;
49217 }str += " ]";
49218 return str;
49219 });
49220 });
49221 Clazz_declarePackage ("jssun.applet");
49222 Clazz_load (["jssun.applet.AppletListener"], "jssun.applet.AppletEventMulticaster", null, function () {
49223 c$ = Clazz_decorateAsClass (function () {
49224 this.a = null;
49225 this.b = null;
49226 Clazz_instantialize (this, arguments);
49227 }, jssun.applet, "AppletEventMulticaster", null, jssun.applet.AppletListener);
49228 Clazz_makeConstructor (c$, 
49229 function (a, b) {
49230 this.a = a;
49231 this.b = b;
49232 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49233 Clazz_defineMethod (c$, "appletStateChanged", 
49234 function (e) {
49235 this.a.appletStateChanged (e);
49236 this.b.appletStateChanged (e);
49237 }, "jssun.applet.AppletEvent");
49238 c$.add = Clazz_defineMethod (c$, "add", 
49239 function (a, b) {
49240 return jssun.applet.AppletEventMulticaster.addInternal (a, b);
49241 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49242 c$.remove = Clazz_defineMethod (c$, "remove", 
49243 function (l, oldl) {
49244 return jssun.applet.AppletEventMulticaster.removeInternal (l, oldl);
49245 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49246 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
49247  function (a, b) {
49248 if (a == null) return b;
49249 if (b == null) return a;
49250 return  new jssun.applet.AppletEventMulticaster (a, b);
49251 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49252 Clazz_defineMethod (c$, "remove", 
49253 function (oldl) {
49254 if (oldl === this.a) return this.b;
49255 if (oldl === this.b) return this.a;
49256 var a2 = jssun.applet.AppletEventMulticaster.removeInternal (this.a, oldl);
49257 var b2 = jssun.applet.AppletEventMulticaster.removeInternal (this.b, oldl);
49258 if (a2 === this.a && b2 === this.b) {
49259 return this;
49260 }return jssun.applet.AppletEventMulticaster.addInternal (a2, b2);
49261 }, "jssun.applet.AppletListener");
49262 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
49263  function (l, oldl) {
49264 if (l === oldl || l == null) {
49265 return null;
49266 } else if (Clazz_instanceOf (l, jssun.applet.AppletEventMulticaster)) {
49267 return (l).remove (oldl);
49268 } else {
49269 return l;
49270 }}, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49271 });
49272 Clazz_declarePackage ("jssun.applet");
49273 Clazz_load (["java.util.EventListener"], "jssun.applet.AppletListener", null, function () {
49274 Clazz_declareInterface (jssun.applet, "AppletListener", java.util.EventListener);
49275 });
49276 Clazz_declarePackage ("jssun.misc");
49277 Clazz_load (["java.util.Enumeration"], ["jssun.misc.Queue", "$.LIFOQueueEnumerator", "$.FIFOQueueEnumerator", "$.QueueElement"], ["java.util.NoSuchElementException", "swingjs.JSToolkit"], function () {
49278 c$ = Clazz_decorateAsClass (function () {
49279 this.length = 0;
49280 this.head = null;
49281 this.tail = null;
49282 Clazz_instantialize (this, arguments);
49283 }, jssun.misc, "Queue");
49284 Clazz_makeConstructor (c$, 
49285 function () {
49286 });
49287 Clazz_defineMethod (c$, "enqueue", 
49288 function (obj) {
49289 var newElt =  new jssun.misc.QueueElement (obj);
49290 if (this.head == null) {
49291 this.head = newElt;
49292 this.tail = newElt;
49293 this.length = 1;
49294 } else {
49295 newElt.next = this.head;
49296 this.head.prev = newElt;
49297 this.head = newElt;
49298 this.length++;
49299 }this.notify ();
49300 }, "~O");
49301 Clazz_defineMethod (c$, "dequeue", 
49302 function () {
49303 return this.dequeue (0);
49304 });
49305 Clazz_defineMethod (c$, "dequeue", 
49306 function (timeOut) {
49307 while (this.tail == null) {
49308 swingjs.JSToolkit.warn ("Cannot wait in Queue.java");
49309 this.wait (timeOut);
49310 }
49311 var elt = this.tail;
49312 this.tail = elt.prev;
49313 if (this.tail == null) {
49314 this.head = null;
49315 } else {
49316 this.tail.next = null;
49317 }this.length--;
49318 return elt.obj;
49319 }, "~N");
49320 Clazz_defineMethod (c$, "isEmpty", 
49321 function () {
49322 return (this.tail == null);
49323 });
49324 Clazz_defineMethod (c$, "elements", 
49325 function () {
49326 return  new jssun.misc.LIFOQueueEnumerator (this);
49327 });
49328 Clazz_defineMethod (c$, "reverseElements", 
49329 function () {
49330 return  new jssun.misc.FIFOQueueEnumerator (this);
49331 });
49332 Clazz_defineMethod (c$, "dump", 
49333 function (msg) {
49334 System.err.println (">> " + msg);
49335 System.err.println ("[" + this.length + " elt(s); head = " + (this.head == null ? "null" : (this.head.obj) + "") + " tail = " + (this.tail == null ? "null" : (this.tail.obj) + ""));
49336 var cursor = this.head;
49337 var last = null;
49338 while (cursor != null) {
49339 System.err.println ("  " + cursor);
49340 last = cursor;
49341 cursor = cursor.next;
49342 }
49343 if (last !== this.tail) {
49344 System.err.println ("  tail != last: " + this.tail + ", " + last);
49345 }System.err.println ("]");
49346 }, "~S");
49347 c$ = Clazz_decorateAsClass (function () {
49348 this.queue = null;
49349 this.cursor = null;
49350 Clazz_instantialize (this, arguments);
49351 }, jssun.misc, "FIFOQueueEnumerator", null, java.util.Enumeration);
49352 Clazz_makeConstructor (c$, 
49353 function (q) {
49354 this.queue = q;
49355 this.cursor = q.tail;
49356 }, "jssun.misc.Queue");
49357 Clazz_overrideMethod (c$, "hasMoreElements", 
49358 function () {
49359 return (this.cursor != null);
49360 });
49361 Clazz_overrideMethod (c$, "nextElement", 
49362 function () {
49363 {
49364 if (this.cursor != null) {
49365 var result = this.cursor;
49366 this.cursor = this.cursor.prev;
49367 return result.obj;
49368 }}throw  new java.util.NoSuchElementException ("FIFOQueueEnumerator");
49369 });
49370 c$ = Clazz_decorateAsClass (function () {
49371 this.queue = null;
49372 this.cursor = null;
49373 Clazz_instantialize (this, arguments);
49374 }, jssun.misc, "LIFOQueueEnumerator", null, java.util.Enumeration);
49375 Clazz_makeConstructor (c$, 
49376 function (q) {
49377 this.queue = q;
49378 this.cursor = q.head;
49379 }, "jssun.misc.Queue");
49380 Clazz_overrideMethod (c$, "hasMoreElements", 
49381 function () {
49382 return (this.cursor != null);
49383 });
49384 Clazz_overrideMethod (c$, "nextElement", 
49385 function () {
49386 {
49387 if (this.cursor != null) {
49388 var result = this.cursor;
49389 this.cursor = this.cursor.next;
49390 return result.obj;
49391 }}throw  new java.util.NoSuchElementException ("LIFOQueueEnumerator");
49392 });
49393 c$ = Clazz_decorateAsClass (function () {
49394 this.next = null;
49395 this.prev = null;
49396 this.obj = null;
49397 Clazz_instantialize (this, arguments);
49398 }, jssun.misc, "QueueElement");
49399 Clazz_makeConstructor (c$, 
49400 function (obj) {
49401 this.obj = obj;
49402 }, "~O");
49403 Clazz_overrideMethod (c$, "toString", 
49404 function () {
49405 return "QueueElement[obj=" + this.obj + (this.prev == null ? " null" : " prev") + (this.next == null ? " null" : " next") + "]";
49406 });
49407 });
49408 Clazz_declarePackage ("javax.swing.plaf");
49409 Clazz_declareInterface (javax.swing.plaf, "UIResource");
49410 Clazz_declarePackage ("javax.swing.plaf");
49411 Clazz_load (["javax.swing.InputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.InputMapUIResource", null, function () {
49412 c$ = Clazz_declareType (javax.swing.plaf, "InputMapUIResource", javax.swing.InputMap, javax.swing.plaf.UIResource);
49413 Clazz_makeConstructor (c$, 
49414 function () {
49415 Clazz_superConstructor (this, javax.swing.plaf.InputMapUIResource, []);
49416 });
49417 });
49418 Clazz_declarePackage ("javax.swing.plaf");
49419 Clazz_load (["javax.swing.ActionMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ActionMapUIResource", null, function () {
49420 c$ = Clazz_declareType (javax.swing.plaf, "ActionMapUIResource", javax.swing.ActionMap, javax.swing.plaf.UIResource);
49421 Clazz_makeConstructor (c$, 
49422 function () {
49423 Clazz_superConstructor (this, javax.swing.plaf.ActionMapUIResource, []);
49424 });
49425 });
49426 Clazz_declarePackage ("javax.swing.plaf");
49427 Clazz_load (["java.awt.peer.LightweightPeer"], "javax.swing.plaf.ComponentUI", ["java.lang.Error", "java.awt.Component"], function () {
49428 c$ = Clazz_declareType (javax.swing.plaf, "ComponentUI", null, java.awt.peer.LightweightPeer);
49429 Clazz_makeConstructor (c$, 
49430 function () {
49431 });
49432 Clazz_defineMethod (c$, "installUI", 
49433 function (c) {
49434 }, "javax.swing.JComponent");
49435 Clazz_defineMethod (c$, "uninstallUI", 
49436 function (c) {
49437 }, "javax.swing.JComponent");
49438 Clazz_defineMethod (c$, "paint", 
49439 function (g, c) {
49440 }, "java.awt.Graphics,javax.swing.JComponent");
49441 Clazz_defineMethod (c$, "update", 
49442 function (g, c) {
49443 }, "java.awt.Graphics,javax.swing.JComponent");
49444 Clazz_defineMethod (c$, "getPreferredSize", 
49445 function (c) {
49446 return null;
49447 }, "javax.swing.JComponent");
49448 Clazz_defineMethod (c$, "getMinimumSize", 
49449 function (c) {
49450 return this.getPreferredSize (c);
49451 }, "javax.swing.JComponent");
49452 Clazz_defineMethod (c$, "getMaximumSize", 
49453 function (c) {
49454 return null;
49455 }, "javax.swing.JComponent");
49456 Clazz_defineMethod (c$, "contains", 
49457 function (c, x, y) {
49458 return c.inside (x, y);
49459 }, "javax.swing.JComponent,~N,~N");
49460 c$.createUI = Clazz_defineMethod (c$, "createUI", 
49461 function (c) {
49462 throw  new Error ("ComponentUI.createUI not implemented.");
49463 }, "javax.swing.JComponent");
49464 Clazz_defineMethod (c$, "getBaseline", 
49465 function (c, width, height) {
49466 return -1;
49467 }, "javax.swing.JComponent,~N,~N");
49468 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
49469 function (c) {
49470 return java.awt.Component.BaselineResizeBehavior.OTHER;
49471 }, "javax.swing.JComponent");
49472 });
49473 Clazz_declarePackage ("javax.swing.plaf");
49474 Clazz_load (["java.awt.Font", "javax.swing.plaf.UIResource"], "javax.swing.plaf.FontUIResource", null, function () {
49475 c$ = Clazz_declareType (javax.swing.plaf, "FontUIResource", java.awt.Font, javax.swing.plaf.UIResource);
49476 });
49477 Clazz_declarePackage ("javax.swing.plaf");
49478 Clazz_load (["java.awt.Color", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ColorUIResource", null, function () {
49479 c$ = Clazz_declareType (javax.swing.plaf, "ColorUIResource", java.awt.Color, javax.swing.plaf.UIResource);
49480 });
49481 Clazz_declarePackage ("javax.swing.plaf");
49482 Clazz_load (["javax.swing.ComponentInputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ComponentInputMapUIResource", null, function () {
49483 c$ = Clazz_declareType (javax.swing.plaf, "ComponentInputMapUIResource", javax.swing.ComponentInputMap, javax.swing.plaf.UIResource);
49484 });
49485 Clazz_declarePackage ("swingjs.api");
49486 Clazz_declareInterface (swingjs.api, "JSFunction");
49487 Clazz_declarePackage ("swingjs.api");
49488 Clazz_declareInterface (swingjs.api, "JSInterface");
49489 Clazz_declarePackage ("swingjs.api");
49490 c$ = Clazz_declareType (swingjs.api, "Interface");
49491 c$.getInstanceWithParams = Clazz_defineMethod (c$, "getInstanceWithParams", 
49492 function (name, classes, params) {
49493 try {
49494 var cl = Clazz._4Name (name);
49495 return cl.getConstructor (classes).newInstance (params);
49496 } catch (e) {
49497 if (Clazz_exceptionOf (e, Exception)) {
49498 return null;
49499 } else {
49500 throw e;
49501 }
49502 }
49503 }, "~S,~A,~A");
49504 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49505 function (name, isQuiet) {
49506 try {
49507 {
49508 Clazz._isQuiet = isQuiet;
49509 }System.out.println ("swingjs.api.Interface creating instance of " + name);
49510 var x = Clazz._4Name (name);
49511 {
49512 Clazz._isQuiet = false;
49513 }return (x == null ? null : x.newInstance ());
49514 } catch (e) {
49515 if (Clazz_exceptionOf (e, Exception)) {
49516 System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e);
49517 return null;
49518 } else {
49519 throw e;
49520 }
49521 }
49522 }, "~S,~B");
49523 Clazz_declarePackage ("swingjs.api");
49524 c$ = Clazz_declareType (swingjs.api, "DOMNode");
49525 c$.createElement = Clazz_defineMethod (c$, "createElement", 
49526 function (key, id) {
49527 var obj = null;
49528 {
49529 obj = document.createElement(key);
49530 obj.id = id;
49531 }return obj;
49532 }, "~S,~S");
49533 c$.getParent = Clazz_defineMethod (c$, "getParent", 
49534 function (obj) {
49535 {
49536 return obj.parentNode;
49537 }}, "swingjs.api.DOMNode");
49538 c$.remove = Clazz_defineMethod (c$, "remove", 
49539 function (obj) {
49540 {
49541 try {
49542 var p = obj.parentNode;
49543 p.removeNode(obj);
49544 } catch(e) {};
49545 return p;
49546 }}, "swingjs.api.DOMNode");
49547 c$.add = Clazz_defineMethod (c$, "add", 
49548 function (parent, child) {
49549 {
49550 parent && parent.appendChild(child);
49551 }}, "swingjs.api.DOMNode,swingjs.api.DOMNode");
49552 c$.getAttr = Clazz_defineMethod (c$, "getAttr", 
49553 function (obj, attr) {
49554 {
49555 if (obj)return obj[attr];
49556 }}, "swingjs.api.DOMNode,~S");
49557 Clazz_defineMethod (c$, "getStyle", 
49558 function (style) {
49559 {
49560 if (obj)return obj.style[style];
49561 }}, "~S");
49562 c$.setAttr = Clazz_defineMethod (c$, "setAttr", 
49563 function (obj, attr, val) {
49564 {
49565 obj[attr] = (val == "TRUE" ? true : val);
49566 }return obj;
49567 }, "swingjs.api.DOMNode,~S,~O");
49568 c$.setStyles = Clazz_defineMethod (c$, "setStyles", 
49569 function (obj, attr) {
49570 {
49571 for (var i = 0; i < attr.length;) {
49572 //System.out.println(["DOMNode.setStyles ",attr[i],attr[i+1]])
49573 ;
49574 obj.style[attr[i++]] = attr[i++]; }
49575 }return obj;
49576 }, "swingjs.api.DOMNode,~A");
49577 c$.setSize = Clazz_defineMethod (c$, "setSize", 
49578 function (obj, width, height) {
49579 return swingjs.api.DOMNode.setStyles (obj, ["width", width + "px", "height", height + "px"]);
49580 }, "swingjs.api.DOMNode,~N,~N");
49581 Clazz_declarePackage ("swingjs");
49582 c$ = Clazz_declareType (swingjs, "JSUtil");
49583 c$.split = Clazz_defineMethod (c$, "split", 
49584 function (text, run) {
49585 if (text.length == 0) return  new Array (0);
49586 var n = 1;
49587 var i = text.indexOf (run);
49588 var lines;
49589 var runLen = run.length;
49590 if (i < 0 || runLen == 0) {
49591 lines =  new Array (1);
49592 lines[0] = text;
49593 return lines;
49594 }var len = text.length - runLen;
49595 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
49596
49597 lines =  new Array (n);
49598 i = 0;
49599 var ipt = 0;
49600 var pt = 0;
49601 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
49602 lines[pt++] = text.substring (i, ipt);
49603 i = ipt + runLen;
49604 }
49605 if (text.indexOf (run, len) != len) len += runLen;
49606 lines[pt] = text.substring (i, len);
49607 return lines;
49608 }, "~S,~S");
49609 Clazz_declarePackage ("swingjs");
49610 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", "$.JSImage", "swingjs.api.Interface"], function () {
49611 c$ = Clazz_decorateAsClass (function () {
49612 this.imageKit = null;
49613 Clazz_instantialize (this, arguments);
49614 }, swingjs, "JSToolkit", jssun.awt.SunToolkit);
49615 Clazz_makeConstructor (c$, 
49616 function () {
49617 Clazz_superConstructor (this, swingjs.JSToolkit);
49618 System.out.println ("JSToolkit initialized");
49619 });
49620 c$.warn = Clazz_defineMethod (c$, "warn", 
49621 function (msg) {
49622 swingjs.JSToolkit.alert (msg);
49623 }, "~S");
49624 c$.alert = Clazz_defineMethod (c$, "alert", 
49625 function (object) {
49626 {
49627 console.log("[JSToolkit] " + object);
49628 alert("[JSToolkit] " + object);
49629 }}, "~O");
49630 c$.log = Clazz_defineMethod (c$, "log", 
49631 function (msg) {
49632 {
49633 System.out.println(msg);
49634 console.log(msg);
49635 }}, "~S");
49636 c$.confirm = Clazz_defineMethod (c$, "confirm", 
49637 function (msg) {
49638 {
49639 return confirm(msg);
49640 }}, "~S");
49641 c$.prompt = Clazz_defineMethod (c$, "prompt", 
49642 function (msg, defaultRet) {
49643 {
49644 return confirm(msg, defaultRet);
49645 }}, "~S,~S");
49646 c$.getPostEventQueue = Clazz_defineMethod (c$, "getPostEventQueue", 
49647 function (isPost) {
49648 return (isPost ? jssun.awt.AppContext.getAppContext ().get ("PostEventQueue") : jssun.awt.AppContext.getAppContext ().get (jssun.awt.AppContext.EVENT_QUEUE_KEY));
49649 }, "~B");
49650 Clazz_overrideMethod (c$, "getScreenSize", 
49651 function () {
49652 var d =  new java.awt.Dimension (0, 0);
49653 var jq = swingjs.JSToolkit.getJQuery ();
49654 {
49655 d.setSize(jq.$(window).width(), jq.$(window).height()); return
49656 d;
49657 }});
49658 Clazz_overrideMethod (c$, "getScreenResolution", 
49659 function () {
49660 return 0;
49661 });
49662 Clazz_overrideMethod (c$, "getColorModel", 
49663 function () {
49664 return java.awt.image.ColorModel.getRGBdefault ();
49665 });
49666 Clazz_overrideMethod (c$, "getFontList", 
49667 function () {
49668 var hardwiredFontList =  Clazz_newArray (-1, ["SansSerif", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
49669 return hardwiredFontList;
49670 });
49671 Clazz_overrideMethod (c$, "sync", 
49672 function () {
49673 });
49674 Clazz_overrideMethod (c$, "isModalExclusionTypeSupported", 
49675 function (modalExclusionType) {
49676 return true;
49677 }, "java.awt.Dialog.ModalExclusionType");
49678 Clazz_overrideMethod (c$, "isModalityTypeSupported", 
49679 function (modalityType) {
49680 return false;
49681 }, "java.awt.Dialog.ModalityType");
49682 Clazz_overrideMethod (c$, "isTraySupported", 
49683 function () {
49684 return false;
49685 });
49686 Clazz_overrideMethod (c$, "getScreenWidth", 
49687 function () {
49688 return 0;
49689 });
49690 Clazz_overrideMethod (c$, "getScreenHeight", 
49691 function () {
49692 return 0;
49693 });
49694 Clazz_overrideMethod (c$, "grab", 
49695 function (w) {
49696 }, "java.awt.Window");
49697 Clazz_overrideMethod (c$, "ungrab", 
49698 function (w) {
49699 }, "java.awt.Window");
49700 c$.getPropertyObject = Clazz_defineMethod (c$, "getPropertyObject", 
49701 function (t, key, def) {
49702 return def;
49703 }, "~O,~S,~O");
49704 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49705 function (className) {
49706 return swingjs.api.Interface.getInstance (className, false);
49707 }, "~S");
49708 c$.getGraphicsConfiguration = Clazz_defineMethod (c$, "getGraphicsConfiguration", 
49709 function () {
49710 return (swingjs.JSToolkit.gc == null ? swingjs.JSToolkit.gc = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsConfiguration") : swingjs.JSToolkit.gc);
49711 });
49712 c$.isFocused = Clazz_defineMethod (c$, "isFocused", 
49713 function (window) {
49714 return false;
49715 }, "java.awt.Window");
49716 c$.getCSSFont = Clazz_defineMethod (c$, "getCSSFont", 
49717 function (font) {
49718 var css = "";
49719 if (font.isItalic ()) css += "font-style:italic;";
49720 if (font.isBold ()) css += "font-weight:bold;";
49721 css += "font-size:" + font.getSize () + "px;";
49722 css += "font-family:" + font.getFamily () + ";";
49723 return css;
49724 }, "java.awt.Font");
49725 c$.getStringWidth = Clazz_defineMethod (c$, "getStringWidth", 
49726 function (context, font, text) {
49727 var fontInfo = swingjs.JSToolkit.getCanvasFont (font);
49728 if (context == null) context = swingjs.JSToolkit.getDefaultCanvasContext2d ();
49729 var w = 0;
49730 {
49731 context.font = fontInfo;
49732 w = Math.ceil(context.measureText(text).width);
49733 }return w;
49734 }, "swingjs.api.HTML5CanvasContext2D,java.awt.Font,~S");
49735 c$.getDefaultCanvasContext2d = Clazz_defineMethod (c$, "getDefaultCanvasContext2d", 
49736 function () {
49737 {
49738 if (this.defaultContext == null) this.defaultContext =
49739 document.createElement( 'canvas' ).getContext('2d');
49740 }return swingjs.JSToolkit.defaultContext;
49741 });
49742 c$.getCanvasFont = Clazz_defineMethod (c$, "getCanvasFont", 
49743 function (font) {
49744 var strStyle = "";
49745 if (font.isItalic ()) strStyle += "italic ";
49746 if (font.isBold ()) strStyle += "bold ";
49747 return strStyle + font.getSize () + "px " + font.getFamily ();
49748 }, "java.awt.Font");
49749 c$.getFontFamily = Clazz_defineMethod (c$, "getFontFamily", 
49750 function (font) {
49751 return font.getName ();
49752 }, "java.awt.Font");
49753 Clazz_overrideMethod (c$, "getFontMetrics", 
49754 function (font) {
49755 var fm = swingjs.JSToolkit.getInstance ("swingjs.JSFontMetrics");
49756 fm.setFont (font);
49757 return fm;
49758 }, "java.awt.Font");
49759 c$.getCSSColor = Clazz_defineMethod (c$, "getCSSColor", 
49760 function (c) {
49761 var s = "000000" + Integer.toHexString (c.getRGB () & 0xFFFFFF);
49762 return "#" + s.substring (s.length - 6);
49763 }, "java.awt.Color");
49764 c$.notImplemented = Clazz_defineMethod (c$, "notImplemented", 
49765 function (msg) {
49766 var s = null;
49767 if (swingjs.JSToolkit.mapNotImpl == null) swingjs.JSToolkit.mapNotImpl =  new java.util.Hashtable ();
49768 {
49769 s = arguments.callee.caller; s = s.__CLASS_NAME__ ||
49770 s.claxxOwner.__CLASS_NAME__; s += "." +
49771 arguments.callee.caller.exName;
49772 }if (swingjs.JSToolkit.mapNotImpl.containsKey (s)) return;
49773 swingjs.JSToolkit.mapNotImpl.put (s, Boolean.TRUE);
49774 System.out.println (s + " has not been implemented in SwingJS. " + (msg === "" ? "" : (msg == null ? "" : msg) + swingjs.JSToolkit.getStackTrace (-5)));
49775 }, "~S");
49776 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49777 function () {
49778 {
49779 return Clazz_getStackTrace();
49780 }});
49781 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49782 function (n) {
49783 {
49784 return Clazz_getStackTrace(n);
49785 }}, "~N");
49786 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
49787 function () {
49788 if (swingjs.JSToolkit.uid == null) swingjs.JSToolkit.uid = javax.swing.UIManager.getLookAndFeel ().getDefaults ();
49789 return swingjs.JSToolkit.uid;
49790 });
49791 c$.getComponentUI = Clazz_defineMethod (c$, "getComponentUI", 
49792 function (target) {
49793 var c = swingjs.api.Interface.getInstance ("swingjs.plaf.JS" + target.getUIClassID (), true);
49794 if (c != null) c.set (target);
49795 return c;
49796 }, "javax.swing.JComponent");
49797 c$.getSwingDivId = Clazz_defineMethod (c$, "getSwingDivId", 
49798 function () {
49799 return Thread.currentThread ().getName () + "_swingdiv";
49800 });
49801 c$.getJQuery = Clazz_defineMethod (c$, "getJQuery", 
49802 function () {
49803 {
49804 if (!window.jQuery) alert(
49805 "jQuery is required for SwingJS, but window.jQuery is not defined."
49806 ); jQuery.$ || (jQuery.$ = jQuery); return(jQuery);
49807 }});
49808 c$.getJavaResource = Clazz_defineMethod (c$, "getJavaResource", 
49809 function (resourceName, isJavaPath) {
49810 System.out.println ("JSToolkit getting Java resource " + resourceName);
49811 {
49812 return SwingJS.getJavaResource(resourceName, isJavaPath);
49813 }}, "~S,~B");
49814 c$.dispatchSystemEvent = Clazz_defineMethod (c$, "dispatchSystemEvent", 
49815 function (runnable) {
49816 var f = null;
49817 {
49818 System.out.println("JST dispatchSystemEvent " +
49819 runnable.run.toString()); f =
49820 function(_JSToolkit_dispatchSystemEvent) {
49821 System.out.println("JST running " +
49822 runnable.run.toString());runnable.run()};
49823 }swingjs.JSToolkit.setTimeout (f, 0, 0);
49824 }, "Runnable");
49825 c$.dispatchEvent = Clazz_defineMethod (c$, "dispatchEvent", 
49826 function (event, src, andWait) {
49827 var f = null;
49828 var id = ++swingjs.JSToolkit.dispatchID;
49829 {
49830 f = function()
49831 {
49832 if
49833 (src == null) event.dispatch(); else src.dispatchEvent(event);
49834 };
49835 }if (andWait) swingjs.JSToolkit.invokeAndWait (f, id);
49836  else swingjs.JSToolkit.setTimeout (f, 0, id);
49837 }, "java.awt.AWTEvent,~O,~B");
49838 c$.setTimeout = Clazz_defineMethod (c$, "setTimeout", 
49839 function (f, msDelay, id) {
49840 {
49841 var thread = java.lang.Thread.thisThread;
49842 var thread0 = thread;
49843 var id0 = SwingJS.eventID || 0;
49844 setTimeout(function(_JSToolkit_setTimeout) {
49845 SwingJS.eventID = id;
49846 java.lang.Thread.thisThread = thread;
49847 try {
49848 if (f.run)
49849 f.run();
49850 else
49851 f();
49852 } catch (e) {
49853 var s = "JSToolkit.setTimeout(" + id +"): " + e;
49854 System.out.println(s);
49855 alert(s)}
49856 SwingJS.eventID = id0;
49857 java.lang.Thread.thisThread = thread0;
49858 }, msDelay);
49859 }}, "~O,~N,~N");
49860 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
49861  function (f, id) {
49862 {
49863 var thread = java.lang.Thread.thisThread;
49864 var thread0 = thread;
49865 (function(_JSToolkit_setTimeout) {
49866 var id0 = SwingJS.eventID || 0;
49867 System.out.println("runNow " + id); SwingJS.eventID = id;
49868 java.lang.Thread.thisThread = thread;
49869 if (f.run)
49870 f.run();
49871 else
49872 f();
49873 SwingJS.eventID = id0;
49874 java.lang.Thread.thisThread = thread0;
49875 })();
49876 }}, "swingjs.api.JSFunction,~N");
49877 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
49878 function () {
49879 {
49880 return (!!SwingJS.eventID);
49881 }});
49882 c$.checkClassMethod = Clazz_defineMethod (c$, "checkClassMethod", 
49883 function (component, fname, signature) {
49884 {
49885 return component[fname] && component[fname][signature];
49886 }}, "java.awt.Component,~S,~S");
49887 c$.readyCallback = Clazz_defineMethod (c$, "readyCallback", 
49888 function (aname, fname, a, me) {
49889 {
49890 Jmol._readyCallback(aname, fname, true,a, me);
49891 }}, "~S,~S,~O,~O");
49892 c$.forceRepaint = Clazz_defineMethod (c$, "forceRepaint", 
49893 function (c) {
49894 }, "java.awt.Component");
49895 c$.getHTML5Applet = Clazz_defineMethod (c$, "getHTML5Applet", 
49896 function (c) {
49897 return (c.getAppContext ().getThreadGroup ()).getHtmlApplet ();
49898 }, "javax.swing.JComponent");
49899 c$.taintUI = Clazz_defineMethod (c$, "taintUI", 
49900 function (c) {
49901 {
49902 c.getUI && c.getUI() && c.getUI().setTainted();
49903 }}, "java.awt.Component");
49904 Clazz_overrideMethod (c$, "createComponent", 
49905 function (target) {
49906 System.out.println ("JSToolkit creating LightweightPeer for " + target);
49907 var peer = swingjs.JSToolkit.getUI (target, true);
49908 return (peer == null ?  new swingjs.JSComponentPeer (target) : peer);
49909 }, "java.awt.Component");
49910 c$.getPlainDocument = Clazz_defineMethod (c$, "getPlainDocument", 
49911 function (c) {
49912 return swingjs.JSToolkit.getInstance ("swingjs.JSPlainDocument");
49913 }, "javax.swing.JComponent");
49914 c$.getClassName = Clazz_defineMethod (c$, "getClassName", 
49915 function (c) {
49916 {
49917 return c.__CLASS_NAME__;
49918 }}, "~O");
49919 c$.getSignedStreamBytes = Clazz_defineMethod (c$, "getSignedStreamBytes", 
49920 function (bis) {
49921 try {
49922 return JU.AU.ensureSignedBytes (JU.Rdr.getStreamAsBytes (bis, null));
49923 } catch (e) {
49924 if (Clazz_exceptionOf (e, java.io.IOException)) {
49925 return null;
49926 } else {
49927 throw e;
49928 }
49929 }
49930 }, "java.io.BufferedInputStream");
49931 c$.getFileContents = Clazz_defineMethod (c$, "getFileContents", 
49932 function (uri) {
49933 {
49934 return Jmol._getFileData(uri);
49935 }}, "~S");
49936 Clazz_defineMethod (c$, "getFileAsBytes", 
49937 function (filename) {
49938 var data = swingjs.JSToolkit.getFileContents (filename);
49939 var b = null;
49940 if (JU.AU.isAB (data)) b = data;
49941  else if (Clazz_instanceOf (data, String)) b = (data).getBytes ();
49942  else if (Clazz_instanceOf (data, JU.SB)) b = JU.Rdr.getBytesFromSB (data);
49943  else if (Clazz_instanceOf (data, java.io.InputStream)) try {
49944 b = JU.Rdr.getLimitedStreamBytes (data, -1);
49945 } catch (e) {
49946 if (Clazz_exceptionOf (e, java.io.IOException)) {
49947 } else {
49948 throw e;
49949 }
49950 }
49951 return JU.AU.ensureSignedBytes (b);
49952 }, "~S");
49953 Clazz_defineMethod (c$, "getImagekit", 
49954  function () {
49955 return (this.imageKit == null ? this.imageKit = swingjs.api.Interface.getInstance ("swingjs.JSImagekit", false) : this.imageKit);
49956 });
49957 Clazz_defineMethod (c$, "createImage", 
49958 function (producer) {
49959 producer.startProduction (null);
49960 return null;
49961 }, "java.awt.image.ImageProducer");
49962 Clazz_defineMethod (c$, "createImage", 
49963 function (filename) {
49964 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (this.getFileAsBytes (filename)))), 0, -1);
49965 }, "~S");
49966 Clazz_defineMethod (c$, "createImage", 
49967 function (url) {
49968 try {
49969 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream (url.openStream ())), 0, -1);
49970 } catch (e) {
49971 if (Clazz_exceptionOf (e, java.io.IOException)) {
49972 return null;
49973 } else {
49974 throw e;
49975 }
49976 }
49977 }, "java.net.URL");
49978 Clazz_defineMethod (c$, "createImage", 
49979 function (data, imageoffset, imagelength) {
49980 if (data == null) {
49981 var width = imageoffset;
49982 var height = imagelength;
49983 return  new swingjs.JSImage (null, width, height);
49984 }return this.getImagekit ().createImageFromBytes (data, imageoffset, imagelength);
49985 }, "~A,~N,~N");
49986 Clazz_overrideMethod (c$, "checkImage", 
49987 function (image, width, height, observer) {
49988 return 63;
49989 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49990 Clazz_overrideMethod (c$, "prepareImage", 
49991 function (image, width, height, observer) {
49992 return true;
49993 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49994 c$.hasFocus = Clazz_defineMethod (c$, "hasFocus", 
49995 function (c) {
49996 var ui = swingjs.JSToolkit.getUI (c, false);
49997 return (ui != null && ui.hasFocus ());
49998 }, "java.awt.Component");
49999 c$.getUI = Clazz_defineMethod (c$, "getUI", 
50000 function (c, isQuiet) {
50001 var ui = null;
50002 {
50003 ui = c.getUI && c.getUI();
50004 }if (ui == null) {
50005 var s = "[JSToolkit] Component " + c.getClass ().getName () + " has no cooresponding JSComponentUI.";
50006 System.out.println (s);
50007 }return ui;
50008 }, "java.awt.Component,~B");
50009 c$.requestFocus = Clazz_defineMethod (c$, "requestFocus", 
50010 function (c) {
50011 var ui = swingjs.JSToolkit.getUI (c, false);
50012 if (ui == null || !ui.isFocusable ()) return false;
50013 var r = ((Clazz_isClassDefined ("swingjs.JSToolkit$1") ? 0 : swingjs.JSToolkit.$JSToolkit$1$ ()), Clazz_innerTypeInstance (swingjs.JSToolkit$1, this, Clazz_cloneFinals ("ui", ui)));
50014 swingjs.JSToolkit.setTimeout (r, 50, 0);
50015 return true;
50016 }, "java.awt.Component");
50017 c$.getCompositor = Clazz_defineMethod (c$, "getCompositor", 
50018 function () {
50019 return (swingjs.JSToolkit.compositor == null ? swingjs.JSToolkit.compositor = swingjs.api.Interface.getInstance ("swingjs.JSGraphicsCompositor", false) : swingjs.JSToolkit.compositor);
50020 });
50021 c$.setGraphicsCompositeAlpha = Clazz_defineMethod (c$, "setGraphicsCompositeAlpha", 
50022 function (g, rule) {
50023 return swingjs.JSToolkit.getCompositor ().setGraphicsCompositeAlpha (g, rule);
50024 }, "swingjs.JSGraphics2D,~N");
50025 c$.drawImageOp = Clazz_defineMethod (c$, "drawImageOp", 
50026 function (g, img, op, x, y) {
50027 return swingjs.JSToolkit.getCompositor ().drawImageOp (g, img, op, x, y);
50028 }, "swingjs.JSGraphics2D,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
50029 c$.filterRaster = Clazz_defineMethod (c$, "filterRaster", 
50030 function (src, dst, op) {
50031 return swingjs.JSToolkit.getCompositor ().filterRaster (src, dst, op);
50032 }, "java.awt.image.Raster,java.awt.image.WritableRaster,java.awt.image.RasterOp");
50033 c$.filterImage = Clazz_defineMethod (c$, "filterImage", 
50034 function (src, dst, op) {
50035 return swingjs.JSToolkit.getCompositor ().filterImage (src, dst, op);
50036 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp");
50037 c$.getZIndex = Clazz_defineMethod (c$, "getZIndex", 
50038 function (ui, what) {
50039 {
50040 if (what) return getHTML5Applet(ui.c)._z[what];
50041 var c = ui.domNode; var z;
50042 while (c && !(z = c.style["z-index"])) {
50043 c = c.parentNode;
50044 }
50045 return z || 100000;
50046 }}, "swingjs.plaf.JSComponentUI,~S");
50047 Clazz_overrideMethod (c$, "createFrame", 
50048 function (target) {
50049 return this.createWindowPeer (target, true);
50050 }, "java.awt.Frame");
50051 Clazz_overrideMethod (c$, "createWindow", 
50052 function (target) {
50053 return this.createWindowPeer (target, false);
50054 }, "java.awt.Window");
50055 Clazz_defineMethod (c$, "createWindowPeer", 
50056  function (target, isFrame) {
50057 return (swingjs.JSToolkit.getInstance ("swingjs.JSWindowPeer")).setFrame (target, true);
50058 }, "java.awt.Window,~B");
50059 c$.$JSToolkit$1$ = function () {
50060 Clazz_pu$h(self.c$);
50061 c$ = Clazz_declareAnonymous (swingjs, "JSToolkit$1", null, Runnable);
50062 Clazz_overrideMethod (c$, "run", 
50063 function () {
50064 this.f$.ui.requestFocus (null, false, false, 0, null);
50065 });
50066 c$ = Clazz_p0p ();
50067 };
50068 Clazz_defineStatics (c$,
50069 "gc", null,
50070 "defaultContext", null,
50071 "mapNotImpl", null,
50072 "uid", null,
50073 "dispatchID", 0,
50074 "compositor", null);
50075 });
50076 Clazz_declarePackage ("swingjs");
50077 Clazz_load (["java.awt.event.InvocationEvent"], "swingjs.JSEvent", null, function () {
50078 c$ = Clazz_declareType (swingjs, "JSEvent", java.awt.event.InvocationEvent);
50079 Clazz_makeConstructor (c$, 
50080 function (t, r) {
50081 Clazz_superConstructor (this, swingjs.JSEvent, [t, 1201, r, null, false]);
50082 }, "swingjs.JSThread,Runnable");
50083 });
50084 Clazz_declarePackage ("swingjs");
50085 Clazz_load (["java.awt.FontMetrics"], "swingjs.JSFontMetrics", ["swingjs.JSToolkit"], function () {
50086 c$ = Clazz_decorateAsClass (function () {
50087 this.widths = null;
50088 this.iwidths = null;
50089 Clazz_instantialize (this, arguments);
50090 }, swingjs, "JSFontMetrics", java.awt.FontMetrics);
50091 Clazz_makeConstructor (c$, 
50092 function () {
50093 Clazz_superConstructor (this, swingjs.JSFontMetrics, [null]);
50094 });
50095 Clazz_defineMethod (c$, "setFont", 
50096 function (f) {
50097 this.font = f;
50098 }, "java.awt.Font");
50099 Clazz_overrideMethod (c$, "getLeading", 
50100 function () {
50101 return Clazz_doubleToInt (this.font.getSize () / 20) + 1;
50102 });
50103 Clazz_overrideMethod (c$, "getAscent", 
50104 function () {
50105 return this.font.getSize ();
50106 });
50107 Clazz_overrideMethod (c$, "getDescent", 
50108 function () {
50109 return Clazz_doubleToInt (this.font.getSize () / 4) + 1;
50110 });
50111 Clazz_defineMethod (c$, "charWidth", 
50112 function (pt) {
50113 return (pt.charCodeAt (0) < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt.charCodeAt (0)]) : this.stringWidth ("" + pt));
50114 }, "~S");
50115 Clazz_defineMethod (c$, "charWidth", 
50116 function (pt) {
50117 return (pt < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt]) : this.stringWidth ("" + String.fromCharCode (pt)));
50118 }, "~N");
50119 Clazz_overrideMethod (c$, "stringWidth", 
50120 function (s) {
50121 return Clazz_floatToInt (swingjs.JSToolkit.getStringWidth (null, this.font, s));
50122 }, "~S");
50123 Clazz_overrideMethod (c$, "getWidths", 
50124 function () {
50125 if (this.iwidths != null) return this.iwidths;
50126 this.iwidths =  Clazz_newIntArray (256, 0);
50127 this.getWidthsFloat ();
50128 for (var ch = 0; ch < 256; ch++) {
50129 this.iwidths[ch] = Clazz_floatToInt (this.widths[ch]);
50130 }
50131 return this.iwidths;
50132 });
50133 Clazz_defineMethod (c$, "getWidthsFloat", 
50134 function () {
50135 if (this.widths != null) return this.widths;
50136 this.widths =  Clazz_newFloatArray (256, 0);
50137 for (var ch = 0; ch < 256; ch++) {
50138 this.widths[ch] = swingjs.JSToolkit.getStringWidth (null, this.font, "" + String.fromCharCode (ch));
50139 }
50140 return this.widths;
50141 });
50142 });
50143 Clazz_declarePackage ("swingjs");
50144 Clazz_load (["java.lang.Thread", "swingjs.api.JSFunction"], "swingjs.JSThread", null, function () {
50145 c$ = Clazz_decorateAsClass (function () {
50146 this.isJS = false;
50147 Clazz_instantialize (this, arguments);
50148 }, swingjs, "JSThread", Thread, swingjs.api.JSFunction);
50149 Clazz_makeConstructor (c$, 
50150 function (group, name) {
50151 Clazz_superConstructor (this, swingjs.JSThread, [group, name]);
50152 {
50153 this.isJS = true;
50154 }}, "ThreadGroup,~S");
50155 Clazz_overrideMethod (c$, "run", 
50156 function () {
50157 this.run1 (0);
50158 });
50159 Clazz_defineMethod (c$, "start", 
50160 function () {
50161 {
50162 swingjs.JSToolkit.setTimeout(this, 1, 0);
50163 }});
50164 Clazz_defineMethod (c$, "sleepAndReturn", 
50165 function (delay, state) {
50166 if (!this.isJS) {
50167 Thread.sleep (delay);
50168 return false;
50169 }var me = this;
50170 var r = ((Clazz_isClassDefined ("swingjs.JSThread$1") ? 0 : swingjs.JSThread.$JSThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSThread$1, this, Clazz_cloneFinals ("me", me, "state", state)));
50171 {
50172 setTimeout(
50173 function() {java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new java.awt.event.InvocationEvent(me, r))},
50174 delay
50175 );
50176 }return true;
50177 }, "~N,~N");
50178 c$.$JSThread$1$ = function () {
50179 Clazz_pu$h(self.c$);
50180 c$ = Clazz_declareAnonymous (swingjs, "JSThread$1", null, Runnable);
50181 Clazz_overrideMethod (c$, "run", 
50182 function () {
50183 this.f$.me.run1 (this.f$.state);
50184 });
50185 c$ = Clazz_p0p ();
50186 };
50187 Clazz_defineStatics (c$,
50188 "INIT", 0,
50189 "LOOP", 1,
50190 "DONE", 2);
50191 });
50192 Clazz_declarePackage ("swingjs");
50193 Clazz_load (["java.lang.ThreadGroup"], "swingjs.JSThreadGroup", null, function () {
50194 c$ = Clazz_decorateAsClass (function () {
50195 this.html5Applet = null;
50196 Clazz_instantialize (this, arguments);
50197 }, swingjs, "JSThreadGroup", ThreadGroup);
50198 Clazz_defineMethod (c$, "setHtmlApplet", 
50199 function (html5Applet) {
50200 this.html5Applet = html5Applet;
50201 }, "swingjs.api.HTML5Applet");
50202 Clazz_defineMethod (c$, "getHtmlApplet", 
50203 function () {
50204 return this.html5Applet;
50205 });
50206 });
50207 Clazz_declarePackage ("swingjs");
50208 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 () {
50209 c$ = Clazz_decorateAsClass (function () {
50210 this.params = null;
50211 this.html5Applet = null;
50212 this.fullName = null;
50213 this.appletCodeBase = null;
50214 this.appletIdiomaBase = null;
50215 this.appletDocumentBase = null;
50216 this.maximumSize = 2147483647;
50217 this.appletName = null;
50218 this.syncId = null;
50219 this.testAsync = false;
50220 this.async = false;
50221 this.strJavaVersion = null;
50222 this.strJavaVendor = null;
50223 this.display = null;
50224 this.canvas = null;
50225 this.jsgraphics = null;
50226 this.applet = null;
50227 this.defaultAppletSize = null;
50228 this.currentAppletSize = null;
50229 this.nextStatus = 0;
50230 this.status = 0;
50231 this.listeners = null;
50232 this.mouse = null;
50233 Clazz_instantialize (this, arguments);
50234 }, swingjs, "JSAppletPanel", java.awt.Panel, [java.applet.AppletStub, java.applet.AppletContext, swingjs.api.JSInterface]);
50235 Clazz_prepareFields (c$, function () {
50236 this.defaultAppletSize =  new java.awt.Dimension (10, 10);
50237 this.currentAppletSize =  new java.awt.Dimension (10, 10);
50238 });
50239 Clazz_makeConstructor (c$, 
50240 function (params) {
50241 Clazz_superConstructor (this, swingjs.JSAppletPanel, []);
50242 this.setPanel ();
50243 this.set (params);
50244 }, "java.util.Hashtable");
50245 Clazz_defineMethod (c$, "set", 
50246  function (params) {
50247 System.out.println ("JSAppletPanel initializing");
50248 this.params = params;
50249 this.htmlName = swingjs.JSUtil.split ("" + this.getParameter ("name"), "_object")[0];
50250 this.appletName = swingjs.JSUtil.split (this.htmlName + "_", "_")[0];
50251 this.syncId = this.getParameter ("syncId");
50252 this.fullName = this.htmlName + "__" + this.syncId + "__";
50253 params.put ("fullName", this.fullName);
50254 var o = params.get ("codePath");
50255 if (o == null) o = "../java/";
50256 this.appletCodeBase = o.toString ();
50257 this.appletIdiomaBase = this.appletCodeBase.substring (0, this.appletCodeBase.lastIndexOf ("/", this.appletCodeBase.length - 2) + 1) + "idioma";
50258 o = params.get ("documentBase");
50259 this.appletDocumentBase = (o == null ? "" : o.toString ());
50260 if (params.containsKey ("maximumSize")) Math.max ((params.get ("maximumSize")).intValue (), 100);
50261 this.async = (this.testAsync || params.containsKey ("async"));
50262 var applet = null;
50263 var javaver = "?";
50264 {
50265 if(self.Jmol) { applet =
50266 Jmol._applets[this.htmlName.split("_object")[0]]; javaver =
50267 Jmol._version; }
50268 }this.html5Applet = applet;
50269 this.strJavaVersion = javaver;
50270 this.strJavaVendor = "Java2Script/Java 1.6 (HTML5)";
50271 this.display = params.get ("display");
50272 this.threadGroup =  new swingjs.JSThreadGroup (this.appletName);
50273 this.myThread =  new swingjs.JSAppletThread (this, this.threadGroup, this.appletName);
50274 (this.threadGroup).setHtmlApplet (this.html5Applet);
50275 {
50276 Jmol._applets[this.appletName + "_thread"] =
50277 java.lang.Thread.thisThread = this.myThread;
50278 }this.appContext = swingjs.JSToolkit.createNewAppContext ();
50279 java.awt.Toolkit.getDefaultToolkit ();
50280 try {
50281 java.net.URL.setURLStreamHandlerFactory (swingjs.api.Interface.getInstance ("JU.AjaxURLStreamHandlerFactory", false));
50282 } catch (e) {
50283 }
50284 System.out.println ("JSAppletPanel initialized");
50285 }, "java.util.Hashtable");
50286 Clazz_defineMethod (c$, "start", 
50287 function () {
50288 if (this.status == 0) this.myThread.start ();
50289  else this.showStatus ("already started");
50290 });
50291 Clazz_defineMethod (c$, "addAppletListener", 
50292 function (l) {
50293 this.listeners = jssun.applet.AppletEventMulticaster.add (this.listeners, l);
50294 }, "jssun.applet.AppletListener");
50295 Clazz_defineMethod (c$, "removeAppletListener", 
50296 function (l) {
50297 this.listeners = jssun.applet.AppletEventMulticaster.remove (this.listeners, l);
50298 }, "jssun.applet.AppletListener");
50299 Clazz_defineMethod (c$, "dispatchAppletEvent", 
50300 function (id, argument) {
50301 if (this.listeners != null) {
50302 var evt =  new jssun.applet.AppletEvent (this, id, argument);
50303 this.listeners.appletStateChanged (evt);
50304 }}, "~N,~O");
50305 Clazz_defineMethod (c$, "getCode", 
50306  function () {
50307 return this.getParameter ("code");
50308 });
50309 Clazz_defineMethod (c$, "getCanvas", 
50310  function () {
50311 return (this.canvas == null ? (this.canvas = this.html5Applet._getHtml5Canvas ()) : this.canvas);
50312 });
50313 Clazz_overrideMethod (c$, "isActive", 
50314 function () {
50315 return true;
50316 });
50317 Clazz_overrideMethod (c$, "appletResize", 
50318 function (width, height) {
50319 var currentSize =  new java.awt.Dimension (this.currentAppletSize.width, this.currentAppletSize.height);
50320 this.currentAppletSize.width = width;
50321 this.currentAppletSize.height = height;
50322 this.applet.setBounds (0, 0, this.getWidth (), this.getHeight ());
50323 this.applet.getRootPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
50324 this.applet.getContentPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
50325 (this.applet.getContentPane ()).revalidate ();
50326 this.dispatchAppletEvent (51234, currentSize);
50327 }, "~N,~N");
50328 Clazz_overrideMethod (c$, "getDocumentBase", 
50329 function () {
50330 try {
50331 return  new java.net.URL (this.params.get ("documentBase"));
50332 } catch (e) {
50333 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50334 return null;
50335 } else {
50336 throw e;
50337 }
50338 }
50339 });
50340 Clazz_overrideMethod (c$, "getCodeBase", 
50341 function () {
50342 try {
50343 return  new java.net.URL (this.params.get ("codePath"));
50344 } catch (e) {
50345 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50346 return null;
50347 } else {
50348 throw e;
50349 }
50350 }
50351 });
50352 Clazz_overrideMethod (c$, "getParameter", 
50353 function (name) {
50354 var s = this.params.get (name);
50355 System.out.println ("get parameter: " + name + " = " + s);
50356 return (s == null ? null : "" + s);
50357 }, "~S");
50358 Clazz_overrideMethod (c$, "getAppletContext", 
50359 function () {
50360 return this;
50361 });
50362 Clazz_defineMethod (c$, "getHeight", 
50363 function () {
50364 return this.html5Applet._getHeight ();
50365 });
50366 Clazz_defineMethod (c$, "getWidth", 
50367 function () {
50368 return this.html5Applet._getWidth ();
50369 });
50370 Clazz_defineMethod (c$, "setBounds", 
50371 function (x, y, width, height) {
50372 this.reshape (x, y, width, height);
50373 this.currentAppletSize.width = width;
50374 this.currentAppletSize.height = height;
50375 }, "~N,~N,~N,~N");
50376 Clazz_overrideMethod (c$, "getImage", 
50377 function (url) {
50378 return null;
50379 }, "java.net.URL");
50380 Clazz_overrideMethod (c$, "getApplet", 
50381 function (name) {
50382 var applet = null;
50383 {
50384 applet = Jmol._applets[name]; applet && (applet =
50385 applet._applet);
50386 }return applet;
50387 }, "~S");
50388 Clazz_overrideMethod (c$, "getApplets", 
50389 function () {
50390 return null;
50391 });
50392 Clazz_defineMethod (c$, "showDocument", 
50393 function (url) {
50394 {
50395 window.open(url.toString());
50396 }}, "java.net.URL");
50397 Clazz_defineMethod (c$, "showDocument", 
50398 function (url, target) {
50399 {
50400 window.open(url.toString(), target);
50401 }}, "java.net.URL,~S");
50402 Clazz_defineMethod (c$, "showStatus", 
50403 function (status) {
50404 swingjs.JSToolkit.log (status);
50405 {
50406 Clazz._LoaderProgressMonitor.showStatus(status, true);
50407 }}, "~S");
50408 Clazz_overrideMethod (c$, "cacheFileByName", 
50409 function (fileName, isAdd) {
50410 return 0;
50411 }, "~S,~B");
50412 Clazz_overrideMethod (c$, "cachePut", 
50413 function (key, data) {
50414 }, "~S,~O");
50415 Clazz_overrideMethod (c$, "destroy", 
50416 function () {
50417 });
50418 Clazz_overrideMethod (c$, "getFullName", 
50419 function () {
50420 return this.fullName;
50421 });
50422 Clazz_overrideMethod (c$, "openFileAsyncSpecial", 
50423 function (fileName, flags) {
50424 }, "~S,~N");
50425 Clazz_defineMethod (c$, "processMouseEvent", 
50426 function (id, x, y, modifiers, time) {
50427 this.getMouse ().processEvent (id, x, y, modifiers, time);
50428 return false;
50429 }, "~N,~N,~N,~N,~N");
50430 Clazz_defineMethod (c$, "getMouse", 
50431  function () {
50432 return (this.mouse == null ? this.mouse =  new swingjs.JSMouse (this) : this.mouse);
50433 });
50434 Clazz_overrideMethod (c$, "processTwoPointGesture", 
50435 function (touches) {
50436 this.getMouse ().processTwoPointGesture (touches);
50437 }, "~A");
50438 Clazz_overrideMethod (c$, "setDisplay", 
50439 function (canvas) {
50440 this.canvas = canvas;
50441 }, "swingjs.api.HTML5Canvas");
50442 Clazz_overrideMethod (c$, "setScreenDimension", 
50443 function (width, height) {
50444 this.setGraphics (this.jsgraphics = null);
50445 if (this.applet != null) this.applet.resize (width, height);
50446 }, "~N,~N");
50447 Clazz_overrideMethod (c$, "setStatusDragDropped", 
50448 function (mode, x, y, fileName) {
50449 return false;
50450 }, "~N,~N,~N,~S");
50451 Clazz_overrideMethod (c$, "startHoverWatcher", 
50452 function (enable) {
50453 }, "~B");
50454 Clazz_overrideMethod (c$, "paint", 
50455 function (g) {
50456 this.applet.paint (this.setGraphics (g));
50457 }, "java.awt.Graphics");
50458 Clazz_defineMethod (c$, "setGraphics", 
50459  function (g) {
50460 return (g == null ? this.getGraphics () : g);
50461 }, "java.awt.Graphics");
50462 Clazz_overrideMethod (c$, "getGraphics", 
50463 function () {
50464 if (this.jsgraphics == null) {
50465 this.jsgraphics =  new swingjs.JSGraphics2D (this.getCanvas ());
50466 this.jsgraphics.setWindowParameters (this.getWidth (), this.getHeight ());
50467 }return this.jsgraphics;
50468 });
50469 Clazz_defineMethod (c$, "showAppletStatus", 
50470  function (status) {
50471 this.getAppletContext ().showStatus (this.htmlName + " " + status);
50472 }, "~S");
50473 Clazz_defineMethod (c$, "showAppletException", 
50474  function (t) {
50475 {
50476 this.showAppletStatus("error " + (t.getMessage ?
50477 t.getMessage() : t)); t.printStackTrace &&
50478 t.printStackTrace();
50479 }this.repaint ();
50480 }, "Throwable");
50481 Clazz_defineMethod (c$, "run1", 
50482 function (mode) {
50483 var ok = false;
50484 switch (mode) {
50485 case 0:
50486 this.currentAppletSize.width = this.defaultAppletSize.width = this.getWidth ();
50487 this.currentAppletSize.height = this.defaultAppletSize.height = this.getHeight ();
50488 this.setLayout ( new java.awt.BorderLayout ());
50489 this.nextStatus = 1;
50490 ok = true;
50491 break;
50492 case 1:
50493 switch (this.nextStatus) {
50494 case 1:
50495 if (this.status != 0) {
50496 this.showAppletStatus ("notdisposed");
50497 this.status = 7;
50498 break;
50499 }System.out.println ("JSAppletPanel runloader");
50500 this.runLoader ();
50501 this.nextStatus = 2;
50502 ok = true;
50503 break;
50504 case 2:
50505 if (this.status != 1 && this.status != 5) {
50506 this.showAppletStatus ("notloaded");
50507 break;
50508 }System.out.println ("JSAppletPanel init");
50509 this.setFont ( new java.awt.Font ("Dialog", 0, 12));
50510 this.applet.resize (this.defaultAppletSize);
50511 this.applet.init ();
50512 this.validate ();
50513 this.status = 2;
50514 this.showAppletStatus ("initialized");
50515 this.nextStatus = 3;
50516 ok = true;
50517 break;
50518 case 3:
50519 if (this.status != 2 && this.status != 4) {
50520 this.showAppletStatus ("notstarted");
50521 this.status = 7;
50522 break;
50523 }this.applet.getRootPane ().addNotify ();
50524 System.out.println ("JSAppletPanel start" + this.currentAppletSize);
50525 this.applet.resize (this.currentAppletSize);
50526 this.applet.start ();
50527 this.status = 3;
50528 this.showAppletStatus ("started");
50529 this.nextStatus = 35;
50530 ok = true;
50531 break;
50532 case 35:
50533 swingjs.JSToolkit.readyCallback (this.appletName, this.fullName, this.applet, this);
50534 break;
50535 case 4:
50536 if (this.status == 3) {
50537 this.status = 4;
50538 this.applet.setVisible (false);
50539 this.applet.stop ();
50540 this.showAppletStatus ("stopped");
50541 } else {
50542 this.showAppletStatus ("notstopped");
50543 this.status = 7;
50544 }break;
50545 case 5:
50546 if (this.status == 4 || this.status == 2) {
50547 this.status = 5;
50548 this.applet.destroy ();
50549 this.showAppletStatus ("destroyed");
50550 } else {
50551 this.showAppletStatus ("notdestroyed");
50552 this.status = 7;
50553 }break;
50554 case 75:
50555 if (this.status == 5 || this.status == 1) {
50556 this.showAppletStatus ("notdisposed");
50557 this.status = 7;
50558 } else {
50559 this.status = 0;
50560 this.removeChild (this.applet);
50561 this.applet = null;
50562 this.showAppletStatus ("disposed");
50563 }break;
50564 case 6:
50565 break;
50566 default:
50567 System.out.println ("unrecognized JSAppletPanel status: " + this.nextStatus);
50568 break;
50569 }
50570 break;
50571 default:
50572 System.out.println ("unrecognized JSAppletThread mode: " + mode);
50573 break;
50574 }
50575 return (ok ? 1 : 2);
50576 }, "~N");
50577 Clazz_defineMethod (c$, "runLoader", 
50578  function () {
50579 this.dispatchAppletEvent (51235, null);
50580 this.status = 1;
50581 var code = this.getCode ();
50582 try {
50583 if (code == null) {
50584 System.err.println ("runloader.err-- \"code\" must be specified.");
50585 throw  new InstantiationException ("\"code\" must be specified.");
50586 }this.applet = swingjs.JSToolkit.getInstance (code);
50587 if (this.applet == null) {
50588 System.out.println (code + " could not be launched");
50589 this.status = 7;
50590 } else if (!(Clazz_instanceOf (this.applet, javax.swing.JApplet))) {
50591 System.out.println (code + " is not a JApplet!?");
50592 this.status = 7;
50593 }} catch (e$$) {
50594 if (Clazz_exceptionOf (e$$, InstantiationException)) {
50595 var e = e$$;
50596 {
50597 this.status = 7;
50598 this.showAppletException (e);
50599 return;
50600 }
50601 } else if (Clazz_exceptionOf (e$$, Exception)) {
50602 var e = e$$;
50603 {
50604 this.status = 7;
50605 this.showAppletException (e);
50606 return;
50607 }
50608 } else if (Clazz_exceptionOf (e$$, ThreadDeath)) {
50609 var e = e$$;
50610 {
50611 this.status = 7;
50612 this.showAppletStatus ("death");
50613 return;
50614 }
50615 } else if (Clazz_exceptionOf (e$$, Error)) {
50616 var e = e$$;
50617 {
50618 this.status = 7;
50619 this.showAppletException (e);
50620 return;
50621 }
50622 } else {
50623 throw e$$;
50624 }
50625 } finally {
50626 this.dispatchAppletEvent (51236, null);
50627 }
50628 if (this.applet != null) {
50629 this.applet.setStub (this);
50630 this.applet.setVisible (false);
50631 this.add ("Center", this.applet);
50632 this.applet.setDispatcher ();
50633 this.applet.addNotify ();
50634 this.showAppletStatus ("loaded");
50635 this.validate ();
50636 }});
50637 Clazz_defineMethod (c$, "getUI", 
50638 function () {
50639 return null;
50640 });
50641 Clazz_overrideMethod (c$, "repaintImpl", 
50642 function (tm, x, y, width, height) {
50643 if (this.applet.isVisible () && this.applet.getWidth () > 0 && this.applet.getHeight () > 0) {
50644 this.applet.getContentPane ().repaint (tm, x, y, width, height);
50645 }}, "~N,~N,~N,~N,~N");
50646 Clazz_defineStatics (c$,
50647 "APPLET_UNINITIALIZED", 0,
50648 "APPLET_LOAD", 1,
50649 "APPLET_INIT", 2,
50650 "APPLET_START", 3,
50651 "APPLET_READY", 35,
50652 "APPLET_STOP", 4,
50653 "APPLET_DESTROY", 5,
50654 "APPLET_QUIT", 6,
50655 "APPLET_ERROR", 7,
50656 "APPLET_DISPOSE", 75,
50657 "APPLET_RESIZE", 51234,
50658 "APPLET_LOADING", 51235,
50659 "APPLET_LOADING_COMPLETED", 51236);
50660 });
50661 Clazz_declarePackage ("swingjs");
50662 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 () {
50663 c$ = Clazz_decorateAsClass (function () {
50664 this.constrainX = 0;
50665 this.constrainY = 0;
50666 this.windowWidth = 0;
50667 this.windowHeight = 0;
50668 this.canvas = null;
50669 this.ctx = null;
50670 this.gc = null;
50671 this.paintState = 0;
50672 this.compositeState = -2147483648;
50673 this.strokeState = 0;
50674 this.$transformState = 0;
50675 this.clipState = 0;
50676 this.isShifted = false;
50677 this.font = null;
50678 this.inPath = false;
50679 this.currentClip = null;
50680 Clazz_instantialize (this, arguments);
50681 }, swingjs, "JSGraphics2D", jssun.java2d.SunGraphics2D, Cloneable);
50682 Clazz_makeConstructor (c$, 
50683 function (canvas) {
50684 Clazz_superConstructor (this, swingjs.JSGraphics2D, []);
50685 this.hints =  new java.awt.RenderingHints ( new java.util.HashMap ());
50686 this.canvas = canvas;
50687 this.ctx = this.canvas.getContext ("2d");
50688 this.$transform =  new java.awt.geom.AffineTransform ();
50689 {
50690 this.gc = SwingJS;
50691 }}, "~O");
50692 Clazz_overrideMethod (c$, "getDeviceConfiguration", 
50693 function () {
50694 return this.gc;
50695 });
50696 Clazz_overrideMethod (c$, "drawLine", 
50697 function (x0, y0, x1, y1) {
50698 var inPath = this.inPath;
50699 if (!inPath) this.ctx.beginPath ();
50700 this.ctx.moveTo (x0, y0);
50701 this.ctx.lineTo (x1, y1);
50702 if (!inPath) this.ctx.stroke ();
50703 }, "~N,~N,~N,~N");
50704 Clazz_defineMethod (c$, "drawCircle", 
50705 function (x, y, diameter) {
50706 this.drawArc (x, y, diameter, diameter, 0, 360);
50707 }, "~N,~N,~N");
50708 Clazz_overrideMethod (c$, "fillArc", 
50709 function (x, y, width, height, startAngle, arcAngle) {
50710 this.doArc (x, y, width, height, startAngle, arcAngle, true);
50711 }, "~N,~N,~N,~N,~N,~N");
50712 Clazz_overrideMethod (c$, "drawArc", 
50713 function (x, y, width, height, startAngle, arcAngle) {
50714 this.doArc (x, y, width, height, startAngle, arcAngle, false);
50715 }, "~N,~N,~N,~N,~N,~N");
50716 Clazz_defineMethod (c$, "save", 
50717  function () {
50718 this.ctx.save ();
50719 });
50720 Clazz_defineMethod (c$, "restore", 
50721  function () {
50722 this.ctx.restore ();
50723 });
50724 Clazz_defineMethod (c$, "doArc", 
50725  function (x, y, width, height, startAngle, arcAngle, fill) {
50726 var isCircle = (arcAngle - startAngle == 360);
50727 this.save ();
50728 this.ctx.translate (x, y);
50729 this.ctx.scale (Clazz_doubleToInt (width / height), height);
50730 this.ctx.beginPath ();
50731 if (fill) {
50732 }this.ctx.arc (0.5, 0.5, 0.5, this.toRad (startAngle), this.toRad (arcAngle), false);
50733 if (isCircle) this.ctx.closePath ();
50734 this.ctx.stroke ();
50735 this.restore ();
50736 }, "~N,~N,~N,~N,~N,~N,~B");
50737 Clazz_defineMethod (c$, "toRad", 
50738  function (a) {
50739 return a * 3.141592653589793 / 180;
50740 }, "~N");
50741 Clazz_defineMethod (c$, "drawPolygon", 
50742 function (ayPoints, axPoints, nPoints) {
50743 this.doPoly (ayPoints, axPoints, nPoints, false);
50744 }, "~A,~A,~N");
50745 Clazz_defineMethod (c$, "doPoly", 
50746  function (axPoints, ayPoints, nPoints, doFill) {
50747 this.ctx.beginPath ();
50748 this.ctx.moveTo (axPoints[0], ayPoints[0]);
50749 for (var i = 1; i < nPoints; i++) this.ctx.lineTo (axPoints[i], ayPoints[i]);
50750
50751 if (doFill) this.ctx.fill ();
50752  else this.ctx.stroke ();
50753 }, "~A,~A,~N,~B");
50754 Clazz_overrideMethod (c$, "drawRect", 
50755 function (x, y, width, height) {
50756 this.ctx.beginPath ();
50757 this.ctx.rect (x, y, width, height);
50758 this.ctx.stroke ();
50759 }, "~N,~N,~N,~N");
50760 Clazz_defineMethod (c$, "background", 
50761 function (bgcolor) {
50762 this.backgroundColor = bgcolor;
50763 if (bgcolor == null) {
50764 if (!this.isShifted) this.ctx.translate (-0.5, -0.5);
50765 this.isShifted = true;
50766 return;
50767 }this.ctx.clearRect (0, 0, this.windowWidth, this.windowHeight);
50768 this.setGraphicsColor (bgcolor);
50769 this.fillRect (0, 0, this.windowWidth, this.windowHeight);
50770 }, "java.awt.Color");
50771 Clazz_defineMethod (c$, "fillCircle", 
50772 function (x, y, diameter) {
50773 var r = diameter / 2;
50774 this.ctx.beginPath ();
50775 this.ctx.arc (x + r, y + r, r, 0, 6.283185307179586, false);
50776 this.ctx.fill ();
50777 }, "~N,~N,~N");
50778 Clazz_defineMethod (c$, "fillPolygon", 
50779 function (ayPoints, axPoints, nPoints) {
50780 this.doPoly (ayPoints, axPoints, nPoints, true);
50781 }, "~A,~A,~N");
50782 Clazz_overrideMethod (c$, "fillRect", 
50783 function (x, y, width, height) {
50784 this.ctx.fillRect (x, y, width, height);
50785 }, "~N,~N,~N,~N");
50786 Clazz_defineMethod (c$, "setGraphicsColor", 
50787 function (c) {
50788 var s = swingjs.JSToolkit.getCSSColor (c);
50789 {
50790 this.ctx.fillStyle = s; this.ctx.strokeStyle = s;
50791 }}, "java.awt.Color");
50792 Clazz_overrideMethod (c$, "setFont", 
50793 function (font) {
50794 this.font = font;
50795 if (this.ctx == null) return;
50796 var s = swingjs.JSToolkit.getCanvasFont (font);
50797 {
50798 this.ctx.font = s;
50799 }}, "java.awt.Font");
50800 Clazz_defineMethod (c$, "setStrokeBold", 
50801 function (tf) {
50802 this.setLineWidth (tf ? 2. : 1.);
50803 }, "~B");
50804 Clazz_defineMethod (c$, "setLineWidth", 
50805  function (d) {
50806 {
50807 this.ctx.lineWidth = d;
50808 }}, "~N");
50809 Clazz_defineMethod (c$, "setWindowParameters", 
50810 function (width, height) {
50811 this.windowWidth = width;
50812 this.windowHeight = height;
50813 }, "~N,~N");
50814 Clazz_defineMethod (c$, "canDoLineTo", 
50815 function () {
50816 return true;
50817 });
50818 Clazz_defineMethod (c$, "doStroke", 
50819 function (isBegin) {
50820 this.inPath = isBegin;
50821 if (isBegin) {
50822 this.ctx.beginPath ();
50823 } else {
50824 this.ctx.stroke ();
50825 }}, "~B");
50826 Clazz_defineMethod (c$, "lineTo", 
50827 function (x2, y2) {
50828 this.ctx.lineTo (x2, y2);
50829 }, "~N,~N");
50830 Clazz_overrideMethod (c$, "clip", 
50831 function (s) {
50832 this.doShape (s);
50833 this.ctx.clip ();
50834 }, "java.awt.Shape");
50835 Clazz_overrideMethod (c$, "draw", 
50836 function (s) {
50837 this.doShape (s);
50838 this.ctx.stroke ();
50839 }, "java.awt.Shape");
50840 Clazz_defineMethod (c$, "doShape", 
50841  function (s) {
50842 this.ctx.beginPath ();
50843 var pts =  Clazz_newDoubleArray (6, 0);
50844 var pi = s.getPathIterator (null);
50845 while (!pi.isDone ()) {
50846 switch (pi.currentSegment (pts)) {
50847 case 0:
50848 this.ctx.moveTo (pts[0], pts[1]);
50849 break;
50850 case 1:
50851 this.ctx.lineTo (pts[0], pts[1]);
50852 break;
50853 case 2:
50854 this.ctx.quadraticCurveTo (pts[0], pts[1], pts[2], pts[3]);
50855 break;
50856 case 3:
50857 this.ctx.bezeierCurveTo (pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
50858 break;
50859 case 4:
50860 this.ctx.closePath ();
50861 break;
50862 }
50863 pi.next ();
50864 }
50865 return pi.getWindingRule ();
50866 }, "java.awt.Shape");
50867 Clazz_overrideMethod (c$, "fill", 
50868 function (s) {
50869 if (this.doShape (s) == 0) {
50870 this.ctx.fill("evenodd");
50871 } else this.ctx.fill ();
50872 }, "java.awt.Shape");
50873 Clazz_defineMethod (c$, "drawImage", 
50874 function (img, x, y, observer) {
50875 if (img != null) {
50876 var imgNode = this.getImageNode (img);
50877 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, img.getWidth (observer), img.getHeight (observer));
50878 if (observer != null) this.observe (img, observer, imgNode != null);
50879 }return true;
50880 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
50881 Clazz_defineMethod (c$, "observe", 
50882  function (img, observer, isOK) {
50883 observer.imageUpdate (img, (isOK ? 0 : 192), -1, -1, -1, -1);
50884 }, "java.awt.Image,java.awt.image.ImageObserver,~B");
50885 Clazz_defineMethod (c$, "drawImage", 
50886 function (img, x, y, width, height, observer) {
50887 if (img != null) {
50888 var imgNode = this.getImageNode (img);
50889 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, width, height);
50890 if (observer != null) this.observe (img, observer, imgNode != null);
50891 }return true;
50892 }, "java.awt.Image,~N,~N,~N,~N,java.awt.image.ImageObserver");
50893 Clazz_defineMethod (c$, "drawImage", 
50894 function (img, x, y, bgcolor, observer) {
50895 swingjs.JSToolkit.notImplemented (null);
50896 return this.drawImage (img, x, y, null);
50897 }, "java.awt.Image,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50898 Clazz_defineMethod (c$, "drawImage", 
50899 function (img, x, y, width, height, bgcolor, observer) {
50900 swingjs.JSToolkit.notImplemented (null);
50901 return this.drawImage (img, x, y, width, height, null);
50902 }, "java.awt.Image,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50903 Clazz_defineMethod (c$, "drawImage", 
50904 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer) {
50905 if (img != null) {
50906 var imgNode = this.getImageNode (img);
50907 if (imgNode != null) swingjs.api.HTML5CanvasContext2D.stretchImage (this.ctx, imgNode, sx1, sy1, sx2 - sx1, sy2 - sy1, dx1, dy1, dx2 - dx1, dy2 - dy1);
50908 if (observer != null) this.observe (img, observer, imgNode != null);
50909 }return true;
50910 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.image.ImageObserver");
50911 Clazz_defineMethod (c$, "getImageNode", 
50912  function (img) {
50913 var imgNode = null;
50914 {
50915 imgNode = img._imgNode || img._canvas;
50916 }if (imgNode == null) imgNode = swingjs.JSToolkit.getCompositor ().createImageNode (img);
50917 return imgNode;
50918 }, "java.awt.Image");
50919 Clazz_defineMethod (c$, "drawImage", 
50920 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgcolor, observer) {
50921 swingjs.JSToolkit.notImplemented (null);
50922 return this.drawImage (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer);
50923 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50924 Clazz_defineMethod (c$, "drawImage", 
50925 function (img, xform, obs) {
50926 swingjs.JSToolkit.notImplemented (null);
50927 return false;
50928 }, "java.awt.Image,java.awt.geom.AffineTransform,java.awt.image.ImageObserver");
50929 Clazz_overrideMethod (c$, "drawRenderedImage", 
50930 function (img, xform) {
50931 swingjs.JSToolkit.notImplemented (null);
50932 }, "java.awt.image.RenderedImage,java.awt.geom.AffineTransform");
50933 Clazz_overrideMethod (c$, "drawRenderableImage", 
50934 function (img, xform) {
50935 swingjs.JSToolkit.notImplemented (null);
50936 }, "java.awt.image.renderable.RenderableImage,java.awt.geom.AffineTransform");
50937 Clazz_overrideMethod (c$, "hit", 
50938 function (rect, s, onStroke) {
50939 swingjs.JSToolkit.notImplemented (null);
50940 return false;
50941 }, "java.awt.Rectangle,java.awt.Shape,~B");
50942 Clazz_overrideMethod (c$, "setPaint", 
50943 function (paint) {
50944 swingjs.JSToolkit.notImplemented (null);
50945 }, "java.awt.Paint");
50946 Clazz_overrideMethod (c$, "setStroke", 
50947 function (s) {
50948 if (!(Clazz_instanceOf (s, java.awt.BasicStroke))) return;
50949 var b = s;
50950 var dash = b.getDashArray ();
50951 var idash =  Clazz_newIntArray (dash == null ? 0 : dash.length, 0);
50952 for (var i = idash.length; --i >= 0; ) idash[i] = Clazz_floatToInt (dash[i]);
50953
50954 this.ctx.setLineDash (idash);
50955 this.setLineWidth (b.getLineWidth ());
50956 var lineCap;
50957 var lineJoin;
50958 var miterLimit = -1;
50959 switch (b.getEndCap ()) {
50960 case 0:
50961 lineCap = "butt";
50962 break;
50963 case 2:
50964 lineCap = "square";
50965 break;
50966 case 1:
50967 default:
50968 lineCap = "round";
50969 }
50970 switch (b.getLineJoin ()) {
50971 case 2:
50972 lineJoin = "bevel";
50973 break;
50974 case 0:
50975 lineJoin = "miter";
50976 miterLimit = b.getMiterLimit ();
50977 break;
50978 case 1:
50979 lineJoin = "round";
50980 }
50981 {
50982 this.ctx.lineCap = lineCap; this.ctx.lineJoin = lineJoin; if
50983 (miterLimit >= 0) this.ctx.miterLimit = miterLimit;
50984 }}, "java.awt.Stroke");
50985 Clazz_overrideMethod (c$, "setRenderingHint", 
50986 function (hintKey, hintValue) {
50987 this.hints.put (hintKey, hintValue);
50988 }, "java.awt.RenderingHints.Key,~O");
50989 Clazz_overrideMethod (c$, "getRenderingHint", 
50990 function (hintKey) {
50991 return this.hints.get (hintKey);
50992 }, "java.awt.RenderingHints.Key");
50993 Clazz_overrideMethod (c$, "setRenderingHints", 
50994 function (hints) {
50995 this.hints =  new java.awt.RenderingHints (hints);
50996 }, "java.util.Map");
50997 Clazz_overrideMethod (c$, "addRenderingHints", 
50998 function (hints) {
50999 for (var e, $e = hints.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) this.hints.put (e.getKey (), e.getValue ());
51000
51001 }, "java.util.Map");
51002 Clazz_overrideMethod (c$, "getRenderingHints", 
51003 function () {
51004 return this.hints;
51005 });
51006 Clazz_defineMethod (c$, "translate", 
51007 function (x, y) {
51008 this.ctx.translate (x, y);
51009 }, "~N,~N");
51010 Clazz_overrideMethod (c$, "scale", 
51011 function (sx, sy) {
51012 this.ctx.scale (sx, sy);
51013 }, "~N,~N");
51014 Clazz_overrideMethod (c$, "setBackground", 
51015 function (color) {
51016 this.background (color);
51017 }, "java.awt.Color");
51018 Clazz_overrideMethod (c$, "getBackground", 
51019 function () {
51020 return this.backgroundColor;
51021 });
51022 Clazz_overrideMethod (c$, "createSwingJS", 
51023 function () {
51024 return this.clone ();
51025 });
51026 Clazz_overrideMethod (c$, "clone", 
51027 function () {
51028 this.save ();
51029 return this.clone0 ();
51030 });
51031 Clazz_overrideMethod (c$, "dispose", 
51032 function () {
51033 if (this.compositeState >= 0) this.setComposite (null);
51034 this.restore ();
51035 });
51036 Clazz_overrideMethod (c$, "getColor", 
51037 function () {
51038 return this.foregroundColor;
51039 });
51040 Clazz_overrideMethod (c$, "setColor", 
51041 function (c) {
51042 this.foregroundColor = c;
51043 this.setGraphicsColor (c);
51044 }, "java.awt.Color");
51045 Clazz_overrideMethod (c$, "getFont", 
51046 function () {
51047 return this.font;
51048 });
51049 Clazz_defineMethod (c$, "getFontMetrics", 
51050 function (f) {
51051 return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f);
51052 }, "java.awt.Font");
51053 Clazz_overrideMethod (c$, "clipRect", 
51054 function (x, y, width, height) {
51055 this.ctx.beginPath ();
51056 this.ctx.rect (x, y, width, height);
51057 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
51058 this.ctx.clip ();
51059 }, "~N,~N,~N,~N");
51060 Clazz_defineMethod (c$, "setClip", 
51061 function (x, y, width, height) {
51062 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
51063 {
51064 if (arguments.length == 1) { setClip1(x); return; }
51065 }this.ctx.beginPath ();
51066 this.ctx.rect (x, y, width, height);
51067 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
51068 this.ctx.clip ();
51069 }, "~N,~N,~N,~N");
51070 Clazz_defineMethod (c$, "setClip1", 
51071 function (clip) {
51072 this.ctx.beginPath ();
51073 this.doShape (clip);
51074 this.ctx.clip ();
51075 }, "java.awt.Shape");
51076 Clazz_overrideMethod (c$, "clearRect", 
51077 function (x, y, width, height) {
51078 this.ctx.clearRect (x, y, width, height);
51079 }, "~N,~N,~N,~N");
51080 Clazz_overrideMethod (c$, "drawPolyline", 
51081 function (xPoints, yPoints, nPoints) {
51082 if (nPoints < 2) return;
51083 this.ctx.moveTo (xPoints[0], yPoints[0]);
51084 for (var i = 1; i < nPoints; i++) {
51085 this.ctx.lineTo (xPoints[i], yPoints[i]);
51086 }
51087 }, "~A,~A,~N");
51088 Clazz_overrideMethod (c$, "copyArea", 
51089 function (x, y, width, height, dx, dy) {
51090 swingjs.JSToolkit.notImplemented (null);
51091 }, "~N,~N,~N,~N,~N,~N");
51092 Clazz_overrideMethod (c$, "drawRoundRect", 
51093 function (x, y, width, height, arcWidth, arcHeight) {
51094 swingjs.JSToolkit.notImplemented (null);
51095 this.drawRect (x, y, width, height);
51096 }, "~N,~N,~N,~N,~N,~N");
51097 Clazz_overrideMethod (c$, "fillRoundRect", 
51098 function (x, y, width, height, arcWidth, arcHeight) {
51099 swingjs.JSToolkit.notImplemented (null);
51100 this.fillRect (x, y, width, height);
51101 }, "~N,~N,~N,~N,~N,~N");
51102 Clazz_overrideMethod (c$, "drawOval", 
51103 function (x, y, width, height) {
51104 swingjs.JSToolkit.notImplemented (null);
51105 }, "~N,~N,~N,~N");
51106 Clazz_overrideMethod (c$, "fillOval", 
51107 function (x, y, width, height) {
51108 swingjs.JSToolkit.notImplemented (null);
51109 }, "~N,~N,~N,~N");
51110 Clazz_overrideMethod (c$, "getClip", 
51111 function () {
51112 swingjs.JSToolkit.notImplemented (null);
51113 return null;
51114 });
51115 Clazz_defineMethod (c$, "drawString", 
51116 function (s, x, y) {
51117 this.ctx.fillText (s, x, y);
51118 }, "~S,~N,~N");
51119 Clazz_defineMethod (c$, "drawStringUnique", 
51120 function (s, x, y) {
51121 this.ctx.fillText (s, x, y);
51122 }, "~S,~N,~N");
51123 Clazz_overrideMethod (c$, "drawStringTrans", 
51124 function (str, x, y) {
51125 swingjs.JSToolkit.notImplemented (null);
51126 }, "~S,~N,~N");
51127 Clazz_defineMethod (c$, "drawString", 
51128 function (iterator, x, y) {
51129 swingjs.JSToolkit.notImplemented (null);
51130 }, "java.text.AttributedCharacterIterator,~N,~N");
51131 Clazz_overrideMethod (c$, "drawStringAttrTrans", 
51132 function (iterator, x, y) {
51133 swingjs.JSToolkit.notImplemented (null);
51134 }, "java.text.AttributedCharacterIterator,~N,~N");
51135 Clazz_overrideMethod (c$, "translateTrans", 
51136 function (tx, ty) {
51137 swingjs.JSToolkit.notImplemented (null);
51138 }, "~N,~N");
51139 Clazz_defineMethod (c$, "rotate", 
51140 function (theta) {
51141 swingjs.JSToolkit.notImplemented (null);
51142 }, "~N");
51143 Clazz_defineMethod (c$, "rotate", 
51144 function (theta, x, y) {
51145 swingjs.JSToolkit.notImplemented (null);
51146 }, "~N,~N,~N");
51147 Clazz_overrideMethod (c$, "shear", 
51148 function (shx, shy) {
51149 swingjs.JSToolkit.notImplemented (null);
51150 }, "~N,~N");
51151 Clazz_overrideMethod (c$, "transform", 
51152 function (xform) {
51153 swingjs.JSToolkit.notImplemented (null);
51154 }, "java.awt.geom.AffineTransform");
51155 Clazz_overrideMethod (c$, "setTransform", 
51156 function (Tx) {
51157 swingjs.JSToolkit.notImplemented (null);
51158 }, "java.awt.geom.AffineTransform");
51159 Clazz_overrideMethod (c$, "getTransform", 
51160 function () {
51161 swingjs.JSToolkit.notImplemented (null);
51162 return null;
51163 });
51164 Clazz_defineMethod (c$, "cloneTransform", 
51165 function () {
51166 swingjs.JSToolkit.notImplemented (null);
51167 return null;
51168 });
51169 Clazz_overrideMethod (c$, "getPaint", 
51170 function () {
51171 swingjs.JSToolkit.notImplemented (null);
51172 return null;
51173 });
51174 Clazz_overrideMethod (c$, "getStroke", 
51175 function () {
51176 swingjs.JSToolkit.notImplemented (null);
51177 return null;
51178 });
51179 Clazz_overrideMethod (c$, "getFontRenderContext", 
51180 function () {
51181 swingjs.JSToolkit.notImplemented (null);
51182 return null;
51183 });
51184 Clazz_overrideMethod (c$, "setPaintMode", 
51185 function () {
51186 swingjs.JSToolkit.notImplemented (null);
51187 });
51188 Clazz_overrideMethod (c$, "setXORMode", 
51189 function (c1) {
51190 swingjs.JSToolkit.notImplemented (null);
51191 }, "java.awt.Color");
51192 Clazz_defineMethod (c$, "getClipBounds", 
51193 function () {
51194 var r = null;
51195 {
51196 if (arguments.length == 1) r = arguments[0];
51197 }var clipRect = this.getClipBoundsImpl ();
51198 if (r == null) {
51199 r = clipRect;
51200 } else {
51201 r.x = clipRect.x;
51202 r.y = clipRect.y;
51203 r.width = clipRect.width;
51204 r.height = clipRect.height;
51205 }return r;
51206 });
51207 Clazz_defineMethod (c$, "getClipBoundsImpl", 
51208  function () {
51209 if (this.currentClip == null) {
51210 this.currentClip =  new java.awt.Rectangle (0, 0, this.windowWidth, this.windowHeight);
51211 }return this.currentClip;
51212 });
51213 Clazz_overrideMethod (c$, "setComposite", 
51214 function (comp) {
51215 var newRule = 0;
51216 var isValid = (comp == null || (Clazz_instanceOf (comp, java.awt.AlphaComposite)) && (newRule = (comp).getRule ()) != this.compositeState);
51217 if (!isValid) return;
51218 if (swingjs.JSToolkit.setGraphicsCompositeAlpha (this, newRule)) this.compositeState = newRule;
51219 }, "java.awt.Composite");
51220 Clazz_defineMethod (c$, "drawImage", 
51221 function (img, op, x, y) {
51222 swingjs.JSToolkit.drawImageOp (this, img, op, x, y);
51223 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
51224 Clazz_defineMethod (c$, "setAlpha", 
51225 function (f) {
51226 {
51227 this.ctx.globalAlpha = f;
51228 }}, "~N");
51229 Clazz_defineStatics (c$,
51230 "saveLevel", 0);
51231 });
51232 Clazz_declarePackage ("swingjs");
51233 Clazz_load (["swingjs.JSThread"], "swingjs.JSAppletThread", ["javax.swing.SwingUtilities"], function () {
51234 c$ = Clazz_decorateAsClass (function () {
51235 this.ap = null;
51236 Clazz_instantialize (this, arguments);
51237 }, swingjs, "JSAppletThread", swingjs.JSThread);
51238 Clazz_makeConstructor (c$, 
51239 function (ap, group, name) {
51240 Clazz_superConstructor (this, swingjs.JSAppletThread, [group, name]);
51241 this.ap = ap;
51242 }, "swingjs.JSAppletPanel,ThreadGroup,~S");
51243 Clazz_overrideMethod (c$, "run1", 
51244 function (mode) {
51245 mode = this.ap.run1 (mode);
51246 if (mode != 2) this.dispatchAndReturn (null, mode);
51247 }, "~N");
51248 Clazz_defineMethod (c$, "dispatchAndReturn", 
51249 function (r, mode) {
51250 var m = mode;
51251 javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("swingjs.JSAppletThread$1") ? 0 : swingjs.JSAppletThread.$JSAppletThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSAppletThread$1, this, Clazz_cloneFinals ("m", m))));
51252 }, "Runnable,~N");
51253 c$.$JSAppletThread$1$ = function () {
51254 Clazz_pu$h(self.c$);
51255 c$ = Clazz_declareAnonymous (swingjs, "JSAppletThread$1", null, Runnable);
51256 Clazz_overrideMethod (c$, "run", 
51257 function () {
51258 this.b$["swingjs.JSAppletThread"].run1 (this.f$.m);
51259 });
51260 c$ = Clazz_p0p ();
51261 };
51262 });
51263 Clazz_declarePackage ("swingjs");
51264 Clazz_load (null, "swingjs.JSMouse", ["JU.V3", "java.awt.Toolkit", "java.awt.event.MouseEvent"], function () {
51265 c$ = Clazz_decorateAsClass (function () {
51266 this.ap = null;
51267 this.isMouseDown = false;
51268 this.wheeling = false;
51269 this.xWhenPressed = 0;
51270 this.yWhenPressed = 0;
51271 this.modifiersWhenPressed10 = 0;
51272 Clazz_instantialize (this, arguments);
51273 }, swingjs, "JSMouse");
51274 Clazz_makeConstructor (c$, 
51275 function (ap) {
51276 this.ap = ap;
51277 }, "swingjs.JSAppletPanel");
51278 Clazz_defineMethod (c$, "processEvent", 
51279 function (id, x, y, modifiers, time) {
51280 if (id != -1) modifiers = swingjs.JSMouse.applyLeftMouse (modifiers);
51281 switch (id) {
51282 case -1:
51283 this.wheeled (time, x, modifiers);
51284 break;
51285 case 501:
51286 this.xWhenPressed = x;
51287 this.yWhenPressed = y;
51288 this.modifiersWhenPressed10 = modifiers;
51289 this.pressed (time, x, y, modifiers, false);
51290 break;
51291 case 506:
51292 this.dragged (time, x, y, modifiers);
51293 break;
51294 case 504:
51295 this.entry (time, x, y, false);
51296 break;
51297 case 505:
51298 this.entry (time, x, y, true);
51299 break;
51300 case 503:
51301 this.moved (time, x, y, modifiers);
51302 break;
51303 case 502:
51304 this.released (time, x, y, modifiers);
51305 if (x == this.xWhenPressed && y == this.yWhenPressed && modifiers == this.modifiersWhenPressed10) {
51306 this.clicked (time, x, y, modifiers, 1);
51307 }break;
51308 default:
51309 return false;
51310 }
51311 return true;
51312 }, "~N,~N,~N,~N,~N");
51313 Clazz_defineMethod (c$, "processTwoPointGesture", 
51314 function (touches) {
51315 if (touches[0].length < 2) return;
51316 var t1 = touches[0];
51317 var t2 = touches[1];
51318 var t1first = t1[0];
51319 var t1last = t1[t2.length - 1];
51320 var x1first = t1first[0];
51321 var x1last = t1last[0];
51322 var dx1 = x1last - x1first;
51323 var y1first = t1first[1];
51324 var y1last = t1last[1];
51325 var dy1 = y1last - y1first;
51326 var v1 = JU.V3.new3 (dx1, dy1, 0);
51327 var d1 = v1.length ();
51328 var t2first = t2[0];
51329 var t2last = t2[t2.length - 1];
51330 var x2first = t2first[0];
51331 var x2last = t2last[0];
51332 var dx2 = x2last - x2first;
51333 var y2first = t2first[1];
51334 var y2last = t2last[1];
51335 var dy2 = y2last - y2first;
51336 var v2 = JU.V3.new3 (dx2, dy2, 0);
51337 var d2 = v2.length ();
51338 if (d1 < 1 || d2 < 1) return;
51339 v1.normalize ();
51340 v2.normalize ();
51341 var cos12 = (v1.dot (v2));
51342 if (cos12 > 0.8) {
51343 var deltaX = Clazz_floatToInt (x1last - t1[t1.length - 2][0]);
51344 var deltaY = Clazz_floatToInt (y1last - t1[t1.length - 2][1]);
51345 this.translateXYBy (deltaX, deltaY);
51346 } else if (cos12 < -0.8) {
51347 v1 = JU.V3.new3 (x2first - x1first, y2first - y1first, 0);
51348 v2 = JU.V3.new3 (x2last - x1last, y2last - y1last, 0);
51349 var dx = v2.length () - v1.length ();
51350 this.wheeled (System.currentTimeMillis (), dx < 0 ? -1 : 1, 32);
51351 }}, "~A");
51352 Clazz_defineMethod (c$, "translateXYBy", 
51353  function (deltaX, deltaY) {
51354 }, "~N,~N");
51355 Clazz_defineMethod (c$, "mouseClicked", 
51356 function (e) {
51357 this.clicked (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.getClickCount ());
51358 }, "java.awt.event.MouseEvent");
51359 Clazz_defineMethod (c$, "mouseEntered", 
51360 function (e) {
51361 this.entry (e.getWhen (), e.getX (), e.getY (), false);
51362 }, "java.awt.event.MouseEvent");
51363 Clazz_defineMethod (c$, "mouseExited", 
51364 function (e) {
51365 this.entry (e.getWhen (), e.getX (), e.getY (), true);
51366 }, "java.awt.event.MouseEvent");
51367 Clazz_defineMethod (c$, "mousePressed", 
51368 function (e) {
51369 this.pressed (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.isPopupTrigger ());
51370 }, "java.awt.event.MouseEvent");
51371 Clazz_defineMethod (c$, "mouseReleased", 
51372 function (e) {
51373 this.released (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51374 }, "java.awt.event.MouseEvent");
51375 Clazz_defineMethod (c$, "mouseDragged", 
51376 function (e) {
51377 var modifiers = e.getModifiers ();
51378 if ((modifiers & 28) == 0) modifiers |= 16;
51379 this.dragged (e.getWhen (), e.getX (), e.getY (), modifiers);
51380 }, "java.awt.event.MouseEvent");
51381 Clazz_defineMethod (c$, "mouseMoved", 
51382 function (e) {
51383 this.moved (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51384 }, "java.awt.event.MouseEvent");
51385 Clazz_defineMethod (c$, "mouseWheelMoved", 
51386 function (e) {
51387 e.consume ();
51388 this.wheeled (e.getWhen (), e.getWheelRotation (), e.getModifiers ());
51389 }, "java.awt.event.MouseWheelEvent");
51390 Clazz_defineMethod (c$, "entry", 
51391  function (time, x, y, isExit) {
51392 this.wheeling = false;
51393 this.mouseEnterExit (time, x, y, isExit);
51394 }, "~N,~N,~N,~B");
51395 Clazz_defineMethod (c$, "clicked", 
51396  function (time, x, y, modifiers, clickCount) {
51397 this.mouseAction (500, time, x, y, 1, modifiers);
51398 }, "~N,~N,~N,~N,~N");
51399 Clazz_defineMethod (c$, "moved", 
51400  function (time, x, y, modifiers) {
51401 if (this.isMouseDown) this.mouseAction (506, time, x, y, 0, swingjs.JSMouse.applyLeftMouse (modifiers));
51402  else this.mouseAction (503, time, x, y, 0, modifiers);
51403 }, "~N,~N,~N,~N");
51404 Clazz_defineMethod (c$, "wheeled", 
51405  function (time, rotation, modifiers) {
51406 this.wheeling = true;
51407 this.mouseAction (507, time, 0, rotation, 0, modifiers & -29 | 32);
51408 }, "~N,~N,~N");
51409 Clazz_defineMethod (c$, "pressed", 
51410  function (time, x, y, modifiers, isPopupTrigger) {
51411 this.isMouseDown = true;
51412 this.wheeling = false;
51413 this.mouseAction (501, time, x, y, 0, modifiers);
51414 }, "~N,~N,~N,~N,~B");
51415 Clazz_defineMethod (c$, "released", 
51416  function (time, x, y, modifiers) {
51417 this.isMouseDown = false;
51418 this.wheeling = false;
51419 this.mouseAction (502, time, x, y, 0, modifiers);
51420 }, "~N,~N,~N,~N");
51421 Clazz_defineMethod (c$, "dragged", 
51422  function (time, x, y, modifiers) {
51423 if (this.wheeling) return;
51424 if ((modifiers & 20) == 20) modifiers = modifiers & -5 | 2;
51425 this.mouseAction (506, time, x, y, 0, modifiers);
51426 }, "~N,~N,~N,~N");
51427 c$.applyLeftMouse = Clazz_defineMethod (c$, "applyLeftMouse", 
51428  function (modifiers) {
51429 return ((modifiers & 28) == 0) ? (modifiers | 16) : modifiers;
51430 }, "~N");
51431 Clazz_defineMethod (c$, "getButton", 
51432  function (modifiers) {
51433 switch (modifiers & 28) {
51434 case 16:
51435 return 1;
51436 case 8:
51437 return 2;
51438 case 4:
51439 return 3;
51440 default:
51441 return 0;
51442 }
51443 }, "~N");
51444 Clazz_defineMethod (c$, "mouseEnterExit", 
51445  function (time, x, y, isExit) {
51446 }, "~N,~N,~N,~B");
51447 Clazz_defineMethod (c$, "mouseAction", 
51448  function (id, time, x, y, count, modifiers) {
51449 var popupTrigger = false;
51450 var button = this.getButton (modifiers);
51451 var source = this.ap.applet;
51452 var e =  new java.awt.event.MouseEvent (source, id, time, modifiers, x, y, x, y, count, popupTrigger, button);
51453 java.awt.Toolkit.getEventQueue ().postEvent (e);
51454 }, "~N,~N,~N,~N,~N,~N");
51455 Clazz_defineStatics (c$,
51456 "MOUSE_LEFT", 16,
51457 "MOUSE_MIDDLE", 8,
51458 "MOUSE_RIGHT", 4,
51459 "MOUSE_WHEEL", 32,
51460 "MAC_COMMAND", 20,
51461 "BUTTON_MASK", 28);
51462 });
51463 Clazz_declarePackage ("swingjs");
51464 Clazz_load (["java.awt.peer.LightweightPeer"], "swingjs.JSComponentPeer", ["swingjs.JSToolkit"], function () {
51465 c$ = Clazz_decorateAsClass (function () {
51466 this.target = null;
51467 this.ui = null;
51468 Clazz_instantialize (this, arguments);
51469 }, swingjs, "JSComponentPeer", null, java.awt.peer.LightweightPeer);
51470 Clazz_makeConstructor (c$, 
51471 function (target) {
51472 this.target = target;
51473 this.ui = swingjs.JSToolkit.getUI (target, false);
51474 }, "java.awt.Component");
51475 Clazz_overrideMethod (c$, "isObscured", 
51476 function () {
51477 return false;
51478 });
51479 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51480 function () {
51481 return false;
51482 });
51483 Clazz_overrideMethod (c$, "setVisible", 
51484 function (b) {
51485 }, "~B");
51486 Clazz_overrideMethod (c$, "setEnabled", 
51487 function (b) {
51488 }, "~B");
51489 Clazz_overrideMethod (c$, "paint", 
51490 function (g) {
51491 }, "java.awt.Graphics");
51492 Clazz_overrideMethod (c$, "repaint", 
51493 function (tm, x, y, width, height) {
51494 }, "~N,~N,~N,~N,~N");
51495 Clazz_overrideMethod (c$, "print", 
51496 function (g) {
51497 }, "java.awt.Graphics");
51498 Clazz_overrideMethod (c$, "setBounds", 
51499 function (x, y, width, height, op) {
51500 }, "~N,~N,~N,~N,~N");
51501 Clazz_overrideMethod (c$, "handleEvent", 
51502 function (e) {
51503 }, "java.awt.AWTEvent");
51504 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51505 function (e) {
51506 }, "java.awt.event.PaintEvent");
51507 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51508 function () {
51509 return null;
51510 });
51511 Clazz_overrideMethod (c$, "getPreferredSize", 
51512 function () {
51513 return null;
51514 });
51515 Clazz_overrideMethod (c$, "getMinimumSize", 
51516 function () {
51517 return null;
51518 });
51519 Clazz_overrideMethod (c$, "getColorModel", 
51520 function () {
51521 return null;
51522 });
51523 Clazz_overrideMethod (c$, "getToolkit", 
51524 function () {
51525 return null;
51526 });
51527 Clazz_overrideMethod (c$, "getGraphics", 
51528 function () {
51529 return null;
51530 });
51531 Clazz_overrideMethod (c$, "getFontMetrics", 
51532 function (font) {
51533 return null;
51534 }, "java.awt.Font");
51535 Clazz_overrideMethod (c$, "dispose", 
51536 function () {
51537 });
51538 Clazz_overrideMethod (c$, "setForeground", 
51539 function (c) {
51540 }, "java.awt.Color");
51541 Clazz_overrideMethod (c$, "setBackground", 
51542 function (c) {
51543 }, "java.awt.Color");
51544 Clazz_overrideMethod (c$, "setFont", 
51545 function (f) {
51546 }, "java.awt.Font");
51547 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51548 function () {
51549 });
51550 Clazz_overrideMethod (c$, "requestFocus", 
51551 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51552 return false;
51553 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51554 Clazz_overrideMethod (c$, "isFocusable", 
51555 function () {
51556 return false;
51557 });
51558 Clazz_defineMethod (c$, "createImage", 
51559 function (producer) {
51560 return null;
51561 }, "java.awt.image.ImageProducer");
51562 Clazz_defineMethod (c$, "createImage", 
51563 function (width, height) {
51564 return null;
51565 }, "~N,~N");
51566 Clazz_overrideMethod (c$, "createVolatileImage", 
51567 function (width, height) {
51568 return null;
51569 }, "~N,~N");
51570 Clazz_overrideMethod (c$, "prepareImage", 
51571 function (img, w, h, o) {
51572 return false;
51573 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51574 Clazz_overrideMethod (c$, "checkImage", 
51575 function (img, w, h, o) {
51576 return 0;
51577 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51578 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51579 function () {
51580 return null;
51581 });
51582 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51583 function () {
51584 return false;
51585 });
51586 Clazz_overrideMethod (c$, "getBackBuffer", 
51587 function () {
51588 return null;
51589 });
51590 Clazz_overrideMethod (c$, "destroyBuffers", 
51591 function () {
51592 });
51593 Clazz_overrideMethod (c$, "reparent", 
51594 function (newContainer) {
51595 }, "java.awt.peer.ContainerPeer");
51596 Clazz_overrideMethod (c$, "isReparentSupported", 
51597 function () {
51598 return false;
51599 });
51600 Clazz_overrideMethod (c$, "layout", 
51601 function () {
51602 });
51603 Clazz_overrideMethod (c$, "getBounds", 
51604 function () {
51605 return null;
51606 });
51607 });
51608 Clazz_declarePackage ("swingjs");
51609 Clazz_load (["java.awt.peer.FramePeer"], "swingjs.JSWindowPeer", ["java.lang.Thread", "java.awt.GraphicsEnvironment", "$.Insets", "$.Point", "$.Toolkit"], function () {
51610 c$ = Clazz_decorateAsClass (function () {
51611 this.window = null;
51612 this.isFrame = false;
51613 this.applet = null;
51614 this.graphics = null;
51615 this.font = null;
51616 Clazz_instantialize (this, arguments);
51617 }, swingjs, "JSWindowPeer", null, java.awt.peer.FramePeer);
51618 Clazz_overrideMethod (c$, "setFrame", 
51619 function (target, isFrame) {
51620 this.isFrame = isFrame;
51621 this.window = target;
51622 var jc = this;
51623 jc.myThread = Thread.currentThread ();
51624 jc.threadGroup = jc.myThread.getThreadGroup ();
51625 this.applet = (jc.threadGroup).getHtmlApplet ();
51626 this.graphics = (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ()).createGraphicsSized (target, 500, 300);
51627 return this;
51628 }, "java.awt.Window,~B");
51629 Clazz_overrideMethod (c$, "getGraphics", 
51630 function () {
51631 this.graphics.setFont (this.window.getFont ());
51632 return this.graphics;
51633 });
51634 Clazz_overrideMethod (c$, "getToolkit", 
51635 function () {
51636 return java.awt.Toolkit.getDefaultToolkit ();
51637 });
51638 Clazz_overrideMethod (c$, "getFontMetrics", 
51639 function (font) {
51640 if (!font.equals (this.font)) this.window.setFont (this.font = font);
51641 return this.graphics.getFontMetrics (font);
51642 }, "java.awt.Font");
51643 Clazz_overrideMethod (c$, "getInsets", 
51644 function () {
51645 return  new java.awt.Insets (0, 0, 0, 0);
51646 });
51647 Clazz_overrideMethod (c$, "beginValidate", 
51648 function () {
51649 });
51650 Clazz_overrideMethod (c$, "endValidate", 
51651 function () {
51652 });
51653 Clazz_overrideMethod (c$, "beginLayout", 
51654 function () {
51655 });
51656 Clazz_overrideMethod (c$, "endLayout", 
51657 function () {
51658 });
51659 Clazz_overrideMethod (c$, "isObscured", 
51660 function () {
51661 return false;
51662 });
51663 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51664 function () {
51665 return false;
51666 });
51667 Clazz_overrideMethod (c$, "setVisible", 
51668 function (b) {
51669 }, "~B");
51670 Clazz_overrideMethod (c$, "setEnabled", 
51671 function (b) {
51672 }, "~B");
51673 Clazz_overrideMethod (c$, "paint", 
51674 function (g) {
51675 }, "java.awt.Graphics");
51676 Clazz_overrideMethod (c$, "repaint", 
51677 function (tm, x, y, width, height) {
51678 }, "~N,~N,~N,~N,~N");
51679 Clazz_overrideMethod (c$, "print", 
51680 function (g) {
51681 }, "java.awt.Graphics");
51682 Clazz_overrideMethod (c$, "setBounds", 
51683 function (x, y, width, height, op) {
51684 }, "~N,~N,~N,~N,~N");
51685 Clazz_overrideMethod (c$, "handleEvent", 
51686 function (e) {
51687 }, "java.awt.AWTEvent");
51688 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51689 function (e) {
51690 }, "java.awt.event.PaintEvent");
51691 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51692 function () {
51693 return  new java.awt.Point ();
51694 });
51695 Clazz_overrideMethod (c$, "getPreferredSize", 
51696 function () {
51697 return null;
51698 });
51699 Clazz_overrideMethod (c$, "getMinimumSize", 
51700 function () {
51701 return null;
51702 });
51703 Clazz_overrideMethod (c$, "getColorModel", 
51704 function () {
51705 return null;
51706 });
51707 Clazz_overrideMethod (c$, "dispose", 
51708 function () {
51709 });
51710 Clazz_overrideMethod (c$, "setForeground", 
51711 function (c) {
51712 }, "java.awt.Color");
51713 Clazz_overrideMethod (c$, "setBackground", 
51714 function (c) {
51715 }, "java.awt.Color");
51716 Clazz_overrideMethod (c$, "setFont", 
51717 function (f) {
51718 this.font = f;
51719 }, "java.awt.Font");
51720 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51721 function () {
51722 });
51723 Clazz_overrideMethod (c$, "requestFocus", 
51724 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51725 return false;
51726 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51727 Clazz_overrideMethod (c$, "isFocusable", 
51728 function () {
51729 return false;
51730 });
51731 Clazz_defineMethod (c$, "createImage", 
51732 function (producer) {
51733 return null;
51734 }, "java.awt.image.ImageProducer");
51735 Clazz_defineMethod (c$, "createImage", 
51736 function (width, height) {
51737 return null;
51738 }, "~N,~N");
51739 Clazz_overrideMethod (c$, "createVolatileImage", 
51740 function (width, height) {
51741 return null;
51742 }, "~N,~N");
51743 Clazz_overrideMethod (c$, "prepareImage", 
51744 function (img, w, h, o) {
51745 return false;
51746 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51747 Clazz_overrideMethod (c$, "checkImage", 
51748 function (img, w, h, o) {
51749 return 0;
51750 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51751 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51752 function () {
51753 return null;
51754 });
51755 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51756 function () {
51757 return false;
51758 });
51759 Clazz_overrideMethod (c$, "getBackBuffer", 
51760 function () {
51761 return null;
51762 });
51763 Clazz_overrideMethod (c$, "destroyBuffers", 
51764 function () {
51765 });
51766 Clazz_overrideMethod (c$, "reparent", 
51767 function (newContainer) {
51768 }, "java.awt.peer.ContainerPeer");
51769 Clazz_overrideMethod (c$, "isReparentSupported", 
51770 function () {
51771 return false;
51772 });
51773 Clazz_overrideMethod (c$, "layout", 
51774 function () {
51775 });
51776 Clazz_overrideMethod (c$, "getBounds", 
51777 function () {
51778 return null;
51779 });
51780 Clazz_overrideMethod (c$, "toFront", 
51781 function () {
51782 });
51783 Clazz_overrideMethod (c$, "toBack", 
51784 function () {
51785 });
51786 Clazz_overrideMethod (c$, "updateAlwaysOnTopState", 
51787 function () {
51788 });
51789 Clazz_overrideMethod (c$, "updateFocusableWindowState", 
51790 function () {
51791 });
51792 Clazz_overrideMethod (c$, "requestWindowFocus", 
51793 function () {
51794 return false;
51795 });
51796 Clazz_overrideMethod (c$, "setModalBlocked", 
51797 function (blocker, blocked) {
51798 }, "java.awt.Dialog,~B");
51799 Clazz_overrideMethod (c$, "updateMinimumSize", 
51800 function () {
51801 });
51802 Clazz_overrideMethod (c$, "updateIconImages", 
51803 function () {
51804 });
51805 Clazz_overrideMethod (c$, "setOpacity", 
51806 function (opacity) {
51807 }, "~N");
51808 Clazz_overrideMethod (c$, "setOpaque", 
51809 function (isOpaque) {
51810 }, "~B");
51811 Clazz_overrideMethod (c$, "updateWindow", 
51812 function (backBuffer) {
51813 }, "java.awt.image.BufferedImage");
51814 Clazz_overrideMethod (c$, "repositionSecurityWarning", 
51815 function () {
51816 });
51817 Clazz_overrideMethod (c$, "setTitle", 
51818 function (title) {
51819 }, "~S");
51820 Clazz_overrideMethod (c$, "setMenuBar", 
51821 function (mb) {
51822 }, "~O");
51823 Clazz_overrideMethod (c$, "setResizable", 
51824 function (resizeable) {
51825 }, "~B");
51826 Clazz_overrideMethod (c$, "setState", 
51827 function (state) {
51828 }, "~N");
51829 Clazz_overrideMethod (c$, "getState", 
51830 function () {
51831 return 0;
51832 });
51833 Clazz_overrideMethod (c$, "setMaximizedBounds", 
51834 function (bounds) {
51835 }, "java.awt.Rectangle");
51836 Clazz_overrideMethod (c$, "setBoundsPrivate", 
51837 function (x, y, width, height) {
51838 }, "~N,~N,~N,~N");
51839 Clazz_overrideMethod (c$, "getBoundsPrivate", 
51840 function () {
51841 return null;
51842 });
51843 });
51844 Clazz_declarePackage ("swingjs");
51845 Clazz_load (["java.awt.GraphicsEnvironment"], "swingjs.JSGraphicsEnvironment", ["swingjs.JSGraphics2D", "$.JSToolkit", "swingjs.api.DOMNode"], function () {
51846 c$ = Clazz_declareType (swingjs, "JSGraphicsEnvironment", java.awt.GraphicsEnvironment);
51847 Clazz_makeConstructor (c$, 
51848 function () {
51849 Clazz_superConstructor (this, swingjs.JSGraphicsEnvironment, []);
51850 System.out.println ("JSGraphicsEnvironment initialized");
51851 });
51852 Clazz_overrideMethod (c$, "createGraphics", 
51853 function (img) {
51854 return this.createGraphicsSized (img, img.getWidth (), img.getHeight ());
51855 }, "java.awt.image.BufferedImage");
51856 Clazz_defineMethod (c$, "createGraphicsSized", 
51857 function (img, width, height) {
51858 var g = null;
51859 {
51860 g = img._g;
51861 }if (g == null) {
51862 var canvas = swingjs.api.DOMNode.createElement ("canvas", "img" + System.currentTimeMillis ());
51863 {
51864 canvas.width = width;
51865 canvas.height = height;
51866 img._canvas = canvas;
51867 }g =  new swingjs.JSGraphics2D (canvas);
51868 {
51869 img._g = g;
51870 }}return g;
51871 }, "~O,~N,~N");
51872 Clazz_overrideMethod (c$, "getAllFonts", 
51873 function () {
51874 return null;
51875 });
51876 Clazz_defineMethod (c$, "getAvailableFontFamilyNames", 
51877 function () {
51878 return null;
51879 });
51880 Clazz_defineMethod (c$, "getAvailableFontFamilyNames", 
51881 function (l) {
51882 return null;
51883 }, "java.util.Locale");
51884 Clazz_overrideMethod (c$, "getDefaultScreenDevice", 
51885 function () {
51886 if (swingjs.JSGraphicsEnvironment.device == null) swingjs.JSGraphicsEnvironment.device = swingjs.JSToolkit.getInstance ("swingjs.JSScreenDevice");
51887 return swingjs.JSGraphicsEnvironment.device;
51888 });
51889 Clazz_defineStatics (c$,
51890 "device", null);
51891 });
51892 Clazz_declarePackage ("swingjs.plaf");
51893 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 () {
51894 c$ = Clazz_declareType (swingjs.plaf, "HTML5LookAndFeel", javax.swing.LookAndFeel);
51895 Clazz_overrideMethod (c$, "getDefaults", 
51896 function () {
51897 var table =  new javax.swing.UIDefaults (610, 0.75);
51898 this.initClassDefaults (table);
51899 this.initSystemColorDefaults (table);
51900 this.initComponentDefaults (table);
51901 return table;
51902 });
51903 Clazz_overrideMethod (c$, "initialize", 
51904 function () {
51905 });
51906 Clazz_defineMethod (c$, "installAWTEventListener", 
51907 function () {
51908 });
51909 Clazz_overrideMethod (c$, "uninitialize", 
51910 function () {
51911 });
51912 Clazz_defineMethod (c$, "initClassDefaults", 
51913 function (table) {
51914 var packageName = "swingjs.plaf.";
51915 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"]);
51916 table.putDefaults (uiDefaults);
51917 }, "javax.swing.UIDefaults");
51918 Clazz_defineMethod (c$, "initSystemColorDefaults", 
51919 function (table) {
51920 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"]);
51921 this.loadSystemColors (table, defaultSystemColors, this.isNativeLookAndFeel ());
51922 }, "javax.swing.UIDefaults");
51923 Clazz_defineMethod (c$, "loadSystemColors", 
51924 function (table, systemColors, useNative) {
51925 for (var i = 0; i < systemColors.length; i += 2) {
51926 var color = java.awt.Color.black;
51927 try {
51928 color = java.awt.Color.decode (systemColors[i + 1]);
51929 } catch (e) {
51930 if (Clazz_exceptionOf (e, NumberFormatException)) {
51931 e.printStackTrace ();
51932 } else {
51933 throw e;
51934 }
51935 }
51936 table.put (systemColors[i],  new javax.swing.plaf.ColorUIResource (color));
51937 }
51938 }, "javax.swing.UIDefaults,~A,~B");
51939 Clazz_defineMethod (c$, "initResourceBundle", 
51940  function (table) {
51941 }, "javax.swing.UIDefaults");
51942 Clazz_defineMethod (c$, "initComponentDefaults", 
51943 function (table) {
51944 this.initResourceBundle (table);
51945 var oneThousand =  new Long (1000);
51946 var twelve =  new Integer (12);
51947 var fontPlain =  new Integer (0);
51948 var serifPlain12 =  new javax.swing.plaf.FontUIResource ("Serif", 0, 12);
51949 var sansSerifPlain12 =  new javax.swing.plaf.FontUIResource ("SansSerif", 0, 12);
51950 var dialogPlain12 =  new javax.swing.plaf.FontUIResource ("Dialog", 0, 12);
51951 var monospacedPlain12 =  new javax.swing.plaf.FontUIResource ("Monospaced", 0, 12);
51952 var black =  new javax.swing.plaf.ColorUIResource (java.awt.Color.black);
51953 var white =  new javax.swing.plaf.ColorUIResource (java.awt.Color.white);
51954 var gray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.gray);
51955 var darkGray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.darkGray);
51956 var control = table.getColor ("control");
51957 var controlText = table.getColor ("controlText");
51958 var menu = table.getColor ("menu");
51959 var menuText = table.getColor ("menuText");
51960 var textText = table.getColor ("textText");
51961 var window = table.getColor ("window");
51962 var zeroInsets =  new javax.swing.plaf.InsetsUIResource (0, 0, 0, 0);
51963 var twoInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 2);
51964 var threeInsets =  new javax.swing.plaf.InsetsUIResource (3, 3, 3, 3);
51965 var listCellRendererActiveValue = ((Clazz_isClassDefined ("swingjs.plaf.HTML5LookAndFeel$1") ? 0 : swingjs.plaf.HTML5LookAndFeel.$HTML5LookAndFeel$1$ ()), Clazz_innerTypeInstance (swingjs.plaf.HTML5LookAndFeel$1, this, null));
51966 var zero =  new Integer (0);
51967 var tabbedPaneTabInsets =  new javax.swing.plaf.InsetsUIResource (0, 4, 1, 4);
51968 var tabbedPaneTabPadInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 1);
51969 var tabbedPaneTabAreaInsets =  new javax.swing.plaf.InsetsUIResource (3, 2, 0, 2);
51970 var tabbedPaneContentBorderInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 3, 3);
51971 var editorMargin = threeInsets;
51972 var four =  new Integer (4);
51973 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]);
51974 table.putDefaults (defaults);
51975 }, "javax.swing.UIDefaults");
51976 Clazz_overrideMethod (c$, "getName", 
51977 function () {
51978 return "SwingJS";
51979 });
51980 Clazz_overrideMethod (c$, "getID", 
51981 function () {
51982 return "SwingJS";
51983 });
51984 Clazz_overrideMethod (c$, "getDescription", 
51985 function () {
51986 return "SwingJS L&F";
51987 });
51988 Clazz_overrideMethod (c$, "isNativeLookAndFeel", 
51989 function () {
51990 return true;
51991 });
51992 Clazz_overrideMethod (c$, "isSupportedLookAndFeel", 
51993 function () {
51994 return true;
51995 });
51996 c$.$HTML5LookAndFeel$1$ = function () {
51997 Clazz_pu$h(self.c$);
51998 c$ = Clazz_declareAnonymous (swingjs.plaf, "HTML5LookAndFeel$1", null, javax.swing.UIDefaults.ActiveValue);
51999 Clazz_overrideMethod (c$, "createValue", 
52000 function (table) {
52001 return  new javax.swing.DefaultListCellRenderer.UIResource ();
52002 }, "javax.swing.UIDefaults");
52003 c$ = Clazz_p0p ();
52004 };
52005 });
52006 Clazz_declarePackage ("swingjs.plaf");
52007 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 () {
52008 c$ = Clazz_decorateAsClass (function () {
52009 this.id = null;
52010 this.c = null;
52011 this.outerNode = null;
52012 this.domNode = null;
52013 this.enableNode = null;
52014 this.textNode = null;
52015 this.valueNode = null;
52016 this.scrollNode = null;
52017 this.focusNode = null;
52018 this.components = null;
52019 this.num = 0;
52020 this.isTainted = true;
52021 this.x = 0;
52022 this.y = 0;
52023 this.preferredSize = null;
52024 this.isContainer = false;
52025 this.parent = null;
52026 this.currentText = null;
52027 this.scrollerNode = null;
52028 this.classID = null;
52029 this.document = null;
52030 this.body = null;
52031 this.needPreferred = false;
52032 Clazz_instantialize (this, arguments);
52033 }, swingjs.plaf, "JSComponentUI", javax.swing.plaf.ComponentUI, swingjs.plaf.JSEventHandler);
52034 Clazz_makeConstructor (c$, 
52035 function () {
52036 Clazz_superConstructor (this, swingjs.plaf.JSComponentUI, []);
52037 this.setDoc ();
52038 });
52039 Clazz_defineMethod (c$, "setDoc", 
52040 function () {
52041 {
52042 this.document = document;
52043 this.body = document.body;
52044 }});
52045 Clazz_overrideMethod (c$, "installUI", 
52046 function (c) {
52047 }, "javax.swing.JComponent");
52048 Clazz_overrideMethod (c$, "uninstallUI", 
52049 function (c) {
52050 this.uninstallJSUI ();
52051 }, "javax.swing.JComponent");
52052 Clazz_defineMethod (c$, "$", 
52053 function (node) {
52054 return swingjs.JSToolkit.getJQuery ().$ (node);
52055 }, "swingjs.api.DOMNode");
52056 Clazz_defineMethod (c$, "setTainted", 
52057 function () {
52058 this.isTainted = true;
52059 });
52060 Clazz_defineMethod (c$, "set", 
52061 function (target) {
52062 this.c = target;
52063 this.newID ();
52064 if (this.needPreferred) this.getPreferredSize (this.c);
52065 this.installJSUI ();
52066 return this;
52067 }, "javax.swing.JComponent");
52068 Clazz_defineMethod (c$, "newID", 
52069 function () {
52070 this.classID = this.c.getUIClassID ();
52071 if (this.id == null) {
52072 this.num = ++swingjs.plaf.JSComponentUI.incr;
52073 this.id = this.c.getHTMLName (this.classID) + "_" + this.num;
52074 }});
52075 Clazz_defineMethod (c$, "setCssFont", 
52076 function (obj, font) {
52077 if (font != null) {
52078 var istyle = font.getStyle ();
52079 var name = font.getFamily ();
52080 if (name === "Dialog") name = "Arial";
52081 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")]);
52082 }if (this.c.isBackgroundSet ()) this.setBackground (this.c.getBackground ());
52083 this.setForeground (this.c.getForeground ());
52084 return obj;
52085 }, "swingjs.api.DOMNode,java.awt.Font");
52086 Clazz_defineMethod (c$, "createDOMObject", 
52087 function (key, id, attr) {
52088 var obj = swingjs.api.DOMNode.createElement (key, id);
52089 for (var i = 0; i < attr.length; ) swingjs.api.DOMNode.setAttr (obj, attr[i++], attr[i++]);
52090
52091 if (!this.c.isEnabled ()) this.setEnabled (false);
52092 return obj;
52093 }, "~S,~S,~A");
52094 Clazz_defineMethod (c$, "bindMouse", 
52095 function (node) {
52096 swingjs.api.DOMNode.setAttr (node, "data-UI", this);
52097 }, "swingjs.api.DOMNode");
52098 Clazz_overrideMethod (c$, "handleJSEvent", 
52099 function (target, eventType, jQueryEvent) {
52100 return false;
52101 }, "~O,~N,~O");
52102 Clazz_defineMethod (c$, "wrap", 
52103 function (type, id, elements) {
52104 return this.append (this.createDOMObject (type, id + type, []), elements);
52105 }, "~S,~S,~A");
52106 Clazz_defineMethod (c$, "append", 
52107 function (obj, elements) {
52108 for (var i = 0; i < elements.length; i++) {
52109 obj.appendChild (elements[i]);
52110 }
52111 return obj;
52112 }, "swingjs.api.DOMNode,~A");
52113 Clazz_defineMethod (c$, "debugDump", 
52114 function (d) {
52115 System.out.println (swingjs.api.DOMNode.getAttr (d, "outerHTML"));
52116 }, "swingjs.api.DOMNode");
52117 c$.vCenter = Clazz_defineMethod (c$, "vCenter", 
52118 function (obj, offset) {
52119 swingjs.api.DOMNode.setStyles (obj, ["top", "50%", "transform", "translateY(" + offset + "%)"]);
52120 }, "swingjs.api.DOMNode,~N");
52121 Clazz_defineMethod (c$, "setHTMLSize", 
52122 function (obj, addCSS) {
52123 return this.setHTMLSize1 (obj, addCSS, true);
52124 }, "swingjs.api.DOMNode,~B");
52125 Clazz_defineMethod (c$, "setHTMLSize1", 
52126 function (node, addCSS, usePreferred) {
52127 if (node == null) return null;
52128 var h;
52129 var w;
52130 var w0 = null;
52131 var h0 = null;
52132 var parentNode = null;
52133 if (this.scrollerNode != null) {
52134 w = this.scrollerNode.c.getWidth ();
52135 h = this.scrollerNode.c.getHeight ();
52136 } else if (usePreferred && this.preferredSize != null) {
52137 w = this.preferredSize.width;
52138 h = this.preferredSize.height;
52139 } else {
52140 parentNode = swingjs.api.DOMNode.remove (node);
52141 {
52142 w0 = node.style.width;
52143 h0 = node.style.height;
52144 }swingjs.api.DOMNode.setStyles (node, ["position", null, "width", null, "height", null]);
52145 var div;
52146 if (swingjs.api.DOMNode.getAttr (node, "tagName") === "DIV") div = node;
52147  else div = this.wrap ("div", this.id + "_temp", [node]);
52148 swingjs.api.DOMNode.setStyles (div, ["position", "absolute"]);
52149 this.body.appendChild (div);
52150 w = Clazz_doubleToInt (Math.ceil (this.$ (div).width () + 0.5));
52151 h = Clazz_doubleToInt (Math.ceil (this.$ (div).height () + 0.5));
52152 this.body.removeChild (div);
52153 }var size = this.getCSSDimension (w, h);
52154 if (addCSS) {
52155 swingjs.api.DOMNode.setStyles (node, ["position", "absolute"]);
52156 swingjs.api.DOMNode.setSize (node, size.width, size.height);
52157 } else {
52158 swingjs.api.DOMNode.setStyles (node, ["position", null]);
52159 if (w0 != null) swingjs.api.DOMNode.setStyles (node, ["width", w0, "height", h0]);
52160 }if (parentNode != null) parentNode.appendChild (node);
52161 return size;
52162 }, "swingjs.api.DOMNode,~B,~B");
52163 Clazz_defineMethod (c$, "getCSSDimension", 
52164 function (w, h) {
52165 return  new java.awt.Dimension (w, h);
52166 }, "~N,~N");
52167 Clazz_defineMethod (c$, "setHTMLElement", 
52168 function () {
52169 if (!this.isTainted) return this.outerNode;
52170 var root = (this.isContainer ? this.c.getRootPane () : null);
52171 if (this.c === root) {
52172 this.isTainted = false;
52173 return this.outerNode;
52174 }this.domNode = this.getDOMObject ();
52175 if (this.outerNode == null) {
52176 this.outerNode = this.wrap ("div", this.id, [this.domNode]);
52177 if (root != null && root.getContentPane () === this.c) swingjs.JSToolkit.getHTML5Applet (this.c)._getContentLayer ().appendChild (this.outerNode);
52178 }swingjs.api.DOMNode.setStyles (this.outerNode, ["position", "absolute", "left", (this.x = this.c.getX ()) + "px", "top", (this.y = this.c.getY ()) + "px"]);
52179 if (this.isContainer) {
52180 System.out.println ("JSComponentUI container " + this.id + " " + this.c.getBounds ());
52181 swingjs.api.DOMNode.setSize (this.outerNode, this.c.getWidth (), this.c.getHeight ());
52182 var children = (this.components == null ? this.c.getComponents () : this.components);
52183 for (var i = children.length; --i >= 0; ) {
52184 var ui = swingjs.JSToolkit.getUI (children[i], false);
52185 if (ui == null) {
52186 continue;
52187 }if (ui.outerNode == null) ui.setHTMLElement ();
52188 if (ui.outerNode == null) {
52189 System.out.println ("JSCUI could not add " + ui.c.getName () + " to " + this.c.getName ());
52190 } else {
52191 this.outerNode.appendChild (ui.outerNode);
52192 }ui.parent = this;
52193 }
52194 }this.isTainted = false;
52195 return this.outerNode;
52196 });
52197 Clazz_defineMethod (c$, "getPreferredSize", 
52198 function (c) {
52199 var d = this.setHTMLSize (this.getDOMObject (), false);
52200 return d;
52201 }, "javax.swing.JComponent");
52202 Clazz_defineMethod (c$, "paint", 
52203 function (g, c) {
52204 if (c.isOpaque ()) {
52205 g.setColor (c.getBackground ());
52206 g.fillRect (0, 0, c.getWidth (), c.getHeight ());
52207 }}, "java.awt.Graphics,javax.swing.JComponent");
52208 Clazz_overrideMethod (c$, "update", 
52209 function (g, c) {
52210 var testing = false;
52211 if (testing) {
52212 g.setColor (java.awt.Color.red);
52213 g.drawRect (0, 0, c.getWidth (), c.getHeight ());
52214 System.out.println ("drawing " + c.getWidth () + " " + c.getHeight ());
52215 }this.setHTMLElement ();
52216 this.paint (g, c);
52217 }, "java.awt.Graphics,javax.swing.JComponent");
52218 Clazz_defineMethod (c$, "getMinimumSize", 
52219 function (c) {
52220 return this.getPreferredSize (c);
52221 }, "javax.swing.JComponent");
52222 Clazz_overrideMethod (c$, "getMaximumSize", 
52223 function (c) {
52224 return null;
52225 }, "javax.swing.JComponent");
52226 Clazz_overrideMethod (c$, "contains", 
52227 function (c, x, y) {
52228 return c.inside (x, y);
52229 }, "javax.swing.JComponent,~N,~N");
52230 c$.createUI = Clazz_overrideMethod (c$, "createUI", 
52231 function (c) {
52232 return null;
52233 }, "javax.swing.JComponent");
52234 Clazz_overrideMethod (c$, "getBaseline", 
52235 function (c, width, height) {
52236 if (c == null) {
52237 throw  new NullPointerException ("Component must be non-null");
52238 }if (width < 0 || height < 0) {
52239 throw  new IllegalArgumentException ("Width and height must be >= 0");
52240 }return -1;
52241 }, "javax.swing.JComponent,~N,~N");
52242 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
52243 function (c) {
52244 if (c == null) {
52245 throw  new NullPointerException ("Component must be non-null");
52246 }return java.awt.Component.BaselineResizeBehavior.OTHER;
52247 }, "javax.swing.JComponent");
52248 Clazz_defineMethod (c$, "getJSTextValue", 
52249 function () {
52250 return swingjs.api.DOMNode.getAttr (this.domNode, this.valueNode == null ? "innerHTML" : "value");
52251 });
52252 Clazz_defineMethod (c$, "notifyPropertyChanged", 
52253 function (prop) {
52254 var obj = null;
52255 var val = null;
52256 if (prop === "text") {
52257 val = (this.c).getText ();
52258 if (val.equals (this.currentText)) return;
52259 this.currentText = val;
52260 if (this.textNode != null) {
52261 prop = "innerHTML";
52262 obj = this.textNode;
52263 } else if (this.valueNode != null) {
52264 prop = "value";
52265 obj = this.valueNode;
52266 }} else if (prop === "preferredSize") {
52267 this.preferredSize = this.c.getPreferredSize ();
52268 this.getPreferredSize ();
52269 return;
52270 }if (obj == null) {
52271 System.out.println ("JSComponentUI: unrecognized prop: " + prop);
52272 } else {
52273 System.out.println ("JSComponentUI: setting " + this.id + " " + prop);
52274 this.setProp (obj, prop, val);
52275 }}, "~S");
52276 Clazz_defineMethod (c$, "setProp", 
52277 function (obj, prop, val) {
52278 return swingjs.api.DOMNode.setAttr (obj, prop, val);
52279 }, "swingjs.api.DOMNode,~S,~S");
52280 Clazz_overrideMethod (c$, "isObscured", 
52281 function () {
52282 swingjs.JSToolkit.notImplemented ("");
52283 return false;
52284 });
52285 Clazz_overrideMethod (c$, "canDetermineObscurity", 
52286 function () {
52287 swingjs.JSToolkit.notImplemented ("");
52288 return false;
52289 });
52290 Clazz_overrideMethod (c$, "setVisible", 
52291 function (b) {
52292 swingjs.api.DOMNode.setStyles (this.outerNode, ["display", b ? "block" : "none"]);
52293 }, "~B");
52294 Clazz_overrideMethod (c$, "setEnabled", 
52295 function (b) {
52296 if (this.enableNode != null) swingjs.api.DOMNode.setAttr (this.enableNode, "disabled", (b ? null : "TRUE"));
52297 }, "~B");
52298 Clazz_defineMethod (c$, "paint", 
52299 function (g) {
52300 }, "java.awt.Graphics");
52301 Clazz_overrideMethod (c$, "repaint", 
52302 function (tm, x, y, width, height) {
52303 }, "~N,~N,~N,~N,~N");
52304 Clazz_overrideMethod (c$, "print", 
52305 function (g) {
52306 swingjs.JSToolkit.notImplemented ("");
52307 }, "java.awt.Graphics");
52308 Clazz_overrideMethod (c$, "setBounds", 
52309 function (x, y, width, height, op) {
52310 switch (op) {
52311 case 2:
52312 case 3:
52313 case 4:
52314 if (this.scrollerNode != null) {
52315 width = Math.min (width, this.scrollerNode.c.getWidth ());
52316 height = Math.min (height, this.scrollerNode.c.getHeight ());
52317 }System.out.println (this.id + " setBounds " + x + " " + y + " " + width + " " + height + " op=" + op);
52318 if (this.domNode != null) swingjs.api.DOMNode.setSize (this.domNode, width, height);
52319 break;
52320 }
52321 }, "~N,~N,~N,~N,~N");
52322 Clazz_overrideMethod (c$, "handleEvent", 
52323 function (e) {
52324 swingjs.JSToolkit.notImplemented ("");
52325 }, "java.awt.AWTEvent");
52326 Clazz_overrideMethod (c$, "coalescePaintEvent", 
52327 function (e) {
52328 swingjs.JSToolkit.notImplemented ("");
52329 }, "java.awt.event.PaintEvent");
52330 Clazz_overrideMethod (c$, "getLocationOnScreen", 
52331 function () {
52332 var offset = this.$ (this.outerNode).offset ();
52333 return  new java.awt.Point (offset.left, offset.top);
52334 });
52335 Clazz_defineMethod (c$, "getPreferredSize", 
52336 function () {
52337 return this.getPreferredSize (this.c);
52338 });
52339 Clazz_defineMethod (c$, "getMinimumSize", 
52340 function () {
52341 swingjs.JSToolkit.notImplemented ("");
52342 return this.getPreferredSize (this.c);
52343 });
52344 Clazz_overrideMethod (c$, "getColorModel", 
52345 function () {
52346 return java.awt.Toolkit.getDefaultToolkit ().getColorModel ();
52347 });
52348 Clazz_overrideMethod (c$, "getToolkit", 
52349 function () {
52350 return java.awt.Toolkit.getDefaultToolkit ();
52351 });
52352 Clazz_overrideMethod (c$, "getGraphics", 
52353 function () {
52354 return null;
52355 });
52356 Clazz_overrideMethod (c$, "getFontMetrics", 
52357 function (font) {
52358 return this.c.getFontMetrics (font);
52359 }, "java.awt.Font");
52360 Clazz_overrideMethod (c$, "dispose", 
52361 function () {
52362 swingjs.JSToolkit.notImplemented ("");
52363 });
52364 Clazz_overrideMethod (c$, "setForeground", 
52365 function (color) {
52366 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.black : color)]);
52367 }, "java.awt.Color");
52368 Clazz_overrideMethod (c$, "setBackground", 
52369 function (color) {
52370 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["background-color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.white : color)]);
52371 }, "java.awt.Color");
52372 Clazz_overrideMethod (c$, "setFont", 
52373 function (f) {
52374 if (this.domNode != null) this.setCssFont (this.domNode, f);
52375 }, "java.awt.Font");
52376 Clazz_overrideMethod (c$, "updateCursorImmediately", 
52377 function () {
52378 swingjs.JSToolkit.notImplemented ("");
52379 });
52380 Clazz_overrideMethod (c$, "requestFocus", 
52381 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
52382 if (this.focusNode == null) return false;
52383 this.$ (this.focusNode).focus ();
52384 if (this.textNode != null) this.$ (this.textNode).select ();
52385 return true;
52386 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
52387 Clazz_overrideMethod (c$, "isFocusable", 
52388 function () {
52389 return (this.focusNode != null);
52390 });
52391 Clazz_defineMethod (c$, "createImage", 
52392 function (producer) {
52393 swingjs.JSToolkit.notImplemented ("");
52394 return null;
52395 }, "java.awt.image.ImageProducer");
52396 Clazz_defineMethod (c$, "createImage", 
52397 function (width, height) {
52398 swingjs.JSToolkit.notImplemented ("");
52399 return null;
52400 }, "~N,~N");
52401 Clazz_overrideMethod (c$, "createVolatileImage", 
52402 function (width, height) {
52403 swingjs.JSToolkit.notImplemented ("");
52404 return null;
52405 }, "~N,~N");
52406 Clazz_overrideMethod (c$, "prepareImage", 
52407 function (img, w, h, o) {
52408 swingjs.JSToolkit.notImplemented ("");
52409 return false;
52410 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
52411 Clazz_overrideMethod (c$, "checkImage", 
52412 function (img, w, h, o) {
52413 swingjs.JSToolkit.notImplemented ("");
52414 return 0;
52415 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
52416 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
52417 function () {
52418 swingjs.JSToolkit.notImplemented ("");
52419 return null;
52420 });
52421 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
52422 function () {
52423 swingjs.JSToolkit.notImplemented ("");
52424 return false;
52425 });
52426 Clazz_overrideMethod (c$, "getBackBuffer", 
52427 function () {
52428 swingjs.JSToolkit.notImplemented ("");
52429 return null;
52430 });
52431 Clazz_overrideMethod (c$, "destroyBuffers", 
52432 function () {
52433 swingjs.JSToolkit.notImplemented ("");
52434 });
52435 Clazz_overrideMethod (c$, "reparent", 
52436 function (newContainer) {
52437 swingjs.JSToolkit.notImplemented ("");
52438 }, "java.awt.peer.ContainerPeer");
52439 Clazz_overrideMethod (c$, "isReparentSupported", 
52440 function () {
52441 swingjs.JSToolkit.notImplemented ("");
52442 return false;
52443 });
52444 Clazz_overrideMethod (c$, "layout", 
52445 function () {
52446 swingjs.JSToolkit.notImplemented ("");
52447 });
52448 Clazz_overrideMethod (c$, "getBounds", 
52449 function () {
52450 swingjs.JSToolkit.notImplemented ("");
52451 return null;
52452 });
52453 Clazz_defineMethod (c$, "hasFocus", 
52454 function () {
52455 return this.focusNode != null && this.focusNode === swingjs.api.DOMNode.getAttr (this.document, "activeElement");
52456 });
52457 Clazz_defineMethod (c$, "notifyFocus", 
52458 function (focusGained) {
52459 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.FocusEvent (this.c, focusGained ? 1004 : 1005));
52460 }, "~B");
52461 Clazz_defineStatics (c$,
52462 "incr", 0);
52463 });
52464 Clazz_declarePackage ("swingjs.plaf");
52465 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSPanelUI", ["java.awt.Dimension", "javax.swing.LookAndFeel"], function () {
52466 c$ = Clazz_declareType (swingjs.plaf, "JSPanelUI", swingjs.plaf.JSComponentUI);
52467 Clazz_makeConstructor (c$, 
52468 function () {
52469 Clazz_superConstructor (this, swingjs.plaf.JSPanelUI, []);
52470 this.isContainer = true;
52471 this.setDoc ();
52472 });
52473 Clazz_overrideMethod (c$, "getDOMObject", 
52474 function () {
52475 if (this.domNode == null) this.domNode = this.createDOMObject ("label", this.id, []);
52476 return this.domNode;
52477 });
52478 Clazz_overrideMethod (c$, "setHTMLSize", 
52479 function (obj, addCSS) {
52480 return  new java.awt.Dimension (this.c.getWidth (), this.c.getHeight ());
52481 }, "swingjs.api.DOMNode,~B");
52482 Clazz_defineMethod (c$, "getPreferredSize", 
52483 function (c) {
52484 return null;
52485 }, "javax.swing.JComponent");
52486 Clazz_overrideMethod (c$, "installJSUI", 
52487 function () {
52488 javax.swing.LookAndFeel.installColorsAndFont (this.c, "Panel.background", "Panel.foreground", "Panel.font");
52489 });
52490 Clazz_overrideMethod (c$, "uninstallJSUI", 
52491 function () {
52492 });
52493 });
52494 Clazz_declarePackage ("swingjs.plaf");
52495 Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSRadioButtonUI", ["java.util.HashMap", "javax.swing.DefaultButtonModel", "swingjs.api.DOMNode"], function () {
52496 c$ = Clazz_decorateAsClass (function () {
52497 this.label = null;
52498 Clazz_instantialize (this, arguments);
52499 }, swingjs.plaf, "JSRadioButtonUI", swingjs.plaf.JSButtonUI);
52500 Clazz_overrideMethod (c$, "getDOMObject", 
52501 function () {
52502 return this.getButtonObject ("radio");
52503 });
52504 Clazz_overrideMethod (c$, "getPropertyPrefix", 
52505 function () {
52506 return "RadioButton.";
52507 });
52508 Clazz_overrideMethod (c$, "setHTMLSize", 
52509 function (obj, addCSS) {
52510 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", null]);
52511 swingjs.api.DOMNode.setStyles (this.label, ["position", null]);
52512 var d = this.setHTMLSize1 (obj, addCSS, false);
52513 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
52514 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute"]);
52515 return d;
52516 }, "swingjs.api.DOMNode,~B");
52517 Clazz_defineMethod (c$, "getButtonObject", 
52518 function (myType) {
52519 var b = this.c;
52520 var isNew = false;
52521 var doAll = false;
52522 if (this.domNode == null) {
52523 doAll = true;
52524 if (swingjs.plaf.JSRadioButtonUI.groupNames == null) swingjs.plaf.JSRadioButtonUI.groupNames =  new java.util.HashMap ();
52525 var bg = null;
52526 var name = this.id;
52527 isNew = true;
52528 if (Clazz_instanceOf (b.getModel (), javax.swing.DefaultButtonModel)) {
52529 bg = (b.getModel ()).getGroup ();
52530 name = swingjs.plaf.JSRadioButtonUI.groupNames.get (bg);
52531 if (name == null) swingjs.plaf.JSRadioButtonUI.groupNames.put (bg, name = this.id);
52532  else isNew = false;
52533 }this.domBtn = this.enableNode = this.createDOMObject ("input", this.id, ["type", myType, "name", name]);
52534 this.label = this.textNode = this.createDOMObject ("label", this.id + "l", ["htmlFor", this.id]);
52535 }if (b.isSelected () || isNew) swingjs.api.DOMNode.setAttr (this.domBtn, "checked", "true");
52536 this.setCssFont (swingjs.api.DOMNode.setAttr (this.label, "innerHTML", (this.c).getText ()), this.c.getFont ());
52537 var drad = this.setHTMLSize1 (this.domBtn, false, false);
52538 this.setHTMLSize1 (this.label, false, false);
52539 var obj = this.wrap ("div", "", [this.domBtn, this.label]);
52540 var dobj = this.setHTMLSize1 (obj, true, true);
52541 swingjs.plaf.JSComponentUI.vCenter (this.domBtn, -75);
52542 swingjs.plaf.JSComponentUI.vCenter (this.label, -50);
52543 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute", "left", drad.width + "px"]);
52544 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
52545 if (doAll) {
52546 obj = this.wrap ("div", this.id + "_0", [this.domBtn, this.label]);
52547 swingjs.api.DOMNode.setStyles (obj, ["position", "absolute"]);
52548 } else {
52549 obj = this.domNode;
52550 obj.appendChild (this.domBtn);
52551 obj.appendChild (this.label);
52552 }return swingjs.api.DOMNode.setSize (obj, dobj.width, dobj.height);
52553 }, "~S");
52554 Clazz_defineStatics (c$,
52555 "groupNames", null);
52556 });
52557 Clazz_declarePackage ("swingjs.plaf");
52558 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSRootPaneUI", null, function () {
52559 c$ = Clazz_declareType (swingjs.plaf, "JSRootPaneUI", swingjs.plaf.JSComponentUI);
52560 Clazz_makeConstructor (c$, 
52561 function () {
52562 Clazz_superConstructor (this, swingjs.plaf.JSRootPaneUI, []);
52563 this.isContainer = true;
52564 this.setDoc ();
52565 });
52566 Clazz_overrideMethod (c$, "getDOMObject", 
52567 function () {
52568 return null;
52569 });
52570 Clazz_overrideMethod (c$, "installJSUI", 
52571 function () {
52572 });
52573 Clazz_overrideMethod (c$, "uninstallJSUI", 
52574 function () {
52575 });
52576 });
52577 Clazz_declarePackage ("swingjs.plaf");
52578 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 () {
52579 c$ = Clazz_decorateAsClass (function () {
52580 this.lastPressedTimestamp = -1;
52581 this.shouldDiscardRelease = false;
52582 this.btn = null;
52583 Clazz_instantialize (this, arguments);
52584 }, swingjs.plaf, "JSButtonListener", null, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener, java.beans.PropertyChangeListener]);
52585 c$.loadActionMap = Clazz_defineMethod (c$, "loadActionMap", 
52586 function (map) {
52587 map.put ( new swingjs.plaf.JSButtonListener.Actions ("pressed"));
52588 map.put ( new swingjs.plaf.JSButtonListener.Actions ("released"));
52589 }, "swingjs.plaf.LazyActionMap");
52590 Clazz_makeConstructor (c$, 
52591 function (b) {
52592 this.btn = b;
52593 }, "javax.swing.AbstractButton");
52594 Clazz_overrideMethod (c$, "propertyChange", 
52595 function (e) {
52596 var prop = e.getPropertyName ();
52597 if (prop === "mnemonic") {
52598 this.updateMnemonicBinding (e.getSource ());
52599 } else if (prop === "contentAreaFilled") {
52600 this.checkOpacity (e.getSource ());
52601 } else if (prop === "text" || "font" === prop || "foreground" === prop) {
52602 var b = e.getSource ();
52603 (b.getUI ()).notifyPropertyChanged (prop);
52604 }}, "java.beans.PropertyChangeEvent");
52605 Clazz_defineMethod (c$, "checkOpacity", 
52606 function (b) {
52607 b.setOpaque (b.isContentAreaFilled ());
52608 }, "javax.swing.AbstractButton");
52609 Clazz_defineMethod (c$, "installKeyboardActions", 
52610 function (c) {
52611 var b = c;
52612 this.updateMnemonicBinding (b);
52613 swingjs.plaf.LazyActionMap.installLazyActionMap (c, swingjs.plaf.JSButtonListener, "Button.actionMap");
52614 var km = this.getInputMap (0, c);
52615 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, km);
52616 }, "javax.swing.JComponent");
52617 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
52618 function (c) {
52619 javax.swing.SwingUtilities.replaceUIInputMap (c, 2, null);
52620 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, null);
52621 javax.swing.SwingUtilities.replaceUIActionMap (c, null);
52622 }, "javax.swing.JComponent");
52623 Clazz_defineMethod (c$, "getInputMap", 
52624 function (condition, c) {
52625 return null;
52626 }, "~N,javax.swing.JComponent");
52627 Clazz_defineMethod (c$, "updateMnemonicBinding", 
52628 function (b) {
52629 var m = b.getMnemonic ();
52630 if (m != 0) {
52631 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52632 if (map == null) {
52633 map =  new javax.swing.plaf.ComponentInputMapUIResource (b);
52634 javax.swing.SwingUtilities.replaceUIInputMap (b, 2, map);
52635 }map.clear ();
52636 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, false), "pressed");
52637 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, true), "released");
52638 map.put (javax.swing.KeyStroke.getKeyStroke (m, 0, true), "released");
52639 } else {
52640 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52641 if (map != null) {
52642 map.clear ();
52643 }}}, "javax.swing.AbstractButton");
52644 Clazz_overrideMethod (c$, "stateChanged", 
52645 function (e) {
52646 var b = e.getSource ();
52647 b.repaint ();
52648 }, "javax.swing.event.ChangeEvent");
52649 Clazz_overrideMethod (c$, "focusGained", 
52650 function (e) {
52651 }, "java.awt.event.FocusEvent");
52652 Clazz_overrideMethod (c$, "focusLost", 
52653 function (e) {
52654 var b = e.getSource ();
52655 var model = b.getModel ();
52656 model.setArmed (false);
52657 model.setPressed (false);
52658 }, "java.awt.event.FocusEvent");
52659 Clazz_overrideMethod (c$, "mouseMoved", 
52660 function (e) {
52661 }, "java.awt.event.MouseEvent");
52662 Clazz_overrideMethod (c$, "mouseDragged", 
52663 function (e) {
52664 }, "java.awt.event.MouseEvent");
52665 Clazz_overrideMethod (c$, "mouseClicked", 
52666 function (e) {
52667 }, "java.awt.event.MouseEvent");
52668 Clazz_overrideMethod (c$, "mousePressed", 
52669 function (e) {
52670 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52671 var b = e.getSource ();
52672 if (!b.contains (e.getX (), e.getY ())) return;
52673 (b.getUI ()).verifyButtonClick (false);
52674 var multiClickThreshhold = b.getMultiClickThreshhold ();
52675 var lastTime = this.lastPressedTimestamp;
52676 var currentTime = this.lastPressedTimestamp = e.getWhen ();
52677 if (lastTime != -1 && currentTime - lastTime < multiClickThreshhold) {
52678 this.shouldDiscardRelease = true;
52679 return;
52680 }var model = b.getModel ();
52681 if (!model.isEnabled ()) {
52682 return;
52683 }if (!model.isArmed ()) {
52684 model.setArmed (true);
52685 }model.setPressed (true);
52686 if (!b.hasFocus () && b.isRequestFocusEnabled ()) {
52687 b.requestFocus ();
52688 }}}, "java.awt.event.MouseEvent");
52689 Clazz_overrideMethod (c$, "mouseReleased", 
52690 function (e) {
52691 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52692 if (this.shouldDiscardRelease) {
52693 this.shouldDiscardRelease = false;
52694 return;
52695 }var b = e.getSource ();
52696 if (!(b.getUI ()).verifyButtonClick (true)) return;
52697 var model = b.getModel ();
52698 model.setPressed (false);
52699 model.setArmed (false);
52700 }}, "java.awt.event.MouseEvent");
52701 Clazz_overrideMethod (c$, "mouseEntered", 
52702 function (e) {
52703 var b = e.getSource ();
52704 var model = b.getModel ();
52705 if (b.isRolloverEnabled () && !javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52706 model.setRollover (true);
52707 }if (model.isPressed ()) model.setArmed (true);
52708 }, "java.awt.event.MouseEvent");
52709 Clazz_overrideMethod (c$, "mouseExited", 
52710 function (e) {
52711 var b = e.getSource ();
52712 var model = b.getModel ();
52713 if (b.isRolloverEnabled ()) {
52714 model.setRollover (false);
52715 }model.setArmed (false);
52716 }, "java.awt.event.MouseEvent");
52717 Clazz_pu$h(self.c$);
52718 c$ = Clazz_declareType (swingjs.plaf.JSButtonListener, "Actions", jssun.swing.UIAction);
52719 Clazz_overrideMethod (c$, "actionPerformed", 
52720 function (a) {
52721 var b = a.getSource ();
52722 var c = this.getName ();
52723 if (c === "pressed") {
52724 var d = b.getModel ();
52725 d.setArmed (true);
52726 d.setPressed (true);
52727 if (!b.hasFocus ()) {
52728 b.requestFocus ();
52729 }} else if (c === "released") {
52730 var d = b.getModel ();
52731 d.setPressed (false);
52732 d.setArmed (false);
52733 }}, "java.awt.event.ActionEvent");
52734 Clazz_defineMethod (c$, "isEnabled", 
52735 function (a) {
52736 if (a != null && (Clazz_instanceOf (a, javax.swing.AbstractButton)) && !(a).getModel ().isEnabled ()) {
52737 return false;
52738 } else {
52739 return true;
52740 }}, "~O");
52741 Clazz_defineStatics (c$,
52742 "PRESS", "pressed",
52743 "RELEASE", "released");
52744 c$ = Clazz_p0p ();
52745 });
52746 Clazz_declarePackage ("swingjs.plaf");
52747 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSButtonUI", ["javax.swing.LookAndFeel", "$.UIManager", "javax.swing.plaf.UIResource", "swingjs.api.DOMNode", "swingjs.plaf.JSButtonListener"], function () {
52748 c$ = Clazz_decorateAsClass (function () {
52749 this.domBtn = null;
52750 this.shiftOffset = 0;
52751 this.defaultTextShiftOffset = 0;
52752 Clazz_instantialize (this, arguments);
52753 }, swingjs.plaf, "JSButtonUI", swingjs.plaf.JSComponentUI);
52754 Clazz_overrideMethod (c$, "getDOMObject", 
52755 function () {
52756 if (this.domNode == null) this.domBtn = this.enableNode = this.valueNode = this.domNode = this.createDOMObject ("input", this.id, ["type", "button"]);
52757 this.setCssFont (swingjs.api.DOMNode.setAttr (this.domNode, "value", (this.c).getText ()), this.c.getFont ());
52758 return this.domNode;
52759 });
52760 Clazz_defineMethod (c$, "verifyButtonClick", 
52761 function (isRelease) {
52762 return true;
52763 }, "~B");
52764 Clazz_overrideMethod (c$, "installJSUI", 
52765 function () {
52766 this.installDefaults (this.c);
52767 this.installListeners (this.c);
52768 this.installKeyboardActions (this.c);
52769 });
52770 Clazz_overrideMethod (c$, "uninstallJSUI", 
52771 function () {
52772 this.uninstallKeyboardActions (this.c);
52773 this.uninstallListeners (this.c);
52774 });
52775 Clazz_defineMethod (c$, "installListeners", 
52776 function (b) {
52777 var listener =  new swingjs.plaf.JSButtonListener (b);
52778 if (listener != null) {
52779 b.addMouseListener (listener);
52780 b.addMouseMotionListener (listener);
52781 b.addFocusListener (listener);
52782 b.addPropertyChangeListener (listener);
52783 b.addChangeListener (listener);
52784 }}, "javax.swing.AbstractButton");
52785 Clazz_defineMethod (c$, "uninstallListeners", 
52786 function (b) {
52787 var listener = this.getButtonListener (b);
52788 if (listener != null) {
52789 b.removeMouseListener (listener);
52790 b.removeMouseMotionListener (listener);
52791 b.removeFocusListener (listener);
52792 b.removeChangeListener (listener);
52793 b.removePropertyChangeListener (listener);
52794 }}, "javax.swing.AbstractButton");
52795 Clazz_defineMethod (c$, "installKeyboardActions", 
52796 function (b) {
52797 var listener = this.getButtonListener (b);
52798 if (listener != null) {
52799 listener.installKeyboardActions (b);
52800 }}, "javax.swing.AbstractButton");
52801 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
52802 function (b) {
52803 var listener = this.getButtonListener (b);
52804 if (listener != null) {
52805 listener.uninstallKeyboardActions (b);
52806 }}, "javax.swing.AbstractButton");
52807 Clazz_defineMethod (c$, "getButtonListener", 
52808 function (b) {
52809 var listeners = b.getMouseMotionListeners ();
52810 if (listeners != null) {
52811 for (var counter = 0; counter < listeners.length; counter++) {
52812 if (Clazz_instanceOf (listeners[counter], swingjs.plaf.JSButtonListener)) {
52813 return listeners[counter];
52814 }}
52815 }return null;
52816 }, "javax.swing.AbstractButton");
52817 Clazz_defineMethod (c$, "getPropertyPrefix", 
52818 function () {
52819 return "Button.";
52820 });
52821 Clazz_defineMethod (c$, "installDefaults", 
52822 function (b) {
52823 var pp = this.getPropertyPrefix ();
52824 this.defaultTextShiftOffset = javax.swing.UIManager.getInt (pp + "textShiftOffset");
52825 if (b.getMargin () == null || (Clazz_instanceOf (b.getMargin (), javax.swing.plaf.UIResource))) {
52826 b.setMargin (javax.swing.UIManager.getInsets (pp + "margin"));
52827 }javax.swing.LookAndFeel.installColorsAndFont (b, pp + "background", pp + "foreground", pp + "font");
52828 javax.swing.LookAndFeel.installProperty (b, "iconTextGap",  new Integer (4));
52829 }, "javax.swing.AbstractButton");
52830 });
52831 Clazz_declarePackage ("swingjs.plaf");
52832 Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSToggleButtonUI", ["swingjs.api.DOMNode"], function () {
52833 c$ = Clazz_decorateAsClass (function () {
52834 this.isDomChecked = false;
52835 Clazz_instantialize (this, arguments);
52836 }, swingjs.plaf, "JSToggleButtonUI", swingjs.plaf.JSButtonUI);
52837 Clazz_overrideMethod (c$, "verifyButtonClick", 
52838 function (isRelease) {
52839 var checked = ((swingjs.api.DOMNode.getAttr (this.domBtn, "checked")).booleanValue () === true);
52840 if (isRelease && this.isDomChecked == checked) return false;
52841 this.isDomChecked = checked;
52842 return true;
52843 }, "~B");
52844 Clazz_overrideMethod (c$, "getPropertyPrefix", 
52845 function () {
52846 return "ToggleButton.";
52847 });
52848 });
52849 Clazz_declarePackage ("swingjs.plaf");
52850 Clazz_load (["javax.swing.plaf.ActionMapUIResource"], "swingjs.plaf.LazyActionMap", ["javax.swing.SwingUtilities", "$.UIManager"], function () {
52851 c$ = Clazz_decorateAsClass (function () {
52852 this._loader = null;
52853 Clazz_instantialize (this, arguments);
52854 }, swingjs.plaf, "LazyActionMap", javax.swing.plaf.ActionMapUIResource);
52855 c$.installLazyActionMap = Clazz_defineMethod (c$, "installLazyActionMap", 
52856 function (c, loaderClass, defaultsKey) {
52857 var map = javax.swing.UIManager.get (defaultsKey);
52858 if (map == null) {
52859 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52860 }javax.swing.SwingUtilities.replaceUIActionMap (c, map);
52861 }, "javax.swing.JComponent,Class,~S");
52862 c$.getActionMap = Clazz_defineMethod (c$, "getActionMap", 
52863 function (loaderClass, defaultsKey) {
52864 var map = javax.swing.UIManager.get (defaultsKey);
52865 if (map == null) {
52866 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52867 }return map;
52868 }, "Class,~S");
52869 Clazz_makeConstructor (c$, 
52870  function (loader) {
52871 Clazz_superConstructor (this, swingjs.plaf.LazyActionMap, []);
52872 this._loader = loader;
52873 }, "Class");
52874 Clazz_defineMethod (c$, "put", 
52875 function (action) {
52876 this.put (action.getValue ("Name"), action);
52877 }, "javax.swing.Action");
52878 Clazz_defineMethod (c$, "put", 
52879 function (key, action) {
52880 this.loadIfNecessary ();
52881 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "put", [key, action]);
52882 }, "~O,javax.swing.Action");
52883 Clazz_defineMethod (c$, "get", 
52884 function (key) {
52885 this.loadIfNecessary ();
52886 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "get", [key]);
52887 }, "~O");
52888 Clazz_defineMethod (c$, "remove", 
52889 function (key) {
52890 this.loadIfNecessary ();
52891 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "remove", [key]);
52892 }, "~O");
52893 Clazz_defineMethod (c$, "clear", 
52894 function () {
52895 this.loadIfNecessary ();
52896 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "clear", []);
52897 });
52898 Clazz_defineMethod (c$, "keys", 
52899 function () {
52900 this.loadIfNecessary ();
52901 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "keys", []);
52902 });
52903 Clazz_defineMethod (c$, "size", 
52904 function () {
52905 this.loadIfNecessary ();
52906 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "size", []);
52907 });
52908 Clazz_defineMethod (c$, "allKeys", 
52909 function () {
52910 this.loadIfNecessary ();
52911 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "allKeys", []);
52912 });
52913 Clazz_defineMethod (c$, "setParent", 
52914 function (map) {
52915 this.loadIfNecessary ();
52916 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "setParent", [map]);
52917 }, "javax.swing.ActionMap");
52918 Clazz_defineMethod (c$, "loadIfNecessary", 
52919  function () {
52920 if (this._loader != null) {
52921 {
52922 this._loader.loadActionMap(this);
52923 this._loader = null;
52924 }}});
52925 });
52926 })(Clazz
52927 ,Clazz.getClassName
52928 ,Clazz.newLongArray
52929 ,Clazz.doubleToByte
52930 ,Clazz.doubleToInt
52931 ,Clazz.doubleToLong
52932 ,Clazz.declarePackage
52933 ,Clazz.instanceOf
52934 ,Clazz.load
52935 ,Clazz.instantialize
52936 ,Clazz.decorateAsClass
52937 ,Clazz.floatToInt
52938 ,Clazz.floatToLong
52939 ,Clazz.makeConstructor
52940 ,Clazz.defineEnumConstant
52941 ,Clazz.exceptionOf
52942 ,Clazz.newIntArray
52943 ,Clazz.defineStatics
52944 ,Clazz.newFloatArray
52945 ,Clazz.declareType
52946 ,Clazz.prepareFields
52947 ,Clazz.superConstructor
52948 ,Clazz.newByteArray
52949 ,Clazz.declareInterface
52950 ,Clazz.p0p
52951 ,Clazz.pu$h
52952 ,Clazz.newShortArray
52953 ,Clazz.innerTypeInstance
52954 ,Clazz.isClassDefined
52955 ,Clazz.prepareCallback
52956 ,Clazz.newArray
52957 ,Clazz.castNullAs
52958 ,Clazz.floatToShort
52959 ,Clazz.superCall
52960 ,Clazz.decorateAsType
52961 ,Clazz.newBooleanArray
52962 ,Clazz.newCharArray
52963 ,Clazz.implementOf
52964 ,Clazz.newDoubleArray
52965 ,Clazz.overrideConstructor
52966 ,Clazz.clone
52967 ,Clazz.doubleToShort
52968 ,Clazz.getInheritedLevel
52969 ,Clazz.getParamsType
52970 ,Clazz.isAF
52971 ,Clazz.isAI
52972 ,Clazz.isAS
52973 ,Clazz.isASS
52974 ,Clazz.isAP
52975 ,Clazz.isAFloat
52976 ,Clazz.isAII
52977 ,Clazz.isAFF
52978 ,Clazz.isAFFF
52979 ,Clazz.tryToSearchAndExecute
52980 ,Clazz.getStackTrace
52981 ,Clazz.inheritArgs
52982 ,Clazz.alert
52983 ,Clazz.defineMethod
52984 ,Clazz.overrideMethod
52985 ,Clazz.declareAnonymous
52986 ,Clazz.checkPrivateMethod
52987 ,Clazz.cloneFinals
52988 );