Class ControlPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ControlPanel extends JPanel
ControlPanel class to manage the control buttons and status label
See Also:
  • Constructor Details

    • ControlPanel

      public ControlPanel()
      Constructor to initialize the ControlPanel
  • Method Details

    • addSaveGameListener

      public void addSaveGameListener(ActionListener listener)
      Add ActionListener to Save Game button
      Parameters:
      listener - ActionListener
    • addReturnToMenuListener

      public void addReturnToMenuListener(ActionListener listener)
      Add ActionListener to Return to Menu button
      Parameters:
      listener - ActionListener
    • addPassListener

      public void addPassListener(ActionListener listener)
      Add ActionListener to Pass button
      Parameters:
      listener - ActionListener
    • updateStatus

      public void updateStatus(Board board)
      Update the status label based on the current board status
      Parameters:
      board - Board
    • updateInfo

      public void updateInfo(BoardActionResult result)
      Update the info label based on the BoardActionResult
      Parameters:
      result - BoardActionResult
    • setMenuPanel

      public void setMenuPanel(MenuPanel menuPanel)
      Set the MenuPanel
      Parameters:
      menuPanel - MenuPanel