Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8091131

[Actions] Implement Actions (many toolkits have them, such as Qt)

    XMLWordPrintable

Details

    Description

      As a long time user of the Qt-toolkit I miss something similar to the QAction class (http://qt-project.org/doc/qt-5/qaction.html#details ) in JavaFX.

      The class can store a label, an icon and a shortcut and is triggered by user actions when exposed in controls.

      In Qt a menu can be built using QActions by just adding the action directly to the menu. The menu shows the icon, the label and the keyboard shortcut.

      A toolbar button can also be created using a QAction as its sole constructor argument. It would show just the icon and when triggered an event is emitted in QAction.

      This means that a controller can store a set of standard actions and listen to when they are triggered totally ignorant about what type of control sent the event. Many different controls on screen can be linked to the same action (in e.g. menus and toolbars).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Imported: