com.tensegrity.gui.swt
Class SwtToolTipManager

java.lang.Object
  extended bycom.tensegrity.gui.swt.SwtToolTipManager

public class SwtToolTipManager
extends java.lang.Object

This class is intended to be equivalent to the Swing ToolTipManager and to palliate the lack of means of controlling the tooltips in a SWT environment.

SwtToolTipManager follows the Singleton Design Pattern and the only instance of this class can be retrievd by means of the getInstance() method.

One can register several instances of SwtToolTipGenerator to the instance of SwtToolTipManager. All registered SwtToolTipGenerator instances will then beneficiate from any change made to the following properties:

Version:
$Id: SwtToolTipManager.java,v 1.4 2005/08/02 07:20:28 SebastienGuyon Exp $
Author:
S�bastien Guyon

Field Summary
static int DEFAULT_DISMISS_DELAY
          Default value for the "dismiss delay" property
static boolean DEFAULT_ENABLED
          Default value for the "enabled" property
static int DEFAULT_INITIAL_DELAY
          Default value for the "initial delay" property
static int DEFAULT_RESHOW_DELAY
          Default value for the "reshow delay" property
 
Method Summary
 int getDismissDelay()
          Returns the dismissDelay.
 int getInitialDelay()
          Returns the initialDelay.
static SwtToolTipManager getInstance()
           Returns the singleton instance.
 int getReshowDelay()
          Returns the reshowDelay.
 boolean isEnabled()
          Returns true if tooltips are enabled, false otherwise.
 void registerSwtToolTipGenerator(SwtToolTipGenerator generator)
           Register a SwtToolTipGenerator.
 void setDismissDelay(int dismissDelay)
          Sets the dismissDelay property on all registered SwtToolTipGenerators.
 void setEnabled(boolean enabled)
          Enables or disables the tooltips on all registered SwtToolTipGenerators.
 void setInitialDelay(int initialDelay)
          Sets the initialDelay property on all registered SwtToolTipGenerators.
 void setReshowDelay(int reshowDelay)
          Sets the reshowDelay property on all registered SwtToolTipGenerators.
 void unregisterSwtToolTipGenerator(SwtToolTipGenerator generator)
           Unregisters a SwtToolTipGenerator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENABLED

public static final boolean DEFAULT_ENABLED
Default value for the "enabled" property

See Also:
Constant Field Values

DEFAULT_INITIAL_DELAY

public static final int DEFAULT_INITIAL_DELAY
Default value for the "initial delay" property

See Also:
Constant Field Values

DEFAULT_DISMISS_DELAY

public static final int DEFAULT_DISMISS_DELAY
Default value for the "dismiss delay" property

See Also:
Constant Field Values

DEFAULT_RESHOW_DELAY

public static final int DEFAULT_RESHOW_DELAY
Default value for the "reshow delay" property

See Also:
Constant Field Values
Method Detail

getInstance

public static SwtToolTipManager getInstance()

Returns the singleton instance.

Returns:
the singleton instance.

registerSwtToolTipGenerator

public void registerSwtToolTipGenerator(SwtToolTipGenerator generator)

Register a SwtToolTipGenerator.

Parameters:
generator - a SwtToolTipGenerator to register

unregisterSwtToolTipGenerator

public void unregisterSwtToolTipGenerator(SwtToolTipGenerator generator)

Unregisters a SwtToolTipGenerator. The SwtToolTipGenerator will now be independant from the SwtToolTipManager instance.

Parameters:
generator - the SwtToolTipGenerator to unregister

getDismissDelay

public int getDismissDelay()
Returns the dismissDelay.

Returns:
the dismissDelay.

setDismissDelay

public void setDismissDelay(int dismissDelay)
Sets the dismissDelay property on all registered SwtToolTipGenerators.

Parameters:
dismissDelay - The dismissDelay to set.

isEnabled

public boolean isEnabled()
Returns true if tooltips are enabled, false otherwise.

Returns:
true if tooltips are enabled, false otherwise.

setEnabled

public void setEnabled(boolean enabled)
Enables or disables the tooltips on all registered SwtToolTipGenerators.

Parameters:
enabled - if false no tooltip is displayed.

getInitialDelay

public int getInitialDelay()
Returns the initialDelay.

Returns:
the initialDelay.

setInitialDelay

public void setInitialDelay(int initialDelay)
Sets the initialDelay property on all registered SwtToolTipGenerators.

Parameters:
initialDelay - The initialDelay to set.

getReshowDelay

public int getReshowDelay()
Returns the reshowDelay.

Returns:
the reshowDelay.

setReshowDelay

public void setReshowDelay(int reshowDelay)
Sets the reshowDelay property on all registered SwtToolTipGenerators.

Parameters:
reshowDelay - The reshowDelay to set.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.