jfreerails.client.top
Class UserMessageGenerator
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
modelRoot
private ModelRoot modelRoot
actionRoot
private ActionRoot actionRoot
formatter
private final java.text.DecimalFormat formatter
soundManager
private SoundManager soundManager
UserMessageGenerator
public UserMessageGenerator(ModelRoot mr,
ActionRoot actionRoot)
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()