it.amattioli.applicate.commands
Class MultipleCommand

Show UML class diagram
java.lang.Object
  extended by it.amattioli.applicate.commands.MultipleCommand
All Implemented Interfaces:
Command, it.amattioli.dominate.util.PropertyChangeEmitter

public abstract class MultipleCommand
extends Object
implements Command

Un command ch epuò eseguire una sequenza di altri command. I command da eseguire vengono aggiunti tramite il metodo addCommand(). Quando viene richiamato il metodo doCommand() i command verranno eseguiti nell'ordine in cui sono stati aggiunti.

Author:
a.mattioli

Constructor Summary
MultipleCommand()
           
MultipleCommand(int capacity)
          Crea un command multiplo con capacità iniziale pari al numero indicato dal parametro.
 
Method Summary
 void addCommand(Command c)
           
 void addCommandListener(CommandListener listener)
          Add a listener for this command events.
 void addCommandListener(CommandListener listener, CommandResult... results)
          Add a listener for this command events.
 void cancelCommand()
           
 void doCommand()
          Execute this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.amattioli.dominate.util.PropertyChangeEmitter
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

MultipleCommand

public MultipleCommand()

MultipleCommand

public MultipleCommand(int capacity)
Crea un command multiplo con capacità iniziale pari al numero indicato dal parametro. Se vengono aggiunti più command di quanto indicato nella capacità iniziale l'elenco verrà comunque ingrandito.

Parameters:
capacity -
Method Detail

addCommand

public void addCommand(Command c)

doCommand

public void doCommand()
               throws ApplicationException
Description copied from interface: Command
Execute this command.

Specified by:
doCommand in interface Command
Throws:
ApplicationException

cancelCommand

public void cancelCommand()
Specified by:
cancelCommand in interface Command

addCommandListener

public void addCommandListener(CommandListener listener)
Description copied from interface: Command
Add a listener for this command events. Every time this command fires a CommandEvent the CommandListener.commandDone(CommandEvent) method will be called on all the added listeners.

Specified by:
addCommandListener in interface Command
Parameters:
listener - the listener to be added

addCommandListener

public void addCommandListener(CommandListener listener,
                               CommandResult... results)
Description copied from interface: Command
Add a listener for this command events. Every time this command fires a CommandEvent the CommandListener.commandDone(CommandEvent) method will be called on all the added listeners with result equals to one of the specified results.

Specified by:
addCommandListener in interface Command
Parameters:
listener - the listener to be added


Copyright © 2011. All Rights Reserved.