protected void createEditPolicies() {
   super.createEditPolicies();
   installEditPolicy(
       EditPolicy.COMPONENT_ROLE,
       new ComponentEditPolicy() {
         protected Command getDeleteCommand(GroupRequest request) {
           return new DeleteReturnCommand((ReturnMessageModel) getModel());
         }
       });
 }
  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 propertyChange(PropertyChangeEvent evt) {
   SyncMessageConnectionFigure figure = (SyncMessageConnectionFigure) getFigure();
   Label label = figure.getLabel();
   SyncMessageModel model = (SyncMessageModel) getModel();
   if (evt.getPropertyName().equals(MessageModel.P_NAME)) {
     label.setText(model.getOrder() + "." + model.getName());
   }
   if (evt.getPropertyName().equals(SyncMessageModel.P_ORDER)) {
     label.setText(model.getOrder() + "." + model.getName());
   }
   if (evt.getPropertyName().equals(SyncMessageModel.P_DIRECTION)) {
     figure.locateLabel(model.isDirection());
   }
   super.propertyChange(evt);
 }
 protected void createEditPolicies() {
   super.createEditPolicies();
   installEditPolicy(EditPolicy.COMPONENT_ROLE, new MessageComponentEditPolicy());
 }