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

TreeView: double-click to open/close a TreeItem

XMLWordPrintable

      SceneBuilder uses double-click to start inline editing of a text which is a value of a TreeItem, but the TreeView uses also a double-click to open/close a TreeItem if it contains child items.

      As shown in the attached test, I added an EventFilter to the label, to the treeView, to the parent of the treeView (StackPane), and to the stage, tried to consume a double-click in each of them, but always failed to stop the TreeItem reacting on a double-click.

      Run the test, double-click on the item-3. Clicking on the text will see the printout from your console, which tells which listeners receive the event, if the stackpane consumes the event, the treeView and the label will not receive the event, but the item still reacts to the event to open/close itself.

      clicking aside of the text will not see and printout from the console, the event seems to be consumed directly by the item.

            jgiles Jonathan Giles
            sjiang Shanliang Jiang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: