Class ActionItem

    • Constructor Detail

      • ActionItem

        public ActionItem​(Key id,
                          ActionClickEventHandler handler)
        Creates the action with the id of the toast and the handler to invoke when the user will click on the action.
        The content is the value of the id.
        Parameters:
        id - id of the toast
        handler - the handler to use when a click was performed on the toast
      • ActionItem

        public ActionItem​(String content,
                          ActionClickEventHandler handler)
        Creates the action with the content to show on the toast and the handler to invoke when the user will click on the action.
        The id of the action has been created automatically.
        Parameters:
        content - content to show on the toast
        handler - the handler to use when a click was performed on the toast
      • ActionItem

        public ActionItem​(String id,
                          String content,
                          ActionClickEventHandler handler)
        Creates the action with the id of the action, the content to show on the toast and the handler to invoke when the user will click on the action.
        Parameters:
        id - id of the action
        content - content to show on the toast
        handler - the handler to use when a click was performed on the toast
      • ActionItem

        public ActionItem​(Key id,
                          String content,
                          ActionClickEventHandler handler)
        Creates the action with the id of the action, the content to show on the toast and the handler to invoke when the user will click on the action.
        Parameters:
        id - id of the action
        content - content to show on the toast
        handler - the handler to use when a click was performed on the toast