org.xwiki.gwt.user.client.ui.rta.cmd
Class CommandListenerCollection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<CommandListener>
              extended by org.xwiki.gwt.user.client.ui.rta.cmd.CommandListenerCollection
All Implemented Interfaces:
Serializable, Cloneable, Iterable<CommandListener>, Collection<CommandListener>, List<CommandListener>, RandomAccess

public class CommandListenerCollection
extends ArrayList<CommandListener>

A collection of CommandListener. It provides an easy way of notifying all the listeners when a Command is executed.

Version:
$Id: b05de7fbcc2a11d43a19e06494c5173d1feb4bcd $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CommandListenerCollection()
           
 
Method Summary
 boolean fireBeforeCommand(CommandManager sender, Command command, String param)
          Notifies all the listeners in this collection that the specified command is about to be executed.
 void fireCommand(CommandManager sender, Command command, String param)
          Notifies all the listeners in this collection that the specified command was executed.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

CommandListenerCollection

public CommandListenerCollection()
Method Detail

fireBeforeCommand

public boolean fireBeforeCommand(CommandManager sender,
                                 Command command,
                                 String param)
Notifies all the listeners in this collection that the specified command is about to be executed.

Parameters:
sender - The command manager that will execute the command.
command - The command that is about to be executed.
param - The parameter that will be used to execute the command.
Returns:
true if one of the listeners wants to prevent the command from being executed.

fireCommand

public void fireCommand(CommandManager sender,
                        Command command,
                        String param)
Notifies all the listeners in this collection that the specified command was executed.

Parameters:
sender - The command manager that executed the command.
command - The command executed.
param - The parameter used when the command was executed.


Copyright © 2004–2015 XWiki. All rights reserved.