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); }