diff --git a/core/src/main/java/io/github/mmm/ui/api/attribute/AttributeWriteAutocomplete.java b/core/src/main/java/io/github/mmm/ui/api/attribute/AttributeWriteAutocomplete.java index 87d840c..13b1a73 100644 --- a/core/src/main/java/io/github/mmm/ui/api/attribute/AttributeWriteAutocomplete.java +++ b/core/src/main/java/io/github/mmm/ui/api/attribute/AttributeWriteAutocomplete.java @@ -1,215 +1,218 @@ -/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 */ -package io.github.mmm.ui.api.attribute; - -/** - * Interface to {@link #getAutocomplete() read} and {@link #setAutocomplete(String) write} the {@link #getAutocomplete() - * autocompletion setting}. - * - * @since 1.0.0 - */ -public abstract interface AttributeWriteAutocomplete { - - /** {@link #getAutocomplete() Autocomplete} turned off. */ - String AUTOCOMPLETE_OFF = "off"; - - /** - * {@link #getAutocomplete() Autocomplete} for the username - * (login). - */ - String AUTOCOMPLETE_USERNAME = "username"; - - /** - * {@link #getAutocomplete() Autocomplete} for a new - * password (during account registration). - */ - String AUTOCOMPLETE_NEW_PASSWORD = "new-password"; - - /** - * {@link #getAutocomplete() Autocomplete} for the current - * password (during login). - */ - String AUTOCOMPLETE_CURRENT_PASSWORD = "current-password"; - - /** - * {@link #getAutocomplete() Autocomplete} for the given - * name (first name) of a person. - */ - String AUTOCOMPLETE_GIVEN_NAME = "given-name"; - - /** - * {@link #getAutocomplete() Autocomplete} for the family - * name (last name) of a person. - */ - String AUTOCOMPLETE_FAMILY_NAME = "family-name"; - - /** - * {@link #getAutocomplete() Autocomplete} for the organization - * title (job title) of a person. - */ - String AUTOCOMPLETE_JOB_TITLE = "organization-title"; - - /** - * {@link #getAutocomplete() Autocomplete} for the honorific - * prefix (prefix or title) of a person. - */ - String AUTOCOMPLETE_HONORIFIC_PREFIX = "honorific-prefix"; - - /** - * {@link #getAutocomplete() Autocomplete} for the nickname - * (e.g. pseudonym) of a person. - */ - String AUTOCOMPLETE_NICKNAME = "nickname"; - - /** - * {@link #getAutocomplete() Autocomplete} for a alpha-2 - * country code. - */ - String AUTOCOMPLETE_COUNTRY_CODE = "country"; - - /** - * {@link #getAutocomplete() Autocomplete} for a country - * name. - */ - String AUTOCOMPLETE_COUNTRY_NAME = "country-name"; - - /** - * {@link #getAutocomplete() Autocomplete} for a language - * code (locale). - */ - String AUTOCOMPLETE_LANGUAGE_CODE = "language"; - - /** - * {@link #getAutocomplete() Autocomplete} for a postal - * code (ZIP). - */ - String AUTOCOMPLETE_POSTAL_CODE = "postal-code"; - - /** - * {@link #getAutocomplete() Autocomplete} for a street - * address. - */ - String AUTOCOMPLETE_STREET = "street-address"; - - /** - * {@link #getAutocomplete() Autocomplete} for an organization - * (company name). - */ - String AUTOCOMPLETE_ORGANIZATION = "organization"; - - /** - * {@link #getAutocomplete() Autocomplete} for an URL. - */ - String AUTOCOMPLETE_URL = "url"; - - /** - * {@link #getAutocomplete() Autocomplete} for an E-mail - * address. - */ - String AUTOCOMPLETE_EMAIL = "email"; - - /** - * {@link #getAutocomplete() Autocomplete} for a telephone - * number. - */ - String AUTOCOMPLETE_TELEPHONE = "tel"; - - /** - * {@link #getAutocomplete() Autocomplete} for an instant - * messaging and presence protocol. - */ - String AUTOCOMPLETE_IMPP = "impp"; - - /** - * {@link #getAutocomplete() Autocomplete} for the birthday. - */ - String AUTOCOMPLETE_BIRTHDAY = "bday"; - - /** - * {@link #getAutocomplete() Autocomplete} for the - * sex - * (gender). - */ - String AUTOCOMPLETE_SEX = "sex"; - - /** - * {@link #getAutocomplete() Autocomplete} for a transaction - * currency. - */ - String AUTOCOMPLETE_TX_CURRENCY = "transaction-currency"; - - /** - * {@link #getAutocomplete() Autocomplete} for a transaction - * amount. - */ - String AUTOCOMPLETE_TX_AMOUNT = "transaction-amount"; - - /** - * {@link #getAutocomplete() Autocomplete} for a credit-card - * number. - */ - String AUTOCOMPLETE_CC_NUMBER = "cc-number"; - - /** - * {@link #getAutocomplete() Autocomplete} for a credit-card - * expiry date. - */ - String AUTOCOMPLETE_CC_EXPIRY = "cc-exp"; - - /** - * {@link #getAutocomplete() Autocomplete} for a credit-card - * security code. - */ - String AUTOCOMPLETE_CC_CSC = "cc-csc"; - - /** - * {@link #getAutocomplete() Autocomplete} for a credit-card - * type. - */ - String AUTOCOMPLETE_CC_TYPE = "cc-type"; - - /** - * @return the autocompletion configuration of this object (e.g. - * {@link io.github.mmm.ui.api.widget.input.UiTextualInput}). - */ - String getAutocomplete(); - - /** - * @param autocomplete is the new value of {@link #getAutocomplete()}. - */ - void setAutocomplete(String autocomplete); - - /** - * Disables autocompletion entirely by {@link #setAutocomplete(String) setting} to {@link #AUTOCOMPLETE_OFF}. - */ - default void setAutocompleteOff() { - - setAutocomplete(AUTOCOMPLETE_OFF); - } - -} +/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 + * http://www.apache.org/licenses/LICENSE-2.0 */ +package io.github.mmm.ui.api.attribute; + +/** + * Interface to {@link #getAutocomplete() read} and {@link #setAutocomplete(String) write} the {@link #getAutocomplete() + * autocompletion setting}. + * + * @since 1.0.0 + */ +public abstract interface AttributeWriteAutocomplete { + + /** {@link #getAutocomplete() Autocomplete} turned off. */ + String AUTOCOMPLETE_OFF = "off"; + + /** + * {@link #getAutocomplete() Autocomplete} for the username + * (login). + */ + String AUTOCOMPLETE_USERNAME = "username"; + + /** + * {@link #getAutocomplete() Autocomplete} for a new + * password (during account registration). + */ + String AUTOCOMPLETE_NEW_PASSWORD = "new-password"; + + /** + * {@link #getAutocomplete() Autocomplete} for the current + * password (during login). + */ + String AUTOCOMPLETE_CURRENT_PASSWORD = "current-password"; + + /** + * {@link #getAutocomplete() Autocomplete} for the given + * name (first name) of a person. + */ + String AUTOCOMPLETE_GIVEN_NAME = "given-name"; + + /** + * {@link #getAutocomplete() Autocomplete} for the family + * name (last name) of a person. + */ + String AUTOCOMPLETE_FAMILY_NAME = "family-name"; + + /** + * {@link #getAutocomplete() Autocomplete} for the organization + * title (job title) of a person. + */ + String AUTOCOMPLETE_JOB_TITLE = "organization-title"; + + /** + * {@link #getAutocomplete() Autocomplete} for the honorific + * prefix (prefix or title) of a person. + */ + String AUTOCOMPLETE_HONORIFIC_PREFIX = "honorific-prefix"; + + /** + * {@link #getAutocomplete() Autocomplete} for the nickname + * (e.g. pseudonym) of a person. + */ + String AUTOCOMPLETE_NICKNAME = "nickname"; + + /** + * {@link #getAutocomplete() Autocomplete} for a alpha-2 + * country code. + */ + String AUTOCOMPLETE_COUNTRY_CODE = "country"; + + /** + * {@link #getAutocomplete() Autocomplete} for a country + * name. + */ + String AUTOCOMPLETE_COUNTRY_NAME = "country-name"; + + /** + * {@link #getAutocomplete() Autocomplete} for a language + * code (locale). + */ + String AUTOCOMPLETE_LANGUAGE_CODE = "language"; + + /** + * {@link #getAutocomplete() Autocomplete} for a postal + * code (ZIP). + */ + String AUTOCOMPLETE_POSTAL_CODE = "postal-code"; + + /** + * {@link #getAutocomplete() Autocomplete} for a street + * address. + */ + String AUTOCOMPLETE_STREET = "street-address"; + + /** + * {@link #getAutocomplete() Autocomplete} for an organization + * (company name). + */ + String AUTOCOMPLETE_ORGANIZATION = "organization"; + + /** + * {@link #getAutocomplete() Autocomplete} for an URL. + */ + String AUTOCOMPLETE_URL = "url"; + + /** + * {@link #getAutocomplete() Autocomplete} for an E-mail + * address. + */ + String AUTOCOMPLETE_EMAIL = "email"; + + /** + * {@link #getAutocomplete() Autocomplete} for a telephone + * number. + */ + String AUTOCOMPLETE_TELEPHONE = "tel"; + + /** + * {@link #getAutocomplete() Autocomplete} for an instant + * messaging and presence protocol. + */ + String AUTOCOMPLETE_IMPP = "impp"; + + /** + * {@link #getAutocomplete() Autocomplete} for the birthday. + */ + String AUTOCOMPLETE_BIRTHDAY = "bday"; + + /** + * {@link #getAutocomplete() Autocomplete} for the + * sex + * (gender). + */ + String AUTOCOMPLETE_SEX = "sex"; + + /** + * {@link #getAutocomplete() Autocomplete} for a transaction + * currency. + */ + String AUTOCOMPLETE_TX_CURRENCY = "transaction-currency"; + + /** + * {@link #getAutocomplete() Autocomplete} for a transaction + * amount. + */ + String AUTOCOMPLETE_TX_AMOUNT = "transaction-amount"; + + /** + * {@link #getAutocomplete() Autocomplete} for a credit-card + * number. + */ + String AUTOCOMPLETE_CC_NUMBER = "cc-number"; + + /** + * {@link #getAutocomplete() Autocomplete} for a credit-card + * expiry date. + */ + String AUTOCOMPLETE_CC_EXPIRY = "cc-exp"; + + /** + * {@link #getAutocomplete() Autocomplete} for a credit-card + * security code. + */ + String AUTOCOMPLETE_CC_CSC = "cc-csc"; + + /** + * {@link #getAutocomplete() Autocomplete} for a credit-card + * type. + */ + String AUTOCOMPLETE_CC_TYPE = "cc-type"; + + /** + * @return the autocompletion configuration of this object (e.g. + * {@link io.github.mmm.ui.api.widget.input.UiTextualInput}). + * @see #AUTOCOMPLETE_EMAIL + * @see #AUTOCOMPLETE_USERNAME + * @see #AUTOCOMPLETE_OFF + */ + String getAutocomplete(); + + /** + * @param autocomplete is the new value of {@link #getAutocomplete()}. + */ + void setAutocomplete(String autocomplete); + + /** + * Disables autocompletion entirely by {@link #setAutocomplete(String) setting} to {@link #AUTOCOMPLETE_OFF}. + */ + default void setAutocompleteOff() { + + setAutocomplete(AUTOCOMPLETE_OFF); + } + +}