@Nullable private InjInfo getSelectedInjection() { final int row = myInjectionsTable.getSelectedRow(); return row < 0 ? null : myInjectionsTable.getItems().get(myInjectionsTable.convertRowIndexToModel(row)); }
private List<InjInfo> getSelectedInjections() { final ArrayList<InjInfo> toRemove = new ArrayList<InjInfo>(); for (int row : myInjectionsTable.getSelectedRows()) { toRemove.add(myInjectionsTable.getItems().get(myInjectionsTable.convertRowIndexToModel(row))); } return toRemove; }