void (ListDataEvent e) { final List<Integer> visibleIndices = new ArrayList<>(); for (int c = 0; c < model.getSize(); ++c) { final Object visibleItem = model.getElementAt(c); final Integer itemId = obj2index.get(visibleItem); if (itemId != null) { visibleIndices.add(itemId); } } scrub.showItems(visibleIndices, true, true); }