Package com.storedobject.vaadin
Class PopupButton
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.button.Button
com.storedobject.vaadin.Button
com.storedobject.vaadin.PopupButton
- All Implemented Interfaces:
HasThemeStyle,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.button.Button>,com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.button.Button>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.button.Button>,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.button.Button>,com.vaadin.flow.component.HasAriaLabel,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.HasPrefix,com.vaadin.flow.component.shared.HasSuffix,com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.button.ButtonVariant>,com.vaadin.flow.component.shared.HasTooltip,Serializable
- Direct Known Subclasses:
ConfirmButton
A button that can pop up some other set of components when clicked. Component set to be popped up can be added using the add method.
- Author:
- Syam
- See Also:
-
Nested Class Summary
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 -
Constructor Summary
ConstructorsConstructorDescriptionPopupButton(com.vaadin.flow.component.Component icon) Constructor.PopupButton(com.vaadin.flow.component.icon.VaadinIcon icon) Constructor.PopupButton(String text) Constructor.PopupButton(String text, com.vaadin.flow.component.Component icon) Constructor.PopupButton(String text, com.vaadin.flow.component.icon.VaadinIcon icon) Constructor.PopupButton(String text, String icon) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(com.vaadin.flow.component.Component... components) Add components to the pop-up.voidalign(CSSGrid.Position position) Aligns the content of the popover button within its grid cell based on the specified position.voidalign(com.vaadin.flow.component.Component component, CSSGrid.Position position) Vertically align a component within its grid cell.voidcenter()Centers the content within the grid layout horizontally and vertically by setting the justification and alignment to the center position.voidcenter(com.vaadin.flow.component.Component component) (Horizontally and vertically) center a component within its grid cell.intgetColumnSpan(com.vaadin.flow.component.Component component) Get the number of columns the component takes up.final GridLayoutRetrieves the container for the components within the popover.final com.vaadin.flow.component.popover.PopoverRetrieves the popover associated with this button.intgetRowSpan(com.vaadin.flow.component.Component component) Get the number of rows the component takes up.voidjustify(CSSGrid.Position position) Justifies (horizontally aligns) the components in the grid layout associated with the popover.voidjustify(com.vaadin.flow.component.Component component, CSSGrid.Position position) Horizontally justify a component within its grid cell.voidremove(com.vaadin.flow.component.Component... components) Remove components from the pop-up.voidRemove all components from the pop-up.voidsetColumns(int numberOfColumns) Set equally sized columns.voidsetColumnSpan(com.vaadin.flow.component.Component component, int columns) Set the number of columns to span.voidsetRowSpan(com.vaadin.flow.component.Component component, int rows) Set the number of rows to span.Methods inherited from class com.storedobject.vaadin.Button
addClickHandler, asPrimary, asSmall, setIcon, setIcon, setIcon, setNoIconsMethods inherited from class com.vaadin.flow.component.button.Button
addBlurListener, addFocusListener, addFocusShortcut, click, clickInClient, getIcon, isAutofocus, isDisableOnClick, isIconAfterText, setAutofocus, setDisableOnClick, setEnabled, setIconAfterText, setTextMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.HasAriaLabel
getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledByMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabledMethods inherited from interface com.vaadin.flow.component.shared.HasPrefix
getPrefixComponent, setPrefixComponentMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.shared.HasSuffix
getSuffixComponent, setSuffixComponentMethods inherited from interface com.vaadin.flow.component.HasText
getText, getWhiteSpace, setWhiteSpaceMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.storedobject.vaadin.HasThemeStyle
addTheme, clearThemes, getInternalElement, removeTheme, setThemeMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariantsMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipText
-
Constructor Details
-
PopupButton
Constructor.- Parameters:
text- Text label to display and the respective icon will be used
-
PopupButton
public PopupButton(com.vaadin.flow.component.Component icon) Constructor.- Parameters:
icon- Icon
-
PopupButton
-
PopupButton
Constructor.- Parameters:
text- Text label to displayicon- Icon to use
-
PopupButton
public PopupButton(com.vaadin.flow.component.icon.VaadinIcon icon) Constructor.- Parameters:
icon- Icon to use
-
PopupButton
Constructor.- Parameters:
text- Text label to displayicon- Icon to use
-
-
Method Details
-
setColumns
public void setColumns(int numberOfColumns) Set equally sized columns. By default, components that are added will be vertically stacked up in one column. This method can be used to make them stacked up as multiple equally sized columns.- Parameters:
numberOfColumns- Number of columns to set
-
add
public void add(com.vaadin.flow.component.Component... components) Add components to the pop-up.- Parameters:
components- Components to add
-
remove
public void remove(com.vaadin.flow.component.Component... components) Remove components from the pop-up.- Overrides:
removein classcom.vaadin.flow.component.button.Button- Parameters:
components- Components to remove
-
removeAll
public void removeAll()Remove all components from the pop-up. -
setColumnSpan
public void setColumnSpan(com.vaadin.flow.component.Component component, int columns) Set the number of columns to span.- Parameters:
component- Componentcolumns- Columns to span
-
getColumnSpan
public int getColumnSpan(com.vaadin.flow.component.Component component) Get the number of columns the component takes up.- Parameters:
component- Component- Returns:
- Number of columns.
-
setRowSpan
public void setRowSpan(com.vaadin.flow.component.Component component, int rows) Set the number of rows to span.- Parameters:
component- Componentrows- Rows to span
-
getRowSpan
public int getRowSpan(com.vaadin.flow.component.Component component) Get the number of rows the component takes up.- Parameters:
component- Component- Returns:
- Number of rows.
-
justify
Horizontally justify a component within its grid cell.- Parameters:
component- Componentposition- Position
-
align
Vertically align a component within its grid cell.- Parameters:
component- Componentposition- Position
-
center
public void center(com.vaadin.flow.component.Component component) (Horizontally and vertically) center a component within its grid cell.- Parameters:
component- Component
-
align
Aligns the content of the popover button within its grid cell based on the specified position.- Parameters:
position- The vertical alignment position within the grid cell.
-
justify
Justifies (horizontally aligns) the components in the grid layout associated with the popover.- Parameters:
position- The position to justify the components within the grid cell.
-
center
public void center()Centers the content within the grid layout horizontally and vertically by setting the justification and alignment to the center position. -
getPopover
public final com.vaadin.flow.component.popover.Popover getPopover()Retrieves the popover associated with this button.- Returns:
- the
Popoverinstance associated with this button.
-
getContainer
Retrieves the container for the components within the popover.- Returns:
- The
GridLayoutcontainer used to manage the layout of components.
-