Class GameInProgressPanel

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

public class GameInProgressPanel extends JTabbedPane
Class container of all others Panel inside a JTabbedPane
See Also:
  • Field Details

    • ownNickname

      private final String ownNickname
      nickname of GUI's player
    • window

      private final Window window
      Frame containing all others components
    • sw

      private final SocketWrapper sw
      SocketWrapper used to communicate with Server
    • guiSocketListener

      private final GUISocketListener guiSocketListener
      Contains GuiReader's information necessary to record user's requests during his turn
  • Constructor Details

    • GameInProgressPanel

      public GameInProgressPanel(Context ctx)
      Constructor that should be called only upon the creation of first GameInProgressPanel
      Parameters:
      ctx - Context to use during the game
    • GameInProgressPanel

      public GameInProgressPanel(Context ctx, Model model, GUISocketListener guiSocketListener, GameInProgressPanel previousPanel)
      Public constructor to create GameInProgressPanel's object starting from the second creation; it should never be called the first time
      Parameters:
      ctx - Context to use during the game
      model - Model containing all game's information
      guiSocketListener - created upon first gameInProgressPanel creation
      previousPanel - if not null, signifies an old panel was previously drawn and will keep the displayed tab the same in the new panel
    • GameInProgressPanel

      private GameInProgressPanel(Context ctx, GUISocketListener guiSocketListener)
      Should be used upon the second creation of GameInProgressPanel
      Parameters:
      ctx - Context to use during the game
      guiSocketListener - created upon first gameInProgressPanel creation
  • Method Details

    • getNextAction

      private String getNextAction(Model model)