|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.list.ListUtils
public class ListUtils
A collection of utility methods for JList.
Constructor Summary | |
---|---|
ListUtils()
|
Method Summary | |
---|---|
static void |
ensureSelectionVisible(JList list)
|
static void |
loadSelection(JList list,
int[] selected)
Restore the selection in JList. |
static void |
loadSelectionByValues(JList list,
Object[] selected)
Restores the selection in JList. |
static int[] |
saveSelection(JList list)
Save the selection of the JList as an array of integer. |
static Object[] |
saveSelectionByValues(JList list)
Saves the selection of the JList as an array of objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListUtils()
Method Detail |
---|
public static int[] saveSelection(JList list)
list
-
public static void loadSelection(JList list, int[] selected)
list
- selected
- an int array created by saveSelectionpublic static Object[] saveSelectionByValues(JList list)
saveSelection(javax.swing.JList)
,
this method will return the actual values that are selected. If there are new values added to
or existing values removed from the list and cause the indices, this method will still be able to
restore the selected values correctly.
list
-
public static void loadSelectionByValues(JList list, Object[] selected)
saveSelectionByValues(javax.swing.JList)
.
list
- selected
- an int array created by saveSelectionpublic static void ensureSelectionVisible(JList list)
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |