Search in sources :

Example 41 with DTCellValue52

use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.

the class DTCellValueWidgetFactory method makeNumericFloatTextBox.

private AbstractRestrictedEntryTextBox makeNumericFloatTextBox(final DTCellValue52 value) {
    final AbstractRestrictedEntryTextBox tb = new NumericFloatTextBox(allowEmptyValues);
    final Float numericValue = (Float) value.getNumericValue();
    tb.setValue(numericValue == null ? "" : numericValue.toString());
    // Wire up update handler
    tb.setEnabled(!isReadOnly);
    addNumericTextBoxChangeHandler(tb, value, (input -> Float.valueOf(input)), (Float) null, new Float("0"));
    return tb;
}
Also used : ChangeEvent(com.google.gwt.event.dom.client.ChangeEvent) ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) ActionSetFieldCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52) OperatorsOracle(org.kie.soup.project.datamodel.oracle.OperatorsOracle) NumericBigDecimalTextBox(org.uberfire.ext.widgets.common.client.common.NumericBigDecimalTextBox) ValueChangeEvent(com.google.gwt.event.logical.shared.ValueChangeEvent) GuidedDecisionTableConstants(org.drools.workbench.screens.guided.dtable.client.resources.i18n.GuidedDecisionTableConstants) Arrays(java.util.Arrays) DataType(org.kie.soup.project.datamodel.oracle.DataType) BaseColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn) ConditionCol52(org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52) ApplicationPreferences(org.kie.workbench.common.services.shared.preferences.ApplicationPreferences) ListBox(org.gwtbootstrap3.client.ui.ListBox) ChangeHandler(com.google.gwt.event.dom.client.ChangeHandler) Function(java.util.function.Function) LimitedEntryDropDownManager(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.LimitedEntryDropDownManager) BigDecimal(java.math.BigDecimal) DateTimeFormat(com.google.gwt.i18n.client.DateTimeFormat) DatePicker(org.uberfire.ext.widgets.common.client.common.DatePicker) AbstractRestrictedEntryTextBox(org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox) Map(java.util.Map) BigInteger(java.math.BigInteger) Pattern52(org.drools.workbench.models.guided.dtable.shared.model.Pattern52) DefaultValueDropDownManager(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.DefaultValueDropDownManager) DropDownData(org.kie.soup.project.datamodel.oracle.DropDownData) DTColumnConfig52(org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52) NumericShortTextBox(org.uberfire.ext.widgets.common.client.common.NumericShortTextBox) NumericTextBox(org.uberfire.ext.widgets.common.client.common.NumericTextBox) NumericIntegerTextBox(org.uberfire.ext.widgets.common.client.common.NumericIntegerTextBox) GuidedDecisionTable52(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52) LimitedEntryCol(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol) Set(java.util.Set) TextBox(org.gwtbootstrap3.client.ui.TextBox) ActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52) AsyncPackageDataModelOracle(org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle) ColumnUtilities(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.ColumnUtilities) EnumDropDownUtilities(org.kie.workbench.common.widgets.client.widget.EnumDropDownUtilities) List(java.util.List) Widget(com.google.gwt.user.client.ui.Widget) NumericLongTextBox(org.uberfire.ext.widgets.common.client.common.NumericLongTextBox) Label(org.gwtbootstrap3.client.ui.Label) NumericDoubleTextBox(org.uberfire.ext.widgets.common.client.common.NumericDoubleTextBox) NumericFloatTextBox(org.uberfire.ext.widgets.common.client.common.NumericFloatTextBox) NumericByteTextBox(org.uberfire.ext.widgets.common.client.common.NumericByteTextBox) NumericBigIntegerTextBox(org.uberfire.ext.widgets.common.client.common.NumericBigIntegerTextBox) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52) AbstractRestrictedEntryTextBox(org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox) NumericFloatTextBox(org.uberfire.ext.widgets.common.client.common.NumericFloatTextBox)

Example 42 with DTCellValue52

