@Test @SuppressWarnings("unchecked") public void testRemoveAll() { final GridWidget gridWidget = mock(GridWidget.class); when(gridWidget.getModel()).thenReturn(new BaseGridData(false)); when(expressionGrid.getModel()).thenReturn(new BaseGridData(false)); when(gridWidget.asNode()).thenReturn(mock(Node.class)); when(expressionGrid.asNode()).thenReturn(mock(Node.class)); gridLayer.add(gridWidget); gridLayer.add(expressionGrid); gridLayer.select(expressionGrid); gridLayer.removeAll(); assertThat(gridLayer.getSelectedGridWidget().isPresent()).isFalse(); }
@Override public Layer removeAll() { selectedGridWidget = Optional.empty(); return super.removeAll(); }
DMNGridLayer extends DefaultGridLayer { @Override public Layer removeAll() { selectedGridWidget = Optional.empty(); return super.removeAll(); } }
DMNGridLayer extends DefaultGridLayer { @Override public Layer removeAll() { selectedGridWidget = Optional.empty(); return super.removeAll(); }  }
DMNGridLayer extends DefaultGridLayer { @Override public Layer removeAll() { selectedGridWidget = Optional.empty(); return super.removeAll(); }  void setDefaultTransformMediator(final TransformMediator defaultTransformMediator); @Override //This is overridden as Lienzo calls to draw() when the LienzoPanel is resized //which causes flickering of the 'ghosting' when an Expression type is selected //from the UndefinedExpressionGrid. Layer draw(); @Override Layer batch(); @Override TransformMediator getDefaultTransformMediator(); @Override void exitPinnedMode(final Command onCompleteCommand); @Override void updatePinnedContext(final GridWidget gridWidget); @Override void select(final GridWidget selectedGridWidget); @Override void deregister(final GridWidget gridWidget); @Override Layer removeAll(); }
DMNGridLayer extends DefaultGridLayer { @Override public Layer removeAll() { selectedGridWidget = Optional.empty(); return super.removeAll(); }  void setDefaultTransformMediator(final TransformMediator defaultTransformMediator); @Override //This is overridden as Lienzo calls to draw() when the LienzoPanel is resized //which causes flickering of the 'ghosting' when an Expression type is selected //from the UndefinedExpressionGrid. Layer draw(); @Override Layer batch(); @Override TransformMediator getDefaultTransformMediator(); @Override void exitPinnedMode(final Command onCompleteCommand); @Override void updatePinnedContext(final GridWidget gridWidget); @Override void select(final GridWidget selectedGridWidget); @Override void deregister(final GridWidget gridWidget); @Override Layer removeAll();  }