/[classpath]/classpath/java/beans/beancontext/BeanContextSupport.java
ViewVC logotype

Diff of /classpath/java/beans/beancontext/BeanContextSupport.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mkoch, Thu Jun 26 19:52:43 2003 UTC revision 1.2.2.1 by gnu_andrew, Sun Apr 3 00:09:10 2005 UTC
# Line 1  Line 1 
1  /* java.beans.beancontext.BeanContextSupport  /* BeanContextSupport.java --
2     Copyright (C) 2003 Free Software Foundation, Inc.     Copyright (C) 2003, 2005  Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 7  GNU Classpath is free software; you can Line 7  GNU Classpath is free software; you can
7  it under the terms of the GNU General Public License as published by  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)  the Free Software Foundation; either version 2, or (at your option)
9  any later version.  any later version.
10    
11  GNU Classpath is distributed in the hope that it will be useful, but  GNU Classpath is distributed in the hope that it will be useful, but
12  WITHOUT ANY WARRANTY; without even the implied warranty of  WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Line 153  public class BeanContextSupport extends Line 153  public class BeanContextSupport extends
153      okToUseGui = visible;      okToUseGui = visible;
154    
155      initialize ();      initialize ();
       
     throw new Error ("Not implemented");  
156    }    }
157    
158    public boolean add (Object targetChild)    public boolean add (Object targetChild)
159    {    {
160      throw new Error ("Not implemented");      if (targetChild == null)
161          throw new IllegalArgumentException();
162    
163        if (children.containsKey(targetChild))
164          return false;
165    
166        // FIXME: The second argument is surely wrong.
167        children.put(targetChild, targetChild);
168        return true;
169    }    }
170    
171    public boolean addAll (Collection c)    public boolean addAll (Collection c)
172    {    {
173      throw new Error ("Not implemented");      throw new UnsupportedOperationException();
174    }    }
175    
176    public void addBeanContextMembershipListener (BeanContextMembershipListener bcml)    public void addBeanContextMembershipListener
177        (BeanContextMembershipListener listener)
178    {    {
179      throw new Error ("Not implemented");      if (! bcmListeners.contains(listener))
180          bcmListeners.add(listener);
181    }    }
182    
183    public boolean avoidingGui ()    public boolean avoidingGui ()
# Line 216  public class BeanContextSupport extends Line 224  public class BeanContextSupport extends
224    
225    public void clear ()    public void clear ()
226    {    {
227      throw new Error ("Not implemented");      throw new UnsupportedOperationException();
228    }    }
229    
230    public boolean contains (Object o)    public boolean contains (Object o)
# Line 302  public class BeanContextSupport extends Line 310  public class BeanContextSupport extends
310    
311    public Locale getLocale ()    public Locale getLocale ()
312    {    {
313      throw new Error ("Not implemented");      return locale;
314    }    }
315    
316    public URL getResource (String name, BeanContextChild bcc)    public URL getResource (String name, BeanContextChild bcc)
# Line 317  public class BeanContextSupport extends Line 325  public class BeanContextSupport extends
325    
326    protected void initialize ()    protected void initialize ()
327    {    {
328      throw new Error ("Not implemented");      bcmListeners = new ArrayList();
329        children = new HashMap();
330    }    }
331    
332    public Object instantiateChild (String beanName)    public Object instantiateChild (String beanName)
# Line 343  public class BeanContextSupport extends Line 352  public class BeanContextSupport extends
352    
353    public Iterator iterator ()    public Iterator iterator ()
354    {    {
355      throw new Error ("Not implemented");      return children.keySet().iterator();
356    }    }
357    
358    public boolean needsGui ()    public boolean needsGui ()
# Line 369  public class BeanContextSupport extends Line 378  public class BeanContextSupport extends
378    
379    public boolean remove (Object targetChild)    public boolean remove (Object targetChild)
380    {    {
381      throw new Error ("Not implemented");      return remove(targetChild, true);
382    }    }
383    
384    protected boolean remove (Object targetChild, boolean callChildSetBC)    protected boolean remove (Object targetChild, boolean callChildSetBC)
385    {    {
386        if (targetChild == null)
387          throw new IllegalArgumentException();
388        
389      throw new Error ("Not implemented");      throw new Error ("Not implemented");
390    }    }
391    
392    public boolean removeAll (Collection c)    public boolean removeAll (Collection c)
393    {    {
394      throw new Error ("Not implemented");      throw new UnsupportedOperationException();
395    }    }
396    
397    public void removeBeanContextMembershipListener (BeanContextMembershipListener bcml)    public void removeBeanContextMembershipListener (BeanContextMembershipListener bcml)
# Line 389  public class BeanContextSupport extends Line 401  public class BeanContextSupport extends
401    
402    public boolean retainAll (Collection c)    public boolean retainAll (Collection c)
403    {    {
404      throw new Error ("Not implemented");      throw new UnsupportedOperationException();
405    }    }
406    
407    protected final void serialize (ObjectOutputStream oos, Collection coll)    protected final void serialize (ObjectOutputStream oos, Collection coll)
# Line 416  public class BeanContextSupport extends Line 428  public class BeanContextSupport extends
428    
429    public Object[] toArray ()    public Object[] toArray ()
430    {    {
431      throw new Error ("Not implemented");      return children.keySet().toArray();
432    }    }
433    
434    public Object[] toArray (Object[] arry)    public Object[] toArray(Object[] array)
435    {    {
436      throw new Error ("Not implemented");      return children.keySet().toArray(array);
437    }    }
438    
439    protected boolean validatePendingAdd (Object targetChild)    protected boolean validatePendingAdd (Object targetChild)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.2.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26