use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.

the class DTCellValueWidgetFactory method makeNumericDoubleTextBox.

private AbstractRestrictedEntryTextBox makeNumericDoubleTextBox(final DTCellValue52 value) {
    final AbstractRestrictedEntryTextBox tb = new NumericDoubleTextBox(allowEmptyValues);
    final Double numericValue = (Double) value.getNumericValue();
    tb.setValue(numericValue == null ? "" : numericValue.toString());
    // Wire up update handler
    tb.setEnabled(!isReadOnly);
    addNumericTextBoxChangeHandler(tb, value, (input -> Double.valueOf(input)), (Double) null, new Double("0"));
    return tb;
}
Also used : ChangeEvent(com.google.gwt.event.dom.client.ChangeEvent) ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) ActionSetFieldCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52) OperatorsOracle(org.kie.soup.project.datamodel.oracle.OperatorsOracle) NumericBigDecimalTextBox(org.uberfire.ext.widgets.common.client.common.NumericBigDecimalTextBox) ValueChangeEvent(com.google.gwt.event.logical.shared.ValueChangeEvent) GuidedDecisionTableConstants(org.drools.workbench.screens.guided.dtable.client.resources.i18n.GuidedDecisionTableConstants) Arrays(java.util.Arrays) DataType(org.kie.soup.project.datamodel.oracle.DataType) BaseColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn) ConditionCol52(org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52) ApplicationPreferences(org.kie.workbench.common.services.shared.preferences.ApplicationPreferences) ListBox(org.gwtbootstrap3.client.ui.ListBox) ChangeHandler(com.google.gwt.event.dom.client.ChangeHandler) Function(java.util.function.Function) LimitedEntryDropDownManager(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.LimitedEntryDropDownManager) BigDecimal(java.math.BigDecimal) DateTimeFormat(com.google.gwt.i18n.client.DateTimeFormat) DatePicker(org.uberfire.ext.widgets.common.client.common.DatePicker) AbstractRestrictedEntryTextBox(org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox) Map(java.util.Map) BigInteger(java.math.BigInteger) Pattern52(org.drools.workbench.models.guided.dtable.shared.model.Pattern52) DefaultValueDropDownManager(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.DefaultValueDropDownManager) DropDownData(org.kie.soup.project.datamodel.oracle.DropDownData) DTColumnConfig52(org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52) NumericShortTextBox(org.uberfire.ext.widgets.common.client.common.NumericShortTextBox) NumericTextBox(org.uberfire.ext.widgets.common.client.common.NumericTextBox) NumericIntegerTextBox(org.uberfire.ext.widgets.common.client.common.NumericIntegerTextBox) GuidedDecisionTable52(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52) LimitedEntryCol(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol) Set(java.util.Set) TextBox(org.gwtbootstrap3.client.ui.TextBox) ActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52) AsyncPackageDataModelOracle(org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle) ColumnUtilities(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.ColumnUtilities) EnumDropDownUtilities(org.kie.workbench.common.widgets.client.widget.EnumDropDownUtilities) List(java.util.List) Widget(com.google.gwt.user.client.ui.Widget) NumericLongTextBox(org.uberfire.ext.widgets.common.client.common.NumericLongTextBox) Label(org.gwtbootstrap3.client.ui.Label) NumericDoubleTextBox(org.uberfire.ext.widgets.common.client.common.NumericDoubleTextBox) NumericFloatTextBox(org.uberfire.ext.widgets.common.client.common.NumericFloatTextBox) NumericByteTextBox(org.uberfire.ext.widgets.common.client.common.NumericByteTextBox) NumericBigIntegerTextBox(org.uberfire.ext.widgets.common.client.common.NumericBigIntegerTextBox) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52) AbstractRestrictedEntryTextBox(org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox) NumericDoubleTextBox(org.uberfire.ext.widgets.common.client.common.NumericDoubleTextBox)

Example 43 with DTCellValue52

use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.

