001    package breakout;
002    
003    /**
004     * interface WorldListener is for objects that want to hear about 
005     * changes in the world state.
006     *
007     * @see breakout.World
008     * @see breakout.WorldEvent
009     *
010     * @author benmv@olin.edu
011     * @version <tt>$Id: WorldListener.java,v 1.2 2004/03/26 20:39:33 gus Exp $</tt>
012     */
013    public interface WorldListener {
014    
015        /**
016         * invoked when a component is added to the world.  The event
017         * gives basic details about the component.
018         *
019         * @param event contains basic details of component that
020         * was added.
021         */
022        public void componentAdded(WorldEvent event);
023    
024        /**
025         * invoked when a component is removed from the world.  The event
026         * gives basic details about the component.
027         *
028         * @param event contains basic details of component that
029         * was added.
030         */
031        public void componentRemoved(WorldEvent event);
032    
033        /**
034         * invoked when a ball leaves the world for another.  The event
035         * describes the ball that just left.
036         *
037         * @param event contains basic details of ball that left.
038         */
039        public void ballLeft(WorldEvent event);
040    
041    }
042