Class ShareEasyClickEvent

java.lang.Object
com.flowingcode.vaadin.addons.shareeasy.ShareEasyClickEvent
All Implemented Interfaces:
Serializable

public class ShareEasyClickEvent extends Object implements Serializable
Event fired when one of the share drivers is clicked.
Author:
Paola De Bartolo / Flowing Code
See Also:
  • Constructor Details

    • ShareEasyClickEvent

      public ShareEasyClickEvent(Component source, String driverName, String link)
      Creates a new share click event.
      Parameters:
      source - the component the Share Easy instance is attached to
      driverName - the name of the clicked driver, e.g. "telegram"
      link - the share link associated with the driver (the copied URL for the copy driver); may be null for custom drivers without a link
  • Method Details

    • getSource

      public Component getSource()
      Gets the component the Share Easy instance is attached to.
      Returns:
      the source component
    • getDriverName

      public String getDriverName()
      Gets the name of the clicked driver.
      Returns:
      the driver name, e.g. "telegram"
    • getDriver

      public Optional<Driver> getDriver()
      Gets the clicked driver as a default driver, if it corresponds to one.
      Returns:
      the matching default Driver, or an empty Optional if the clicked driver is a custom driver
    • getLink

      public String getLink()
      Gets the share link associated with the clicked driver. For the copy driver this is the URL that was copied to the clipboard.
      Returns:
      the share link, or null for custom drivers without a link