X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FTooltip.java;h=4806ba1c2c72727cc4d6098f23202a3af5390234;hb=8a6fa9ea9900d0f106529c3f6283e7f9d76dd2cb;hp=fe7fbb77ef257b4e2e4ad36a6d8e491bca739ac4;hpb=d423f22792e47dbc800ae220a58677f988971d06;p=jalview.git diff --git a/src/jalview/appletgui/Tooltip.java b/src/jalview/appletgui/Tooltip.java index fe7fbb7..4806ba1 100755 --- a/src/jalview/appletgui/Tooltip.java +++ b/src/jalview/appletgui/Tooltip.java @@ -1,5 +1,5 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * * This file is part of Jalview. @@ -86,8 +86,8 @@ public class Tooltip extends Canvas implements MouseListener, g.drawImage(linkImage, x, i * fontHeight + 1, this); if (lindex + 6 < tip[i].length()) { - g.drawString(tip[i].substring(lindex + 6), x - + linkImage.getWidth(this), (i + 1) * fontHeight - 3); + g.drawString(tip[i].substring(lindex + 6), + x + linkImage.getWidth(this), (i + 1) * fontHeight - 3); } } else @@ -142,11 +142,12 @@ public class Tooltip extends Canvas implements MouseListener, { return; } - setLocation((owner.getLocationOnScreen().x - mainContainer - .getLocationOnScreen().x) - + evt.getX(), (owner.getLocationOnScreen().y - - mainContainer.getLocationOnScreen().y + VERTICAL_OFFSET) - + evt.getY()); + setLocation( + (owner.getLocationOnScreen().x - mainContainer.getLocationOnScreen().x) + + evt.getX(), + (owner.getLocationOnScreen().y + - mainContainer.getLocationOnScreen().y + VERTICAL_OFFSET) + + evt.getY()); // correction, whole tool tip must be visible if (mainContainer.getSize().width < (getLocation().x + getSize().width))