public interface GridRenderer
| Modifier and Type | Interface and Description |
|---|---|
static interface |
GridRenderer.GridRendererContext |
static interface |
GridRenderer.RenderBodyGridBackgroundCommand
Command to render the "background" components of the grid
|
static interface |
GridRenderer.RenderBodyGridContentCommand
Command to render the "content" components of the grid
|
static interface |
GridRenderer.RenderBodyGridLinesCommand
Command to render the "Grid lines" components of the grid body
|
static interface |
GridRenderer.RendererBodyCommand
Generic command for all body related rendering.
|
static interface |
GridRenderer.RendererCommand
Generic command to render a component of the grid
|
static interface |
GridRenderer.RendererHeaderCommand
Generic command for all header related rendering.
|
static interface |
GridRenderer.RenderGridBoundaryCommand
Command to render the "Grid boundary" components of the grid
|
static interface |
GridRenderer.RenderHeaderBackgroundCommand
Command to render the "background" components of the grid header
|
static interface |
GridRenderer.RenderHeaderContentCommand
Command to render the "content" components of the grid header
|
static interface |
GridRenderer.RenderHeaderGridLinesCommand
Command to render the "Grid lines" components of the grid header
|
static interface |
GridRenderer.RenderSelectedCellsCommand
Command to render the "Selected cells" component of the grid
|
static interface |
GridRenderer.RenderSelectorCommand
Command to render the "Selector" component of the grid
|
| Modifier and Type | Method and Description |
|---|---|
double |
getHeaderHeight()
Returns the height of the header built by this renderer.
|
double |
getHeaderRowHeight()
Returns the height of a single row in the header.
|
GridRendererTheme |
getTheme()
Returns the theme.
|
boolean |
onGroupingToggle(double cellX,
double cellY,
double cellWidth,
double cellHeight)
Checks whether a cell-relative coordinate is "on" the hot-spot to toggle the collapsed/expanded state.
|
List<GridRenderer.RendererCommand> |
renderBody(GridData model,
GridBodyRenderContext context,
BaseGridRendererHelper rendererHelper,
BaseGridRendererHelper.RenderingInformation renderingInformation)
Renders the body for the Grid.
|
GridRenderer.RendererCommand |
renderGridBoundary(GridBoundaryRenderContext context)
Renders a boundary around the grid.
|
List<GridRenderer.RendererCommand> |
renderHeader(GridData model,
GridHeaderRenderContext context,
BaseGridRendererHelper rendererHelper,
BaseGridRendererHelper.RenderingInformation renderingInformation)
Renders the header for the Grid.
|
GridRenderer.RendererCommand |
renderHeaderBodyDivider(double width)
Renders a divider between Grid header and body.
|
GridRenderer.RendererCommand |
renderSelectedCells(GridData model,
GridBodyRenderContext context,
BaseGridRendererHelper rendererHelper,
List<GridData.SelectedCell> selectedCells,
BiFunction<SelectedRange,Integer,Double> selectedCellsYOffsetStrategy,
Function<SelectedRange,Double> selectedCellsHeightStrategy)
Renders the selected ranges and append to the Body Group.
|
GridRenderer.RendererCommand |
renderSelector(double width,
double height,
BaseGridRendererHelper.RenderingInformation renderingInformation)
Renders a "selector" when a grid has been selected, i.e. clicked.
|
void |
setColumnRenderConstraint(BiFunction<Boolean,GridColumn<?>,Boolean> columnRenderingConstraint)
Sets the constraint to control rendering of columns.
|
void |
setTheme(GridRendererTheme theme)
Sets the theme.
|
double getHeaderHeight()
GridColumn.HeaderMetaData) and getHeaderRowHeight().
Header rows are always positioned adjacent to the Body.double getHeaderRowHeight()
GridRendererTheme getTheme()
void setTheme(GridRendererTheme theme)
theme - GridRenderer.RendererCommand renderSelector(double width, double height, BaseGridRendererHelper.RenderingInformation renderingInformation)
width - The width of the GridWidget.height - The height of the GridWidget including header and body.renderingInformation - Calculated rendering information supporting rendering.GridRenderer.RendererCommand renderSelectedCells(GridData model, GridBodyRenderContext context, BaseGridRendererHelper rendererHelper, List<GridData.SelectedCell> selectedCells, BiFunction<SelectedRange,Integer,Double> selectedCellsYOffsetStrategy, Function<SelectedRange,Double> selectedCellsHeightStrategy)
model - The data model for the GridWidget.context - The context of the render phase.rendererHelper - Helper for rendering.selectedCells - The cells that are selected.selectedCellsYOffsetStrategy - A function that returns the YOffset of a selection.selectedCellsHeightStrategy - A function that returns the height of a selection.List<GridRenderer.RendererCommand> renderHeader(GridData model, GridHeaderRenderContext context, BaseGridRendererHelper rendererHelper, BaseGridRendererHelper.RenderingInformation renderingInformation)
model - The data model for the GridWidget.context - The context of the render phase.rendererHelper - Helper for rendering.renderingInformation - Calculated rendering information supporting rendering.List<GridRenderer.RendererCommand> renderBody(GridData model, GridBodyRenderContext context, BaseGridRendererHelper rendererHelper, BaseGridRendererHelper.RenderingInformation renderingInformation)
model - The data model for the GridWidget.context - The context of the render phase.rendererHelper - Helper for rendering.renderingInformation - Calculated rendering information supporting rendering.GridRenderer.RendererCommand renderHeaderBodyDivider(double width)
getHeaderHeight().
The returned Group itself is not positioned when added to the Grid. This is to support different types of divider
that may need to be positioned at a y-coordinate different to getHeaderHeight().width - The width of the divider. May not be the width of the whole grid if there are floating columns.GridRenderer.RendererCommand renderGridBoundary(GridBoundaryRenderContext context)
context - The context of the render phase.boolean onGroupingToggle(double cellX,
double cellY,
double cellWidth,
double cellHeight)
cellX - The MouseEvent relative to the cell's x-coordinate.cellY - The MouseEvent relative to the cell's y-coordinate.cellWidth - Width of the containing cell.cellHeight - Height of the containing cell.void setColumnRenderConstraint(BiFunction<Boolean,GridColumn<?>,Boolean> columnRenderingConstraint)
columnRenderingConstraint - Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.