Class CustomButtonPanel

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants

public class CustomButtonPanel extends JButton
Custom JPanel that triggers a specific ButtonPanelBehaviour when clicked. It is designed to work with a JPanel and a ButtonPanelBehaviour interface.
Author:
Riccardo Finocchiaro
See Also:
  • Constructor Details

    • CustomButtonPanel

      public CustomButtonPanel(String nome, JPanel panel)
      Creates a CustomButtonPanel with a specified name and a JPanel to interact with.
      Parameters:
      nome - the button label that will be displayed on the button
      panel - the JPanel the button will interact with
      See Also:
  • Method Details

    • setButtonPanelBehaviour

      public void setButtonPanelBehaviour(ButtonPanelBehaviour buttonPanelBehaviour)
      Sets the behavior to execute when the button is clicked.
      Parameters:
      buttonPanelBehaviour - the behavior implementation
      See Also: