void (DnDEvent event) { final Object o = event.getAttachedObject(); final Point p = event.getPoint(); if (o instanceof RowDragInfo && ((RowDragInfo)o).component == component) { int oldIndex = ((RowDragInfo)o).row; if (oldIndex == -1) return; int newIndex = getRow(component, p); if (newIndex == -1) { newIndex = getRowCount(component) - 1; } if (oldIndex != newIndex) { if (model instanceof RefinedDropSupport) { Rectangle cellBounds = getCellBounds(component, newIndex); RefinedDropSupport.Position position = ((RefinedDropSupport)model).isDropInto(component, oldIndex, newIndex) ? INTO : (event.getPoint().y < cellBounds.y + cellBounds.height / 2) ? ABOVE : BELOW; if (((RefinedDropSupport)model).canDrop(oldIndex, newIndex, position)) { ((RefinedDropSupport)model).drop(oldIndex, newIndex, position); } } else { if (model.canExchangeRows(oldIndex, newIndex)) { model.exchangeRows(oldIndex, newIndex); setSelectedRow(component, newIndex); } } } } event.hideHighlighter(); }