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

ButtonBar should have default property

    XMLWordPrintable

Details

    Description

      A DESCRIPTION OF THE REQUEST :
      javafx.scene.control.ButtonBar should have set a javafx.beans.DefaultProperty.

      The default property which I am suggesting is "buttons".

      This way it would be consistent with other nodes like Menu or Pane.

      Desired result:



      JUSTIFICATION :

      Having default properties is nice and the developer is used to it.

      It saves you some time and confusion, because other controls have default properties as well and at least my IDE (IntelliJ) doesn't complain about a missing <buttons/> during development, so you only see the error during runtime.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      You can write:

      <ButtonBar>
                  <Button/>
                  <Button/>
      </ButtonBar>

      instead of

      <ButtonBar>
              <buttons>
                  <Button/>
                  <Button/>
              </buttons>
          </ButtonBar>

      in FXML.
      ACTUAL -
      Currently you must explicitly specify the <buttons/> element.

      Attachments

        Activity

          People

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: