int[] (@Nullable final 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.size() == 0 && 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; }