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 IFigure createFigure() { SyncMessageModel model = (SyncMessageModel) getModel(); SyncMessageConnectionFigure figure = new SyncMessageConnectionFigure(); figure.build(model.isRecursive()); figure.locateLabel(model.isDirection()); figure.getLabel().setText(model.getOrder() + "." + model.getName()); return figure; }