Search in sources :

Example 1 with LiteralExpressionGridRow

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

the class DecisionTableGrid method addDecisionRule.

void addDecisionRule(final int index) {
    getExpression().get().ifPresent(dtable -> {
        final GridRow decisionTableRow = new LiteralExpressionGridRow();
        final DecisionRule decisionRule = DecisionRuleFactory.makeDecisionRule(dtable);
        sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new AddDecisionRuleCommand(dtable, decisionRule, model, decisionTableRow, index, uiModelMapper, () -> resize(BaseExpressionGrid.RESIZE_EXISTING)));
    });
}
Also used : AddDecisionRuleCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.AddDecisionRuleCommand) LiteralExpressionGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.LiteralExpressionGridRow) LiteralExpressionGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.LiteralExpressionGridRow) GridRow(org.uberfire.ext.wires.core.grids.client.model.GridRow) DecisionRule(org.kie.workbench.common.dmn.api.definition.model.DecisionRule)

Example 2 with LiteralExpressionGridRow

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

the class RelationGrid method addRow.

void addRow(final int index) {
    getExpression().get().ifPresent(relation -> {
        final GridRow relationRow = new LiteralExpressionGridRow();
        sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new AddRelationRowCommand(relation, new List(), model, relationRow, index, uiModelMapper, () -> resize(BaseExpressionGrid.RESIZE_EXISTING)));
    });
}
Also used : AddRelationRowCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.relation.AddRelationRowCommand) LiteralExpressionGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.LiteralExpressionGridRow) List(org.kie.workbench.common.dmn.api.definition.model.List) ArrayList(java.util.ArrayList) LiteralExpressionGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.LiteralExpressionGridRow) GridRow(org.uberfire.ext.wires.core.grids.client.model.GridRow)

Example 3 with LiteralExpressionGridRow

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

the class DecisionTableGrid method duplicateDecisionRule.

void duplicateDecisionRule(final int index) {
    getExpression().get().ifPresent(dtable -> {
        final GridRow decisionTableRow = new LiteralExpressionGridRow();
        final DecisionRule decisionRule = DecisionRuleFactory.duplicateDecisionRule(index, dtable);
        sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new AddDecisionRuleCommand(dtable, decisionRule, model, decisionTableRow, index, uiModelMapper, () -> resize(BaseExpressionGrid.RESIZE_EXISTING)));
    });
}
Also used : AddDecisionRuleCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.AddDecisionRuleCommand) LiteralExpressionGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.LiteralExpressionGridRow) LiteralExpressionGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.LiteralExpressionGridRow) GridRow(org.uberfire.ext.wires.core.grids.client.model.GridRow) DecisionRule(org.kie.workbench.common.dmn.api.definition.model.DecisionRule)

Aggregations

LiteralExpressionGridRow (org.kie.workbench.common.dmn.client.widgets.grid.model.LiteralExpressionGridRow)3 GridRow (org.uberfire.ext.wires.core.grids.client.model.GridRow)3 DecisionRule (org.kie.workbench.common.dmn.api.definition.model.DecisionRule)2 AddDecisionRuleCommand (org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.AddDecisionRuleCommand)2 ArrayList (java.util.ArrayList)1 List (org.kie.workbench.common.dmn.api.definition.model.List)1 AddRelationRowCommand (org.kie.workbench.common.dmn.client.commands.expressions.types.relation.AddRelationRowCommand)1