Class JmixSuggestionFieldWidget
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
io.jmix.ui.widget.client.suggestionfield.JmixSuggestionFieldWidget
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasAllKeyHandlers,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<JmixSuggestionFieldWidget.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.HasEnabled,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
- Direct Known Subclasses:
JmixTagFieldWidget
public class JmixSuggestionFieldWidget
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.user.client.ui.Focusable, com.google.gwt.event.dom.client.HasAllKeyHandlers, com.google.gwt.user.client.ui.HasValue<String>, com.google.gwt.event.logical.shared.HasSelectionHandlers<JmixSuggestionFieldWidget.Suggestion>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classclassprotected classprotected classNested 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.DebugIdImplEnabled -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected booleanbooleanprotected intprotected static final Stringprotected Stringprotected Stringprotected Stringprotected booleanprotected static final Stringprotected static final Stringprotected static final Stringprotected List<JmixSuggestionFieldWidget.Suggestion>protected final SuggestionsContainerprotected final JmixSuggestionFieldWidget.SuggestionPopupprotected final com.vaadin.client.ui.VTextFieldprotected static final Stringprotected StringFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.event.shared.HandlerRegistrationaddKeyDownHandler(com.google.gwt.event.dom.client.KeyDownHandler handler) com.google.gwt.event.shared.HandlerRegistrationaddKeyPressHandler(com.google.gwt.event.dom.client.KeyPressHandler handler) com.google.gwt.event.shared.HandlerRegistrationaddKeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler handler) com.google.gwt.event.shared.HandlerRegistrationaddSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<JmixSuggestionFieldWidget.Suggestion> handler) com.google.gwt.event.shared.HandlerRegistrationaddValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<String> handler) protected voidcreateSuggestionPopup(SuggestionsContainer suggestionsContainer) protected voidprotected static doublegetMarginBorderPaddingWidth(com.google.gwt.dom.client.Element element) intgetValue()protected voidhandleArrowDownKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event) protected voidhandleArrowUpKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event) protected voidhandleEnterKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event) protected voidhandleEscKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event) protected voidhandleOnBlur(com.google.gwt.event.dom.client.BlurEvent event) protected voidhandleOnFocus(com.google.gwt.event.dom.client.FocusEvent event) protected voidprotected booleanisActive()booleanbooleanbooleanbooleanprotected voidpreventEvent(com.google.gwt.event.dom.client.KeyCodeEvent event) protected voidprotected voidscheduleQuery(String query) protected voidsearchSuggestions(String query) protected voidprotected voidselectSuggestion(JmixSuggestionFieldWidget.Suggestion newSuggestion) voidsetAccessKey(char key) protected voidsetAsyncSearchDelayMs(int asyncSearchDelayMs) voidsetEnabled(boolean enabled) voidsetFocus(boolean focused) voidsetInputPrompt(String inputPrompt) protected voidsetMinSearchStringLength(int minSearchStringLength) voidsetPopupStyleName(List<String> styleName) voidsetPopupWidth(String popupWidth) voidsetReadonly(boolean readonly) voidsetSelectFirstSuggestionOnShow(boolean selectFirstSuggestionOnShow) voidsetTabIndex(int index) protected voidvoidvoidprotected voidshowSuggestions(boolean userOriginated) protected voidshowSuggestions(elemental.json.JsonArray suggestions, boolean userOriginated) Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, 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, onEnsureDebugId, 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 com.google.gwt.event.shared.HasHandlers
fireEvent
-
Field Details
-
V_FILTERSELECT_SUGGESTPOPUP
- See Also:
-
MODIFIED_STYLENAME
- See Also:
-
SUGGESTION_CAPTION
- See Also:
-
SUGGESTION_ID
- See Also:
-
SUGGESTION_STYLE_NAME
- See Also:
-
asyncSearchDelayMs
protected int asyncSearchDelayMs -
minSearchStringLength
protected int minSearchStringLength -
textField
protected final com.vaadin.client.ui.VTextField textField -
suggestionsPopup
-
suggestionsContainer
-
suggestionTimer
-
searchExecutor
-
arrowDownActionHandler
-
enterActionHandler
-
suggestionSelectedHandler
-
cancelSearchHandler
-
value
-
prevQuery
-
iePreventBlur
public boolean iePreventBlur -
suggestions
-
popupStylename
-
popupWidth
-
focused
protected boolean focused -
selectFirstSuggestionOnShow
protected boolean selectFirstSuggestionOnShow
-
-
Constructor Details
-
JmixSuggestionFieldWidget
public JmixSuggestionFieldWidget()
-
-
Method Details
-
setupComposition
protected void setupComposition() -
initTextField
protected void initTextField() -
disableAutocompletion
protected void disableAutocompletion() -
setAsyncSearchDelayMs
protected void setAsyncSearchDelayMs(int asyncSearchDelayMs) -
setMinSearchStringLength
protected void setMinSearchStringLength(int minSearchStringLength) -
showSuggestions
protected void showSuggestions(elemental.json.JsonArray suggestions, boolean userOriginated) -
showSuggestions
protected void showSuggestions(boolean userOriginated) -
isSelectFirstSuggestionOnShow
public boolean isSelectFirstSuggestionOnShow() -
setSelectFirstSuggestionOnShow
public void setSelectFirstSuggestionOnShow(boolean selectFirstSuggestionOnShow) -
scheduleQuery
-
selectSuggestion
protected void selectSuggestion() -
selectSuggestion
-
searchSuggestions
-
isFocused
public boolean isFocused() -
getTabIndex
public int getTabIndex()- Specified by:
getTabIndexin interfacecom.google.gwt.user.client.ui.Focusable
-
setTabIndex
public void setTabIndex(int index) - Specified by:
setTabIndexin interfacecom.google.gwt.user.client.ui.Focusable
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
isReadonly
public boolean isReadonly() -
setReadonly
public void setReadonly(boolean readonly) -
cancelSearch
protected void cancelSearch() -
resetComponentState
protected void resetComponentState() -
setAccessKey
public void setAccessKey(char key) - Specified by:
setAccessKeyin interfacecom.google.gwt.user.client.ui.Focusable
-
setFocus
public void setFocus(boolean focused) - Specified by:
setFocusin interfacecom.google.gwt.user.client.ui.Focusable
-
setValue
-
setValue
- Specified by:
setValuein interfacecom.google.gwt.user.client.ui.HasValue<String>
-
getValue
-
handleEnterKeyPressed
protected void handleEnterKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event) -
handleArrowUpKeyPressed
protected void handleArrowUpKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event) -
handleArrowDownKeyPressed
protected void handleArrowDownKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event) -
isActive
protected boolean isActive() -
handleOnBlur
protected void handleOnBlur(com.google.gwt.event.dom.client.BlurEvent event) -
handleOnFocus
protected void handleOnFocus(com.google.gwt.event.dom.client.FocusEvent event) -
handleEscKeyPressed
protected void handleEscKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event) -
preventEvent
protected void preventEvent(com.google.gwt.event.dom.client.KeyCodeEvent event) -
addKeyDownHandler
public com.google.gwt.event.shared.HandlerRegistration addKeyDownHandler(com.google.gwt.event.dom.client.KeyDownHandler handler) - Specified by:
addKeyDownHandlerin interfacecom.google.gwt.event.dom.client.HasKeyDownHandlers
-
addKeyPressHandler
public com.google.gwt.event.shared.HandlerRegistration addKeyPressHandler(com.google.gwt.event.dom.client.KeyPressHandler handler) - Specified by:
addKeyPressHandlerin interfacecom.google.gwt.event.dom.client.HasKeyPressHandlers
-
addKeyUpHandler
public com.google.gwt.event.shared.HandlerRegistration addKeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler handler) - Specified by:
addKeyUpHandlerin interfacecom.google.gwt.event.dom.client.HasKeyUpHandlers
-
setInputPrompt
-
setPopupStyleName
-
setPopupWidth
-
getMarginBorderPaddingWidth
protected static double getMarginBorderPaddingWidth(com.google.gwt.dom.client.Element element)
-