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

setOnAction() should be available on CheckBox, ToggleButton... All ButtonBase?

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
    • Environment:

      win7 build32 32 bits

      Description

      When I discovered the different API for manipulating different controls, I was quite surprised.
      Using the auto completion in NB, I expected to find a setOnAction() method on each "ButtonBase" controls such as Button.

      I now understand that, in some case we have to use the setOnAction() (Button or HyperLink) and have to use the selectedProperty for others.
      For the JavaFX adoption, I would like to have more common strategy for most of controls.
      Moreover, when I design a new GUI, I often use Buttons, and sometimes I switch the controls to CheckBox etc..., and in that case it no more compiles.

      Maybe I missed a "core design" of the JFX Controls, but from a beginner perspective, I think my point makes sense.

      Thanks for your attention!

        Attachments

          Activity

            People

            Assignee:
            kwwong Kinsley Wong
            Reporter:
            anouardjfx arnaud nouard (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: