/** * Set the tab description. * @param description Tab description * @return this */ default TabBuilder<C> description(String description) { return description(Localizable.builder().message(description).build()); }
/** * Sets the caption of the hiding toggle for the column which corresponds to this virtual property. Shown in the * toggle for this column in the grid's sidebar when the column is hidable. * @param hidingToggleCaption Hiding toggle caption default message * @param messageCode Hiding toggle caption localization message code * @return this */ default VirtualPropertyColumnBuilder<T, I, P, C, B> hidingToggleCaption(String hidingToggleCaption, String messageCode) { return hidingToggleCaption(Localizable.builder().message(hidingToggleCaption).messageCode(messageCode).build()); }
@Override public DateInputBuilder parseErrorMessage(String defaultParseErrorMessage, String messageCode, Object... arguments) { this.parseErrorMessage = Localizable.builder().message(defaultParseErrorMessage).messageCode(messageCode) .messageArguments(arguments).build(); return builder(); }
/** * Set the caption for the editor <em>Cancel</em> button * @param caption Button caption * @param messageCode Optional caption translation message code * @return this */ default B editorCancelCaption(String caption, String messageCode) { return editorCancelCaption(Localizable.builder().message(caption).messageCode(messageCode).build()); }
/** * Sets the caption of the hiding toggle for the column which corresponds to given property. Shown in the toggle * for this column in the grid's sidebar when the column is hidable. * @param property Item property to set the caption for (not null) * @param hidingToggleCaption Hiding toggle caption default message * @param messageCode Hiding toggle caption localization message code * @return this */ default B hidingToggleCaption(P property, String hidingToggleCaption, String messageCode) { return hidingToggleCaption(property, Localizable.builder().message(hidingToggleCaption).messageCode(messageCode).build()); }
@Override public B parseErrorMessage(String defaultParseErrorMessage, String messageCode, Object... arguments) { this.parseErrorMessage = Localizable.builder().message(defaultParseErrorMessage).messageCode(messageCode) .messageArguments(arguments).build(); return builder(); }
/** * Sets the dialog message. * @param message The dialog message * @return this */ default B message(String message) { return message(Localizable.builder().message(message).build()); }
/** * Set the given property as required. If a property is required, the {@link Input} bound to the property will * be setted as required, and its validation will fail when empty. * @param property Property to set as required (not null) * @param message The default message to use to notify the required validation failure * @return this */ default B required(P property, String message) { return required(property, Localizable.builder().message(message).build()); }
/** * Set the caption for the editor <em>Save</em> button. * @param caption Button caption * @return this */ default B editorSaveCaption(String caption) { return editorSaveCaption(Localizable.builder().message(caption).build()); }
/** * Sets the empty selection caption. * @param caption the empty selection caption to set, <code>null</code> for none * @return this */ default B emptySelectionCaption(String caption) { return emptySelectionCaption(Localizable.builder().message(caption).build()); }
@Override public DateInputBuilder dateOutOfRangeMessage(String defaultDateOutOfRangeMessage, String messageCode, Object... arguments) { this.outOfRangeMessage = Localizable.builder().message(defaultDateOutOfRangeMessage).messageCode(messageCode) .messageArguments(arguments).build(); return builder(); }
@Override public PropertyInputFormBuilder<C> propertyCaption(Property<?> property, String defaultCaption, String messageCode, Object... arguments) { ObjectUtils.argumentNotNull(property, "Property must be not null"); instance.setPropertyCaption(property, Localizable.builder().message(defaultCaption).messageCode(messageCode) .messageArguments(arguments).build()); return this; }
/** * Set an explicit caption for given item. * @param item Item to set the caption for (not null) * @param caption Item caption * @param messageCode Item caption translation code * @return this */ default B itemCaption(ITEM item, String caption, String messageCode) { return itemCaption(item, Localizable.builder().message(caption).messageCode(messageCode).build()); }
/** * Set the footer text for the column which corresponds to given property. * @param property The property to configure (not null) * @param footer The column footer text * @return this */ default C footer(P property, String footer) { return footer(property, Localizable.builder().message(footer).build()); }
/** * Set the localizable message to use for the word <code>clear</code>. * @param defaultMessage Default message * @param messageCode Message translation code * @param arguments Optional message translation arguments * @return this */ default CalendarLocalizationBuilder<D, B> clear(String defaultMessage, String messageCode, Object... arguments) { return clear(Localizable.builder().message(defaultMessage).messageCode(messageCode) .messageArguments(arguments).build()); }
/** * Set an explicit caption for given item. * @param item Item to set the caption for (not null) * @param caption Item caption * @param messageCode Item caption translation code * @return this */ default B itemCaption(ITEM item, String caption, String messageCode) { return itemCaption(item, Localizable.builder().message(caption).messageCode(messageCode).build()); }
/** * Create a new menu item with the given text content. * <p> * The {@link MenuItemBuilder#add()} method can be used to add the item to the context menu. * </p> * @param text Menu item text content * @return A {@link MenuItemBuilder} to configure and add the menu item */ default MenuItemBuilder<L, M, C> withItem(String text) { return withItem(Localizable.builder().message(text).build()); }
/** * Create a new {@link Localizable}. * @param message Default message * @param messageCode Message translation code * @param arguments Optional message translation arguments * @return A new {@link Localizable} */ static Localizable of(String message, String messageCode, Object... arguments) { return Localizable.builder().message(message).messageCode(messageCode).messageArguments(arguments).build(); }
/** * Create a {@link Validator} which uses given {@link Predicate} to perform value validation and the given * localizable <code>message</code> as invalid value message when the predicate condition is not satisfied. * @param <T> Value type * @param predicate Predicate to use to check if value is valid (not null) * @param message Invalid value message * @return A new {@link Validator} using given {@link Predicate} and invalid value message */ static <T> Validator<T> create(Predicate<T> predicate, String message) { return new DefaultValidator<>(predicate, Localizable.builder().message(message).build()); }
/** * Create a new {@link Localizable} with the default message only. * @param message Default message * @return A new {@link Localizable} */ static Localizable of(String message) { return Localizable.builder().message(message).build(); }