Class LikeButton

All Implemented Interfaces:
Animation, Editable, ActionListener, ActionSource<ActionEvent>, StyleListener, IconHolder, ReleasableComponent, SelectableIconHolder, TextHolder

public class LikeButton extends Button implements ActionListener
Generic "Like" button that enables us to submit a like to facebook, to get the post id required for the like functionality you will need to use a tool such as: https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Fposts You can ask it to list your posts and then seek the correct id within the returned JSON
  • Constructor Details

    • LikeButton

      public LikeButton(String postId)

      Constructor accepting the post id

      Parameters
      • postId
    • LikeButton

      public LikeButton()
      Default constructor
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent evt)

      Invoked when an action occurred on a component

      Parameters
      • evt: @param evt event object describing the source of the action as well as its trigger
      Specified by:
      actionPerformed in interface ActionListener
    • getPostId

      public String getPostId()
      Returns

      the postId

    • setPostId

      public void setPostId(String postId)
      Parameters
      • postId: the postId to set
    • getPropertyNames

      public String[] getPropertyNames()

      A component may expose mutable property names for a UI designer to manipulate, this API is designed for usage internally by the GUI builder code

      Returns

      the property names allowing mutation

      Overrides:
      getPropertyNames in class Label
    • getPropertyTypes

      public Class[] getPropertyTypes()

      Matches the property names method (see that method for further details).

      Returns

      the types of the properties

      Overrides:
      getPropertyTypes in class Label
    • getPropertyTypeNames

      public String[] getPropertyTypeNames()

      This method is here to workaround an XMLVM array type bug where property types aren't identified properly, it returns the names of the types using the following type names: String,int,double,long,byte,short,char,String[],String[][],byte[],Image,Image[],Object[],ListModel,ListCellRenderer

      Returns

      Array of type names

      Overrides:
      getPropertyTypeNames in class Label
    • getPropertyValue

      public Object getPropertyValue(String name)

      Returns the current value of the property name, this method is used by the GUI builder

      Parameters
      • name: the name of the property
      Returns

      the value of said property

      Overrides:
      getPropertyValue in class Label
    • setPropertyValue

      public String setPropertyValue(String name, Object value)

      Sets a new value to the given property, returns an error message if failed and null if successful. Notice that some builtin properties such as "$designMode" might be sent to components to indicate application state.

      Parameters
      • name: the name of the property

      • value: new value for the property

      Returns

      error message or null

      Overrides:
      setPropertyValue in class Label
    • getAppId

      public String getAppId()
      Returns

      the appId

    • setAppId

      public void setAppId(String appId)
      Parameters
      • appId: the appId to set
    • getRedirectURI

      public String getRedirectURI()
      Returns

      the redirectURI

    • setRedirectURI

      public void setRedirectURI(String redirectURI)
      Parameters
      • redirectURI: the redirectURI to set
    • getClientSecret

      public String getClientSecret()
      Returns

      the clientSecret

    • setClientSecret

      public void setClientSecret(String clientSecret)
      Parameters
      • clientSecret: the clientSecret to set
    • getPermissions

      public String[] getPermissions()
      Returns

      the permissions

    • setPermissions

      public void setPermissions(String[] permissions)
      Parameters
      • permissions: the permissions to set