public ApplyChangesAction() {
super("OK");
}
public void actionPerformed(ActionEvent e) {
RoutePersistenceIface routePersistence = AdHocRailway.getInstance()
.getRoutePersistence();
Route route = presentationModel.getBean();
if (route.getId() == 0) {
routePersistence.addRoute(route);
} else {
routePersistence.updateRoute(route);
}
okPressed = true;
route.removePropertyChangeListener(RouteConfig.this);
RouteConfig.this.setVisible(false);