public interface Button extends Component, Component.HasCaption, Component.BelongToFrame, ActionOwner, Component.HasIcon, Component.Focusable, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer
| Modifier and Type | Interface and Description |
|---|---|
static class |
Button.ClickEvent
Event sent when the button is clicked.
|
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider, Component.Wrapper| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS| Modifier and Type | Method and Description |
|---|---|
Subscription |
addClickListener(java.util.function.Consumer<Button.ClickEvent> listener) |
KeyCombination |
getShortcutCombination() |
boolean |
isCaptionAsHtml() |
boolean |
isDisableOnClick() |
boolean |
isUseResponsePending() |
void |
setCaptionAsHtml(boolean captionAsHtml)
Enable or disable HTML mode for caption.
|
void |
setDisableOnClick(boolean disableOnClick)
Determines if a button is automatically disabled when clicked.
|
void |
setShortcut(java.lang.String shortcut)
Sets shortcut from string representation.
|
void |
setShortcutCombination(KeyCombination shortcut)
Sets shortcut combination.
|
void |
setUseResponsePending(boolean useResponsePending)
Determines if button will ignore subsequent clicks on client side when it is waiting for server response.
|
getFrame, setFramegetAction, setActiongetIcon, setIcon, setIconFromSetfocus, getTabIndex, isFocusable, setFocusable, setTabIndexaddStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, requestFocus, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositiongetCaption, setCaptiongetDescription, setDescriptionisDescriptionAsHtml, setDescriptionAsHtmlisHtmlSanitizerEnabled, setHtmlSanitizerEnabledstatic final java.lang.String NAME
void setDisableOnClick(boolean disableOnClick)
disableOnClick - disable on click option.boolean isDisableOnClick()
boolean isUseResponsePending()
void setUseResponsePending(boolean useResponsePending)
useResponsePending - whether to use response pendingvoid setCaptionAsHtml(boolean captionAsHtml)
setCaptionAsHtml in interface HasHtmlCaptioncaptionAsHtml - pass true to enable HTML mode for caption.Component.HasCaption.setCaption(String)boolean isCaptionAsHtml()
isCaptionAsHtml in interface HasHtmlCaptionKeyCombination getShortcutCombination()
void setShortcutCombination(KeyCombination shortcut)
shortcut - key combinationvoid setShortcut(java.lang.String shortcut)
shortcut - string of type "Modifiers-Key", e.g. "Alt-N". Case-insensitive.Subscription addClickListener(java.util.function.Consumer<Button.ClickEvent> listener)