|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.user.client.ui.UIObject com.google.gwt.user.client.ui.Widget com.google.gwt.user.client.ui.Composite com.atlassian.gwt.InputField com.atlassian.gwt.QuickSearchInputField
public class QuickSearchInputField
The is a widget that extends InputField to include a quick search drop down. This relies on the existing quick search js that lives inside of Confluence. After creating the widget, it's necessary to call bindDropDown to add the default query parameters and a drop down handler that handles js events called from the user interacting with the quick search results.
Nested Class Summary |
---|
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 | |
---|---|
protected com.google.gwt.user.client.ui.FlowPanel |
dropDownPanel
Hidden div that the quick search results drop down attaches to. |
Fields inherited from class com.atlassian.gwt.InputField |
---|
label, panel, textBox |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
QuickSearchInputField(String fieldName,
int size)
|
Method Summary | |
---|---|
void |
bindDropDown(DropDownHandler handler)
Sets the default query parameters for the quick search and adds a listener for js events called by the quick search. |
void |
cancelDropDown()
Prevents the down down from showing, if any. |
void |
clearSearchCache()
Clears the search cache used by the quick search dropdown. |
boolean |
dropDownHasFocus()
|
String |
getSearchForText()
|
void |
hideDropDown()
Hides the current drop down, if any. |
boolean |
isDropDownOpen()
|
void |
setLabelClassName(String className)
|
void |
setSearchForText(String searchForText)
|
Methods inherited from class com.atlassian.gwt.InputField |
---|
addBlurHandler, addFocusHandler, addKeyDownHandler, addKeyUpHandler, focus, getText, getTextBox, selectAll, setLabel, setText |
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addDomHandler, addHandler, 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, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
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 |
Field Detail |
---|
protected final com.google.gwt.user.client.ui.FlowPanel dropDownPanel
Constructor Detail |
---|
@UiConstructor public QuickSearchInputField(String fieldName, int size)
fieldName
- The name attribute for the text input field.size
- The visible size of the text input field.Method Detail |
---|
public String getSearchForText()
public void bindDropDown(DropDownHandler handler)
QuickSearchSupport
bindDropDown
in interface QuickSearchSupport
handler
- This is the event handler that does something when a user makes a selection from the
quick search results.public void hideDropDown()
QuickSearchSupport
hideDropDown
in interface QuickSearchSupport
public boolean isDropDownOpen()
isDropDownOpen
in interface QuickSearchSupport
public void clearSearchCache()
QuickSearchSupport
clearSearchCache
in interface QuickSearchSupport
public void cancelDropDown()
QuickSearchSupport
cancelDropDown
in interface QuickSearchSupport
public boolean dropDownHasFocus()
dropDownHasFocus
in interface QuickSearchSupport
public void setLabelClassName(String className)
public void setSearchForText(String searchForText)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |