public abstract class DropdownBase extends ComplexWidget implements com.google.gwt.event.dom.client.HasChangeHandlers, com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasText, HasIcon
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Modifier and Type | Field and Description |
|---|---|
protected IconAnchor |
trigger |
| Constructor and Description |
|---|
DropdownBase(String type)
Creates a new widget of the given type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(com.google.gwt.user.client.ui.Widget widget)
Adds a widget to the dropdown menu.
|
com.google.gwt.event.shared.HandlerRegistration |
addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler) |
void |
addCustomTrigger(com.google.gwt.user.client.ui.Widget w)
Add widget to trigger anchodr
|
protected void |
addWidget(com.google.gwt.user.client.ui.Widget widget)
Adds a widget to the the dropdown widget, not to the dropdown
menu.
|
void |
clear() |
protected abstract IconAnchor |
createTrigger()
Implement this method to create the trigger appropriate for your widget.
|
NavLink |
getLastSelectedNavLink()
Method to get the
NavLink that has been clicked most recently. |
UnorderedList |
getMenuWiget()
Get menu unordered list widget
|
String |
getText() |
IconAnchor |
getTriggerWidget()
Get trigger wiget
|
boolean |
isDropup()
Is widget dropup?
|
protected void |
onLoad() |
void |
setDropup(boolean dropup)
Set dropup style.
|
void |
setRightDropdown(boolean rightDropdown)
Pull the dropdown menu to right
|
void |
setText(String text)
Sets the text of the dropdown trigger.
|
addStyle, insert, removeStyle, setHideOn, setShowOn, setStyleadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeadd, adopt, adopt, disown, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, removeFromParent, setLayoutData, setParent, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEventsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetBaseIcon, setCustomIconStyle, setIcon, setIconPosition, setIconSizeprotected IconAnchor trigger
public DropdownBase(String type)
type - the HTML tag to be used for the widgetpublic void setText(String text)
setText in interface com.google.gwt.user.client.ui.HasTexttext - public String getText()
getText in interface com.google.gwt.user.client.ui.HasTextpublic IconAnchor getTriggerWidget()
public UnorderedList getMenuWiget()
protected abstract IconAnchor createTrigger()
IconAnchor or a subtype.public void setDropup(boolean dropup)
dropup - true:Set Dropup false:Un-set Dropuppublic boolean isDropup()
protected void onLoad()
onLoad in class com.google.gwt.user.client.ui.Widgetpublic void add(com.google.gwt.user.client.ui.Widget widget)
add in interface com.google.gwt.user.client.ui.HasWidgetsadd in class ComplexWidgetwidget - the widget that will be added to the menuaddWidget(Widget)public com.google.gwt.event.shared.HandlerRegistration addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler handler)
addChangeHandler in interface com.google.gwt.event.dom.client.HasChangeHandlersprotected void addWidget(com.google.gwt.user.client.ui.Widget widget)
add(Widget) if you want to add a widget to the dropdown
menu.widget - the widget to be added.public void setRightDropdown(boolean rightDropdown)
rightDropdown - true pull to right, otherwise to left. Default is
falsepublic NavLink getLastSelectedNavLink()
NavLink that has been clicked most recently.null if none have been
clicked.public void clear()
clear in interface com.google.gwt.user.client.ui.HasWidgetsclear in class com.google.gwt.user.client.ui.Panelpublic com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
addClickHandler in interface com.google.gwt.event.dom.client.HasClickHandlers@UiChild(tagname="customTrigger",
limit=1)
public void addCustomTrigger(com.google.gwt.user.client.ui.Widget w)
w - added widgetCopyright © 2016. All rights reserved.