|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectComposite
com.vaadin.client.ui.VFilterSelect
public class VFilterSelect
Client side implementation of the Select component. TODO needs major refactoring (to be extensible etc)
| Nested Class Summary | |
|---|---|
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. |
| Field Summary | |
|---|---|
boolean |
allowNewItem
For internal use only. |
static java.lang.String |
CLASSNAME
|
ApplicationConnection |
client
For internal use only. |
int |
currentPage
For internal use only. |
VFilterSelect.FilterSelectSuggestion |
currentSuggestion
The current suggestion selected from the dropdown. |
java.util.List<VFilterSelect.FilterSelectSuggestion> |
currentSuggestions
A collection of available suggestions (options) as received from the server. |
boolean |
enabled
For internal use only. |
com.vaadin.shared.ui.combobox.FilteringMode |
filteringmode
For internal use only. |
static com.vaadin.shared.ui.combobox.FilteringMode |
FILTERINGMODE_CONTAINS
Deprecated. |
static com.vaadin.shared.ui.combobox.FilteringMode |
FILTERINGMODE_OFF
Deprecated. |
static com.vaadin.shared.ui.combobox.FilteringMode |
FILTERINGMODE_STARTSWITH
Deprecated. |
boolean |
focused
For internal use only. |
boolean |
immediate
For internal use only. |
boolean |
initDone
For internal use only. |
java.lang.String |
inputPrompt
For internal use only. |
java.lang.String |
lastFilter
For internal use only. |
java.lang.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. |
java.lang.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. |
java.lang.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. |
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 Summary | |
|---|---|
VFilterSelect()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
bindAriaCaption(com.google.gwt.user.client.Element captionElement)
Called to bind the provided caption (label in HTML speak) element to the main input element of the Widget. |
protected VFilterSelect.SuggestionPopup |
createSuggestionPopup()
This method will create the SuggestionPopup used by the VFilterSelect instance. |
protected 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,
java.lang.String filter)
Filters the options at certain page using the given filter |
void |
focus()
Sets focus to this widget. |
com.google.gwt.user.client.Element |
getSubPartElement(java.lang.String subPart)
Locates an element inside a component using the identifier provided in subPart. |
java.lang.String |
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component. |
boolean |
hasNextPage()
Does the Select have more pages? |
int |
minWidth(java.lang.String captions)
Calculate minimum width for FilterSelect textarea. |
void |
onBlur(BlurEvent event)
|
void |
onBrowserEvent(Event event)
|
void |
onClick(ClickEvent event)
Listener for popupopener |
protected void |
onDetach()
|
void |
onFocus(FocusEvent event)
|
void |
onKeyDown(KeyDownEvent event)
|
void |
onKeyUp(KeyUpEvent event)
Triggered when a key was depressed |
void |
onSuggestionSelected(VFilterSelect.FilterSelectSuggestion suggestion)
Triggered when a suggestion is selected |
void |
setAriaInvalid(boolean invalid)
Called to set the element, typically an input element, as invalid. |
void |
setAriaRequired(boolean required)
Called to set the element, typically an input element, as required. |
void |
setPromptingOff(java.lang.String text)
Turns prompting off. |
void |
setPromptingOn()
Turns prompting on. |
void |
setSelectedItemIcon(java.lang.String iconUri)
Sets the icon URI of the selected item. |
void |
setStyleName(java.lang.String style)
|
void |
setStylePrimaryName(java.lang.String style)
|
void |
setTextboxText(java.lang.String text)
Sets the text in the text box. |
void |
setTextInputEnabled(boolean textInputEnabled)
|
void |
setWidth(java.lang.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final com.vaadin.shared.ui.combobox.FilteringMode FILTERINGMODE_OFF
@Deprecated public static final com.vaadin.shared.ui.combobox.FilteringMode FILTERINGMODE_STARTSWITH
@Deprecated public static final com.vaadin.shared.ui.combobox.FilteringMode FILTERINGMODE_CONTAINS
public static final java.lang.String CLASSNAME
public int pageLength
public final TextBox tb
For internal use only. May be removed or replaced in the future.
public final VFilterSelect.SuggestionPopup suggestionPopup
public ApplicationConnection client
public java.lang.String paintableId
public int currentPage
public final java.util.List<VFilterSelect.FilterSelectSuggestion> currentSuggestions
For internal use only. May be removed or replaced in the future.
public boolean immediate
public java.lang.String selectedOptionKey
public boolean waitingForFilteringResponse
public boolean updateSelectionWhenReponseIsReceived
public boolean initDone
public java.lang.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 com.vaadin.shared.ui.combobox.FilteringMode filteringmode
public java.lang.String inputPrompt
public boolean prompting
public boolean popupOpenerClicked
For internal use only. May be removed or replaced in the future.
public int suggestionPopupMinWidth
public java.lang.String lastNewItemString
For internal use only. May be removed or replaced in the future.
public boolean focused
| Constructor Detail |
|---|
public VFilterSelect()
| Method Detail |
|---|
public void onBrowserEvent(Event event)
protected TextBox createTextBox()
protected VFilterSelect.SuggestionPopup createSuggestionPopup()
public void setStyleName(java.lang.String style)
public void setStylePrimaryName(java.lang.String style)
protected void updateStyleNames()
public boolean hasNextPage()
public void filterOptions(int page)
page - The page which items are to be filtered
public void filterOptions(int page,
java.lang.String filter)
page - The page to filterfilter - The filter to apply to the componentspublic void updateReadOnly()
public void setTextInputEnabled(boolean textInputEnabled)
public void setTextboxText(java.lang.String text)
text - the text to set in the text boxpublic void setPromptingOn()
public void setPromptingOff(java.lang.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(java.lang.String iconUri)
iconUri - The URI of the iconpublic void onKeyDown(KeyDownEvent event)
public void onKeyUp(KeyUpEvent event)
event - The KeyUpEvent of the key depressedpublic void onClick(ClickEvent event)
public void updateSuggestionPopupMinWidth()
For internal use only. May be removed or replaced in the future.
public int minWidth(java.lang.String captions)
For internal use only. May be removed or replaced in the future.
public void onFocus(FocusEvent event)
public void onBlur(BlurEvent event)
public void focus()
Focusable
focus in interface Focusablepublic void updateRootWidth()
For internal use only. May be removed or replaced in the future.
public void setWidth(java.lang.String width)
protected void onDetach()
public com.google.gwt.user.client.Element getSubPartElement(java.lang.String subPart)
SubPartAwaresubPart. The subPart identifier is component specific and
may be any string of characters, numbers, space characters and brackets.
getSubPartElement in interface SubPartAwaresubPart - The identifier for the element inside the component
public java.lang.String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAwaresubElement is a part of the component and must never be null.
Note!
getSubPartElement(getSubPartName(element)) == element is not
always true. A component can choose to provide a more generic
identifier for any given element if the results of all interactions with
subElement are the same as interactions with the element
identified by the return value. For example a button can return an
identifier for the root element even though a DIV inside the button was
passed as subElement because interactions with the DIV and the
root button element produce the same result.
getSubPartName in interface SubPartAwaresubElement - The element the identifier string should uniquely identify
subElement or null
if no identifier could be provided.public void setAriaRequired(boolean required)
HandlesAriaRequired
setAriaRequired in interface HandlesAriaRequiredrequired - boolean true when the element needs to be set as requiredpublic void setAriaInvalid(boolean invalid)
HandlesAriaInvalid
setAriaInvalid in interface HandlesAriaInvalidinvalid - boolean, true when the element should be marked invalid, false
otherwisepublic void bindAriaCaption(com.google.gwt.user.client.Element captionElement)
HandlesAriaCaption
bindAriaCaption in interface HandlesAriaCaptioncaptionElement - Element of the caption
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||