public class Button extends BaseButton<Button>
this class provide a set of factory methods to create simple buttons with different styles and a combination of a text and icon. example
Button.create("submit")
.addClickListener(evt-> //handle the event);
Button.create(Icons.ALL.content_save_mdi(), "Save")
.addClickListener(evt-> //handle the event);
Button.createPrimary("Approve")
.addClickListener(evt-> //handle the event);
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 |
|---|
Button()
creates a Button without a text and with
Elevation.LEVEL_1 |
Button(BaseIcon<?> icon)
creates a Button with an icon and
Elevation.LEVEL_1 |
Button(BaseIcon<?> icon,
StyleType type)
creates a Button with an icon and apply a
StyleType |
Button(String text)
create a Button with a text and with
Elevation.LEVEL_1 |
Button(String text,
StyleType type)
creates a Button with a text and apply a
StyleType |
| Modifier and Type | Method and Description |
|---|---|
static Button |
create()
creats a Button using
Button() |
static Button |
create(BaseIcon<?> icon)
creates a Button with an icon by calling
Button(BaseIcon) |
static Button |
create(String text)
create a button using
Button(String) |
static Button |
createDanger(BaseIcon<?> icon)
creates a Button with an icon and apply
StyleType.DANGER |
static Button |
createDanger(String text)
creates a Button with a text and apply
StyleType.DANGER |
static Button |
createDefault(BaseIcon<?> icon)
creates a Button with an icon and apply
StyleType.DEFAULT |
static Button |
createDefault(String text)
creates a Button with a text and apply
StyleType.DEFAULT |
static Button |
createInfo(BaseIcon<?> icon)
creates a Button with an icon and apply
StyleType.INFO |
static Button |
createInfo(String text)
creates a Button with a text and apply
StyleType.INFO |
static Button |
createPrimary(BaseIcon<?> icon)
creates a Button with an icon and apply
StyleType.PRIMARY |
static Button |
createPrimary(String text)
creates a Button with a text and apply
StyleType.PRIMARY |
static Button |
createSuccess(BaseIcon<?> icon)
creates a Button with an icon and apply
StyleType.SUCCESS |
static Button |
createSuccess(String text)
creates a Button with a text and apply
StyleType.SUCCESS |
static Button |
createWarning(BaseIcon<?> icon)
creates a Button with an icon and apply
StyleType.WARNING |
static Button |
createWarning(String text)
creates a Button with a text and apply
StyleType.WARNING |
elemental2.dom.HTMLElement |
element() |
block, bordered, bordered, circle, deLinkify, disable, enable, getBackground, getClickableElement, getSize, getTextSpan, isEnabled, large, linkify, medium, nonBordered, 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 Button()
Elevation.LEVEL_1public Button(String text)
Elevation.LEVEL_1text - String, the button textpublic Button(String text, StyleType type)
StyleTypetext - String, the button texttype - StyleTypepublic Button(BaseIcon<?> icon)
Elevation.LEVEL_1icon - The button iconpublic static Button create(String text)
Button(String)text - String button textpublic static Button createDefault(String text)
StyleType.DEFAULTtext - String, the button textpublic static Button createPrimary(String text)
StyleType.PRIMARYtext - String, the button textpublic static Button createSuccess(String text)
StyleType.SUCCESStext - String, the button textpublic static Button createInfo(String text)
StyleType.INFOtext - String, the button textpublic static Button createWarning(String text)
StyleType.WARNINGtext - String, the button textpublic static Button createDanger(String text)
StyleType.DANGERtext - String, the button textpublic static Button create(BaseIcon<?> icon)
Button(BaseIcon)icon - BaseIcon, the button iconpublic static Button createDefault(BaseIcon<?> icon)
StyleType.DEFAULTicon - BaseIcon, the button iconpublic static Button createPrimary(BaseIcon<?> icon)
StyleType.PRIMARYicon - BaseIcon, the button iconpublic static Button createSuccess(BaseIcon<?> icon)
StyleType.SUCCESSicon - BaseIcon, the button iconpublic static Button createInfo(BaseIcon<?> icon)
StyleType.INFOicon - BaseIcon, the button iconpublic static Button createWarning(BaseIcon<?> icon)
StyleType.WARNINGicon - BaseIcon, the button iconpublic static Button createDanger(BaseIcon<?> icon)
StyleType.DANGERicon - BaseIcon, the button iconpublic elemental2.dom.HTMLElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>element in class BaseDominoElement<elemental2.dom.HTMLElement,Button>Copyright © 2019–2022 Dominokit. All rights reserved.