@Test public void testKeyDownHandlerCommon_KEY_ENTER() { final TextAreaSingletonDOMElementFactory factory = spy(getFactoryForAttachDomElementTest()); final KeyDownHandlerCommon keyDownHandlerCommon = factory.destroyOrFlushKeyDownHandler(); when(event.getNativeKeyCode()).thenReturn(KeyCodes.KEY_ENTER); keyDownHandlerCommon.onKeyDown(event); verify(factory, never()).flush(); }
@Override protected KeyDownHandlerCommon destroyOrFlushKeyDownHandler() { return new KeyDownHandlerCommon(gridPanel, gridLayer, gridWidget, this, true, false, true); }
TextAreaSingletonDOMElementFactory extends BaseSingletonDOMElementFactory<String, TextArea, TextAreaDOMElement> { @Override protected KeyDownHandlerCommon destroyOrFlushKeyDownHandler() { return new KeyDownHandlerCommon(gridPanel, gridLayer, gridWidget, this, true, false, true); } }
TextAreaSingletonDOMElementFactory extends BaseSingletonDOMElementFactory<String, TextArea, TextAreaDOMElement> { @Override protected KeyDownHandlerCommon destroyOrFlushKeyDownHandler() { return new KeyDownHandlerCommon(gridPanel, gridLayer, gridWidget, this, true, false, true); } TextAreaSingletonDOMElementFactory(final DMNGridPanel gridPanel,
                                              final GridLayer gridLayer,
                                              final GridWidget gridWidget,
                                              final SessionManager sessionManager,
                                              final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                              final Function<GridCellTuple, Command> hasNoValueCommand,
                                              final Function<GridCellValueTuple, Command> hasValueCommand); }
TextAreaSingletonDOMElementFactory extends BaseSingletonDOMElementFactory<String, TextArea, TextAreaDOMElement> { @Override protected KeyDownHandlerCommon destroyOrFlushKeyDownHandler() { return new KeyDownHandlerCommon(gridPanel, gridLayer, gridWidget, this, true, false, true); } TextAreaSingletonDOMElementFactory(final DMNGridPanel gridPanel,
                                              final GridLayer gridLayer,
                                              final GridWidget gridWidget,
                                              final SessionManager sessionManager,
                                              final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                              final Function<GridCellTuple, Command> hasNoValueCommand,
                                              final Function<GridCellValueTuple, Command> hasValueCommand); Function<GridCellTuple, Command> getHasNoValueCommand(); Function<GridCellValueTuple, Command> getHasValueCommand(); @Override TextArea createWidget(); }
TextAreaSingletonDOMElementFactory extends BaseSingletonDOMElementFactory<String, TextArea, TextAreaDOMElement> { @Override protected KeyDownHandlerCommon destroyOrFlushKeyDownHandler() { return new KeyDownHandlerCommon(gridPanel, gridLayer, gridWidget, this, true, false, true); } TextAreaSingletonDOMElementFactory(final DMNGridPanel gridPanel,
                                              final GridLayer gridLayer,
                                              final GridWidget gridWidget,
                                              final SessionManager sessionManager,
                                              final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                              final Function<GridCellTuple, Command> hasNoValueCommand,
                                              final Function<GridCellValueTuple, Command> hasValueCommand); Function<GridCellTuple, Command> getHasNoValueCommand(); Function<GridCellValueTuple, Command> getHasValueCommand(); @Override TextArea createWidget();  }