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

Add DefaultProperty annotation to ContextMenu

    XMLWordPrintable

Details

    • generic
    • generic

    Description

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

      JUSTIFICATION :
      Having a default property feels natural here. The developer is used to it, because other elements have it, too.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Writing the following in FXML:

                      <ContextMenu>
                              <MenuItem text="item 1"/>
                              <MenuItem text="item 2"/>
                      </ContextMenu>

      ACTUAL -
      You have to write the items tag as well:

                      <ContextMenu>
                          <items>
                              <MenuItem text="item 1"/>
                              <MenuItem text="item 2"/>
                          </items>
                      </ContextMenu>


      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: