Actions

abstract class Actions

GUI applications can get messy, the classes in this package help reduce the messiness when defining Buttons, ToggleButtons, PropertyRadioButtons, Menus, MenuItems, SubMenus, ToggleMenuItem. It also simplifies keyboard shortcuts.

Create a subclass of Actions, and define the text, graphic, keyboard shortcut (KeyCombination), for each Button, ToggleButton, PropertyRadioButton, Menu, MenuItem, SubMenu, ToggleMenuItem within your application.

Then create an instance of Commands using these definitions, adding the code to be executed when the Command is performed.

See the DemoAction application for an example of how to use Actions, Commands etc.

Here's the latest version of the demos

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun define(name: String, text: String, keyCombination: KeyCombination? = null, tooltip: String? = null): Action

Adds a single Action to the map (actions).

fun define(name: String, text: String, keyCombination: KeyCombination? = null, tooltip: String? = null, block: Action.() -> Unit): Action