the class DTCellValueWidgetFactory method makeNumericBigIntegerTextBox.

private AbstractRestrictedEntryTextBox makeNumericBigIntegerTextBox(final DTCellValue52 value) {
    final AbstractRestrictedEntryTextBox tb = new NumericBigIntegerTextBox(allowEmptyValues);
    final BigInteger numericValue = (BigInteger) value.getNumericValue();
    tb.setValue(numericValue == null ? "" : numericValue.toString());
    // Wire up update handler
    tb.setEnabled(!isReadOnly);
    addNumericTextBoxChangeHandler(tb, value, (input -> new BigInteger(input)), (BigInteger) null, BigInteger.ZERO);
    return tb;
}
Also used : ChangeEvent(com.google.gwt.event.dom.client.ChangeEvent) ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) ActionSetFieldCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52) OperatorsOracle(org.kie.soup.project.datamodel.oracle.OperatorsOracle) NumericBigDecimalTextBox(org.uberfire.ext.widgets.common.client.common.NumericBigDecimalTextBox) ValueChangeEvent(com.google.gwt.event.logical.shared.ValueChangeEvent) GuidedDecisionTableConstants(org.drools.workbench.screens.guided.dtable.client.resources.i18n.GuidedDecisionTableConstants) Arrays(java.util.Arrays) DataType(org.kie.soup.project.datamodel.oracle.DataType) BaseColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn) ConditionCol52(org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52) ApplicationPreferences(org.kie.workbench.common.services.shared.preferences.ApplicationPreferences) ListBox(org.gwtbootstrap3.client.ui.ListBox) ChangeHandler(com.google.gwt.event.dom.client.ChangeHandler) Function(java.util.function.Function) LimitedEntryDropDownManager(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.LimitedEntryDropDownManager) BigDecimal(java.math.BigDecimal) DateTimeFormat(com.google.gwt.i18n.client.DateTimeFormat) DatePicker(org.uberfire.ext.widgets.common.client.common.DatePicker) AbstractRestrictedEntryTextBox(org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox) Map(java.util.Map) BigInteger(java.math.BigInteger) Pattern52(org.drools.workbench.models.guided.dtable.shared.model.Pattern52) DefaultValueDropDownManager(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.DefaultValueDropDownManager) DropDownData(org.kie.soup.project.datamodel.oracle.DropDownData) DTColumnConfig52(org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52) NumericShortTextBox(org.uberfire.ext.widgets.common.client.common.NumericShortTextBox) NumericTextBox(org.uberfire.ext.widgets.common.client.common.NumericTextBox) NumericIntegerTextBox(org.uberfire.ext.widgets.common.client.common.NumericIntegerTextBox) GuidedDecisionTable52(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52) LimitedEntryCol(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol) Set(java.util.Set) TextBox(org.gwtbootstrap3.client.ui.TextBox) ActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52) AsyncPackageDataModelOracle(org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle) ColumnUtilities(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.ColumnUtilities) EnumDropDownUtilities(org.kie.workbench.common.widgets.client.widget.EnumDropDownUtilities) List(java.util.List) Widget(com.google.gwt.user.client.ui.Widget) NumericLongTextBox(org.uberfire.ext.widgets.common.client.common.NumericLongTextBox) Label(org.gwtbootstrap3.client.ui.Label) NumericDoubleTextBox(org.uberfire.ext.widgets.common.client.common.NumericDoubleTextBox) NumericFloatTextBox(org.uberfire.ext.widgets.common.client.common.NumericFloatTextBox) NumericByteTextBox(org.uberfire.ext.widgets.common.client.common.NumericByteTextBox) NumericBigIntegerTextBox(org.uberfire.ext.widgets.common.client.common.NumericBigIntegerTextBox) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52) AbstractRestrictedEntryTextBox(org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox) BigInteger(java.math.BigInteger) NumericBigIntegerTextBox(org.uberfire.ext.widgets.common.client.common.NumericBigIntegerTextBox)

