Sweet Home 3D 3.4

com.eteks.sweethome3d.model
Class CollectionChangeSupport<T>

java.lang.Object
  extended by com.eteks.sweethome3d.model.CollectionChangeSupport<T>

public class CollectionChangeSupport<T>
extends java.lang.Object

A helper class for CollectionListener management. T is the type of item stored in the collection.

Author:
Emmanuel Puybaret

Constructor Summary
CollectionChangeSupport(java.lang.Object source)
          Creates a collection change support.
 
Method Summary
 void addCollectionListener(CollectionListener<T> listener)
          Adds the listener in parameter to the list of listeners that may be notified.
 void fireCollectionChanged(T item, CollectionEvent.Type eventType)
          Fires a collection event about item.
 void fireCollectionChanged(T item, int index, CollectionEvent.Type eventType)
          Fires a collection event about item at a given index.
 void removeCollectionListener(CollectionListener<T> listener)
          Removes the listener in parameter to the list of listeners that may be notified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionChangeSupport

public CollectionChangeSupport(java.lang.Object source)
Creates a collection change support.

Method Detail

addCollectionListener

public void addCollectionListener(CollectionListener<T> listener)
Adds the listener in parameter to the list of listeners that may be notified.


removeCollectionListener

public void removeCollectionListener(CollectionListener<T> listener)
Removes the listener in parameter to the list of listeners that may be notified.


fireCollectionChanged

public void fireCollectionChanged(T item,
                                  CollectionEvent.Type eventType)
Fires a collection event about item.


fireCollectionChanged

public void fireCollectionChanged(T item,
                                  int index,
                                  CollectionEvent.Type eventType)
Fires a collection event about item at a given index.


Sweet Home 3D 3.4

? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License