PageRenderTime 39ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-5-pre1/org/gjt/sp/jedit/gui/statusbar/ToolTipLabel.java

#
Java | 41 lines | 12 code | 3 blank | 26 comment | 0 complexity | d6eb988997c7e88414ab3a6165e1f0b5 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. /*
  2. * ToolTipLabel.java - a label that has his tooltip on the top
  3. * :tabSize=8:indentSize=8:noTabs=false:
  4. * :folding=explicit:collapseFolds=1:
  5. *
  6. * Copyright (C) 2001, 2004 Slava Pestov
  7. * Portions copyright (C) 2001 Mike Dillon
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22. */
  23. package org.gjt.sp.jedit.gui.statusbar;
  24. import java.awt.Point;
  25. import java.awt.event.MouseEvent;
  26. import javax.swing.JLabel;
  27. /**
  28. * @author Slava Pestov
  29. */
  30. public class ToolTipLabel extends JLabel
  31. {
  32. //{{{ getToolTipLocation() method
  33. @Override
  34. public Point getToolTipLocation(MouseEvent event)
  35. {
  36. return new Point(event.getX(),-20);
  37. } //}}}
  38. }