Class FacebookShare

All Implemented Interfaces:
ActionListener<ActionEvent>

public class FacebookShare extends ShareService
Facebook sharing service
  • Constructor Details

    • FacebookShare

      public FacebookShare()
      Default Constructor
  • Method Details

    • getIcon

      public Image getIcon()
      Description copied from class: Command

      Returns the icon representing the command

      Returns

      an icon representing the command

      Overrides:
      getIcon in class Command
    • equals

      public boolean equals(Object o)
      Description copied from class: Command

      compare two commands

      Parameters
      • obj: a Command Object to compare
      Returns

      true if the obj has the same command name

      Overrides:
      equals in class Command
    • hashCode

      public int hashCode()

      Allows storing commands in a vector/hashtable

      Returns

      unique hashcode for the command class

      Overrides:
      hashCode in class Command
    • actionPerformed

      public void actionPerformed(ActionEvent evt)

      This method is called when the soft button/Menu item is clicked

      Parameters
      • evt: the Event Object
      Specified by:
      actionPerformed in interface ActionListener<ActionEvent>
      Overrides:
      actionPerformed in class ShareService
    • share

      public void share(String text, String image, String mime)

      This is the image sharing method which should be implemented by the service, if the service returned true on the canShareImage() method Notice not all services are able to share text and image together, in this case the image sharing will be preferred by these services

      Parameters
      • text: text to share

      • image: image to share

      Overrides:
      share in class ShareService
    • share

      public void share(String toShare)

      This is the sharing method which should be implemented by the service.

      Parameters
      • text: text to share
      Specified by:
      share in class ShareService
    • canShareImage

      public boolean canShareImage()

      The implementing service needs to declare if it is capable to share an image

      Returns

      true if the service can share images

      Specified by:
      canShareImage in class ShareService