private void populate() { try { allStrokes = new FilteredList<>( FXCollections.observableArrayList(db.getTblSetStroke().getAllStrokes())); strokes.setItems(allStrokes); } catch (Exception e) { ExceptionAlert.showError(LOGGER, lang.format("error.load", "error.subj.stroke"), e); } }
private void onDelete() { SetStroke item = strokes.getSelectionModel().getSelectedItem(); if (item != null) { try { db.getTblSetStroke().deleteSetStroke(item); } catch (Exception e) { ExceptionAlert.showError(LOGGER, lang.format("error.load", "error.subj.stroke"), e); } eventBus.post(new StrokeEvent.StrokeDeleteEvent(item)); } }