us.asciiroth.client.ui
Class MessageManager

java.lang.Object
  extended by com.google.gwt.user.client.Timer
      extended by us.asciiroth.client.ui.MessageManager
All Implemented Interfaces:
GameListener, MessageListener

public class MessageManager
extends com.google.gwt.user.client.Timer
implements GameListener, MessageListener

The MessageListener implementation in the game. It manages a cache of CellMessagePanel instances, positions them so they don't overlap, and manages their state.


Constructor Summary
MessageManager(HasBoard hasBoard)
           
 
Method Summary
 void clearAllCells()
           
 void clearCell(Cell cell)
          Hide any messages that would obscure this cell.
 void clearCurrentCell()
           
 void handleInventoryMessaging()
           
 void handleModalMessage()
           
 void message(Cell cell, java.lang.String message)
           
 void modalMessage(java.lang.String message)
           
 void onGamePaused()
          Game has been paused.
 void onGameResumed()
          Game (in progress) has been resumed.
 void run()
           
 
Methods inherited from class com.google.gwt.user.client.Timer
cancel, schedule, scheduleRepeating
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageManager

public MessageManager(HasBoard hasBoard)
Method Detail

clearAllCells

public void clearAllCells()
Specified by:
clearAllCells in interface MessageListener

clearCell

public void clearCell(Cell cell)
Hide any messages that would obscure this cell.

Specified by:
clearCell in interface MessageListener
Parameters:
cell -

clearCurrentCell

public void clearCurrentCell()
Specified by:
clearCurrentCell in interface MessageListener

handleInventoryMessaging

public void handleInventoryMessaging()
Specified by:
handleInventoryMessaging in interface MessageListener

handleModalMessage

public void handleModalMessage()
Specified by:
handleModalMessage in interface MessageListener

message

public void message(Cell cell,
                    java.lang.String message)
Specified by:
message in interface MessageListener

modalMessage

public void modalMessage(java.lang.String message)
Specified by:
modalMessage in interface MessageListener

onGamePaused

public void onGamePaused()
Description copied from interface: GameListener
Game has been paused.

Specified by:
onGamePaused in interface GameListener

onGameResumed

public void onGameResumed()
Description copied from interface: GameListener
Game (in progress) has been resumed.

Specified by:
onGameResumed in interface GameListener

run

public void run()
Specified by:
run in class com.google.gwt.user.client.Timer

0.7

2009 Alx Dark