BaseGridRendererHelper { public double getColumnOffset(final GridColumn<?> column) { final GridData model = view.getModel(); final int columnIndex = model.getColumns().indexOf(column); if (columnIndex == -1) { return 0; } return getColumnOffset(columnIndex); } 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 testGetColumnOffsetByObjectWithHiddenColumn() { uiColumn1.setVisible(false); assertThat(helper.getColumnOffset(uiColumn1)).isEqualTo(0.0); assertThat(helper.getColumnOffset(uiColumn2)).isEqualTo(0.0); }
@Test public void testGetColumnOffsetByIndexWithHiddenColumn() { uiColumn1.setVisible(false); assertThat(helper.getColumnOffset(0)).isEqualTo(0.0); assertThat(helper.getColumnOffset(1)).isEqualTo(0.0); }
@Test public void testGetColumnOffsetByIndexAndSubListWithHiddenColumn() { uiColumn1.setVisible(false); assertThat(helper.getColumnOffset(uiModel.getColumns(), 0)).isEqualTo(0.0); assertThat(helper.getColumnOffset(uiModel.getColumns(), 1)).isEqualTo(0.0); }