public interface PopupButton extends ActionsHolder, Component.HasCaption, Component.BelongToFrame, Component.HasIcon, Component.Focusable, HasHtmlCaption, HasHtmlDescription
Button
with a popup. The popup can contain actions or popup panel with custom content.Modifier and Type | Interface and Description |
---|---|
static class |
PopupButton.PopupOpenDirection
Opening direction for the popup.
|
static class |
PopupButton.PopupVisibilityEvent
Event sent when the visibility of the popup changes.
|
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 |
addPopupVisibilityListener(java.util.function.Consumer<PopupButton.PopupVisibilityEvent> listener) |
float |
getMenuWidth() |
SizeUnit |
getMenuWidthSizeUnit()
Gets the menu width property units.
|
int |
getMenuWidthUnits()
Deprecated.
|
Component |
getPopupContent() |
PopupButton.PopupOpenDirection |
getPopupOpenDirection() |
boolean |
isAutoClose() |
boolean |
isClosePopupOnOutsideClick() |
boolean |
isPopupVisible() |
boolean |
isShowActionIcons()
Return show icons for action buttons
|
boolean |
isTogglePopupVisibilityOnClick() |
void |
removePopupVisibilityListener(java.util.function.Consumer<PopupButton.PopupVisibilityEvent> listener)
Deprecated.
Use
Subscription instead |
void |
setAutoClose(boolean autoClose)
Set menu automatic close after option click.
|
void |
setClosePopupOnOutsideClick(boolean closePopupOnOutsideClick)
If set to true, clicking on outside the popup closes it.
|
void |
setMenuWidth(java.lang.String width)
Set menu width.
|
void |
setPopupContent(Component popupContent)
Set custom inner content for the popup.
|
void |
setPopupOpenDirection(PopupButton.PopupOpenDirection direction)
Sets opening direction for the popup.
|
void |
setPopupVisible(boolean popupVisible)
Open or close popup panel.
|
void |
setShowActionIcons(boolean showActionIcons)
Set show icons for action buttons
|
void |
setTogglePopupVisibilityOnClick(boolean togglePopupVisibilityOnClick)
Sets sequential click on popup will toggle popup visibility.
|
addAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActions
getFrame, setFrame
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
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
static final java.lang.String NAME
boolean isPopupVisible()
void setPopupVisible(boolean popupVisible)
popupVisible
- whether open or close popup panel.void setMenuWidth(java.lang.String width)
width
- new menu widthfloat getMenuWidth()
@Deprecated int getMenuWidthUnits()
getMenuWidthSizeUnit()
Component.UNITS_PIXELS
, Component.UNITS_PERCENTAGE
SizeUnit getMenuWidthSizeUnit()
boolean isAutoClose()
void setAutoClose(boolean autoClose)
autoClose
- whether to close menu automatically after action triggering or notvoid setShowActionIcons(boolean showActionIcons)
boolean isShowActionIcons()
boolean isTogglePopupVisibilityOnClick()
void setTogglePopupVisibilityOnClick(boolean togglePopupVisibilityOnClick)
togglePopupVisibilityOnClick
- true if sequential click on popup should toggle popup visibilityPopupButton.PopupOpenDirection getPopupOpenDirection()
void setPopupOpenDirection(PopupButton.PopupOpenDirection direction)
direction
- new directionboolean isClosePopupOnOutsideClick()
void setClosePopupOnOutsideClick(boolean closePopupOnOutsideClick)
closePopupOnOutsideClick
- whether to close popup on outside clickvoid setPopupContent(@Nullable Component popupContent)
popupContent
- popup component.@Nullable Component getPopupContent()
Subscription addPopupVisibilityListener(java.util.function.Consumer<PopupButton.PopupVisibilityEvent> listener)
@Deprecated void removePopupVisibilityListener(java.util.function.Consumer<PopupButton.PopupVisibilityEvent> listener)
Subscription
insteadlistener
- a listener to remove