001 /* 002 * BehaviorProvider.java 003 * 004 * Developed for the "Rethinking CS101" project. See http://www.cs101.org, the 005 * CS101 homepage or email las@olin.edu. 006 * 007 * Created on January 8, 2004, 11:34 AM 008 */ 009 010 package nodenet; 011 012 import java.beans.PropertyChangeListener; 013 014 /** 015 * This interface indicates that a class can provide a list of all loaded 016 * behaviors, and notify listeners of changes in the selected behavior. 017 * 018 * @author Patrick G. Heck, gus.heck@olin.edu 019 * @version $Id: NodeBehaviorProvider.java,v 1.4 2004/01/14 21:43:17 gus Exp $ 020 */ 021 public interface NodeBehaviorProvider { 022 023 /** 024 * Provide a list of <strong>all user loaded behaviors in the 025 * entire application</strong>. 026 * 027 * @return Every {@link NodeBehavior} class currently loaded 028 * for use in node creation 029 */ 030 public Class[] getNodeBehaviors(); 031 032 /** 033 * Regeister a class that wants to know when the selected node behavior 034 * type is changed. As soon as the client is registered an event is 035 * generated indicating a change from null to the current value to bring 036 * the listener up to date. 037 * 038 * @param l The object that wishes to listen for events 039 */ 040 public void addPropertyChangeListener(PropertyChangeListener l); 041 042 /** 043 * Unregeister a class that no longer wants to know when the selected 044 * node behavior type is changed. 045 * 046 * @param l The object that is no longer interested in events 047 */ 048 public void removePropertyChangeListener(PropertyChangeListener l) ; 049 050 }