本文整理汇总了Java中org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper.RenderingBlockInformation方法的典型用法代码示例。如果您正苦于以下问题:Java BaseGridRendererHelper.RenderingBlockInformation方法的具体用法?Java BaseGridRendererHelper.RenderingBlockInformation怎么用?Java BaseGridRendererHelper.RenderingBlockInformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper
的用法示例。
在下文中一共展示了BaseGridRendererHelper.RenderingBlockInformation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFloatingColumnInformation
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
private BaseGridRendererHelper.ColumnInformation getFloatingColumnInformation(final int uiColumnIndex) {
final GridColumn<?> column = gridModel.getColumns().get(uiColumnIndex);
final BaseGridRendererHelper rendererHelper = gridWidget.getRendererHelper();
final BaseGridRendererHelper.RenderingInformation renderingInformation = rendererHelper.getRenderingInformation();
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final List<GridColumn<?>> floatingColumns = floatingBlockInformation.getColumns();
if (!floatingColumns.contains(column)) {
return null;
}
return new BaseGridRendererHelper.ColumnInformation(column,
uiColumnIndex,
floatingBlockInformation.getX() + rendererHelper.getColumnOffset(floatingColumns,
floatingColumns.indexOf(column)));
}
示例2: getBodyColumnInformation
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
private BaseGridRendererHelper.ColumnInformation getBodyColumnInformation(final int uiColumnIndex) {
final GridColumn<?> column = gridModel.getColumns().get(uiColumnIndex);
final BaseGridRendererHelper rendererHelper = gridWidget.getRendererHelper();
final BaseGridRendererHelper.RenderingInformation renderingInformation = rendererHelper.getRenderingInformation();
final BaseGridRendererHelper.RenderingBlockInformation bodyBlockInformation = renderingInformation.getBodyBlockInformation();
final List<GridColumn<?>> bodyColumns = bodyBlockInformation.getColumns();
if (!bodyColumns.contains(column)) {
return null;
}
return new BaseGridRendererHelper.ColumnInformation(column,
uiColumnIndex,
bodyBlockInformation.getX() + rendererHelper.getColumnOffset(bodyColumns,
bodyColumns.indexOf(column)));
}
示例3: isGridColumnCandidateForScroll
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
private boolean isGridColumnCandidateForScroll(final GridWidget gridWidget) {
final GridData gridModel = gridWidget.getModel();
final BaseGridRendererHelper rendererHelper = gridWidget.getRendererHelper();
final BaseGridRendererHelper.RenderingInformation renderingInformation = rendererHelper.getRenderingInformation();
if (renderingInformation == null) {
return false;
}
final List<GridColumn<?>> columns = gridModel.getColumns();
final GridData.SelectedCell origin = gridModel.getSelectedCellsOrigin();
final int uiColumnIndex = ColumnIndexUtilities.findUiColumnIndex(columns,
origin.getColumnIndex());
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final List<GridColumn<?>> floatingColumns = floatingBlockInformation.getColumns();
final GridColumn<?> column = columns.get(uiColumnIndex);
return !floatingColumns.contains(column);
}
示例4: makeRenderingInformation
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
private BaseGridRendererHelper.RenderingInformation makeRenderingInformation(final List<Double> rowOffsets) {
return new BaseGridRendererHelper.RenderingInformation(mock(Bounds.class),
model.getColumns(),
new BaseGridRendererHelper.RenderingBlockInformation(model.getColumns(),
0.0,
0.0,
0.0,
100),
new BaseGridRendererHelper.RenderingBlockInformation(Collections.emptyList(),
0.0,
0.0,
0.0,
0.0),
0,
rowOffsets.size() - 1,
rowOffsets,
false,
false,
0,
2,
0);
}
示例5: drawHeader
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
@Override
protected void drawHeader(final BaseGridRendererHelper.RenderingInformation renderingInformation,
final boolean isSelectionLayer) {
super.drawHeader(renderingInformation,
isSelectionLayer);
headerCaption = makeHeaderCaption();
headerCaption.setY(header == null ? 0.0 : header.getY());
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
if (!floatingBlockInformation.getColumns().isEmpty()) {
headerCaption.setX(floatingBlockInformation.getX());
} else {
headerCaption.setX(0.0);
}
add(headerCaption);
}
示例6: getSelectorBounds
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
private Bounds getSelectorBounds(final double width,
final double height,
final BaseGridRendererHelper.RenderingInformation renderingInformation) {
final BaseGridRendererHelper.RenderingBlockInformation bodyBlockInformation = renderingInformation.getBodyBlockInformation();
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
double boundsX = 0.0;
double boundsY = 0.0;
double boundsWidth = width;
double boundsHeight = height;
if (!floatingBlockInformation.getColumns().isEmpty()) {
boundsX = floatingBlockInformation.getX();
boundsWidth = boundsWidth - floatingBlockInformation.getX();
}
if (renderingInformation.isFloatingHeader()) {
boundsY = bodyBlockInformation.getHeaderY();
boundsHeight = boundsHeight - bodyBlockInformation.getHeaderY();
}
return new BaseBounds(boundsX,
boundsY,
boundsWidth,
boundsHeight);
}
示例7: getScreenX
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
private int getScreenX(final GuidedDecisionTableModellerView modellerView,
final GuidedDecisionTableView.Presenter dtPresenter,
final int uiColumnIndex) {
final GridWidget gridWidget = dtPresenter.getView();
final GridColumn<?> uiColumn = gridWidget.getModel().getColumns().get(uiColumnIndex);
final double gx = gridWidget.getX();
final GridLayer layer = modellerView.getGridLayerView();
final int containerX = layer.getDomElementContainer().getAbsoluteLeft();
final double vx = layer.getVisibleBounds().getX();
final Transform t = layer.getViewport().getTransform();
final BaseGridRendererHelper rendererHelper = gridWidget.getRendererHelper();
final BaseGridRendererHelper.RenderingInformation ri = rendererHelper.getRenderingInformation();
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = ri.getFloatingBlockInformation();
final double offsetX = floatingBlockInformation.getColumns().contains(uiColumn) ? floatingBlockInformation.getX() : 0;
final int screenX = containerX + (int) ((gx - vx + offsetX + rendererHelper.getColumnOffset(uiColumn) + uiColumn.getWidth() / 2) * t.getScaleX());
return screenX;
}
示例8: drawHeader
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
protected void drawHeader(final BaseGridRendererHelper.RenderingInformation renderingInformation,
final boolean isSelectionLayer) {
final List<GridColumn<?>> allColumns = renderingInformation.getAllColumns();
final BaseGridRendererHelper.RenderingBlockInformation bodyBlockInformation = renderingInformation.getBodyBlockInformation();
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final List<GridColumn<?>> bodyColumns = bodyBlockInformation.getColumns();
final List<GridColumn<?>> floatingColumns = floatingBlockInformation.getColumns();
final double headerX = bodyBlockInformation.getX();
final double headerY = bodyBlockInformation.getHeaderY();
final double floatingHeaderX = floatingBlockInformation.getX();
final double floatingHeaderY = floatingBlockInformation.getHeaderY();
//Add Header, if applicable
final boolean addFixedHeader = renderingInformation.isFixedHeader();
final boolean addFloatingHeader = renderingInformation.isFloatingHeader();
if (addFixedHeader || addFloatingHeader) {
header = renderGridHeaderWidget(allColumns,
bodyColumns,
isSelectionLayer,
renderingInformation);
header.setX(headerX);
if (addFloatingHeader) {
header.setY(headerY);
}
//Draw floating header columns if required
if (floatingColumns.size() > 0) {
floatingHeader = renderGridHeaderWidget(floatingColumns,
floatingColumns,
isSelectionLayer,
renderingInformation);
floatingHeader.setX(floatingHeaderX);
floatingHeader.setY(floatingHeaderY);
}
}
}
示例9: renderGridBodyWidget
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
/**
* Render the Widget's Body and append to this Group.
* @param blockColumns The columns to render.
* @param absoluteColumnOffsetX Absolute offset from Grid's X co-ordinate to render first column in block.
* @param minVisibleRowIndex The index of the first visible row.
* @param maxVisibleRowIndex The index of the last visible row.
* @param isSelectionLayer Is the SelectionLayer being rendered.
* @param transformer SelectionTransformer in operation.
*/
protected Group renderGridBodyWidget(final List<GridColumn<?>> blockColumns,
final double absoluteColumnOffsetX,
final int minVisibleRowIndex,
final int maxVisibleRowIndex,
final boolean isSelectionLayer,
final SelectionsTransformer transformer,
final BaseGridRendererHelper.RenderingInformation renderingInformation) {
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final double floatingX = floatingBlockInformation.getX();
final double floatingWidth = floatingBlockInformation.getWidth();
final double clipMinY = getAbsoluteY() + (header == null ? 0.0 : header.getY() + getRenderer().getHeaderHeight());
final double clipMinX = getAbsoluteX() + floatingX + floatingWidth;
final GridBodyRenderContext context = new GridBodyRenderContext(getAbsoluteX(),
getAbsoluteY(),
absoluteColumnOffsetX,
clipMinY,
clipMinX,
minVisibleRowIndex,
maxVisibleRowIndex,
blockColumns,
isSelectionLayer,
getViewport().getTransform(),
renderer,
transformer);
final Group g = renderer.renderBody(model,
context,
rendererHelper,
renderingInformation);
return g;
}
示例10: renderSelectedRanges
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
/**
* Render the selected ranges and append to the Body Group.
* @param blockColumns The columns to render.
* @param absoluteColumnOffsetX Absolute offset from Grid's X co-ordinate to render first column in block.
* @param minVisibleRowIndex The index of the first visible row.
* @param maxVisibleRowIndex The index of the last visible row.
* @param transformer SelectionTransformer in operation.
* @return
*/
protected Group renderSelectedRanges(final List<GridColumn<?>> blockColumns,
final double absoluteColumnOffsetX,
final int minVisibleRowIndex,
final int maxVisibleRowIndex,
final SelectionsTransformer transformer,
final BaseGridRendererHelper.RenderingInformation renderingInformation) {
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final double floatingX = floatingBlockInformation.getX();
final double floatingWidth = floatingBlockInformation.getWidth();
final double clipMinY = getAbsoluteY() + (header == null ? 0.0 : header.getY() + getRenderer().getHeaderHeight());
final double clipMinX = getAbsoluteX() + floatingX + floatingWidth;
final GridBodyRenderContext context = new GridBodyRenderContext(getAbsoluteX(),
getAbsoluteY(),
absoluteColumnOffsetX,
clipMinY,
clipMinX,
minVisibleRowIndex,
maxVisibleRowIndex,
blockColumns,
false,
getViewport().getTransform(),
renderer,
transformer);
final Group g = renderer.renderSelectedCells(model,
context,
rendererHelper);
return g;
}
示例11: isOverRowDragHandleColumn
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
private boolean isOverRowDragHandleColumn(final GridWidget view,
final double cx) {
//Gather information on columns
final BaseGridRendererHelper rendererHelper = view.getRendererHelper();
final BaseGridRendererHelper.RenderingInformation renderingInformation = rendererHelper.getRenderingInformation();
if (renderingInformation == null) {
return false;
}
final BaseGridRendererHelper.RenderingBlockInformation bodyBlockInformation = renderingInformation.getBodyBlockInformation();
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final List<GridColumn<?>> bodyColumns = bodyBlockInformation.getColumns();
final List<GridColumn<?>> floatingColumns = floatingBlockInformation.getColumns();
final double bodyX = bodyBlockInformation.getX();
final double floatingX = floatingBlockInformation.getX();
//Check floating columns
if (findRowDragHandleColumn(floatingColumns,
floatingX,
cx) != null) {
return true;
}
//Check all other columns
return findRowDragHandleColumn(bodyColumns,
bodyX,
cx) != null;
}
示例12: edit
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
private boolean edit(final int uiRowIndex,
final BaseGridRendererHelper.ColumnInformation ci) {
final GridColumn<?> column = ci.getColumn();
final int uiColumnIndex = ci.getUiColumnIndex();
final double offsetX = ci.getOffsetX();
//Get rendering information
final GridRenderer renderer = gridWidget.getRenderer();
final BaseGridRendererHelper rendererHelper = gridWidget.getRendererHelper();
final BaseGridRendererHelper.RenderingInformation renderingInformation = rendererHelper.getRenderingInformation();
if (renderingInformation == null) {
return false;
}
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final double floatingX = floatingBlockInformation.getX();
final double floatingWidth = floatingBlockInformation.getWidth();
//Construct context of MouseEvent
final double cellX = gridWidget.getAbsoluteX() + offsetX;
final double cellY = gridWidget.getAbsoluteY() + renderer.getHeaderHeight() + getRowOffset(uiRowIndex,
uiColumnIndex,
rendererHelper);
final double cellHeight = getCellHeight(uiRowIndex,
uiColumnIndex);
final Group header = gridWidget.getHeader();
final double clipMinY = gridWidget.getAbsoluteY() + header.getY() + renderer.getHeaderHeight();
final double clipMinX = gridWidget.getAbsoluteX() + floatingX + floatingWidth;
final GridBodyCellRenderContext context = new GridBodyCellRenderContext(cellX,
cellY,
column.getWidth(),
cellHeight,
clipMinY,
clipMinX,
uiRowIndex,
uiColumnIndex,
floatingBlockInformation.getColumns().contains(column),
gridWidget.getViewport().getTransform(),
renderer);
doEdit(context);
return true;
}
示例13: drawBody
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
protected void drawBody(final BaseGridRendererHelper.RenderingInformation renderingInformation,
final boolean isSelectionLayer) {
final BaseGridRendererHelper.RenderingBlockInformation bodyBlockInformation = renderingInformation.getBodyBlockInformation();
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final List<GridColumn<?>> bodyColumns = bodyBlockInformation.getColumns();
final List<GridColumn<?>> floatingColumns = floatingBlockInformation.getColumns();
final double bodyX = bodyBlockInformation.getX();
final double bodyY = bodyBlockInformation.getBodyY();
final double floatingBodyX = floatingBlockInformation.getX();
final double floatingBodyY = floatingBlockInformation.getBodyY();
final int minVisibleRowIndex = renderingInformation.getMinVisibleRowIndex();
final int maxVisibleRowIndex = renderingInformation.getMaxVisibleRowIndex();
body = renderGridBodyWidget(bodyColumns,
bodyBlockInformation.getX(),
minVisibleRowIndex,
maxVisibleRowIndex,
isSelectionLayer,
bodyTransformer,
renderingInformation);
body.setX(bodyX);
body.setY(bodyY);
//Include selected ranges of cells
if (!isSelectionLayer) {
body.add(renderSelectedRanges(bodyColumns,
bodyBlockInformation.getX(),
minVisibleRowIndex,
maxVisibleRowIndex,
bodyTransformer,
renderingInformation));
}
//Render floating columns
if (floatingColumns.size() > 0) {
floatingBody = renderGridBodyWidget(floatingColumns,
floatingBlockInformation.getX(),
minVisibleRowIndex,
maxVisibleRowIndex,
isSelectionLayer,
floatingColumnsTransformer,
renderingInformation);
floatingBody.setX(floatingBodyX);
floatingBody.setY(floatingBodyY);
//Include selected ranges of cells
if (!isSelectionLayer) {
floatingBody.add(renderSelectedRanges(floatingColumns,
floatingBlockInformation.getX(),
minVisibleRowIndex,
maxVisibleRowIndex,
floatingColumnsTransformer,
renderingInformation));
}
}
}
示例14: findMovableColumns
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
protected void findMovableColumns(final GridWidget view,
final double headerRowsHeight,
final double headerMinY,
final double cx,
final double cy) {
//Gather information on columns
final BaseGridRendererHelper rendererHelper = view.getRendererHelper();
final BaseGridRendererHelper.RenderingInformation renderingInformation = rendererHelper.getRenderingInformation();
if (renderingInformation == null) {
return;
}
final BaseGridRendererHelper.RenderingBlockInformation bodyBlockInformation = renderingInformation.getBodyBlockInformation();
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final List<GridColumn<?>> allColumns = view.getModel().getColumns();
final List<GridColumn<?>> bodyColumns = bodyBlockInformation.getColumns();
final List<GridColumn<?>> floatingColumns = floatingBlockInformation.getColumns();
final double bodyX = bodyBlockInformation.getX();
final double floatingX = floatingBlockInformation.getX();
final double floatingWidth = floatingBlockInformation.getWidth();
//Check all other columns. Floating columns cannot be moved.
double offsetX = bodyX;
for (int headerColumnIndex = 0; headerColumnIndex < bodyColumns.size(); headerColumnIndex++) {
final GridColumn<?> gridColumn = bodyColumns.get(headerColumnIndex);
final double columnWidth = gridColumn.getWidth();
if (gridColumn.isVisible()) {
final List<GridColumn.HeaderMetaData> headerMetaData = gridColumn.getHeaderMetaData();
final double headerRowHeight = headerRowsHeight / headerMetaData.size();
for (int headerRowIndex = 0; headerRowIndex < headerMetaData.size(); headerRowIndex++) {
final GridColumn.HeaderMetaData md = headerMetaData.get(headerRowIndex);
if (gridColumn.isMovable()) {
if (cy < (headerRowIndex + 1) * headerRowHeight + headerMinY) {
if (cx > floatingX + floatingWidth) {
if (cx > offsetX && cx < offsetX + columnWidth) {
//Get the block of columns to be moved.
final List<GridColumn<?>> blockColumns = getBlockColumns(allColumns,
headerMetaData,
headerRowIndex,
allColumns.indexOf(gridColumn));
//If the columns to move are split between body and floating we cannot move them.
for (GridColumn<?> blockColumn : blockColumns) {
if (floatingColumns.contains(blockColumn)) {
return;
}
}
state.setActiveGridWidget(view);
state.setActiveGridColumns(blockColumns);
state.setActiveHeaderMetaData(md);
state.setOperation(GridWidgetDnDHandlersState.GridWidgetHandlersOperation.COLUMN_MOVE_PENDING);
setCursor(Style.Cursor.MOVE);
return;
}
}
}
}
}
offsetX = offsetX + columnWidth;
}
}
}
示例15: handleColumnMove
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected void handleColumnMove(final NodeMouseMoveEvent event) {
final GridWidget activeGridWidget = state.getActiveGridWidget();
final List<GridColumn<?>> activeGridColumns = state.getActiveGridColumns();
final GridColumn.HeaderMetaData activeHeaderMetaData = state.getActiveHeaderMetaData();
final GridData activeGridModel = activeGridWidget.getModel();
final List<GridColumn<?>> allGridColumns = activeGridModel.getColumns();
final BaseGridRendererHelper rendererHelper = activeGridWidget.getRendererHelper();
final BaseGridRendererHelper.RenderingInformation renderingInformation = rendererHelper.getRenderingInformation();
if (renderingInformation == null) {
return;
}
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
final double floatingX = floatingBlockInformation.getX();
final double floatingWidth = floatingBlockInformation.getWidth();
final Point2D ap = CoordinateUtilities.convertDOMToGridCoordinate(activeGridWidget,
new Point2D(event.getX(),
event.getY()));
final double cx = ap.getX();
if (cx < floatingX + floatingWidth) {
return;
}
final double activeBlockWidth = getBlockWidth(allGridColumns,
allGridColumns.indexOf(activeGridColumns.get(0)),
allGridColumns.indexOf(activeGridColumns.get(activeGridColumns.size() - 1)));
for (int headerColumnIndex = 0; headerColumnIndex < allGridColumns.size(); headerColumnIndex++) {
final GridColumn<?> candidateGridColumn = allGridColumns.get(headerColumnIndex);
if (candidateGridColumn.isVisible()) {
if (!activeGridColumns.contains(candidateGridColumn)) {
for (int headerRowIndex = 0; headerRowIndex < candidateGridColumn.getHeaderMetaData().size(); headerRowIndex++) {
final GridColumn.HeaderMetaData candidateHeaderMetaData = candidateGridColumn.getHeaderMetaData().get(headerRowIndex);
if (candidateHeaderMetaData.getColumnGroup().equals(activeHeaderMetaData.getColumnGroup())) {
final int candidateBlockStartColumnIndex = getBlockStartColumnIndex(allGridColumns,
candidateHeaderMetaData,
headerRowIndex,
headerColumnIndex);
final int candidateBlockEndColumnIndex = getBlockEndColumnIndex(allGridColumns,
candidateHeaderMetaData,
headerRowIndex,
headerColumnIndex);
final double candidateBlockOffset = rendererHelper.getColumnOffset(candidateBlockStartColumnIndex);
final double candidateBlockWidth = getBlockWidth(allGridColumns,
candidateBlockStartColumnIndex,
candidateBlockEndColumnIndex);
final double minColX = Math.max(candidateBlockOffset,
candidateBlockOffset + (candidateBlockWidth - activeBlockWidth) / 2);
final double maxColX = Math.min(candidateBlockOffset + candidateBlockWidth,
candidateBlockOffset + (candidateBlockWidth + activeBlockWidth) / 2);
final double midColX = candidateBlockOffset + candidateBlockWidth / 2;
if (cx > minColX && cx < maxColX) {
if (cx < midColX) {
destroyColumns(allGridColumns);
activeGridModel.moveColumnsTo(candidateBlockEndColumnIndex,
activeGridColumns);
state.getEventColumnHighlight().setX(activeGridWidget.getAbsoluteX() + rendererHelper.getColumnOffset(activeGridColumns.get(0)));
layer.batch();
return;
} else {
destroyColumns(allGridColumns);
activeGridModel.moveColumnsTo(candidateBlockStartColumnIndex,
activeGridColumns);
state.getEventColumnHighlight().setX(activeGridWidget.getAbsoluteX() + rendererHelper.getColumnOffset(activeGridColumns.get(0)));
layer.batch();
return;
}
}
}
}
}
}
}
}