Android Utililty Methods JList Element Move

List of utility methods to do JList Element Move

Description

The list of methods to do JList Element Move are organized into topic(s).

Method

booleancanMoveDown(JList list)
checks whether the selected items can be moved down
boolean result;
int[] indices;
result = false;
indices = list.getSelectedIndices();
if (indices.length > 0) {
    if (indices[indices.length - 1] < list.getModel().getSize() - 1)
        result = true;
return result;
booleancanMoveUp(JList list)
checks whether the selected items can be moved up
boolean result;
int[] indices;
result = false;
indices = list.getSelectedIndices();
if (indices.length > 0) {
    if (indices[0] > 0)
        result = true;
return result;