public class MaterialDropDown extends UnorderedList implements JsLoader, com.google.gwt.event.logical.shared.HasSelectionHandlers<com.google.gwt.user.client.ui.Widget>, HasInOutDurationTransition
<m:MaterialDropDown>
<m:MaterialLink text="First" />
<m:MaterialLink text="Second" />
<m:MaterialLink text="Third" />
</m:MaterialDropDown>
MaterialWidget.Feature
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
$this
Constructor and Description |
---|
MaterialDropDown() |
MaterialDropDown(com.google.gwt.dom.client.Element activatorElement) |
MaterialDropDown(String activator)
Add 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.
|
com.google.gwt.dom.client.Element |
getActivatorElement() |
Alignment |
getAlignment() |
int |
getGutter() |
int |
getInDuration()
Get the in / enter animation duration in milliseconds.
|
List<com.google.gwt.user.client.ui.Widget> |
getItems() |
int |
getOutDuration()
Get the out / exit animation duration in milliseconds.
|
boolean |
isBelowOrigin() |
boolean |
isConstrainWidth() |
boolean |
isHover() |
void |
load() |
protected void |
onLoad() |
protected void |
onUnload() |
protected void |
registerDropdownItemHandlers() |
void |
reload() |
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)
Set the in / enter animation duration in milliseconds.
|
void |
setOutDuration(int durationMillis)
Set the out / exit animation duration in milliseconds.
|
void |
unload() |
$this, add, addAttachHandler, addBlurHandler, addClickHandler, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragLeaveHandler, addDragMoveHandler, addDragOverHandler, addDragStartHandler, addDropActivateHandler, addDropDeactivateHandler, addDropHandler, addFocusHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addOrientationChangeHandler, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, 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, getFocusableMixin, 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, getTabIndex, getTextAlign, getTextAlignMixin, getTextColor, getTooltip, getTooltipDelayMs, getTooltipHTML, getTooltipMixin, getTooltipPosition, getTransform, getTransformMixin, getTransformOrigin, getTransformStyle, getTruncateMixin, getVerticalAlign, getVerticalAlignMixin, getWaves, getWavesMixin, getWidth, insert, insert, isCircle, isDetectOrientation, isEnabled, isFeatureEnabled, isHoverable, isSeparator, isTruncate, registerHandler, removeHandler, setAccessKey, setBackfaceVisibility, setBackgroundColor, setBorder, setBorderBottom, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBottom, setCenterOn, setCircle, setClass, setDataAttribute, setDepth, setDetectOrientation, 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, 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, setTabIndex, setTextAlign, setTextColor, setTooltip, setTooltipDelayMs, setTooltipHTML, setTooltipPosition, setTop, setTransform, setTransformOrigin, setTransformStyle, setTransition, setTruncate, setVerticalAlign, setVisibility, setWaves, stopTouchStartEvent, validate, window
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove, remove
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setVisible
forEach, spliterator
public MaterialDropDown()
@UiConstructor public MaterialDropDown(String activator)
activator
- data-activates attribute name of your dropdown activator.public MaterialDropDown(com.google.gwt.dom.client.Element activatorElement)
public MaterialDropDown(com.google.gwt.user.client.ui.UIObject activator)
protected void onLoad()
onLoad
in class MaterialWidget
protected void registerDropdownItemHandlers()
protected void onUnload()
onUnload
in class MaterialWidget
public void add(com.google.gwt.user.client.ui.Widget child)
add
in interface com.google.gwt.user.client.ui.HasWidgets
add
in class UnorderedList
public void setInDuration(int durationMillis)
HasInOutDurationTransition
setInDuration
in interface HasInOutDurationTransition
public int getInDuration()
HasInOutDurationTransition
getInDuration
in interface HasInOutDurationTransition
public void setOutDuration(int durationMillis)
HasInOutDurationTransition
setOutDuration
in interface HasInOutDurationTransition
public int getOutDuration()
HasInOutDurationTransition
getOutDuration
in interface HasInOutDurationTransition
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 com.google.gwt.dom.client.Element getActivatorElement()
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 © 2018. All rights reserved.