@Test public void testBuilder_CancelCaption_NoCancelButton() { OkCancelDialog dialog = OkCancelDialog.builder("") .buttonOption(ButtonOption.OK_ONLY) .cancelCaption("cancel it") .build(); OkCancelDialog dialog2 = OkCancelDialog.builder("") .cancelCaption("cancel it") .buttonOption(ButtonOption.OK_ONLY) .build(); assertThrows(IllegalStateException.class, dialog::getCancelCaption); assertThrows(IllegalStateException.class, dialog2::getCancelCaption); }
public static Builder builder(String caption) { return new Builder(caption); }
OkCancelDialog extends Window { public static Builder builder(String caption) { return new Builder(caption); } }
OkCancelDialog extends Window { public static Builder builder(String caption) { return new Builder(caption); } protected  OkCancelDialog(String caption, Handler okHandler, Handler cancelHandler,
            ButtonOption buttonOption, Component... contentComponents); @Deprecated  OkCancelDialog(String caption); @Deprecated  OkCancelDialog(String caption, Handler okHandler); @Deprecated  OkCancelDialog(String caption, Handler okHandler, ButtonOption buttonOption); @Deprecated  OkCancelDialog(String caption, Component content, Handler okHandler, ButtonOption buttonOption); }
OkCancelDialog extends Window { public static Builder builder(String caption) { return new Builder(caption); } protected  OkCancelDialog(String caption, Handler okHandler, Handler cancelHandler,
            ButtonOption buttonOption, Component... contentComponents); @Deprecated  OkCancelDialog(String caption); @Deprecated  OkCancelDialog(String caption, Handler okHandler); @Deprecated  OkCancelDialog(String caption, Handler okHandler, ButtonOption buttonOption); @Deprecated  OkCancelDialog(String caption, Component content, Handler okHandler, ButtonOption buttonOption); @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification = "yeah, we know...") @Override void setContent(@CheckForNull Component content); void setSize(String width, String height); MessageList validate(); ValidationService getValidationService(); void setValidationService(ValidationService validationService); void setBeforeOkHandler(Handler beforeOkHandler); OkCancelDialog open(); void addContent(Component c); void addContent(Component c, float expandRatio); boolean isOkPressed(); ValidationDisplayState getValidationDisplayState(); boolean isCancelPressed(); String getOkCaption(); void setOkCaption(String okCaption); String getCancelCaption(); void setCancelCaption(String cancelCaption); static Builder builder(String caption); }
OkCancelDialog extends Window { public static Builder builder(String caption) { return new Builder(caption); } protected  OkCancelDialog(String caption, Handler okHandler, Handler cancelHandler,
            ButtonOption buttonOption, Component... contentComponents); @Deprecated  OkCancelDialog(String caption); @Deprecated  OkCancelDialog(String caption, Handler okHandler); @Deprecated  OkCancelDialog(String caption, Handler okHandler, ButtonOption buttonOption); @Deprecated  OkCancelDialog(String caption, Component content, Handler okHandler, ButtonOption buttonOption); @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification = "yeah, we know...") @Override void setContent(@CheckForNull Component content); void setSize(String width, String height); MessageList validate(); ValidationService getValidationService(); void setValidationService(ValidationService validationService); void setBeforeOkHandler(Handler beforeOkHandler); OkCancelDialog open(); void addContent(Component c); void addContent(Component c, float expandRatio); boolean isOkPressed(); ValidationDisplayState getValidationDisplayState(); boolean isCancelPressed(); String getOkCaption(); void setOkCaption(String okCaption); String getCancelCaption(); void setCancelCaption(String cancelCaption); static Builder builder(String caption);  }