JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / javax / swing / JToolTip.js
1 Clazz.declarePackage ("javax.swing");\r
2 Clazz.load (["javax.swing.JComponent"], "javax.swing.JToolTip", ["javax.swing.UIManager"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.tipText = null;\r
5 this.$component = null;\r
6 Clazz.instantialize (this, arguments);\r
7 }, javax.swing, "JToolTip", javax.swing.JComponent);\r
8 Clazz.makeConstructor (c$, \r
9 function () {\r
10 Clazz.superConstructor (this, javax.swing.JToolTip, []);\r
11 this.setOpaque (true);\r
12 this.updateUI ();\r
13 });\r
14 Clazz.overrideMethod (c$, "getUI", \r
15 function () {\r
16 return this.ui;\r
17 });\r
18 Clazz.overrideMethod (c$, "updateUI", \r
19 function () {\r
20 this.setUI (javax.swing.UIManager.getUI (this));\r
21 });\r
22 Clazz.overrideMethod (c$, "getUIClassID", \r
23 function () {\r
24 return "ToolTipUI";\r
25 });\r
26 Clazz.defineMethod (c$, "setTipText", \r
27 function (tipText) {\r
28 var oldValue = this.tipText;\r
29 this.tipText = tipText;\r
30 this.firePropertyChangeObject ("tiptext", oldValue, tipText);\r
31 }, "~S");\r
32 Clazz.defineMethod (c$, "getTipText", \r
33 function () {\r
34 return this.tipText;\r
35 });\r
36 Clazz.defineMethod (c$, "setComponent", \r
37 function (c) {\r
38 var oldValue = this.$component;\r
39 this.$component = c;\r
40 this.firePropertyChangeObject ("component", oldValue, c);\r
41 }, "javax.swing.JComponent");\r
42 Clazz.defineMethod (c$, "getComponent", \r
43 function () {\r
44 return this.$component;\r
45 });\r
46 Clazz.overrideMethod (c$, "alwaysOnTop", \r
47 function () {\r
48 return true;\r
49 });\r
50 Clazz.defineMethod (c$, "paramString", \r
51 function () {\r
52 var tipTextString = (this.tipText != null ? this.tipText : "");\r
53 return Clazz.superCall (this, javax.swing.JToolTip, "paramString", []) + ",tipText=" + tipTextString;\r
54 });\r
55 Clazz.defineStatics (c$,\r
56 "$uiClassID", "ToolTipUI");\r
57 });\r