GridLienzoPanel extends FocusPanel implements RequiresResize,
                                                           ProvidesResize,
                                                           GridLienzoScrollable { protected void propagateNewPanelSize(int visibleWidth, int visibleHeight) { if (getDefaultGridLayer() == null) { return; } boolean toRefresh = false; for (GridWidget gridWidget : getDefaultGridLayer().getGridWidgets()) { toRefresh = toRefresh || gridWidget.getModel().setVisibleSizeAndRefresh(visibleWidth, visibleHeight); } if (toRefresh) { this.getDefaultGridLayer().batch(); } } GridLienzoPanel();  GridLienzoPanel(final int width,
                           final int height);  GridLienzoPanel(final DefaultGridLayer defaultGridLayer);  GridLienzoPanel(final int width,
                           final int height,
                           final DefaultGridLayer defaultGridLayer); protected  GridLienzoPanel(final LienzoPanel lienzoPanel); protected  GridLienzoPanel(final LienzoPanel lienzoPanel,
                              final DefaultGridLayer defaultGridLayer); @Override void onResize(); @Override void updatePanelSize(); @Override void updatePanelSize(final Integer width,
                                final Integer height); @Override void refreshScrollPosition(); @Override void setBounds(final Bounds bounds); LienzoPanel add(final DefaultGridLayer layer); final Viewport getViewport(); LienzoPanel getLienzoPanel(); AbsolutePanel getScrollPanel(); AbsolutePanel getDomElementContainer(); AbsolutePanel getInternalScrollPanel(); DefaultGridLayer getDefaultGridLayer();  }
@Test public void propagateNewPanelSize() { int visibleWidth = 100; int visibleHeight = 100; GridData gridData = mock(GridData.class); GridWidget gridWidget = mock(GridWidget.class); DefaultGridLayer defaultGridLayer = new DefaultGridLayer(); defaultGridLayer.register(gridWidget); when(gridWidget.getModel()).thenReturn(gridData); gridLienzoPanel.propagateNewPanelSize(visibleWidth, visibleHeight); verify(gridData, never()).setVisibleSizeAndRefresh(anyInt(), anyInt()); gridLienzoPanel.add(defaultGridLayer); gridLienzoPanel.propagateNewPanelSize(visibleWidth, visibleHeight); verify(gridData, times(1)).setVisibleSizeAndRefresh(visibleWidth, visibleHeight); }