it.amattioli.applicate.browsing
Class ContentChangeSupport

Show UML class diagram
java.lang.Object
  extended by it.amattioli.applicate.browsing.ContentChangeSupport

public class ContentChangeSupport
extends Object

Helper class that simplify ContentChangeListener registration and the notification of ContentChangeEvent to registered listeners.

Author:
andrea

Constructor Summary
ContentChangeSupport()
           
 
Method Summary
 void addContentChangeListener(ContentChangeListener listener)
          Register a new listener so that it will be notified of selection events.
 void disable()
          Disable the notification of the events.
 void enable()
          Enable the notification of the events.
 boolean isEnabled()
          Check if event notification is currently enabled.
 void notifyContentChangeListeners(ContentChangeEvent event)
          Notify a new event to all the registered listeners.
 void removeContentChangeListener(ContentChangeListener listener)
          De-register a previously registered listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentChangeSupport

public ContentChangeSupport()
Method Detail

isEnabled

public boolean isEnabled()
Check if event notification is currently enabled. Event notification can be enabled calling enable() and can be disabled calling disable().

A ContentChangeSupport object is initially enabled.

Returns:
true if event notification is currently enabled, false otherwise

enable

public void enable()
Enable the notification of the events. After calling this method every event passed to notifyContentChangeListeners(ContentChangeEvent) will be notified to the listeners.

A ContentChangeSupport object is initially enabled.

See Also:
disable()

disable

public void disable()
Disable the notification of the events. After calling this method every event passed to notifyContentChangeListeners(ContentChangeEvent) will not be notified to the listeners.


addContentChangeListener

public void addContentChangeListener(ContentChangeListener listener)
Register a new listener so that it will be notified of selection events.

Parameters:
listener - the listener to be registered

removeContentChangeListener

public void removeContentChangeListener(ContentChangeListener listener)
De-register a previously registered listener.

Parameters:
listener - the listener to be de-registered

notifyContentChangeListeners

public void notifyContentChangeListeners(ContentChangeEvent event)
Notify a new event to all the registered listeners.

Parameters:
event - the event to be notified


Copyright © 2011. All Rights Reserved.