Class AbstractPhoneNumberSuggestBox
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
com.google.gwt.user.client.ui.AbstractSuggestBoxNewEditor
de.knightsoftnet.mtwidgets.client.ui.widget.SuggestBoxNewEditor
de.knightsoftnet.mtwidgets.client.ui.widget.SuggestBoxWithEditorErrors
de.knightsoftnet.mtwidgets.client.ui.widget.AbstractFormatingSuggestBox
de.knightsoftnet.mtwidgets.client.ui.widget.AbstractPhoneNumberSuggestBox
- 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
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.AbstractSuggestBoxNewEditor
AbstractSuggestBoxNewEditor.DefaultSuggestionDisplay, AbstractSuggestBoxNewEditor.SuggestionCallback, AbstractSuggestBoxNewEditor.SuggestionDisplayNested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledNested classes/interfaces inherited from interface org.gwtproject.editor.client.Editor
org.gwtproject.editor.client.Editor.Ignore, org.gwtproject.editor.client.Editor.Path -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.google.gwt.user.client.TakesValue<?>protected final PhoneNumberUtilFields inherited from class com.google.gwt.user.client.ui.AbstractSuggestBoxNewEditor
callback, currentText, display, limit, oracle, selectsFirstItem, STYLENAME_DEFAULTFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotecteddefault constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract Stringformat phone number as string.voidformatValue(de.knightsoftnet.validators.shared.data.ValueWithPos<String> value, boolean fireEvents) format and set value.formatValueSynchron(String value) format value synchron, doesn't work for rest formatings.abstract de.knightsoftnet.validators.shared.data.ValueWithPos<String>formatWithPos(de.knightsoftnet.validators.shared.data.ValueWithPos<String> value, String countryCode) format phone number with position.get country code from reference field or localization depending as fallback.booleanisAllowedCharacter(char character) check a character if it's allowed input value.booleanisCharacterToReplace(char character) check a character if it's character to replace.charreplaceCharacter(char character) replace a character.voidsetCountryCodeReference(com.google.gwt.user.client.TakesValue<?> countryCodeReference) set reference to a field which contains the country code.voidsetCountryCodeReferenceField(com.google.gwt.user.client.TakesValue<?> countryCodeField) Deprecated.Methods inherited from class de.knightsoftnet.mtwidgets.client.ui.widget.AbstractFormatingSuggestBox
formatValue, onBrowserEvent, reformatValue, reformatValue, setTextWithPosMethods inherited from class de.knightsoftnet.mtwidgets.client.ui.widget.SuggestBoxWithEditorErrors
addBlurHandler, addFocusHandler, checkValidity, getAutocomplete, getPlaceholder, getValidationMessage, getValidationMessageElement, getValidity, isAutofocus, isRequired, setAutocomplete, setAutofocus, setCustomValidity, setPlaceholder, setRequired, setValidationMessageElementMethods inherited from class de.knightsoftnet.mtwidgets.client.ui.widget.SuggestBoxNewEditor
addEventsToTextBox, asEditor, getBoxAsFoucsWidget, getTabIndex, getText, getValue, getValueBox, isEnabled, setAccessKey, setEnabled, setFocus, setTabIndex, setText, setValue, setValue, wrapMethods inherited from class com.google.gwt.user.client.ui.AbstractSuggestBoxNewEditor
addEventsToTextBox, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addSelectionHandler, addValueChangeHandler, getLimit, getSuggestionDisplay, getSuggestOracle, hideSuggestionList, isAnimationEnabled, isAutoSelectEnabled, isSuggestionListShowing, onEnsureDebugId, refreshSuggestionList, setAnimationEnabled, setAutoSelectEnabled, setLimit, setOracle, setPopupStyleName, showSuggestionListMethods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onDetach, render, render, resolvePotentialElement, setWidgetMethods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.knightsoftnet.mtwidgets.client.ui.widget.features.HasFormating
isFormatingCharacterMethods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEventMethods inherited from interface de.knightsoftnet.mtwidgets.client.ui.widget.features.HasValidationMessageElement
editorErrorMatches, setTitle, showErrors, showErrorsMethods inherited from interface org.gwtproject.editor.client.IsEditor
asEditor
-
Field Details
-
countryCodeReference
protected com.google.gwt.user.client.TakesValue<?> countryCodeReference -
phoneNumberUtil
-
-
Constructor Details
-
AbstractPhoneNumberSuggestBox
default constructor.- Parameters:
oracle- suggest oracle to use
-
-
Method Details
-
setCountryCodeReferenceField
@Deprecated public void setCountryCodeReferenceField(com.google.gwt.user.client.TakesValue<?> countryCodeField) Deprecated.usesetCountryCodeReference(TakesValue)insteadset 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:HasCountryCodeReferenceset reference to a field which contains the country code.- Specified by:
setCountryCodeReferencein interfaceHasCountryCodeReference- Parameters:
countryCodeReference- field which contains the country code
-
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:HasFormatingcheck a character if it's allowed input value.- Specified by:
isAllowedCharacterin interfaceHasFormating- Parameters:
character- character to check- Returns:
- true if character is allowed
-
isCharacterToReplace
public boolean isCharacterToReplace(char character) Description copied from interface:HasFormatingcheck a character if it's character to replace.- Specified by:
isCharacterToReplacein interfaceHasFormating- Parameters:
character- character to check- Returns:
- true if character has to be replaced
-
replaceCharacter
public char replaceCharacter(char character) Description copied from interface:HasFormatingreplace a character.- Specified by:
replaceCharacterin interfaceHasFormating- Parameters:
character- to replace- Returns:
- replacement character
-
formatValueSynchron
Description copied from interface:HasFormatingformat value synchron, doesn't work for rest formatings.- Specified by:
formatValueSynchronin interfaceHasFormating- Parameters:
value- to format- Returns:
- formated value
-
format
format phone number as string.- Parameters:
value- phone number to formatcountryCode- code of default country- Returns:
- formated phone number
-
setCountryCodeReference(TakesValue)instead