Example usage for java.beans.beancontext BeanContextSupport remove

List of usage examples for java.beans.beancontext BeanContextSupport remove

Introduction

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

Prototype

public boolean remove(Object targetChild) 

Source Link

Document

Removes a child from this BeanContext.

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);/*  w w  w.ja va 2s . c  om*/
    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  ww w .j  ava2s  .c o m*/
    context.addBeanContextMembershipListener(listener); // now listening!
    context.add(bean);
    context.remove(bean);
}