Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / awt / Component.js
1 Clazz.declarePackage ("java.awt");
2 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 () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.threadGroup = null;
5 this.myThread = null;
6 this.peer = null;
7 this.parent = null;
8 this.appContext = null;
9 this.x = 0;
10 this.y = 0;
11 this.width = 0;
12 this.height = 0;
13 this.foreground = null;
14 this.background = null;
15 this.font = null;
16 this.peerFont = null;
17 this.cursor = null;
18 this.locale = null;
19 this.visible = true;
20 this.enabled = true;
21 this.valid = false;
22 this.popups = null;
23 this.name = null;
24 this.nameExplicitlySet = false;
25 this.focusable = true;
26 this.$isFocusTraversableOverridden = 0;
27 this.focusTraversalKeysEnabled = false;
28 this.minSize = null;
29 this.minSizeSet = false;
30 this.prefSize = null;
31 this.prefSizeSet = false;
32 this.maxSize = null;
33 this.maxSizeSet = false;
34 this.componentOrientation = null;
35 this.newEventsOnly = false;
36 this.componentListener = null;
37 this.focusListener = null;
38 this.hierarchyListener = null;
39 this.hierarchyBoundsListener = null;
40 this.keyListener = null;
41 this.mouseListener = null;
42 this.mouseMotionListener = null;
43 this.mouseWheelListener = null;
44 this.inputMethodListener = null;
45 this.windowClosingException = null;
46 this.eventMask = 4096;
47 this.changeSupport = null;
48 this.changeSupportLock = null;
49 this.isPacked = false;
50 this.boundsOp = 3;
51 this.isAddNotifyComplete = false;
52 this.backgroundEraseDisabled = false;
53 this.htmlName = null;
54 this.num = 0;
55 this.graphicsConfig = null;
56 this.eventCache = null;
57 this.coalescingEnabled = false;
58 this.autoFocusTransferOnDisposal = true;
59 Clazz.instantialize (this, arguments);
60 }, java.awt, "Component", null, java.awt.image.ImageObserver);
61 Clazz.prepareFields (c$, function () {
62 this.componentOrientation = java.awt.ComponentOrientation.UNKNOWN;
63 this.changeSupportLock =  new Clazz._O ();
64 this.coalescingEnabled = this.checkCoalescing ();
65 });
66 Clazz.defineMethod (c$, "getAppContext", 
67 function () {
68 return this.appContext;
69 });
70 Clazz.defineMethod (c$, "getChangeSupportLock", 
71  function () {
72 return this.changeSupportLock;
73 });
74 Clazz.defineMethod (c$, "getBoundsOp", 
75 function () {
76 return this.boundsOp;
77 });
78 Clazz.defineMethod (c$, "setBoundsOp", 
79 function (op) {
80 if (op == 5) {
81 this.boundsOp = 3;
82 } else if (this.boundsOp == 3) {
83 this.boundsOp = op;
84 }}, "~N");
85 Clazz.makeConstructor (c$, 
86 function () {
87 this.setAppContext ();
88 });
89 Clazz.defineMethod (c$, "setAppContext", 
90 function () {
91 this.appContext = jssun.awt.AppContext.getAppContext ();
92 this.num = ++java.awt.Component.incr;
93 });
94 Clazz.defineMethod (c$, "getHTMLName", 
95 function (uid) {
96 return (this.htmlName == null ? this.htmlName = this.appContext.getThreadGroup ().getName () + "_" + uid + "_" + this.num : this.htmlName);
97 }, "~S");
98 Clazz.defineMethod (c$, "constructComponentName", 
99 function () {
100 return null;
101 });
102 Clazz.defineMethod (c$, "getName", 
103 function () {
104 if (this.name == null && !this.nameExplicitlySet) {
105 {
106 if (this.name == null && !this.nameExplicitlySet) this.name = this.constructComponentName ();
107 }}return this.name;
108 });
109 Clazz.defineMethod (c$, "setName", 
110 function (name) {
111 var oldName;
112 {
113 oldName = this.name;
114 this.name = name;
115 this.nameExplicitlySet = true;
116 }this.firePropertyChangeObject ("name", oldName, name);
117 }, "~S");
118 Clazz.defineMethod (c$, "getParent", 
119 function () {
120 return this.getParent_NoClientCode ();
121 });
122 Clazz.defineMethod (c$, "getParent_NoClientCode", 
123 function () {
124 return this.parent;
125 });
126 Clazz.defineMethod (c$, "getContainer", 
127 function () {
128 return this.getParent ();
129 });
130 Clazz.defineMethod (c$, "getPeer", 
131 function () {
132 return this.peer;
133 });
134 Clazz.defineMethod (c$, "getGraphicsConfiguration", 
135 function () {
136 return swingjs.JSToolkit.getGraphicsConfiguration ();
137 });
138 Clazz.defineMethod (c$, "resetGC", 
139 function () {
140 });
141 Clazz.defineMethod (c$, "getToolkit", 
142 function () {
143 return this.getToolkitImpl ();
144 });
145 Clazz.defineMethod (c$, "getToolkitImpl", 
146 function () {
147 var peer = this.peer;
148 if ((peer != null) && !(Clazz.instanceOf (peer, java.awt.peer.LightweightPeer))) {
149 return peer.getToolkit ();
150 }var parent = this.parent;
151 if (parent != null) {
152 return parent.getToolkitImpl ();
153 }return java.awt.Toolkit.getDefaultToolkit ();
154 });
155 Clazz.defineMethod (c$, "isValid", 
156 function () {
157 return this.valid;
158 });
159 Clazz.defineMethod (c$, "isDisplayable", 
160 function () {
161 return true;
162 });
163 Clazz.defineMethod (c$, "isVisible", 
164 function () {
165 return this.isVisible_NoClientCode ();
166 });
167 Clazz.defineMethod (c$, "isVisible_NoClientCode", 
168 function () {
169 return this.visible;
170 });
171 Clazz.defineMethod (c$, "isRecursivelyVisible", 
172 function () {
173 return this.visible && (this.parent == null || this.parent.isRecursivelyVisible ());
174 });
175 Clazz.defineMethod (c$, "pointRelativeToComponent", 
176 function (absolute) {
177 var compCoords = this.getLocationOnScreen ();
178 return  new java.awt.Point (absolute.x - compCoords.x, absolute.y - compCoords.y);
179 }, "java.awt.Point");
180 Clazz.defineMethod (c$, "getMousePosition", 
181 function () {
182 return null;
183 });
184 Clazz.defineMethod (c$, "isSameOrAncestorOf", 
185 function (comp, allowChildren) {
186 return comp === this;
187 }, "java.awt.Component,~B");
188 Clazz.defineMethod (c$, "isShowing", 
189 function () {
190 if (this.visible) {
191 var parent = this.parent;
192 return (parent == null) || parent.isShowing ();
193 }return false;
194 });
195 Clazz.defineMethod (c$, "isEnabled", 
196 function () {
197 return this.isEnabledImpl ();
198 });
199 Clazz.defineMethod (c$, "isEnabledImpl", 
200 function () {
201 return this.enabled;
202 });
203 Clazz.defineMethod (c$, "setEnabled", 
204 function (b) {
205 this.enable (b);
206 }, "~B");
207 Clazz.defineMethod (c$, "enable", 
208 function () {
209 if (!this.enabled) {
210 this.enabled = true;
211 var peer = this.peer;
212 if (peer != null) {
213 peer.setEnabled (true);
214 if (this.visible) {
215 this.updateCursorImmediately ();
216 }}}});
217 Clazz.defineMethod (c$, "enable", 
218 function (b) {
219 if (b) {
220 this.enable ();
221 } else {
222 this.disable ();
223 }}, "~B");
224 Clazz.defineMethod (c$, "disable", 
225 function () {
226 if (this.enabled) {
227 this.enabled = false;
228 var peer = this.peer;
229 if (peer != null) {
230 peer.setEnabled (false);
231 if (this.visible) {
232 this.updateCursorImmediately ();
233 }}}});
234 Clazz.defineMethod (c$, "isDoubleBuffered", 
235 function () {
236 return false;
237 });
238 Clazz.defineMethod (c$, "setVisible", 
239 function (b) {
240 this.show (b);
241 }, "~B");
242 Clazz.defineMethod (c$, "show", 
243 function () {
244 if (!this.visible) {
245 this.visible = true;
246 var peer = this.peer;
247 if (peer != null) {
248 peer.setVisible (true);
249 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
250 if (Clazz.instanceOf (peer, java.awt.peer.LightweightPeer)) {
251 this.repaint ();
252 }this.updateCursorImmediately ();
253 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
254 var e =  new java.awt.event.ComponentEvent (this, 102);
255 java.awt.Toolkit.getEventQueue ().postEvent (e);
256 }}var parent = this.parent;
257 if (parent != null) {
258 parent.invalidate ();
259 }});
260 Clazz.defineMethod (c$, "containsFocus", 
261 function () {
262 return this.isFocusOwner ();
263 });
264 Clazz.defineMethod (c$, "clearCurrentFocusCycleRootOnHide", 
265 function () {
266 });
267 Clazz.defineMethod (c$, "hide", 
268 function () {
269 this.isPacked = false;
270 if (this.visible) {
271 this.clearCurrentFocusCycleRootOnHide ();
272 this.visible = false;
273 this.mixOnHiding (this.isLightweight ());
274 var peer = this.peer;
275 if (peer != null) {
276 peer.setVisible (false);
277 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
278 if (Clazz.instanceOf (peer, java.awt.peer.LightweightPeer)) {
279 this.repaint ();
280 }this.updateCursorImmediately ();
281 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
282 var e =  new java.awt.event.ComponentEvent (this, 103);
283 java.awt.Toolkit.getEventQueue ().postEvent (e);
284 }}var parent = this.parent;
285 if (parent != null) {
286 parent.invalidate ();
287 }});
288 Clazz.defineMethod (c$, "getForeground", 
289 function () {
290 var foreground = this.foreground;
291 if (foreground != null) {
292 return foreground;
293 }var parent = this.parent;
294 return (parent != null) ? parent.getForeground () : null;
295 });
296 Clazz.defineMethod (c$, "setForeground", 
297 function (c) {
298 var oldColor = this.foreground;
299 var peer = this.peer;
300 this.foreground = c;
301 if (peer != null) {
302 c = this.getForeground ();
303 if (c != null) {
304 peer.setForeground (c);
305 }}this.firePropertyChangeObject ("foreground", oldColor, c);
306 }, "java.awt.Color");
307 Clazz.defineMethod (c$, "isForegroundSet", 
308 function () {
309 return (this.foreground != null);
310 });
311 Clazz.defineMethod (c$, "getBackground", 
312 function () {
313 var background = this.background;
314 if (background != null) {
315 return background;
316 }var parent = this.parent;
317 return (parent != null) ? parent.getBackground () : null;
318 });
319 Clazz.defineMethod (c$, "setBackground", 
320 function (c) {
321 var oldColor = this.background;
322 var peer = this.peer;
323 this.background = c;
324 if (peer != null) {
325 c = this.getBackground ();
326 if (c != null) {
327 peer.setBackground (c);
328 }}this.firePropertyChangeObject ("background", oldColor, c);
329 }, "java.awt.Color");
330 Clazz.defineMethod (c$, "isBackgroundSet", 
331 function () {
332 return (this.background != null);
333 });
334 Clazz.defineMethod (c$, "getFont", 
335 function () {
336 return this.getFont_NoClientCode ();
337 });
338 Clazz.defineMethod (c$, "getFont_NoClientCode", 
339 function () {
340 var font = this.font;
341 if (font != null) {
342 return font;
343 }var parent = this.parent;
344 return (parent != null) ? parent.getFont_NoClientCode () : null;
345 });
346 Clazz.defineMethod (c$, "setFont", 
347 function (f) {
348 this.setFontComp (f);
349 }, "java.awt.Font");
350 Clazz.defineMethod (c$, "setFontComp", 
351 function (f) {
352 var oldFont;
353 var newFont;
354 oldFont = this.font;
355 newFont = this.font = f;
356 {
357 {
358 }var peer = this.peer;
359 if (peer != null) {
360 f = this.getFont ();
361 if (f != null) {
362 peer.setFont (f);
363 this.peerFont = f;
364 }}}this.firePropertyChangeObject ("font", oldFont, newFont);
365 if (f !== oldFont && (oldFont == null || !oldFont.equals (f))) {
366 this.invalidateIfValid ();
367 }}, "java.awt.Font");
368 Clazz.defineMethod (c$, "isFontSet", 
369 function () {
370 return (this.font != null);
371 });
372 Clazz.defineMethod (c$, "getLocale", 
373 function () {
374 var locale = this.locale;
375 if (locale != null) {
376 return locale;
377 }var parent = this.parent;
378 if (parent == null) {
379 throw  new java.awt.IllegalComponentStateException ("This component must have a parent in order to determine its locale");
380 } else {
381 return parent.getLocale ();
382 }});
383 Clazz.defineMethod (c$, "setLocale", 
384 function (l) {
385 var oldValue = this.locale;
386 this.locale = l;
387 this.firePropertyChangeObject ("locale", oldValue, l);
388 this.invalidateIfValid ();
389 }, "java.util.Locale");
390 Clazz.defineMethod (c$, "getLocation", 
391 function () {
392 return this.location ();
393 });
394 Clazz.defineMethod (c$, "getLocationOnScreen", 
395 function () {
396 return this.getLocationOnScreen_NoTreeLock ();
397 });
398 Clazz.defineMethod (c$, "getLocationOnScreen_NoTreeLock", 
399 function () {
400 if (this.isShowing ()) {
401 if (Clazz.instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
402 var host = this.getNativeContainer ();
403 var pt = host.peer.getLocationOnScreen ();
404 for (var c = this; c !== host; c = c.getParent ()) {
405 pt.x += c.x;
406 pt.y += c.y;
407 }
408 return pt;
409 } else {
410 var pt = this.peer.getLocationOnScreen ();
411 return pt;
412 }} else {
413 throw  new java.awt.IllegalComponentStateException ("component must be showing on the screen to determine its location");
414 }});
415 Clazz.defineMethod (c$, "location", 
416 function () {
417 return this.location_NoClientCode ();
418 });
419 Clazz.defineMethod (c$, "location_NoClientCode", 
420  function () {
421 return  new java.awt.Point (this.x, this.y);
422 });
423 Clazz.defineMethod (c$, "setLocation", 
424 function (x, y) {
425 this.setBoundsOp (1);
426 this.setBounds (x, y, this.width, this.height);
427 }, "~N,~N");
428 Clazz.defineMethod (c$, "setLocation", 
429 function (p) {
430 this.setLocation (p.x, p.y);
431 }, "java.awt.Point");
432 Clazz.defineMethod (c$, "getSize", 
433 function () {
434 return this.size ();
435 });
436 Clazz.defineMethod (c$, "size", 
437 function () {
438 return  new java.awt.Dimension (this.width, this.height);
439 });
440 Clazz.defineMethod (c$, "setSize", 
441 function (width, height) {
442 {
443 if (arguments.length == 1) {
444 var d = arguments[0];
445 width = d.width;
446 height = d.height;
447 }
448 }this.resize (width, height);
449 }, "~N,~N");
450 Clazz.defineMethod (c$, "resize", 
451 function (width, height) {
452 this.setBoundsOp (2);
453 this.setBounds (this.x, this.y, width, height);
454 }, "~N,~N");
455 Clazz.defineMethod (c$, "setBounds", 
456 function (x, y, width, height) {
457 this.reshape (x, y, width, height);
458 }, "~N,~N,~N,~N");
459 Clazz.defineMethod (c$, "setBounds", 
460 function (r) {
461 this.setBounds (r.x, r.y, r.width, r.height);
462 }, "java.awt.Rectangle");
463 Clazz.defineMethod (c$, "reshape", 
464 function (x, y, width, height) {
465 try {
466 this.setBoundsOp (3);
467 var resized = (this.width != width) || (this.height != height);
468 var moved = (this.x != x) || (this.y != y);
469 if (!resized && !moved) {
470 return;
471 }var oldX = this.x;
472 var oldY = this.y;
473 var oldWidth = this.width;
474 var oldHeight = this.height;
475 this.x = x;
476 this.y = y;
477 this.width = width;
478 this.height = height;
479 if (resized) {
480 this.isPacked = false;
481 System.out.println ("C " + swingjs.JSToolkit.getClassName (this) + " resized to " + this.getBounds ());
482 }var needNotify = true;
483 this.mixOnReshaping ();
484 if (this.peer != null) {
485 this.reshapeNativePeer (x, y, width, height, this.getBoundsOp ());
486 resized = (oldWidth != this.width) || (oldHeight != this.height);
487 moved = (oldX != this.x) || (oldY != this.y);
488 if (Clazz.instanceOf (this, java.awt.Window)) {
489 needNotify = false;
490 }if (resized) {
491 this.invalidate ();
492 }if (this.parent != null) {
493 this.parent.invalidateIfValid ();
494 }}if (needNotify) {
495 this.notifyNewBounds (resized, moved);
496 }this.repaintParentIfNeeded (oldX, oldY, oldWidth, oldHeight);
497 } finally {
498 this.setBoundsOp (5);
499 }
500 }, "~N,~N,~N,~N");
501 Clazz.defineMethod (c$, "repaintParentIfNeeded", 
502  function (oldX, oldY, oldWidth, oldHeight) {
503 if (this.parent != null && Clazz.instanceOf (this.peer, java.awt.peer.LightweightPeer) && this.isShowing ()) {
504 this.parent.repaint (oldX, oldY, oldWidth, oldHeight);
505 this.repaint ();
506 }}, "~N,~N,~N,~N");
507 Clazz.defineMethod (c$, "reshapeNativePeer", 
508  function (x, y, width, height, op) {
509 var nativeX = x;
510 var nativeY = y;
511 for (var c = this.parent; (c != null) && (Clazz.instanceOf (c.peer, java.awt.peer.LightweightPeer)); c = c.parent) {
512 nativeX += c.x;
513 nativeY += c.y;
514 }
515 this.peer.setBounds (nativeX, nativeY, width, height, op);
516 }, "~N,~N,~N,~N,~N");
517 Clazz.defineMethod (c$, "notifyNewBounds", 
518  function (resized, moved) {
519 if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
520 if (resized) {
521 var e =  new java.awt.event.ComponentEvent (this, 101);
522 java.awt.Toolkit.getEventQueue ().postEvent (e);
523 }if (moved) {
524 var e =  new java.awt.event.ComponentEvent (this, 100);
525 java.awt.Toolkit.getEventQueue ().postEvent (e);
526 }} else {
527 if (Clazz.instanceOf (this, java.awt.Container) && (this).countComponents () > 0) {
528 var enabledOnToolkit = java.awt.Toolkit.enabledOnToolkit (65536);
529 if (resized) {
530 (this).createChildHierarchyEvents (1402, 0, enabledOnToolkit);
531 }if (moved) {
532 (this).createChildHierarchyEvents (1401, 0, enabledOnToolkit);
533 }}}}, "~B,~B");
534 Clazz.defineMethod (c$, "getX", 
535 function () {
536 return this.x;
537 });
538 Clazz.defineMethod (c$, "getY", 
539 function () {
540 return this.y;
541 });
542 Clazz.defineMethod (c$, "getWidth", 
543 function () {
544 return this.width;
545 });
546 Clazz.defineMethod (c$, "getHeight", 
547 function () {
548 return this.height;
549 });
550 Clazz.defineMethod (c$, "getBounds", 
551 function (rv) {
552 if (rv == null) return  new java.awt.Rectangle (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
553 rv.reshape (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
554 return rv;
555 }, "java.awt.Rectangle");
556 Clazz.defineMethod (c$, "getSize", 
557 function (rv) {
558 if (rv == null) {
559 return  new java.awt.Dimension (this.getWidth (), this.getHeight ());
560 } else {
561 rv.setSize (this.getWidth (), this.getHeight ());
562 return rv;
563 }}, "java.awt.Dimension");
564 Clazz.defineMethod (c$, "getLocation", 
565 function (rv) {
566 if (rv == null) {
567 return  new java.awt.Point (this.getX (), this.getY ());
568 } else {
569 rv.setLocation (this.getX (), this.getY ());
570 return rv;
571 }}, "java.awt.Point");
572 Clazz.defineMethod (c$, "isOpaque", 
573 function () {
574 return true;
575 });
576 Clazz.defineMethod (c$, "isLightweight", 
577 function () {
578 return false;
579 });
580 Clazz.defineMethod (c$, "setPreferredSize", 
581 function (preferredSize) {
582 this.setPrefSizeComp (preferredSize);
583 }, "java.awt.Dimension");
584 Clazz.defineMethod (c$, "setPrefSizeComp", 
585 function (preferredSize) {
586 var old = (this.prefSizeSet ? this.prefSize : null);
587 this.prefSize = preferredSize;
588 this.prefSizeSet = (preferredSize != null);
589 this.firePropertyChangeObject ("preferredSize", old, preferredSize);
590 }, "java.awt.Dimension");
591 Clazz.defineMethod (c$, "isPreferredSizeSet", 
592 function () {
593 return this.prefSizeSet;
594 });
595 Clazz.defineMethod (c$, "getPreferredSize", 
596 function () {
597 return this.preferredSize ();
598 });
599 Clazz.defineMethod (c$, "preferredSize", 
600 function () {
601 return this.prefSizeComp ();
602 });
603 Clazz.defineMethod (c$, "prefSizeComp", 
604 function () {
605 var dim = this.prefSize;
606 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
607 this.prefSize = this.getMinimumSize ();
608 dim = this.prefSize;
609 }return  new java.awt.Dimension (dim);
610 });
611 Clazz.defineMethod (c$, "setMinimumSize", 
612 function (minimumSize) {
613 var old;
614 if (this.minSizeSet) {
615 old = this.minSize;
616 } else {
617 old = null;
618 }this.minSize = minimumSize;
619 this.minSizeSet = (minimumSize != null);
620 this.firePropertyChangeObject ("minimumSize", old, minimumSize);
621 }, "java.awt.Dimension");
622 Clazz.defineMethod (c$, "isMinimumSizeSet", 
623 function () {
624 return this.minSizeSet;
625 });
626 Clazz.defineMethod (c$, "getMinimumSize", 
627 function () {
628 return this.minimumSize ();
629 });
630 Clazz.defineMethod (c$, "minimumSize", 
631 function () {
632 var dim = this.minSize;
633 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
634 this.minSize = this.getSize ();
635 dim = this.minSize;
636 }return  new java.awt.Dimension (dim);
637 });
638 Clazz.defineMethod (c$, "setMaximumSize", 
639 function (maximumSize) {
640 var old;
641 if (this.maxSizeSet) {
642 old = this.maxSize;
643 } else {
644 old = null;
645 }this.maxSize = maximumSize;
646 this.maxSizeSet = (maximumSize != null);
647 this.firePropertyChangeObject ("maximumSize", old, maximumSize);
648 }, "java.awt.Dimension");
649 Clazz.defineMethod (c$, "isMaximumSizeSet", 
650 function () {
651 return this.maxSizeSet;
652 });
653 Clazz.defineMethod (c$, "getMaximumSize", 
654 function () {
655 return this.getMaxSizeComp ();
656 });
657 Clazz.defineMethod (c$, "getMaxSizeComp", 
658 function () {
659 if (this.isMaximumSizeSet ()) {
660 return  new java.awt.Dimension (this.maxSize);
661 }return  new java.awt.Dimension (32767, 32767);
662 });
663 Clazz.defineMethod (c$, "getAlignmentX", 
664 function () {
665 return this.getAlignmentXComp ();
666 });
667 Clazz.defineMethod (c$, "getAlignmentXComp", 
668 function () {
669 return 0.5;
670 });
671 Clazz.defineMethod (c$, "getAlignmentY", 
672 function () {
673 return this.getAlignmentYComp ();
674 });
675 Clazz.defineMethod (c$, "getAlignmentYComp", 
676 function () {
677 return 0.5;
678 });
679 Clazz.defineMethod (c$, "getBaseline", 
680 function (width, height) {
681 if (width < 0 || height < 0) {
682 throw  new IllegalArgumentException ("Width and height must be >= 0");
683 }return -1;
684 }, "~N,~N");
685 Clazz.defineMethod (c$, "getBaselineResizeBehavior", 
686 function () {
687 return java.awt.Component.BaselineResizeBehavior.OTHER;
688 });
689 Clazz.defineMethod (c$, "doLayout", 
690 function () {
691 this.layout ();
692 });
693 Clazz.defineMethod (c$, "layout", 
694 function () {
695 });
696 Clazz.defineMethod (c$, "validate", 
697 function () {
698 this.validateComponent ();
699 });
700 Clazz.defineMethod (c$, "validateComponent", 
701 function () {
702 {
703 var peer = this.peer;
704 var wasValid = this.isValid ();
705 if (!wasValid && peer != null) {
706 var newfont = this.getFont ();
707 var oldfont = this.peerFont;
708 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
709 peer.setFont (newfont);
710 this.peerFont = newfont;
711 }peer.layout ();
712 }this.valid = true;
713 if (!wasValid) {
714 this.mixOnValidating ();
715 }}});
716 Clazz.defineMethod (c$, "invalidate", 
717 function () {
718 this.invalidateComp ();
719 });
720 Clazz.defineMethod (c$, "invalidateComp", 
721 function () {
722 this.valid = false;
723 if (!this.isPreferredSizeSet ()) {
724 this.prefSize = null;
725 }if (!this.isMinimumSizeSet ()) {
726 this.minSize = null;
727 }if (!this.isMaximumSizeSet ()) {
728 this.maxSize = null;
729 }if (this.parent != null) {
730 this.parent.invalidateIfValid ();
731 }});
732 Clazz.defineMethod (c$, "invalidateIfValid", 
733 function () {
734 if (this.isValid ()) {
735 this.invalidate ();
736 }});
737 Clazz.defineMethod (c$, "getGraphics", 
738 function () {
739 if (Clazz.instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
740 if (this.parent == null) return null;
741 var g = this.parent.getGraphics ();
742 if (g == null) return null;
743 g.setFont (this.getFont ());
744 return g;
745 } else {
746 var peer = this.peer;
747 return (peer != null) ? peer.getGraphics () : null;
748 }});
749 Clazz.defineMethod (c$, "getTreeLock", 
750 function () {
751 return this;
752 });
753 Clazz.defineMethod (c$, "getFontMetrics", 
754 function (font) {
755 return jssun.font.FontDesignMetrics.getMetrics (font);
756 }, "java.awt.Font");
757 Clazz.defineMethod (c$, "setCursor", 
758 function (cursor) {
759 this.cursor = cursor;
760 this.updateCursorImmediately ();
761 }, "java.awt.Cursor");
762 Clazz.defineMethod (c$, "updateCursorImmediately", 
763 function () {
764 });
765 Clazz.defineMethod (c$, "getCursor", 
766 function () {
767 return this.getCursor_NoClientCode ();
768 });
769 Clazz.defineMethod (c$, "getCursor_NoClientCode", 
770 function () {
771 var cursor = this.cursor;
772 if (cursor != null) {
773 return cursor;
774 }var parent = this.parent;
775 if (parent != null) {
776 return parent.getCursor_NoClientCode ();
777 } else {
778 return java.awt.Cursor.getPredefinedCursor (0);
779 }});
780 Clazz.defineMethod (c$, "isCursorSet", 
781 function () {
782 return (this.cursor != null);
783 });
784 Clazz.defineMethod (c$, "paint", 
785 function (g) {
786 }, "java.awt.Graphics");
787 Clazz.defineMethod (c$, "update", 
788 function (g) {
789 this.paint (g);
790 }, "java.awt.Graphics");
791 Clazz.defineMethod (c$, "paintAll", 
792 function (g) {
793 }, "java.awt.Graphics");
794 Clazz.defineMethod (c$, "lightweightPaint", 
795 function (g) {
796 this.lwPaintComp (g);
797 }, "java.awt.Graphics");
798 Clazz.defineMethod (c$, "lwPaintComp", 
799 function (g) {
800 this.paint (g);
801 }, "java.awt.Graphics");
802 Clazz.defineMethod (c$, "paintHeavyweightComponents", 
803 function (g) {
804 }, "java.awt.Graphics");
805 Clazz.defineMethod (c$, "repaint", 
806 function () {
807 this.repaintImpl (0, 0, 0, this.width, this.height);
808 });
809 Clazz.defineMethod (c$, "repaint", 
810 function (tm) {
811 this.repaintImpl (tm, 0, 0, this.width, this.height);
812 }, "~N");
813 Clazz.defineMethod (c$, "repaint", 
814 function (x, y, width, height) {
815 this.repaintImpl (0, x, y, width, height);
816 }, "~N,~N,~N,~N");
817 Clazz.defineMethod (c$, "repaint", 
818 function (tm, x, y, width, height) {
819 this.repaintImpl (tm, x, y, width, height);
820 }, "~N,~N,~N,~N,~N");
821 Clazz.defineMethod (c$, "repaintImpl", 
822 function (tm, x, y, width, height) {
823 if (Clazz.instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
824 if (this.parent != null) {
825 var px = this.x + ((x < 0) ? 0 : x);
826 var py = this.y + ((y < 0) ? 0 : y);
827 var pwidth = (width > this.width) ? this.width : width;
828 var pheight = (height > this.height) ? this.height : height;
829 this.parent.repaint (tm, px, py, pwidth, pheight);
830 }} else {
831 if (this.isVisible () && (this.peer != null) && (width > 0) && (height > 0)) {
832 var e =  new java.awt.event.PaintEvent (this, 801,  new java.awt.Rectangle (x, y, width, height));
833 java.awt.Toolkit.getEventQueue ().postEvent (e);
834 }}}, "~N,~N,~N,~N,~N");
835 Clazz.defineMethod (c$, "print", 
836 function (g) {
837 this.paint (g);
838 }, "java.awt.Graphics");
839 Clazz.defineMethod (c$, "printAll", 
840 function (g) {
841 }, "java.awt.Graphics");
842 Clazz.defineMethod (c$, "printHeavyweightComponents", 
843 function (g) {
844 }, "java.awt.Graphics");
845 Clazz.overrideMethod (c$, "imageUpdate", 
846 function (img, infoflags, x, y, w, h) {
847 return false;
848 }, "java.awt.Image,~N,~N,~N,~N,~N");
849 Clazz.defineMethod (c$, "createImage", 
850 function (producer) {
851 return this.getToolkit ().createImage (producer);
852 }, "java.awt.image.ImageProducer");
853 Clazz.defineMethod (c$, "createImage", 
854 function (width, height) {
855 return java.awt.Toolkit.getDefaultToolkit ().createImage (null, width, height);
856 }, "~N,~N");
857 Clazz.defineMethod (c$, "createVolatileImage", 
858 function (width, height) {
859 return null;
860 }, "~N,~N");
861 Clazz.defineMethod (c$, "createVolatileImage", 
862 function (width, height, caps) {
863 return this.createVolatileImage (width, height);
864 }, "~N,~N,java.awt.ImageCapabilities");
865 Clazz.defineMethod (c$, "prepareImage", 
866 function (image, observer) {
867 return this.prepareImage (image, -1, -1, observer);
868 }, "java.awt.Image,java.awt.image.ImageObserver");
869 Clazz.defineMethod (c$, "prepareImage", 
870 function (image, width, height, observer) {
871 return false;
872 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
873 Clazz.defineMethod (c$, "checkImage", 
874 function (image, observer) {
875 return this.checkImage (image, -1, -1, observer);
876 }, "java.awt.Image,java.awt.image.ImageObserver");
877 Clazz.defineMethod (c$, "checkImage", 
878 function (image, width, height, observer) {
879 return 0;
880 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
881 Clazz.defineMethod (c$, "setIgnoreRepaint", 
882 function (ignoreRepaint) {
883 }, "~B");
884 Clazz.defineMethod (c$, "getIgnoreRepaint", 
885 function () {
886 return false;
887 });
888 Clazz.defineMethod (c$, "contains", 
889 function (x, y) {
890 return this.inside (x, y);
891 }, "~N,~N");
892 Clazz.defineMethod (c$, "inside", 
893 function (x, y) {
894 return (x >= 0) && (x < this.width) && (y >= 0) && (y < this.height);
895 }, "~N,~N");
896 Clazz.defineMethod (c$, "getComponentAt", 
897 function (x, y) {
898 return this.locate (x, y);
899 }, "~N,~N");
900 Clazz.defineMethod (c$, "locate", 
901 function (x, y) {
902 return this.contains (x, y) ? this : null;
903 }, "~N,~N");
904 Clazz.defineMethod (c$, "getComponentAt", 
905 function (p) {
906 return this.getComponentAt (p.x, p.y);
907 }, "java.awt.Point");
908 Clazz.defineMethod (c$, "deliverEvent", 
909 function (e) {
910 this.postEvent (e);
911 }, "java.awt.Event");
912 Clazz.defineMethod (c$, "dispatchEvent", 
913 function (e) {
914 this.dispatchEventImpl (e);
915 }, "java.awt.AWTEvent");
916 Clazz.defineMethod (c$, "dispatchEventImpl", 
917 function (e) {
918 this.dispatchEventImplComp (e);
919 }, "java.awt.AWTEvent");
920 Clazz.defineMethod (c$, "dispatchEventImplComp", 
921 function (e) {
922 var id = e.getID ();
923 java.awt.EventQueue.setCurrentEventAndMostRecentTime (e);
924 if (!e.focusManagerIsDispatching) {
925 if (e.isPosted) {
926 e.isPosted = true;
927 }}if (!e.isConsumed ()) {
928 if (Clazz.instanceOf (e, java.awt.event.KeyEvent)) {
929 if (e.isConsumed ()) {
930 return;
931 }}}if (this.areInputMethodsEnabled ()) {
932 if ((Clazz.instanceOf (e, java.awt.event.InputEvent)) || (Clazz.instanceOf (e, java.awt.event.FocusEvent))) {
933 }} else {
934 if (id == 1004) {
935 }}switch (id) {
936 case 401:
937 case 402:
938 var p = ((Clazz.instanceOf (this, java.awt.Container)) ? this : this.parent);
939 if (p != null) {
940 p.preProcessKeyEvent (e);
941 }break;
942 case 201:
943 break;
944 default:
945 break;
946 }
947 if (this.newEventsOnly) {
948 if (this.eventEnabled (e)) {
949 this.processEvent (e);
950 }} else if (id == 507) {
951 this.autoProcessMouseWheel (e);
952 } else if (!(Clazz.instanceOf (e, java.awt.event.MouseEvent) && !this.postsOldMouseEvents ())) {
953 }if (id == 201 && !e.isConsumed ()) {
954 }if (!(Clazz.instanceOf (e, java.awt.event.KeyEvent))) {
955 }}, "java.awt.AWTEvent");
956 Clazz.defineMethod (c$, "autoProcessMouseWheel", 
957 function (e) {
958 }, "java.awt.event.MouseWheelEvent");
959 Clazz.defineMethod (c$, "dispatchMouseWheelToAncestor", 
960 function (e) {
961 var newX;
962 var newY;
963 newX = e.getX () + this.getX ();
964 newY = e.getY () + this.getY ();
965 var newMWE;
966 {
967 var anc = this.getParent ();
968 while (anc != null && !anc.eventEnabled (e)) {
969 newX += anc.getX ();
970 newY += anc.getY ();
971 if (!(Clazz.instanceOf (anc, java.awt.Window))) {
972 anc = anc.getParent ();
973 } else {
974 break;
975 }}
976 if (anc != null && anc.eventEnabled (e)) {
977 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 ());
978 (e).copyPrivateDataInto (newMWE);
979 anc.dispatchEventToSelf (newMWE);
980 }}return true;
981 }, "java.awt.event.MouseWheelEvent");
982 Clazz.defineMethod (c$, "checkWindowClosingException", 
983 function () {
984 if (this.windowClosingException != null) {
985 if (Clazz.instanceOf (this, java.awt.Dialog)) {
986 (this).interruptBlocking ();
987 } else {
988 this.windowClosingException.fillInStackTrace ();
989 this.windowClosingException.printStackTrace ();
990 this.windowClosingException = null;
991 }return true;
992 }return false;
993 });
994 Clazz.defineMethod (c$, "areInputMethodsEnabled", 
995 function () {
996 return ((this.eventMask & 4096) != 0) && ((this.eventMask & 8) != 0 || this.keyListener != null);
997 });
998 Clazz.defineMethod (c$, "eventEnabled", 
999 function (e) {
1000 return this.eventTypeEnabled (e.id);
1001 }, "java.awt.AWTEvent");
1002 Clazz.defineMethod (c$, "eventTypeEnabled", 
1003 function (type) {
1004 switch (type) {
1005 case 100:
1006 case 101:
1007 case 102:
1008 case 103:
1009 if ((this.eventMask & 1) != 0 || this.componentListener != null) {
1010 return true;
1011 }break;
1012 case 1004:
1013 case 1005:
1014 if ((this.eventMask & 4) != 0 || this.focusListener != null) {
1015 return true;
1016 }break;
1017 case 401:
1018 case 402:
1019 case 400:
1020 if ((this.eventMask & 8) != 0 || this.keyListener != null) {
1021 return true;
1022 }break;
1023 case 501:
1024 case 502:
1025 case 504:
1026 case 505:
1027 case 500:
1028 if ((this.eventMask & 16) != 0 || this.mouseListener != null) {
1029 return true;
1030 }break;
1031 case 503:
1032 case 506:
1033 if ((this.eventMask & 32) != 0 || this.mouseMotionListener != null) {
1034 return true;
1035 }break;
1036 case 507:
1037 if ((this.eventMask & 131072) != 0 || this.mouseWheelListener != null) {
1038 return true;
1039 }break;
1040 case 1100:
1041 case 1101:
1042 if ((this.eventMask & 2048) != 0 || this.inputMethodListener != null) {
1043 return true;
1044 }break;
1045 case 1400:
1046 if ((this.eventMask & 32768) != 0 || this.hierarchyListener != null) {
1047 return true;
1048 }break;
1049 case 1401:
1050 case 1402:
1051 if ((this.eventMask & 65536) != 0 || this.hierarchyBoundsListener != null) {
1052 return true;
1053 }break;
1054 case 1001:
1055 if ((this.eventMask & 128) != 0) {
1056 return true;
1057 }break;
1058 case 900:
1059 if ((this.eventMask & 1024) != 0) {
1060 return true;
1061 }break;
1062 case 701:
1063 if ((this.eventMask & 512) != 0) {
1064 return true;
1065 }break;
1066 case 601:
1067 if ((this.eventMask & 256) != 0) {
1068 return true;
1069 }break;
1070 default:
1071 break;
1072 }
1073 if (type > 1999) {
1074 return true;
1075 }return false;
1076 }, "~N");
1077 Clazz.defineMethod (c$, "postEvent", 
1078 function (e) {
1079 if (this.handleEvent (e)) {
1080 e.consume ();
1081 return true;
1082 }var parent = this.parent;
1083 var eventx = e.x;
1084 var eventy = e.y;
1085 if (parent != null) {
1086 e.translate (this.x, this.y);
1087 if (parent.postEvent (e)) {
1088 e.consume ();
1089 return true;
1090 }e.x = eventx;
1091 e.y = eventy;
1092 }return false;
1093 }, "java.awt.Event");
1094 Clazz.defineMethod (c$, "addComponentListener", 
1095 function (l) {
1096 if (l == null) {
1097 return;
1098 }this.componentListener = java.awt.AWTEventMulticaster.add (this.componentListener, l);
1099 this.newEventsOnly = true;
1100 }, "java.awt.event.ComponentListener");
1101 Clazz.defineMethod (c$, "removeComponentListener", 
1102 function (l) {
1103 if (l == null) {
1104 return;
1105 }this.componentListener = java.awt.AWTEventMulticaster.remove (this.componentListener, l);
1106 }, "java.awt.event.ComponentListener");
1107 Clazz.defineMethod (c$, "getComponentListeners", 
1108 function () {
1109 return (this.getListeners (java.awt.event.ComponentListener));
1110 });
1111 Clazz.defineMethod (c$, "addFocusListener", 
1112 function (l) {
1113 if (l == null) {
1114 return;
1115 }this.focusListener = java.awt.AWTEventMulticaster.add (this.focusListener, l);
1116 this.newEventsOnly = true;
1117 }, "java.awt.event.FocusListener");
1118 Clazz.defineMethod (c$, "removeFocusListener", 
1119 function (l) {
1120 if (l == null) {
1121 return;
1122 }this.focusListener = java.awt.AWTEventMulticaster.remove (this.focusListener, l);
1123 }, "java.awt.event.FocusListener");
1124 Clazz.defineMethod (c$, "getFocusListeners", 
1125 function () {
1126 return (this.getListeners (java.awt.event.FocusListener));
1127 });
1128 Clazz.defineMethod (c$, "addHierarchyListener", 
1129 function (l) {
1130 }, "java.awt.event.HierarchyListener");
1131 Clazz.defineMethod (c$, "removeHierarchyListener", 
1132 function (l) {
1133 }, "java.awt.event.HierarchyListener");
1134 Clazz.defineMethod (c$, "getHierarchyListeners", 
1135 function () {
1136 return (this.getListeners (java.awt.event.HierarchyListener));
1137 });
1138 Clazz.defineMethod (c$, "addHierarchyBoundsListener", 
1139 function (l) {
1140 if (l == null) {
1141 return;
1142 }var notifyAncestors;
1143 {
1144 notifyAncestors = (this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0);
1145 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.add (this.hierarchyBoundsListener, l);
1146 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener != null);
1147 this.newEventsOnly = true;
1148 }if (notifyAncestors) {
1149 {
1150 this.adjustListeningChildrenOnParent (65536, 1);
1151 }}}, "java.awt.event.HierarchyBoundsListener");
1152 Clazz.defineMethod (c$, "removeHierarchyBoundsListener", 
1153 function (l) {
1154 if (l == null) {
1155 return;
1156 }var notifyAncestors;
1157 {
1158 notifyAncestors = (this.hierarchyBoundsListener != null && (this.eventMask & 65536) == 0);
1159 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.remove (this.hierarchyBoundsListener, l);
1160 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener == null);
1161 }if (notifyAncestors) {
1162 {
1163 this.adjustListeningChildrenOnParent (65536, -1);
1164 }}}, "java.awt.event.HierarchyBoundsListener");
1165 Clazz.defineMethod (c$, "numListening", 
1166 function (mask) {
1167 return this.numListeningMask (mask);
1168 }, "~N");
1169 Clazz.defineMethod (c$, "numListeningMask", 
1170 function (mask) {
1171 if ((mask == 32768 && (this.hierarchyListener != null || (this.eventMask & 32768) != 0)) || (mask == 65536 && (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0))) {
1172 return 1;
1173 } else {
1174 return 0;
1175 }}, "~N");
1176 Clazz.defineMethod (c$, "countHierarchyMembers", 
1177 function () {
1178 return 1;
1179 });
1180 Clazz.defineMethod (c$, "createHierarchyEvents", 
1181 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
1182 return this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
1183 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
1184 Clazz.defineMethod (c$, "createHierEventsComp", 
1185 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
1186 switch (id) {
1187 case 1400:
1188 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || enabledOnToolkit) {
1189 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent, changeFlags);
1190 this.dispatchEvent (e);
1191 return 1;
1192 }break;
1193 case 1401:
1194 case 1402:
1195 if (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0 || enabledOnToolkit) {
1196 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent);
1197 this.dispatchEvent (e);
1198 return 1;
1199 }break;
1200 default:
1201 break;
1202 }
1203 return 0;
1204 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
1205 Clazz.defineMethod (c$, "getHierarchyBoundsListeners", 
1206 function () {
1207 return (this.getListeners (java.awt.event.HierarchyBoundsListener));
1208 });
1209 Clazz.defineMethod (c$, "adjustListeningChildrenOnParent", 
1210 function (mask, num) {
1211 if (this.parent != null) {
1212 this.parent.adjustListeningChildren (mask, num);
1213 }}, "~N,~N");
1214 Clazz.defineMethod (c$, "addKeyListener", 
1215 function (l) {
1216 if (l == null) {
1217 return;
1218 }this.keyListener = java.awt.AWTEventMulticaster.add (this.keyListener, l);
1219 this.newEventsOnly = true;
1220 }, "java.awt.event.KeyListener");
1221 Clazz.defineMethod (c$, "removeKeyListener", 
1222 function (l) {
1223 if (l == null) {
1224 return;
1225 }this.keyListener = java.awt.AWTEventMulticaster.remove (this.keyListener, l);
1226 }, "java.awt.event.KeyListener");
1227 Clazz.defineMethod (c$, "getKeyListeners", 
1228 function () {
1229 return (this.getListeners (java.awt.event.KeyListener));
1230 });
1231 Clazz.defineMethod (c$, "addMouseListener", 
1232 function (l) {
1233 if (l == null) {
1234 return;
1235 }System.out.println ("C adding mouse listener " + l);
1236 this.mouseListener = java.awt.AWTEventMulticaster.add (this.mouseListener, l);
1237 this.newEventsOnly = true;
1238 }, "java.awt.event.MouseListener");
1239 Clazz.defineMethod (c$, "removeMouseListener", 
1240 function (l) {
1241 if (l == null) {
1242 return;
1243 }this.mouseListener = java.awt.AWTEventMulticaster.remove (this.mouseListener, l);
1244 }, "java.awt.event.MouseListener");
1245 Clazz.defineMethod (c$, "getMouseListeners", 
1246 function () {
1247 return (this.getListeners (java.awt.event.MouseListener));
1248 });
1249 Clazz.defineMethod (c$, "addMouseMotionListener", 
1250 function (l) {
1251 if (l == null) {
1252 return;
1253 }this.mouseMotionListener = java.awt.AWTEventMulticaster.add (this.mouseMotionListener, l);
1254 this.newEventsOnly = true;
1255 }, "java.awt.event.MouseMotionListener");
1256 Clazz.defineMethod (c$, "removeMouseMotionListener", 
1257 function (l) {
1258 if (l == null) {
1259 return;
1260 }this.mouseMotionListener = java.awt.AWTEventMulticaster.remove (this.mouseMotionListener, l);
1261 }, "java.awt.event.MouseMotionListener");
1262 Clazz.defineMethod (c$, "getMouseMotionListeners", 
1263 function () {
1264 return (this.getListeners (java.awt.event.MouseMotionListener));
1265 });
1266 Clazz.defineMethod (c$, "addMouseWheelListener", 
1267 function (l) {
1268 if (l == null) {
1269 return;
1270 }this.mouseWheelListener = java.awt.AWTEventMulticaster.add (this.mouseWheelListener, l);
1271 this.newEventsOnly = true;
1272 }, "java.awt.event.MouseWheelListener");
1273 Clazz.defineMethod (c$, "removeMouseWheelListener", 
1274 function (l) {
1275 if (l == null) {
1276 return;
1277 }this.mouseWheelListener = java.awt.AWTEventMulticaster.remove (this.mouseWheelListener, l);
1278 }, "java.awt.event.MouseWheelListener");
1279 Clazz.defineMethod (c$, "getMouseWheelListeners", 
1280 function () {
1281 return (this.getListeners (java.awt.event.MouseWheelListener));
1282 });
1283 Clazz.defineMethod (c$, "addInputMethodListener", 
1284 function (l) {
1285 if (l == null) {
1286 return;
1287 }this.inputMethodListener = java.awt.AWTEventMulticaster.add (this.inputMethodListener, l);
1288 this.newEventsOnly = true;
1289 }, "java.awt.event.InputMethodListener");
1290 Clazz.defineMethod (c$, "removeInputMethodListener", 
1291 function (l) {
1292 if (l == null) {
1293 return;
1294 }this.inputMethodListener = java.awt.AWTEventMulticaster.remove (this.inputMethodListener, l);
1295 }, "java.awt.event.InputMethodListener");
1296 Clazz.defineMethod (c$, "getInputMethodListeners", 
1297 function () {
1298 return (this.getListeners (java.awt.event.InputMethodListener));
1299 });
1300 Clazz.defineMethod (c$, "getListeners", 
1301 function (listenerType) {
1302 return this.getListenersComp (listenerType);
1303 }, "Class");
1304 Clazz.defineMethod (c$, "getListenersComp", 
1305 function (listenerType) {
1306 var l = null;
1307 if (listenerType === java.awt.event.ComponentListener) {
1308 l = this.componentListener;
1309 } else if (listenerType === java.awt.event.FocusListener) {
1310 l = this.focusListener;
1311 } else if (listenerType === java.awt.event.HierarchyListener) {
1312 l = this.hierarchyListener;
1313 } else if (listenerType === java.awt.event.HierarchyBoundsListener) {
1314 l = this.hierarchyBoundsListener;
1315 } else if (listenerType === java.awt.event.KeyListener) {
1316 l = this.keyListener;
1317 } else if (listenerType === java.awt.event.MouseListener) {
1318 l = this.mouseListener;
1319 } else if (listenerType === java.awt.event.MouseMotionListener) {
1320 l = this.mouseMotionListener;
1321 } else if (listenerType === java.awt.event.MouseWheelListener) {
1322 l = this.mouseWheelListener;
1323 } else if (listenerType === java.awt.event.InputMethodListener) {
1324 l = this.inputMethodListener;
1325 } else if (listenerType === java.beans.PropertyChangeListener) {
1326 return this.getPropertyChangeListeners ();
1327 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
1328 }, "Class");
1329 Clazz.defineMethod (c$, "enableEvents", 
1330 function (eventsToEnable) {
1331 var notifyAncestors = 0;
1332 {
1333 if ((eventsToEnable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) == 0) {
1334 notifyAncestors |= 32768;
1335 }if ((eventsToEnable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0) {
1336 notifyAncestors |= 65536;
1337 }this.eventMask |= eventsToEnable;
1338 this.newEventsOnly = true;
1339 }if (Clazz.instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
1340 this.parent.proxyEnableEvents (this.eventMask);
1341 }if (notifyAncestors != 0) {
1342 {
1343 this.adjustListeningChildrenOnParent (notifyAncestors, 1);
1344 }}}, "~N");
1345 Clazz.defineMethod (c$, "disableEvents", 
1346 function (eventsToDisable) {
1347 var notifyAncestors = 0;
1348 {
1349 if ((eventsToDisable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) != 0) {
1350 notifyAncestors |= 32768;
1351 }if ((eventsToDisable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) != 0) {
1352 notifyAncestors |= 65536;
1353 }this.eventMask &= ~eventsToDisable;
1354 }if (notifyAncestors != 0) {
1355 {
1356 this.adjustListeningChildrenOnParent (notifyAncestors, -1);
1357 }}}, "~N");
1358 Clazz.defineMethod (c$, "checkCoalescing", 
1359  function () {
1360 if (this.getClass ().getClassLoader () == null) {
1361 return false;
1362 }var clazz = this.getClass ();
1363 {
1364 var value = java.awt.Component.coalesceMap.get (clazz);
1365 if (value != null) {
1366 return value;
1367 }var enabled = Boolean.$valueOf (swingjs.JSToolkit.checkClassMethod (this, "coalesceEvents", "\\java.awt.AWTEvent\\java.awt.AWTEvent"));
1368 java.awt.Component.coalesceMap.put (clazz, enabled);
1369 return enabled;
1370 }});
1371 Clazz.defineMethod (c$, "isCoalescingEnabled", 
1372 function () {
1373 return this.coalescingEnabled;
1374 });
1375 Clazz.defineMethod (c$, "coalesceEvents", 
1376 function (existingEvent, newEvent) {
1377 return null;
1378 }, "java.awt.AWTEvent,java.awt.AWTEvent");
1379 Clazz.defineMethod (c$, "processEvent", 
1380 function (e) {
1381 this.processEventComp (e);
1382 }, "java.awt.AWTEvent");
1383 Clazz.defineMethod (c$, "processEventComp", 
1384 function (e) {
1385 if (Clazz.instanceOf (e, java.awt.event.FocusEvent)) {
1386 this.processFocusEvent (e);
1387 } else if (Clazz.instanceOf (e, java.awt.event.MouseEvent)) {
1388 switch (e.getID ()) {
1389 case 501:
1390 case 502:
1391 case 500:
1392 case 504:
1393 case 505:
1394 this.processMouseEvent (e);
1395 break;
1396 case 503:
1397 case 506:
1398 this.processMouseMotionEvent (e);
1399 break;
1400 case 507:
1401 this.processMouseWheelEvent (e);
1402 break;
1403 }
1404 } else if (Clazz.instanceOf (e, java.awt.event.KeyEvent)) {
1405 this.processKeyEvent (e);
1406 } else if (Clazz.instanceOf (e, java.awt.event.ComponentEvent)) {
1407 this.processComponentEvent (e);
1408 } else if (Clazz.instanceOf (e, java.awt.event.InputMethodEvent)) {
1409 this.processInputMethodEvent (e);
1410 } else if (Clazz.instanceOf (e, java.awt.event.HierarchyEvent)) {
1411 switch (e.getID ()) {
1412 case 1400:
1413 this.processHierarchyEvent (e);
1414 break;
1415 case 1401:
1416 case 1402:
1417 this.processHierarchyBoundsEvent (e);
1418 break;
1419 }
1420 }}, "java.awt.AWTEvent");
1421 Clazz.defineMethod (c$, "processComponentEvent", 
1422 function (e) {
1423 var listener = this.componentListener;
1424 if (listener != null) {
1425 var id = e.getID ();
1426 switch (id) {
1427 case 101:
1428 listener.componentResized (e);
1429 break;
1430 case 100:
1431 listener.componentMoved (e);
1432 break;
1433 case 102:
1434 listener.componentShown (e);
1435 break;
1436 case 103:
1437 listener.componentHidden (e);
1438 break;
1439 }
1440 }}, "java.awt.event.ComponentEvent");
1441 Clazz.defineMethod (c$, "processFocusEvent", 
1442 function (e) {
1443 var listener = this.focusListener;
1444 if (listener != null) {
1445 var id = e.getID ();
1446 switch (id) {
1447 case 1004:
1448 listener.focusGained (e);
1449 break;
1450 case 1005:
1451 listener.focusLost (e);
1452 break;
1453 }
1454 }}, "java.awt.event.FocusEvent");
1455 Clazz.defineMethod (c$, "processKeyEvent", 
1456 function (e) {
1457 var listener = this.keyListener;
1458 if (listener != null) {
1459 var id = e.getID ();
1460 switch (id) {
1461 case 400:
1462 listener.keyTyped (e);
1463 break;
1464 case 401:
1465 listener.keyPressed (e);
1466 break;
1467 case 402:
1468 listener.keyReleased (e);
1469 break;
1470 }
1471 }}, "java.awt.event.KeyEvent");
1472 Clazz.defineMethod (c$, "processMouseEvent", 
1473 function (e) {
1474 var listener = this.mouseListener;
1475 if (listener != null) {
1476 var id = e.getID ();
1477 switch (id) {
1478 case 501:
1479 listener.mousePressed (e);
1480 break;
1481 case 502:
1482 listener.mouseReleased (e);
1483 break;
1484 case 500:
1485 listener.mouseClicked (e);
1486 break;
1487 case 505:
1488 listener.mouseExited (e);
1489 break;
1490 case 504:
1491 listener.mouseEntered (e);
1492 break;
1493 }
1494 }}, "java.awt.event.MouseEvent");
1495 Clazz.defineMethod (c$, "processMouseMotionEvent", 
1496 function (e) {
1497 var listener = this.mouseMotionListener;
1498 if (listener != null) {
1499 var id = e.getID ();
1500 switch (id) {
1501 case 503:
1502 listener.mouseMoved (e);
1503 break;
1504 case 506:
1505 listener.mouseDragged (e);
1506 break;
1507 }
1508 }}, "java.awt.event.MouseEvent");
1509 Clazz.defineMethod (c$, "processMouseWheelEvent", 
1510 function (e) {
1511 var listener = this.mouseWheelListener;
1512 if (listener != null) {
1513 var id = e.getID ();
1514 switch (id) {
1515 case 507:
1516 listener.mouseWheelMoved (e);
1517 break;
1518 }
1519 }}, "java.awt.event.MouseWheelEvent");
1520 Clazz.defineMethod (c$, "postsOldMouseEvents", 
1521 function () {
1522 return false;
1523 });
1524 Clazz.defineMethod (c$, "processInputMethodEvent", 
1525 function (e) {
1526 var listener = this.inputMethodListener;
1527 if (listener != null) {
1528 var id = e.getID ();
1529 switch (id) {
1530 case 1100:
1531 listener.inputMethodTextChanged (e);
1532 break;
1533 case 1101:
1534 listener.caretPositionChanged (e);
1535 break;
1536 }
1537 }}, "java.awt.event.InputMethodEvent");
1538 Clazz.defineMethod (c$, "processHierarchyEvent", 
1539 function (e) {
1540 var listener = this.hierarchyListener;
1541 if (listener != null) {
1542 var id = e.getID ();
1543 switch (id) {
1544 case 1400:
1545 listener.hierarchyChanged (e);
1546 break;
1547 }
1548 }}, "java.awt.event.HierarchyEvent");
1549 Clazz.defineMethod (c$, "processHierarchyBoundsEvent", 
1550 function (e) {
1551 var listener = this.hierarchyBoundsListener;
1552 if (listener != null) {
1553 var id = e.getID ();
1554 switch (id) {
1555 case 1401:
1556 listener.ancestorMoved (e);
1557 break;
1558 case 1402:
1559 listener.ancestorResized (e);
1560 break;
1561 }
1562 }}, "java.awt.event.HierarchyEvent");
1563 Clazz.defineMethod (c$, "handleEvent", 
1564 function (evt) {
1565 switch (evt.id) {
1566 case 504:
1567 return this.mouseEnter (evt, evt.x, evt.y);
1568 case 505:
1569 return this.mouseExit (evt, evt.x, evt.y);
1570 case 503:
1571 return this.mouseMove (evt, evt.x, evt.y);
1572 case 501:
1573 return this.mouseDown (evt, evt.x, evt.y);
1574 case 506:
1575 return this.mouseDrag (evt, evt.x, evt.y);
1576 case 502:
1577 return this.mouseUp (evt, evt.x, evt.y);
1578 case 401:
1579 case 403:
1580 return this.keyDown (evt, evt.key);
1581 case 402:
1582 case 404:
1583 return this.keyUp (evt, evt.key);
1584 case 1001:
1585 return this.action (evt, evt.arg);
1586 case 1004:
1587 return this.gotFocus (evt, evt.arg);
1588 case 1005:
1589 return this.lostFocus (evt, evt.arg);
1590 }
1591 return false;
1592 }, "java.awt.Event");
1593 Clazz.defineMethod (c$, "mouseDown", 
1594 function (evt, x, y) {
1595 return false;
1596 }, "java.awt.Event,~N,~N");
1597 Clazz.defineMethod (c$, "mouseDrag", 
1598 function (evt, x, y) {
1599 return false;
1600 }, "java.awt.Event,~N,~N");
1601 Clazz.defineMethod (c$, "mouseUp", 
1602 function (evt, x, y) {
1603 return false;
1604 }, "java.awt.Event,~N,~N");
1605 Clazz.defineMethod (c$, "mouseMove", 
1606 function (evt, x, y) {
1607 return false;
1608 }, "java.awt.Event,~N,~N");
1609 Clazz.defineMethod (c$, "mouseEnter", 
1610 function (evt, x, y) {
1611 return false;
1612 }, "java.awt.Event,~N,~N");
1613 Clazz.defineMethod (c$, "mouseExit", 
1614 function (evt, x, y) {
1615 return false;
1616 }, "java.awt.Event,~N,~N");
1617 Clazz.defineMethod (c$, "keyDown", 
1618 function (evt, key) {
1619 return false;
1620 }, "java.awt.Event,~N");
1621 Clazz.defineMethod (c$, "keyUp", 
1622 function (evt, key) {
1623 return false;
1624 }, "java.awt.Event,~N");
1625 Clazz.defineMethod (c$, "action", 
1626 function (evt, what) {
1627 return false;
1628 }, "java.awt.Event,~O");
1629 Clazz.defineMethod (c$, "addNotify", 
1630 function () {
1631 this.addNotifyComp ();
1632 });
1633 Clazz.defineMethod (c$, "addNotifyComp", 
1634 function () {
1635 {
1636 var peer = this.peer;
1637 if (peer == null || Clazz.instanceOf (peer, java.awt.peer.LightweightPeer)) {
1638 if (peer == null) {
1639 this.peer = peer = this.getToolkit ().createComponent (this);
1640 }if (this.parent != null) {
1641 var mask = 0;
1642 if ((this.mouseListener != null) || ((this.eventMask & 16) != 0)) {
1643 mask |= 16;
1644 }if ((this.mouseMotionListener != null) || ((this.eventMask & 32) != 0)) {
1645 mask |= 32;
1646 }if ((this.mouseWheelListener != null) || ((this.eventMask & 131072) != 0)) {
1647 mask |= 131072;
1648 }if (this.focusListener != null || (this.eventMask & 4) != 0) {
1649 mask |= 4;
1650 }if (this.keyListener != null || (this.eventMask & 8) != 0) {
1651 mask |= 8;
1652 }if (mask != 0) {
1653 this.parent.proxyEnableEvents (mask);
1654 }}} else {
1655 var parent = this.parent;
1656 if (parent != null && Clazz.instanceOf (parent.peer, java.awt.peer.LightweightPeer)) {
1657 this.relocateComponent ();
1658 }}this.invalidate ();
1659 this.peerFont = this.getFont ();
1660 if (this.getContainer () != null && !this.isAddNotifyComplete) {
1661 this.getContainer ().increaseComponentCount (this);
1662 }if (this.parent != null && this.parent.peer != null) {
1663 var parentContPeer = this.parent.peer;
1664 if (Clazz.instanceOf (parentContPeer, java.awt.peer.LightweightPeer) && !(Clazz.instanceOf (peer, java.awt.peer.LightweightPeer))) {
1665 var hwParent = this.getNativeContainer ();
1666 if (hwParent != null && hwParent.peer != null) {
1667 parentContPeer = hwParent.peer;
1668 }}}if (!this.isAddNotifyComplete) {
1669 this.mixOnShowing ();
1670 }this.isAddNotifyComplete = true;
1671 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
1672 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
1673 this.dispatchEvent (e);
1674 }}});
1675 Clazz.defineMethod (c$, "getNativeContainer", 
1676 function () {
1677 var p = this.parent;
1678 while (p != null && Clazz.instanceOf (p.peer, java.awt.peer.LightweightPeer)) {
1679 p = p.getParent ();
1680 }
1681 return p;
1682 });
1683 Clazz.defineMethod (c$, "removeNotify", 
1684 function () {
1685 this.removeNotifyComp ();
1686 });
1687 Clazz.defineMethod (c$, "removeNotifyComp", 
1688 function () {
1689 {
1690 if (this.getContainer () != null && this.isAddNotifyComplete) {
1691 this.getContainer ().decreaseComponentCount (this);
1692 }var p = this.peer;
1693 if (p != null) {
1694 var isLightweight = this.isLightweight ();
1695 this.peer = null;
1696 this.peerFont = null;
1697 java.awt.Toolkit.getEventQueue ().removeSourceEvents (this, false);
1698 p.dispose ();
1699 this.mixOnHiding (isLightweight);
1700 this.isAddNotifyComplete = false;
1701 }if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
1702 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
1703 this.dispatchEvent (e);
1704 }}});
1705 Clazz.defineMethod (c$, "gotFocus", 
1706 function (evt, what) {
1707 return false;
1708 }, "java.awt.Event,~O");
1709 Clazz.defineMethod (c$, "lostFocus", 
1710 function (evt, what) {
1711 return false;
1712 }, "java.awt.Event,~O");
1713 Clazz.defineMethod (c$, "isFocusTraversable", 
1714 function () {
1715 if (this.$isFocusTraversableOverridden == 0) {
1716 this.$isFocusTraversableOverridden = 1;
1717 }return this.focusable;
1718 });
1719 Clazz.defineMethod (c$, "isFocusable", 
1720 function () {
1721 return this.isFocusTraversable ();
1722 });
1723 Clazz.defineMethod (c$, "setFocusable", 
1724 function (focusable) {
1725 var oldFocusable;
1726 {
1727 oldFocusable = this.focusable;
1728 this.focusable = focusable;
1729 }this.$isFocusTraversableOverridden = 2;
1730 this.firePropertyChangeObject ("focusable", new Boolean (oldFocusable), new Boolean (focusable));
1731 }, "~B");
1732 Clazz.defineMethod (c$, "isFocusTraversableOverridden", 
1733 function () {
1734 return (this.$isFocusTraversableOverridden != 1);
1735 });
1736 Clazz.defineMethod (c$, "getFocusTraversalKeysEnabled", 
1737 function () {
1738 return this.focusTraversalKeysEnabled;
1739 });
1740 Clazz.defineMethod (c$, "requestFocus", 
1741 function () {
1742 swingjs.JSToolkit.requestFocus (this);
1743 });
1744 Clazz.defineMethod (c$, "requestFocus", 
1745 function (temporary) {
1746 return swingjs.JSToolkit.requestFocus (this);
1747 }, "~B");
1748 Clazz.defineMethod (c$, "requestFocusInWindow", 
1749 function () {
1750 return swingjs.JSToolkit.requestFocus (this);
1751 });
1752 Clazz.defineMethod (c$, "requestFocusInWindow", 
1753 function (temporary) {
1754 return swingjs.JSToolkit.requestFocus (this);
1755 }, "~B");
1756 Clazz.defineMethod (c$, "getFocusCycleRootAncestor", 
1757 function () {
1758 var rootAncestor = this.parent;
1759 while (rootAncestor != null && !rootAncestor.isFocusCycleRoot ()) {
1760 rootAncestor = rootAncestor.parent;
1761 }
1762 return rootAncestor;
1763 });
1764 Clazz.defineMethod (c$, "isFocusCycleRoot", 
1765 function (container) {
1766 return this.isFocusCycleRootComp (container);
1767 }, "java.awt.Container");
1768 Clazz.defineMethod (c$, "isFocusCycleRootComp", 
1769 function (container) {
1770 var rootAncestor = this.getFocusCycleRootAncestor ();
1771 return (rootAncestor === container);
1772 }, "java.awt.Container");
1773 Clazz.defineMethod (c$, "hasFocus", 
1774 function () {
1775 return swingjs.JSToolkit.hasFocus (this);
1776 });
1777 Clazz.defineMethod (c$, "isFocusOwner", 
1778 function () {
1779 return this.hasFocus ();
1780 });
1781 Clazz.defineMethod (c$, "setAutoFocusTransferOnDisposal", 
1782 function (value) {
1783 this.autoFocusTransferOnDisposal = value;
1784 }, "~B");
1785 Clazz.defineMethod (c$, "isAutoFocusTransferOnDisposal", 
1786 function () {
1787 return this.autoFocusTransferOnDisposal;
1788 });
1789 Clazz.defineMethod (c$, "paramString", 
1790 function () {
1791 return this.paramStringComp ();
1792 });
1793 Clazz.defineMethod (c$, "paramStringComp", 
1794 function () {
1795 var thisName = this.getName ();
1796 var str = (thisName != null ? thisName : "");
1797 if (!this.isValid ()) {
1798 str += ",invalid";
1799 }if (!this.visible) {
1800 str += ",hidden";
1801 }if (!this.enabled) {
1802 str += ",disabled";
1803 }str += ",parent:" + (this.parent == null ? null : this.parent.getName ()) + "," + this.x + "," + this.y + "," + this.width + "x" + this.height;
1804 return str;
1805 });
1806 Clazz.overrideMethod (c$, "toString", 
1807 function () {
1808 return this.getClass ().getName () + "[" + this.paramString () + "]";
1809 });
1810 Clazz.defineMethod (c$, "addPropertyChangeListener", 
1811 function (listener) {
1812 this.addPropChangeListenerComp (listener);
1813 }, "java.beans.PropertyChangeListener");
1814 Clazz.defineMethod (c$, "addPropChangeListenerComp", 
1815 function (listener) {
1816 {
1817 if (listener == null) {
1818 return;
1819 }if (this.changeSupport == null) {
1820 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
1821 }this.changeSupport.addPropertyChangeListener1 (listener);
1822 }}, "java.beans.PropertyChangeListener");
1823 Clazz.defineMethod (c$, "removePropertyChangeListener", 
1824 function (listener) {
1825 {
1826 if (listener == null || this.changeSupport == null) {
1827 return;
1828 }this.changeSupport.removePropertyChangeListener (listener);
1829 }}, "java.beans.PropertyChangeListener");
1830 Clazz.defineMethod (c$, "getPropertyChangeListeners", 
1831 function () {
1832 {
1833 if (this.changeSupport == null) {
1834 return  new Array (0);
1835 }return this.changeSupport.getPropertyChangeListeners ();
1836 }});
1837 Clazz.defineMethod (c$, "addPropertyChangeListener", 
1838 function (propertyName, listener) {
1839 this.addPropChangeListComp (propertyName, listener);
1840 }, "~S,java.beans.PropertyChangeListener");
1841 Clazz.defineMethod (c$, "addPropChangeListComp", 
1842 function (propertyName, listener) {
1843 {
1844 if (arguments.length == 1) {
1845 addPropertyChangeListener1(propertyName); return; }
1846 }{
1847 if (listener == null) {
1848 return;
1849 }if (this.changeSupport == null) {
1850 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
1851 }this.changeSupport.addPropertyChangeListener2 (propertyName, listener);
1852 }}, "~S,java.beans.PropertyChangeListener");
1853 Clazz.defineMethod (c$, "removePropertyChangeListener", 
1854 function (propertyName, listener) {
1855 {
1856 if (listener == null || this.changeSupport == null) {
1857 return;
1858 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
1859 }}, "~S,java.beans.PropertyChangeListener");
1860 Clazz.defineMethod (c$, "getPropertyChangeListeners", 
1861 function (propertyName) {
1862 {
1863 if (this.changeSupport == null) {
1864 return  new Array (0);
1865 }return this.changeSupport.getPropertyChangeListeners (propertyName);
1866 }}, "~S");
1867 Clazz.defineMethod (c$, "firePropertyChange", 
1868 function (propertyName, oldValue, newValue) {
1869 this.firePropertyChangeObject (propertyName, oldValue, newValue);
1870 }, "~S,~O,~O");
1871 Clazz.defineMethod (c$, "firePropertyChangeObject", 
1872 function (propertyName, oldValue, newValue) {
1873 var changeSupport;
1874 {
1875 changeSupport = this.changeSupport;
1876 }if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
1877 return;
1878 }changeSupport.firePropertyChange (propertyName, oldValue, newValue);
1879 }, "~S,~O,~O");
1880 Clazz.defineMethod (c$, "firePropertyChange", 
1881 function (propertyName, oldValue, newValue) {
1882 this.firePropertyChangeBool (propertyName, oldValue, newValue);
1883 }, "~S,~B,~B");
1884 Clazz.defineMethod (c$, "firePropertyChangeBool", 
1885 function (propertyName, oldValue, newValue) {
1886 var changeSupport = this.changeSupport;
1887 if (changeSupport == null || oldValue == newValue) {
1888 return;
1889 }changeSupport.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
1890 }, "~S,~B,~B");
1891 Clazz.defineMethod (c$, "firePropertyChange", 
1892 function (propertyName, oldValue, newValue) {
1893 this.firePropertyChangeInt (propertyName, oldValue, newValue);
1894 }, "~S,~N,~N");
1895 Clazz.defineMethod (c$, "firePropertyChangeInt", 
1896 function (propertyName, oldValue, newValue) {
1897 var changeSupport = this.changeSupport;
1898 if (changeSupport == null || oldValue == newValue) {
1899 return;
1900 }changeSupport.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
1901 }, "~S,~N,~N");
1902 Clazz.defineMethod (c$, "firePropertyChange", 
1903 function (propertyName, oldValue, newValue) {
1904 this.firePropertyChangeChar (propertyName, oldValue, newValue);
1905 }, "~S,~S,~S");
1906 Clazz.defineMethod (c$, "firePropertyChangeChar", 
1907 function (propertyName, oldValue, newValue) {
1908 if (this.changeSupport == null || oldValue == newValue) {
1909 return;
1910 }this.firePropertyChangeObject (propertyName,  new Character (oldValue),  new Character (newValue));
1911 }, "~S,~S,~S");
1912 Clazz.defineMethod (c$, "firePropertyChangeShort", 
1913 function (propertyName, oldValue, newValue) {
1914 if (this.changeSupport == null || oldValue == newValue) {
1915 return;
1916 }this.firePropertyChangeObject (propertyName, Short.$valueOf (oldValue), Short.$valueOf (newValue));
1917 }, "~S,~N,~N");
1918 Clazz.defineMethod (c$, "firePropertyChangeLong", 
1919 function (propertyName, oldValue, newValue) {
1920 if (this.changeSupport == null || oldValue == newValue) {
1921 return;
1922 }this.firePropertyChangeObject (propertyName, Long.$valueOf (oldValue), Long.$valueOf (newValue));
1923 }, "~S,~N,~N");
1924 Clazz.defineMethod (c$, "firePropertyChangeFloat", 
1925 function (propertyName, oldValue, newValue) {
1926 if (this.changeSupport == null || oldValue == newValue) {
1927 return;
1928 }this.firePropertyChangeObject (propertyName, Float.$valueOf (oldValue), Float.$valueOf (newValue));
1929 }, "~S,~N,~N");
1930 Clazz.defineMethod (c$, "firePropertyChangeDouble", 
1931 function (propertyName, oldValue, newValue) {
1932 if (this.changeSupport == null || oldValue == newValue) {
1933 return;
1934 }this.firePropertyChangeObject (propertyName, Double.$valueOf (oldValue), Double.$valueOf (newValue));
1935 }, "~S,~N,~N");
1936 Clazz.defineMethod (c$, "setComponentOrientation", 
1937 function (o) {
1938 var oldValue = this.componentOrientation;
1939 this.componentOrientation = o;
1940 this.firePropertyChangeObject ("componentOrientation", oldValue, o);
1941 this.invalidateIfValid ();
1942 }, "java.awt.ComponentOrientation");
1943 Clazz.defineMethod (c$, "getComponentOrientation", 
1944 function () {
1945 return this.componentOrientation;
1946 });
1947 Clazz.defineMethod (c$, "applyComponentOrientation", 
1948 function (orientation) {
1949 this.applyCompOrientComp (orientation);
1950 }, "java.awt.ComponentOrientation");
1951 Clazz.defineMethod (c$, "applyCompOrientComp", 
1952 function (orientation) {
1953 if (orientation == null) {
1954 throw  new NullPointerException ();
1955 }this.setComponentOrientation (orientation);
1956 }, "java.awt.ComponentOrientation");
1957 Clazz.defineMethod (c$, "canBeFocusOwner", 
1958 function () {
1959 if (this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ()) {
1960 return true;
1961 }return false;
1962 });
1963 Clazz.defineMethod (c$, "canBeFocusOwnerRecursively", 
1964 function () {
1965 if (!this.canBeFocusOwner ()) {
1966 return false;
1967 }if (this.parent != null) {
1968 return this.parent.canContainFocusOwner (this);
1969 }return true;
1970 });
1971 Clazz.defineMethod (c$, "relocateComponent", 
1972 function () {
1973 });
1974 Clazz.defineMethod (c$, "getContainingWindow", 
1975 function () {
1976 return jssun.awt.SunToolkit.getContainingWindow (this);
1977 });
1978 c$.isInstanceOf = Clazz.defineMethod (c$, "isInstanceOf", 
1979 function (obj, className) {
1980 if (obj == null) return false;
1981 if (className == null) return false;
1982 var cls = obj.getClass ();
1983 while (cls != null) {
1984 if (cls.getName ().equals (className)) {
1985 return true;
1986 }cls = cls.getSuperclass ();
1987 }
1988 return false;
1989 }, "~O,~S");
1990 Clazz.defineMethod (c$, "areBoundsValid", 
1991 function () {
1992 var cont = this.getContainer ();
1993 return cont == null || cont.isValid () || cont.getLayout () == null;
1994 });
1995 Clazz.defineMethod (c$, "getLocationOnWindow", 
1996 function () {
1997 var curLocation = this.getLocation ();
1998 for (var parent = this.getContainer (); parent != null && !(Clazz.instanceOf (parent, java.awt.Window)); parent = parent.getContainer ()) {
1999 curLocation.x += parent.getX ();
2000 curLocation.y += parent.getY ();
2001 }
2002 return curLocation;
2003 });
2004 Clazz.defineMethod (c$, "getSiblingIndexAbove", 
2005 function () {
2006 var parent = this.getContainer ();
2007 if (parent == null) {
2008 return -1;
2009 }var nextAbove = parent.getComponentZOrder (this) - 1;
2010 return nextAbove < 0 ? -1 : nextAbove;
2011 });
2012 Clazz.defineMethod (c$, "getSiblingIndexBelow", 
2013 function () {
2014 var parent = this.getContainer ();
2015 if (parent == null) {
2016 return -1;
2017 }var nextBelow = parent.getComponentZOrder (this) + 1;
2018 return nextBelow >= parent.getComponentCount () ? -1 : nextBelow;
2019 });
2020 Clazz.defineMethod (c$, "mixOnShowing", 
2021 function () {
2022 });
2023 Clazz.defineMethod (c$, "mixOnHiding", 
2024 function (isLightweight) {
2025 }, "~B");
2026 Clazz.defineMethod (c$, "mixOnReshaping", 
2027 function () {
2028 swingjs.JSToolkit.taintUI (this);
2029 });
2030 Clazz.defineMethod (c$, "mixOnZOrderChanging", 
2031 function (oldZorder, newZorder) {
2032 }, "~N,~N");
2033 Clazz.defineMethod (c$, "mixOnValidating", 
2034 function () {
2035 });
2036 c$.doesClassImplement = Clazz.defineMethod (c$, "doesClassImplement", 
2037  function (cls, interfaceName) {
2038 if (cls == null) return false;
2039 for (var c, $c = 0, $$c = cls.getInterfaces (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
2040 if (c.getName ().equals (interfaceName)) {
2041 return true;
2042 }}
2043 return java.awt.Component.doesClassImplement (cls.getSuperclass (), interfaceName);
2044 }, "Class,~S");
2045 c$.doesImplement = Clazz.defineMethod (c$, "doesImplement", 
2046 function (obj, interfaceName) {
2047 if (obj == null) return false;
2048 if (interfaceName == null) return false;
2049 return java.awt.Component.doesClassImplement (obj.getClass (), interfaceName);
2050 }, "~O,~S");
2051 Clazz.pu$h(self.c$);
2052 c$ = Clazz.declareType (java.awt.Component, "BaselineResizeBehavior", Enum);
2053 Clazz.defineEnumConstant (c$, "CONSTANT_ASCENT", 0, []);
2054 Clazz.defineEnumConstant (c$, "CONSTANT_DESCENT", 1, []);
2055 Clazz.defineEnumConstant (c$, "CENTER_OFFSET", 2, []);
2056 Clazz.defineEnumConstant (c$, "OTHER", 3, []);
2057 c$ = Clazz.p0p ();
2058 Clazz.pu$h(self.c$);
2059 c$ = Clazz.declareType (java.awt.Component, "AWTTreeLock");
2060 c$ = Clazz.p0p ();
2061 Clazz.defineStatics (c$,
2062 "FOCUS_TRAVERSABLE_UNKNOWN", 0,
2063 "FOCUS_TRAVERSABLE_DEFAULT", 1,
2064 "FOCUS_TRAVERSABLE_SET", 2,
2065 "actionListenerK", "actionL",
2066 "adjustmentListenerK", "adjustmentL",
2067 "componentListenerK", "componentL",
2068 "containerListenerK", "containerL",
2069 "focusListenerK", "focusL",
2070 "itemListenerK", "itemL",
2071 "keyListenerK", "keyL",
2072 "mouseListenerK", "mouseL",
2073 "mouseMotionListenerK", "mouseMotionL",
2074 "mouseWheelListenerK", "mouseWheelL",
2075 "textListenerK", "textL",
2076 "ownedWindowK", "ownedL",
2077 "windowListenerK", "windowL",
2078 "inputMethodListenerK", "inputMethodL",
2079 "hierarchyListenerK", "hierarchyL",
2080 "hierarchyBoundsListenerK", "hierarchyBoundsL",
2081 "windowStateListenerK", "windowStateL",
2082 "windowFocusListenerK", "windowFocusL",
2083 "isInc", false,
2084 "incRate", 0,
2085 "TOP_ALIGNMENT", 0.0,
2086 "CENTER_ALIGNMENT", 0.5,
2087 "BOTTOM_ALIGNMENT", 1.0,
2088 "LEFT_ALIGNMENT", 0.0,
2089 "RIGHT_ALIGNMENT", 1.0,
2090 "incr", 0);
2091 c$.coalesceMap = c$.prototype.coalesceMap =  new java.util.HashMap ();
2092 });