public class DropdownButton extends BaseButton<DropdownButton>
This Button component will open a dropdown menu when clicked by default
DropdownButton.createDefault("TOP")
.appendChild(DropdownAction.create("Action"))
.appendChild(DropdownAction.create("Another action"))
.setPosition(DropDownPosition.TOP)
BaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStylerbuttonElement, contentwavesSupportelement| Constructor and Description |
|---|
DropdownButton(BaseIcon<?> icon)
Creates a Dropdown button with an icon
|
DropdownButton(BaseIcon<?> icon,
StyleType type)
Creates a Dropdown button with an icon and apply a
StyleType |
DropdownButton(String text)
Creates a Dropdown button with a text
|
DropdownButton(String text,
Color background)
Creates a Dropdown button with a text and a custom background color
|
DropdownButton(String text,
StyleType type)
Creates a Dropdown button with a text and apply a
StyleType |
| Modifier and Type | Method and Description |
|---|---|
DropdownButton |
appendChild(DropdownAction<?> action)
Add a DropdownAction to the dropdown button menu
|
DropdownButton |
bordered()
adds a border to the button by applying the
ButtonStyles.BUTTON_BORDERED and removes
the Elevation |
static DropdownButton |
create(BaseIcon<?> icon)
Creates a Dropdown button with an icon
|
static DropdownButton |
create(BaseIcon<?> icon,
StyleType type)
Creates a Dropdown button with an icon and apply a
StyleType |
static DropdownButton |
create(String text)
Creates a Dropdown button with a text
|
static DropdownButton |
create(String text,
Color background)
Creates a Dropdown button with a text and a custom background color
|
static DropdownButton |
create(String text,
StyleType type)
Creates a Dropdown button with a text and apply a
StyleType |
static DropdownButton |
createDanger(BaseIcon<?> icon)
Creates a Dropdown button with an icon and apply a
StyleType.DANGER |
static DropdownButton |
createDanger(String text)
Creates a Dropdown button with a text and apply a
StyleType.DANGER |
static DropdownButton |
createDefault(BaseIcon<?> icon)
Creates a Dropdown button with an icon and apply a
StyleType.DEFAULT |
static DropdownButton |
createDefault(String text)
Creates a Dropdown button with a text and apply a
StyleType.DEFAULT |
static DropdownButton |
createInfo(BaseIcon<?> icon)
Creates a Dropdown button with an icon and apply a
StyleType.INFO |
static DropdownButton |
createInfo(String text)
Creates a Dropdown button with a text and apply a
StyleType.INFO |
static DropdownButton |
createPrimary(BaseIcon<?> icon)
Creates a Dropdown button with an icon and apply a
StyleType.PRIMARY |
static DropdownButton |
createPrimary(String text)
Creates a Dropdown button with a text and apply a
StyleType.PRIMARY |
static DropdownButton |
createSuccess(BaseIcon<?> icon)
Creates a Dropdown button with an icon and apply a
StyleType.SUCCESS |
static DropdownButton |
createSuccess(String text)
Creates a Dropdown button with a text and apply a
StyleType.SUCCESS |
static DropdownButton |
createWarning(BaseIcon<?> icon)
Creates a Dropdown button with an icon and apply a
StyleType.WARNING |
static DropdownButton |
createWarning(String text)
Creates a Dropdown button with a text and apply a
StyleType.WARNING |
DropdownButton |
delinkify()
revert the linkify effect
|
elemental2.dom.HTMLElement |
element() |
Icon |
getCaretIcon() |
DropDownMenu |
getDropDownMenu() |
DropdownButton |
hideCaret()
hides the dropdown caret arrow
|
DropdownButton |
linkify()
changes the dropdown to look like a link
|
DropdownButton |
nonBordered()
removes the button border applied by
BaseButton.bordered() and restore previous Elevation |
DropdownButton |
separator()
Adds a separator item to the dropdown menu
|
DropdownButton |
setPosition(DropDownPosition position)
set the direction and the position of the dropdown button menu when it is open
|
DropdownButton |
showCaret()
show the dropdown caret arrow
|
block, bordered, circle, deLinkify, disable, enable, getBackground, getClickableElement, getSize, getTextSpan, isEnabled, large, medium, setBackground, setBlock, setButtonType, setColor, setContent, setEnabled, setIcon, setSize, setTextContent, small, xSmallapplyWaveStyle, init, initWaves, removeWaves, setWaveColoradd, add, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, alignCenter, alignRight, appendChild, appendChild, apply, attr, blur, childNodes, clearElement, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, elevate, elevate, firstChild, getAttachObserver, getAttribute, getBoundingClientRect, getChildElementCount, getCollapsible, getCollapsibleElement, getDetachObserver, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getTextContent, getTooltip, getWavesElement, hasAttribute, hasChildNodes, hasDirectChild, hide, hideOn, id, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isDisabled, isEmptyElement, isEqualNode, isForceHidden, isHidden, isReadOnly, item, lastChild, length, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setReadOnly, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWavesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisExpandedadd, add, remove, remove, removeProperty, replace, setProperty, setPropertypublic DropdownButton(String text, StyleType type)
StyleTypetext - String, the button texttype - StyleTypepublic DropdownButton(String text, Color background)
text - String, the button textbackground - Colorpublic DropdownButton(String text)
text - String, the button textpublic DropdownButton(BaseIcon<?> icon, StyleType type)
StyleTypepublic static DropdownButton create(String text)
text - String, the button textpublic static DropdownButton create(String text, Color background)
text - String, the button textbackground - Colorpublic static DropdownButton create(String text, StyleType type)
StyleTypetext - String, the button texttype - StyleTypepublic static DropdownButton createDefault(String text)
StyleType.DEFAULTtext - String, the button textpublic static DropdownButton createPrimary(String text)
StyleType.PRIMARYtext - String, the button textpublic static DropdownButton createSuccess(String text)
StyleType.SUCCESStext - String, the button textpublic static DropdownButton createInfo(String text)
StyleType.INFOtext - String, the button textpublic static DropdownButton createWarning(String text)
StyleType.WARNINGtext - String, the button textpublic static DropdownButton createDanger(String text)
StyleType.DANGERtext - String, the button textpublic static DropdownButton create(BaseIcon<?> icon, StyleType type)
StyleTypepublic static DropdownButton create(BaseIcon<?> icon)
icon - BaseIcon, the button iconpublic static DropdownButton createDefault(BaseIcon<?> icon)
StyleType.DEFAULTicon - BaseIcon, the button iconpublic static DropdownButton createPrimary(BaseIcon<?> icon)
StyleType.PRIMARYicon - BaseIcon, the button iconpublic static DropdownButton createSuccess(BaseIcon<?> icon)
StyleType.SUCCESSicon - BaseIcon, the button iconpublic static DropdownButton createInfo(BaseIcon<?> icon)
StyleType.INFOicon - BaseIcon, the button iconpublic static DropdownButton createWarning(BaseIcon<?> icon)
StyleType.WARNINGicon - BaseIcon, the button iconpublic static DropdownButton createDanger(BaseIcon<?> icon)
StyleType.DANGERicon - BaseIcon, the button iconpublic DropdownButton appendChild(DropdownAction<?> action)
action - DropdownActionpublic elemental2.dom.HTMLElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>element in class BaseDominoElement<elemental2.dom.HTMLElement,DropdownButton>public DropdownButton separator()
public DropdownButton hideCaret()
public DropdownButton showCaret()
public DropdownButton linkify()
linkify in class BaseButton<DropdownButton>public DropdownButton delinkify()
public DropdownButton bordered()
ButtonStyles.BUTTON_BORDERED and removes
the Elevationbordered in class BaseButton<DropdownButton>public DropdownButton nonBordered()
BaseButton.bordered() and restore previous ElevationnonBordered in class BaseButton<DropdownButton>public DropdownButton setPosition(DropDownPosition position)
position - DropDownPositionpublic DropDownMenu getDropDownMenu()
DropDownMenuCopyright © 2019–2022 Dominokit. All rights reserved.