001    package data.events;
002    
003    import java.util.EventObject;
004    
005    import data.DataBasket;
006    import data.DataBasketEntry;
007    
008    /**
009     * An event that indicates a change in a DataBasket's contents.
010     *
011     * @author Steffen Zschaler
012     * @version 2.0 19/08/1999
013     * @since v2.0
014     */
015    public class DataBasketEvent extends EventObject {
016    
017        /**
018             * ID for serialization.
019             */
020            private static final long serialVersionUID = 9102359566132404232L;
021            
022            /**
023         * The DataBasketEntry that was affected by the change.
024         *
025         * @serial
026         */
027        private DataBasketEntry m_dbeEntry;
028    
029        /**
030         * Create a new DataBasketEvent.
031         *
032         * @param dbSource the DataBasket that triggers the event.
033         * @param dbe the affected DataBasketEntry.
034         */
035        public DataBasketEvent(DataBasket dbSource, DataBasketEntry dbe) {
036            super(dbSource);
037    
038            m_dbeEntry = dbe;
039        }
040    
041        /**
042         * Get the affected DataBasketEntry.
043         *
044         * @override Never
045         */
046        public DataBasketEntry getAffectedEntry() {
047            return m_dbeEntry;
048        }
049    }