|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GameContext
Interface for classes that maintain important state information needed by many different classes. In general, there will only be one instance of an implementing class created per game session. Note that all rle.core.vm.View and rle.core.vm.PlugIn subclasses have access to this instance via getContext().
Method Summary | |
---|---|
void |
addGameContextListener(GameContextListener listener)
Register a listener for changes to the GameContext. |
CommandSet |
commandSet()
Return the current command set. |
PlugIn |
createPlugIn(java.lang.String path)
Create a Plug-in for key "plugindata" without explicitly lookup up the node designated by path. |
PlugIn |
createPlugIn(java.lang.String path,
java.lang.String key)
Create a Plug-in for a key without explicitly lookup up the node designated by path. |
java.util.List<PlugIn> |
createPlugIns(java.lang.String path)
Create a Plug-in for key "plugindata" for each child node at path. |
Board |
currentBoard()
The current board. |
java.lang.String |
currentLanguage()
The current language. |
Perspective |
currentPerspective()
The current Perspective. |
Player |
currentPlayer()
The current player. |
InfoGroupView |
data()
Returns a view of the root node of the Variant Manager data tree. |
GameClock |
gameClock()
The game clock. |
GameThread |
gameThread()
|
boolean |
isPlaying()
|
MessageQueue |
messageQueue()
The message queue. |
void |
removeGameContextListener(GameContextListener listener)
Remove a listener. |
javax.swing.RootPaneContainer |
rootPaneContainer()
The JFrame/Frame/Applet window. |
void |
setCommandSet(CommandSet cs)
Set the current command set. |
java.lang.String |
translation(java.lang.String path)
Convenience method to retrieve a translation at the given path for key "message". |
java.lang.String |
translation(java.lang.String path,
java.lang.String key)
Convenience method to retrieve a translation at the given path for the given key. |
Variant |
variant()
Returns a view of the current Variant. |
World |
world()
The world. |
Method Detail |
---|
javax.swing.RootPaneContainer rootPaneContainer()
Variant variant()
InfoGroupView data()
Board currentBoard()
Player currentPlayer()
Perspective currentPerspective()
java.lang.String currentLanguage()
GameClock gameClock()
World world()
MessageQueue messageQueue()
void setCommandSet(CommandSet cs)
CommandSet commandSet()
void addGameContextListener(GameContextListener listener)
void removeGameContextListener(GameContextListener listener)
PlugIn createPlugIn(java.lang.String path)
PlugIn createPlugIn(java.lang.String path, java.lang.String key)
java.util.List<PlugIn> createPlugIns(java.lang.String path)
java.lang.String translation(java.lang.String path)
java.lang.String translation(java.lang.String path, java.lang.String key)
boolean isPlaying()
GameThread gameThread()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |