From: Bob J. <jac...@us...> - 2007-02-04 06:12:06
|
Update of /cvsroot/jmri/jmri In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv28311/src/jmri Modified Files: AbstractManager.java Log Message: add deregister member so Route can be deleted Index: AbstractManager.java =================================================================== RCS file: /cvsroot/jmri/jmri/AbstractManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AbstractManager.java 29 Aug 2003 08:43:44 -0000 1.10 --- AbstractManager.java 4 Feb 2007 06:12:03 -0000 1.11 *************** *** 87,90 **** --- 87,106 ---- /** + * Forget a NamedBean Object created outside the manager. + * <P> + * The non-system-specific RouteManager + * uses this method. + */ + public void deregister(NamedBean s) { + s.removePropertyChangeListener(this); + String systemName = s.getSystemName(); + _tsys.remove(systemName); + String userName = s.getUserName(); + if (userName != null) _tuser.remove(userName); + firePropertyChange("length", null, new Integer(_tsys.size())); + // listen for name and state changes to forward + } + + /** * The PropertyChangeListener interface in this class is * intended to keep track of user name changes to individual NamedBeans. |