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

JTree should fire selection change notice on mouse up

XMLWordPrintable



      Name: jk109818 Date: 01/09/2003


      FULL PRODUCT VERSION :
      java version "1.4.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
      Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)

      FULL OPERATING SYSTEM VERSION :
      Microsoft Windows XP [Version 5.1.2600]

      ADDITIONAL OPERATING SYSTEMS :

      Should appear on all platforms


      A DESCRIPTION OF THE PROBLEM :
      JTree (BasicTreeUI) selects on mouse down. It SHOULD
      highlight the selection-to-be on mouse down and effectuate
      the actual selection on mouse up.

      The problem with the current implementation is that it is
      not possible to drag anything else than the current
      selection. This is contrary to the standard paradigm for
      dragging from a tree (i.e. how Windows Explorer behaves).

      Imagine that you have a two panes where the left pane is a
      tree and the right pane is content representing the
      selected node in the tree (e.g. like Windows Explorer). It
      should be possible to drag and drop one node into the
      content pane representing another (the currently selected)
      node.

      This comment in BasicTreeUI.MouseHandler.handleSelection
      (MouseEvent) supports my view:

      // PENDING: Should select on mouse down, start a drag if
      // the mouse moves, and fire selection change notice on
      // mouse up. That is, the explorer highlights on mouse
      // down, but doesn't update the pane to the right (and
      // open the folder icon) until mouse up.


      REPRODUCIBILITY :
      This bug can be reproduced always.
      (Review ID: 178847)
      ======================================================================

            Unassigned Unassigned
            jkimsunw Jeffrey Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: