super("OK");
}
public void actionPerformed(ActionEvent e) {
Locomotive locomotive = presentationModel.getBean();
LocomotivePersistenceIface locomotivePersistence = AdHocRailway
.getInstance().getLocomotivePersistence();
if (locomotive.getId() == 0) {
locomotivePersistence.addLocomotive(locomotive);
} else {
locomotivePersistence.updateLocomotive(locomotive);
}
okPressed = true;
LocomotiveConfig.this.setVisible(false);
}