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 anObjectEditor
and 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 withObjectEditor
for 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 anObjectEditor
and an object of typeT
. -
Method Summary
Methods inherited from class com.storedobject.vaadin.Button
addClickHandler, asPrimary, asSmall, setIcon, setIcon, setIcon, setNoIcons
Methods inherited from class com.vaadin.flow.component.button.Button
addBlurListener, addFocusListener, addFocusShortcut, click, clickInClient, getIcon, isAutofocus, isDisableOnClick, isIconAfterText, remove, setAutofocus, setDisableOnClick, setEnabled, setIconAfterText, setText
Methods 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, 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.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.Focusable
blur, focus, getTabIndex, setTabIndex
Methods inherited from interface com.vaadin.flow.component.HasAriaLabel
getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledBy
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled
Methods inherited from interface com.vaadin.flow.component.shared.HasPrefix
getPrefixComponent, setPrefixComponent
Methods 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, setWidthFull
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
Methods inherited from interface com.vaadin.flow.component.shared.HasSuffix
getSuffixComponent, setSuffixComponent
Methods inherited from interface com.vaadin.flow.component.HasText
getText, getWhiteSpace, setWhiteSpace
Methods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
Methods inherited from interface com.storedobject.vaadin.HasThemeStyle
addTheme, clearThemes, getInternalElement, removeTheme, setTheme
Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariants
Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipText
-
Constructor Details
-
ObjectViewerButton
Creates a button that performs a specific action involving anObjectEditor
and an object of typeT
.- Parameters:
text
- The text to display on the button.consumer
- ABiConsumer
that defines the action to be executed, taking theObjectEditor
and the object of typeT
as 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 anObjectEditor
and an object of typeT
.- Parameters:
icon
- The component used as an icon for the button.consumer
- The action to be executed, defined as aBiConsumer
that accepts anObjectEditor
and 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 aBiConsumer
that accepts anObjectEditor
of typeT
and 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 anObjectEditor
instance and an object of typeT
as 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 withObjectEditor
for objects of typeT
.- Parameters:
icon
- TheVaadinIcon
to display on the button.consumer
- ABiConsumer
that defines the action to be performed with theObjectEditor
and 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 anObjectEditor
and 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
- TheVaadinIcon
to display on the button.consumer
- ABiConsumer
defining an action to be executed with theObjectEditor
and an object of typeT
when the button is triggered.
-