Search in sources :

Example 1 with DMNGridRow

use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.

the class FunctionGrid method initialiseUiModel.

@Override
protected void initialiseUiModel() {
    expression.ifPresent(e -> {
        model.appendRow(new DMNGridRow());
        uiModelMapper.fromDMNModel(0, 0);
    });
}
Also used : DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)

Example 2 with DMNGridRow

use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.

the class FunctionSupplementaryGrid method initialiseUiModel.

@Override
public void initialiseUiModel() {
    expression.ifPresent(c -> {
        c.getContextEntry().stream().forEach(ce -> {
            model.appendRow(new DMNGridRow());
            uiModelMapper.fromDMNModel(model.getRowCount() - 1, 0);
            uiModelMapper.fromDMNModel(model.getRowCount() - 1, 1);
            uiModelMapper.fromDMNModel(model.getRowCount() - 1, 2);
        });
    });
}
Also used : DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)

Example 3 with DMNGridRow

use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.

the class LiteralExpressionGrid method initialiseUiModel.

@Override
protected void initialiseUiModel() {
    expression.ifPresent(e -> {
        model.appendRow(new DMNGridRow());
        uiModelMapper.fromDMNModel(0, 0);
    });
}
Also used : DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)

Example 4 with DMNGridRow

use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.

the class RelationGrid method initialiseUiModel.

@Override
public void initialiseUiModel() {
    expression.ifPresent(e -> {
        e.getRow().forEach(r -> {
            int columnIndex = 0;
            model.appendRow(new DMNGridRow());
            uiModelMapper.fromDMNModel(model.getRowCount() - 1, columnIndex++);
            for (int ii = 0; ii < e.getColumn().size(); ii++) {
                uiModelMapper.fromDMNModel(model.getRowCount() - 1, columnIndex++);
            }
        });
    });
}
Also used : DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)

Example 5 with DMNGridRow

use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow in project kie-wb-common by kiegroup.

the class UndefinedExpressionGrid method initialiseUiModel.

@Override
protected void initialiseUiModel() {
    model.appendRow(new DMNGridRow());
    uiModelMapper.fromDMNModel(0, 0);
}
Also used : DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)

Aggregations

DMNGridRow (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)67 Test (org.junit.Test)32 Before (org.junit.Before)16 BaseGridData (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData)13 InformationItem (org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)12 AbstractCanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler)12 CanvasViolation (org.kie.workbench.common.stunner.core.client.command.CanvasViolation)12 List (org.kie.workbench.common.dmn.api.definition.v1_1.List)11 LiteralExpression (org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression)10 Optional (java.util.Optional)9 GridCellTuple (org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellTuple)7 HasExpression (org.kie.workbench.common.dmn.api.definition.HasExpression)6 ContextEntry (org.kie.workbench.common.dmn.api.definition.v1_1.ContextEntry)6 DecisionRule (org.kie.workbench.common.dmn.api.definition.v1_1.DecisionRule)6 Name (org.kie.workbench.common.dmn.api.property.dmn.Name)6 DMNGridData (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData)6 GraphCommandExecutionContext (org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext)6 ExpressionEditorDefinitions (org.kie.workbench.common.dmn.client.editors.expressions.types.ExpressionEditorDefinitions)5 Binding (org.kie.workbench.common.dmn.api.definition.v1_1.Binding)4 RuleViolation (org.kie.workbench.common.stunner.core.rule.RuleViolation)4