1 Clazz.declarePackage ("jalview.appletgui");
\r
2 Clazz.load (null, "jalview.appletgui.Tooltip", ["awt2swing.Frame", "java.applet.Applet", "java.awt.Toolkit"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
6 this.setPosition = false;
\r
8 this.mainContainer = null;
\r
9 this.mainLayout = null;
\r
11 this.VERTICAL_OFFSET = 20;
\r
12 this.HORIZONTAL_ENLARGE = 10;
\r
13 this.fontHeight = 0;
\r
14 this.linkImage = null;
\r
16 Clazz.instantialize (this, arguments);
\r
17 }, jalview.appletgui, "Tooltip");
\r
18 Clazz.defineMethod (c$, "setVisible",
\r
21 Clazz.makeConstructor (c$,
\r
22 function (tip, owner) {
\r
25 var url = this.getClass ().getResource ("/images/link.gif");
\r
27 this.linkImage = java.awt.Toolkit.getDefaultToolkit ().getImage (url);
\r
28 }}, "~S,java.awt.Component");
\r
29 Clazz.defineMethod (c$, "setTip",
\r
31 System.err.println ("Tooltip: " + tip);
\r
33 Clazz.defineMethod (c$, "setTipLocation",
\r
35 }, "java.awt.event.MouseEvent");
\r
36 Clazz.defineMethod (c$, "removeToolTip",
\r
39 Clazz.defineMethod (c$, "mouseEntered",
\r
41 this.setTipLocation (me);
\r
42 }, "java.awt.event.MouseEvent");
\r
43 Clazz.defineMethod (c$, "mouseExited",
\r
45 this.removeToolTip ();
\r
46 }, "java.awt.event.MouseEvent");
\r
47 Clazz.defineMethod (c$, "mousePressed",
\r
49 this.removeToolTip ();
\r
50 }, "java.awt.event.MouseEvent");
\r
51 Clazz.defineMethod (c$, "mouseReleased",
\r
53 }, "java.awt.event.MouseEvent");
\r
54 Clazz.defineMethod (c$, "mouseClicked",
\r
56 }, "java.awt.event.MouseEvent");
\r
57 Clazz.defineMethod (c$, "mouseMoved",
\r
60 this.setTipLocation (me);
\r
61 } else if (this.setPosition) {
\r
62 this.setTipLocation (me);
\r
63 }}, "java.awt.event.MouseEvent");
\r
64 Clazz.defineMethod (c$, "mouseDragged",
\r
66 }, "java.awt.event.MouseEvent");
\r