Package org.drools.guvnor.client.modeldriven.dt

Examples of org.drools.guvnor.client.modeldriven.dt.ConditionCol


  }

  private ListBox loadBoundFacts() {
    Set facts = new HashSet();
    for (int i = 0; i < this.dt.conditionCols.size(); i++) {
      ConditionCol c = (ConditionCol) dt.conditionCols.get(i);
      facts.add(c.boundName);
    }

    ListBox box = new ListBox();
    for (Iterator iterator = facts.iterator(); iterator.hasNext();) {
View Full Code Here


  public GuidedDTColumnConfig(SuggestionCompletionEngine sce, final GuidedDecisionTable dt, final Command refreshGrid, final ConditionCol col, final boolean isNew) {
    super();
    this.setModal(false);
    this.dt = dt;
    this.sce = sce;
    this.editingCol = new ConditionCol();
    editingCol.boundName = col.boundName;
    editingCol.constraintValueType = col.constraintValueType;
    editingCol.factField = col.factField;
    editingCol.factType = col.factType;
    editingCol.header = col.header;
View Full Code Here

  private ListBox loadPatterns() {
    Set vars = new HashSet();
    ListBox patterns = new ListBox();
    for (int i = 0; i < dt.conditionCols.size(); i++) {
      ConditionCol c = dt.conditionCols.get(i);
      if (!vars.contains(c.boundName)) {
        patterns.addItem(c.factType + " [" + c.boundName + "]", c.factType + " " + c.boundName);
        vars.add(c.boundName);
      }
    }
View Full Code Here

      if (c.attr.equals(dt.groupField)) {
        list.setSelectedIndex(list.getItemCount() - 1);
      }
    }
    for (Iterator iterator = dt.conditionCols.iterator(); iterator.hasNext();) {
      ConditionCol c = (ConditionCol) iterator.next();
      list.addItem(c.header, c.header);
      if (c.header.equals(dt.groupField)) {
        list.setSelectedIndex(list.getItemCount() - 1);
      }
    }
View Full Code Here

  }

  private void refreshConditionsWidget() {
    this.conditionsConfigWidget.clear();
    for (int i = 0; i < dt.conditionCols.size(); i++) {
      ConditionCol c = dt.conditionCols.get(i);
      HorizontalPanel hp = new HorizontalPanel();
      hp.add(removeCondition(c));
      hp.add(editCondition(c));
      hp.add(new SmallLabel(c.header));
      conditionsConfigWidget.add(hp);
View Full Code Here


  }

  private Widget newCondition() {
    final ConditionCol newCol = new ConditionCol();
    newCol.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
    return new ImageButton("images/new_item.gif", constants.AddANewConditionColumn(), new ClickListener() { //NON-NLS
      public void onClick(Widget w) {
        GuidedDTColumnConfig dialog = new GuidedDTColumnConfig(getSCE(), dt, new Command() {
          public void execute() {
View Full Code Here


    //do all the condition cols
    for (int i = 0; i < dt.conditionCols.size(); i++) {
      //here we could also deal with numeric type?
      final ConditionCol c = dt.conditionCols.get(i);
      fds[colCount] = new StringFieldDef(c.header);
      cols[colCount] = new ColumnConfig() {
        {
          setHeader(c.header);
          setDataIndex(c.header);
View Full Code Here

  void doConditions(int numOfAttributesAndMeta, List<ConditionCol> conditionCols, String[] row, RuleModel rm) {

    List<FactPattern> patterns = new ArrayList<FactPattern>();

    for (int i = 0; i < conditionCols.size(); i++) {
      ConditionCol c = (ConditionCol) conditionCols.get(i);
      String cell = row[i + GuidedDecisionTable.INTERNAL_ELEMENTS + numOfAttributesAndMeta];
      if (validCell(cell)) {

        //get or create the pattern it belongs too
        FactPattern fp = find(patterns, c.boundName);
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.modeldriven.dt.ConditionCol

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.