protected IFigure createFigure() {
   ReturnMessageModel model = (ReturnMessageModel) getModel();
   ReturnMessageConnectionFigure figure = new ReturnMessageConnectionFigure();
   figure.getLabel().setText(model.getName());
   figure.locateLabel(model.isDirection());
   return figure;
 }
  public void propertyChange(PropertyChangeEvent evt) {
    EntityFigure figure = (EntityFigure) getFigure();
    if (evt.getPropertyName().equals(MessageModel.P_NAME)) {
      ReturnMessageModel model = (ReturnMessageModel) getModel();
      figure.getLabel().setText(model.getName());
    } else if (evt.getPropertyName().equals(MessageModel.P_DIRECTION)) {
      ReturnMessageModel model = (ReturnMessageModel) getModel();
      ((ReturnMessageConnectionFigure) figure).locateLabel(model.isDirection());
    }

    super.propertyChange(evt);
  }
 public void undo() {
   model.attachSource();
   model.attachTarget();
 }
 public void execute() {
   model.detachSource();
   model.detachTarget();
 }