wicket.util.listener
Class ListenerSet

java.lang.Object
  extended by wicket.util.listener.ListenerSet
Direct Known Subclasses:
ChangeListenerSet

public abstract class ListenerSet
extends java.lang.Object

Holds a set of listeners implementing the IListener tag interface. Subclasses can implement notification methods that cast the listener to the correct subinterface and invoke the appropriate listener method.

Author:
Jonathan Locke

Constructor Summary
ListenerSet()
           
 
Method Summary
 boolean add(IListener listener)
          Adds a listener to this set of listeners.
protected abstract  void notifyListener(IListener listener)
          Notifies a listener.
 void notifyListeners()
          Notifies each listener in this set by calling notifyListener.
 void remove(IListener listener)
          Removes a listener from this set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenerSet

public ListenerSet()
Method Detail

add

public boolean add(IListener listener)
Adds a listener to this set of listeners.

Parameters:
listener - The listener to add
Returns:
true if the set did not already contain the specified listener.

notifyListeners

public void notifyListeners()
Notifies each listener in this set by calling notifyListener.


remove

public void remove(IListener listener)
Removes a listener from this set.

Parameters:
listener - The listener to remove

notifyListener

protected abstract void notifyListener(IListener listener)
Notifies a listener.

Parameters:
listener - The listener to notify


Copyright © 2004-2007 Wicket developers. All Rights Reserved.