BaseGridRendererHelper { public double getWidth(final List<GridColumn<?>> columns) { double width = 0; for (GridColumn<?> column : columns) { if (column.isVisible()) { width = width + column.getWidth(); } } return width; } BaseGridRendererHelper(final GridWidget view); double getColumnOffset(final GridColumn<?> column); double getColumnOffset(final int columnIndex); double getColumnOffset(final List<GridColumn<?>> columns,
                                  final int columnIndex); double getRowOffset(final GridRow row); double getRowOffset(final int rowIndex); double getRowOffset(final GridRow row,
                               final List<Double> rowHeights); double getRowOffset(final int rowIndex,
                               final List<Double> rowHeights); double getWidth(final List<GridColumn<?>> columns); RenderingInformation getRenderingInformation(); ColumnInformation getColumnInformation(final double cx);  }
@Test public void testGetWidth() { assertThat(helper.getWidth(uiModel.getColumns())).isEqualTo(uiColumn1.getWidth() + uiColumn2.getWidth()); }
@Test public void testGetWidthWithHiddenColumn() { uiColumn1.setVisible(false); assertThat(helper.getWidth(uiModel.getColumns())).isEqualTo(uiColumn2.getWidth()); }