Search in sources :

Example 1 with UpdateColumnDataEvent

use of org.kie.workbench.common.widgets.decoratedgrid.client.widget.events.UpdateColumnDataEvent in project drools-wb by kiegroup.

the class ModelSynchronizerImpl method fireUpdateColumnDataEvent.

protected void fireUpdateColumnDataEvent() {
    final List<CellValue<? extends Comparable<?>>> columnData = new ArrayList<CellValue<? extends Comparable<?>>>();
    for (int rowIndex = 0; rowIndex < model.getData().size(); rowIndex++) {
        columnData.add(null);
    }
    final UpdateColumnDataEvent event = new UpdateColumnDataEvent(0, columnData);
    eventBus.fireEvent(event);
}
Also used : ArrayList(java.util.ArrayList) CellValue(org.kie.workbench.common.widgets.decoratedgrid.client.widget.CellValue) GridCellValue(org.uberfire.ext.wires.core.grids.client.model.GridCellValue) UpdateColumnDataEvent(org.kie.workbench.common.widgets.decoratedgrid.client.widget.events.UpdateColumnDataEvent)

Example 2 with UpdateColumnDataEvent

use of org.kie.workbench.common.widgets.decoratedgrid.client.widget.events.UpdateColumnDataEvent in project drools-wb by kiegroup.

the class AnalyzerControllerImplTest method updateColumns.

@Test
public void updateColumns() throws Exception {
    final ArrayList<CellValue<? extends Comparable<?>>> columnData = new ArrayList<>();
    columnData.add(mock(CellValue.class));
    controller.onUpdateColumnData(new UpdateColumnDataEvent(10, columnData));
    verify(analyzer).updateColumns(1);
}
Also used : ArrayList(java.util.ArrayList) CellValue(org.kie.workbench.common.widgets.decoratedgrid.client.widget.CellValue) UpdateColumnDataEvent(org.kie.workbench.common.widgets.decoratedgrid.client.widget.events.UpdateColumnDataEvent) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)2 CellValue (org.kie.workbench.common.widgets.decoratedgrid.client.widget.CellValue)2 UpdateColumnDataEvent (org.kie.workbench.common.widgets.decoratedgrid.client.widget.events.UpdateColumnDataEvent)2 Test (org.junit.Test)1 GridCellValue (org.uberfire.ext.wires.core.grids.client.model.GridCellValue)1