protected void doLayout() {

    int row = 0;
    if (pattern.getFactPattern() != null) {
      FactPattern fact = pattern.getFactPattern();
      if (fact != null) {
        this.layout.setWidget(row++, 0, createFactPatternWidget(fact));
      }
    }

    this.layout.setWidget(row++, 0, getCompositeLabel());
  }
  protected Widget getCompositeLabel() {

    ClickHandler click =
        new ClickHandler() {

          public void onClick(ClickEvent event) {
            Widget w = (Widget) event.getSource();
            showFactTypeSelector(w);
          }
        };
    String lbl =
        "<div class='form-field'>" + HumanReadable.getCEDisplayName("from") + "&nbsp;</div>";

    FlexTable panel = new FlexTable();

    int r = 0;

    if (pattern.getFactPattern() == null) {
      panel.setWidget(
          r,
          0,
          new ClickableLabel(
              "<br> <font color='red'>"
                  + GuidedRuleEditorResources.CONSTANTS.clickToAddPatterns()
                  + "</font>",
              click,
              !this.readOnly));
      r++;
    }

    panel.setWidget(r, 0, new HTML(lbl));
    ExpressionBuilder expressionBuilder =
        new ExpressionBuilder(
            this.getModeller(), this.getEventBus(), this.pattern.getExpression(), this.readOnly);
    expressionBuilder.addOnModifiedCommand(
        new Command() {
          public void execute() {
            setModified(true);
          }
        });
    panel.setWidget(r, 1, expressionBuilder);

    return panel;
  }