Package com.storedobject.ui
Class ObjectViewerButton<T extends StoredObject>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.button.Button
com.storedobject.vaadin.Button
com.storedobject.ui.ObjectViewerButton<T>
- Type Parameters:
T- The type of the object that extendsStoredObject.
- 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
A button component designed to work with objects of type
StoredObject.
This button is used to trigger actions involving an ObjectEditor and an object of type T.
This can be used to define additional actions while viewing an object in the editor.- 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
ConstructorsConstructorDescriptionObjectViewerButton(com.vaadin.flow.component.Component icon, BiConsumer<ObjectEditor<T>, T> consumer) Creates a button with a specific icon and an action to be executed using anObjectEditorand an object of typeT.ObjectViewerButton(com.vaadin.flow.component.icon.VaadinIcon icon, BiConsumer<ObjectEditor<T>, T> consumer) Creates a button with an icon, designed to interact withObjectEditorfor objects of typeT.ObjectViewerButton(String text, com.vaadin.flow.component.Component icon, BiConsumer<ObjectEditor<T>, T> consumer) Creates a new ObjectViewerButton with the specified text, icon, and action.ObjectViewerButton(String text, com.vaadin.flow.component.icon.VaadinIcon icon, BiConsumer<ObjectEditor<T>, T> consumer) Creates a new ObjectViewerButton with specified text, icon, and consumer.ObjectViewerButton(String text, String icon, BiConsumer<ObjectEditor<T>, T> consumer) Constructs an ObjectViewerButton with a text label, an icon specified by a resource path, and a consumer action to be performed when the button is triggered.ObjectViewerButton(String text, BiConsumer<ObjectEditor<T>, T> consumer) Creates a button that performs a specific action involving anObjectEditorand an object of typeT. -
Method Summary
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, remove, 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
-
ObjectViewerButton
Creates a button that performs a specific action involving anObjectEditorand an object of typeT.- Parameters:
text- The text to display on the button.consumer- ABiConsumerthat defines the action to be executed, taking theObjectEditorand the object of typeTas arguments.
-
ObjectViewerButton
public ObjectViewerButton(com.vaadin.flow.component.Component icon, BiConsumer<ObjectEditor<T>, T> consumer) Creates a button with a specific icon and an action to be executed using anObjectEditorand an object of typeT.- Parameters:
icon- The component used as an icon for the button.consumer- The action to be executed, defined as aBiConsumerthat accepts anObjectEditorand an object of typeT.
-
ObjectViewerButton
Constructs an ObjectViewerButton with a text label, an icon specified by a resource path, and a consumer action to be performed when the button is triggered.- Parameters:
text- The text to display on the button.icon- The resource path of the icon to display on the button.consumer- The action to be performed, defined as aBiConsumerthat accepts anObjectEditorof typeTand an object of typeT.
-
ObjectViewerButton
public ObjectViewerButton(String text, com.vaadin.flow.component.Component icon, BiConsumer<ObjectEditor<T>, T> consumer) Creates a new ObjectViewerButton with the specified text, icon, and action.- Parameters:
text- the text to be displayed on the buttonicon- the icon to be displayed on the buttonconsumer- the action to be executed when the button is used, which takes anObjectEditorinstance and an object of typeTas parameters
-
ObjectViewerButton
public ObjectViewerButton(com.vaadin.flow.component.icon.VaadinIcon icon, BiConsumer<ObjectEditor<T>, T> consumer) Creates a button with an icon, designed to interact withObjectEditorfor objects of typeT.- Parameters:
icon- TheVaadinIconto display on the button.consumer- ABiConsumerthat defines the action to be performed with theObjectEditorand the object of typeT.
-
ObjectViewerButton
public ObjectViewerButton(String text, com.vaadin.flow.component.icon.VaadinIcon icon, BiConsumer<ObjectEditor<T>, T> consumer) Creates a new ObjectViewerButton with specified text, icon, and consumer. This button is designed to work with anObjectEditorand an object of typeT, allowing for additional actions to be defined in the context of viewing objects.- Parameters:
text- The text label to display on the button.icon- TheVaadinIconto display on the button.consumer- ABiConsumerdefining an action to be executed with theObjectEditorand an object of typeTwhen the button is triggered.
-