Example usage for java.beans.beancontext BeanContextChildSupport BeanContextChildSupport

List of usage examples for java.beans.beancontext BeanContextChildSupport BeanContextChildSupport

Introduction

In this page you can find the example usage for java.beans.beancontext BeanContextChildSupport BeanContextChildSupport.

Prototype


public BeanContextChildSupport() 

Source Link

Document

construct a BeanContextChildSupport where this class has been subclassed in order to implement the JavaBean component itself.

Usage

From source file:MembershipTest.java

public static void main(String[] args) {
    BeanContextSupport context = new BeanContextSupport(); // the context
    MyMembershipListener listener = new MyMembershipListener();
    BeanContextChildSupport bean = new BeanContextChildSupport(); // a JavaBean
    context.addBeanContextMembershipListener(listener); // now listening!
    context.add(bean);/*from  www.j av  a2  s  .  co m*/
    context.remove(bean);
}

From source file:MembershipTest.java

public static void main(String[] args) {
    BeanContextSupport context = new BeanContextSupport(); // the context
    MyMembershipListener listener = new MyMembershipListener();
    BeanContextChildSupport bean = new BeanContextChildSupport(); // a
    // JavaBean//from w  ww. j  ava 2  s .c  om
    context.addBeanContextMembershipListener(listener); // now listening!
    context.add(bean);
    context.remove(bean);
}