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, setFrame
getAction, setAction
getIcon, setIcon, setIconFromSet
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
addStyleName, 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, withUnwrappedComposition
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
static 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 HasHtmlCaption
captionAsHtml
- pass true to enable HTML mode for caption.Component.HasCaption.setCaption(String)
boolean isCaptionAsHtml()
isCaptionAsHtml
in interface HasHtmlCaption
KeyCombination 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)