Example 44 with DTCellValue52

use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.

the class DefaultValueWidgetFactory method getDefaultValueWidget.

// BZ-996932: Added value change notifications.
public static Widget getDefaultValueWidget(final AttributeCol52 ac, final boolean isReadOnly, final DefaultValueChangedEventHandler defaultValueChangedEventHandler) {
    Widget editor = null;
    final String attributeName = ac.getAttribute();
    if (attributeName.equals(RuleAttributeWidget.RULEFLOW_GROUP_ATTR) || attributeName.equals(RuleAttributeWidget.AGENDA_GROUP_ATTR) || attributeName.equals(RuleAttributeWidget.ACTIVATION_GROUP_ATTR) || attributeName.equals(RuleAttributeWidget.TIMER_ATTR) || attributeName.equals(RuleAttributeWidget.CALENDARS_ATTR)) {
        final TextBox tb = TextBoxFactory.getTextBox(DataType.TYPE_STRING);
        if (ac.getDefaultValue() == null) {
            ac.setDefaultValue(new DTCellValue52(""));
        }
        final DTCellValue52 defaultValue = ac.getDefaultValue();
        tb.setValue(defaultValue.getStringValue());
        tb.setEnabled(!isReadOnly);
        if (!isReadOnly) {
            tb.addValueChangeHandler(new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    DTCellValue52 editedDefaultValue = defaultValue.cloneDefaultValueCell();
                    editedDefaultValue.setStringValue(tb.getValue());
                    defaultValueChangedEventHandler.onDefaultValueChanged(new DefaultValueChangedEvent(defaultValue, editedDefaultValue));
                }
            });
        }
        editor = tb;
    } else if (attributeName.equals(RuleAttributeWidget.SALIENCE_ATTR)) {
        final TextBox tb = TextBoxFactory.getTextBox(DataType.TYPE_NUMERIC_INTEGER);
        if (ac.getDefaultValue() == null) {
            ac.setDefaultValue(new DTCellValue52(0));
        } else {
            assertIntegerDefaultValue(ac.getDefaultValue());
        }
        final DTCellValue52 defaultValue = ac.getDefaultValue();
        final Integer numericValue = (Integer) defaultValue.getNumericValue();
        tb.setValue(numericValue == null ? "" : numericValue.toString());
        tb.setEnabled(!isReadOnly);
        if (!isReadOnly) {
            tb.addValueChangeHandler(new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    DTCellValue52 editedDefaultValue = defaultValue.cloneDefaultValueCell();
                    try {
                        editedDefaultValue.setNumericValue(Integer.valueOf(event.getValue()));
                    } catch (NumberFormatException nfe) {
                        editedDefaultValue.setNumericValue(0);
                        tb.setValue("0");
                    } finally {
                        defaultValueChangedEventHandler.onDefaultValueChanged(new DefaultValueChangedEvent(defaultValue, editedDefaultValue));
                    }
                }
            });
        }
        editor = tb;
    } else if (attributeName.equals(RuleAttributeWidget.DURATION_ATTR)) {
        final TextBox tb = TextBoxFactory.getTextBox(DataType.TYPE_NUMERIC_LONG);
        if (ac.getDefaultValue() == null) {
            ac.setDefaultValue(new DTCellValue52(0L));
        } else {
            assertLongDefaultValue(ac.getDefaultValue());
        }
        final DTCellValue52 defaultValue = ac.getDefaultValue();
        final Long numericValue = (Long) defaultValue.getNumericValue();
        tb.setValue(numericValue == null ? "" : numericValue.toString());
        tb.setEnabled(!isReadOnly);
        if (!isReadOnly) {
            tb.addValueChangeHandler(new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    DTCellValue52 editedDefaultValue = defaultValue.cloneDefaultValueCell();
                    try {
                        editedDefaultValue.setNumericValue(Long.valueOf(event.getValue()));
                    } catch (NumberFormatException nfe) {
                        editedDefaultValue.setNumericValue(0L);
                        tb.setValue("0");
                    } finally {
                        defaultValueChangedEventHandler.onDefaultValueChanged(new DefaultValueChangedEvent(defaultValue, editedDefaultValue));
                    }
                }
            });
        }
        editor = tb;
    } else if (attributeName.equals(RuleAttributeWidget.NO_LOOP_ATTR) || attributeName.equals(RuleAttributeWidget.LOCK_ON_ACTIVE_ATTR) || attributeName.equals(RuleAttributeWidget.AUTO_FOCUS_ATTR) || attributeName.equals(RuleAttributeWidget.ENABLED_ATTR) || attributeName.equals(GuidedDecisionTable52.NEGATE_RULE_ATTR)) {
        final CheckBox cb = new CheckBox();
        if (ac.getDefaultValue() == null) {
            ac.setDefaultValue(new DTCellValue52(Boolean.FALSE));
        } else {
            assertBooleanDefaultValue(ac.getDefaultValue());
        }
        final DTCellValue52 defaultValue = ac.getDefaultValue();
        final Boolean booleanValue = defaultValue.getBooleanValue();
        cb.setEnabled(!isReadOnly);
        if (booleanValue == null) {
            cb.setValue(false);
            defaultValue.setBooleanValue(Boolean.FALSE);
        } else {
            cb.setValue(booleanValue);
        }
        cb.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                DTCellValue52 editedDefaultValue = defaultValue.cloneDefaultValueCell();
                editedDefaultValue.setBooleanValue(cb.getValue());
                defaultValueChangedEventHandler.onDefaultValueChanged(new DefaultValueChangedEvent(defaultValue, editedDefaultValue));
            }
        });
        editor = cb;
    } else if (attributeName.equals(RuleAttributeWidget.DATE_EFFECTIVE_ATTR) || attributeName.equals(RuleAttributeWidget.DATE_EXPIRES_ATTR)) {
        if (ac.getDefaultValue() == null) {
            ac.setDefaultValue(new DTCellValue52(new Date()));
        } else {
            assertDateDefaultValue(ac.getDefaultValue());
        }
        final DTCellValue52 defaultValue = ac.getDefaultValue();
        if (isReadOnly) {
            final TextBox tb = TextBoxFactory.getTextBox(DataType.TYPE_STRING);
            tb.setValue(format.format(defaultValue.getDateValue()));
            tb.setEnabled(false);
        } else {
            final DatePicker datePicker = new DatePicker();
            // Wire up update handler
            datePicker.addChangeDateHandler((e) -> {
                DTCellValue52 editedDefaultValue = defaultValue.cloneDefaultValueCell();
                editedDefaultValue.setDateValue(datePicker.getValue());
                defaultValueChangedEventHandler.onDefaultValueChanged(new DefaultValueChangedEvent(defaultValue, editedDefaultValue));
            });
            final Date dateValue = defaultValue.getDateValue();
            datePicker.setFormat(DATE_FORMAT);
            datePicker.setValue(dateValue);
            editor = datePicker;
        }
    } else if (attributeName.equals(RuleAttributeWidget.DIALECT_ATTR)) {
        final ListBox lb = new ListBox();
        lb.addItem(RuleAttributeWidget.DIALECTS[0]);
        lb.addItem(RuleAttributeWidget.DIALECTS[1]);
        if (ac.getDefaultValue() == null) {
            ac.setDefaultValue(new DTCellValue52(RuleAttributeWidget.DIALECTS[1]));
        }
        final DTCellValue52 defaultValue = ac.getDefaultValue();
        final String stringValue = defaultValue.getStringValue();
        lb.setEnabled(!isReadOnly);
        if (!isReadOnly) {
            lb.addChangeHandler(new ChangeHandler() {

                @Override
                public void onChange(ChangeEvent event) {
                    final int selectedIndex = lb.getSelectedIndex();
                    if (selectedIndex < 0) {
                        return;
                    }
                    DTCellValue52 editedDefaultValue = defaultValue.cloneDefaultValueCell();
                    editedDefaultValue.setStringValue(lb.getValue(selectedIndex));
                    defaultValueChangedEventHandler.onDefaultValueChanged(new DefaultValueChangedEvent(defaultValue, editedDefaultValue));
                }
            });
        }
        if (stringValue == null || stringValue.isEmpty()) {
            lb.setSelectedIndex(1);
            defaultValue.setStringValue(RuleAttributeWidget.DIALECTS[1]);
        } else if (stringValue.equals(RuleAttributeWidget.DIALECTS[0])) {
            lb.setSelectedIndex(0);
        } else if (stringValue.equals(RuleAttributeWidget.DIALECTS[1])) {
            lb.setSelectedIndex(1);
        } else {
            lb.setSelectedIndex(1);
            defaultValue.setStringValue(RuleAttributeWidget.DIALECTS[1]);
        }
        editor = lb;
    }
    return editor;
}
Also used : ClickEvent(com.google.gwt.event.dom.client.ClickEvent) RuleAttributeWidget(org.drools.workbench.screens.guided.rule.client.editor.RuleAttributeWidget) Widget(com.google.gwt.user.client.ui.Widget) ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) TextBox(org.gwtbootstrap3.client.ui.TextBox) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52) Date(java.util.Date) ValueChangeEvent(com.google.gwt.event.logical.shared.ValueChangeEvent) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ChangeEvent(com.google.gwt.event.dom.client.ChangeEvent) ValueChangeEvent(com.google.gwt.event.logical.shared.ValueChangeEvent) ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) ChangeHandler(com.google.gwt.event.dom.client.ChangeHandler) CheckBox(org.gwtbootstrap3.client.ui.CheckBox) DatePicker(org.uberfire.ext.widgets.common.client.common.DatePicker) ListBox(org.gwtbootstrap3.client.ui.ListBox)

