use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.columns.GridColumnRenderer in project kie-wb-common by kiegroup.
the class BaseExpressionGridGeneralTest method mockColumn.
@SuppressWarnings("unchecked")
private DMNGridColumn mockColumn(final double width, final BaseGrid gridWidget) {
final GridColumn.HeaderMetaData headerMetaData = mock(GridColumn.HeaderMetaData.class);
final GridColumnRenderer columnRenderer = mock(GridColumnRenderer.class);
return new DMNGridColumn(headerMetaData, columnRenderer, width, gridWidget) {
{
setWidth(width);
}
};
}
use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.columns.GridColumnRenderer in project kie-wb-common by kiegroup.
the class BaseExpressionGridGeneralTest method mockColumn.
@SuppressWarnings("unchecked")
private DMNGridColumn mockColumn(final double width, final GridWidget gridWidget) {
final GridColumn.HeaderMetaData headerMetaData = mock(GridColumn.HeaderMetaData.class);
final GridColumnRenderer columnRenderer = mock(GridColumnRenderer.class);
return new DMNGridColumn(headerMetaData, columnRenderer, gridWidget) {
{
setWidth(width);
}
};
}
use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.columns.GridColumnRenderer in project kie-wb-common by kiegroup.
the class ExpressionEditorColumnTest method mockEditor.
@SuppressWarnings("unchecked")
private BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper> mockEditor(final double padding, final double... widthOfCells) {
final GridColumn.HeaderMetaData headerMetaData = mock(GridColumn.HeaderMetaData.class);
final GridColumnRenderer gridColumnRenderer = mock(GridColumnRenderer.class);
final BaseExpressionGrid gridWidget = mock(BaseExpressionGrid.class);
when(gridWidget.getExpression()).thenReturn(Optional::empty);
final GridCellTuple parent = new GridCellTuple(0, 0, null);
final Optional<HasName> hasName = Optional.of(mock(HasName.class));
return new BaseExpressionGrid(parent, Optional.empty(), HasExpression.NOP, hasName, gridPanel, gridLayer, new DMNGridData(), renderer, definitionUtils, sessionManager, sessionCommandManager, canvasCommandFactory, editorSelectedEvent, refreshFormPropertiesEvent, domainObjectSelectionEvent, cellEditorControls, listSelector, translationService, false, 0, readOnlyProvider) {
@Override
protected BaseUIModelMapper makeUiModelMapper() {
return null;
}
@Override
public void initialiseUiColumns() {
for (double width : widthOfCells) {
model.appendColumn(new DMNGridColumn<BaseGrid<Expression>, Object>(headerMetaData, gridColumnRenderer, width, gridWidget) {
{
setMinimumWidth(width);
setWidth(width);
}
});
}
}
@Override
public void initialiseUiRows() {
// Nothing for this test
}
@Override
public void initialiseUiCells() {
// Nothing for this test
}
@Override
public double getPadding() {
return padding;
}
};
}
Aggregations