|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object us.asciiroth.client.event.Events
public class Events
A singleton that provides a simple publish/subscribe interface for communication between controller/model and view instances.
Constructor Summary | |
---|---|
Events()
|
Method Summary | |
---|---|
void |
addCellListener(CellListener listener)
Register a cell listener. |
void |
addFlagsListener(FlagsListener listener)
Register a flags listener. |
void |
addGameListener(GameListener listener)
Register a game listener. |
void |
addInventoryListener(InventoryListener listener)
Register an inventory listener. |
void |
addMessageListener(MessageListener listener)
Add a message listener. |
void |
addPlayerListener(PlayerListener listener)
Register a player listener. |
void |
fireCellChanged(Cell cell)
Fire a cell changed event and notify listeners. |
void |
fireClearCell(Cell cell)
Cause any messages that are positioned around the indicated cell to be removed from the board. |
void |
fireClearCurrentCell()
Cause any messages that are positioned around the current cell to be removed from the board. |
void |
fireFlagsChanged(Agent agent)
Fire a flags changed event and notify listeners. |
void |
fireGamePaused()
Fire a game paused event and notify listeners. |
void |
fireGameResumed()
Fire a game resumed event and notify listeners. |
void |
fireHandleInventoryMessaging()
Display information about the items at the player's current location. |
void |
fireHandleModalMessage()
Cause a modal message, which was sent out by the fireModalMessage
method, to be displayed on the board. |
void |
fireHideAllMessages()
Hide all messages, regardless of where they are. |
void |
fireInventoryChanged(PlayerBag bag)
Fire an inventory changed event and notify listeners. |
void |
fireMessage(Cell cell,
java.lang.String message)
Fire a message event to be positioned relative to the indicated cell. |
void |
fireModalMessage(java.lang.String message)
Fire a modal message, which is always positioned next to the player's location. |
void |
firePlayerChanged(Player player)
Fire a player changed event and notify listeners. |
void |
fireRerender(Cell cell,
Piece piece,
Symbol sym)
Fire a rerender event/request and notify listeners. |
static Events |
get()
Get the Events singleton |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Events()
Method Detail |
---|
public void addCellListener(CellListener listener)
listener
- public void addFlagsListener(FlagsListener listener)
listener
- public void addGameListener(GameListener listener)
listener
- public void addInventoryListener(InventoryListener listener)
listener
- public void addMessageListener(MessageListener listener)
listener
- public void addPlayerListener(PlayerListener listener)
listener
- public void fireCellChanged(Cell cell)
cell
- public void fireClearCell(Cell cell)
cell
- public void fireClearCurrentCell()
public void fireFlagsChanged(Agent agent)
agent
- public void fireGamePaused()
public void fireGameResumed()
public void fireHandleInventoryMessaging()
public void fireHandleModalMessage()
fireModalMessage
method, to be displayed on the board.
public void fireHideAllMessages()
public void fireInventoryChanged(PlayerBag bag)
bag
- the players invetory bagpublic void fireMessage(Cell cell, java.lang.String message)
cell
- message
- public void fireModalMessage(java.lang.String message)
message
- public void firePlayerChanged(Player player)
player
- public void fireRerender(Cell cell, Piece piece, Symbol sym)
cell
- piece
- sym
- public static Events get()
Events
singleton
Events
singleton
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark