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

Undefined behavior of DefaultTreeSelectionModel.getSelectionPath() after setSelectionPaths

    XMLWordPrintable

Details

    • b07
    • generic
    • generic
    • Verified

    Backports

      Description

        If we select several nodes using DefaultTreeSelectionModel.setSelectionPaths it's not quite clear which path in selection will be first. In other words what is the result of getSelectionPath() is undefined. It's not necessary first element of passed in TreePath array. It'll be useful to clarify this situation in the spec.
        ###@###.### 2004-12-17 12:17:44 GMT

        This is closely connected with following JTree.getLastSelectedPathComponent problem.
        By description:
        Returns the last path component in the first node of the current selection.

        getMinSelectionRow() returns the first selected row. But when we call getlastSelectedPathComponent it can return node, not corresponding to first selected row. See example in comments.
        ###@###.### 2004-12-17 14:02:37 GMT

        Attachments

          Issue Links

            Activity

              People

                svioletsunw Scott Violet (Inactive)
                aglasman Alexander Glasman (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: