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

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

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

revision 1.4 by mkoch, Mon Mar 17 16:28:50 2003 UTC revision 1.5 by mkoch, Mon Mar 24 08:02:01 2003 UTC
# Line 44  import java.util.EventObject; Line 44  import java.util.EventObject;
44   * Generic superclass for events fired by <code>BeanContext</code>s.   * Generic superclass for events fired by <code>BeanContext</code>s.
45   *   *
46   * @author John Keiser   * @author John Keiser
47   * @since JDK1.2   * @since 1.2
48   */   */
49    
50  public abstract class BeanContextEvent extends EventObject  public abstract class BeanContextEvent extends EventObject
51  {  {
52          /**    private static final long serialVersionUID = 7267998073569045052L;
53           * The <code>BeanContext</code> that most recently passed this    
54           * event on.    /**
55           */     * The <code>BeanContext</code> that most recently passed this
56          protected BeanContext propagatedFrom;     * event on.
57       */
58          /**    protected BeanContext propagatedFrom;
59           * Create a new event, from the specified <code>BeanContext</code>.  
60           * <code>propagatedFrom</code> will be initialized to    /**
61           * <code>null</code>.     * Create a new event, from the specified <code>BeanContext</code>.
62           *     * <code>propagatedFrom</code> will be initialized to
63           * @param source the source of the event.     * <code>null</code>.
64           */     *
65          protected BeanContextEvent(BeanContext source) {     * @param source the source of the event.
66                  super(source);     */
67          }    protected BeanContextEvent(BeanContext source)
68      {
69          /**      super(source);
70           * Get the <code>BeanContext</code> that originated this event.    }
71           * @return the originator of this event.  
72           */    /**
73          public BeanContext getBeanContext() {     * Get the <code>BeanContext</code> that originated this event.
74                  return (BeanContext)getSource();     * @return the originator of this event.
75          }     */
76      public BeanContext getBeanContext()
77          /**    {
78           * Get the most recent propagator of this event.      return (BeanContext)getSource();
79           * If this value is <code>null</code>, you have received the event    }
80           * straight from the source.  
81           *    /**
82           * @return the most recent propagator of this event.     * Get the most recent propagator of this event.
83           */     * If this value is <code>null</code>, you have received the event
84          public BeanContext getPropagatedFrom() {     * straight from the source.
85                  return propagatedFrom;     *
86          }     * @return the most recent propagator of this event.
87       */
88          /**    public BeanContext getPropagatedFrom()
89           * Tell whether this event has been propagated.    {
90           * @return <code>true</code> iff <code>getPropagatedFrom() != null</code>.      return propagatedFrom;
91           */    }
92          public boolean isPropagated() {  
93                  return propagatedFrom != null;    /**
94          }     * Tell whether this event has been propagated.
95       * @return <code>true</code> iff <code>getPropagatedFrom() != null</code>.
96          /**     */
97           * Set the most recent propagator of this event.    public boolean isPropagated()
98           * @param propagator the most recent propagator of this event.    {
99           */      return propagatedFrom != null;
100          public void setPropagatedFrom(BeanContext propagator) {    }
101                  propagatedFrom = propagator;  
102          }    /**
103       * Set the most recent propagator of this event.
104       * @param propagator the most recent propagator of this event.
105       */
106      public void setPropagatedFrom(BeanContext propagator)
107      {
108        propagatedFrom = propagator;
109      }
110  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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