public class MaterialSearch extends MaterialValueBox<String> implements com.google.gwt.event.logical.shared.HasOpenHandlers<String>, com.google.gwt.event.logical.shared.HasCloseHandlers<String>, HasActive, HasSearchHandlers
<m:MaterialSearch placeholder="Sample"/>
<p>
List<SearchObject> objects = new ArrayList<>();
<p>
private void onInitSearch() {
objects.add(new SearchObject(IconType.POLYMER, "Pushpin", "#!pushpin"));
objects.add(new SearchObject(IconType.POLYMER, "SideNavs", "#!sidenavs"));
objects.add(new SearchObject(IconType.POLYMER, "Scrollspy", "#!scrollspy"));
objects.add(new SearchObject(IconType.POLYMER, "Tabs", "#!tabs"));
txtSearch.setListSearches(objects);
}
<p>
MaterialValueBox.MaterialValueBoxEditor<V>MaterialWidget.Featurecom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledcom.google.gwt.i18n.client.HasDirection.Directioncom.google.gwt.editor.client.Editor.Ignore, com.google.gwt.editor.client.Editor.PathvalueBoxBase$thisTYPE| Constructor and Description |
|---|
MaterialSearch() |
MaterialSearch(String placeholder) |
MaterialSearch(String placeholder,
Color backgroundColor,
Color iconColor,
boolean active,
int shadow) |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<String> handler) |
com.google.gwt.event.shared.HandlerRegistration |
addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<String> handler) |
com.google.gwt.event.shared.HandlerRegistration |
addSearchFinishHandler(SearchFinishEvent.SearchFinishHandler handler)
This handler will be triggered when search is finish
|
com.google.gwt.event.shared.HandlerRegistration |
addSearchNoResultHandler(SearchNoResultEvent.SearchNoResultHandler handler)
This handler will be triggered when there's no search result
|
protected void |
applyHighlightedItem(MaterialLink link) |
void |
close() |
int |
getCurSel() |
MaterialIcon |
getIconClose() |
MaterialIcon |
getIconSearch() |
Label |
getLabel() |
List<SearchObject> |
getListSearches() |
MaterialSearchResult |
getSearchResultPanel() |
MaterialLink |
getSelectedLink() |
SearchObject |
getSelectedObject() |
List<SearchObject> |
getTempSearches()
Gets the temporary search objects.
|
boolean |
isActive()
Get the active element.
|
protected void |
locateSearch(String location) |
protected void |
onLoad() |
protected void |
onUnload() |
void |
open()
Programmatically open the search input field component
|
void |
setActive(boolean active)
Set active element.
|
void |
setCurSel(int curSel) |
void |
setListSearches(List<SearchObject> listSearches) |
void |
setSelectedLink(MaterialLink selectedLink) |
void |
setSelectedObject(SearchObject selectedObject) |
addBlurHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragLeaveHandler, addDragMoveHandler, addDragOverHandler, addDragStartHandler, addDropActivateHandler, addDropDeactivateHandler, addDropHandler, addFocusHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, addValueBox, addValueChangeHandler, asEditor, asValueBoxBase, clear, clearErrorOrSuccess, getActiveMixin, getCounterMixin, getDirection, getDirectionEstimator, getErrorLabel, getErrorMixin, getFocusableMixin, getIcon, getIconColor, getLength, getName, getPlaceholder, getReadOnlyMixin, getSelectedText, getSelectionLength, getTabIndex, getText, getType, getValue, getValueBoxBase, isEnabled, isIconPrefix, isReadOnly, isToggleReadOnly, removeErrorModifiers, setAccessKey, setAlignment, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setEnabled, setError, setFocus, setIconColor, setIconFontSize, setIconPosition, setIconPrefix, setIconSize, setIconType, setLabel, setLength, setName, setPlaceholder, setReadOnly, setSelectionRange, setSuccess, setTabIndex, setText, setToggleReadOnly, setType, setup, setValue, updateLabelActiveStyleaddValidationChangedHandler, addValidator, createBlankValidator, getErrorHandler, getErrorHandlerMixin, getErrorHandlerType, getValidatorMixin, isAllowBlank, isValidateOnBlur, removeValidator, reset, setAllowBlank, setErrorHandler, setErrorHandlerType, setHelperText, setupBlurValidation, setValidateOnBlur, setValidators, setValue, setValue, showErrors, validate, validate$this, add, add, addAttachHandler, addOrientationChangeHandler, body, clearActiveClass, enableFeature, getBackfaceVisibility, getBackgroundColor, getBorder, getBorderBottom, getBorderLeft, getBorderMixin, getBorderRadius, getBorderRight, getBorderTop, getCenterOn, getCenterOnMixin, getChildren, getChildrenList, getCircleMixin, getColorsMixin, getDataAttribute, getDepth, getDimensionMixin, getEnabledMixin, getFlexboxMixin, getFloat, getFloatMixin, getFontSize, getFontSizeMixin, getFontWeight, getFontWeightMixin, getGridMixin, getHandlerRegistry, getHideOn, getHideOnMixin, getHoverableMixin, getId, getIdMixin, getInitialClasses, getLayoutPosition, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpacity, getOrientation, getOrientationMixin, getPerspective, getPerspectiveOrigin, getScrollspy, getScrollspyMixin, getSeparatorMixin, getShadow, getShadowMixin, getShowOn, getShowOnMixin, getTextAlign, getTextAlignMixin, getTextColor, getTooltip, getTooltipDelayMs, getTooltipHTML, getTooltipMixin, getTooltipPosition, getTransform, getTransformMixin, getTransformOrigin, getTransformStyle, getTruncateMixin, getVerticalAlign, getVerticalAlignMixin, getWaves, getWavesMixin, getWidth, insert, insert, isCircle, isDetectOrientation, isFeatureEnabled, isHoverable, isSeparator, isTruncate, registerHandler, removeHandler, setBackfaceVisibility, setBackgroundColor, setBorder, setBorderBottom, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBottom, setCenterOn, setCircle, setClass, setDataAttribute, setDepth, setDetectOrientation, setDisplay, setFlex, setFlexAlignContent, setFlexAlignItems, setFlexAlignSelf, setFlexBasis, setFlexDirection, setFlexGrow, setFlexJustifyContent, setFlexOrder, setFlexShrink, setFlexWrap, setFloat, setFontSize, setFontSize, setFontWeight, setGrid, setGwtDisplay, setHideOn, setHoverable, setId, setInitialClasses, setLayoutPosition, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOffset, setOpacity, setOrientation, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPerspective, setPerspectiveOrigin, setRight, setScrollspy, setSeparator, setShadow, setShowOn, setStyle, setTextAlign, setTextColor, setTooltip, setTooltipDelayMs, setTooltipHTML, setTooltipPosition, setTop, setTransform, setTransformOrigin, setTransformStyle, setTransition, setTruncate, setVerticalAlign, setVisibility, setWaves, stopTouchStartEvent, windowadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove, removeadd, adopt, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetVisibleforEach, spliteratorpublic MaterialSearch()
public MaterialSearch(String placeholder)
public MaterialSearch(String placeholder, Color backgroundColor, Color iconColor, boolean active, int shadow)
protected void onLoad()
onLoad in class MaterialValueBox<String>protected void onUnload()
onUnload in class MaterialWidgetpublic void open()
public void close()
protected void applyHighlightedItem(MaterialLink link)
protected void locateSearch(String location)
public void setActive(boolean active)
HasActivesetActive in interface HasActivesetActive in class MaterialValueBox<String>public boolean isActive()
HasActiveisActive in interface HasActiveisActive in class MaterialValueBox<String>public MaterialLink getSelectedLink()
public void setSelectedLink(MaterialLink selectedLink)
public List<SearchObject> getListSearches()
public void setListSearches(List<SearchObject> listSearches)
public int getCurSel()
public void setCurSel(int curSel)
public SearchObject getSelectedObject()
public void setSelectedObject(SearchObject selectedObject)
public List<SearchObject> getTempSearches()
public MaterialIcon getIconClose()
public MaterialSearchResult getSearchResultPanel()
public Label getLabel()
getLabel in class MaterialValueBox<String>public MaterialIcon getIconSearch()
public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<String> handler)
addCloseHandler in interface com.google.gwt.event.logical.shared.HasCloseHandlers<String>public com.google.gwt.event.shared.HandlerRegistration addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<String> handler)
addOpenHandler in interface com.google.gwt.event.logical.shared.HasOpenHandlers<String>public com.google.gwt.event.shared.HandlerRegistration addSearchFinishHandler(SearchFinishEvent.SearchFinishHandler handler)
addSearchFinishHandler in interface HasSearchHandlerspublic com.google.gwt.event.shared.HandlerRegistration addSearchNoResultHandler(SearchNoResultEvent.SearchNoResultHandler handler)
addSearchNoResultHandler in interface HasSearchHandlersCopyright © 2018. All rights reserved.