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
-
NetLibsCommand(NetLibs)
- NetLibsCommands constructor.
-
addCommandListener(CommandListener)
- Add a "command" listener.
-
doCommand(int)
- Determine which command has been issued, call the command
listeners, then do the command.
-
removeCommandListener(CommandListener)
- Remove a "command" listener.
NetLibsCommand
public NetLibsCommand(NetLibs applet)
- NetLibsCommands constructor. Create multicasters
for various listeners in NetLibs and handle delagating
the commands.
- Parameters:
- applet - the NetLibs applet.
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
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.
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