|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.cell.client.AbstractCell<C>
com.google.gwt.cell.client.AbstractEditableCell<C,V>
com.google.gwt.cell.client.AbstractInputCell<T,V>
com.sencha.gxt.cell.core.client.AbstractEventInputCell<T,FieldCell.FieldViewData>
com.sencha.gxt.cell.core.client.form.FieldCell<T>
com.sencha.gxt.cell.core.client.form.ValueBaseInputCell<T>
com.sencha.gxt.cell.core.client.form.TriggerFieldCell<T>
com.sencha.gxt.cell.core.client.form.ComboBoxCell<T>
public class ComboBoxCell<T>
Nested Class Summary | |
---|---|
static class |
ComboBoxCell.QueryMode
|
static class |
ComboBoxCell.TriggerAction
TriggerAction enum. |
Nested classes/interfaces inherited from class com.sencha.gxt.cell.core.client.form.TriggerFieldCell |
---|
TriggerFieldCell.TriggerFieldAppearance |
Nested classes/interfaces inherited from class com.sencha.gxt.cell.core.client.form.ValueBaseInputCell |
---|
ValueBaseInputCell.ValueBaseFieldAppearance |
Nested classes/interfaces inherited from class com.sencha.gxt.cell.core.client.form.FieldCell |
---|
FieldCell.FieldAppearance, FieldCell.FieldAppearanceOptions, FieldCell.FieldViewData |
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell |
---|
Cell.Context |
Constructor Summary | |
---|---|
ComboBoxCell(ListStore<T> store,
LabelProvider<? super T> labelProvider)
Creates a combo box cell that renders all items with the given label provider. |
|
ComboBoxCell(ListStore<T> store,
LabelProvider<? super T> labelProvider,
ListView<T,?> view)
Creates a combo box cell that renders the input value with the label provider. |
|
ComboBoxCell(ListStore<T> store,
LabelProvider<? super T> labelProvider,
ListView<T,?> view,
TriggerFieldCell.TriggerFieldAppearance appearance)
Creates a combo box cell that renders the input value with the label provider. |
|
ComboBoxCell(ListStore<T> store,
LabelProvider<? super T> labelProvider,
SafeHtmlRenderer<T> renderer)
Creates a combo box cell that renders the input value with the label provider and the drop down values with the renderer. |
|
ComboBoxCell(ListStore<T> store,
LabelProvider<? super T> labelProvider,
SafeHtmlRenderer<T> renderer,
TriggerFieldCell.TriggerFieldAppearance appearance)
Creates a combo box cell that renders the input value with the label provider and the drop down values with the renderer. |
|
ComboBoxCell(ListStore<T> store,
LabelProvider<? super T> labelProvider,
TriggerFieldCell.TriggerFieldAppearance appearance)
Creates a combo box cell that renders both the input value and drop down values with the given label provider. |
Method Summary | |
---|---|
HandlerRegistration |
addBeforeSelectionHandler(BeforeSelectionHandler<T> handler)
Adds a BeforeSelectionEvent handler. |
HandlerRegistration |
addSelectionHandler(SelectionHandler<T> handler)
Adds a SelectionEvent handler. |
void |
collapse(Cell.Context context,
XElement parent)
|
void |
doQuery(Cell.Context context,
XElement parent,
ValueUpdater<T> updater,
T value,
java.lang.String query,
boolean force)
|
void |
expand(Cell.Context context,
XElement parent,
ValueUpdater<T> updater,
T value)
|
java.lang.String |
getAllQuery()
Returns the all query. |
LabelProvider<? super 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(java.lang.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 |
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)
|
Methods inherited from class com.sencha.gxt.cell.core.client.form.TriggerFieldCell |
---|
finishEditing, getAppearance, isEditable, isHideTrigger, isMonitorTab, setEditable, setHideTrigger, setMonitorTab, setSize |
Methods inherited from class com.sencha.gxt.cell.core.client.form.ValueBaseInputCell |
---|
addParseErrorHandler, disable, enable, getCursorPos, getEmptyText, getInputElement, getName, getPropertyEditor, getText, isAllowBlank, isClearValueOnParseError, isSelectOnFocus, onEmpty, resetFocus, select, selectAll, setAllowBlank, setClearValueOnParseError, setCursorPos, setEmptyText, setName, setPropertyEditor, setSelectOnFocus, setText |
Methods inherited from class com.sencha.gxt.cell.core.client.form.FieldCell |
---|
getHeight, getWidth, handlesSelection, isDisabled, isReadOnly, onValid, redrawOnResize, setHeight, setReadOnly, setSize, setWidth |
Methods inherited from class com.sencha.gxt.cell.core.client.AbstractEventInputCell |
---|
addHandler, fireEvent, isDisableEvents, setDisableEvents |
Methods inherited from class com.google.gwt.cell.client.AbstractInputCell |
---|
isEditing |
Methods inherited from class com.google.gwt.cell.client.AbstractEditableCell |
---|
clearViewData, getViewData, setViewData |
Methods inherited from class com.google.gwt.cell.client.AbstractCell |
---|
dependsOnSelection, getConsumedEvents, setValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public ComboBoxCell(ListStore<T> store, LabelProvider<? super T> labelProvider)
store
- the store containing the data that can be selectedlabelProvider
- converts the current model type into a string value to
display in the text boxpublic ComboBoxCell(ListStore<T> store, LabelProvider<? super T> labelProvider, ListView<T,?> view)
store
- the store containing the data that can be selectedlabelProvider
- converts the current model type into a string value to
display in the text boxview
- the list viewpublic ComboBoxCell(ListStore<T> store, LabelProvider<? super T> labelProvider, ListView<T,?> view, TriggerFieldCell.TriggerFieldAppearance appearance)
store
- the store containing the data that can be selectedlabelProvider
- converts the current model type into a string value to
display in the text boxview
- the list viewappearance
- the appearancepublic ComboBoxCell(ListStore<T> store, LabelProvider<? super T> labelProvider, SafeHtmlRenderer<T> renderer)
store
- the store containing the data that can be selectedlabelProvider
- converts the current model type into a string value to
display in the text boxrenderer
- draws the current model as html in the drop downpublic ComboBoxCell(ListStore<T> store, LabelProvider<? super T> labelProvider, SafeHtmlRenderer<T> renderer, TriggerFieldCell.TriggerFieldAppearance appearance)
store
- the store containing the data that can be selectedlabelProvider
- converts the current model type into a string value to
display in the text boxrenderer
- draws the current model as html in the drop downappearance
- the appearancepublic ComboBoxCell(ListStore<T> store, LabelProvider<? super T> labelProvider, TriggerFieldCell.TriggerFieldAppearance appearance)
store
- the store containing the data that can be selectedlabelProvider
- converts the current model type into a string value to
display in the text box and the drop down valuesappearance
- the appearanceMethod Detail |
---|
public HandlerRegistration addBeforeSelectionHandler(BeforeSelectionHandler<T> handler)
BeforeSelectionEvent
handler. The handler will be passed an
instance of CellBeforeSelectionEvent
which can be cast to.
addBeforeSelectionHandler
in interface HasBeforeSelectionHandlers<T>
handler
- the handler
public HandlerRegistration addSelectionHandler(SelectionHandler<T> handler)
SelectionEvent
handler. The handler will be passed an
instance of CellSelectionEvent
which can be cast to.
addSelectionHandler
in interface HasSelectionHandlers<T>
handler
- the handler
public void collapse(Cell.Context context, XElement parent)
public void doQuery(Cell.Context context, XElement parent, ValueUpdater<T> updater, T value, java.lang.String query, boolean force)
public void expand(Cell.Context context, XElement parent, ValueUpdater<T> updater, T value)
public java.lang.String getAllQuery()
public LabelProvider<? super T> getLabelProvider()
public ListView<T,?> getListView()
public Loader<?,?> getLoader()
public int getMinChars()
public int getMinListWidth()
public ComboBoxCell.QueryMode getMode()
public int getPageSize()
public PagingToolBar getPagingToolBar()
public ListStore<T> getStore()
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)
render
in interface Cell<T>
render
in class TriggerFieldCell<T>
public void select(int index)
index
- the index of the item to selectpublic void select(T item)
item
- the item to selectpublic void setAllQuery(java.lang.String allQuery)
allQuery
- the all querypublic void setForceSelection(boolean forceSelection)
forceSelection
- true to force selectionpublic 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |