JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / jalview / appletgui / Tooltip.js
1 Clazz.declarePackage ("jalview.appletgui");
2 Clazz.load (null, "jalview.appletgui.Tooltip", ["awt2swing.Frame", "java.applet.Applet", "java.awt.Toolkit"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.tip = null;
5 this.lastTip = "";
6 this.setPosition = false;
7 this.owner = null;
8 this.mainContainer = null;
9 this.mainLayout = null;
10 this.shown = false;
11 this.VERTICAL_OFFSET = 20;
12 this.HORIZONTAL_ENLARGE = 10;
13 this.fontHeight = 0;
14 this.linkImage = null;
15 this.fm = null;
16 Clazz.instantialize (this, arguments);
17 }, jalview.appletgui, "Tooltip");
18 Clazz.defineMethod (c$, "setVisible", 
19 function (b) {
20 }, "~B");
21 Clazz.makeConstructor (c$, 
22 function (tip, owner) {
23 this.owner = owner;
24 this.setTip (tip);
25 var url = this.getClass ().getResource ("/images/link.gif");
26 if (url != null) {
27 this.linkImage = java.awt.Toolkit.getDefaultToolkit ().getImage (url);
28 }}, "~S,java.awt.Component");
29 Clazz.defineMethod (c$, "setTip", 
30 function (tip) {
31 System.err.println ("Tooltip: " + tip);
32 }, "~S");
33 Clazz.defineMethod (c$, "setTipLocation", 
34 function (evt) {
35 }, "java.awt.event.MouseEvent");
36 Clazz.defineMethod (c$, "removeToolTip", 
37 ($fz = function () {
38 }, $fz.isPrivate = true, $fz));
39 Clazz.defineMethod (c$, "mouseEntered", 
40 function (me) {
41 this.setTipLocation (me);
42 }, "java.awt.event.MouseEvent");
43 Clazz.defineMethod (c$, "mouseExited", 
44 function (me) {
45 this.removeToolTip ();
46 }, "java.awt.event.MouseEvent");
47 Clazz.defineMethod (c$, "mousePressed", 
48 function (me) {
49 this.removeToolTip ();
50 }, "java.awt.event.MouseEvent");
51 Clazz.defineMethod (c$, "mouseReleased", 
52 function (me) {
53 }, "java.awt.event.MouseEvent");
54 Clazz.defineMethod (c$, "mouseClicked", 
55 function (me) {
56 }, "java.awt.event.MouseEvent");
57 Clazz.defineMethod (c$, "mouseMoved", 
58 function (me) {
59 if (!this.shown) {
60 this.setTipLocation (me);
61 } else if (this.setPosition) {
62 this.setTipLocation (me);
63 }}, "java.awt.event.MouseEvent");
64 Clazz.defineMethod (c$, "mouseDragged", 
65 function (me) {
66 }, "java.awt.event.MouseEvent");
67 });