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
Modifier and TypeClassDescriptionprotected class
class
protected class
protected class
Nested 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
Modifier and TypeFieldDescriptionprotected int
protected boolean
boolean
protected int
protected static final String
protected String
protected String
protected String
protected boolean
protected static final String
protected static final String
protected static final String
protected List<JmixSuggestionFieldWidget.Suggestion>
protected final SuggestionsContainer
protected final JmixSuggestionFieldWidget.SuggestionPopup
protected final com.vaadin.client.ui.VTextField
protected static final String
protected String
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.event.shared.HandlerRegistration
addKeyDownHandler
(com.google.gwt.event.dom.client.KeyDownHandler handler) com.google.gwt.event.shared.HandlerRegistration
addKeyPressHandler
(com.google.gwt.event.dom.client.KeyPressHandler handler) com.google.gwt.event.shared.HandlerRegistration
addKeyUpHandler
(com.google.gwt.event.dom.client.KeyUpHandler handler) com.google.gwt.event.shared.HandlerRegistration
addSelectionHandler
(com.google.gwt.event.logical.shared.SelectionHandler<JmixSuggestionFieldWidget.Suggestion> handler) com.google.gwt.event.shared.HandlerRegistration
addValueChangeHandler
(com.google.gwt.event.logical.shared.ValueChangeHandler<String> handler) protected void
createSuggestionPopup
(SuggestionsContainer suggestionsContainer) protected void
protected static double
getMarginBorderPaddingWidth
(com.google.gwt.dom.client.Element element) int
getValue()
protected void
handleArrowDownKeyPressed
(com.google.gwt.event.dom.client.KeyCodeEvent event) protected void
handleArrowUpKeyPressed
(com.google.gwt.event.dom.client.KeyCodeEvent event) protected void
handleEnterKeyPressed
(com.google.gwt.event.dom.client.KeyCodeEvent event) protected void
handleEscKeyPressed
(com.google.gwt.event.dom.client.KeyCodeEvent event) protected void
handleOnBlur
(com.google.gwt.event.dom.client.BlurEvent event) protected void
handleOnFocus
(com.google.gwt.event.dom.client.FocusEvent event) protected void
protected boolean
isActive()
boolean
boolean
boolean
boolean
protected void
preventEvent
(com.google.gwt.event.dom.client.KeyCodeEvent event) protected void
protected void
scheduleQuery
(String query) protected void
searchSuggestions
(String query) protected void
protected void
selectSuggestion
(JmixSuggestionFieldWidget.Suggestion newSuggestion) void
setAccessKey
(char key) protected void
setAsyncSearchDelayMs
(int asyncSearchDelayMs) void
setEnabled
(boolean enabled) void
setFocus
(boolean focused) void
setInputPrompt
(String inputPrompt) protected void
setMinSearchStringLength
(int minSearchStringLength) void
setPopupStyleName
(List<String> styleName) void
setPopupWidth
(String popupWidth) void
setReadonly
(boolean readonly) void
setSelectFirstSuggestionOnShow
(boolean selectFirstSuggestionOnShow) void
setTabIndex
(int index) protected void
void
void
protected void
showSuggestions
(boolean userOriginated) protected void
showSuggestions
(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, setWidget
Methods 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, unsinkEvents
Methods 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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
getTabIndex
in interfacecom.google.gwt.user.client.ui.Focusable
-
setTabIndex
public void setTabIndex(int index) - Specified by:
setTabIndex
in interfacecom.google.gwt.user.client.ui.Focusable
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfacecom.google.gwt.user.client.ui.HasEnabled
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in 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:
setAccessKey
in interfacecom.google.gwt.user.client.ui.Focusable
-
setFocus
public void setFocus(boolean focused) - Specified by:
setFocus
in interfacecom.google.gwt.user.client.ui.Focusable
-
setValue
-
setValue
- Specified by:
setValue
in 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:
addKeyDownHandler
in 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:
addKeyPressHandler
in 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:
addKeyUpHandler
in interfacecom.google.gwt.event.dom.client.HasKeyUpHandlers
-
setInputPrompt
-
setPopupStyleName
-
setPopupWidth
-
getMarginBorderPaddingWidth
protected static double getMarginBorderPaddingWidth(com.google.gwt.dom.client.Element element)
-