Search in sources :

Example 6 with DTColumnConfig52

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

the class DefaultWidgetFactory method setDefaultValue.

private void setDefaultValue() {
    final DTColumnConfig52 column = getPlugin().editingCol();
    column.setDefaultValue(makeNewValue());
}
Also used : DTColumnConfig52(org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52)

Example 7 with DTColumnConfig52

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

the class DefaultWidgetFactory method dataType.

private DataType.DataTypes dataType() {
    final ColumnUtilities columnUtilities = columnUtilities();
    final DTColumnConfig52 column = getPlugin().editingCol();
    if (column instanceof ActionSetFieldCol52) {
        return columnUtilities.getDataType(getPlugin().editingPattern(), (ActionSetFieldCol52) column);
    } else if (column instanceof ConditionCol52) {
        return columnUtilities.getDataType(getPlugin().editingPattern(), (ConditionCol52) column);
    } else {
        return columnUtilities.getDataType(column);
    }
}
Also used : ColumnUtilities(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.ColumnUtilities) ConditionCol52(org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52) DTColumnConfig52(org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52) ActionSetFieldCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)

Example 8 with DTColumnConfig52

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

the class ActionSetFactPlugin method setupValues.

void setupValues() {
    if (!isNewColumn()) {
        final DTColumnConfig52 originalCol = getOriginalColumnConfig52();
        editingWrapper = newActionWrapper(originalCol);
        patternWrapper = newPatternWrapper(editingWrapper());
        setValueOptionsPageAsCompleted();
        fireChangeEvent(patternPage);
        fireChangeEvent(fieldPage);
        fireChangeEvent(additionalInfoPage);
    }
}
Also used : DTColumnConfig52(org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52)

Example 9 with DTColumnConfig52

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

the class AdditionalInfoPageTest method column.

private DTColumnConfig52 column(final String header) {
    final DTColumnConfig52 dtColumnConfig52 = new DTColumnConfig52();
    dtColumnConfig52.setHeader(header);
    return dtColumnConfig52;
}
Also used : DTColumnConfig52(org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52)

Example 10 with DTColumnConfig52

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

the class ActionSetFactPluginTest method testSetupValuesWhenColumnIsNotNew.

@Test
public void testSetupValuesWhenColumnIsNotNew() throws Exception {
    final DTColumnConfig52 column = mock(DTColumnConfig52.class);
    final ActionWrapper actionWrapper = mock(ActionWrapper.class);
    final PatternWrapper patternWrapper = mock(PatternWrapper.class);
    doReturn(column).when(plugin).getOriginalColumnConfig52();
    doReturn(actionWrapper).when(plugin).newActionWrapper(column);
    doReturn(patternWrapper).when(plugin).newPatternWrapper(actionWrapper);
    doReturn(false).when(plugin).isNewColumn();
    plugin.setupValues();
    verify(plugin).setValueOptionsPageAsCompleted();
    verify(plugin).fireChangeEvent(patternPage);
    verify(plugin).fireChangeEvent(fieldPage);
    verify(plugin).fireChangeEvent(additionalInfoPage);
}
Also used : DTColumnConfig52(org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52) PatternWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.PatternWrapper) ActionWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper) Test(org.junit.Test)

Aggregations

DTColumnConfig52 (org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52)10 ConditionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52)4 ActionSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)3 ActionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionCol52)2 BaseColumn (org.drools.workbench.models.guided.dtable.shared.model.BaseColumn)2 LimitedEntryCol (org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol)2 Pattern52 (org.drools.workbench.models.guided.dtable.shared.model.Pattern52)2 PatternWrapper (org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.PatternWrapper)2 Test (org.junit.Test)2 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)1 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)1 ValueChangeEvent (com.google.gwt.event.logical.shared.ValueChangeEvent)1 ValueChangeHandler (com.google.gwt.event.logical.shared.ValueChangeHandler)1 BigInteger (java.math.BigInteger)1 Set (java.util.Set)1 ActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52)1 AttributeCol52 (org.drools.workbench.models.guided.dtable.shared.model.AttributeCol52)1 BRLVariableColumn (org.drools.workbench.models.guided.dtable.shared.model.BRLVariableColumn)1 DTCellValue52 (org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52)1 GuidedDecisionTable52 (org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52)1