Class DropdownShareEasy

java.lang.Object
com.flowingcode.vaadin.addons.shareeasy.DropdownShareEasy

public class DropdownShareEasy extends Object
Represents a ShareEasy instance with Dropdown mode.
  • Field Details

    • type

      public Type type
    • animation

      public Animation animation
    • withDefaultDriversListFirst

      protected boolean withDefaultDriversListFirst
  • Constructor Details

    • DropdownShareEasy

      public DropdownShareEasy()
  • Method Details

    • create

      public static DropdownShareEasy create()
    • withType

      public DropdownShareEasy withType(Type type)
    • withAnimation

      public DropdownShareEasy withAnimation(Animation animation)
    • getJsonObjectOptions

      public elemental.json.JsonObject getJsonObjectOptions()
      Gets the JSON representation of the Sharee options.
      Returns:
      The JsonObject representing the Sharee options
    • withShareLink

      public DropdownShareEasy withShareLink(String shareLink)
      Sets the share link for the shared content.
      Parameters:
      shareLink - The URL to be shared
      Returns:
      The current instance of the BaseSharee class
    • withShareText

      public DropdownShareEasy withShareText(String shareText)
      Sets the share text for the shared content.
      Parameters:
      shareText - The text to be shared
      Returns:
      The current instance of the BaseSharee class
    • withRipple

      public DropdownShareEasy withRipple(boolean ripple)
      Enables or disables the ripple effect.
      Parameters:
      ripple - True to enable the ripple effect, false to disable
      Returns:
      The current instance of the BaseSharee class
    • withShowTransitionDuration

      public DropdownShareEasy withShowTransitionDuration(String showTransitionDuration)
      Sets the duration of the show transition for sharing.
      Parameters:
      showTransitionDuration - The duration of the show transition
      Returns:
      The current instance of the BaseSharee class
    • withLocale

      public DropdownShareEasy withLocale(Locale locale)
      Sets the language to be displayed. Default value is "en" for English. Default values are listed in Locale. Custom locales can be defined.
      Parameters:
      locale - The language code, e.g., "en" for English
      Returns:
      The current instance of the BaseSharee class
    • withDrivers

      public DropdownShareEasy withDrivers(ShareEasyDriver... drivers)
      Sets the social media drivers to be displayed (default and/or custom drivers). Default values are listed in Driver.
      Parameters:
      drivers - An array of social media drivers
      Returns:
      The current instance of the BaseSharee class
    • forComponent

      public void forComponent(com.vaadin.flow.component.Component component)
      Initializes the Sharee component with the specified Vaadin component.
      Parameters:
      component - The Vaadin component to associate with the Sharee instance
    • withCustomLanguageKeys

      public DropdownShareEasy withCustomLanguageKeys(LanguageKeys languageKeys)
      Sets custom language keys for the default locale.
      Parameters:
      languageKeys - The custom language keys
      Returns:
      The current instance of the BaseSharee class
    • withCustomLanguageKeys

      public DropdownShareEasy withCustomLanguageKeys(String locale, LanguageKeys languageKeys)
      Sets custom language keys for the specified locale.
      Parameters:
      locale - The language code
      languageKeys - The custom language keys
      Returns:
      The current instance of the BaseSharee class
    • withCustomDrivers

      public DropdownShareEasy withCustomDrivers(Map<String,CustomDriverOptions> customDrivers)
      Sets custom drivers (new social options).
      Parameters:
      customDrivers - The custom drivers
      Returns:
      The current instance of the BaseSharee class