java.lang.Object
javafx.scene.control.skin.TooltipSkin
public class TooltipSkin extends Object implements Skin<Tooltip>
CSS based skin for Tooltip. It deals mostly with show hide logic for
Popup based controls, and specifically in this case for tooltip. It also
implements some of the Skin interface methods.
TooltipContent class is the actual skin implementation of the tooltip.
-
Constructor Summary
Constructors Constructor Description TooltipSkin(Tooltip t)
Creates a new TooltipSkin instance for the givenTooltip
. -
Method Summary
Modifier and Type Method Description void
dispose()
Called by a Skinnable when the Skin is replaced on the Skinnable.Node
getNode()
Gets the Node which represents this Skin.Tooltip
getSkinnable()
Gets the Skinnable to which this Skin is assigned.
-
Constructor Details
-
TooltipSkin
Creates a new TooltipSkin instance for the givenTooltip
.- Parameters:
t
- the tooltip
-
-
Method Details
-
getSkinnable
Gets the Skinnable to which this Skin is assigned. A Skin must be created for one and only one Skinnable. This value will only ever go from a non-null to null value when the Skin is removed from the Skinnable, and only as a consequence of a call toSkin.dispose()
.The caller who constructs a Skinnable must also construct a Skin and properly establish the relationship between the Control and its Skin.
- Specified by:
getSkinnable
in interfaceSkin<Tooltip>
- Returns:
- A non-null Skinnable, or null value if disposed.
-
getNode
Gets the Node which represents this Skin. This must never be null, except after a call toSkin.dispose()
, and must never change except when changing to null. -
dispose
public void dispose()Called by a Skinnable when the Skin is replaced on the Skinnable. This method allows a Skin to implement any logic necessary to clean up itself after the Skin is no longer needed. It may be used to release native resources. The methodsSkin.getSkinnable()
andSkin.getNode()
should return null following a call to dispose. Calling dispose twice has no effect.
-