1 Clazz.declarePackage ("javax.swing");
2 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 () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.isAlignmentXSet = false;
6 this.isAlignmentYSet = false;
9 this.listenerList = null;
10 this.clientProperties = null;
11 this.autoscrolls = false;
14 this.verifyInputWhenFocusTarget = true;
15 this.paintingChild = null;
16 this.popupMenu = null;
17 this.focusInputMap = null;
18 this.ancestorInputMap = null;
19 this.windowInputMap = null;
20 this.actionMap = null;
21 if (!Clazz.isClassDefined ("javax.swing.JComponent.ActionStandin")) {
22 javax.swing.JComponent.$JComponent$ActionStandin$ ();
24 Clazz.instantialize (this, arguments);
25 }, javax.swing, "JComponent", java.awt.Container);
26 Clazz.prepareFields (c$, function () {
27 this.listenerList = new javax.swing.event.EventListenerList ();
29 c$.safelyGetGraphics = Clazz.defineMethod (c$, "safelyGetGraphics",
32 javax.swing.JComponent.componentObtainingGraphicsFrom = root;
33 var g = c.getGraphics ();
34 javax.swing.JComponent.componentObtainingGraphicsFrom = null;
36 }}, "java.awt.Component,java.awt.Component");
37 c$.getGraphicsInvoked = Clazz.defineMethod (c$, "getGraphicsInvoked",
39 if (!javax.swing.JComponent.isComponentObtainingGraphicsFrom (root)) {
40 var rootPane = (root).getRootPane ();
41 if (rootPane != null) {
42 rootPane.disableTrueDoubleBuffering ();
43 }}}, "java.awt.Component");
44 c$.isComponentObtainingGraphicsFrom = Clazz.defineMethod (c$, "isComponentObtainingGraphicsFrom",
47 return (javax.swing.JComponent.componentObtainingGraphicsFrom === c);
48 }}, "java.awt.Component");
49 c$.getManagingFocusForwardTraversalKeys = Clazz.defineMethod (c$, "getManagingFocusForwardTraversalKeys",
52 if (javax.swing.JComponent.managingFocusForwardTraversalKeys == null) {
53 javax.swing.JComponent.managingFocusForwardTraversalKeys = new java.util.HashSet (1);
54 javax.swing.JComponent.managingFocusForwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 2));
55 }}return javax.swing.JComponent.managingFocusForwardTraversalKeys;
57 c$.getManagingFocusBackwardTraversalKeys = Clazz.defineMethod (c$, "getManagingFocusBackwardTraversalKeys",
60 if (javax.swing.JComponent.managingFocusBackwardTraversalKeys == null) {
61 javax.swing.JComponent.managingFocusBackwardTraversalKeys = new java.util.HashSet (1);
62 javax.swing.JComponent.managingFocusBackwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 3));
63 }}return javax.swing.JComponent.managingFocusBackwardTraversalKeys;
65 c$.fetchRectangle = Clazz.defineMethod (c$, "fetchRectangle",
69 var size = javax.swing.JComponent.tempRectangles.size ();
71 rect = javax.swing.JComponent.tempRectangles.remove (size - 1);
73 rect = new java.awt.Rectangle (0, 0, 0, 0);
76 c$.recycleRectangle = Clazz.defineMethod (c$, "recycleRectangle",
79 javax.swing.JComponent.tempRectangles.add (rect);
80 }}, "java.awt.Rectangle");
81 Clazz.defineMethod (c$, "setInheritsPopupMenu",
83 var oldValue = this.getFlag (23);
84 this.setFlag (23, value);
85 this.firePropertyChangeBool ("inheritsPopupMenu", oldValue, value);
87 Clazz.defineMethod (c$, "getInheritsPopupMenu",
89 return this.getFlag (23);
91 Clazz.defineMethod (c$, "setComponentPopupMenu",
94 this.enableEvents (16);
95 }var oldPopup = this.popupMenu;
96 this.popupMenu = popup;
97 this.firePropertyChangeObject ("componentPopupMenu", oldPopup, popup);
98 }, "javax.swing.JPopupMenu");
99 Clazz.defineMethod (c$, "getComponentPopupMenu",
101 if (!this.getInheritsPopupMenu ()) {
102 return this.popupMenu;
103 }if (this.popupMenu == null) {
104 var parent = this.getParent ();
105 while (parent != null) {
106 if (Clazz.instanceOf (parent, javax.swing.JComponent)) {
107 return (parent).getComponentPopupMenu ();
108 }if (Clazz.instanceOf (parent, java.awt.Window) || Clazz.instanceOf (parent, java.applet.Applet)) {
110 }parent = parent.getParent ();
113 }return this.popupMenu;
115 Clazz.makeConstructor (c$,
117 Clazz.superConstructor (this, javax.swing.JComponent);
118 this.enableEvents (8);
119 Clazz.superCall (this, javax.swing.JComponent, "setLocale", [javax.swing.JComponent.getDefaultLocale ()]);
121 Clazz.defineMethod (c$, "updateUI",
124 Clazz.defineMethod (c$, "setUI",
126 this.uninstallUIAndProperties ();
128 if (this.ui != null) {
129 this.ui.installUI (this);
132 }, "javax.swing.plaf.ComponentUI");
133 Clazz.defineMethod (c$, "getUI",
137 Clazz.defineMethod (c$, "uninstallUIAndProperties",
139 if (this.ui != null) {
140 this.ui.uninstallUI (this);
142 Clazz.defineMethod (c$, "getUIClassID",
144 return "ComponentUI";
146 Clazz.defineMethod (c$, "getComponentGraphics",
148 var componentGraphics = g;
149 componentGraphics.setColor (this.getForeground ());
150 componentGraphics.setFont (this.getFont ());
151 return componentGraphics;
152 }, "java.awt.Graphics");
153 Clazz.defineMethod (c$, "paintComponent",
155 if (this.ui != null) {
156 var scratchGraphics = (g == null) ? null : g.createSwingJS ();
158 this.ui.update (scratchGraphics, this);
160 scratchGraphics.dispose ();
162 }}, "java.awt.Graphics");
163 Clazz.defineMethod (c$, "paintChildren",
168 var i = this.getComponentCount () - 1;
171 }if (this.paintingChild != null && (Clazz.instanceOf (this.paintingChild, javax.swing.JComponent))) {
172 for (; i >= 0; i--) {
173 if (this.getComponent (i) === this.paintingChild) {
176 }var tmpRect = javax.swing.JComponent.fetchRectangle ();
177 for (; i >= 0; i--) {
178 var comp = this.getComponent (i);
179 isJComponent = (Clazz.instanceOf (comp, javax.swing.JComponent));
180 if (comp != null && (isJComponent || javax.swing.JComponent.isLightweightComponent (comp)) && (comp.isVisible () == true)) {
181 var cr = comp.getBounds (tmpRect);
182 var cg = sg.create4 (cr.x, cr.y, cr.width, cr.height);
183 cg.setColor (comp.getForeground ());
184 cg.setFont (comp.getFont ());
185 var shouldSetFlagBack = false;
193 if (shouldSetFlagBack) {
194 (comp).setFlag (1, false);
195 (comp).setFlag (2, false);
198 javax.swing.JComponent.recycleRectangle (tmpRect);
199 }}, "java.awt.Graphics");
200 Clazz.defineMethod (c$, "paintBorder",
202 var border = this.getBorder ();
203 if (border != null) {
204 border.paintBorder (this, g, 0, 0, this.getWidth (), this.getHeight ());
205 }}, "java.awt.Graphics");
206 Clazz.overrideMethod (c$, "update",
209 }, "java.awt.Graphics");
210 Clazz.overrideMethod (c$, "paint",
212 var shouldClearPaintFlags = false;
213 if ((this.getWidth () <= 0) || (this.getHeight () <= 0)) {
215 }var componentGraphics = this.getComponentGraphics (g);
216 var co = componentGraphics.createSwingJS ();
218 if (this.getParent () != null && !(Clazz.instanceOf (this.getParent (), javax.swing.JComponent))) {
219 this.adjustPaintFlags ();
220 shouldClearPaintFlags = true;
221 }this.paintComponent (co);
222 this.paintBorder (co);
223 this.paintChildren (co);
226 if (shouldClearPaintFlags) {
227 this.setFlag (1, false);
228 this.setFlag (2, false);
229 this.setFlag (11, false);
230 this.setFlag (12, false);
232 }, "java.awt.Graphics");
233 Clazz.defineMethod (c$, "paintForceDoubleBuffered",
235 var rm = javax.swing.RepaintManager.currentManager (this);
236 var clip = g.getClipBounds ();
238 this.setFlag (13, true);
240 rm.paint (this, this, g, clip.x, clip.y, clip.width, clip.height);
243 this.setFlag (13, false);
245 }, "java.awt.Graphics");
246 Clazz.defineMethod (c$, "isPainting",
248 var component = this;
249 while (component != null) {
250 if (Clazz.instanceOf (component, javax.swing.JComponent) && (component).getFlag (1)) {
252 }component = component.getParent ();
256 Clazz.defineMethod (c$, "adjustPaintFlags",
260 for (parent = this.getParent (); parent != null; parent = parent.getParent ()) {
261 if (Clazz.instanceOf (parent, javax.swing.JComponent)) {
263 if (jparent.getFlag (1)) this.setFlag (1, true);
264 if (jparent.getFlag (2)) this.setFlag (2, true);
265 if (jparent.getFlag (11)) this.setFlag (11, true);
266 if (jparent.getFlag (12)) this.setFlag (12, true);
270 Clazz.overrideMethod (c$, "printAll",
272 this.setFlag (12, true);
276 this.setFlag (12, false);
278 }, "java.awt.Graphics");
279 Clazz.overrideMethod (c$, "print",
281 this.setFlag (11, true);
282 this.firePropertyChangeBool ("paintingForPrint", false, true);
286 this.setFlag (11, false);
287 this.firePropertyChangeBool ("paintingForPrint", true, false);
289 }, "java.awt.Graphics");
290 Clazz.defineMethod (c$, "printComponent",
292 this.paintComponent (g);
293 }, "java.awt.Graphics");
294 Clazz.defineMethod (c$, "printChildren",
296 this.paintChildren (g);
297 }, "java.awt.Graphics");
298 Clazz.defineMethod (c$, "printBorder",
300 this.paintBorder (g);
301 }, "java.awt.Graphics");
302 Clazz.defineMethod (c$, "isPaintingTile",
304 return this.getFlag (2);
306 Clazz.defineMethod (c$, "isPaintingForPrint",
308 return this.getFlag (11);
310 Clazz.defineMethod (c$, "isManagingFocus",
314 Clazz.defineMethod (c$, "registerNextFocusableComponent",
316 this.registerNextFocusableComponent (this.getNextFocusableComponent ());
318 Clazz.defineMethod (c$, "registerNextFocusableComponent",
319 function (nextFocusableComponent) {
320 if (nextFocusableComponent == null) {
322 }}, "java.awt.Component");
323 Clazz.defineMethod (c$, "deregisterNextFocusableComponent",
325 var nextFocusableComponent = this.getNextFocusableComponent ();
326 if (nextFocusableComponent == null) {
328 }var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
329 if (nearestRoot == null) {
332 Clazz.defineMethod (c$, "setNextFocusableComponent",
333 function (aComponent) {
334 var displayable = this.isDisplayable ();
336 this.deregisterNextFocusableComponent ();
337 }this.putClientProperty ("nextFocus", aComponent);
339 this.registerNextFocusableComponent (aComponent);
340 }}, "java.awt.Component");
341 Clazz.defineMethod (c$, "getNextFocusableComponent",
343 return this.getClientProperty ("nextFocus");
345 Clazz.defineMethod (c$, "setRequestFocusEnabled",
346 function (requestFocusEnabled) {
347 this.setFlag (22, !requestFocusEnabled);
349 Clazz.defineMethod (c$, "isRequestFocusEnabled",
351 return !this.getFlag (22);
353 Clazz.defineMethod (c$, "requestFocus",
354 function (temporary) {
355 Clazz.superCall (this, javax.swing.JComponent, "requestFocus", []);
358 Clazz.defineMethod (c$, "requestFocusInWindow",
359 function (temporary) {
360 return Clazz.superCall (this, javax.swing.JComponent, "requestFocusInWindow", []);
362 Clazz.defineMethod (c$, "grabFocus",
364 this.requestFocus ();
366 Clazz.defineMethod (c$, "setVerifyInputWhenFocusTarget",
367 function (verifyInputWhenFocusTarget) {
368 var oldVerifyInputWhenFocusTarget = this.verifyInputWhenFocusTarget;
369 this.verifyInputWhenFocusTarget = verifyInputWhenFocusTarget;
370 this.firePropertyChangeBool ("verifyInputWhenFocusTarget", oldVerifyInputWhenFocusTarget, verifyInputWhenFocusTarget);
372 Clazz.defineMethod (c$, "getVerifyInputWhenFocusTarget",
374 return this.verifyInputWhenFocusTarget;
376 Clazz.overrideMethod (c$, "getFontMetrics",
378 return jssun.font.FontDesignMetrics.getMetrics (font);
380 Clazz.overrideMethod (c$, "getPreferredSize",
382 return this.getPrefSizeJComp ();
384 Clazz.defineMethod (c$, "getPrefSizeJComp",
386 var size = (this.isPreferredSizeSet () || this.ui == null ? null : this.ui.getPreferredSize (this));
387 return (size == null ? this.preferredSize () : size);
389 Clazz.defineMethod (c$, "getMaximumSize",
391 if (this.isMaximumSizeSet ()) {
392 return Clazz.superCall (this, javax.swing.JComponent, "getMaximumSize", []);
394 if (this.ui != null) {
395 size = this.ui.getMaximumSize (this);
396 }return (size != null) ? size : Clazz.superCall (this, javax.swing.JComponent, "getMaximumSize", []);
398 Clazz.defineMethod (c$, "getMinimumSize",
400 if (this.isMinimumSizeSet ()) {
401 return Clazz.superCall (this, javax.swing.JComponent, "getMinimumSize", []);
403 if (this.ui != null) {
404 size = this.ui.getMinimumSize (this);
405 }return (size != null) ? size : Clazz.superCall (this, javax.swing.JComponent, "getMinimumSize", []);
407 Clazz.overrideMethod (c$, "contains",
409 return (this.ui != null) ? this.ui.contains (this, x, y) : this.inside (x, y);
411 Clazz.defineMethod (c$, "setBorder",
413 var oldBorder = this.border;
414 this.border = border;
415 this.firePropertyChangeObject ("border", oldBorder, border);
416 if (border !== oldBorder) {
417 if (border == null || oldBorder == null || !(border.getBorderInsets (this).equals (oldBorder.getBorderInsets (this)))) {
420 }}, "javax.swing.border.Border");
421 Clazz.defineMethod (c$, "getBorder",
425 Clazz.defineMethod (c$, "getInsets",
427 if (this.border != null) {
428 return this.border.getBorderInsets (this);
429 }return Clazz.superCall (this, javax.swing.JComponent, "getInsets", []);
431 Clazz.defineMethod (c$, "getInsets",
433 if (insets == null) {
434 insets = new java.awt.Insets (0, 0, 0, 0);
435 }if (this.border != null) {
436 if (Clazz.instanceOf (this.border, javax.swing.border.AbstractBorder)) {
437 return (this.border).getBorderInsets (this, insets);
439 return this.border.getBorderInsets (this);
441 insets.left = insets.top = insets.right = insets.bottom = 0;
443 }}, "java.awt.Insets");
444 Clazz.defineMethod (c$, "getAlignmentY",
446 if (this.isAlignmentYSet) {
447 return this.alignmentY;
448 }return Clazz.superCall (this, javax.swing.JComponent, "getAlignmentY", []);
450 Clazz.defineMethod (c$, "setAlignmentY",
451 function (alignmentY) {
452 this.alignmentY = alignmentY > 1.0 ? 1.0 : alignmentY < 0.0 ? 0.0 : alignmentY;
453 this.isAlignmentYSet = true;
455 Clazz.defineMethod (c$, "getAlignmentX",
457 if (this.isAlignmentXSet) {
458 return this.alignmentX;
459 }return Clazz.superCall (this, javax.swing.JComponent, "getAlignmentX", []);
461 Clazz.defineMethod (c$, "setAlignmentX",
462 function (alignmentX) {
463 this.alignmentX = alignmentX > 1.0 ? 1.0 : alignmentX < 0.0 ? 0.0 : alignmentX;
464 this.isAlignmentXSet = true;
466 Clazz.defineMethod (c$, "setInputVerifier",
467 function (inputVerifier) {
468 var oldInputVerifier = this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
469 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER, inputVerifier);
470 this.firePropertyChangeObject ("inputVerifier", oldInputVerifier, inputVerifier);
471 }, "javax.swing.InputVerifier");
472 Clazz.defineMethod (c$, "getInputVerifier",
474 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
476 Clazz.defineMethod (c$, "registerKeyboardAction",
477 function (anAction, aCommand, aKeyStroke, aCondition) {
478 var inputMap = this.getInputMap (aCondition, true);
479 if (inputMap != null) {
480 var actionMap = this.getActionMap (true);
481 var action = Clazz.innerTypeInstance (javax.swing.JComponent.ActionStandin, this, null, anAction, aCommand);
482 inputMap.put (aKeyStroke, action);
483 if (actionMap != null) {
484 actionMap.put (action, action);
485 }}}, "java.awt.event.ActionListener,~S,javax.swing.KeyStroke,~N");
486 Clazz.defineMethod (c$, "registerWithKeyboardManager",
487 function (onlyIfNew) {
488 var inputMap = this.getInputMap (2, false);
490 var registered = this.getClientProperty ("_WhenInFocusedWindow");
491 if (inputMap != null) {
492 strokes = inputMap.allKeys ();
493 if (strokes != null) {
494 for (var counter = strokes.length - 1; counter >= 0; counter--) {
495 if (!onlyIfNew || registered == null || registered.get (strokes[counter]) == null) {
496 this.registerWithKeyboardManager (strokes[counter]);
497 }if (registered != null) {
498 registered.remove (strokes[counter]);
502 }if (registered != null && registered.size () > 0) {
503 var keys = registered.keys ();
504 while (keys.hasMoreElements ()) {
505 var ks = keys.nextElement ();
506 this.unregisterWithKeyboardManager (ks);
509 }if (strokes != null && strokes.length > 0) {
510 if (registered == null) {
511 registered = new java.util.Hashtable (strokes.length);
512 this.putClientProperty ("_WhenInFocusedWindow", registered);
513 }for (var counter = strokes.length - 1; counter >= 0; counter--) {
514 registered.put (strokes[counter], strokes[counter]);
517 this.putClientProperty ("_WhenInFocusedWindow", null);
519 Clazz.defineMethod (c$, "unregisterWithKeyboardManager",
521 var registered = this.getClientProperty ("_WhenInFocusedWindow");
522 if (registered != null && registered.size () > 0) {
523 var keys = registered.keys ();
524 while (keys.hasMoreElements ()) {
525 var ks = keys.nextElement ();
526 this.unregisterWithKeyboardManager (ks);
528 }this.putClientProperty ("_WhenInFocusedWindow", null);
530 Clazz.defineMethod (c$, "componentInputMapChanged",
531 function (inputMap) {
532 var km = this.getInputMap (2, false);
533 while (km !== inputMap && km != null) {
534 km = km.getParent ();
537 this.registerWithKeyboardManager (false);
538 }}, "javax.swing.ComponentInputMap");
539 Clazz.defineMethod (c$, "registerWithKeyboardManager",
540 function (aKeyStroke) {
541 javax.swing.KeyboardManager.getCurrentManager ().registerKeyStroke (aKeyStroke, this);
542 }, "javax.swing.KeyStroke");
543 Clazz.defineMethod (c$, "unregisterWithKeyboardManager",
544 function (aKeyStroke) {
545 javax.swing.KeyboardManager.getCurrentManager ().unregisterKeyStroke (aKeyStroke, this);
546 }, "javax.swing.KeyStroke");
547 Clazz.defineMethod (c$, "registerKeyboardAction",
548 function (anAction, aKeyStroke, aCondition) {
549 this.registerKeyboardAction (anAction, null, aKeyStroke, aCondition);
550 }, "java.awt.event.ActionListener,javax.swing.KeyStroke,~N");
551 Clazz.defineMethod (c$, "unregisterKeyboardAction",
552 function (aKeyStroke) {
553 var am = this.getActionMap (false);
554 for (var counter = 0; counter < 3; counter++) {
555 var km = this.getInputMap (counter, false);
557 var actionID = km.get (aKeyStroke);
558 if (am != null && actionID != null) {
559 am.remove (actionID);
560 }km.remove (aKeyStroke);
562 }, "javax.swing.KeyStroke");
563 Clazz.defineMethod (c$, "getRegisteredKeyStrokes",
565 var counts = Clazz.newIntArray (3, 0);
566 var strokes = new Array (3);
567 for (var counter = 0; counter < 3; counter++) {
568 var km = this.getInputMap (counter, false);
569 strokes[counter] = (km != null) ? km.allKeys () : null;
570 counts[counter] = (strokes[counter] != null) ? strokes[counter].length : 0;
572 var retValue = new Array (counts[0] + counts[1] + counts[2]);
573 for (var counter = 0, last = 0; counter < 3; counter++) {
574 if (counts[counter] > 0) {
575 System.arraycopy (strokes[counter], 0, retValue, last, counts[counter]);
576 last += counts[counter];
580 Clazz.defineMethod (c$, "getConditionForKeyStroke",
581 function (aKeyStroke) {
582 for (var counter = 0; counter < 3; counter++) {
583 var inputMap = this.getInputMap (counter, false);
584 if (inputMap != null && inputMap.get (aKeyStroke) != null) {
588 }, "javax.swing.KeyStroke");
589 Clazz.defineMethod (c$, "getActionForKeyStroke",
590 function (aKeyStroke) {
591 var am = this.getActionMap (false);
594 }for (var counter = 0; counter < 3; counter++) {
595 var inputMap = this.getInputMap (counter, false);
596 if (inputMap != null) {
597 var actionBinding = inputMap.get (aKeyStroke);
598 if (actionBinding != null) {
599 var action = am.get (actionBinding);
600 if (Clazz.instanceOf (action, javax.swing.JComponent.ActionStandin)) {
601 return (action).actionListener;
605 }, "javax.swing.KeyStroke");
606 Clazz.defineMethod (c$, "resetKeyboardActions",
608 for (var counter = 0; counter < 3; counter++) {
609 var inputMap = this.getInputMap (counter, false);
610 if (inputMap != null) {
613 var am = this.getActionMap (false);
617 Clazz.defineMethod (c$, "setInputMap",
618 function (condition, map) {
621 if (map != null && !(Clazz.instanceOf (map, javax.swing.ComponentInputMap))) {
622 throw new IllegalArgumentException ("WHEN_IN_FOCUSED_WINDOW InputMaps must be of type ComponentInputMap");
623 }this.windowInputMap = map;
624 this.setFlag (7, true);
625 this.registerWithKeyboardManager (false);
628 this.ancestorInputMap = map;
629 this.setFlag (6, true);
632 this.focusInputMap = map;
633 this.setFlag (5, true);
636 throw new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
638 }, "~N,javax.swing.InputMap");
639 Clazz.defineMethod (c$, "getInputMap",
640 function (condition) {
641 return this.getInputMap (condition, true);
643 Clazz.defineMethod (c$, "getInputMap",
645 return this.getInputMap (0, true);
647 Clazz.defineMethod (c$, "setActionMap",
650 this.setFlag (8, true);
651 }, "javax.swing.ActionMap");
652 Clazz.defineMethod (c$, "getActionMap",
654 return this.getActionMap (true);
656 Clazz.defineMethod (c$, "getInputMap",
657 function (condition, create) {
660 if (this.getFlag (5)) {
661 return this.focusInputMap;
663 var km = new javax.swing.InputMap ();
664 this.setInputMap (condition, km);
668 if (this.getFlag (6)) {
669 return this.ancestorInputMap;
671 var km = new javax.swing.InputMap ();
672 this.setInputMap (condition, km);
676 if (this.getFlag (7)) {
677 return this.windowInputMap;
679 var km = new javax.swing.ComponentInputMap (this);
680 this.setInputMap (condition, km);
684 throw new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
688 Clazz.defineMethod (c$, "getActionMap",
691 (arguments.length == 0) && (create = true);
692 }if (this.getFlag (8)) {
693 return this.actionMap;
695 var am = new javax.swing.ActionMap ();
696 this.setActionMap (am);
700 Clazz.defineMethod (c$, "getBaseline",
701 function (width, height) {
702 Clazz.superCall (this, javax.swing.JComponent, "getBaseline", [width, height]);
703 if (this.ui != null) {
704 return this.ui.getBaseline (this, width, height);
707 Clazz.overrideMethod (c$, "getBaselineResizeBehavior",
709 if (this.ui != null) {
710 return this.ui.getBaselineResizeBehavior (this);
711 }return java.awt.Component.BaselineResizeBehavior.OTHER;
713 Clazz.defineMethod (c$, "requestDefaultFocus",
715 var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
716 if (nearestRoot == null) {
720 Clazz.defineMethod (c$, "setVisible",
722 if (aFlag != this.isVisible ()) {
723 Clazz.superCall (this, javax.swing.JComponent, "setVisible", [aFlag]);
724 var parent = this.getParent ();
725 if (parent != null) {
726 var r = this.getBounds ();
727 parent.repaint (r.x, r.y, r.width, r.height);
730 Clazz.defineMethod (c$, "setEnabled",
732 var oldEnabled = this.isEnabled ();
733 Clazz.superCall (this, javax.swing.JComponent, "setEnabled", [enabled]);
734 this.firePropertyChangeBool ("enabled", oldEnabled, enabled);
735 if (enabled != oldEnabled) {
738 Clazz.defineMethod (c$, "setForeground",
740 var oldFg = this.getForeground ();
741 Clazz.superCall (this, javax.swing.JComponent, "setForeground", [fg]);
742 if ((oldFg != null) ? !oldFg.equals (fg) : ((fg != null) && !fg.equals (oldFg))) {
744 }}, "java.awt.Color");
745 Clazz.defineMethod (c$, "setBackground",
747 var oldBg = this.getBackground ();
748 Clazz.superCall (this, javax.swing.JComponent, "setBackground", [bg]);
749 if ((oldBg != null) ? !oldBg.equals (bg) : ((bg != null) && !bg.equals (oldBg))) {
751 }}, "java.awt.Color");
752 Clazz.defineMethod (c$, "setFont",
754 var oldFont = this.getFont ();
755 Clazz.superCall (this, javax.swing.JComponent, "setFont", [font]);
756 if (font !== oldFont) {
759 }}, "java.awt.Font");
760 c$.getDefaultLocale = Clazz.defineMethod (c$, "getDefaultLocale",
762 var l = javax.swing.SwingUtilities.appContextGet ("JComponent.defaultLocale");
764 l = java.util.Locale.getDefault ();
765 javax.swing.JComponent.setDefaultLocale (l);
768 c$.setDefaultLocale = Clazz.defineMethod (c$, "setDefaultLocale",
770 javax.swing.SwingUtilities.appContextPut ("JComponent.defaultLocale", l);
771 }, "java.util.Locale");
772 Clazz.defineMethod (c$, "processComponentKeyEvent",
774 }, "java.awt.event.KeyEvent");
775 Clazz.defineMethod (c$, "processKeyEvent",
777 var shouldProcessKey;
778 Clazz.superCall (this, javax.swing.JComponent, "processKeyEvent", [e]);
779 if (!e.isConsumed ()) {
780 this.processComponentKeyEvent (e);
781 }shouldProcessKey = javax.swing.JComponent.KeyboardState.shouldProcess (e);
782 if (e.isConsumed ()) {
784 }if (shouldProcessKey && this.processKeyBindings (e, e.getID () == 401)) {
786 }}, "java.awt.event.KeyEvent");
787 Clazz.defineMethod (c$, "processKeyBinding",
788 function (ks, e, condition, pressed) {
789 var map = this.getInputMap (condition, false);
790 var am = this.getActionMap (false);
791 if (map != null && am != null && this.isEnabled ()) {
792 var binding = map.get (ks);
793 var action = (binding == null) ? null : am.get (binding);
794 if (action != null) {
795 return javax.swing.SwingUtilities.notifyAction (action, ks, e, this, e.getModifiers ());
797 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
798 Clazz.defineMethod (c$, "processKeyBindings",
799 function (e, pressed) {
800 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (e)) {
803 if (e.getID () == 400) {
804 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
806 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), (pressed ? false : true));
807 }if (this.processKeyBinding (ks, e, 0, pressed)) return true;
809 while (parent != null && !(Clazz.instanceOf (parent, java.awt.Window)) && !(Clazz.instanceOf (parent, java.applet.Applet))) {
810 if (Clazz.instanceOf (parent, javax.swing.JComponent)) {
811 if ((parent).processKeyBinding (ks, e, 1, pressed)) return true;
812 }parent = parent.getParent ();
814 if (parent != null) {
815 return javax.swing.JComponent.processKeyBindingsForAllComponents (e, parent, pressed);
817 }, "java.awt.event.KeyEvent,~B");
818 c$.processKeyBindingsForAllComponents = Clazz.defineMethod (c$, "processKeyBindingsForAllComponents",
819 function (e, container, pressed) {
821 if (javax.swing.KeyboardManager.getCurrentManager ().fireKeyboardAction (e, pressed, container)) {
823 }if (Clazz.instanceOf (container, javax.swing.Popup.HeavyWeightWindow)) {
824 container = (container).getOwner ();
828 }, "java.awt.event.KeyEvent,java.awt.Container,~B");
829 Clazz.defineMethod (c$, "setToolTipText",
831 this.putClientProperty ("ToolTipText", text);
833 Clazz.defineMethod (c$, "getToolTipText",
835 return this.getClientProperty ("ToolTipText");
837 Clazz.defineMethod (c$, "getToolTipText",
839 return this.getToolTipText ();
840 }, "java.awt.event.MouseEvent");
841 Clazz.defineMethod (c$, "getToolTipLocation",
844 }, "java.awt.event.MouseEvent");
845 Clazz.defineMethod (c$, "getPopupLocation",
848 }, "java.awt.event.MouseEvent");
849 Clazz.defineMethod (c$, "createToolTip",
851 var tip = new javax.swing.JToolTip ();
852 tip.setComponent (this);
855 Clazz.defineMethod (c$, "scrollRectToVisible",
858 var dx = this.getX ();
859 var dy = this.getY ();
860 for (parent = this.getParent (); !(parent == null) && !(Clazz.instanceOf (parent, javax.swing.JComponent)) && !(Clazz.instanceOf (parent, javax.swing.CellRendererPane)); parent = parent.getParent ()) {
861 var bounds = parent.getBounds ();
865 if (!(parent == null) && !(Clazz.instanceOf (parent, javax.swing.CellRendererPane))) {
868 (parent).scrollRectToVisible (aRect);
871 }}, "java.awt.Rectangle");
872 Clazz.defineMethod (c$, "setAutoscrolls",
873 function (autoscrolls) {
875 Clazz.defineMethod (c$, "getAutoscrolls",
877 return this.autoscrolls;
879 Clazz.defineMethod (c$, "superProcessMouseMotionEvent",
881 Clazz.superCall (this, javax.swing.JComponent, "processMouseMotionEvent", [e]);
882 }, "java.awt.event.MouseEvent");
883 Clazz.defineMethod (c$, "setCreatedDoubleBuffer",
884 function (newValue) {
885 this.setFlag (9, newValue);
887 Clazz.defineMethod (c$, "getCreatedDoubleBuffer",
889 return this.getFlag (9);
891 Clazz.defineMethod (c$, "getClientProperties",
893 if (this.clientProperties == null) {
894 this.clientProperties = new javax.swing.ArrayTable ();
895 }return this.clientProperties;
897 Clazz.defineMethod (c$, "getClientProperty",
899 if (this.clientProperties == null) {
903 return this.clientProperties.get (key);
905 Clazz.defineMethod (c$, "putClientProperty",
906 function (key, value) {
907 if (value == null && this.clientProperties == null) {
909 }var clientProperties = this.getClientProperties ();
912 oldValue = clientProperties.get (key);
914 clientProperties.put (key, value);
915 } else if (oldValue != null) {
916 clientProperties.remove (key);
919 }}this.clientPropertyChanged (key, oldValue, value);
920 this.firePropertyChangeObject (key.toString (), oldValue, value);
922 Clazz.defineMethod (c$, "clientPropertyChanged",
923 function (key, oldValue, newValue) {
925 Clazz.defineMethod (c$, "setUIProperty",
926 function (propertyName, value) {
927 if (propertyName === "opaque") {
928 if (!this.getFlag (24)) {
929 this.setOpaque ((value).booleanValue ());
930 this.setFlag (24, false);
931 }} else if (propertyName === "autoscrolls") {
932 if (!this.getFlag (25)) {
933 this.setAutoscrolls ((value).booleanValue ());
934 this.setFlag (25, false);
935 }} else if (propertyName === "focusTraversalKeysForward") {
936 } else if (propertyName === "focusTraversalKeysBackward") {
938 System.out.println (swingjs.JSToolkit.getClassName (this) + " property \"" + propertyName + "\" cannot be set using this method" + swingjs.JSToolkit.getStackTrace (5));
940 c$.isLightweightComponent = Clazz.defineMethod (c$, "isLightweightComponent",
942 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));
943 }, "java.awt.Component");
944 Clazz.overrideMethod (c$, "isOpaque",
946 return this.getFlag (3);
948 Clazz.defineMethod (c$, "setOpaque",
949 function (isOpaque) {
950 var oldValue = this.getFlag (3);
951 this.setFlag (3, isOpaque);
952 this.setFlag (24, true);
953 this.firePropertyChangeBool ("opaque", oldValue, isOpaque);
955 Clazz.defineMethod (c$, "rectangleIsObscured",
956 function (x, y, width, height) {
957 var numChildren = this.getComponentCount ();
958 for (var i = 0; i < numChildren; i++) {
959 var child = this.getComponent (i);
966 cw = child.getWidth ();
967 ch = child.getHeight ();
968 if (x >= cx && (x + width) <= (cx + cw) && y >= cy && (y + height) <= (cy + ch) && child.isVisible ()) {
969 if (Clazz.instanceOf (child, javax.swing.JComponent)) {
970 return (child).isOpaque ();
976 c$.computeVisibleRect = Clazz.defineMethod (c$, "computeVisibleRect",
977 function (c, visibleRect) {
978 var p = c.getParent ();
979 var bounds = c.getBounds ();
980 if (p == null || Clazz.instanceOf (p, java.awt.Window) || Clazz.instanceOf (p, java.applet.Applet)) {
981 visibleRect.reshape (0, 0, bounds.width, bounds.height);
983 javax.swing.JComponent.computeVisibleRect (p, visibleRect);
984 visibleRect.x -= bounds.x;
985 visibleRect.y -= bounds.y;
986 javax.swing.SwingUtilities.computeIntersection (0, 0, bounds.width, bounds.height, visibleRect);
987 }}, "java.awt.Component,java.awt.Rectangle");
988 Clazz.defineMethod (c$, "computeVisibleRect",
989 function (visibleRect) {
990 javax.swing.JComponent.computeVisibleRect (this, visibleRect);
991 }, "java.awt.Rectangle");
992 Clazz.defineMethod (c$, "getVisibleRect",
994 var visibleRect = new java.awt.Rectangle ();
995 this.computeVisibleRect (visibleRect);
998 Clazz.defineMethod (c$, "getTopLevelAncestor",
1000 for (var p = this; p != null; p = p.getParent ()) {
1001 if (Clazz.instanceOf (p, java.awt.Window) || Clazz.instanceOf (p, java.applet.Applet)) {
1006 Clazz.defineMethod (c$, "getAncestorNotifier",
1008 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER);
1010 Clazz.defineMethod (c$, "addAncestorListener",
1011 function (listener) {
1012 var ancestorNotifier = this.getAncestorNotifier ();
1013 if (ancestorNotifier == null) {
1014 ancestorNotifier = new javax.swing.AncestorNotifier (this);
1015 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, ancestorNotifier);
1016 }ancestorNotifier.addAncestorListener (listener);
1017 }, "javax.swing.event.AncestorListener");
1018 Clazz.defineMethod (c$, "removeAncestorListener",
1019 function (listener) {
1020 var ancestorNotifier = this.getAncestorNotifier ();
1021 if (ancestorNotifier == null) {
1023 }ancestorNotifier.removeAncestorListener (listener);
1024 if (ancestorNotifier.listenerList.getListenerList ().length == 0) {
1025 ancestorNotifier.removeAllListeners ();
1026 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, null);
1027 }}, "javax.swing.event.AncestorListener");
1028 Clazz.defineMethod (c$, "getAncestorListeners",
1030 var ancestorNotifier = this.getAncestorNotifier ();
1031 if (ancestorNotifier == null) {
1032 return new Array (0);
1033 }return ancestorNotifier.getAncestorListeners ();
1035 Clazz.defineMethod (c$, "getListeners",
1036 function (listenerType) {
1038 if (listenerType === javax.swing.event.AncestorListener) {
1039 result = this.getAncestorListeners ();
1040 } else if (listenerType === java.beans.PropertyChangeListener) {
1041 result = this.getPropertyChangeListeners ();
1043 result = this.listenerList.getListeners (listenerType);
1044 }if (result.length == 0) {
1045 return Clazz.superCall (this, javax.swing.JComponent, "getListeners", [listenerType]);
1048 Clazz.defineMethod (c$, "addNotify",
1050 Clazz.superCall (this, javax.swing.JComponent, "addNotify", []);
1051 this.firePropertyChangeObject ("ancestor", null, this.getParent ());
1052 this.registerWithKeyboardManager (false);
1053 this.registerNextFocusableComponent ();
1055 Clazz.defineMethod (c$, "removeNotify",
1057 Clazz.superCall (this, javax.swing.JComponent, "removeNotify", []);
1058 this.firePropertyChangeObject ("ancestor", this.getParent (), null);
1059 this.unregisterWithKeyboardManager ();
1060 this.deregisterNextFocusableComponent ();
1061 if (this.getCreatedDoubleBuffer ()) {
1062 javax.swing.RepaintManager.currentManager (this).resetDoubleBuffer ();
1063 this.setCreatedDoubleBuffer (false);
1065 Clazz.defineMethod (c$, "repaint",
1066 function (tm, x, y, width, height) {
1067 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
1068 }, "~N,~N,~N,~N,~N");
1069 Clazz.defineMethod (c$, "repaint",
1071 this.repaint (0, r.x, r.y, r.width, r.height);
1072 }, "java.awt.Rectangle");
1073 Clazz.defineMethod (c$, "revalidate",
1075 if (this.getParent () == null) {
1077 }if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
1079 javax.swing.RepaintManager.currentManager (this).addInvalidComponent (this);
1082 if (this.getFlag (28)) {
1084 }this.setFlag (28, true);
1085 }var callRevalidate = ((Clazz.isClassDefined ("javax.swing.JComponent$2") ? 0 : javax.swing.JComponent.$JComponent$2$ ()), Clazz.innerTypeInstance (javax.swing.JComponent$2, this, null));
1086 javax.swing.SwingUtilities.invokeLater (callRevalidate);
1088 Clazz.defineMethod (c$, "isValidateRoot",
1092 Clazz.defineMethod (c$, "isOptimizedDrawingEnabled",
1096 Clazz.defineMethod (c$, "isPaintingOrigin",
1100 Clazz.defineMethod (c$, "paintImmediately",
1101 function (x, y, w, h) {
1103 if (arguments.length == 1) {
1112 if (!this.isShowing ()) {
1114 }while (!(c).isOpaque ()) {
1115 parent = c.getParent ();
1116 if (parent != null) {
1122 }if (!(Clazz.instanceOf (c, javax.swing.JComponent))) {
1125 if (Clazz.instanceOf (c, javax.swing.JComponent)) {
1126 (c)._paintImmediately (x, y, w, h);
1128 c.repaint (x, y, w, h);
1130 Clazz.defineMethod (c$, "paintImmediately",
1132 this.paintImmediately (r.x, r.y, r.width, r.height);
1133 }, "java.awt.Rectangle");
1134 Clazz.defineMethod (c$, "alwaysOnTop",
1138 Clazz.defineMethod (c$, "setPaintingChild",
1139 function (paintingChild) {
1140 this.paintingChild = paintingChild;
1141 }, "java.awt.Component");
1142 Clazz.defineMethod (c$, "_paintImmediately",
1143 function (x, y, w, h) {
1152 var hasBuffer = false;
1153 var bufferedComponent = null;
1154 var paintingComponent = this;
1155 var path = new java.util.ArrayList (7);
1158 tmpX = tmpY = tmpWidth = tmpHeight = 0;
1159 var paintImmediatelyClip = javax.swing.JComponent.fetchRectangle ();
1160 paintImmediatelyClip.x = x;
1161 paintImmediatelyClip.y = y;
1162 paintImmediatelyClip.width = w;
1163 paintImmediatelyClip.height = h;
1164 var ontop = this.alwaysOnTop () && this.isOpaque ();
1166 javax.swing.SwingUtilities.computeIntersection (0, 0, this.getWidth (), this.getHeight (), paintImmediatelyClip);
1167 if (paintImmediatelyClip.width == 0) {
1168 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
1171 for (c = this, child = null; c != null && !(Clazz.instanceOf (c, java.awt.Window)) && !(Clazz.instanceOf (c, java.applet.Applet)); child = c, c = c.getParent ()) {
1172 var jc = (Clazz.instanceOf (c, javax.swing.JComponent)) ? c : null;
1174 if (!ontop && jc != null && !jc.isOptimizedDrawingEnabled ()) {
1177 if (jc.isPaintingOrigin ()) {
1180 var children = c.getComponents ();
1182 for (; i < children.length; i++) {
1183 if (children[i] === child) break;
1185 switch (jc.getObscuredState (i, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height)) {
1190 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
1199 paintingComponent = jc;
1201 offsetX = offsetY = 0;
1207 tmpWidth = c.getWidth ();
1208 tmpHeight = c.getHeight ();
1209 javax.swing.SwingUtilities.computeIntersection (tmpX, tmpY, tmpWidth, tmpHeight, paintImmediatelyClip);
1210 paintImmediatelyClip.x += bx;
1211 paintImmediatelyClip.y += by;
1215 if (c == null || paintImmediatelyClip.width <= 0 || paintImmediatelyClip.height <= 0) {
1216 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
1218 }paintingComponent.setFlag (13, true);
1219 paintImmediatelyClip.x -= offsetX;
1220 paintImmediatelyClip.y -= offsetY;
1221 if (paintingComponent !== this) {
1224 for (; i > 0; i--) {
1225 comp = path.get (i);
1226 if (Clazz.instanceOf (comp, javax.swing.JComponent)) {
1227 (comp).setPaintingChild (path.get (i - 1));
1230 g = javax.swing.JComponent.safelyGetGraphics (paintingComponent, c).createSwingJS ();
1233 var rm = javax.swing.RepaintManager.currentManager (bufferedComponent);
1236 rm.paint (paintingComponent, bufferedComponent, g, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height);
1241 paintingComponent.paint (g);
1246 if (paintingComponent !== this) {
1249 for (; i > 0; i--) {
1250 comp = path.get (i);
1251 if (Clazz.instanceOf (comp, javax.swing.JComponent)) {
1252 (comp).setPaintingChild (null);
1254 }paintingComponent.setFlag (13, false);
1256 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
1258 Clazz.defineMethod (c$, "paintToOffscreen",
1259 function (g, x, y, w, h, maxX, maxY) {
1261 this.setFlag (1, true);
1262 if ((y + h) < maxY || (x + w) < maxX) {
1263 this.setFlag (2, true);
1264 }if (this.getFlag (13)) {
1267 if (!this.rectangleIsObscured (x, y, w, h)) {
1268 this.paintComponent (g);
1269 this.paintBorder (g);
1270 }this.paintChildren (g);
1272 this.setFlag (1, false);
1273 this.setFlag (2, false);
1275 }, "java.awt.Graphics,~N,~N,~N,~N,~N,~N");
1276 Clazz.defineMethod (c$, "getObscuredState",
1277 function (compIndex, x, y, width, height) {
1279 var tmpRect = javax.swing.JComponent.fetchRectangle ();
1280 for (var i = compIndex - 1; i >= 0; i--) {
1281 var sibling = this.getComponent (i);
1282 if (!sibling.isVisible ()) {
1286 if (Clazz.instanceOf (sibling, javax.swing.JComponent)) {
1287 opaque = (sibling).isOpaque ();
1289 if (retValue == 1) {
1293 }siblingRect = sibling.getBounds (tmpRect);
1294 if (opaque && x >= siblingRect.x && (x + width) <= (siblingRect.x + siblingRect.width) && y >= siblingRect.y && (y + height) <= (siblingRect.y + siblingRect.height)) {
1295 javax.swing.JComponent.recycleRectangle (tmpRect);
1297 } else if (retValue == 0 && !((x + width <= siblingRect.x) || (y + height <= siblingRect.y) || (x >= siblingRect.x + siblingRect.width) || (y >= siblingRect.y + siblingRect.height))) {
1300 javax.swing.JComponent.recycleRectangle (tmpRect);
1302 }, "~N,~N,~N,~N,~N");
1303 Clazz.defineMethod (c$, "checkIfChildObscuredBySibling",
1307 Clazz.defineMethod (c$, "setFlag",
1308 function (aFlag, aValue) {
1310 this.flags |= (1 << aFlag);
1312 this.flags &= ~(1 << aFlag);
1314 Clazz.defineMethod (c$, "getFlag",
1316 var mask = (1 << aFlag);
1317 return ((this.flags & mask) == mask);
1319 Clazz.defineMethod (c$, "setDoubleBuffered",
1322 Clazz.overrideMethod (c$, "isDoubleBuffered",
1324 return this.getFlag (0);
1326 Clazz.defineMethod (c$, "getRootPane",
1328 return javax.swing.SwingUtilities.getRootPane (this);
1330 Clazz.defineMethod (c$, "paramString",
1332 var preferredSizeString = (this.isPreferredSizeSet () ? this.getPreferredSize ().toString () : "");
1333 var minimumSizeString = (this.isMinimumSizeSet () ? this.getMinimumSize ().toString () : "");
1334 var maximumSizeString = (this.isMaximumSizeSet () ? this.getMaximumSize ().toString () : "");
1335 var borderString = (this.border == null ? "" : (this.border === this ? "this" : this.border.toString ()));
1336 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;
1338 c$.$JComponent$ActionStandin$ = function () {
1339 Clazz.pu$h(self.c$);
1340 c$ = Clazz.decorateAsClass (function () {
1341 Clazz.prepareCallback (this, arguments);
1342 this.actionListener = null;
1343 this.command = null;
1345 Clazz.instantialize (this, arguments);
1346 }, javax.swing.JComponent, "ActionStandin", null, javax.swing.Action);
1347 Clazz.makeConstructor (c$,
1349 this.actionListener = a;
1350 if (Clazz.instanceOf (a, javax.swing.Action)) {
1355 }, "java.awt.event.ActionListener,~S");
1356 Clazz.defineMethod (c$, "getValue",
1359 if (a.equals ("ActionCommandKey")) {
1360 return this.command;
1361 }if (this.action != null) {
1362 return this.action.getValue (a);
1363 }if (a.equals ("Name")) {
1364 return "ActionStandin";
1367 Clazz.defineMethod (c$, "isEnabled",
1369 if (this.actionListener == null) {
1371 }if (this.action == null) {
1373 }return this.action.isEnabled ();
1375 Clazz.defineMethod (c$, "actionPerformed",
1377 if (this.actionListener != null) {
1378 this.actionListener.actionPerformed (a);
1379 }}, "java.awt.event.ActionEvent");
1380 Clazz.overrideMethod (c$, "putValue",
1383 Clazz.overrideMethod (c$, "setEnabled",
1386 Clazz.overrideMethod (c$, "addPropertyChangeListener",
1388 }, "java.beans.PropertyChangeListener");
1389 Clazz.overrideMethod (c$, "removePropertyChangeListener",
1391 }, "java.beans.PropertyChangeListener");
1394 c$.$JComponent$2$ = function () {
1395 Clazz.pu$h(self.c$);
1396 c$ = Clazz.declareAnonymous (javax.swing, "JComponent$2", null, Runnable);
1397 Clazz.overrideMethod (c$, "run",
1400 this.b$["javax.swing.JComponent"].setFlag (28, false);
1401 }this.b$["javax.swing.JComponent"].revalidate ();
1405 c$.$JComponent$1$ = function () {
1406 Clazz.pu$h(self.c$);
1407 c$ = Clazz.declareAnonymous (javax.swing, "JComponent$1", null, jssun.awt.RequestFocusController);
1408 Clazz.overrideMethod (c$, "acceptRequestFocus",
1409 function (from, to, temporary, focusedWindowChangeAllowed, cause) {
1410 if ((to == null) || !(Clazz.instanceOf (to, javax.swing.JComponent))) {
1412 }if ((from == null) || !(Clazz.instanceOf (from, javax.swing.JComponent))) {
1415 if (!target.getVerifyInputWhenFocusTarget ()) {
1417 }var jFocusOwner = from;
1418 var iv = jFocusOwner.getInputVerifier ();
1422 var currentSource = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
1423 if (currentSource === jFocusOwner) {
1425 }javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, jFocusOwner);
1427 return iv.shouldYieldFocus (jFocusOwner);
1429 if (currentSource != null) {
1430 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, currentSource);
1432 javax.swing.SwingUtilities.appContextRemove (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
1434 }}, "java.awt.Component,java.awt.Component,~B,~B,jssun.awt.CausedFocusEvent.Cause");
1437 Clazz.pu$h(self.c$);
1438 c$ = Clazz.decorateAsClass (function () {
1442 Clazz.instantialize (this, arguments);
1443 }, javax.swing.JComponent, "IntVector");
1444 Clazz.defineMethod (c$, "size",
1448 Clazz.defineMethod (c$, "elementAt",
1450 return this.array[a];
1452 Clazz.defineMethod (c$, "addElement",
1454 if (this.count == this.capacity) {
1455 this.capacity = (this.capacity + 2) * 2;
1456 var b = Clazz.newIntArray (this.capacity, 0);
1457 if (this.count > 0) {
1458 System.arraycopy (this.array, 0, b, 0, this.count);
1460 }this.array[this.count++] = a;
1462 Clazz.defineMethod (c$, "setElementAt",
1467 Clazz.pu$h(self.c$);
1468 c$ = Clazz.declareType (javax.swing.JComponent, "KeyboardState");
1469 c$.getKeyCodeArray = Clazz.defineMethod (c$, "getKeyCodeArray",
1471 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.KeyboardState.keyCodesKey);
1473 a = new javax.swing.JComponent.IntVector ();
1474 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.KeyboardState.keyCodesKey, a);
1477 c$.registerKeyPressed = Clazz.defineMethod (c$, "registerKeyPressed",
1479 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
1482 for (d = 0; d < c; d++) {
1483 if (b.elementAt (d) == -1) {
1484 b.setElementAt (a, d);
1489 c$.registerKeyReleased = Clazz.defineMethod (c$, "registerKeyReleased",
1491 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
1494 for (d = 0; d < c; d++) {
1495 if (b.elementAt (d) == a) {
1496 b.setElementAt (-1, d);
1500 c$.keyIsPressed = Clazz.defineMethod (c$, "keyIsPressed",
1502 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
1505 for (d = 0; d < c; d++) {
1506 if (b.elementAt (d) == a) {
1511 c$.shouldProcess = Clazz.defineMethod (c$, "shouldProcess",
1513 switch (a.getID ()) {
1515 if (!javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ())) {
1516 javax.swing.JComponent.KeyboardState.registerKeyPressed (a.getKeyCode ());
1519 if (javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ()) || a.getKeyCode () == 154) {
1520 javax.swing.JComponent.KeyboardState.registerKeyReleased (a.getKeyCode ());
1528 }, "java.awt.event.KeyEvent");
1529 c$.keyCodesKey = c$.prototype.keyCodesKey = javax.swing.JComponent.KeyboardState;
1531 Clazz.defineStatics (c$,
1532 "uiClassID", "ComponentUI",
1533 "managingFocusForwardTraversalKeys", null,
1534 "managingFocusBackwardTraversalKeys", null,
1536 "PARTIALLY_OBSCURED", 1,
1537 "COMPLETELY_OBSCURED", 2,
1538 "DEBUG_GRAPHICS_LOADED", false);
1539 c$.INPUT_VERIFIER_SOURCE_KEY = c$.prototype.INPUT_VERIFIER_SOURCE_KEY = new Clazz._O ();
1540 Clazz.defineStatics (c$,
1542 "WHEN_ANCESTOR_OF_FOCUSED_COMPONENT", 1,
1543 "WHEN_IN_FOCUSED_WINDOW", 2,
1544 "UNDEFINED_CONDITION", -1,
1545 "WHEN_IN_FOCUSED_WINDOW_BINDINGS", "_WhenInFocusedWindow",
1546 "TOOL_TIP_TEXT_KEY", "ToolTipText",
1547 "NEXT_FOCUS", "nextFocus",
1548 "IS_DOUBLE_BUFFERED", 0,
1549 "ANCESTOR_USING_BUFFER", 1,
1550 "IS_PAINTING_TILE", 2,
1552 "FOCUS_INPUTMAP_CREATED", 5,
1553 "ANCESTOR_INPUTMAP_CREATED", 6,
1554 "WIF_INPUTMAP_CREATED", 7,
1555 "ACTIONMAP_CREATED", 8,
1556 "CREATED_DOUBLE_BUFFER", 9,
1558 "IS_PRINTING_ALL", 12,
1559 "IS_REPAINTING", 13,
1560 "REQUEST_FOCUS_DISABLED", 22,
1561 "INHERITS_POPUP_MENU", 23,
1563 "AUTOSCROLLS_SET", 25,
1564 "REVALIDATE_RUNNABLE_SCHEDULED", 28);
1565 c$.tempRectangles = c$.prototype.tempRectangles = new java.util.ArrayList (11);
1566 Clazz.defineStatics (c$,
1567 "defaultLocale", "JComponent.defaultLocale",
1568 "componentObtainingGraphicsFrom", null);
1569 c$.componentObtainingGraphicsFromLock = c$.prototype.componentObtainingGraphicsFromLock = new Clazz._O ();
1570 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));