tornadofx / tornadofx / javafx.scene.control.Menu

Extensions for javafx.scene.control.Menu

checkmenuitem fun Menu.checkmenuitem(name: String, keyCombination: String, graphic: Node? = null, selected: Property<Boolean>? = null, op: CheckMenuItem.() -> Unit = {}): <ERROR CLASS>
fun Menu.checkmenuitem(name: String, keyCombination: KeyCombination? = null, graphic: Node? = null, selected: Property<Boolean>? = null, op: CheckMenuItem.() -> Unit = {}): <ERROR CLASS>
customitem fun Menu.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 Menu.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 action 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 Menu.item(name: String, keyCombination: String, 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.

fun Menu.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 Menu.menu(name: String? = null, keyCombination: KeyCombination? = null, graphic: Node? = null, op: Menu.() -> Unit = {}): <ERROR CLASS>
fun Menu.menu(name: String? = null, keyCombination: String, graphic: Node? = null, op: Menu.() -> Unit = {}): <ERROR CLASS>
menuitem fun Menu.menuitem(name: String, keyCombination: String, graphic: Node? = null, onAction: () -> Unit = {}): <ERROR CLASS>
fun Menu.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> Menu.plusAssign(menuItem: T): Unit
radiomenuitem fun Menu.radiomenuitem(name: String, toggleGroup: ToggleGroup? = null, keyCombination: KeyCombination? = null, graphic: Node? = null, value: Any? = null, op: RadioMenuItem.() -> Unit = {}): <ERROR CLASS>
separator fun Menu.separator(): Unit