Package io.jmix.ui.component
Interface PopupButton
- All Superinterfaces:
ActionsHolder
,Component
,Component.BelongToFrame
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasSubParts
- All Known Implementing Classes:
PopupButtonImpl
,RelatedEntitiesImpl
@StudioComponent(caption="PopupButton",
category="Components",
xmlElement="popupButton",
icon="io/jmix/ui/icon/component/popupButton.svg",
canvasTextProperty="caption",
canvasBehaviour=POPUP_BUTTON,
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/popup-button.html")
public interface PopupButton
extends ActionsHolder, Component.HasCaption, Component.BelongToFrame, Component.HasIcon, Component.Focusable, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer
A
Button
with a popup. The popup can contain actions or popup panel with custom content.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Opening direction for the popup.static class
Event sent when the visibility of the popup changes.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionfloat
Gets the menu width property units.boolean
boolean
boolean
boolean
Returns show icons for action buttonsboolean
void
setAutoClose
(boolean autoClose) Sets menu automatic close after option click.void
setClosePopupOnOutsideClick
(boolean closePopupOnOutsideClick) If set to true, clicking on outside the popup closes it.void
setMenuWidth
(String width) Sets menu width.void
setPopupContent
(Component popupContent) Sets custom inner content for the popup.void
Sets opening direction for the popup.void
setPopupVisible
(boolean popupVisible) Open or close popup panel.void
setShowActionIcons
(boolean showActionIcons) Sets show icons for action buttonsvoid
setTogglePopupVisibilityOnClick
(boolean togglePopupVisibilityOnClick) Sets sequential click on popup will toggle popup visibility.Methods inherited from interface io.jmix.ui.component.ActionsHolder
addAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActions
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
isPopupVisible
boolean isPopupVisible()- Returns:
- true if popup is opened
-
setPopupVisible
void setPopupVisible(boolean popupVisible) Open or close popup panel.- Parameters:
popupVisible
- whether open or close popup panel.
-
setMenuWidth
Sets menu width.- Parameters:
width
- new menu width
-
getMenuWidth
float getMenuWidth()- Returns:
- menu width
-
getMenuWidthSizeUnit
SizeUnit getMenuWidthSizeUnit()Gets the menu width property units.- Returns:
- units used in the menu width property.
-
isAutoClose
boolean isAutoClose()- Returns:
- whether to close menu automatically after action triggering or not
-
setAutoClose
Sets menu automatic close after option click.- Parameters:
autoClose
- whether to close menu automatically after action triggering or not
-
setShowActionIcons
Sets show icons for action buttons -
isShowActionIcons
boolean isShowActionIcons()Returns show icons for action buttons -
isTogglePopupVisibilityOnClick
boolean isTogglePopupVisibilityOnClick()- Returns:
- if sequential click on popup will toggle popup visibility
-
setTogglePopupVisibilityOnClick
@StudioProperty(defaultValue="true") void setTogglePopupVisibilityOnClick(boolean togglePopupVisibilityOnClick) Sets sequential click on popup will toggle popup visibility.- Parameters:
togglePopupVisibilityOnClick
- true if sequential click on popup should toggle popup visibility
-
getPopupOpenDirection
PopupButton.PopupOpenDirection getPopupOpenDirection()- Returns:
- opening direction for the popup
-
setPopupOpenDirection
@StudioProperty(type=ENUMERATION, options={"BOTTOM_LEFT","BOTTOM_RIGHT","BOTTOM_CENTER"}) void setPopupOpenDirection(PopupButton.PopupOpenDirection direction) Sets opening direction for the popup.- Parameters:
direction
- new direction
-
isClosePopupOnOutsideClick
boolean isClosePopupOnOutsideClick()- Returns:
- true if a click outside the popup closing the popup, otherwise - false
-
setClosePopupOnOutsideClick
@StudioProperty(defaultValue="true") void setClosePopupOnOutsideClick(boolean closePopupOnOutsideClick) If set to true, clicking on outside the popup closes it. Note that this doesn't affect clicking on the button itself.- Parameters:
closePopupOnOutsideClick
- whether to close popup on outside click
-
setPopupContent
Sets custom inner content for the popup. Actions are ignored if a custom popup content is set.- Parameters:
popupContent
- popup component.
-
getPopupContent
- Returns:
- popup content component
-
addPopupVisibilityListener
-