Пример #1
0
 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;
 }
Пример #2
0
 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);
 }