Basics
Guides
API Reference
Basics
Guides
API Reference
[13:7] extends: FxObj
Wraps JavaFX ContextMenu, a pop-up menu that appears at a cursor position or relative to a control, containing MenuItem entries. Items are added with add(), which accepts a single MenuItem or a list of MenuItems. The context menu is typically shown in response to a right-click event by calling the underlying JavaFX show() method on the wrapped object with the anchor node and screen coordinates.
ContextMenu ()
Creates a new ContextMenu.
add (Items)
Adds one or more menu items.
Items is a MenuItem or a list of MenuItems.this object for chaininggetItems ()
Returns the modifiable list of menu items as an AJO.
An AJO around the ObservableList of MenuItem.getOnAction ()
Returns the current EventHandler AJO assigned to onAction.
An AJO around the EventHandler or null.onActionProperty ()
Returns the ObjectProperty AJO for the onAction handler.
An AJO around the onAction ObjectProperty.setOnAction (callback Cb)
Sets a callback invoked when any item in the menu fires its action.
Cb is a callback function invoked with the ActionEvent AJO.this object for chainingshow (object Anchor, string SideStr, double Dx, double Dy)
Shows the context menu at the given anchor and offset. This wraps the (Node, Side, dx, dy) overload, the most common JavaFX usage.
Anchor is the Node wrapper used as the anchor.SideStr is a string Side enum name ("TOP", "BOTTOM", "LEFT", "RIGHT").Dx is a double X offset in pixels.Dy is a double Y offset in pixels.this object for chaininghide ()
Hides the context menu.
this object for chaining
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.