Package com.storedobject.vaadin
Class Clickable<T extends com.vaadin.flow.component.Component>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
com.storedobject.vaadin.Clickable<T>
- Type Parameters:
T- Component type
- All Implemented Interfaces:
ClickNotifier,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.Component>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,Serializable
public class Clickable<T extends com.vaadin.flow.component.Component>
extends com.vaadin.flow.component.Composite<T>
implements ClickNotifier
A wrapped class to make any Vaadin component "clickable". The registered
ClickHandler will receive
EnhancedClickEvents.
Example: Component c; new Clickable(c);
- Author:
- Syam
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddClickHandler(ClickHandler clickHandler) Add a click handler.com.vaadin.flow.shared.RegistrationaddClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.Component>> listener) protected TvoidremoveClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.Component>> listener) Remove a listener.Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods 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, 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.storedobject.vaadin.util.ClickNotifier
replaceClickListenerMethods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickShortcut, addDoubleClickListener, addSingleClickListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
Clickable
-
Clickable
Constructor.- Parameters:
component- Component to make it clickableclickHandler- Click handler
-
-
Method Details
-
initContent
-
addClickListener
public com.vaadin.flow.shared.Registration addClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.Component>> listener) - Specified by:
addClickListenerin interfacecom.vaadin.flow.component.ClickNotifier<T extends com.vaadin.flow.component.Component>
-
removeClickListener
public void removeClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.Component>> listener) Description copied from interface:ClickNotifierRemove a listener.- Specified by:
removeClickListenerin interfaceClickNotifier- Parameters:
listener- Listener
-
addClickHandler
Add a click handler.- Parameters:
clickHandler- Click handler to add- Returns:
- Registration.
-