classes.shapes.commands
Class CommandContainer

java.lang.Object
  extended by classes.shapes.commands.CommandContainer
All Implemented Interfaces:
ICommandMediator

public class CommandContainer
extends java.lang.Object
implements ICommandMediator

Holds the Command objects sent from other objects

Version:
1.0, 25-Mar-07
Author:
Prathab, Mukesh
See Also:
ICommandMediator

Constructor Summary
CommandContainer()
           
 
Method Summary
 void addObject(java.lang.Object obj)
          Stores the objects which are interested to collect the commands automatically
 void clearPermanentCommandList()
          Clears the permanent command list
 void clearTempCommandList()
          Clears the temporary command list
 java.util.ArrayList getObjectList()
          Returns command object list
 java.util.ArrayList getPermanentCommandList()
          Returns permanent command list
 java.util.ArrayList getTemporaryCommandList()
          Returns temporary command list
 boolean removeObject(java.lang.Object obj)
          Removes the object from the object list
 void sendCommand(Command command)
          Stores the commands in a temporary list
 void sendCommand(Command command, boolean toPermanent)
          Stores the commands in the list
 void setObjectList(java.util.ArrayList objList)
          Sets the object list with command list
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandContainer

public CommandContainer()
Method Detail

sendCommand

public void sendCommand(Command command,
                        boolean toPermanent)
Stores the commands in the list

Specified by:
sendCommand in interface ICommandMediator
Parameters:
command - command to be stored
toPermanent - if true the command is added to permanent list
See Also:
ICommandMediator.sendCommand(types.Command)

sendCommand

public void sendCommand(Command command)
Stores the commands in a temporary list

Specified by:
sendCommand in interface ICommandMediator
Parameters:
command - command to be stored
See Also:
ICommandMediator.sendCommand(types.Command)

addObject

public void addObject(java.lang.Object obj)
Stores the objects which are interested to collect the commands automatically

Specified by:
addObject in interface ICommandMediator
Parameters:
obj - object to be added

removeObject

public boolean removeObject(java.lang.Object obj)
Removes the object from the object list

Specified by:
removeObject in interface ICommandMediator
Parameters:
obj - object to be removed
Returns:
true if object is removed

setObjectList

public void setObjectList(java.util.ArrayList objList)
Sets the object list with command list


getObjectList

public java.util.ArrayList getObjectList()
Returns command object list


clearTempCommandList

public void clearTempCommandList()
Clears the temporary command list


clearPermanentCommandList

public void clearPermanentCommandList()
Clears the permanent command list


getTemporaryCommandList

public java.util.ArrayList getTemporaryCommandList()
Returns temporary command list


getPermanentCommandList

public java.util.ArrayList getPermanentCommandList()
Returns permanent command list