Interface ButtonElement
- All Superinterfaces:
 DomQueryable,Element,EventTarget,Node
Button elements play a sound when clicked
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordButton action.static enumButton action typestatic enumButton action trigger - 
Method Summary
Modifier and TypeMethodDescription@Nullable ButtonElement.ButtonActionGet the button action, shorthand for accessing theAttributes.BUTTON_ACTIONattribute's value.@NotNull ButtonElement.ButtonTriggerGet the button trigger, used forgetAction().booleanTest if the button is enabledvoidsetAction(@Nullable ButtonElement.ButtonAction action) Set the button action, shorthand for setting theAttributes.BUTTON_ACTIONattribute's value.voidsetEnabled(boolean enabled) Set if the button is enabledvoidsetTrigger(@Nullable ButtonElement.ButtonTrigger trigger) Set the button trigger, used forgetAction().Methods inherited from interface com.juliewoolie.dom.DomQueryable
getElementsByClassName, getElementsByTagName, querySelector, querySelectorAllMethods inherited from interface com.juliewoolie.dom.Element
appendChild, appendElement, appendText, canHaveChildren, clearChildren, firstChild, forEachDescendant, getAttribute, getAttributeEntries, getAttributeNames, getChild, getChildCount, getChildren, getClassList, getClassName, getCurrentStyle, getId, getStyle, getTagName, getTextContent, getTitleNode, getTooltip, getTooltipBehaviour, getTooltipDelay, hasAttribute, hasChild, hasChildren, indexOf, insertAfter, insertBefore, isDescendant, lastChild, matches, prependChild, removeAttribute, removeChild, removeChild, removeMatchingChildren, replaceChild, replaceChild, setAttribute, setClassName, setId, setTextContent, setTitleNode, setTooltipBehaviour, setTooltipDelayMethods inherited from interface com.juliewoolie.dom.event.EventTarget
addEventListener, dispatchEvent, getOnAddAttribute, getOnAddOption, getOnAppendChild, getOnAttributeChange, getOnClick, getOnClosing, getOnInput, getOnLoaded, getOnMouseEnter, getOnMouseExit, getOnMouseMove, getOnOptionChange, getOnRemoveAttribute, getOnRemoveChild, getOnRemoveOption, getOnRightClick, getOnSetAttribute, getOnSetOption, getOnSpawned, onAddAttribute, onAddOption, onAppendChild, onAttributeChange, onClick, onClosing, onInput, onLoaded, onMouseEnter, onMouseExit, onMouseMove, onOptionChange, onRemoveAttribute, onRemoveChild, onRemoveOption, onRightClick, onSetAttribute, onSetOption, onSpawned, removeEventListenerMethods inherited from interface com.juliewoolie.dom.Node
enterVisitor, exitVisitor, getDepth, getOwningDocument, getParent, getRenderingBounds, getSiblingIndex, hasFlag, nextSibling, previousSibling 
- 
Method Details
- 
isEnabled
boolean isEnabled()Test if the button is enabledShortcut for accessing the
Attributes.ENABLEDattribute.- Returns:
 true, if the button is enabled,falseotherwise.
 - 
setEnabled
void setEnabled(boolean enabled) Set if the button is enabledShortcut for setting the
Attributes.ENABLEDattribute.- Parameters:
 enabled-true, if the button is enabled,falseotherwise.
 - 
getTrigger
Get the button trigger, used forgetAction().If the
Attributes.ACTION_TRIGGERattribute is not set, this will default toButtonElement.ButtonTrigger.DEFAULT.- Returns:
 - Button trigger
 
 - 
setTrigger
Set the button trigger, used forgetAction().Shorthand for setting the
Attributes.ACTION_TRIGGERattribute value.- Parameters:
 trigger- Trigger value
 - 
getAction
Get the button action, shorthand for accessing theAttributes.BUTTON_ACTIONattribute's value.The returned action is executed when the button is clicked with the same mouse button as
getTrigger().- Returns:
 - Button action, or 
null, if the underlying attribute is not set. 
 - 
setAction
Set the button action, shorthand for setting theAttributes.BUTTON_ACTIONattribute's value.The set action is executed when the button is clicked with the same mouse button as
getTrigger().- Parameters:
 action- Button action
 
 -