Package java.beans.beancontext

Examples of java.beans.beancontext.BeanContextSupport.addPropertyChangeListener()


   * See bug parade entry 4295174
   */
  public void test(TestHarness harness)
  {
    BeanContextSupport bcs = new BeanContextSupport();
    bcs.addPropertyChangeListener("designTime", this);
    harness.check(bcs.isDesignTime(), false);
    bcs.setDesignTime(true);
    harness.check(lastEvent, null);
    bcs.addPropertyChangeListener("designMode", this);
    bcs.setDesignTime(false);
View Full Code Here


    BeanContextSupport bcs = new BeanContextSupport();
    bcs.addPropertyChangeListener("designTime", this);
    harness.check(bcs.isDesignTime(), false);
    bcs.setDesignTime(true);
    harness.check(lastEvent, null);
    bcs.addPropertyChangeListener("designMode", this);
    bcs.setDesignTime(false);
    harness.check(lastEvent.getPropertyName(), "designMode");
    harness.check(lastEvent.getNewValue(), Boolean.FALSE);
    harness.check(lastEvent.getOldValue(), Boolean.TRUE);
    harness.check(lastEvent.getSource(), bcs);
View Full Code Here

    {
        Locale locale = Locale.FRANCE;
        BeanContextSupport beanContextSupport = new BeanContextSupport(null, locale);
        assertEquals(Locale.FRANCE, beanContextSupport.getLocale());
        MyPropertyChangeListener myPropertyChangeListener = new MyPropertyChangeListener();
        beanContextSupport.addPropertyChangeListener("locale", myPropertyChangeListener);
        beanContextSupport.setLocale(null);
        assertEquals(Locale.FRANCE, beanContextSupport.getLocale());
        assertFalse(myPropertyChangeListener.changed);       
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.