@Test public void testSetOnClosedByKeyboardCallback() { final PopupEditorControls editor = mock(PopupEditorControls.class, withSettings().extraInterfaces(CanBeClosedByKeyboard.class)); view.setOnClosedByKeyboardCallback(editor); verify((CanBeClosedByKeyboard) editor).setOnClosedByKeyboardCallback(any()); }
void setOnClosedByKeyboardCallback(final PopupEditorControls editor) { if (editor instanceof CanBeClosedByKeyboard) { ((CanBeClosedByKeyboard) editor).setOnClosedByKeyboardCallback(this::focusOnDMNContainer); } }
CellEditorControlsViewImpl implements CellEditorControlsView { void setOnClosedByKeyboardCallback(final PopupEditorControls editor) { if (editor instanceof CanBeClosedByKeyboard) { ((CanBeClosedByKeyboard) editor).setOnClosedByKeyboardCallback(this::focusOnDMNContainer); } } }
CellEditorControlsViewImpl implements CellEditorControlsView { void setOnClosedByKeyboardCallback(final PopupEditorControls editor) { if (editor instanceof CanBeClosedByKeyboard) { ((CanBeClosedByKeyboard) editor).setOnClosedByKeyboardCallback(this::focusOnDMNContainer); } } CellEditorControlsViewImpl(); @Inject  CellEditorControlsViewImpl(final Document document,
                                      final Div cellEditorControls,
                                      final Div cellEditorControlsContainer); }
CellEditorControlsViewImpl implements CellEditorControlsView { void setOnClosedByKeyboardCallback(final PopupEditorControls editor) { if (editor instanceof CanBeClosedByKeyboard) { ((CanBeClosedByKeyboard) editor).setOnClosedByKeyboardCallback(this::focusOnDMNContainer); } } CellEditorControlsViewImpl(); @Inject  CellEditorControlsViewImpl(final Document document,
                                      final Div cellEditorControls,
                                      final Div cellEditorControlsContainer); Optional<PopupEditorControls> getActiveEditor(); void setActiveEditor(final Optional<PopupEditorControls> activeEditor); @PostConstruct void setup(); @PreDestroy void destroy(); @Override void show(final PopupEditorControls editor,
                     final int x,
                     final int y); @Override void hide(); }
CellEditorControlsViewImpl implements CellEditorControlsView { void setOnClosedByKeyboardCallback(final PopupEditorControls editor) { if (editor instanceof CanBeClosedByKeyboard) { ((CanBeClosedByKeyboard) editor).setOnClosedByKeyboardCallback(this::focusOnDMNContainer); } } CellEditorControlsViewImpl(); @Inject  CellEditorControlsViewImpl(final Document document,
                                      final Div cellEditorControls,
                                      final Div cellEditorControlsContainer); Optional<PopupEditorControls> getActiveEditor(); void setActiveEditor(final Optional<PopupEditorControls> activeEditor); @PostConstruct void setup(); @PreDestroy void destroy(); @Override void show(final PopupEditorControls editor,
                     final int x,
                     final int y); @Override void hide(); static final String LEFT; static final String TOP; }