com.mythicscape.batclient.interfaces
Interface BatTooltipManager


public interface BatTooltipManager

Shows tooltips. The html content must be fairly simple and can only include html codes that are possible for java swing components. No complicated css and similar. This is an example html that works:

Some green text hoho ho
This is a tooltip
bla bla


The tooltip manager is available through scripts as the variable "tooltipManager". To use it with your components you should add a MouseAdapter or MouseListener and in the mouseEntered and mouseExited methods call the tooltip manager to show your tooltips. You should also add a MouseMotionListener that does the exact same thing when the mouse is moved in mouseMoved method. Simply call showTooltip() here as well with the same arguments as in the mouseEntered method in the MouseListener. The tooltip manager will see that this tooltip has the exact same content and simply move the current visible tooltip to the new location.

Author:
Emil

Method Summary
 void hideTooltip()
          Hides the current tooltip.
 void setEnabled(boolean enabled)
          Sets the enabled state on the tooltip manager
 void showTooltip(javax.swing.JComponent owner, java.lang.String html, java.awt.event.MouseEvent e)
          Shows a tooltip with the provided html content.
 void showTooltipURL(javax.swing.JComponent owner, java.lang.String url, java.awt.event.MouseEvent e)
          Shows a tooltip and fetches the content from an URL.
 

Method Detail

showTooltipURL

void showTooltipURL(javax.swing.JComponent owner,
                    java.lang.String url,
                    java.awt.event.MouseEvent e)
Shows a tooltip and fetches the content from an URL.

Parameters:
owner -
url -
e -

showTooltip

void showTooltip(javax.swing.JComponent owner,
                 java.lang.String html,
                 java.awt.event.MouseEvent e)
Shows a tooltip with the provided html content.

Parameters:
owner -
html -
e -

setEnabled

void setEnabled(boolean enabled)
Sets the enabled state on the tooltip manager

Parameters:
enabled -

hideTooltip

void hideTooltip()
Hides the current tooltip.