JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / javax / swing / JCheckBox.js
1 Clazz.declarePackage ("javax.swing");\r
2 Clazz.load (["javax.swing.JToggleButton"], "javax.swing.JCheckBox", ["java.lang.Boolean", "javax.swing.UIManager"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.flat = false;\r
5 Clazz.instantialize (this, arguments);\r
6 }, javax.swing, "JCheckBox", javax.swing.JToggleButton);\r
7 Clazz.makeConstructor (c$, \r
8 function () {\r
9 this.construct (null, null, false);\r
10 });\r
11 Clazz.makeConstructor (c$, \r
12 function (icon) {\r
13 this.construct (null, icon, false);\r
14 }, "javax.swing.Icon");\r
15 Clazz.makeConstructor (c$, \r
16 function (icon, selected) {\r
17 this.construct (null, icon, selected);\r
18 }, "javax.swing.Icon,~B");\r
19 Clazz.makeConstructor (c$, \r
20 function (text) {\r
21 this.construct (text, null, false);\r
22 }, "~S");\r
23 Clazz.makeConstructor (c$, \r
24 function (a) {\r
25 this.construct ();\r
26 this.setAction (a);\r
27 }, "javax.swing.Action");\r
28 Clazz.makeConstructor (c$, \r
29 function (text, selected) {\r
30 this.construct (text, null, selected);\r
31 }, "~S,~B");\r
32 Clazz.makeConstructor (c$, \r
33 function (text, icon) {\r
34 this.construct (text, icon, false);\r
35 }, "~S,javax.swing.Icon");\r
36 Clazz.makeConstructor (c$, \r
37 function (text, icon, selected) {\r
38 Clazz.superConstructor (this, javax.swing.JCheckBox, [text, icon, selected]);\r
39 this.setUIProperty ("borderPainted", Boolean.FALSE);\r
40 this.setHorizontalAlignment (10);\r
41 }, "~S,javax.swing.Icon,~B");\r
42 Clazz.defineMethod (c$, "setBorderPaintedFlat", \r
43 function (b) {\r
44 var oldValue = this.flat;\r
45 this.flat = b;\r
46 this.firePropertyChangeBool ("borderPaintedFlat", oldValue, this.flat);\r
47 if (b != oldValue) {\r
48 this.revalidate ();\r
49 this.repaint ();\r
50 }}, "~B");\r
51 Clazz.defineMethod (c$, "isBorderPaintedFlat", \r
52 function () {\r
53 return this.flat;\r
54 });\r
55 Clazz.overrideMethod (c$, "updateUI", \r
56 function () {\r
57 this.setUI (javax.swing.UIManager.getUI (this));\r
58 });\r
59 Clazz.overrideMethod (c$, "getUIClassID", \r
60 function () {\r
61 return "CheckBoxUI";\r
62 });\r
63 Clazz.overrideMethod (c$, "setIconFromAction", \r
64 function (a) {\r
65 }, "javax.swing.Action");\r
66 Clazz.defineStatics (c$,\r
67 "BORDER_PAINTED_FLAT_CHANGED_PROPERTY", "borderPaintedFlat",\r
68 "$$uiClassID", "CheckBoxUI");\r
69 });\r