Class NetLibs.NetLibsCommand
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class NetLibs.NetLibsCommand

java.lang.Object
   |
   +----NetLibs.NetLibsCommand

public class NetLibsCommand
extends Object
implements NetLibsConst
NetLibsCommand takes care of the multicasting to event listeners for various commands in NetLibs. I admit, for an applet as simple as NetLibs, this may be overkill. But, I wanted to put this mechanism in place for future applications.

Author:
Michael Benson

Constructor Index

 o NetLibsCommand(NetLibs)
NetLibsCommands constructor.

Method Index

 o addCommandListener(CommandListener)
Add a "command" listener.
 o doCommand(int)
Determine which command has been issued, call the command listeners, then do the command.
 o removeCommandListener(CommandListener)
Remove a "command" listener.

Constructors

 o NetLibsCommand
  public NetLibsCommand(NetLibs applet)
NetLibsCommands constructor. Create multicasters for various listeners in NetLibs and handle delagating the commands.
Parameters:
applet - the NetLibs applet.

Methods

 o doCommand
  public synchronized void doCommand(int command)
Determine which command has been issued, call the command listeners, then do the command.
Parameters:
command - the command index.
See Also:
NetLibsConst
 o addCommandListener
  public void addCommandListener(CommandListener listener)
Add a "command" listener. Used when someone wants to know that a certain command has been selected. (For enabling/disabling buttons, etc.)
Parameters:
listener - the listener to add.
 o removeCommandListener
  public void removeCommandListener(CommandListener listener)
Remove a "command" listener.
Parameters:
listener - the listener to remove.

All Packages  Class Hierarchy  This Package  Previous  Next  Index