Package com.jidesoft.swing
Class JToolTipFactory
- java.lang.Object
-
- com.jidesoft.swing.JToolTipFactory
-
public class JToolTipFactory extends java.lang.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
Constructors Constructor Description JToolTipFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.JToolTip
createToolTip(javax.swing.JComponent c)
Creates a new tooltip.javax.swing.JToolTip
createToolTip(javax.swing.JComponent c, boolean overlapping)
Creates a new tooltip.static JToolTipFactory
getSharedInstance()
Returns the sharedJToolTipFactory
which can be used to obtainJToolTip
s.static void
setSharedInstance(JToolTipFactory factory)
Sets theJToolTipFactory
that will be used to obtainJToolTip
s.
-
-
-
Method Detail
-
createToolTip
public javax.swing.JToolTip createToolTip(javax.swing.JComponent c)
Creates a new tooltip.- Parameters:
c
- the component the tooltip describes- Returns:
- the new tooltip object
-
createToolTip
public javax.swing.JToolTip createToolTip(javax.swing.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 describesoverlapping
- whether the tooltip is for a normal or overlapping tooltip- Returns:
- the new tooltip object
-
setSharedInstance
public static void setSharedInstance(JToolTipFactory factory)
Sets theJToolTipFactory
that will be used to obtainJToolTip
s. This will throw anIllegalArgumentException
iffactory
is null.- Parameters:
factory
- the shared factory- Throws:
java.lang.IllegalArgumentException
- iffactory
is null
-
getSharedInstance
public static JToolTipFactory getSharedInstance()
Returns the sharedJToolTipFactory
which can be used to obtainJToolTip
s.- Returns:
- the shared factory
-
-