Package com.vaadin.flow.data.renderer
Interface ClickableRenderer<SOURCE>
- Type Parameters:
SOURCE
- the type of the item received in the click listeners
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
NativeButtonRenderer
Represents a clickable renderer.
- Author:
- Vaadin Ltd
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Listener that receives the clicked item (or tapped item, in touch devices). -
Method Summary
Modifier and TypeMethodDescriptionAdds a click listener to the renderer.Gets all registered listeners.default void
Invoked when an item is clicked or tapped.
-
Method Details
-
addItemClickListener
Adds a click listener to the renderer. Events are fired when items are clicked or tapped (for touch devices).- Parameters:
listener
- the listener to receive click events, notnull
- Returns:
- a registration that can be used to remove the listener from this renderer
-
getItemClickListeners
List<ClickableRenderer.ItemClickListener<SOURCE>> getItemClickListeners()Gets all registered listeners.- Returns:
- an unmodifiable list of registered listeners, not
null
-
onClick
Invoked when an item is clicked or tapped. Registered listeners are notified.- Parameters:
item
- the clicked or tapped item- See Also:
-