wicket.util.watch
Class Watcher

java.lang.Object
  extended by wicket.util.watch.Watcher

public final class Watcher
extends java.lang.Object

Similar to ModificationWatcher but manually triggered, calling all registered ChangeListeners when a given object is triggered.

Author:
Juergen Donnerstag

Constructor Summary
Watcher()
          Constructor
 
Method Summary
 boolean add(java.lang.Object key, IChangeListener listener)
          Adds a key and an IChangeListener to call when the key is triggered.
 void clear()
          Remove all entries
 void notifyListeners(java.lang.Object key)
          trigger all listeners registered with key
 java.lang.Object remove(java.lang.Object key)
          Remove all entries associated with 'modifiable'
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Watcher

public Watcher()
Constructor

Method Detail

add

public final boolean add(java.lang.Object key,
                         IChangeListener listener)
Adds a key and an IChangeListener to call when the key is triggered.

Note: the value is ignored if the key and an associated value already exists. Only the listeners is added (if an equals does not already exist).

Parameters:
key - The key to identifiy a ChangeListenerSet
listener - The listener to call if the key gets triggered
Returns:
true if the set did not already contain the specified element.

remove

public java.lang.Object remove(java.lang.Object key)
Remove all entries associated with 'modifiable'

Parameters:
key -
Returns:
the object removed, else null

clear

public void clear()
Remove all entries


notifyListeners

public void notifyListeners(java.lang.Object key)
trigger all listeners registered with key

Parameters:
key - The key to identify the ChangeListenerSet


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