Search in sources :

Example 1 with ValidateEvent

use of org.drools.workbench.screens.guided.dtable.client.widget.analysis.controller.ValidateEvent in project drools-wb by kiegroup.

the class ModelSynchronizerImpl method fireValidateEvent.

protected void fireValidateEvent(final GridData.Range rowRange, final Set<Integer> columnRange) {
    final int minRowIndex = rowRange.getMinRowIndex();
    final int maxRowIndex = rowRange.getMaxRowIndex();
    final List<Coordinate> updates = new ArrayList<>();
    for (final Integer columnIndex : columnRange) {
        for (int rowIndex = minRowIndex; rowIndex <= maxRowIndex; rowIndex++) {
            updates.add(new Coordinate(rowIndex, columnIndex));
        }
    }
    final ValidateEvent event = new ValidateEvent(updates);
    eventBus.fireEvent(event);
}
Also used : Coordinate(org.kie.workbench.common.widgets.decoratedgrid.client.widget.data.Coordinate) ArrayList(java.util.ArrayList) ValidateEvent(org.drools.workbench.screens.guided.dtable.client.widget.analysis.controller.ValidateEvent)

Aggregations

ArrayList (java.util.ArrayList)1 ValidateEvent (org.drools.workbench.screens.guided.dtable.client.widget.analysis.controller.ValidateEvent)1 Coordinate (org.kie.workbench.common.widgets.decoratedgrid.client.widget.data.Coordinate)1