class InlineTextEditorBoxViewImpl extends AbstractInlineTextEditorBoxView implements InlineEditorBoxView,
                   IsElement {

    @EventHandler("nameField")
    @SinkNative(Event.ONKEYDOWN | Event.ONBLUR)
    void onChangeName(Event e) {
        if (isVisible()) {
            if (e.getTypeInt() == Event.ONBLUR) {
                saveChanges();
            } else if (e.getTypeInt() == Event.ONKEYDOWN) {
                if (e.getKeyCode() == KeyCodes.KEY_ENTER && !e.getShiftKey()) {
                    e.stopPropagation();
                    e.preventDefault();
                    saveChanges();
                } else if ((!isMultiline && e.getKeyCode() == KeyCodes.KEY_ENTER && e.getShiftKey()) ||
                        e.getKeyCode() == KeyCodes.KEY_TAB) {
                    e.stopPropagation();
                    e.preventDefault();
                } else if (e.getKeyCode() == KeyCodes.KEY_ESCAPE) {
                    rollback();
                }
            }
        }
    }

    @Inject public  InlineTextEditorBoxViewImpl(final TranslationService translationService);
    public  InlineTextEditorBoxViewImpl(final TranslationService translationService,
                                       final Div editNameBox,
                                       final Div nameField,
                                       final Command showCommand,
                                       final Command hideCommand);

}