當前位置: 首頁>>代碼示例>>Java>>正文


Java GridRenderer類代碼示例

本文整理匯總了Java中org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer的典型用法代碼示例。如果您正苦於以下問題:Java GridRenderer類的具體用法?Java GridRenderer怎麽用?Java GridRenderer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


GridRenderer類屬於org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids包,在下文中一共展示了GridRenderer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: renderCell

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
@Override
public Group renderCell(final GridCell<String> cell,
                        final GridBodyCellRenderContext context) {
    if (cell == null || cell.getValue() == null) {
        return null;
    }

    final GridRenderer renderer = context.getRenderer();
    final GridRendererTheme theme = renderer.getTheme();

    final Group g = new Group();
    final Text t = theme.getBodyText()
            .setText(cell.getValue().getValue())
            .setListening(false)
            .setX(context.getCellWidth() / 2)
            .setY(context.getCellHeight() / 2);
    g.add(t);
    return g;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:20,代碼來源:ListBoxColumnDOMElementSingletonRenderer.java

示例2: renderCell

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
@Override
public Group renderCell(final GridCell<Integer> cell,
                        final GridBodyCellRenderContext context) {
    if (cell == null || cell.getValue() == null) {
        return null;
    }

    final GridRenderer renderer = context.getRenderer();
    final GridRendererTheme theme = renderer.getTheme();

    final Group g = new Group();
    final Text t = theme.getBodyText()
            .setText(Integer.toString(cell.getValue().getValue()))
            .setListening(false)
            .setX(context.getCellWidth() / 2)
            .setY(context.getCellHeight() / 2);
    g.add(t);
    return g;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:20,代碼來源:IntegerColumnRenderer.java

示例3: BaseGridWidget

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public BaseGridWidget(final GridData model,
                      final GridSelectionManager selectionManager,
                      final GridPinnedModeManager pinnedModeManager,
                      final GridRenderer renderer) {
    this.model = model;
    this.renderer = renderer;
    this.bodyTransformer = new DefaultSelectionsTransformer(model,
                                                            bodyColumns);
    this.floatingColumnsTransformer = new FloatingSelectionsTransformer(model,
                                                                        floatingColumns);
    this.rendererHelper = getBaseGridRendererHelper();
    this.cellSelectionManager = getCellSelectionManager();

    //Click handlers
    addNodeMouseClickHandler(getGridMouseClickHandler(selectionManager));
    addNodeMouseClickHandler(getGridMouseCellSelectorClickHandler(selectionManager));
    addNodeMouseDoubleClickHandler(getGridMouseDoubleClickHandler(selectionManager,
                                                                  pinnedModeManager));

    //NodeMouseUpEvent on GridLayer is not fired at a drag-end, so clear the state here.
    addNodeDragEndHandler((event) -> {
        final GridWidgetDnDHandlersState state = ((DefaultGridLayer) getLayer()).getGridWidgetHandlersState();
        state.reset();
        getViewport().getElement().getStyle().setCursor(state.getCursor());
    });
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:27,代碼來源:BaseGridWidget.java

示例4: GridBodyColumnRenderContext

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public GridBodyColumnRenderContext(final double absoluteGridX,
                                   final double absoluteGridY,
                                   final double absoluteColumnX,
                                   final double clipMinY,
                                   final double clipMinX,
                                   final int minVisibleRowIndex,
                                   final int maxVisibleRowIndex,
                                   final boolean isFloating,
                                   final GridData model,
                                   final Transform transform,
                                   final GridRenderer renderer) {
    this.absoluteGridX = absoluteGridX;
    this.absoluteGridY = absoluteGridY;
    this.absoluteColumnX = absoluteColumnX;
    this.clipMinY = clipMinY;
    this.clipMinX = clipMinX;
    this.minVisibleRowIndex = minVisibleRowIndex;
    this.maxVisibleRowIndex = maxVisibleRowIndex;
    this.isFloating = isFloating;
    this.model = model;
    this.transform = transform;
    this.renderer = renderer;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:24,代碼來源:GridBodyColumnRenderContext.java

示例5: GridBodyRenderContext

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public GridBodyRenderContext(final double absoluteGridX,
                             final double absoluteGridY,
                             final double absoluteColumnOffsetX,
                             final double clipMinY,
                             final double clipMinX,
                             final int minVisibleRowIndex,
                             final int maxVisibleRowIndex,
                             final List<GridColumn<?>> blockColumns,
                             final boolean isSelectionLayer,
                             final Transform transform,
                             final GridRenderer renderer,
                             final SelectionsTransformer transformer) {
    this.absoluteGridX = absoluteGridX;
    this.absoluteGridY = absoluteGridY;
    this.absoluteColumnOffsetX = absoluteColumnOffsetX;
    this.clipMinY = clipMinY;
    this.clipMinX = clipMinX;
    this.minVisibleRowIndex = minVisibleRowIndex;
    this.maxVisibleRowIndex = maxVisibleRowIndex;
    this.blockColumns = blockColumns;
    this.isSelectionLayer = isSelectionLayer;
    this.transform = transform;
    this.renderer = renderer;
    this.transformer = transformer;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:26,代碼來源:GridBodyRenderContext.java

示例6: GridBodyCellRenderContext

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public GridBodyCellRenderContext(final double absoluteCellX,
                                 final double absoluteCellY,
                                 final double cellWidth,
                                 final double cellHeight,
                                 final double clipMinY,
                                 final double clipMinX,
                                 final int rowIndex,
                                 final int columnIndex,
                                 final boolean isFloating,
                                 final Transform transform,
                                 final GridRenderer renderer) {
    this.absoluteCellX = absoluteCellX;
    this.absoluteCellY = absoluteCellY;
    this.cellWidth = cellWidth;
    this.cellHeight = cellHeight;
    this.clipMinY = clipMinY;
    this.clipMinX = clipMinX;
    this.rowIndex = rowIndex;
    this.columnIndex = columnIndex;
    this.isFloating = isFloating;
    this.transform = transform;
    this.renderer = renderer;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:24,代碼來源:GridBodyCellRenderContext.java

示例7: BaseExpressionGrid

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public BaseExpressionGrid(final GridCellTuple parent,
                          final HasExpression hasExpression,
                          final Optional<E> expression,
                          final Optional<HasName> hasName,
                          final DMNGridPanel gridPanel,
                          final DMNGridLayer gridLayer,
                          final GridRenderer gridRenderer,
                          final SessionManager sessionManager,
                          final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                          final Event<ExpressionEditorSelectedEvent> editorSelectedEvent,
                          final boolean isHeaderHidden) {
    this(parent,
         hasExpression,
         expression,
         hasName,
         gridPanel,
         gridLayer,
         gridRenderer,
         sessionManager,
         sessionCommandManager,
         editorSelectedEvent,
         () -> isHeaderHidden);
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:24,代碼來源:BaseExpressionGrid.java

示例8: getExpressionCellText

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public static Group getExpressionCellText(final GridBodyCellRenderContext context, final GridCell<String> gridCell) {
    final GridRenderer gridRenderer = context.getRenderer();
    final GridRendererTheme theme = gridRenderer.getTheme();

    final Group g = new Group();
    final Text t = theme.getBodyText()
            .setText(gridCell.getValue().getValue())
            .setListening(false)
            .setX(5)
            .setY(5)
            .setFontFamily(BaseExpressionGridTheme.FONT_FAMILY_EXPRESSION)
            .setTextAlign(TextAlign.LEFT);
    t.setWrapper(new TextLineBreakWrap(t));
    g.add(t);

    return g;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:18,代碼來源:RendererUtils.java

示例9: getUiRowIndex

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
/**
 * Gets the row index corresponding to the provided Canvas y-coordinate relative to the grid. Grid-relative coordinates can be
 * obtained from {@link INodeXYEvent} using {@link CoordinateUtilities#convertDOMToGridCoordinate(GridWidget, Point2D)}
 * @param gridWidget GridWidget to check.
 * @param cy y-coordinate relative to the GridWidget.
 * @return The row index or null if the coordinate did not map to a cell.
 */
public static Integer getUiRowIndex(final GridWidget gridWidget,
                                    final double cy) {
    final Group header = gridWidget.getHeader();
    final GridData gridModel = gridWidget.getModel();
    final GridRenderer renderer = gridWidget.getRenderer();
    final double headerMaxY = (header == null ? renderer.getHeaderHeight() : renderer.getHeaderHeight() + header.getY());

    if (cy < headerMaxY || cy > gridWidget.getHeight()) {
        return null;
    }
    if (gridModel.getRowCount() == 0) {
        return null;
    }

    //Get row index
    GridRow row;
    int uiRowIndex = 0;
    double offsetY = cy - renderer.getHeaderHeight();
    while ((row = gridModel.getRow(uiRowIndex)).getHeight() < offsetY) {
        offsetY = offsetY - row.getHeight();
        uiRowIndex++;
    }
    if (uiRowIndex > gridModel.getRowCount() - 1) {
        return null;
    }

    return uiRowIndex;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:36,代碼來源:CoordinateUtilities.java

示例10: BaseGridWidgetMouseClickHandler

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public BaseGridWidgetMouseClickHandler(final GridWidget gridWidget,
                                       final GridSelectionManager selectionManager,
                                       final GridRenderer renderer) {
    this.gridWidget = gridWidget;
    this.gridModel = gridWidget.getModel();
    this.rendererHelper = gridWidget.getRendererHelper();
    this.selectionManager = selectionManager;
    this.renderer = renderer;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:10,代碼來源:BaseGridWidgetMouseClickHandler.java

示例11: GridCellSelectorMouseClickHandler

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public GridCellSelectorMouseClickHandler(final GridWidget gridWidget,
                                         final GridSelectionManager selectionManager,
                                         final GridRenderer renderer) {
    this.gridWidget = gridWidget;
    this.gridModel = gridWidget.getModel();
    this.rendererHelper = gridWidget.getRendererHelper();
    this.selectionManager = selectionManager;
    this.renderer = renderer;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:10,代碼來源:GridCellSelectorMouseClickHandler.java

示例12: BaseGridWidgetMouseDoubleClickHandler

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public BaseGridWidgetMouseDoubleClickHandler(final GridWidget gridWidget,
                                             final GridSelectionManager selectionManager,
                                             final GridPinnedModeManager pinnedModeManager,
                                             final GridRenderer renderer) {
    this.gridWidget = gridWidget;
    this.gridModel = gridWidget.getModel();
    this.rendererHelper = gridWidget.getRendererHelper();
    this.selectionManager = selectionManager;
    this.pinnedModeManager = pinnedModeManager;
    this.renderer = renderer;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:12,代碼來源:BaseGridWidgetMouseDoubleClickHandler.java

示例13: GridHeaderColumnRenderContext

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public GridHeaderColumnRenderContext(final List<GridColumn<?>> allColumns,
                                     final List<GridColumn<?>> blockColumns,
                                     final int columnIndex,
                                     final GridData model,
                                     final GridRenderer renderer) {
    this.allColumns = allColumns;
    this.blockColumns = blockColumns;
    this.columnIndex = columnIndex;
    this.model = model;
    this.renderer = renderer;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:12,代碼來源:GridHeaderColumnRenderContext.java

示例14: getHeaderRowsYOffset

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
private double getHeaderRowsYOffset(final GridWidget gridWidget,
                                    final GridRenderer renderer) {
    final GridData model = gridWidget.getModel();
    final int headerRowCount = model.getHeaderRowCount();
    final double headerHeight = renderer.getHeaderHeight();
    final double headerRowHeight = renderer.getHeaderRowHeight();
    final double headerRowsHeight = headerRowHeight * headerRowCount;
    final double headerRowsYOffset = headerHeight - headerRowsHeight;

    return headerRowsYOffset;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:12,代碼來源:GridWidgetDnDMouseMoveHandler.java

示例15: GuidedDecisionTableViewImpl

import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //導入依賴的package包/類
public GuidedDecisionTableViewImpl(final GridData uiModel,
                                   final GridRenderer renderer,
                                   final Presenter presenter,
                                   final GuidedDecisionTable52 model,
                                   final Event<NotificationEvent> notificationEvent) {
    super(uiModel,
          presenter,
          presenter,
          renderer);

    this.presenter = presenter;
    this.model = model;
    this.notificationEvent = notificationEvent;
    this.headerCaption = makeHeaderCaption();
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:16,代碼來源:GuidedDecisionTableViewImpl.java


注:本文中的org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。