public class JListHelper
extends java.lang.Object
JList
,
DefaultListModel
Modifier and Type | Field and Description |
---|---|
static int |
MOVE_DOWN
moves items down
|
static int |
MOVE_UP
moves items up
|
Constructor and Description |
---|
JListHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canMoveDown(javax.swing.JList list)
checks whether the selected items can be moved down
|
static boolean |
canMoveUp(javax.swing.JList list)
checks whether the selected items can be moved up
|
static void |
moveBottom(javax.swing.JList list)
moves the selected items to the end
|
static void |
moveDown(javax.swing.JList list)
moves the selected item down by 1
|
static void |
moveTop(javax.swing.JList list)
moves the selected items to the top
|
static void |
moveUp(javax.swing.JList list)
moves the selected items up by 1
|
public static final int MOVE_UP
public static final int MOVE_DOWN
public static void moveUp(javax.swing.JList list)
list
- the JList to work onpublic static void moveDown(javax.swing.JList list)
list
- the JList to work onpublic static void moveTop(javax.swing.JList list)
list
- the JList to work onpublic static void moveBottom(javax.swing.JList list)
list
- the JList to work onpublic static boolean canMoveUp(javax.swing.JList list)
list
- the JList to work onpublic static boolean canMoveDown(javax.swing.JList list)
list
- the JList to work on