Example 45 with DTCellValue52

use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.

the class GuidedDecisionTablePresenter method initialiseModels.

// Copy Model data to UiModel.
void initialiseModels() {
    initialiseLegacyColumnDataTypes();
    final List<BaseColumn> modelColumns = model.getExpandedColumns();
    for (BaseColumn column : modelColumns) {
        initialiseColumn(column);
    }
    for (List<DTCellValue52> row : model.getData()) {
        initialiseRow(modelColumns, row);
    }
    setOriginalHashCode(model.hashCode());
}
Also used : BaseColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52)

Aggregations

DTCellValue52 (org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52)244 Test (org.junit.Test)121 Pattern52 (org.drools.workbench.models.guided.dtable.shared.model.Pattern52)53 ArrayList (java.util.ArrayList)51 ConditionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52)46 GuidedDecisionTable52 (org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52)46 BaseColumn (org.drools.workbench.models.guided.dtable.shared.model.BaseColumn)39 LimitedEntryConditionCol52 (org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryConditionCol52)39 AttributeCol52 (org.drools.workbench.models.guided.dtable.shared.model.AttributeCol52)30 List (java.util.List)29 ActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52)28 BaseSingleFieldConstraint (org.drools.workbench.models.datamodel.rule.BaseSingleFieldConstraint)27 ActionSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)25 AsyncPackageDataModelOracle (org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle)24 RowNumberCol52 (org.drools.workbench.models.guided.dtable.shared.model.RowNumberCol52)23 DescriptionCol52 (org.drools.workbench.models.guided.dtable.shared.model.DescriptionCol52)21 RuleModel (org.drools.workbench.models.datamodel.rule.RuleModel)20 SingleFieldConstraint (org.drools.workbench.models.datamodel.rule.SingleFieldConstraint)20 GuidedDTTemplateDataProvider (org.drools.workbench.models.guided.dtable.backend.util.GuidedDTTemplateDataProvider)20 TemplateDataProvider (org.drools.workbench.models.guided.dtable.backend.util.TemplateDataProvider)20