Esempio n. 1
0
 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);
   }
 }
Esempio n. 2
0
 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));
   }
 }