Search in sources :

Example 1 with BaseGridWidget

use of org.uberfire.ext.wires.core.grids.client.widget.grid.impl.BaseGridWidget in project kie-wb-common by kiegroup.

the class DMNGridPanelContextMenuHandlerTest method mockGridWidget.

private GridWidget mockGridWidget() {
    final GridWidget gridWidget = spy(new BaseGridWidget(new BaseGridData(false), selectionManager, pinnedModeManager, renderer) {

        @Override
        public Layer getLayer() {
            return gridLayer;
        }
    });
    final GridColumn gridColumn = mock(GridColumn.class);
    when(gridColumn.getWidth()).thenReturn(100.0);
    when(gridColumn.isVisible()).thenReturn(true);
    gridWidget.getModel().appendColumn(new RowNumberColumn());
    gridWidget.getModel().appendColumn(gridColumn);
    gridWidget.getModel().appendRow(new BaseGridRow());
    gridWidget.getModel().appendRow(new BaseGridRow());
    return gridWidget;
}
Also used : RowNumberColumn(org.uberfire.ext.wires.core.grids.client.widget.grid.columns.RowNumberColumn) BaseGridWidget(org.uberfire.ext.wires.core.grids.client.widget.grid.impl.BaseGridWidget) BaseGridWidget(org.uberfire.ext.wires.core.grids.client.widget.grid.impl.BaseGridWidget) GridWidget(org.uberfire.ext.wires.core.grids.client.widget.grid.GridWidget) BaseGridRow(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridRow) GridColumn(org.uberfire.ext.wires.core.grids.client.model.GridColumn) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) DMNGridLayer(org.kie.workbench.common.dmn.client.widgets.layer.DMNGridLayer) Layer(com.ait.lienzo.client.core.shape.Layer)

Example 2 with BaseGridWidget

use of org.uberfire.ext.wires.core.grids.client.widget.grid.impl.BaseGridWidget in project kie-wb-common by kiegroup.

the class ExpressionEditorColumnTest method setUp.

@Before
public void setUp() throws Exception {
    gridData = new BaseGridData();
    widget = new BaseGridWidget(gridData, selectionManager, pinnedModeManager, renderer);
    column = new ExpressionEditorColumn(gridLayer, new BaseHeaderMetaData("column header"), widget);
}
Also used : BaseGridWidget(org.uberfire.ext.wires.core.grids.client.widget.grid.impl.BaseGridWidget) BaseHeaderMetaData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) Before(org.junit.Before)

Example 3 with BaseGridWidget

use of org.uberfire.ext.wires.core.grids.client.widget.grid.impl.BaseGridWidget in project kie-wb-common by kiegroup.

the class CommandUtilsTest method setUp.

@Before
public void setUp() throws Exception {
    decisionRuleOne = new DecisionRule();
    decisionRuleTwo = new DecisionRule();
    decisionRuleThree = new DecisionRule();
    decisionRuleOne.setId(new Id("1"));
    decisionRuleTwo.setId(new Id("2"));
    decisionRuleThree.setId(new Id("3"));
    allRows.clear();
    allRows.add(decisionRuleOne);
    allRows.add(decisionRuleTwo);
    allRows.add(decisionRuleThree);
    rowsToMove.clear();
    uiModel = new DMNGridData();
    gridWidget = new BaseGridWidget(uiModel, selectionManager, pinnedModeManager, renderer);
}
Also used : BaseGridWidget(org.uberfire.ext.wires.core.grids.client.widget.grid.impl.BaseGridWidget) Id(org.kie.workbench.common.dmn.api.property.dmn.Id) DMNGridData(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData) DecisionRule(org.kie.workbench.common.dmn.api.definition.v1_1.DecisionRule) Before(org.junit.Before)

Aggregations

BaseGridWidget (org.uberfire.ext.wires.core.grids.client.widget.grid.impl.BaseGridWidget)3 Before (org.junit.Before)2 BaseGridData (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData)2 Layer (com.ait.lienzo.client.core.shape.Layer)1 DecisionRule (org.kie.workbench.common.dmn.api.definition.v1_1.DecisionRule)1 Id (org.kie.workbench.common.dmn.api.property.dmn.Id)1 DMNGridData (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData)1 DMNGridLayer (org.kie.workbench.common.dmn.client.widgets.layer.DMNGridLayer)1 GridColumn (org.uberfire.ext.wires.core.grids.client.model.GridColumn)1 BaseGridRow (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridRow)1 BaseHeaderMetaData (org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData)1 GridWidget (org.uberfire.ext.wires.core.grids.client.widget.grid.GridWidget)1 RowNumberColumn (org.uberfire.ext.wires.core.grids.client.widget.grid.columns.RowNumberColumn)1