APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.control.skin

public Class ContextMenuSkin

extends Object
implements Skin<ContextMenu>
Class Inheritance
All Implemented Interfaces
javafx.scene.control.Skin
Imports
com.sun.javafx.scene.control.ContextMenuContent, .EmbeddedTextContextMenuContent, .Properties, com.sun.javafx.scene.control.skin.Utils, javafx.event.Event, .EventHandler, javafx.geometry.Bounds, javafx.scene.AccessibleAttribute, .Node, javafx.scene.control.ContextMenu, .Menu, .Skin, javafx.scene.input.KeyCode, .KeyEvent, javafx.scene.layout.Region, javafx.stage.WindowEvent, com.sun.javafx.scene.control.behavior.TwoLevelFocusPopupBehavior

Default Skin implementation for ContextMenu. Several controls use ContextMenu in order to display items in a drop down. This class mostly deals mostly with show / hide logic - the actual content of the context menu is contained within the root node.
Since
9
See Also
ContextMenu

Field Summary

Modifier and TypeField and Description
private final EventHandler<KeyEvent>
private ContextMenu
private double
private double
private final Region
private double
private double
private TwoLevelFocusPopupBehavior

Constructor Summary

AccessConstructor and Description
public
ContextMenuSkin(final ContextMenu
The control that this skin should be installed onto.
control
)

Creates a new ContextMenuSkin instance.

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

public Node
getNode()

Implements javafx.scene.control.Skin.getNode.

Gets the Node which represents this Skin.

public ContextMenu
getSkinnable()

Implements javafx.scene.control.Skin.getSkinnable.

Gets the Skinnable to which this Skin is assigned.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyListenerback to summary
private final EventHandler<KeyEvent> keyListener
popupMenuback to summary
private ContextMenu popupMenu
prefHeightback to summary
private double prefHeight
prefWidthback to summary
private double prefWidth
rootback to summary
private final Region root
shiftXback to summary
private double shiftX
shiftYback to summary
private double shiftY
tlFocusback to summary
private TwoLevelFocusPopupBehavior tlFocus

Constructor Detail

ContextMenuSkinback to summary
public ContextMenuSkin(final ContextMenu control)

Creates a new ContextMenuSkin instance.

Parameters
control:ContextMenu

The control that this skin should be installed onto.

Method Detail

disposeback to summary
public void dispose()

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
getNodeback to summary
public Node getNode()

Implements javafx.scene.control.Skin.getNode.

Doc from javafx.scene.control.Skin.getNode.

Gets the Node which represents this Skin. This must never be null, except after a call to dispose(), and must never change except when changing to null.

Annotations
@Override
getSkinnableback to summary
public ContextMenu getSkinnable()

Implements javafx.scene.control.Skin.getSkinnable.

Doc from javafx.scene.control.Skin.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 to dispose().

The caller who constructs a Skinnable must also construct a Skin and properly establish the relationship between the Control and its Skin.

Annotations
@Override
performPopupShiftsback to summary
private void performPopupShifts()