Class DropdownButton
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<JmixMenuBar>
io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton
io.jmix.flowui.kit.component.dropdownbutton.DropdownButton
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<AbstractDropdownButton>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<AbstractDropdownButton>
,com.vaadin.flow.component.FocusNotifier<AbstractDropdownButton>
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasSize
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.HasText
,com.vaadin.flow.component.HasTheme
,com.vaadin.flow.component.shared.HasOverlayClassName
,com.vaadin.flow.component.shared.HasThemeVariant<DropdownButtonVariant>
,DropdownButtonComponent
,HasSubParts
,HasTitle
,Serializable
public class DropdownButton
extends AbstractDropdownButton
implements com.vaadin.flow.component.shared.HasThemeVariant<DropdownButtonVariant>
Represents a dropdown button component. This class is used as a customizable
button with an associated dropdown menu.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton
AbstractDropdownButton.AbstractDropdownButtonItem, AbstractDropdownButton.ActionItemImpl, AbstractDropdownButton.ComponentItemImpl, AbstractDropdownButton.HasMenuItem, AbstractDropdownButton.MenuItemProvider<T>, AbstractDropdownButton.TextItemImpl
Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
com.vaadin.flow.component.HasText.WhiteSpace
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected com.vaadin.flow.component.icon.Icon
protected boolean
Fields inherited from class io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton
ATTRIBUTE_JMIX_ROLE_NAME, dropdownItem, iconComponent, items
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JmixMenuItem
getText()
com.vaadin.flow.component.HasText.WhiteSpace
protected JmixMenuBar
boolean
Returns whether if the dropdown indicator is currently visible.void
setDropdownIndicatorVisible
(boolean dropdownIndicatorVisible) Sets the visibility of the dropdown indicator.void
setIcon
(com.vaadin.flow.component.icon.Icon icon) Sets the icon for the component.void
void
setWhiteSpace
(com.vaadin.flow.component.HasText.WhiteSpace value) protected void
protected void
Methods inherited from class io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton
addAttachListener, addClassName, addClassNames, addDetachListener, addFocusShortcut, addItem, addItem, addItem, addItem, addItem, addItem, addItem, addItem, addItem, addItem, addItemInternal, addSeparator, addSeparatorAtIndex, addThemeName, addThemeNames, blur, createComponentMenuItem, createTextMenuItem, focus, getClassName, getClassNames, getHeight, getHeightUnit, getIcon, getItem, getItems, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverlayClassName, getTabIndex, getThemeName, getThemeNames, getWidth, getWidthUnit, hasClassName, hasThemeName, isAttached, isEnabled, isOpenOnHover, remove, remove, remove, removeAll, removeClassName, removeClassNames, removeThemeName, removeThemeNames, setClassName, setClassName, setEnabled, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpenOnHover, setOverlayClassName, setSizeFull, setSizeUndefined, setTabIndex, setThemeName, setThemeName, setWidth, setWidth, setWidthFull
Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListener
Methods inherited from interface io.jmix.flowui.kit.component.dropdownbutton.DropdownButtonComponent
getSubPart
Methods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListener
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasStyle
getStyle
Methods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariants
-
Field Details
-
ATTRIBUTE_JMIX_ROLE_VALUE
- See Also:
-
dropdownIcon
protected com.vaadin.flow.component.icon.Icon dropdownIcon -
dropdownIndicatorVisible
protected boolean dropdownIndicatorVisible
-
-
Constructor Details
-
DropdownButton
public DropdownButton()
-
-
Method Details
-
initContent
- Overrides:
initContent
in classcom.vaadin.flow.component.Composite<JmixMenuBar>
-
getDropdownItem
- Specified by:
getDropdownItem
in classAbstractDropdownButton
-
updateDropdownIconSlot
protected void updateDropdownIconSlot() -
setText
- Specified by:
setText
in interfacecom.vaadin.flow.component.HasText
-
getText
- Specified by:
getText
in interfacecom.vaadin.flow.component.HasText
-
setWhiteSpace
public void setWhiteSpace(com.vaadin.flow.component.HasText.WhiteSpace value) - Specified by:
setWhiteSpace
in interfacecom.vaadin.flow.component.HasText
-
getWhiteSpace
public com.vaadin.flow.component.HasText.WhiteSpace getWhiteSpace()- Specified by:
getWhiteSpace
in interfacecom.vaadin.flow.component.HasText
-
setIcon
public void setIcon(@Nullable com.vaadin.flow.component.icon.Icon icon) Description copied from interface:DropdownButtonComponent
Sets the icon for the component.- Specified by:
setIcon
in interfaceDropdownButtonComponent
- Parameters:
icon
- the icon to set. Can benull
to clear the current icon.
-
isDropdownIndicatorVisible
public boolean isDropdownIndicatorVisible()Returns whether if the dropdown indicator is currently visible.- Returns:
true
if the dropdown indicator is visible,false
otherwise
-
setDropdownIndicatorVisible
public void setDropdownIndicatorVisible(boolean dropdownIndicatorVisible) Sets the visibility of the dropdown indicator.- Parameters:
dropdownIndicatorVisible
-true
to display the indicator, orfalse
to hide it.
-
updateIconSlot
protected void updateIconSlot()
-