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

Need a way to prevent double-click from expanding a TreeNode

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7u40, 8
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 7 64-bit
      JavaFX 2.2.40
      JavaFX 8.0b108

      Description

      My use case is a TreeView that acts as a file browser, where files are not necessarily leaf nodes. A double click should open the file without expanding its node in the tree. Single-clicking on the triangle beside the node should still expand/collapse the node. When expanded the node for a file will show items for objects contained within the file. For example consider a .zip file that you can drill into.

      If there is some workaround to prevent double-click from expanding and collapsing nodes in a TreeView please let me know. Installing an EventFilter on the node and consuming the event does not prevent the expand/collapse action from happening.

      Perhaps a simple property doubleClickToExpandCollapse could be used.

      See RT-19246

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              swpalmer Scott Palmer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: