public int[] getSelectedCells(final @Nullable Point dragOrigin) {
    ArrayList<Integer> selection = new ArrayList<>();
    RadContainer container = getSelectedGridContainer();
    if (container == null) {
      return ArrayUtilRt.EMPTY_INT_ARRAY;
    }
    int size = getCellCount();
    for(int i=0; i<size; i++) {
      if (mySelectionModel.isSelectedIndex(i)) {
        selection.add(i);
      }
    }
    if (selection.isEmpty() && dragOrigin != null) {
      int cell = getCellAt(dragOrigin);
      if (cell >= 0) {
        return new int[] { cell };
      }
    }
    int[] result = new int[selection.size()];
    for(int i=0; i<selection.size(); i++) {
      result [i] = selection.get(i).intValue();
    }
    return result;
  }
public int[] getSelectedCells(final @Nullable Point dragOrigin)