|
||||||||||
| 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.google.gwt.user.client.ui.SuggestBox
org.gwtbootstrap3.client.ui.SuggestBox
public class SuggestBox
Wrapper for a SuggestBox.
The default style is inherited from the Styles.DROPDOWN_MENU. Styling of the suggestions items need
a bit of css in order to be pleasing to the eye.
.dropdown-menu .item {
padding: 5px;
}
.dropdown-menu .item-selected {
background-color: #eee;
}
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.SuggestBox |
|---|
SuggestBox.DefaultSuggestionDisplay, SuggestBox.SuggestionCallback, SuggestBox.SuggestionDisplay |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Nested classes/interfaces inherited from interface com.google.gwt.editor.client.Editor |
|---|
Editor.Ignore, Editor.Path |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Fields inherited from interface org.gwtbootstrap3.client.ui.base.HasPlaceholder |
|---|
PLACEHOLDER |
| Fields inherited from interface org.gwtbootstrap3.client.ui.base.HasAutoComplete |
|---|
AUTO_COMPLETE, OFF, ON |
| Constructor Summary | |
|---|---|
SuggestBox()
Constructor for SuggestBox. |
|
SuggestBox(SuggestOracle oracle)
Constructor for SuggestBox. |
|
SuggestBox(SuggestOracle oracle,
ValueBoxBase<String> box)
Constructor for SuggestBox. |
|
SuggestBox(SuggestOracle oracle,
ValueBoxBase<String> box,
SuggestBox.SuggestionDisplay suggestDisplay)
Constructor for SuggestBox. |
|
| Method Summary | |
|---|---|
void |
addValidator(Validator<String> validator)
Adds the validator. |
boolean |
getAllowBlank()
|
String |
getAutoComplete()
Get the auto complete attribute from the widget |
ErrorHandler |
getErrorHandler()
Gets the error handler. |
ErrorHandlerType |
getErrorHandlerType()
Gets the error handler type. |
String |
getId()
Gets the ID of the widget |
String |
getPlaceholder()
|
InputSize |
getSize()
Get the size of the widget |
boolean |
getValidateOnBlur()
Gets the validate on blur. |
boolean |
isEnabled()
|
void |
reset()
Reset the form element to blank and clear error messages. |
void |
setAllowBlank(boolean allowBlank)
|
void |
setAutoComplete(boolean autoComplete)
Sets the auto complete property on the widget |
void |
setEnabled(boolean enabled)
|
void |
setErrorHandler(ErrorHandler handler)
Sets the error handler. |
void |
setErrorHandlerType(ErrorHandlerType type)
Sets the error handler type. |
void |
setHiddenOn(DeviceSize deviceSize)
Sets the devices that the element is hidden on |
void |
setId(String id)
Sets the ID on the widget |
void |
setPlaceholder(String placeHolder)
|
void |
setSize(InputSize size)
Set the size of the widget |
void |
setValidateOnBlur(boolean validateOnBlur)
Sets the validate on blur. |
void |
setValidators(Validator<String>... validators)
The validators used to validate this object. |
void |
setVisibleOn(DeviceSize deviceSize)
Sets the devices that the element is visible on |
void |
showErrors(List<EditorError> errors)
|
boolean |
validate()
Validate the field's value using the supplied validators. |
boolean |
validate(boolean show)
Validate the field's value using the supplied validators. |
| Methods inherited from class com.google.gwt.user.client.ui.Composite |
|---|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, 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, unsinkEvents |
| 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, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public SuggestBox()
SuggestBox. Creates a MultiWordSuggestOracle and TextBox to use
with this SuggestBox.
public SuggestBox(SuggestOracle oracle)
SuggestBox. Creates a TextBox to use with this SuggestBox.
oracle - the oracle for this SuggestBox
public SuggestBox(SuggestOracle oracle,
ValueBoxBase<String> box)
SuggestBox. The text box will be removed from it's current location and wrapped
by the SuggestBox.
oracle - supplies suggestions based upon the current contents of the text widgetbox - the text widget
public SuggestBox(SuggestOracle oracle,
ValueBoxBase<String> box,
SuggestBox.SuggestionDisplay suggestDisplay)
SuggestBox. The text box will be removed from it's current location and wrapped
by the SuggestBox.
oracle - supplies suggestions based upon the current contents of the text widgetbox - the text widgetsuggestDisplay - the class used to display suggestions| Method Detail |
|---|
public void addValidator(Validator<String> validator)
HasValidators
addValidator in interface HasValidators<String>validator - the validatorpublic boolean getAllowBlank()
getAllowBlank in interface HasBlankValidator<String>public String getAutoComplete()
getAutoComplete in interface HasAutoCompletepublic ErrorHandler getErrorHandler()
getErrorHandler in interface HasErrorHandlerpublic ErrorHandlerType getErrorHandlerType()
getErrorHandlerType in interface HasErrorHandlerpublic String getId()
getId in interface HasIdpublic String getPlaceholder()
getPlaceholder in interface HasPlaceholderpublic InputSize getSize()
getSize in interface HasSize<InputSize>public boolean getValidateOnBlur()
HasValidators
getValidateOnBlur in interface HasValidators<String>public boolean isEnabled()
isEnabled in interface HasEnabledisEnabled in class SuggestBoxpublic void reset()
HasValidators
reset in interface HasValidators<String>public void setAllowBlank(boolean allowBlank)
setAllowBlank in interface HasBlankValidator<String>allowBlank - the new allow blankpublic void setAutoComplete(boolean autoComplete)
setAutoComplete in interface HasAutoCompleteautoComplete - auto complete setting for the widgetpublic void setEnabled(boolean enabled)
setEnabled in interface HasEnabledsetEnabled in class SuggestBoxpublic void setErrorHandler(ErrorHandler handler)
setErrorHandler in interface HasErrorHandlerhandler - the new error handlerpublic void setErrorHandlerType(ErrorHandlerType type)
setErrorHandlerType in interface HasErrorHandlertype - the new error handler typepublic void setHiddenOn(DeviceSize deviceSize)
setHiddenOn in interface HasResponsivenessdeviceSize - device sizesDeviceSizepublic void setId(String id)
setId in interface HasIdid - String desired IDpublic void setPlaceholder(String placeHolder)
setPlaceholder in interface HasPlaceholderpublic void setSize(InputSize size)
setSize in interface HasSize<InputSize>size - T size of the widgetpublic void setValidateOnBlur(boolean validateOnBlur)
HasValidators
setValidateOnBlur in interface HasValidators<String>validateOnBlur - the new validate on blurpublic void setValidators(Validator<String>... validators)
HasValidators
setValidators in interface HasValidators<String>validators - the new validatorspublic void setVisibleOn(DeviceSize deviceSize)
setVisibleOn in interface HasResponsivenessdeviceSize - device sizeDeviceSizepublic void showErrors(List<EditorError> errors)
showErrors in interface HasEditorErrors<String>public boolean validate()
HasValidators
validate in interface HasValidators<String>public boolean validate(boolean show)
HasValidators
validate in interface HasValidators<String>show - the error to the user.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||