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());
}
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);
}
}
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);
}
}
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;
}
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);
}
Aggregations