com.alee.managers.tooltip
Class TooltipManager

java.lang.Object
  extended by com.alee.managers.tooltip.TooltipManager

public final class TooltipManager
extends java.lang.Object

This manager allows you to set extended tooltips for any Swing component with any possible content (would it be simple text or some JComponent ancestor) or show one-time tooltips at custom location inside any window. Also this manager is integrated with HotkeyManager and provides an opportunity to automatically show components hotkeys on their tooltips set with this class.

Author:
Mikle Garin
See Also:
GlassPaneManager, HotkeyManager

Constructor Summary
TooltipManager()
           
 
Method Summary
static WebCustomTooltip addTooltip(java.awt.Component component, javax.swing.Icon icon, java.lang.String tooltip)
           
static WebCustomTooltip addTooltip(java.awt.Component component, javax.swing.Icon icon, java.lang.String tooltip, TooltipWay tooltipWay)
           
static WebCustomTooltip addTooltip(java.awt.Component component, javax.swing.Icon icon, java.lang.String tooltip, TooltipWay tooltipWay, int delay)
           
static WebCustomTooltip addTooltip(java.awt.Component component, javax.swing.JComponent tooltip)
           
static WebCustomTooltip addTooltip(java.awt.Component component, javax.swing.JComponent tooltip, int delay)
           
static WebCustomTooltip addTooltip(java.awt.Component component, javax.swing.JComponent tooltip, TooltipWay tooltipWay)
           
static WebCustomTooltip addTooltip(java.awt.Component component, javax.swing.JComponent tooltip, TooltipWay tooltipWay, int delay)
           
static WebCustomTooltip addTooltip(java.awt.Component component, java.lang.String tooltip)
           
static WebCustomTooltip addTooltip(java.awt.Component component, java.lang.String tooltip, TooltipWay tooltipWay)
           
static WebCustomTooltip addTooltip(java.awt.Component component, java.lang.String tooltip, TooltipWay tooltipWay, int delay)
           
static int getDefaultDelay()
          Default tooltip show delay
static void hideAllTooltips()
          Hides all visible tooltips
static void initialize()
          TooltipManager initialization
static void installShowAllTooltipsAction(java.awt.Component topComponent)
          Installs "show all hotkeys" action on window or component
static void installShowAllTooltipsAction(java.awt.Component topComponent, HotkeyData hotkeyData)
           
static boolean isAllowMultiplyTooltips()
          Allow more than one tooltip per component
static boolean isShowHotkeysInOneTimeTooltips()
          Show hotkeys in one-time tooltips by default
static boolean isShowHotkeysInTooltips()
          Show hotkeys in tooltips by default
static void removeTooltip(java.awt.Component component, WebCustomTooltip tooltip)
           
static void removeTooltips(java.awt.Component component)
          Removes component tooltips
static void removeTooltips(java.awt.Component component, java.util.List<WebCustomTooltip> tooltips)
           
static void setAllowMultiplyTooltips(boolean allowMultiplyTooltips)
           
static void setDefaultDelay(int delay)
           
static void setShowHotkeysInOneTimeTooltips(boolean showHotkeysInOneTimeTooltips)
           
static void setShowHotkeysInTooltips(boolean showHotkeysInTooltips)
           
static WebCustomTooltip setTooltip(java.awt.Component component, javax.swing.Icon icon, java.lang.String tooltip)
           
static WebCustomTooltip setTooltip(java.awt.Component component, javax.swing.Icon icon, java.lang.String tooltip, TooltipWay tooltipWay)
           
static WebCustomTooltip setTooltip(java.awt.Component component, javax.swing.Icon icon, java.lang.String tooltip, TooltipWay tooltipWay, int delay)
           
static WebCustomTooltip setTooltip(java.awt.Component component, javax.swing.JComponent tooltip)
           
static WebCustomTooltip setTooltip(java.awt.Component component, javax.swing.JComponent tooltip, int delay)
           
static WebCustomTooltip setTooltip(java.awt.Component component, javax.swing.JComponent tooltip, TooltipWay tooltipWay)
           
static WebCustomTooltip setTooltip(java.awt.Component component, javax.swing.JComponent tooltip, TooltipWay tooltipWay, int delay)
           
static WebCustomTooltip setTooltip(java.awt.Component component, java.lang.String tooltip)
          Registers standart tooltip
static WebCustomTooltip setTooltip(java.awt.Component component, java.lang.String tooltip, TooltipWay tooltipWay)
           
static WebCustomTooltip setTooltip(java.awt.Component component, java.lang.String tooltip, TooltipWay tooltipWay, int delay)
           
static void showAllTooltips()
          Displays all tooltips for all visible windows
static void showAllTooltips(java.awt.Component component)
          Displays all tooltips for component's window
static WebCustomTooltip showOneTimeTooltip(java.awt.Component component, java.awt.Point point, javax.swing.Icon icon, java.lang.String tooltip)
           
static WebCustomTooltip showOneTimeTooltip(java.awt.Component component, java.awt.Point point, javax.swing.Icon icon, java.lang.String tooltip, TooltipWay tooltipWay)
           
static WebCustomTooltip showOneTimeTooltip(java.awt.Component component, java.awt.Point point, javax.swing.JComponent tooltip)
           
static WebCustomTooltip showOneTimeTooltip(java.awt.Component component, java.awt.Point point, javax.swing.JComponent tooltip, TooltipWay tooltipWay)
           
static WebCustomTooltip showOneTimeTooltip(java.awt.Component component, java.awt.Point point, java.lang.String tooltip)
          Shows one-time tooltip
static WebCustomTooltip showOneTimeTooltip(java.awt.Component component, java.awt.Point point, java.lang.String tooltip, TooltipWay tooltipWay)
           
