/**
  * a value has changed in one of the text fields, try to update the model and display the error
  * message if it fails
  */
 @Override
 public void actionPerformed(ActionEvent e) {
   try {
     model.modifyShape(
         currentSelection,
         Double.parseDouble(view.xTextField.getText()),
         Double.parseDouble(view.yTextField.getText()),
         Double.parseDouble(view.widthTextField.getText()),
         Double.parseDouble(view.heightTextField.getText()));
   } catch (NumberFormatException nfe) {
     view.showError("Please provide valid number for shape properties");
   } catch (IllegalArgumentException iae) {
     view.showError(iae.getMessage());
   }
 }