tornadofx / tornadofx / javafx.scene.control.ContextMenu

Extensions for javafx.scene.control.ContextMenu

checkmenuitem fun ContextMenu.checkmenuitem(name: String, keyCombination: KeyCombination? = null, graphic: Node? = null, op: CheckMenuItem.() -> Unit = {}): <ERROR CLASS>
customitem fun ContextMenu.customitem(keyCombination: KeyCombination? = null, hideOnClick: Boolean = true, op: CustomMenuItem.() -> Unit = {}): <ERROR CLASS>

Create a CustomMenuItem. You must provide a builder inside the CustomMenuItem or assign to the content property of the item. The item action is configured with the action builder.

item fun ContextMenu.item(name: String, keyCombination: KeyCombination? = null, graphic: Node? = null, op: MenuItem.() -> Unit = {}): <ERROR CLASS>

Create a MenuItem. The op block operates on the MenuItem where you can call setOnAction to provide the menu item action. Notice that this differs from the deprecated menuitem builder where the op is configured as the setOnAction directly.

fun ContextMenu.item(name: ObservableValue<String>, keyCombination: KeyCombination? = null, graphic: Node? = null, op: MenuItem.() -> Unit = {}): <ERROR CLASS>

Create a MenuItem with the name property bound to the given observable string. The op block operates on the MenuItem where you can call setOnAction to provide the menu item action. Notice that this differs from the deprecated menuitem builder where the op is configured as the setOnAction directly.

menu fun ContextMenu.menu(name: String? = null, op: Menu.() -> Unit = {}): <ERROR CLASS>
menuitem fun ContextMenu.menuitem(name: String, keyCombination: String, graphic: Node? = null, onAction: () -> Unit = {}): MenuItem
fun ContextMenu.menuitem(name: String, keyCombination: KeyCombination? = null, graphic: Node? = null, onAction: (ActionEvent) -> Unit = {}): <ERROR CLASS>

Create a MenuItem. The op block will be configured as the setOnAction. This will be deprecated in favor of the item call, where the op block operates on the MenuItem. This deprecation was made to align the menuitem builder with the other builders.

plusAssign operator fun <T : MenuItem> ContextMenu.plusAssign(menuItem: T): Unit
radiomenuitem fun ContextMenu.radiomenuitem(name: String, toggleGroup: ToggleGroup? = null, keyCombination: KeyCombination? = null, graphic: Node? = null, value: Any? = null, op: RadioMenuItem.() -> Unit = {}): <ERROR CLASS>
separator fun ContextMenu.separator(op: SeparatorMenuItem.() -> Unit = {}): Unit

Add a separator to the contextmenu