static WebCustomTooltip showOneTimeTooltip(WebCustomTooltip customTooltip)
           
static boolean showTooltips(java.awt.Component component)
          Displays component tooltips
static boolean showTooltips(java.awt.Component component, boolean delayed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TooltipManager

public TooltipManager()
Method Detail

initialize

public static void initialize()
TooltipManager initialization


hideAllTooltips

public static void hideAllTooltips()
Hides all visible tooltips


setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          java.lang.String tooltip)
Registers standart tooltip


setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          javax.swing.Icon icon,
                                          java.lang.String tooltip)

setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          java.lang.String tooltip,
                                          TooltipWay tooltipWay)

setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          javax.swing.Icon icon,
                                          java.lang.String tooltip,
                                          TooltipWay tooltipWay)

setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          java.lang.String tooltip,
                                          TooltipWay tooltipWay,
                                          int delay)

setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          javax.swing.Icon icon,
                                          java.lang.String tooltip,
                                          TooltipWay tooltipWay,
                                          int delay)

setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          javax.swing.JComponent tooltip)

setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          javax.swing.JComponent tooltip,
                                          int delay)

setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          javax.swing.JComponent tooltip,
                                          TooltipWay tooltipWay)

setTooltip

public static WebCustomTooltip setTooltip(java.awt.Component component,
                                          javax.swing.JComponent tooltip,
                                          TooltipWay tooltipWay,
                                          int delay)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          java.lang.String tooltip)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          javax.swing.Icon icon,
                                          java.lang.String tooltip)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          java.lang.String tooltip,
                                          TooltipWay tooltipWay)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          javax.swing.Icon icon,
                                          java.lang.String tooltip,
                                          TooltipWay tooltipWay)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          java.lang.String tooltip,
                                          TooltipWay tooltipWay,
                                          int delay)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          javax.swing.Icon icon,
                                          java.lang.String tooltip,
                                          TooltipWay tooltipWay,
                                          int delay)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          javax.swing.JComponent tooltip)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          javax.swing.JComponent tooltip,
                                          int delay)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          javax.swing.JComponent tooltip,
                                          TooltipWay tooltipWay)

addTooltip

public static WebCustomTooltip addTooltip(java.awt.Component component,
                                          javax.swing.JComponent tooltip,
                                          TooltipWay tooltipWay,
                                          int delay)

showTooltips

public static boolean showTooltips(java.awt.Component component)
Displays component tooltips


showTooltips

public static boolean showTooltips(java.awt.Component component,
                                   boolean delayed)

showAllTooltips

public static void showAllTooltips(java.awt.Component component)
Displays all tooltips for component's window


showAllTooltips

public static void showAllTooltips()
Displays all tooltips for all visible windows


installShowAllTooltipsAction

public static void installShowAllTooltipsAction(java.awt.Component topComponent)
Installs "show all hotkeys" action on window or component


installShowAllTooltipsAction

public static void installShowAllTooltipsAction(java.awt.Component topComponent,
                                                HotkeyData hotkeyData)

removeTooltips

public static void removeTooltips(java.awt.Component component)
Removes component tooltips


removeTooltips

public static void removeTooltips(java.awt.Component component,
                                  java.util.List<WebCustomTooltip> tooltips)

removeTooltip

public static void removeTooltip(java.awt.Component component,
                                 WebCustomTooltip tooltip)

showOneTimeTooltip

public static WebCustomTooltip showOneTimeTooltip(java.awt.Component component,
                                                  java.awt.Point point,
                                                  java.lang.String tooltip)
Shows one-time tooltip


showOneTimeTooltip

public static WebCustomTooltip showOneTimeTooltip(java.awt.Component component,
                                                  java.awt.Point point,
                                                  javax.swing.Icon icon,
                                                  java.lang.String tooltip)

showOneTimeTooltip

public static WebCustomTooltip showOneTimeTooltip(java.awt.Component component,
                                                  java.awt.Point point,
                                                  java.lang.String tooltip,
                                                  TooltipWay tooltipWay)

showOneTimeTooltip

public static WebCustomTooltip showOneTimeTooltip(java.awt.Component component,
                                                  java.awt.Point point,
                                                  javax.swing.Icon icon,
                                                  java.lang.String tooltip,
                                                  TooltipWay tooltipWay)

showOneTimeTooltip

public static WebCustomTooltip showOneTimeTooltip(java.awt.Component component,
                                                  java.awt.Point point,
                                                  javax.swing.JComponent tooltip)

showOneTimeTooltip

public static WebCustomTooltip showOneTimeTooltip(java.awt.Component component,
                                                  java.awt.Point point,
                                                  javax.swing.JComponent tooltip,
                                                  TooltipWay tooltipWay)

showOneTimeTooltip

public static WebCustomTooltip showOneTimeTooltip(WebCustomTooltip customTooltip)

getDefaultDelay

public static int getDefaultDelay()
Default tooltip show delay


setDefaultDelay

public static void setDefaultDelay(int delay)

isAllowMultiplyTooltips

public static boolean isAllowMultiplyTooltips()
Allow more than one tooltip per component


setAllowMultiplyTooltips

public static void setAllowMultiplyTooltips(boolean allowMultiplyTooltips)

isShowHotkeysInTooltips

public static boolean isShowHotkeysInTooltips()
Show hotkeys in tooltips by default


setShowHotkeysInTooltips

public static void setShowHotkeysInTooltips(boolean showHotkeysInTooltips)

isShowHotkeysInOneTimeTooltips

public static boolean isShowHotkeysInOneTimeTooltips()
Show hotkeys in one-time tooltips by default


setShowHotkeysInOneTimeTooltips

public static void setShowHotkeysInOneTimeTooltips(boolean showHotkeysInOneTimeTooltips)