-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.0, 1.4.2
-
generic, x86
-
generic, windows_xp
Name: rmT116609 Date: 06/17/2003
A DESCRIPTION OF THE PROBLEM :
In javax.swing.JTable, many method descriptions don't document how they affect
the selection anchor and/or lead, or the apparent row/column/cell focus.
(If the behavior is specific to the look and feel, then even if JTable isn't
the place for the information, JTable should refer to it (like your look-and-
feel-specific key-bindings page).)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Enough method-specific description to answer questions like:
If after selectAll() is called the GUI user shift-clicks in the middle of the
table, which rows are then selected: from top to clicked-on row? from clicked-
on row to bottom?
If I want the opposite of what JTable does by default, what do I have to do to
get the behavior I want? (That is, enough documentation of the pieces (methods
and common and look-and-feel-specific GUI behavior) to be able to figure what
it takes to get the desired behavior.
(Not that I care about that particular behavior. Actually, I'm trying to
figure out why programmatically setting a selection and then deleting rows
causes the wrong row to end up with the focus (the anchor index? the lead
index?). Unfortunately, the documentation seems to have gaping holes.)
ACTUAL -
* public void selectAll()
Selects all rows, columns, and cells in the table.
(no mention of lead, anchor, or focus (or indirect mention via description
of how it affects subsequent behavior))
* public void clearSelection()
Deselects all selected columns and rows.
(same)
* same for:
setRowSelectionInterval
setColumnSelectionInterval
addRowSelectionInterval
addColumnSelectionInterval
removeRowSelectionInterval
removeColumnSelectionInterval
* changeSelection's description mentions the anchor index, but in only one
case out of four
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTable.html
(Review ID: 186704)
======================================================================
- duplicates
-
JDK-4870710 JTable doc. doesn't seem to describe focus behavior or anchor/lead use
-
- Open
-