Closed GoogleCodeExporter closed 9 years ago
Currently it is possible, but it requires too much code:
// import org.fest.swing.util.Platform. controlOrCommandKey;
dialog.list("someList").pressKey(controlOrCommandKey())
.selectItem("two")
.selectItem("three")
.releaseKey(controlOrCommandKey());
The code above will press either the "Control" or "Command" button (depending
if you
are using Windows, OSX, etc.) and then selects the items "two" and "three" from
the
JList (plus the selection mode of the JList needs to be
MULTIPLE_INTERVAL_SELECTION).
We need to add a shortcut method...something like this:
dialog.list("someList").selecteItems("two", "three").
The same applies for the JTree.
Original comment by Alex.Rui...@gmail.com
on 3 Dec 2007 at 2:37
You will probably need to distinguish between selecting item 3 to 8 (and all in
between, using SHIFT) and just wanting to select item 3 and 8 (using CONTROL)
Wim
Original comment by wim.debl...@gmail.com
on 5 Dec 2007 at 7:38
Added support for JList. Filing another issue for JTrees.
Original comment by Alex.Rui...@gmail.com
on 5 Dec 2007 at 4:34
Original issue reported on code.google.com by
Alex.Rui...@gmail.com
on 3 Dec 2007 at 2:36