APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.javafx.scene.control

public Class ContextMenuContent

extends Region
Class Inheritance
Imports
java.util.ArrayList, .Collections, .List, .Optional, javafx.animation.Animation.Status, .KeyFrame, .Timeline, javafx.beans.InvalidationListener, .WeakInvalidationListener, javafx.beans.property.ReadOnlyBooleanProperty, javafx.beans.value.ChangeListener, javafx.collections.ListChangeListener, .ObservableList, javafx.css.CssMetaData, .PseudoClass, .Styleable, javafx.event.ActionEvent, .EventHandler, javafx.geometry.Bounds, .HPos, .NodeOrientation, .Orientation, .Side, .VPos, javafx.scene.AccessibleAction, .AccessibleAttribute, .AccessibleRole, .Node, .Parent, javafx.scene.control.CheckMenuItem, .ContextMenu, .CustomMenuItem, .Label, .Menu, .MenuItem, .RadioMenuItem, .SeparatorMenuItem, .Skin, javafx.scene.input.KeyEvent, .MouseEvent, .ScrollEvent, javafx.scene.layout.Region, .StackPane, .VBox, javafx.scene.shape.Rectangle, javafx.stage.Window, javafx.util.Duration, com.sun.javafx.scene.NodeHelper, com.sun.javafx.scene.control.behavior.TwoLevelFocusPopupBehavior, com.sun.javafx.scene.control.skin.Utils, com.sun.javafx.scene.traversal.Direction

This is a the SkinBase for ContextMenu based controls so that the CSS parts work right, because otherwise we would have to copy the Keys from there to here.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
private static class

Field Summary

Modifier and TypeField and Description
private static final PseudoClass
private Rectangle
private ContextMenu
private ListChangeListener<MenuItem>
private int
private static final PseudoClass
private ContextMenuContent.ArrowMenuItem
private boolean
private static final String
pack-priv ContextMenuContent.MenuBox
private boolean
private double
maxGraphicWidth

UI subcomponents

private double
private double
private double
private double
private double
private Menu
private InvalidationListener
private static final PseudoClass
pack-priv Region
private double
private ContextMenuContent.ArrowMenuItem
private WeakInvalidationListener
Inherited from javafx.scene.layout.Region:
USE_COMPUTED_SIZEUSE_PREF_SIZE

Constructor Summary

AccessConstructor and Description
public
ContextMenuContent(final ContextMenu popupMenu)

Constructors

Method Summary

Modifier and TypeMethod and Description
protected double
computeMaxHeight(double height)

Overrides javafx.scene.layout.Region.computeMaxHeight.

Computes the maximum height of this region.

protected double
computeMinHeight(double width)

Overrides javafx.scene.layout.Region.computeMinHeight.

Computes the minimum height of this region.

protected double
computePrefHeight(double width)

Overrides javafx.scene.layout.Region.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy.

protected double
computePrefWidth(double height)

Overrides javafx.scene.layout.Region.computePrefWidth.

Computes the preferred width of this region for the given height.

private void
private void
public void
dispose()

Can be called by Skins when they need to clean up the content of any ContextMenu instances they might have created.

private void
public void
public void
private void
private void
private int
findFocusedIndex()

Finds the index of currently focused item.

private int
findSibling(final Direction dir, final int startIndex)

public static List<CssMetaData<? extends Styleable, ?>>

Returns:

The CssMetaData associated with this class, which may include the CssMetaData of its superclasses.
getClassCssMetaData
()

Hides javafx.scene.layout.Region.getClassCssMetaData.

Gets the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

private double
public List<CssMetaData<? extends Styleable, ?>>
getCssMetaData()

Overrides javafx.scene.layout.Region.getCssMetaData.

Implements javafx.css.Styleable.getCssMetaData.

This method should delegate to Node#getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.

pack-priv int
private Optional<Node>
protected ObservableList<MenuItem>
public VBox
public Label
getLabelAt(int index)

public double
getMenuYOffset(int menuIndex)

pack-priv Menu
private double
public Styleable
pack-priv ContextMenu
private void
private void
private void
pack-priv boolean
pack-priv boolean
protected void
layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

private void
private void
private void
public void
pack-priv void
scroll(double delta)

private void
pack-priv void
private void
private void
showMenu(Menu menu)

private void
private void
private void
updateMenuShowingListeners(List<? extends MenuItem> items, boolean addListeners)

private void
Inherited from javafx.scene.layout.Region:
backgroundPropertyborderPropertycacheShapePropertycenterShapePropertycomputeMaxWidthcomputeMinWidthgetBackgroundgetBordergetHeightgetInsetsgetMaxHeightgetMaxWidthgetMinHeightgetMinWidthgetOpaqueInsetsgetPaddinggetPrefHeightgetPrefWidthgetShapegetUserAgentStylesheetgetWidthheightPropertyinsetsPropertyisCacheShapeisCenterShapeisResizableisScaleShapeisSnapToPixellayoutInArealayoutInArealayoutInArealayoutInAreamaxHeightmaxHeightPropertymaxWidthmaxWidthPropertyminHeightminHeightPropertyminWidthminWidthPropertyopaqueInsetsPropertypaddingPropertypositionInAreapositionInAreaprefHeightprefHeightPropertyprefWidthprefWidthPropertyresizescaleShapePropertysetBackgroundsetBordersetCacheShapesetCenterShapesetHeightsetMaxHeightsetMaxSizesetMaxWidthsetMinHeightsetMinSizesetMinWidthsetOpaqueInsetssetPaddingsetPrefHeightsetPrefSizesetPrefWidthsetScaleShapesetShapesetSnapToPixelsetWidthshapePropertysnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYsnapToPixelPropertywidthProperty