boolean (@NotNull ListSelectionModel selectionMode) { int minSelectionIndex = selectionMode.getMinSelectionIndex(); int maxSelectionIndex = selectionMode.getMaxSelectionIndex(); if (minSelectionIndex < 0 || maxSelectionIndex < 0) { return false; } List<T> items = getItems(); for (int i = minSelectionIndex; i <= maxSelectionIndex; i++) { if (itemEditor.isRemovable(items.get(i))) { return true; } } return false; }