| Issue 152: | JListFixture#selectItems(JList, int, int) behavior | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
I'm using version 1.0a1 of the FEST-Swing module.
The implementation for JListFixture#selectItems(JList, int, int) seems to
be wrong.
public void selectItems(JList list, int start, int end) {
int shift = VK_SHIFT;
robot.pressKey(shift);
for (int i = start; i <= end; i++) selectItem(list, i);
robot.releaseKey(shift);
}
The problem is that it selects every single item in the range. Only the
first item should be selected, then the shift key should be pressed, the
last item selected, and finally, the shift key released.
A possible implementation:
public void selectItems(JList list, int start, int end) {
int shift = VK_SHIFT;
selectItem(list, start);
robot.pressKey(shift);
selectItem(list, end);
robot.releaseKey(shift);
}
I would also like to see a toggleItems with a range argument. See issue 147 .
|
||||||||||||||||
,
Jun 10, 2008
Not only that every single item in the range is selected one-by-one, some additional items might be selected, specifically, from the last click in the list to the first item to be selected. |
|||||||||||||||||
,
Jun 12, 2008
Fixed. Thanks a lot Csabi! -Yvonne.
Status: Fixed
|
|||||||||||||||||
,
Jun 14, 2008
:) I'm glad to have helped. Csabi |
|||||||||||||||||
,
Nov 30, 2008
Set the module as a label, instead of being part of the title.
Summary: JListFixture#selectItems(JList, int, int) behavior
Labels: Module-fest-swing |
|||||||||||||||||
|
|
|||||||||||||||||