-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
6u3
-
x86
-
windows_xp
J2SE Version (please include all output from java -version flag):
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
Does this problem occur on J2SE 5.0.x or 6.0? Yes / No (pick one)
Yes
Operating System Configuration Information (be specific):
Microsoft Windows XP [Version 5.1.2600]
Bug Description:
Inconsistent Responsibility for changing TreeSelection
When collapsing a node, removing a node and even switching the tree model the Tree and its associated
TreeModelHandler are responsible for removing the now invalid selected paths.
However when calling setRoot(null) on the DefaultTreeModel (or any other complete change to a TreeModel),
the LayoutCache is responsible for removing the now invalid selected paths.
This has not been documented and so when developers write their own implementation of a Layout Cache
they need to also remove the invalid selected paths for this one case. I think the
TreeModelHandler.treeStructureChanged method should be changed to clear the selection instead of
the LayoutCache having to clear the selection for this case.
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
Does this problem occur on J2SE 5.0.x or 6.0? Yes / No (pick one)
Yes
Operating System Configuration Information (be specific):
Microsoft Windows XP [Version 5.1.2600]
Bug Description:
Inconsistent Responsibility for changing TreeSelection
When collapsing a node, removing a node and even switching the tree model the Tree and its associated
TreeModelHandler are responsible for removing the now invalid selected paths.
However when calling setRoot(null) on the DefaultTreeModel (or any other complete change to a TreeModel),
the LayoutCache is responsible for removing the now invalid selected paths.
This has not been documented and so when developers write their own implementation of a Layout Cache
they need to also remove the invalid selected paths for this one case. I think the
TreeModelHandler.treeStructureChanged method should be changed to clear the selection instead of
the LayoutCache having to clear the selection for this case.