X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fappletgui%2FTooltip.java;h=52b40e5e6bde8e0f98c9e3664c8f60b86b09cf1d;hb=3eef76298c55f3def21eed2516b5ace4405bed0a;hp=fe7fbb77ef257b4e2e4ad36a6d8e491bca739ac4;hpb=d423f22792e47dbc800ae220a58677f988971d06;p=jalview.git diff --git a/src/jalview/appletgui/Tooltip.java b/src/jalview/appletgui/Tooltip.java index fe7fbb7..52b40e5 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.5) - * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) + * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, 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))