Class AbstractPhoneNumberSuggestBox

java.lang.Object
com.google.gwt.user.client.ui.UIObject
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasAllKeyHandlers, com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasKeyPressHandlers, com.google.gwt.event.dom.client.HasKeyUpHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasSelectionHandlers<com.google.gwt.user.client.ui.SuggestOracle.Suggestion>, com.google.gwt.event.logical.shared.HasValueChangeHandlers<String>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.TakesValue<String>, com.google.gwt.user.client.ui.Focusable, com.google.gwt.user.client.ui.HasAnimation, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasValue<String>, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, HasAutocomplete, HasAutofocus, HasCountryCodeReference, HasFormating, HasPlaceholder, HasRequired, HasValidationMessageElement<String,org.gwtproject.editor.client.LeafValueEditor<String>>, HasValidity, org.gwtproject.editor.client.Editor<String>, org.gwtproject.editor.client.HasEditorErrors<String>, org.gwtproject.editor.client.IsEditor<org.gwtproject.editor.client.LeafValueEditor<String>>, org.gwtproject.editor.client.TakesValue<String>
Direct Known Subclasses:
PhoneNumberCommonInterSuggestBox, PhoneNumberCommonSuggestBox, PhoneNumberDin5008InterSuggestBox, PhoneNumberDin5008SuggestBox, PhoneNumberE123InterSuggestBox, PhoneNumberE123SuggestBox, PhoneNumberMsSuggestBox, PhoneNumberUriSuggestBox

public abstract class AbstractPhoneNumberSuggestBox extends AbstractFormatingSuggestBox implements HasCountryCodeReference
phone number common international suggest widget.
Author:
Manfred Tremmel
  • Field Details

    • countryCodeReference

      protected com.google.gwt.user.client.TakesValue<?> countryCodeReference
    • phoneNumberUtil

      protected final PhoneNumberUtil phoneNumberUtil
  • Constructor Details

    • AbstractPhoneNumberSuggestBox

      protected AbstractPhoneNumberSuggestBox(AbstractPhoneNumberLocalOracle<?> oracle)
      default constructor.
      Parameters:
      oracle - suggest oracle to use
  • Method Details

    • setCountryCodeReferenceField

      @Deprecated public void setCountryCodeReferenceField(com.google.gwt.user.client.TakesValue<?> countryCodeField)
      Deprecated.
      set reference to a field which contains the country code.
      Parameters:
      countryCodeField - field which contains the country code
    • setCountryCodeReference

      public void setCountryCodeReference(com.google.gwt.user.client.TakesValue<?> countryCodeReference)
      Description copied from interface: HasCountryCodeReference
      set reference to a field which contains the country code.
      Specified by:
      setCountryCodeReference in interface HasCountryCodeReference
      Parameters:
      countryCodeReference - field which contains the country code
    • getCountryCode

      public String getCountryCode()
      get country code from reference field or localization depending as fallback.
      Returns:
      string with country code
    • isAllowedCharacter

      public boolean isAllowedCharacter(char character)
      Description copied from interface: HasFormating
      check a character if it's allowed input value.
      Specified by:
      isAllowedCharacter in interface HasFormating
      Parameters:
      character - character to check
      Returns:
      true if character is allowed
    • isCharacterToReplace

      public boolean isCharacterToReplace(char character)
      Description copied from interface: HasFormating
      check a character if it's character to replace.
      Specified by:
      isCharacterToReplace in interface HasFormating
      Parameters:
      character - character to check
      Returns:
      true if character has to be replaced
    • replaceCharacter

      public char replaceCharacter(char character)
      Description copied from interface: HasFormating
      replace a character.
      Specified by:
      replaceCharacter in interface HasFormating
      Parameters:
      character - to replace
      Returns:
      replacement character
    • formatValue

      public void formatValue(de.knightsoftnet.validators.shared.data.ValueWithPos<String> value, boolean fireEvents)
      Description copied from interface: HasFormating
      format and set value.
      Specified by:
      formatValue in interface HasFormating
      Parameters:
      value - value to format
      fireEvents - when true and value changes, a ValueChangeEvent is triggered
    • formatValueSynchron

      public String formatValueSynchron(String value)
      Description copied from interface: HasFormating
      format value synchron, doesn't work for rest formatings.
      Specified by:
      formatValueSynchron in interface HasFormating
      Parameters:
      value - to format
      Returns:
      formated value
    • formatWithPos

      public abstract de.knightsoftnet.validators.shared.data.ValueWithPos<String> formatWithPos(de.knightsoftnet.validators.shared.data.ValueWithPos<String> value, String countryCode)
      format phone number with position.
      Parameters:
      value - the value with position to format
      countryCode - code of default country
      Returns:
      formated value with position
    • format

      public abstract String format(String value, String countryCode)
      format phone number as string.
      Parameters:
      value - phone number to format
      countryCode - code of default country
      Returns:
      formated phone number