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<java.lang.String>, com.google.gwt.event.logical.shared.HasSelectionHandlers<JmixSuggestionFieldWidget.Suggestion>
Modifier and Type | Class and Description |
---|---|
protected class |
JmixSuggestionFieldWidget.JmixTextFieldEvents |
class |
JmixSuggestionFieldWidget.Suggestion |
protected class |
JmixSuggestionFieldWidget.SuggestionPopup |
protected class |
JmixSuggestionFieldWidget.SuggestionTimer |
Modifier and Type | Field and Description |
---|---|
java.util.function.Consumer<java.lang.String> |
arrowDownActionHandler |
protected int |
asyncSearchDelayMs |
java.lang.Runnable |
cancelSearchHandler |
java.util.function.Consumer<java.lang.String> |
enterActionHandler |
protected boolean |
focused |
boolean |
iePreventBlur |
protected int |
minSearchStringLength |
protected static java.lang.String |
MODIFIED_STYLENAME |
protected java.lang.String |
popupStylename |
protected java.lang.String |
popupWidth |
protected java.lang.String |
prevQuery |
java.util.function.Consumer<java.lang.String> |
searchExecutor |
protected boolean |
selectFirstSuggestionOnShow |
protected static java.lang.String |
SUGGESTION_CAPTION |
protected static java.lang.String |
SUGGESTION_ID |
protected static java.lang.String |
SUGGESTION_STYLE_NAME |
protected java.util.List<JmixSuggestionFieldWidget.Suggestion> |
suggestions |
protected SuggestionsContainer |
suggestionsContainer |
java.util.function.Consumer<JmixSuggestionFieldWidget.Suggestion> |
suggestionSelectedHandler |
protected JmixSuggestionFieldWidget.SuggestionPopup |
suggestionsPopup |
protected JmixSuggestionFieldWidget.SuggestionTimer |
suggestionTimer |
protected com.vaadin.client.ui.VTextField |
textField |
protected static java.lang.String |
V_FILTERSELECT_SUGGESTPOPUP |
protected java.lang.String |
value |
Constructor and Description |
---|
JmixSuggestionFieldWidget() |
Modifier and Type | Method and Description |
---|---|
com.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<java.lang.String> handler) |
protected void |
cancelSearch() |
protected JmixSuggestionFieldWidget.SuggestionPopup |
createSuggestionPopup(SuggestionsContainer suggestionsContainer) |
protected void |
disableAutocompletion() |
protected static double |
getMarginBorderPaddingWidth(com.google.gwt.dom.client.Element element) |
int |
getTabIndex() |
java.lang.String |
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 |
initTextField() |
protected boolean |
isActive() |
boolean |
isEnabled() |
boolean |
isFocused() |
boolean |
isReadonly() |
boolean |
isSelectFirstSuggestionOnShow() |
protected void |
preventEvent(com.google.gwt.event.dom.client.KeyCodeEvent event) |
protected void |
resetComponentState() |
protected void |
scheduleQuery(java.lang.String query) |
protected void |
searchSuggestions(java.lang.String query) |
protected void |
selectSuggestion() |
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(java.lang.String inputPrompt) |
protected void |
setMinSearchStringLength(int minSearchStringLength) |
void |
setPopupStyleName(java.util.List<java.lang.String> styleName) |
void |
setPopupWidth(java.lang.String popupWidth) |
void |
setReadonly(boolean readonly) |
void |
setSelectFirstSuggestionOnShow(boolean selectFirstSuggestionOnShow) |
void |
setTabIndex(int index) |
protected void |
setupComposition() |
void |
setValue(java.lang.String newValue) |
void |
setValue(java.lang.String value,
boolean fireEvents) |
protected void |
showSuggestions(boolean userOriginated) |
protected void |
showSuggestions(elemental.json.JsonArray suggestions,
boolean userOriginated) |
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
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
protected static final java.lang.String V_FILTERSELECT_SUGGESTPOPUP
protected static final java.lang.String MODIFIED_STYLENAME
protected static final java.lang.String SUGGESTION_CAPTION
protected static final java.lang.String SUGGESTION_ID
protected static final java.lang.String SUGGESTION_STYLE_NAME
protected int asyncSearchDelayMs
protected int minSearchStringLength
protected final com.vaadin.client.ui.VTextField textField
protected final JmixSuggestionFieldWidget.SuggestionPopup suggestionsPopup
protected final SuggestionsContainer suggestionsContainer
protected JmixSuggestionFieldWidget.SuggestionTimer suggestionTimer
public java.util.function.Consumer<java.lang.String> searchExecutor
public java.util.function.Consumer<java.lang.String> arrowDownActionHandler
public java.util.function.Consumer<java.lang.String> enterActionHandler
public java.util.function.Consumer<JmixSuggestionFieldWidget.Suggestion> suggestionSelectedHandler
public java.lang.Runnable cancelSearchHandler
protected java.lang.String value
protected java.lang.String prevQuery
public boolean iePreventBlur
protected java.util.List<JmixSuggestionFieldWidget.Suggestion> suggestions
protected java.lang.String popupStylename
protected java.lang.String popupWidth
protected boolean focused
protected boolean selectFirstSuggestionOnShow
protected void setupComposition()
protected void initTextField()
protected JmixSuggestionFieldWidget.SuggestionPopup createSuggestionPopup(SuggestionsContainer suggestionsContainer)
protected void disableAutocompletion()
protected void setAsyncSearchDelayMs(int asyncSearchDelayMs)
protected void setMinSearchStringLength(int minSearchStringLength)
protected void showSuggestions(elemental.json.JsonArray suggestions, boolean userOriginated)
protected void showSuggestions(boolean userOriginated)
public boolean isSelectFirstSuggestionOnShow()
public void setSelectFirstSuggestionOnShow(boolean selectFirstSuggestionOnShow)
protected void scheduleQuery(java.lang.String query)
protected void selectSuggestion()
protected void selectSuggestion(JmixSuggestionFieldWidget.Suggestion newSuggestion)
protected void searchSuggestions(java.lang.String query)
public boolean isFocused()
public int getTabIndex()
getTabIndex
in interface com.google.gwt.user.client.ui.Focusable
public void setTabIndex(int index)
setTabIndex
in interface com.google.gwt.user.client.ui.Focusable
public boolean isEnabled()
isEnabled
in interface com.google.gwt.user.client.ui.HasEnabled
public void setEnabled(boolean enabled)
setEnabled
in interface com.google.gwt.user.client.ui.HasEnabled
public boolean isReadonly()
public void setReadonly(boolean readonly)
protected void cancelSearch()
protected void resetComponentState()
public void setAccessKey(char key)
setAccessKey
in interface com.google.gwt.user.client.ui.Focusable
public void setFocus(boolean focused)
setFocus
in interface com.google.gwt.user.client.ui.Focusable
public void setValue(java.lang.String newValue)
setValue
in interface com.google.gwt.user.client.TakesValue<java.lang.String>
setValue
in interface com.google.gwt.user.client.ui.HasValue<java.lang.String>
public void setValue(java.lang.String value, boolean fireEvents)
setValue
in interface com.google.gwt.user.client.ui.HasValue<java.lang.String>
public java.lang.String getValue()
getValue
in interface com.google.gwt.user.client.TakesValue<java.lang.String>
getValue
in interface com.google.gwt.user.client.ui.HasValue<java.lang.String>
protected void handleEnterKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event)
protected void handleArrowUpKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event)
protected void handleArrowDownKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event)
protected boolean isActive()
protected void handleOnBlur(com.google.gwt.event.dom.client.BlurEvent event)
protected void handleOnFocus(com.google.gwt.event.dom.client.FocusEvent event)
protected void handleEscKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event)
protected void preventEvent(com.google.gwt.event.dom.client.KeyCodeEvent event)
public com.google.gwt.event.shared.HandlerRegistration addKeyDownHandler(com.google.gwt.event.dom.client.KeyDownHandler handler)
addKeyDownHandler
in interface com.google.gwt.event.dom.client.HasKeyDownHandlers
public com.google.gwt.event.shared.HandlerRegistration addKeyPressHandler(com.google.gwt.event.dom.client.KeyPressHandler handler)
addKeyPressHandler
in interface com.google.gwt.event.dom.client.HasKeyPressHandlers
public com.google.gwt.event.shared.HandlerRegistration addKeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler handler)
addKeyUpHandler
in interface com.google.gwt.event.dom.client.HasKeyUpHandlers
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.String> handler)
addValueChangeHandler
in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<java.lang.String>
public com.google.gwt.event.shared.HandlerRegistration addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<JmixSuggestionFieldWidget.Suggestion> handler)
addSelectionHandler
in interface com.google.gwt.event.logical.shared.HasSelectionHandlers<JmixSuggestionFieldWidget.Suggestion>
public void setInputPrompt(java.lang.String inputPrompt)
public void setPopupStyleName(java.util.List<java.lang.String> styleName)
public void setPopupWidth(java.lang.String popupWidth)
protected static double getMarginBorderPaddingWidth(com.google.gwt.dom.client.Element element)