Java Code Examples for javafx.scene.control.TableColumn.CellEditEvent#getOldValue()
The following examples show how to use
javafx.scene.control.TableColumn.CellEditEvent#getOldValue() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CTimePeriodField.java From Open-Lowcode with Eclipse Public License 2.0 | 6 votes |
@Override public void handle(CellEditEvent<ObjectTableRow, TimePeriod> event) { try { boolean changed = false; if (event.getOldValue() == null) if (event.getNewValue() != null) changed = true; if (event.getOldValue() != null) if (!(event.getOldValue().equals(event.getNewValue()))) changed = true; if (changed) { ObjectTableRow objecttochange = event.getRowValue(); objecttochange.updateField(thistimeperiodfield.getFieldname(), event.getNewValue()); logger.info("Updated timeperiod for field " + thistimeperiodfield.getFieldname() + ", new value = " + event.getNewValue()); } else { logger.info("received edit event where old values and new values are the same"); } } catch (RuntimeException e) { logger.severe("exception in updating TimePeriod " + thistimeperiodfield.getFieldname() + " : " + e.getClass() + ": " + e.getMessage()); ExceptionLogger.setInLogs(e, logger); } }
Example 2
Source File: CChoiceField.java From Open-Lowcode with Eclipse Public License 2.0 | 5 votes |
@Override public void handle(CellEditEvent<ObjectTableRow, CChoiceFieldValue> event) { try { boolean changed = false; if (event.getOldValue() == null) if (event.getNewValue() != null) changed = true; if (event.getOldValue() != null) if (!(event.getOldValue().equals(event.getNewValue()))) changed = true; if (changed) { ObjectTableRow objecttochange = event.getRowValue(); objecttochange.updateField(thischoicefield.getFieldname(), event.getNewValue()); logger.info("Updated choice value for field " + thischoicefield.getFieldname() + ", new value = " + event.getNewValue()); } else { logger.info("received edit event where old values and new values are the same"); } } catch (RuntimeException e) { logger.severe("exception in updating ChoiceField " + thischoicefield.getFieldname() + " : " + e.getClass().getName() + ": " + e.getMessage()); for (int i = 0; i < e.getStackTrace().length; i++) if (e.getStackTrace()[i].toString().startsWith("org.openlowcode")) logger.severe(" - " + e.getStackTrace()[i].toString()); } }