@Test public void testEnableEdit() { final String spanText = "SPAN TEXT"; when(drdName.getText()).thenReturn(spanText); drdNameChangerView.enableEdit(clickEvent); verify(drdNameInput, times(1)).setValue(spanText); verify(drdNameInput, times(1)).focus(); }
@EventHandler("viewMode") void enableEdit(final ClickEvent event) { drdNameInput.setValue(drdName.getText()); viewMode.getStyle().setDisplay(NONE); editMode.getStyle().setDisplay(BLOCK); drdNameInput.focus(); }
DRDNameChangerView implements DRDNameChanger { @EventHandler("viewMode") void enableEdit(final ClickEvent event) { drdNameInput.setValue(drdName.getText()); viewMode.getStyle().setDisplay(NONE); editMode.getStyle().setDisplay(BLOCK); drdNameInput.focus(); } }
DRDNameChangerView implements DRDNameChanger { @EventHandler("viewMode") void enableEdit(final ClickEvent event) { drdNameInput.setValue(drdName.getText()); viewMode.getStyle().setDisplay(NONE); editMode.getStyle().setDisplay(BLOCK); drdNameInput.focus(); } @Inject  DRDNameChangerView(final DMNDiagramsSession dmnDiagramsSession, final Event<DMNDiagramSelected> selectedEvent, final DivElement viewMode, final DivElement editMode, final HTMLAnchorElement returnToDRG, final Span drdName, final InputElement drdNameInput); }
DRDNameChangerView implements DRDNameChanger { @EventHandler("viewMode") void enableEdit(final ClickEvent event) { drdNameInput.setValue(drdName.getText()); viewMode.getStyle().setDisplay(NONE); editMode.getStyle().setDisplay(BLOCK); drdNameInput.focus(); } @Inject  DRDNameChangerView(final DMNDiagramsSession dmnDiagramsSession, final Event<DMNDiagramSelected> selectedEvent, final DivElement viewMode, final DivElement editMode, final HTMLAnchorElement returnToDRG, final Span drdName, final InputElement drdNameInput); @Override void setSessionPresenterView(SessionPresenter.View sessionPresenterView); @Override void showDRDNameChanger(); @Override void hideDRDNameChanger(); }
DRDNameChangerView implements DRDNameChanger { @EventHandler("viewMode") void enableEdit(final ClickEvent event) { drdNameInput.setValue(drdName.getText()); viewMode.getStyle().setDisplay(NONE); editMode.getStyle().setDisplay(BLOCK); drdNameInput.focus(); } @Inject  DRDNameChangerView(final DMNDiagramsSession dmnDiagramsSession, final Event<DMNDiagramSelected> selectedEvent, final DivElement viewMode, final DivElement editMode, final HTMLAnchorElement returnToDRG, final Span drdName, final InputElement drdNameInput); @Override void setSessionPresenterView(SessionPresenter.View sessionPresenterView); @Override void showDRDNameChanger(); @Override void hideDRDNameChanger();  }