use of org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellValueTuple in project kie-wb-common by kiegroup.
the class FunctionGrid method doSetKind.
void doSetKind(final FunctionDefinition.Kind kind, final FunctionDefinition function, final Optional<Expression> expression, final Optional<BaseExpressionGrid> editor) {
final GridCellValueTuple gcv = new GridCellValueTuple<>(0, 0, this, new ExpressionCellValue(editor));
sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new SetKindCommand(gcv, function, kind, expression, () -> synchroniseViewWhenExpressionEditorChanged(this)));
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellValueTuple in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testBodyTextBoxFactoryWhenNested.
@Test
public void testBodyTextBoxFactoryWhenNested() {
setupGrid(makeHasNameForDecision(), 1);
final GridCellTuple tupleWithoutValue = new GridCellTuple(0, 3, gridWidget);
final GridCellValueTuple tupleWithValue = new GridCellValueTuple<>(0, 3, gridWidget, new BaseGridCellValue<>("value"));
final TextAreaSingletonDOMElementFactory factory = grid.getBodyTextAreaFactory();
assertThat(factory.getHasNoValueCommand().apply(tupleWithoutValue)).isInstanceOf(DeleteCellValueCommand.class);
assertThat(factory.getHasValueCommand().apply(tupleWithValue)).isInstanceOf(SetCellValueCommand.class);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellValueTuple in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testBodyTextAreaFactoryWhenNested.
@Test
public void testBodyTextAreaFactoryWhenNested() {
setupGrid(makeHasNameForDecision(), 1);
final GridCellTuple tupleWithoutValue = new GridCellTuple(0, 1, gridWidget);
final GridCellValueTuple tupleWithValue = new GridCellValueTuple<>(0, 1, gridWidget, new BaseGridCellValue<>("value"));
final TextAreaSingletonDOMElementFactory factory = grid.getBodyTextAreaFactory();
assertThat(factory.getHasNoValueCommand().apply(tupleWithoutValue)).isInstanceOf(DeleteCellValueCommand.class);
assertThat(factory.getHasValueCommand().apply(tupleWithValue)).isInstanceOf(SetCellValueCommand.class);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellValueTuple in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testBodyTextAreaFactoryWhenNotNested.
@Test
public void testBodyTextAreaFactoryWhenNotNested() {
setupGrid(makeHasNameForDecision(), 0);
final GridCellTuple tupleWithoutValue = new GridCellTuple(0, 1, gridWidget);
final GridCellValueTuple tupleWithValue = new GridCellValueTuple<>(0, 1, gridWidget, new BaseGridCellValue<>("value"));
final TextAreaSingletonDOMElementFactory factory = grid.getBodyTextAreaFactory();
assertThat(factory.getHasNoValueCommand().apply(tupleWithoutValue)).isInstanceOf(DeleteCellValueCommand.class);
assertThat(factory.getHasValueCommand().apply(tupleWithValue)).isInstanceOf(SetCellValueCommand.class);
}
Aggregations