1 Clazz.declarePackage ("javax.swing");
2 Clazz.load (["javax.swing.JComponent"], "javax.swing.Box", ["java.awt.AWTError", "$.Dimension", "javax.swing.BoxLayout"], function () {
3 c$ = Clazz.declareType (javax.swing, "Box", javax.swing.JComponent);
4 Clazz.makeConstructor (c$,
6 Clazz.superConstructor (this, javax.swing.Box);
7 Clazz.superCall (this, javax.swing.Box, "setLayout", [ new javax.swing.BoxLayout (this, axis)]);
9 c$.createHorizontalBox = Clazz.defineMethod (c$, "createHorizontalBox",
11 return new javax.swing.Box (0);
13 c$.createVerticalBox = Clazz.defineMethod (c$, "createVerticalBox",
15 return new javax.swing.Box (1);
17 c$.createRigidArea = Clazz.defineMethod (c$, "createRigidArea",
19 return new javax.swing.Box.Filler (d, d, d);
20 }, "java.awt.Dimension");
21 c$.createHorizontalStrut = Clazz.defineMethod (c$, "createHorizontalStrut",
23 return new javax.swing.Box.Filler ( new java.awt.Dimension (width, 0), new java.awt.Dimension (width, 0), new java.awt.Dimension (width, 32767));
25 c$.createVerticalStrut = Clazz.defineMethod (c$, "createVerticalStrut",
27 return new javax.swing.Box.Filler ( new java.awt.Dimension (0, height), new java.awt.Dimension (0, height), new java.awt.Dimension (32767, height));
29 c$.createGlue = Clazz.defineMethod (c$, "createGlue",
31 return new javax.swing.Box.Filler ( new java.awt.Dimension (0, 0), new java.awt.Dimension (0, 0), new java.awt.Dimension (32767, 32767));
33 c$.createHorizontalGlue = Clazz.defineMethod (c$, "createHorizontalGlue",
35 return new javax.swing.Box.Filler ( new java.awt.Dimension (0, 0), new java.awt.Dimension (0, 0), new java.awt.Dimension (32767, 0));
37 c$.createVerticalGlue = Clazz.defineMethod (c$, "createVerticalGlue",
39 return new javax.swing.Box.Filler ( new java.awt.Dimension (0, 0), new java.awt.Dimension (0, 0), new java.awt.Dimension (0, 32767));
41 Clazz.defineMethod (c$, "setLayout",
43 throw new java.awt.AWTError ("Illegal request");
44 }, "java.awt.LayoutManager");
45 Clazz.defineMethod (c$, "paintComponent",
47 if (this.ui != null) {
48 Clazz.superCall (this, javax.swing.Box, "paintComponent", [g]);
49 } else if (this.isOpaque ()) {
50 g.setColor (this.getBackground ());
51 g.fillRect (0, 0, this.getWidth (), this.getHeight ());
52 }}, "java.awt.Graphics");
54 c$ = Clazz.declareType (javax.swing.Box, "Filler", javax.swing.JComponent);
55 Clazz.makeConstructor (c$,
57 Clazz.superConstructor (this, javax.swing.Box.Filler, []);
58 this.setMinimumSize (a);
59 this.setPreferredSize (b);
60 this.setMaximumSize (c);
61 }, "java.awt.Dimension,java.awt.Dimension,java.awt.Dimension");
62 Clazz.defineMethod (c$, "changeShape",
64 this.setMinimumSize (a);
65 this.setPreferredSize (b);
66 this.setMaximumSize (c);
68 }, "java.awt.Dimension,java.awt.Dimension,java.awt.Dimension");
69 Clazz.defineMethod (c$, "paintComponent",
71 if (this.ui != null) {
72 Clazz.superCall (this, javax.swing.Box.Filler, "paintComponent", [a]);
73 } else if (this.isOpaque ()) {
74 a.setColor (this.getBackground ());
75 a.fillRect (0, 0, this.getWidth (), this.getHeight ());
76 }}, "java.awt.Graphics");