001 package data.events;
002
003 import java.util.EventObject;
004
005 import data.*;
006
007 /**
008 * An event indicating a change in a Catalog's contents.
009 *
010 * @see ListenableCatalog
011 *
012 * @author Steffen Zschaler
013 * @version 2.0 19/08/1999
014 * @since v2.0
015 */
016 public class CatalogChangeEvent extends EventObject {
017
018 /**
019 * The CatalogItem affected by the change.
020 *
021 * @serial
022 */
023 private CatalogItem m_ciAffected;
024
025 /**
026 * The DataBasket that was used to perform the operation.
027 *
028 * @serial
029 */
030 private DataBasket m_dbBasket;
031
032 /**
033 * Create a new CatalogChangeEvent.
034 *
035 * @param lcSource the Catalog that triggers the event.
036 * @param ciAffected the affected CatalogItem.
037 * @param db the DataBasket that was used to perform the operation.
038 */
039 public CatalogChangeEvent(ListenableCatalog lcSource, CatalogItem ciAffected, DataBasket db) {
040 super(lcSource);
041
042 m_ciAffected = ciAffected;
043 m_dbBasket = db;
044 }
045
046 /**
047 * Get the item that is affected by the change.
048 *
049 * @override Never.
050 */
051 public CatalogItem getAffectedItem() {
052 return m_ciAffected;
053 }
054
055 /**
056 * Get the DataBasket that was used to perform the operation.
057 *
058 * @override Never.
059 */
060 public DataBasket getBasket() {
061 return m_dbBasket;
062 }
063 }