bibliothek.gui.dock.security
Interface TooltipStrategy

All Known Implementing Classes:
DefaultTooltipStrategy

public interface TooltipStrategy

A TooltipStrategy is used by a GlassedPane to find out which tooltip present.

Author:
Benjamin Sigg

Method Summary
 JToolTip createTooltip(Component component, TooltipStrategyCallback callback)
          Asks this strategy to create a new tooltip, this tooltip will be shown as soon as the current event of the EDT is over.
 void install(GlassedPane pane)
          Called if a GlassedPane starts using this strategy.
 void setTooltipText(Component component, MouseEvent event, boolean overNewComponent, TooltipStrategyCallback callback)
          Asks this strategy to find the tooltip of component, after the event is dispatched.
 void uninstall(GlassedPane pane)
          Called if a GlassedPane is no longer using this strategy.
 

Method Detail

install

void install(GlassedPane pane)
Called if a GlassedPane starts using this strategy.

Parameters:
pane - the pane using this strategy

uninstall

void uninstall(GlassedPane pane)
Called if a GlassedPane is no longer using this strategy.

Parameters:
pane - the pane that is no longer using this strategy

setTooltipText

void setTooltipText(Component component,
                    MouseEvent event,
                    boolean overNewComponent,
                    TooltipStrategyCallback callback)
Asks this strategy to find the tooltip of component, after the event is dispatched.

Parameters:
component - the current component, can be null
event - the event that is dispatched, can be null
overNewComponent - whether the component under the mouse changed since the last call of this method
callback - the caller, this method can call TooltipStrategyCallback.setToolTipText(String) to set a new tooltip

createTooltip

JToolTip createTooltip(Component component,
                       TooltipStrategyCallback callback)
Asks this strategy to create a new tooltip, this tooltip will be shown as soon as the current event of the EDT is over.

Parameters:
component - the component over which the mouse currently hovers, can be null
callback - the caller of this method
Returns:
the new tooltip, must not be null