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