public class MaterialDropDown extends UnorderedList implements com.google.gwt.event.logical.shared.HasSelectionHandlers<com.google.gwt.user.client.ui.Widget>
<m:MaterialDropDown>
<m:MaterialLink text="First" />
<m:MaterialLink text="Second" />
<m:MaterialLink text="Third" />
</m:MaterialDropDown>
MaterialWidget.Featurecom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Constructor and Description |
|---|
MaterialDropDown() |
MaterialDropDown(com.google.gwt.dom.client.Element activatorElem) |
MaterialDropDown(String activator)
Material Dropdown - adds a list item selection when button, link, icon button pressed.
|
MaterialDropDown(com.google.gwt.user.client.ui.UIObject activator) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(com.google.gwt.user.client.ui.Widget child) |
com.google.gwt.event.shared.HandlerRegistration |
addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<com.google.gwt.user.client.ui.Widget> handler) |
String |
getActivator()
Get the unique activator set by material widget e.g links, icons, buttons to trigger the dropdown.
|
Alignment |
getAlignment() |
int |
getGutter() |
int |
getInDuration() |
List<com.google.gwt.user.client.ui.Widget> |
getItems() |
int |
getOutDuration() |
protected void |
initialize() |
protected void |
initialize(com.google.gwt.dom.client.Element activator)
Initialize the dropdown components.
|
boolean |
isBelowOrigin() |
boolean |
isConstrainWidth() |
boolean |
isHover() |
protected void |
onLoad() |
void |
reinitialize()
Must be called after changing any options.
|
protected void |
remove(com.google.gwt.dom.client.Element activator) |
void |
setActivator(String activator)
Set the unique activator of each dropdown component and it must be unique
|
void |
setAlignment(Alignment alignment)
Defines the edge the menu is aligned to.
|
void |
setBelowOrigin(boolean belowOrigin)
If true, the dropdown will show below the activator.
|
void |
setConstrainWidth(boolean constrainWidth)
If true, constrainWidth to the size of the dropdown activator.
|
void |
setGutter(int gutter)
This defines the spacing from the aligned edge.
|
void |
setHover(boolean hover)
If true, the dropdown will open on hover.
|
void |
setInDuration(int durationMillis)
The duration of the transition enter in milliseconds.
|
void |
setOutDuration(int durationMillis)
The duration of the transition out in milliseconds.
|
add, clearActiveClass, enableFeature, getBackgroundColor, getCenterOn, getCenterOnMixin, getCircleMixin, getColorsMixin, getDataAttribute, getDepth, getEnabledMixin, getFlexboxMixin, getFloat, getFloatMixin, getFocusableMixin, getFontSize, getFontSizeMixin, getFontWeight, getFontWeightMixin, getGridMixin, getHideOn, getHideOnMixin, getHoverableMixin, getId, getIdMixin, getInitialClasses, getOpacity, getScrollspy, getScrollspyMixin, getSeparatorMixin, getShadow, getShadowMixin, getShowOn, getShowOnMixin, getTabIndex, getTextAlign, getTextAlignMixin, getTextColor, getTooltip, getTooltipDelayMs, getTooltipMixin, getTooltipPosition, getTruncateMixin, getWaves, getWavesMixin, getWidth, getWidth, insert, insert, isCircle, isEnabled, isFeatureEnabled, isHoverable, isSeparator, setAccessKey, setBackgroundColor, setBottom, setCenterOn, setCircle, setDataAttribute, setDepth, setDisplay, setEnabled, setFlex, setFlexAlignContent, setFlexAlignItems, setFlexAlignSelf, setFlexBasis, setFlexDirection, setFlexGrow, setFlexJustifyContent, setFlexOrder, setFlexShrink, setFlexWrap, setFloat, setFocus, setFontSize, setFontSize, setFontWeight, setGrid, setGwtDisplay, setHideOn, setHoverable, setId, setInitialClasses, setLayoutPosition, setLeft, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setOffset, setOpacity, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setRight, setScrollspy, setSeparator, setShadow, setShowOn, setTabIndex, setTextAlign, setTextColor, setTooltip, setTooltipDelayMs, setTooltipPosition, setTop, setTruncate, setVisibility, setWaves, stopTouchStartEvent, stopTouchStartEventadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove, removeadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, 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 MaterialDropDown()
@UiConstructor public MaterialDropDown(String activator)
activator - - data-activates attribute name of your dropdown activator.public MaterialDropDown(com.google.gwt.dom.client.Element activatorElem)
public MaterialDropDown(com.google.gwt.user.client.ui.UIObject activator)
protected void onLoad()
onLoad in class MaterialWidgetpublic void setInDuration(int durationMillis)
public int getInDuration()
public void setOutDuration(int durationMillis)
public int getOutDuration()
public void setConstrainWidth(boolean constrainWidth)
public boolean isConstrainWidth()
public void setHover(boolean hover)
public boolean isHover()
public void setGutter(int gutter)
public int getGutter()
public void setBelowOrigin(boolean belowOrigin)
public boolean isBelowOrigin()
public void setAlignment(Alignment alignment)
public Alignment getAlignment()
public String getActivator()
public void setActivator(String activator)
public void add(com.google.gwt.user.client.ui.Widget child)
add in interface com.google.gwt.user.client.ui.HasWidgetsadd in class UnorderedListprotected void initialize()
public void reinitialize()
protected void initialize(com.google.gwt.dom.client.Element activator)
protected void remove(com.google.gwt.dom.client.Element activator)
public com.google.gwt.event.shared.HandlerRegistration addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<com.google.gwt.user.client.ui.Widget> handler)
addSelectionHandler in interface com.google.gwt.event.logical.shared.HasSelectionHandlers<com.google.gwt.user.client.ui.Widget>Copyright © 2016. All rights reserved.