public class VFilterSelect extends com.google.gwt.user.client.ui.Composite implements Field, com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.KeyUpHandler, com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.event.dom.client.BlurHandler, Focusable, SubPartAware, HandlesAriaCaption, HandlesAriaInvalid, HandlesAriaRequired, DeferredWorker
| Modifier and Type | Class and Description |
|---|---|
class |
VFilterSelect.FilterSelectSuggestion
Represents a suggestion in the suggestion popup box.
|
class |
VFilterSelect.FilterSelectTextBox
TextBox variant used as input element for filter selects, which prevents
selecting text when disabled.
|
static class |
VFilterSelect.Select
For internal use only.
|
class |
VFilterSelect.SuggestionMenu
The menu where the suggestions are rendered.
|
class |
VFilterSelect.SuggestionPopup
Represents the popup box with the selection options.
|
| Modifier and Type | Field and Description |
|---|---|
boolean |
allowNewItem
For internal use only.
|
static String |
CLASSNAME |
ApplicationConnection |
client
For internal use only.
|
int |
currentPage
For internal use only.
|
VFilterSelect.FilterSelectSuggestion |
currentSuggestion
The current suggestion selected from the dropdown.
|
List<VFilterSelect.FilterSelectSuggestion> |
currentSuggestions
A collection of available suggestions (options) as received from the
server.
|
boolean |
enabled
For internal use only.
|
FilteringMode |
filteringmode
For internal use only.
|
static FilteringMode |
FILTERINGMODE_CONTAINS
Deprecated.
|
static FilteringMode |
FILTERINGMODE_OFF
Deprecated.
|
static FilteringMode |
FILTERINGMODE_STARTSWITH
Deprecated.
|
boolean |
focused
For internal use only.
|
boolean |
immediate
For internal use only.
|
boolean |
initDone
For internal use only.
|
String |
inputPrompt
For internal use only.
|
String |
lastFilter
For internal use only.
|
String |
lastNewItemString
Stores the last new item string to avoid double submissions.
|
boolean |
nullSelectionAllowed
For internal use only.
|
boolean |
nullSelectItem
For internal use only.
|
int |
pageLength
For internal use only.
|
String |
paintableId
For internal use only.
|
boolean |
popupOpenerClicked
Set true when popupopened has been clicked.
|
boolean |
prompting
For internal use only.
|
boolean |
readonly
For internal use only.
|
String |
selectedOptionKey
For internal use only.
|
VFilterSelect.Select |
selectPopupItemWhenResponseIsReceived
For internal use only.
|
VFilterSelect.SuggestionPopup |
suggestionPopup
For internal use only.
|
int |
suggestionPopupMinWidth
For internal use only.
|
String |
suggestionPopupWidth |
com.google.gwt.user.client.ui.TextBox |
tb
The text box where the filter is written
|
int |
totalMatches
For internal use only.
|
boolean |
updateSelectionWhenReponseIsReceived
For internal use only.
|
boolean |
waitingForFilteringResponse
For internal use only.
|
| Constructor and Description |
|---|
VFilterSelect()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bindAriaCaption(com.google.gwt.user.client.Element captionElement) |
protected VFilterSelect.SuggestionPopup |
createSuggestionPopup()
This method will create the SuggestionPopup used by the VFilterSelect
instance.
|
protected com.google.gwt.user.client.ui.TextBox |
createTextBox()
This method will create the TextBox used by the VFilterSelect instance.
|
void |
filterOptions(int page)
Filters the options at a certain page.
|
void |
filterOptions(int page,
String filter)
Filters the options at certain page using the given filter.
|
void |
focus() |
String |
getSelectedCaption()
This method is meant for internal use and may change in future versions.
|
com.google.gwt.user.client.Element |
getSubPartElement(String subPart) |
String |
getSubPartName(com.google.gwt.user.client.Element subElement) |
boolean |
hasNextPage()
Does the Select have more pages?
|
boolean |
isWorkPending() |
int |
minWidth(String captions)
Calculate minimum width for FilterSelect textarea.
|
void |
onBlur(com.google.gwt.event.dom.client.BlurEvent event) |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
onClick(com.google.gwt.event.dom.client.ClickEvent event)
Listener for popupopener.
|
protected void |
onDetach() |
void |
onFocus(com.google.gwt.event.dom.client.FocusEvent event) |
void |
onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event) |
void |
onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event)
Triggered when a key was depressed.
|
void |
onSuggestionSelected(VFilterSelect.FilterSelectSuggestion suggestion)
Triggered when a suggestion is selected.
|
void |
setAriaInvalid(boolean invalid) |
void |
setAriaRequired(boolean required) |
void |
setPromptingOff(String text)
Turns prompting off.
|
void |
setPromptingOn()
Turns prompting on.
|
void |
setSelectedCaption(String selectedCaption)
Sets the caption of selected item, if "scroll to page" is disabled.
|
void |
setSelectedItemIcon(String iconUri)
Sets the icon URI of the selected item.
|
void |
setStyleName(String style) |
void |
setStylePrimaryName(String style) |
void |
setTextboxText(String text)
Sets the text in the text box.
|
void |
setTextInputEnabled(boolean textInputEnabled) |
void |
setWidth(String width) |
void |
updateReadOnly()
For internal use only.
|
void |
updateRootWidth()
Calculates the width of the select if the select has undefined width.
|
protected void |
updateStyleNames() |
void |
updateSuggestionPopupMinWidth()
Update minimum width for FilterSelect textarea based on input prompt and
suggestions.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, 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, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString@Deprecated public static final FilteringMode FILTERINGMODE_OFF
@Deprecated public static final FilteringMode FILTERINGMODE_STARTSWITH
@Deprecated public static final FilteringMode FILTERINGMODE_CONTAINS
public static final String CLASSNAME
public int pageLength
public final com.google.gwt.user.client.ui.TextBox tb
For internal use only. May be removed or replaced in the future.
public final VFilterSelect.SuggestionPopup suggestionPopup
public ApplicationConnection client
public String paintableId
public int currentPage
public final List<VFilterSelect.FilterSelectSuggestion> currentSuggestions
For internal use only. May be removed or replaced in the future.
public boolean immediate
public String selectedOptionKey
public boolean waitingForFilteringResponse
public boolean updateSelectionWhenReponseIsReceived
public boolean initDone
public String lastFilter
public VFilterSelect.Select selectPopupItemWhenResponseIsReceived
public VFilterSelect.FilterSelectSuggestion currentSuggestion
For internal use only. May be removed or replaced in the future.
public boolean allowNewItem
public int totalMatches
public boolean nullSelectionAllowed
public boolean nullSelectItem
public boolean enabled
public boolean readonly
public FilteringMode filteringmode
public String inputPrompt
public boolean prompting
public boolean popupOpenerClicked
For internal use only. May be removed or replaced in the future.
public int suggestionPopupMinWidth
public String suggestionPopupWidth
public String lastNewItemString
For internal use only. May be removed or replaced in the future.
public boolean focused
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.Compositeprotected com.google.gwt.user.client.ui.TextBox createTextBox()
protected VFilterSelect.SuggestionPopup createSuggestionPopup()
public void setStyleName(String style)
setStyleName in class com.google.gwt.user.client.ui.UIObjectpublic void setStylePrimaryName(String style)
setStylePrimaryName in class com.google.gwt.user.client.ui.UIObjectprotected void updateStyleNames()
public boolean hasNextPage()
public void filterOptions(int page)
page - The page which items are to be filteredpublic void filterOptions(int page,
String filter)
page - The page to filterfilter - The filter to apply to the componentspublic void updateReadOnly()
public void setTextInputEnabled(boolean textInputEnabled)
public void setTextboxText(String text)
text - the text to set in the text boxpublic void setPromptingOn()
public void setPromptingOff(String text)
For internal use only. May be removed or replaced in the future.
text - The text the text box should contain.public void onSuggestionSelected(VFilterSelect.FilterSelectSuggestion suggestion)
suggestion - The suggestion that just got selected.public void setSelectedItemIcon(String iconUri)
iconUri - The URI of the iconpublic void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)
onKeyDown in interface com.google.gwt.event.dom.client.KeyDownHandlerpublic void onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event)
onKeyUp in interface com.google.gwt.event.dom.client.KeyUpHandlerevent - The KeyUpEvent of the key depressedpublic void onClick(com.google.gwt.event.dom.client.ClickEvent event)
onClick in interface com.google.gwt.event.dom.client.ClickHandlerpublic void updateSuggestionPopupMinWidth()
For internal use only. May be removed or replaced in the future.
public int minWidth(String captions)
For internal use only. May be removed or replaced in the future.
public void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
onFocus in interface com.google.gwt.event.dom.client.FocusHandlerpublic void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
onBlur in interface com.google.gwt.event.dom.client.BlurHandlerpublic void updateRootWidth()
For internal use only. May be removed or replaced in the future.
public void setWidth(String width)
setWidth in class com.google.gwt.user.client.ui.UIObjectprotected void onDetach()
onDetach in class com.google.gwt.user.client.ui.Compositepublic com.google.gwt.user.client.Element getSubPartElement(String subPart)
getSubPartElement in interface SubPartAwarepublic String getSubPartName(com.google.gwt.user.client.Element subElement)
getSubPartName in interface SubPartAwarepublic void setAriaRequired(boolean required)
setAriaRequired in interface HandlesAriaRequiredpublic void setAriaInvalid(boolean invalid)
setAriaInvalid in interface HandlesAriaInvalidpublic void bindAriaCaption(com.google.gwt.user.client.Element captionElement)
bindAriaCaption in interface HandlesAriaCaptionpublic boolean isWorkPending()
isWorkPending in interface DeferredWorkerpublic void setSelectedCaption(String selectedCaption)
selectedCaption - the caption of selected itempublic String getSelectedCaption()
Copyright © 2021 Vaadin Ltd. All rights reserved.