X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FTooltip.java;h=d629cf665b8ae2a8f31ef93694988b2a43bb7d11;hb=refs%2Fheads%2Fpatch%2FJAL-3561_JAL-3660_fileformatexport_CLI;hp=e16c594ce89a7a468cac312494edd0d4f523fbbc;hpb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;p=jalview.git diff --git a/src/jalview/appletgui/Tooltip.java b/src/jalview/appletgui/Tooltip.java index e16c594..d629cf6 100755 --- a/src/jalview/appletgui/Tooltip.java +++ b/src/jalview/appletgui/Tooltip.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -35,8 +35,8 @@ import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.util.StringTokenizer; -public class Tooltip extends Canvas implements MouseListener, - MouseMotionListener +public class Tooltip extends Canvas + implements MouseListener, MouseMotionListener { private String[] tip; @@ -91,8 +91,8 @@ public class Tooltip extends Canvas implements MouseListener, { if (lindex > 0) { - g.drawString(tip[i].substring(0, lindex), 3, (i + 1) * fontHeight - - 3); + g.drawString(tip[i].substring(0, lindex), 3, + (i + 1) * fontHeight - 3); x += fm.stringWidth(tip[i].substring(0, lindex) + 3); } g.drawImage(linkImage, x, i * fontHeight + 1, this); @@ -155,11 +155,11 @@ public class Tooltip extends Canvas implements MouseListener, return; } setLocation( - (owner.getLocationOnScreen().x - mainContainer.getLocationOnScreen().x) - + evt.getX(), + (owner.getLocationOnScreen().x + - mainContainer.getLocationOnScreen().x) + evt.getX(), (owner.getLocationOnScreen().y - - mainContainer.getLocationOnScreen().y + VERTICAL_OFFSET) - + evt.getY()); + - mainContainer.getLocationOnScreen().y + + VERTICAL_OFFSET) + evt.getY()); // correction, whole tool tip must be visible if (mainContainer.getSize().width < (getLocation().x + getSize().width))