SubMenu

class SubMenu(text: String, graphic: Node? = null) : LabelledMenuItem, WithItems

A type of MenuItem, which displays a PopupMenu when it is hovered over. The PopupMenu is populated from items.

The user does not need to click a SubMenu to open it, in fact clicking does nothing special, and onAction is ignored.

Constructors

Link copied to clipboard
constructor(text: String, graphic: Node? = null)

Properties

Link copied to clipboard
open override val items: MutableObservableList<Node>
Link copied to clipboard
Link copied to clipboard

An event handler which is performed after the button is clicked, but before the popup menu is built.

Link copied to clipboard
Link copied to clipboard

Set to true, after the button is clicked, and before the PopupMenu is displayed. It is reset to false when the PopupMenu is closed.

Functions

Link copied to clipboard
open override fun nodePrefHeight(): Float

Each subclass of node can determine its preferred height. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.

Link copied to clipboard
open override fun nodePrefWidth(): Float

Each subclass of node can determine its preferred width. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.

Link copied to clipboard
fun onShowing(handlerCombination: HandlerCombination = HandlerCombination.AFTER, block: (event: ActionEvent) -> Unit)

Add an event handler which is performed after the button is clicked, but before the popup menu is built.

Link copied to clipboard
open override fun performAction()