@Override public void accepted() { this.view.closeDialog(); if (this.confirmCallback != null) { this.confirmCallback.accepted(); } }
@Override public void onEnterClicked() { if (view.isOkButtonInFocus()) { accepted(); return; } if (view.isCancelButtonInFocus()) { cancelled(); } } }
@Override public void setTitleCaption(String title) { setTitle(title); }
private void showDialog() { dialogFactory .createConfirmDialog( localizationConstant.authorizationDialogTitle(), localizationConstant.authorizationDialogText(), new ConfirmCallback() { @Override public void accepted() { showAuthWindow(); } }, new CancelCallback() { @Override public void cancelled() { callback.onSuccess(OAuthStatus.NOT_PERFORMED); } }) .show(); }
@Inject public ConfirmDialogViewImpl(final @NotNull ConfirmDialogFooter footer) { Widget widget = uiBinder.createAndBindUi(this); setWidget(widget); this.footer = footer; addFooterWidget(footer); }
@Override public void thirdChoiceClicked() { this.view.closeDialog(); if (this.thirdChoiceCallback != null) { this.thirdChoiceCallback.accepted(); } }
@Override public void setDelegate(final ActionDelegate delegate) { this.delegate = delegate; this.footer.setDelegate(delegate); }
@Override public void showDialog() { this.show(footer.okButton); }
@Override public void show() { this.view.showDialog(); }
@Override public void closeDialog() { this.hide(); }
public void setCancelButtonLabel(String label) { footer.setCancelButtonLabel(label); }
public void setOkButtonLabel(String label) { footer.setOkButtonLabel(label); }
/** * Handler set on the cancel button. * * @param event the event that triggers the handler call */ @UiHandler("cancelButton") public void handleCancelClick(final ClickEvent event) { this.actionDelegate.cancelled(); }
/** * Handler set on the OK button. * * @param event the event that triggers the handler call */ @UiHandler("okButton") public void handleOkClick(final ClickEvent event) { this.actionDelegate.accepted(); }
@Override public void onEnterPress(NativeEvent evt) { evt.preventDefault(); delegate.onEnterClicked(); }
@Override public void cancelled() { this.view.closeDialog(); if (this.cancelCallback != null) { this.cancelCallback.cancelled(); } }
private void onDeleteClicked() { dialogFactory .createConfirmDialog( locale.deleteRemoteRepositoryTitle(), locale.deleteRemoteRepositoryQuestion(selectedObject.getName()), () -> delegate.onDeleteClicked(), null) .show(); }
@Override public void accepted() { this.view.closeDialog(); if (this.confirmCallback != null) { this.confirmCallback.accepted(); } }
@Override public void firstChoiceClicked() { this.view.closeDialog(); if (this.firstChoiceCallback != null) { this.firstChoiceCallback.accepted(); } }
@Override public void secondChoiceClicked() { this.view.closeDialog(); if (this.secondChoiceCallback != null) { this.secondChoiceCallback.accepted(); } }