Interface ClickableRenderer<SOURCE>

Type Parameters:
SOURCE - the type of the item received in the click listeners
All Superinterfaces:
Serializable
All Known Implementing Classes:
NativeButtonRenderer

public interface ClickableRenderer<SOURCE> extends Serializable
Represents a clickable renderer.
Author:
Vaadin Ltd
  • Method Details

    • addItemClickListener

      Registration addItemClickListener(ClickableRenderer.ItemClickListener<SOURCE> listener)
      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, not null
      Returns:
      a registration that can be used to remove the listener from this renderer
    • getItemClickListeners

      Gets all registered listeners.
      Returns:
      an unmodifiable list of registered listeners, not null
    • onClick

      default void onClick(SOURCE item)
      Invoked when an item is clicked or tapped. Registered listeners are notified.
      Parameters:
      item - the clicked or tapped item
      See Also: