public class JToolTipFactory extends Object
Constructor | Description |
---|---|
JToolTipFactory() |
Modifier and Type | Method | Description |
---|---|---|
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 JToolTip s. |
static void |
setSharedInstance(JToolTipFactory factory) |
Sets the
JToolTipFactory that will be used to obtain JToolTip s. |
public JToolTip createToolTip(JComponent c)
c
- the component the tooltip describespublic JToolTip createToolTip(JComponent c, boolean overlapping)
c
- the component the tooltip describesoverlapping
- whether the tooltip is for a normal or overlapping tooltippublic static void setSharedInstance(JToolTipFactory factory)
JToolTipFactory
that will be used to obtain JToolTip
s. This will throw an
IllegalArgumentException
if factory
is null.factory
- the shared factoryIllegalArgumentException
- if factory
is nullpublic static JToolTipFactory getSharedInstance()
JToolTipFactory
which can be used to obtain JToolTip
s.