8efb7bb00b36440263db7dede53a785c71410721
[jalviewjs.git] / site / swingjs / j2s / javax / swing / CellRendererPane.js
1 Clazz.declarePackage ("javax.swing");
2 Clazz.load (["java.awt.Container"], "javax.swing.CellRendererPane", null, function () {
3 c$ = Clazz.declareType (javax.swing, "CellRendererPane", java.awt.Container);
4 Clazz.makeConstructor (c$, 
5 function () {
6 Clazz.superConstructor (this, javax.swing.CellRendererPane);
7 this.setLayout (null);
8 this.setVisible (false);
9 });
10 Clazz.overrideMethod (c$, "invalidate", 
11 function () {
12 });
13 Clazz.overrideMethod (c$, "paint", 
14 function (g) {
15 }, "java.awt.Graphics");
16 Clazz.overrideMethod (c$, "update", 
17 function (g) {
18 }, "java.awt.Graphics");
19 Clazz.overrideMethod (c$, "addImpl", 
20 function (x, constraints, index) {
21 if (x.getParent () === this) {
22 return null;
23 } else {
24 return this.addImplSAEM (x, constraints, index);
25 }}, "java.awt.Component,~O,~N");
26 Clazz.defineMethod (c$, "paintComponent", 
27 function (g, c, p, x, y, w, h, shouldValidate) {
28 if (c == null) {
29 if (p != null) {
30 var oldColor = g.getColor ();
31 g.setColor (p.getBackground ());
32 g.fillRect (x, y, w, h);
33 g.setColor (oldColor);
34 }return;
35 }if (c.getParent () !== this) {
36 this.add (c);
37 }c.setBounds (x, y, w, h);
38 if (shouldValidate) {
39 c.validate ();
40 }var cg = g.create4 (x, y, w, h);
41 try {
42 c.paint (cg);
43 } finally {
44 cg.dispose ();
45 }
46 c.setBounds (-w, -h, 0, 0);
47 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N,~B");
48 Clazz.defineMethod (c$, "paintComponent", 
49 function (g, c, p, x, y, w, h) {
50 this.paintComponent (g, c, p, x, y, w, h, false);
51 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
52 Clazz.defineMethod (c$, "paintComponent", 
53 function (g, c, p, r) {
54 this.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
55 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
56 });