예제 #1
0
 @FXML
 void onCountCellEditCommit(CellEditEvent<InventoryItemProperty, Integer> cee) {
   if (cee.getNewValue() == null) {
     inventoryTable.getItems().remove(cee.getTablePosition().getRow());
   } else {
     ((InventoryItemProperty) cee.getTableView().getItems().get(cee.getTablePosition().getRow()))
         .setCount(cee.getNewValue());
   }
 }
예제 #2
0
 @FXML
 void onItemKeyCellEditCommit(CellEditEvent<InventoryItemProperty, String> cee) {
   ((InventoryItemProperty) cee.getTableView().getItems().get(cee.getTablePosition().getRow()))
       .setItemKey(cee.getNewValue());
 }