public class ComboBoxCell<T> extends TriggerFieldCell<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
ComboBoxCell.QueryMode |
static class |
ComboBoxCell.TriggerAction
TriggerAction enum.
|
TriggerFieldCell.TriggerFieldAppearanceValueBaseFieldCell.ValueBaseFieldAppearanceFieldCell.FieldAppearance, FieldCell.FieldAppearanceOptions, FieldCell.FieldViewDataCell.Context| Constructor and Description |
|---|
ComboBoxCell(ListStore<T> store,
LabelProvider<T> labelProvider,
LabelProvider<T> viewLabelProvider) |
ComboBoxCell(ListStore<T> store,
LabelProvider<T> labelProvider,
ListView<T,?> view) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
clearSelections(Cell.Context context,
XElement parent,
ValueUpdater<T> updater) |
void |
collapse(Cell.Context context,
XElement parent) |
void |
doQuery(Cell.Context context,
XElement parent,
ValueUpdater<T> updater,
T value,
String query,
boolean force) |
void |
expand(Cell.Context context,
XElement parent,
ValueUpdater<T> updater,
T value) |
String |
getAllQuery()
Returns the all query.
|
LabelProvider<T> |
getLabelProvider()
Returns the label provider.
|
ListView<T,?> |
getListView()
Returns the list view.
|
Loader<?,?> |
getLoader() |
int |
getMinChars()
Returns the min characters used for autocompete and typeahead.
|
int |
getMinListWidth()
Returns the dropdown list's min width.
|
ComboBoxCell.QueryMode |
getMode() |
int |
getPageSize()
Returns the page size.
|
PagingToolBar |
getPagingToolBar()
Returns the combo's paging tool bar.
|
ListStore<T> |
getStore()
Returns the combo's list store.
|
ComboBoxCell.TriggerAction |
getTriggerAction()
Returns the trigger action.
|
int |
getTypeAheadDelay()
Returns the type ahead delay in milliseconds.
|
boolean |
isExpanded()
Returns
true if the dropdown is expanded. |
boolean |
isForceSelection()
Returns true if the field's value is forced to one of the value in the
list.
|
boolean |
isTypeAhead()
Returns true if type ahead is enabled.
|
void |
onBrowserEvent(Cell.Context context,
Element parent,
T value,
NativeEvent event,
ValueUpdater<T> valueUpdater) |
void |
render(Cell.Context context,
T value,
SafeHtmlBuilder sb) |
void |
select(int index)
Select an item in the dropdown list by its numeric index in the list.
|
void |
select(T item)
Select an item in the dropdown list.
|
void |
setAllQuery(String allQuery)
The text query to send to the server to return all records for the list
with no filtering (defaults to '').
|
void |
setForceSelection(boolean forceSelection)
Sets whether the combo's value is restricted to one of the values in the
list, false to allow the user to set arbitrary text into the field
(defaults to false).
|
void |
setLabelProvider(LabelProvider<T> labelProvider) |
void |
setLoader(Loader<?,?> loader)
Sets the loader for use with remote queries.
|
void |
setMinChars(int minChars)
Sets the minimum number of characters the user must type before
autocomplete and typeahead active (defaults to 4 if remote, or 0 if local).
|
void |
setMinListWidth(int minListWidth)
Sets the minimum width of the dropdown list in pixels (defaults to 70, will
be ignored if listWidth has a higher value).
|
void |
setPageSize(int pageSize)
Sets the page size.
|
void |
setStore(ListStore<T> store)
Sets the combo's store.
|
void |
setTriggerAction(ComboBoxCell.TriggerAction triggerAction) |
void |
setTypeAhead(boolean typeAhead) |
void |
setTypeAheadDelay(int typeAheadDelay) |
finishEditing, getAppearance, isEditable, isHideTrigger, isMonitorTab, setEditable, setHideTrigger, setMonitorTabaddParseErrorHandler, getEmptyText, getInputElement, getName, getPropertyEditor, getText, isAllowBlank, isSelectOnFocus, onEmpty, select, selectAll, setAllowBlank, setEmptyText, setName, setPropertyEditor, setSelectOnFocus, setTextgetHeight, getWidth, isReadOnly, onValid, setHeight, setReadOnly, setSize, setWidthaddHandler, fireEvent, isDisableEvents, setDisableEventsisEditing, resetFocusclearViewData, getViewData, setViewDatadependsOnSelection, getConsumedEvents, handlesSelection, setValuepublic ComboBoxCell(ListStore<T> store, LabelProvider<T> labelProvider, LabelProvider<T> viewLabelProvider)
public void clear()
public void clearSelections(Cell.Context context, XElement parent, ValueUpdater<T> updater)
public void collapse(Cell.Context context, XElement parent)
public void doQuery(Cell.Context context, XElement parent, ValueUpdater<T> updater, T value, String query, boolean force)
public void expand(Cell.Context context, XElement parent, ValueUpdater<T> updater, T value)
public String getAllQuery()
public LabelProvider<T> getLabelProvider()
public Loader<?,?> getLoader()
public int getMinChars()
public int getMinListWidth()
public ComboBoxCell.QueryMode getMode()
public int getPageSize()
public PagingToolBar getPagingToolBar()
public ComboBoxCell.TriggerAction getTriggerAction()
public int getTypeAheadDelay()
public boolean isExpanded()
true if the dropdown is expanded.public boolean isForceSelection()
public boolean isTypeAhead()
public void onBrowserEvent(Cell.Context context, Element parent, T value, NativeEvent event, ValueUpdater<T> valueUpdater)
onBrowserEvent in interface Cell<T>onBrowserEvent in class TriggerFieldCell<T>public void render(Cell.Context context, T value, SafeHtmlBuilder sb)
public void select(int index)
index - the index of the item to selectpublic void select(T item)
item - the item to selectpublic void setAllQuery(String allQuery)
allQuery - the all querypublic void setForceSelection(boolean forceSelection)
forceSelection - true to force selectionpublic void setLabelProvider(LabelProvider<T> labelProvider)
public void setLoader(Loader<?,?> loader)
loader - the loaderpublic void setMinChars(int minChars)
minChars - minimum number of characters before activating autocomplete
and typeaheadpublic void setMinListWidth(int minListWidth)
minListWidth - the min widthpublic void setPageSize(int pageSize)
pageSize - the page sizepublic void setStore(ListStore<T> store)
store - the storepublic void setTriggerAction(ComboBoxCell.TriggerAction triggerAction)
public void setTypeAhead(boolean typeAhead)
public void setTypeAheadDelay(int typeAheadDelay)
Copyright © 2012. All Rights Reserved.