@Test public void addHandlers() { scenarioGridPanelSpy.addHandlers(clickHandlerMock, scenarioSimulationGridPanelMouseMoveHandlerMock); assertEquals(clickHandlerMock, scenarioGridPanelSpy.clickHandler); assertEquals(scenarioSimulationGridPanelMouseMoveHandlerMock, scenarioGridPanelSpy.mouseMoveHandler); verify(scenarioGridPanelSpy, times(1)).unregister(); verify(domElementContainerMock, times(1)).addDomHandler(eq(clickHandlerMock), eq(ClickEvent.getType())); verify(domElementContainerMock, times(1)).addDomHandler(eq(clickHandlerMock), eq(ContextMenuEvent.getType())); verify(scenarioGridLayerMock, times(1)).addNodeMouseOutHandler(eq(scenarioGridPanelSpy)); verify(scenarioGridLayerMock, times(1)).addNodeMouseMoveHandler(eq(scenarioSimulationGridPanelMouseMoveHandlerMock)); verify(scenarioGridLayerMock, times(1)).addNodeMouseWheelHandler(eq(scenarioGridPanelSpy)); verify(scrollPanelMock, times(1)).addDomHandler(eq(scenarioGridPanelSpy), eq(ScrollEvent.getType())); }
public void addHandlers(final ScenarioSimulationGridPanelClickHandler clickHandler, final ScenarioSimulationGridPanelMouseMoveHandler mouseMoveHandler) { this.clickHandler = clickHandler; this.mouseMoveHandler = mouseMoveHandler; unregister(); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ContextMenuEvent.getType())); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ClickEvent.getType())); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseOutHandler(this)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseMoveHandler(mouseMoveHandler)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseWheelHandler(this)); handlerRegistrations.add(getScrollPanel().addDomHandler(this, ScrollEvent.getType())); }
ScenarioGridPanel extends GridLienzoPanel implements NodeMouseOutHandler,
                                                                  NodeMouseWheelHandler,
                                                                  ScrollHandler { public void addHandlers(final ScenarioSimulationGridPanelClickHandler clickHandler, final ScenarioSimulationGridPanelMouseMoveHandler mouseMoveHandler) { this.clickHandler = clickHandler; this.mouseMoveHandler = mouseMoveHandler; unregister(); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ContextMenuEvent.getType())); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ClickEvent.getType())); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseOutHandler(this)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseMoveHandler(mouseMoveHandler)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseWheelHandler(this)); handlerRegistrations.add(getScrollPanel().addDomHandler(this, ScrollEvent.getType())); } }
ScenarioGridPanel extends GridLienzoPanel implements NodeMouseOutHandler,
                                                                  NodeMouseWheelHandler,
                                                                  ScrollHandler { public void addHandlers(final ScenarioSimulationGridPanelClickHandler clickHandler, final ScenarioSimulationGridPanelMouseMoveHandler mouseMoveHandler) { this.clickHandler = clickHandler; this.mouseMoveHandler = mouseMoveHandler; unregister(); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ContextMenuEvent.getType())); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ClickEvent.getType())); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseOutHandler(this)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseMoveHandler(mouseMoveHandler)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseWheelHandler(this)); handlerRegistrations.add(getScrollPanel().addDomHandler(this, ScrollEvent.getType())); }  }
ScenarioGridPanel extends GridLienzoPanel implements NodeMouseOutHandler,
                                                                  NodeMouseWheelHandler,
                                                                  ScrollHandler { public void addHandlers(final ScenarioSimulationGridPanelClickHandler clickHandler, final ScenarioSimulationGridPanelMouseMoveHandler mouseMoveHandler) { this.clickHandler = clickHandler; this.mouseMoveHandler = mouseMoveHandler; unregister(); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ContextMenuEvent.getType())); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ClickEvent.getType())); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseOutHandler(this)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseMoveHandler(mouseMoveHandler)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseWheelHandler(this)); handlerRegistrations.add(getScrollPanel().addDomHandler(this, ScrollEvent.getType())); }  void addHandlers(final ScenarioSimulationGridPanelClickHandler clickHandler,
                            final ScenarioSimulationGridPanelMouseMoveHandler mouseMoveHandler); ScenarioGridLayer getScenarioGridLayer(); ScenarioGrid getScenarioGrid(); void setEventBus(EventBus eventBus); void select(); @Override void onNodeMouseOut(NodeMouseOutEvent event); @Override void onScroll(ScrollEvent scrollEvent); @Override void onNodeMouseWheel(NodeMouseWheelEvent nodeMouseWheelEvent); @Override void onResize(); void unregister(); void synchronizeFactMappingsWidths(); void ensureCellIsSelected(); }
ScenarioGridPanel extends GridLienzoPanel implements NodeMouseOutHandler,
                                                                  NodeMouseWheelHandler,
                                                                  ScrollHandler { public void addHandlers(final ScenarioSimulationGridPanelClickHandler clickHandler, final ScenarioSimulationGridPanelMouseMoveHandler mouseMoveHandler) { this.clickHandler = clickHandler; this.mouseMoveHandler = mouseMoveHandler; unregister(); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ContextMenuEvent.getType())); handlerRegistrations.add(getDomElementContainer().addDomHandler(clickHandler, ClickEvent.getType())); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseOutHandler(this)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseMoveHandler(mouseMoveHandler)); handlerRegistrations.add(getScenarioGridLayer().addNodeMouseWheelHandler(this)); handlerRegistrations.add(getScrollPanel().addDomHandler(this, ScrollEvent.getType())); }  void addHandlers(final ScenarioSimulationGridPanelClickHandler clickHandler,
                            final ScenarioSimulationGridPanelMouseMoveHandler mouseMoveHandler); ScenarioGridLayer getScenarioGridLayer(); ScenarioGrid getScenarioGrid(); void setEventBus(EventBus eventBus); void select(); @Override void onNodeMouseOut(NodeMouseOutEvent event); @Override void onScroll(ScrollEvent scrollEvent); @Override void onNodeMouseWheel(NodeMouseWheelEvent nodeMouseWheelEvent); @Override void onResize(); void unregister(); void synchronizeFactMappingsWidths(); void ensureCellIsSelected();  }