本文整理汇总了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;
}
示例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;
}
示例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());
});
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}