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
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumOpening direction for the popup.static classEvent 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
FieldsFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionfloatGets the menu width property units.booleanbooleanbooleanbooleanReturns show icons for action buttonsbooleanvoidsetAutoClose(boolean autoClose) Sets menu automatic close after option click.voidsetClosePopupOnOutsideClick(boolean closePopupOnOutsideClick) If set to true, clicking on outside the popup closes it.voidsetMenuWidth(String width) Sets menu width.voidsetPopupContent(Component popupContent) Sets custom inner content for the popup.voidSets opening direction for the popup.voidsetPopupVisible(boolean popupVisible) Open or close popup panel.voidsetShowActionIcons(boolean showActionIcons) Sets show icons for action buttonsvoidsetTogglePopupVisibilityOnClick(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, removeAllActionsMethods 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, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndexMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods 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
-