org.xith3d.utility.cmdline
Class CommandDispatcher

java.lang.Object
  extended by org.xith3d.utility.cmdline.CommandDispatcher

public class CommandDispatcher
extends java.lang.Object

user to register a series of listeners for commands. Calls to processCommand will find the correct command and call its corresponding listener.


Constructor Summary
CommandDispatcher()
           
 
Method Summary
 void addCommandListener(CommandPatternInterface pattern, CommandListener listener)
          adds a listener for a user command.
 boolean processCommand(java.lang.String line)
          Called from the Xith Engine to process a command line entered by the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandDispatcher

public CommandDispatcher()
Method Detail

processCommand

public boolean processCommand(java.lang.String line)
Called from the Xith Engine to process a command line entered by the user.

Parameters:
line -
Returns:
true, if the pattern matches one of the parameters

addCommandListener

public void addCommandListener(CommandPatternInterface pattern,
                               CommandListener listener)
adds a listener for a user command.

Parameters:
pattern -
listener -