package jrummikub.view; import java.awt.Color; import java.util.Collection; import jrummikub.model.Stone; import jrummikub.util.IEvent; /** * The top-level view interface */ public interface IView { /** * Returns the settings panel * * @return the settings panel */ public ISettingsPanel getSettingsPanel(); /** * Returns the score panel * * @return the score panel */ public IScorePanel getScorePanel(); /** * Returns the table * * @return the table */ public ITablePanel getTablePanel(); /** * @return the board where the players hand stones are displayed */ public IHandPanel getHandPanel(); /** * Returns the player panel * * @return the playerPanel */ public IPlayerPanel getPlayerPanel(); /** * Sets the current player's name * * @param playerName * the player name */ public void setCurrentPlayerName(String playerName); /** * Sets the stones that are to be painted selected * * @param stones * the stones to be painted selected */ public void setSelectedStones(Collection stones); /** * Enables or disables the player's StartTurnPanel * * @param enable * enable/disable */ public void enableStartTurnPanel(boolean enable); /** * The start turn event is emitted when the player wants to start his turn * * @return the event */ public IEvent getStartTurnEvent(); /** * Enables or disables the panel shown when a player has won * * @param enable * enable/disable */ public void enableWinPanel(boolean enable); /** * The quit event is emitted when the player wants to quit the game * * @return the event */ public IEvent getEndProgramEvent(); /** * The new round event is emitted when the player wants to start a new round * * @return the event */ public IEvent getNewRoundEvent(); /** * Shows or hides the game settings panel * * @param show * specifies if the panel shall be shown or hidden */ public void showSettingsPanel(boolean show); /** * Shows or hides the score panel * * @param show * specifies if the panel shall be shown or hidden */ public void showScorePanel(boolean show); /** * Is used for the PlayerPanel and ScorePanel to display a player's color * along with the name * * @param color * the current player's color */ public void setCurrentPlayerColor(Color color); /** * Is used for the PlayerPanel to display if a player has laid out along * with the name * * @param hasLaidOut * specifies if the current player has laid out or not */ public void setHasLaidOut(boolean hasLaidOut); /** * Is emitted if the player wants to end the game and start a new one * * @return newGameEvent */ IEvent getNewGameEvent(); /** * Enables or disables most parts of the interface * * @param enable * specifies if the interface is to be enabled or disabled */ void showInterface(boolean enable); /** * Enables or disables the panel shown while the computer player is making a * move * * @param b * specifies if the interface is enabled or disabled */ public void enableThinkPanel(boolean b); }