GridModel will need to have a way of specifying a new type of renderer on a per cell basis. Currently we just support rendering text, so that should be the default cell renderer, and then allow for registering/specifying different renderers. We can have a TextCellRenderer as the default, and BarGaugeRenderer packaged in @deephaven/grid, but not a default.
We should be able to test this out in the style guide using a mock (similar to MockGridModel).
GridModelwill need to have a way of specifying a new type of renderer on a per cell basis. Currently we just support rendering text, so that should be the default cell renderer, and then allow for registering/specifying different renderers. We can have aTextCellRendereras the default, andBarGaugeRendererpackaged in@deephaven/grid, but not a default.rendererForCell(column: ModelIndex, row: ModelIndex): CellRendererTypeandtype CellRendererType = stringTextCellRendererand use that fromGridRendererwhen rendering a cell by default (or if renderer not specified)GridRenderer.drawCellContentswill automatically call if there's a renderer specified for that cellBarGaugeRenderer, and an extension toGridModelfor the details required forBarGaugeRendererWe should be able to test this out in the style guide using a mock (similar to
MockGridModel).