|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IView
The top-level view interface
Nested Class Summary | |
---|---|
static class |
IView.BottomPanelType
Different types of bottom panels |
Method Summary | |
---|---|
void |
clearView()
Hides all view elements and panels except for the cleared table and an empty hand panel |
void |
enablePauseMode(boolean enable)
Enable/disable pause mode |
void |
enableSave(boolean enable)
Enables/disables saving in menu bar |
IEvent |
getAcknowledgeConnectionLostEvent()
The acknoledge connection lost event is emitted when the user has acknowledged that the network connection was lost |
IEvent |
getAcknowledgeInvalidEvent()
The start turn event is emitted when the player knows what invalid stones he played |
IConnectPanel |
getConnectPanel()
Getter for connect panel |
IEvent |
getEndPauseEvent()
The end pause event is emitted when the user wants to sresume the game after a pause |
IEvent |
getEndProgramEvent()
The quit event is emitted when the player wants to quit the game |
IGameListPanel |
getGameListPanel()
Getter for game list panel |
IHandPanel |
getHandPanel()
|
IEvent |
getLoadEvent()
The load event is emitted when the user wants to load a previously saved game state |
IEvent1<java.io.File> |
getLoadFileEvent()
The load file event is emitted when the user chose to discard the current game to save another |
ILoginPanel |
getLoginPanel()
Getter for login panel |
IEvent |
getMenuNewGameEvent()
The menu new game event is emitted when the user selects the new game menu entry |
IEvent |
getNetworkGameEvent()
The network game event is emitted when the user chooses a network game |
IEvent |
getNewGameEvent()
Is emitted if the player wants to end the game and start a new one |
IEvent |
getNewRoundEvent()
The new round event is emitted when the player wants to start a new round |
IEvent |
getPauseEvent()
The pause event is emitted when the user wants to pause the current turn |
IPlayerPanel |
getPlayerPanel()
Returns the player panel |
IEvent |
getQuitEvent()
The quit event is emitted when the user wants to leave the application |
IQuitWarningPanel |
getQuitWarningPanel()
Getter for quit warning panel |
IEvent1<java.io.File> |
getSaveEvent()
The save event is emitted when the user wants to save the current game state |
IScorePanel |
getScorePanel()
Returns the score panel |
ISettingsPanel |
getSettingsPanel()
Returns the settings panel |
ISidePanel |
getSidePanel()
Returns the side panel |
IEvent |
getStartTurnEvent()
The start turn event is emitted when the player wants to start his turn |
ITablePanel |
getTablePanel()
Returns the table |
void |
load()
Loading a game |
void |
resetLoginPanel()
Clears user input of the resetLoginPanel |
void |
setBottomPanel(IView.BottomPanelType type)
Sets the bottom panels type |
void |
setCurrentPlayerColor(java.awt.Color color)
Is used for the PlayerPanel and ScorePanel to display a player's color along with the name |
void |
setCurrentPlayerHasLaidOut(boolean hasLaidOut)
Is used for the PlayerPanel to display if a player has laid out along with the name |
void |
setCurrentPlayerName(java.lang.String playerName)
Sets the current player's name |
void |
setInitialMeldError(int points)
Is set if a player tried to lay out less than initial meld threshold |
void |
setInitialMeldFirstError()
Is set if the player tried to modify the table without laying out first |
void |
setInvalidStoneSets(java.util.Collection<StoneSet> sets)
Set invalid sets to enable showing |
void |
setLastStonePlayerName(java.lang.String name)
Sets the name of the player that has drawn the last stone |
void |
setMayPause(boolean mayPause)
Sets the pause button if pausing should be possible in the current situation |
void |
setRedealedPlayerName(java.lang.String name)
Sets the name of the player that has redealt last |
void |
setSelectedStones(java.util.Collection<Stone> stones)
Sets the stones that are to be painted selected |
void |
setStoneCollectionHidden(boolean enable)
Show stone collection |
void |
showConnectPanel(boolean show)
Set the connect panel visible |
void |
showGameListPanel(boolean show)
Show/hide game list panel |
void |
showLoadingError()
Show when loading is unsuccessful |
void |
showLoginPanel(boolean show)
Show/hide login panel |
void |
showQuitWarningPanel(boolean show)
Sets the quit warning panel visible |
void |
showScorePanel(boolean show)
Shows or hides the score panel |
void |
showServerStartupError(boolean alreadyRunning)
Show an error message when the server couldn't be started |
void |
showSettingsPanel(boolean show)
Shows or hides the game settings panel |
void |
showSidePanel(boolean show)
Show/hide side panel |
Method Detail |
---|
ISettingsPanel getSettingsPanel()
IScorePanel getScorePanel()
ITablePanel getTablePanel()
ISidePanel getSidePanel()
IHandPanel getHandPanel()
IPlayerPanel getPlayerPanel()
void setCurrentPlayerName(java.lang.String playerName)
playerName
- the player namevoid setRedealedPlayerName(java.lang.String name)
name
- the player namevoid setLastStonePlayerName(java.lang.String name)
name
- the player namevoid setSelectedStones(java.util.Collection<Stone> stones)
stones
- the stones to be painted selectedIEvent getStartTurnEvent()
IEvent getAcknowledgeInvalidEvent()
IEvent getAcknowledgeConnectionLostEvent()
IEvent getEndProgramEvent()
IEvent getNewRoundEvent()
void showSettingsPanel(boolean show)
show
- specifies if the panel shall be shown or hiddenvoid showScorePanel(boolean show)
show
- specifies if the panel shall be shown or hiddenvoid setCurrentPlayerColor(java.awt.Color color)
color
- the current player's colorvoid setCurrentPlayerHasLaidOut(boolean hasLaidOut)
hasLaidOut
- specifies if the current player has laid out or notIEvent getNewGameEvent()
void setBottomPanel(IView.BottomPanelType type)
type
- the type of the bottom panelIEvent getMenuNewGameEvent()
IEvent getLoadEvent()
IEvent1<java.io.File> getSaveEvent()
IEvent getPauseEvent()
IEvent getEndPauseEvent()
void clearView()
IEvent getNetworkGameEvent()
ILoginPanel getLoginPanel()
IGameListPanel getGameListPanel()
void showLoginPanel(boolean show)
show
- true = login panel is shownvoid resetLoginPanel()
void enablePauseMode(boolean enable)
enable
- true = enablevoid showGameListPanel(boolean show)
show
- true = showvoid showSidePanel(boolean show)
show
- true to showvoid setInitialMeldError(int points)
points
- initial meld thresholdvoid setStoneCollectionHidden(boolean enable)
enable
- showing collectionvoid setInitialMeldFirstError()
void setInvalidStoneSets(java.util.Collection<StoneSet> sets)
sets
- invalid sets on tablevoid showLoadingError()
void showServerStartupError(boolean alreadyRunning)
alreadyRunning
- true when the server is already running on this machinevoid enableSave(boolean enable)
enable
- saving possiblevoid showQuitWarningPanel(boolean show)
show
- is visibleIEvent getQuitEvent()
IQuitWarningPanel getQuitWarningPanel()
IEvent1<java.io.File> getLoadFileEvent()
void load()
void showConnectPanel(boolean show)
show
- is visibleIConnectPanel getConnectPanel()
void setMayPause(boolean mayPause)
mayPause
- pausing possible
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |