gistoolkit.server.mapclient.command
Class BasicCommand

java.lang.Object
  extended bygistoolkit.server.mapclient.command.BasicCommand
All Implemented Interfaces:
Command, java.lang.Runnable
Direct Known Subclasses:
PalletCommand, PanCommand, ZoomInCommand, ZoomOutCommand

public abstract class BasicCommand
extends java.lang.Object
implements Command, java.lang.Runnable

A basic command to be sub classed for specific commands.


Constructor Summary
BasicCommand(java.lang.String inName)
          Creates new BasicCommand
BasicCommand(java.lang.String inName, Client inClient)
          Creates new BasicCommand
 
Method Summary
 void doDrawExecute(Drawer InDrawer)
          execute the drawe command.
 void drawexecute(Drawer inDrawer)
          Called when the drawer completes
abstract  void execute()
          Called when the command is executed.
 Client getClient()
          Retrieve a reference to the client so it can be manipulated
 java.lang.String getCommandName()
          Used to retrieve the name of this command.
 void run()
          Run the draw execute command
 void setClient(Client inClient)
          Called before the execute command.
 void setCommandName(java.lang.String inCommandName)
          Used to set the name of the command.
 void showError(java.lang.String inString)
          Show the error to the user.
 void showException(java.lang.Exception inException)
          Show the exception to the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicCommand

public BasicCommand(java.lang.String inName)
Creates new BasicCommand


BasicCommand

public BasicCommand(java.lang.String inName,
                    Client inClient)
Creates new BasicCommand

Method Detail

getCommandName

public java.lang.String getCommandName()
Used to retrieve the name of this command.

Specified by:
getCommandName in interface Command

setCommandName

public void setCommandName(java.lang.String inCommandName)
Used to set the name of the command.


setClient

public void setClient(Client inClient)
Called before the execute command.

Specified by:
setClient in interface Command

getClient

public Client getClient()
Retrieve a reference to the client so it can be manipulated


showException

public void showException(java.lang.Exception inException)
Show the exception to the user.


showError

public void showError(java.lang.String inString)
Show the error to the user.


execute

public abstract void execute()
Called when the command is executed.

Specified by:
execute in interface Command

drawexecute

public void drawexecute(Drawer inDrawer)
Called when the drawer completes

Specified by:
drawexecute in interface Command

run

public void run()
Run the draw execute command

Specified by:
run in interface java.lang.Runnable

doDrawExecute

public void doDrawExecute(Drawer InDrawer)
execute the drawe command.