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

Traversal : add default Button support.

    Details

      Description

      Scene should have the ability to have a default action button, and a default cancel button.
      Default Buttons are useful in dialogs to allow a user take a default action without having to navigate to the Button.

      Default Action :
       If an action key (VK_SPACE) reaches the Scene unconsumed, and the Scene has a default action button,
       then the default Button's action listeners will be notified.
       To achieve this we need to add a boolean property, defaultButton, to javafx.scene.controls.Button
       This will give us two new public methods in Button.

        void Button.setDefaultButton(boolean value); // to set/remove a default Button
        boolean Button.isDefaultButton(); // to check is a Button is the default Button :


      Default Cancel :
       If an action key (VK_ESCAPE) reaches the Scene unconsumed, and the Scene has a default cancel button,
       then the Cancel Button's action listeners will be notified.
       To achieve this we need to add a boolean property, cancelButton, to javafx.scene.controls.Button
       This will give us two new public methods in Button.

        void Button.setCancelButton(boolean value); // to set/remove a cancel Button
        boolean Button.isCancelButton(); // to check is a Button is the cancel Button :



        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                miflemi Mick Fleming (Inactive)
                Reporter:
                miflemi Mick Fleming (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: