Package picasso.view

Class ButtonPanel

    • Constructor Detail

      • ButtonPanel

        public ButtonPanel​(Canvas view)
        Create panel that will update the given picasso.view.
        Parameters:
        view - the Canvas that the panel's buttons update
    • Method Detail

      • add

        public void add​(String buttonText,
                        Command<Pixmap> action)
        Add the given Command as a button with the given button text. When the button is clicked, the command is executed and the associated canvas is updated.
        Parameters:
        buttonText - the text for the button
        action - the action associated with the new button
      • add

        public void add​(NamedCommand<Pixmap> action)
        Add the given Command as a button. The button's text will be the given command's name.
        Parameters:
        action - the command associated with the new button