public static <T> int moveSelectedItemsDown(@NotNull JList<T> list) {
    ListModel<T> model = list.getModel();
    ListModelExtension<T, ListModel<T>> extension = getExtension(model);
    int[] indices = list.getSelectedIndices();
    if (!canMoveSelectedItemsDown(list)) return 0;
    for (int i = indices.length - 1; i >= 0; i--) {
      int index = indices[i];
      T temp = extension.get(model, index);
      extension.set(model, index, extension.get(model, index + 1));
      extension.set(model, index + 1, temp);
      list.removeSelectionInterval(index, index);
      list.addSelectionInterval(index + 1, index + 1);
    }
    Rectangle cellBounds = list.getCellBounds(indices[0] + 1, indices[indices.length - 1] + 1);
    if (cellBounds != null) {
      list.scrollRectToVisible(cellBounds);
    }
    return indices.length;
  }
public static <T> int moveSelectedItemsDown(@NotNull JList<T> list)