int column = tme.getColumn();
if (tme.getType() == TableModelEvent.UPDATE) {
ModelTableList tmpTableModel = (ModelTableList) tme.getSource();
EnergyTrajectoryLine energyTrajectoryLine = energyTrajectoryLines.get(row);
switch (column) {
case 1: // start energy
Double startEnergy = (Double) tmpTableModel.getValueAt(row, column);
energyTrajectoryLine.setBeginPosition(startEnergy);
if (controller != null) {
controller.notifyBeginPositionAfterChanged(startEnergy, row);
}
break;
case 2: // end energy
Double endEnergy = (Double) tmpTableModel.getValueAt(row, column);
energyTrajectoryLine.setEndPosition(endEnergy);
if (controller != null) {
controller.notifyEndPositionAfterChanged(endEnergy, row);
}
break;
case 3: // energy step
Double energyStep = (Double) tmpTableModel.getValueAt(row, column);
energyTrajectoryLine.setDelta(energyStep);
if (controller != null) {
controller.notifyDeltaAfterChanged(energyStep, row);
}
break;
case 4: // step number
Integer stepNumber = (Integer) tmpTableModel.getValueAt(row, column);
energyTrajectoryLine.setStepNumber(stepNumber);
if (controller != null) {
controller.notifyStepNumberAfterChanged(stepNumber, row);
}
break;
case 5: // integration time
Double integrationTime = (Double) tmpTableModel.getValueAt(row, column);
energyTrajectoryLine.setIntegrationTime(integrationTime);
if (controller != null) {
controller.notifyIntegrationTimeAfterChanged(integrationTime, row);
}
break;
}