Should implement for Merlin.
Name: db100478 Date: 09/08/2000
Committing to merlin release
As this requires a change to either the DefaultListSelectionModel, or a new ListSelectionModel, I'm reassigning to Swing.
Just a reminder that we should take a look at 4759422 when fixing this bug, as it also deals with keyboard navigation/selection (in JTable).
This bug has now been fixed. Here's a summary:
JList, JTable, and JTree all now support discontinuous selection through the keyboard. It is available when the component is in discontiguous selection mode (see ListSelectionModel.MULTIPLE_INTERVAL_SELECTION and TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION).
With JTable and JList, the new behavior is only enabled if the underlying selection models are instances of DefaultListSelectionModel.
When discontinuous selection is enabled, the keyboard user can manipulate the lead index without changing the selection. New key bindings have been added to the UIs to enable this. These bindings are typically the same as the bindings that move the selection, with the addition of a modifier key. (For example, with JList in the Windows look and feel: UP moves the selection up / CTRL-UP moves just the lead up. END moves the selection to the end of the list / CTRL-END moves just the lead to the end of the list). New key bindings have also been added to add/remove items from the selection (For example, with JList in the Windows look and feel, SPACE, CTRL-SPACE, SHIFT-SPACE, CTRL-SHIFT-SPACE have all been implemented to modify the selection as they would on a native Windows list).
As much as possible, the selection behavior of JList, JTable, and JTree has been made consistent.
As part of this change, JTable was modified such that it now treats the lead, rather than the anchor, as the focused item. This was necessary to facilitate discontinuous selection and to make JTable consistent with JList and JTree. This problem was reported separately as 4759422 (*** more below ***) but has been folded into this bug.
Lastly, as part of this fix, a handful of things have been cleaned up with respect to the selection behavior in the three components. For example, I beleive that selectAll and unselectAll behavior now acts like users would expect.
*** 4849062, which reports the same issue as 4759422, has also been closed as a duplicate of this bug. ***