JIDE 3.5.15

com.jidesoft.swing
Class JToolTipFactory

java.lang.Object
  extended by com.jidesoft.swing.JToolTipFactory

public class JToolTipFactory
extends Object

This class creates instances of JTooltip components. It provides a consistent means for creating custom tooltips without the need for overriding JIDE components that create tooltips


Constructor Summary
JToolTipFactory()
           
 
Method Summary
 JToolTip createToolTip(JComponent c)
          Creates a new tooltip.
 JToolTip createToolTip(JComponent c, boolean overlapping)
          Creates a new tooltip.
static JToolTipFactory getSharedInstance()
          Returns the shared JToolTipFactory which can be used to obtain JToolTips.
static void setSharedInstance(JToolTipFactory factory)
          Sets the JToolTipFactory that will be used to obtain JToolTips.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JToolTipFactory

public JToolTipFactory()
Method Detail

createToolTip

public JToolTip createToolTip(JComponent c)
Creates a new tooltip.

Parameters:
c - the component the tooltip describes
Returns:
the new tooltip object

createToolTip

public JToolTip createToolTip(JComponent c,
                              boolean overlapping)
Creates a new tooltip. If overlapping is true then the tooltip will take on the foreground/background color and font of the specified component (if the component isspecifiedd)

Parameters:
c - the component the tooltip describes
overlapping - whether the tooltip is for a normal or overlapping tooltip
Returns:
the new tooltip object

setSharedInstance

public static void setSharedInstance(JToolTipFactory factory)
Sets the JToolTipFactory that will be used to obtain JToolTips. This will throw an IllegalArgumentException if factory is null.

Parameters:
factory - the shared factory
Throws:
IllegalArgumentException - if factory is null

getSharedInstance

public static JToolTipFactory getSharedInstance()
Returns the shared JToolTipFactory which can be used to obtain JToolTips.

Returns:
the shared factory

JIDE 3.5.15