当前位置: 首页>>代码示例>>Java>>正文


Java BaseGridRendererHelper.RenderingInformation方法代码示例

本文整理汇总了Java中org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper.RenderingInformation方法的典型用法代码示例。如果您正苦于以下问题:Java BaseGridRendererHelper.RenderingInformation方法的具体用法?Java BaseGridRendererHelper.RenderingInformation怎么用?Java BaseGridRendererHelper.RenderingInformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper的用法示例。


在下文中一共展示了BaseGridRendererHelper.RenderingInformation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: renderColumn

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
@Override
public Group renderColumn(final GridColumn<?> column,
                          final GridBodyColumnRenderContext context,
                          final BaseGridRendererHelper rendererHelper,
                          final BaseGridRendererHelper.RenderingInformation renderingInformation) {
    if (context.getModel().isMerged()) {
        return renderColumnMerged.render(column,
                                         context,
                                         rendererHelper,
                                         renderingInformation);
    } else {
        return renderColumnFlattened.render(column,
                                            context,
                                            rendererHelper,
                                            renderingInformation);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:BaseGridColumnRenderer.java

示例2: showRowHighlight

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
protected void showRowHighlight(final GridWidget view,
                                final List<GridRow> activeGridRows) {
    final BaseGridRendererHelper rendererHelper = view.getRendererHelper();
    final BaseGridRendererHelper.RenderingInformation renderingInformation = rendererHelper.getRenderingInformation();
    if (renderingInformation == null) {
        return;
    }

    final Bounds bounds = renderingInformation.getBounds();
    final GridRow row = activeGridRows.get(0);
    final double rowOffsetY = rendererHelper.getRowOffset(row) + view.getRenderer().getHeaderHeight();

    final double highlightWidth = Math.min(bounds.getX() + bounds.getWidth() - view.getAbsoluteX(),
                                           view.getWidth());
    final double highlightHeight = row.getHeight();

    state.getEventColumnHighlight().setWidth(highlightWidth)
            .setHeight(highlightHeight)
            .setX(view.getAbsoluteX())
            .setY(view.getAbsoluteY() + rowOffsetY);
    layer.add(state.getEventColumnHighlight());
    layer.getLayer().batch();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:GridWidgetDnDMouseDownHandler.java

示例3: 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)));
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:BaseCellSelectionManager.java

示例4: 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);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:20,代码来源:BaseKeyboardOperation.java

示例5: 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);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:BaseGridWidgetRenderingTest.java

示例6: 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);
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:19,代码来源:GuidedDecisionTableViewImpl.java

示例7: renderBody

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
@Override
public List<RendererCommand> renderBody(final GridData model,
                                        final GridBodyRenderContext context,
                                        final BaseGridRendererHelper rendererHelper,
                                        final BaseGridRendererHelper.RenderingInformation renderingInformation) {
    final List<RendererCommand> commands = super.renderBody(model,
                                                            context,
                                                            rendererHelper,
                                                            renderingInformation);
    if (!(rowHighlightRowIndexes == null || rowHighlightRowIndexes.isEmpty())) {
        commands.addAll(renderRowHighlights(model,
                                            context,
                                            rendererHelper,
                                            renderingInformation));
    }
    return commands;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:18,代码来源:GuidedDecisionTableRenderer.java

示例8: 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);
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:23,代码来源:GuidedDecisionTableRenderer.java

