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

Scroll to first child node shouldn't change JTree's horiz pos. w/in scrollpane

XMLWordPrintable

    • beta
    • generic
    • generic



      Name: krT82822 Date: 01/30/2000


      orig synopsis: "Kestrel RC1: JTree node selection/scrolling behaviour changed (still not right)"

      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)


      Among the bugs that are labelled "fixed" for the Kestrel RC1 release
      is no.4270654. In that bug report, a developer pointed out that when
      using the keyboard to select a node in a JTree (contained in a
      JScrollPane), the horizontal position of the view should not "snap"
      back to 0 if it had a different value.

      However, while the fix for 1.3.0 eliminated this issue by setting
      the horizontal position to the bounds of the node, it didn't fix
      the actual problem, which is: Navigating through a tree (using
      cursor up/down) should NOT modify the _horizontal_ position of the
      scroll pane view.

      Why? Because it's irritating when the user only expects a vertical
      movement but is also confronted with a horizontal one. Secondly,
      because setting the (left edge of the) view position to the bounds
      of the node hides the tree structure (& angled lines) of all of
      the node's parent nodes, thus making it hard to keep track of
      where you currently are in the tree. I guess there can be different
      opinions about what the "right" behaviour is but the probably
      most widely used tree widget implementation (Microsoft's, see
      Windows Explorer) does NOT change the horizontal position.

      This has been submitted as an "early access" bug because
      in the most common case (the user navigates through the
      tree while the horizontal view position is at 0) there
      was no horizontal scrolling in 1.2.2, but there is in 1.3.0.
      In my opinion, this is a regression. Please consider reopening
      bug no.4270654 or filing a new one.

      For an example program, see bug no.4270654.
      (Review ID: 100535)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: