use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper.ColumnInformation in project kie-wb-common by kiegroup.
the class BaseGrid method doShowContextMenu.
@SuppressWarnings("unchecked")
private boolean doShowContextMenu(final HasCellEditorControls.Editor editor, final BiFunction<RenderingInformation, ColumnInformation, GridBodyCellEditContext> contextSupplier, final int uiRowIndex, final int uiColumnIndex, final Object binding) {
final GridColumn<?> column = model.getColumns().get(uiColumnIndex);
final RenderingInformation ri = rendererHelper.getRenderingInformation();
final double columnXCoordinate = rendererHelper.getColumnOffset(column) + column.getWidth() / 2;
final ColumnInformation ci = rendererHelper.getColumnInformation(columnXCoordinate);
final GridBodyCellEditContext context = contextSupplier.apply(ri, ci);
final double cellWidth = context.getCellWidth();
final double cellHeight = context.getCellHeight();
editor.bind(binding, uiRowIndex, uiColumnIndex);
cellEditorControls.show(editor, (int) (context.getAbsoluteCellX() + cellWidth / 2), (int) (context.getAbsoluteCellY() + cellHeight / 2));
return true;
}
Aggregations