jfreerails.client.top
Class UserMessageGenerator

java.lang.Object
  extended by jfreerails.client.top.UserMessageGenerator
All Implemented Interfaces:
MoveReceiver

public class UserMessageGenerator
extends java.lang.Object
implements MoveReceiver

This class inspects incoming moves and generates a user message if appropriate. It is also used to trigger sounds.

Author:
Luke

Field Summary
private  ActionRoot actionRoot
           
private  java.text.DecimalFormat formatter
           
private  ModelRoot modelRoot
           
private  SoundManager soundManager
           
 
Constructor Summary
UserMessageGenerator(ModelRoot mr, ActionRoot actionRoot)
           
 
Method Summary
 void logSpeed()
           
 void processMove(Move move)
           
private  void trainArrives(WorldDiffMove wdm)
          Generates a message giving details of any cargo delivered and plays a cash register sound to indicate that revenue is coming in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelRoot

private ModelRoot modelRoot

actionRoot

private ActionRoot actionRoot

formatter

private final java.text.DecimalFormat formatter

soundManager

private SoundManager soundManager
Constructor Detail

UserMessageGenerator

public UserMessageGenerator(ModelRoot mr,
                            ActionRoot actionRoot)
Method Detail

processMove

public void processMove(Move move)
Specified by:
processMove in interface MoveReceiver

trainArrives

private void trainArrives(WorldDiffMove wdm)
Generates a message giving details of any cargo delivered and plays a cash register sound to indicate that revenue is coming in.


logSpeed

public void logSpeed()