|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
com.vaadin.terminal.gwt.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.SuggestionMenu
The menu where the suggestions are rendered |
class |
VFilterSelect.SuggestionPopup
Represents the popup box with the selection options. |
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 | |
---|---|
static String |
ATTR_NO_TEXT_INPUT
|
static int |
FILTERINGMODE_CONTAINS
|
static int |
FILTERINGMODE_OFF
|
static int |
FILTERINGMODE_STARTSWITH
|
protected int |
pageLength
|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
VFilterSelect()
Default constructor |
Method Summary | |
---|---|
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()
Sets focus to this widget. |
com.google.gwt.user.client.Element |
getSubPartElement(String subPart)
Locates an element inside a component using the identifier provided in subPart . |
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? |
protected void |
onAttach()
|
void |
onBlur(com.google.gwt.event.dom.client.BlurEvent 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 |
setHeight(String height)
|
void |
setWidth(String width)
|
void |
updateFromUIDL(UIDL uidl,
ApplicationConnection client)
|
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
getWidget, initWidget, isAttached, onBrowserEvent, 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 |
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, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FILTERINGMODE_OFF
public static final int FILTERINGMODE_STARTSWITH
public static final int FILTERINGMODE_CONTAINS
protected int pageLength
public static final String ATTR_NO_TEXT_INPUT
Constructor Detail |
---|
public VFilterSelect()
Method Detail |
---|
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 updateFromUIDL(UIDL uidl, ApplicationConnection client)
updateFromUIDL
in interface Paintable
protected void onAttach()
onAttach
in class com.google.gwt.user.client.ui.Composite
public void onSuggestionSelected(VFilterSelect.FilterSelectSuggestion suggestion)
suggestion
- The suggestion that just got selected.public void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)
onKeyDown
in interface com.google.gwt.event.dom.client.KeyDownHandler
public void onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event)
onKeyUp
in interface com.google.gwt.event.dom.client.KeyUpHandler
event
- 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.ClickHandler
public void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
onFocus
in interface com.google.gwt.event.dom.client.FocusHandler
public void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
onBlur
in interface com.google.gwt.event.dom.client.BlurHandler
public void focus()
Focusable
focus
in interface Focusable
public void setWidth(String width)
setWidth
in class com.google.gwt.user.client.ui.UIObject
public void setHeight(String height)
setHeight
in class com.google.gwt.user.client.ui.UIObject
protected void onDetach()
onDetach
in class com.google.gwt.user.client.ui.Composite
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
SubPartAware
subPart
. The subPart
identifier is component specific and
may be any string of characters, numbers, space characters and brackets.
getSubPartElement
in interface SubPartAware
subPart
- The identifier for the element inside the component
public String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAware
subElement
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 SubPartAware
subElement
- The element the identifier string should uniquely identify
subElement
or null
if no identifier could be provided.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |