001    package data;
002    
003    import data.events.DataBasketListener;
004    
005    /**
006     * A DataBasket that will fire events to inform about changes to its contents.
007     *
008     * @author Steffen Zschaler
009     * @version 2.0 18/08/1999
010     * @since v2.0
011     */
012    public interface ListenableDataBasket extends DataBasket {
013    
014        /**
015         * Add a listener that will be informed about changes to the DataBasket's contents.
016         *
017         * @override Always
018         *
019         * @param dbl the listener.
020         */
021        public void addDataBasketListener(DataBasketListener dbl);
022    
023        /**
024         * Remove a listener that was being informed about changes to the DataBasket's contents.
025         *
026         * @override Always
027         *
028         * @param dbl the listener.
029         */
030        public void removeDataBasketListener(DataBasketListener dbl);
031    
032        /**
033         * Fire an event to inform listeners about some unspecific change to the DataBasket's contents.
034         *
035         * <p>This method is necessary as there may be changes that are made without calling methods in the
036         * DataBasket. In such cases a call to this method will be necessary to keep the listeners informed.</p>
037         *
038         * @override Always
039         */
040        public void fireDataBasketChanged();
041    }