X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=bin%2Fjalview%2Fappletgui%2FTooltip.js;h=425b8d725eb74686f2a617bdaa7108cc8a3c95ca;hp=cb48e62df590fdc41df56a6c4e5b14e08731f177;hb=7301a2415adab88038b291fc54caeeb3a5a47a44;hpb=6154cb57a6eac3bb1344b8342495f5bb701ee921 diff --git a/bin/jalview/appletgui/Tooltip.js b/bin/jalview/appletgui/Tooltip.js index cb48e62..425b8d7 100644 --- a/bin/jalview/appletgui/Tooltip.js +++ b/bin/jalview/appletgui/Tooltip.js @@ -1,67 +1,67 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (null, "jalview.appletgui.Tooltip", ["awt2swing.Frame", "java.applet.Applet", "java.awt.Toolkit"], function () { -c$ = Clazz.decorateAsClass (function () { -this.tip = null; -this.lastTip = ""; -this.setPosition = false; -this.owner = null; -this.mainContainer = null; -this.mainLayout = null; -this.shown = false; -this.VERTICAL_OFFSET = 20; -this.HORIZONTAL_ENLARGE = 10; -this.fontHeight = 0; -this.linkImage = null; -this.fm = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "Tooltip"); -Clazz.defineMethod (c$, "setVisible", -function (b) { -}, "~B"); -Clazz.makeConstructor (c$, -function (tip, owner) { -this.owner = owner; -this.setTip (tip); -var url = this.getClass ().getResource ("/images/link.gif"); -if (url != null) { -this.linkImage = java.awt.Toolkit.getDefaultToolkit ().getImage (url); -}}, "~S,java.awt.Component"); -Clazz.defineMethod (c$, "setTip", -function (tip) { -System.err.println ("Tooltip: " + tip); -}, "~S"); -Clazz.defineMethod (c$, "setTipLocation", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "removeToolTip", -($fz = function () { -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "mouseEntered", -function (me) { -this.setTipLocation (me); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseExited", -function (me) { -this.removeToolTip (); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mousePressed", -function (me) { -this.removeToolTip (); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseReleased", -function (me) { -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseClicked", -function (me) { -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseMoved", -function (me) { -if (!this.shown) { -this.setTipLocation (me); -} else if (this.setPosition) { -this.setTipLocation (me); -}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseDragged", -function (me) { -}, "java.awt.event.MouseEvent"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (null, "jalview.appletgui.Tooltip", ["awt2swing.Frame", "java.applet.Applet", "java.awt.Toolkit"], function () { +c$ = Clazz.decorateAsClass (function () { +this.tip = null; +this.lastTip = ""; +this.setPosition = false; +this.owner = null; +this.mainContainer = null; +this.mainLayout = null; +this.shown = false; +this.VERTICAL_OFFSET = 20; +this.HORIZONTAL_ENLARGE = 10; +this.fontHeight = 0; +this.linkImage = null; +this.fm = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "Tooltip"); +Clazz.defineMethod (c$, "setVisible", +function (b) { +}, "~B"); +Clazz.makeConstructor (c$, +function (tip, owner) { +this.owner = owner; +this.setTip (tip); +var url = this.getClass ().getResource ("/images/link.gif"); +if (url != null) { +this.linkImage = java.awt.Toolkit.getDefaultToolkit ().getImage (url); +}}, "~S,java.awt.Component"); +Clazz.defineMethod (c$, "setTip", +function (tip) { +System.err.println ("Tooltip: " + tip); +}, "~S"); +Clazz.defineMethod (c$, "setTipLocation", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "removeToolTip", +($fz = function () { +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "mouseEntered", +function (me) { +this.setTipLocation (me); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseExited", +function (me) { +this.removeToolTip (); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mousePressed", +function (me) { +this.removeToolTip (); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseReleased", +function (me) { +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseClicked", +function (me) { +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseMoved", +function (me) { +if (!this.shown) { +this.setTipLocation (me); +} else if (this.setPosition) { +this.setTipLocation (me); +}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseDragged", +function (me) { +}, "java.awt.event.MouseEvent"); +});