@Test public void escapeKeyCanvasActions() { final KeyDownEvent e = mockKeyDownEvent(Optional.of(KeyCodes.KEY_ESCAPE), Optional.of(false), Optional.of(false)); handler.onKeyDown(e); verify(gridCell, never()).flush(); verify(gridCell).destroyResources(); verifyCommonActions(); }
@Override public void onKeyDown(final KeyDownEvent e) { final int keyCode = e.getNativeKeyCode(); final boolean isShiftKeyDown = e.isShiftKeyDown(); switch (keyCode) { case KeyCodes.KEY_TAB: case KeyCodes.KEY_ESCAPE: gridCell.destroyResources(); case KeyCodes.KEY_ENTER: moveSelection(keyCode, isShiftKeyDown); gridPanel.setFocus(true); gridLayer.batch(); } e.stopPropagation(); }
KeyDownHandlerDatePicker extends KeyDownHandlerCommon { @Override public void onKeyDown(final KeyDownEvent e) { final int keyCode = e.getNativeKeyCode(); final boolean isShiftKeyDown = e.isShiftKeyDown(); switch (keyCode) { case KeyCodes.KEY_TAB: case KeyCodes.KEY_ESCAPE: gridCell.destroyResources(); case KeyCodes.KEY_ENTER: moveSelection(keyCode, isShiftKeyDown); gridPanel.setFocus(true); gridLayer.batch(); } e.stopPropagation(); } }
KeyDownHandlerDatePicker extends KeyDownHandlerCommon { @Override public void onKeyDown(final KeyDownEvent e) { final int keyCode = e.getNativeKeyCode(); final boolean isShiftKeyDown = e.isShiftKeyDown(); switch (keyCode) { case KeyCodes.KEY_TAB: case KeyCodes.KEY_ESCAPE: gridCell.destroyResources(); case KeyCodes.KEY_ENTER: moveSelection(keyCode, isShiftKeyDown); gridPanel.setFocus(true); gridLayer.batch(); } e.stopPropagation(); } KeyDownHandlerDatePicker(final GridLienzoPanel gridPanel,
                                    final GridLayer gridLayer,
                                    final GridWidget gridWidget,
                                    final HasSingletonDOMElementResource gridCell); }
KeyDownHandlerDatePicker extends KeyDownHandlerCommon { @Override public void onKeyDown(final KeyDownEvent e) { final int keyCode = e.getNativeKeyCode(); final boolean isShiftKeyDown = e.isShiftKeyDown(); switch (keyCode) { case KeyCodes.KEY_TAB: case KeyCodes.KEY_ESCAPE: gridCell.destroyResources(); case KeyCodes.KEY_ENTER: moveSelection(keyCode, isShiftKeyDown); gridPanel.setFocus(true); gridLayer.batch(); } e.stopPropagation(); } KeyDownHandlerDatePicker(final GridLienzoPanel gridPanel,
                                    final GridLayer gridLayer,
                                    final GridWidget gridWidget,
                                    final HasSingletonDOMElementResource gridCell); @Override void onKeyDown(final KeyDownEvent e); }
KeyDownHandlerDatePicker extends KeyDownHandlerCommon { @Override public void onKeyDown(final KeyDownEvent e) { final int keyCode = e.getNativeKeyCode(); final boolean isShiftKeyDown = e.isShiftKeyDown(); switch (keyCode) { case KeyCodes.KEY_TAB: case KeyCodes.KEY_ESCAPE: gridCell.destroyResources(); case KeyCodes.KEY_ENTER: moveSelection(keyCode, isShiftKeyDown); gridPanel.setFocus(true); gridLayer.batch(); } e.stopPropagation(); } KeyDownHandlerDatePicker(final GridLienzoPanel gridPanel,
                                    final GridLayer gridLayer,
                                    final GridWidget gridWidget,
                                    final HasSingletonDOMElementResource gridCell); @Override void onKeyDown(final KeyDownEvent e);  }