@Override
  public void refresh() {
    initiatorText.removeFocusListener(listener);
    formKeyText.removeFocusListener(listener);
    PictogramElement pe = getSelectedPictogramElement();
    if (pe != null) {
      Object bo = getBusinessObject(pe);
      // the filter assured, that it is a EClass
      if (bo == null) return;

      StartEvent startEvent = ((StartEvent) bo);

      if (startEvent.getInitiator() != null) {
        initiatorText.setText(startEvent.getInitiator());
      } else {
        initiatorText.setText("");
      }

      if (startEvent.getFormKey() != null) {

        String condition = startEvent.getFormKey();
        formKeyText.setText(condition);
      } else {
        formKeyText.setText("");
      }
    }
    initiatorText.addFocusListener(listener);
    formKeyText.addFocusListener(listener);
  }
Exemplo n.º 2
0
 public void setValues(StartEvent otherEvent) {
   super.setValues(otherEvent);
   setInitiator(otherEvent.getInitiator());
   setFormKey(otherEvent.getFormKey());
   setInterrupting(otherEvent.isInterrupting());
   formProperties = new ArrayList<FormProperty>();
   if (otherEvent.getFormProperties() != null && otherEvent.getFormProperties().size() > 0) {
     for (FormProperty property : otherEvent.getFormProperties()) {
       formProperties.add(property.clone());
     }
   }
 }