示例9: renderRowHighlights

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
List<RendererCommand> renderRowHighlights(final GridData model,
                                          final GridBodyRenderContext context,
                                          final BaseGridRendererHelper rendererHelper,
                                          final BaseGridRendererHelper.RenderingInformation renderingInformation) {
    final List<RendererCommand> commands = new ArrayList<>();
    rowHighlightRowIndexes.stream().forEach((rowIndex) -> {
        final int _rowIndex = rowIndex - 1;
        final int _visibleRowIndex = _rowIndex - renderingInformation.getMinVisibleRowIndex();
        if (_rowIndex >= 0 && _rowIndex < model.getRowCount()) {
            if (_visibleRowIndex >= 0 && _visibleRowIndex < model.getRowCount()) {
                commands.add((RenderSelectedCellsCommand) (parent) -> {
                    parent.add(makeRowHighlight(_rowIndex,
                                                _visibleRowIndex,
                                                model,
                                                context,
                                                rendererHelper));
                });
            }
        }
    });
    return commands;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:23,代码来源:GuidedDecisionTableRenderer.java

示例10: 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;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:21,代码来源:ColumnHeaderPopOverImpl.java

示例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;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:29,代码来源:GridWidgetDnDMouseMoveHandler.java

示例12: renderingWithDOMElementColumnsAndRows

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
@Test
public void renderingWithDOMElementColumnsAndRows() {
    final BaseGridRendererHelper.RenderingInformation ri = makeRenderingInformation(new ArrayList<Double>() {{
        add(ROW_HEIGHT);
    }});
    when(rendererHelper.getRenderingInformation()).thenReturn(ri);

    final BooleanDOMElementColumn column = spy(new BooleanDOMElementColumn(new BaseHeaderMetaData("col1"),
                                                                           new CheckBoxDOMElementFactory(gridLayer,
                                                                                                         gridWidget),
                                                                           100.0));

    model.appendColumn(column);
    model.appendRow(new BaseGridRow(ROW_HEIGHT));

    final Context2D context2D = mock(Context2D.class);
    final BoundingBox boundingBox = mock(BoundingBox.class);

    gridWidget.drawWithTransforms(context2D,
                                  1.0,
                                  boundingBox);

    verify(column,
           times(1)).initialiseResources();
    verify(column,
           times(1)).freeUnusedResources();
    verify(gridWidget,
           times(1)).drawHeader(eq(ri),
                                eq(false));
    verify(gridWidget,
           times(1)).drawBody(eq(ri),
                              eq(false));
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:34,代码来源:BaseGridWidgetRenderingTest.java

示例13: renderingWithDOMElementColumnsAndWithoutRows

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
@Test
public void renderingWithDOMElementColumnsAndWithoutRows() {
    final BaseGridRendererHelper.RenderingInformation ri = makeRenderingInformation(Collections.emptyList());
    when(rendererHelper.getRenderingInformation()).thenReturn(ri);

    final BooleanDOMElementColumn column = spy(new BooleanDOMElementColumn(new BaseHeaderMetaData("col1"),
                                                                           new CheckBoxDOMElementFactory(gridLayer,
                                                                                                         gridWidget),
                                                                           100.0));

    model.appendColumn(column);

    final Context2D context2D = mock(Context2D.class);
    final BoundingBox boundingBox = mock(BoundingBox.class);

    gridWidget.drawWithTransforms(context2D,
                                  1.0,
                                  boundingBox);

    verify(column,
           times(1)).initialiseResources();
    verify(column,
           times(1)).freeUnusedResources();
    verify(gridWidget,
           times(1)).drawHeader(eq(ri),
                                eq(false));
    verify(gridWidget,
           never()).drawBody(any(BaseGridRendererHelper.RenderingInformation.class),
                             any(Boolean.class));
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:31,代码来源:BaseGridWidgetRenderingTest.java

示例14: 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);
        }
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:38,代码来源:BaseGridWidget.java

示例15: renderGridHeaderWidget

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper; //导入方法依赖的package包/类
/**
 * Render the Widget's Header and append to this Group.
 * @param allColumns All columns in the model.
 * @param blockColumns The columns to render for a block.
 * @param isSelectionLayer Is the SelectionLayer being rendered.
 */
protected Group renderGridHeaderWidget(final List<GridColumn<?>> allColumns,
                                       final List<GridColumn<?>> blockColumns,
                                       final boolean isSelectionLayer,
                                       final BaseGridRendererHelper.RenderingInformation renderingInformation) {
    final GridHeaderRenderContext context = new GridHeaderRenderContext(allColumns,
                                                                        blockColumns,
                                                                        isSelectionLayer);
    final Group g = renderer.renderHeader(model,
                                          context,
                                          rendererHelper,
                                          renderingInformation);
    return g;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:20,代码来源:BaseGridWidget.java


注:本文中的org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.impl.BaseGridRendererHelper.RenderingInformation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。