Search in sources :

Example 1 with ConditionCol52DefinitionBuilder

use of org.drools.workbench.screens.guided.dtable.client.widget.table.popovers.definitions.ConditionCol52DefinitionBuilder in project drools-wb by kiegroup.

the class ColumnHeaderPopOverImplTest method makeBuildersInstance.

private Instance<ColumnDefinitionBuilder> makeBuildersInstance() {
    final List<ColumnDefinitionBuilder> builders = new ArrayList<>();
    builders.add(new ConditionCol52DefinitionBuilder(serviceCaller));
    builders.add(new ColumnDefinitionBuilder() {

        @Override
        public Class getSupportedColumnType() {
            return RowNumberCol52.class;
        }

        @Override
        public void generateDefinition(final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback) {
            afterGenerationCallback.callback(column.getHeader());
        }
    });
    builders.add(new ColumnDefinitionBuilder() {

        @Override
        public Class getSupportedColumnType() {
            return DescriptionCol52.class;
        }

        @Override
        public void generateDefinition(final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback) {
            afterGenerationCallback.callback(column.getHeader());
        }
    });
    return new MockInstanceImpl<>(builders);
}
Also used : ColumnDefinitionBuilder(org.drools.workbench.screens.guided.dtable.client.widget.table.popovers.definitions.ColumnDefinitionBuilder) ArrayList(java.util.ArrayList) ConditionCol52DefinitionBuilder(org.drools.workbench.screens.guided.dtable.client.widget.table.popovers.definitions.ConditionCol52DefinitionBuilder) BaseColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn) GuidedDecisionTableView(org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView)

Aggregations

ArrayList (java.util.ArrayList)1 BaseColumn (org.drools.workbench.models.guided.dtable.shared.model.BaseColumn)1 GuidedDecisionTableView (org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView)1 ColumnDefinitionBuilder (org.drools.workbench.screens.guided.dtable.client.widget.table.popovers.definitions.ColumnDefinitionBuilder)1 ConditionCol52DefinitionBuilder (org.drools.workbench.screens.guided.dtable.client.widget.table.popovers.definitions.ConditionCol52DefinitionBuilder)1