Package java.beans

Examples of java.beans.PropertyChangeSupport.firePropertyChange()


        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "int", "source.int");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("int:1", target.getActionRecord());
    }

    public void testInvoke_extend6() {
        MockFish fish = new MockFish();
View Full Code Here


        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "char", "source.char");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("char:a", target.getActionRecord());
    }

    public void testInvoke_extend7() {
        MockFish fish = new MockFish();
View Full Code Here

        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "byte", "source.byte");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("byte:10", target.getActionRecord());
    }

    public void testInvoke_extend8() {
        MockFish fish = new MockFish();
View Full Code Here

        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "short", "source.short");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("short:100", target.getActionRecord());
    }

    public void testInvoke_extend9() {
        MockFish fish = new MockFish();
View Full Code Here

        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "long", "source.long");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("long:1000", target.getActionRecord());
    }

    public void testInvoke_extend10() {
        MockFish fish = new MockFish();
View Full Code Here

        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "float", "source.float");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("float:2.2", target.getActionRecord());
    }

    public void testInvoke_extend11() {
        MockFish fish = new MockFish();
View Full Code Here

        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "double", "source.double");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("double:3.3", target.getActionRecord());
    }

    /**
     * @tests java.beans.EventHandler#create(java.lang.Class<T>,
View Full Code Here

            Runnable updater = new Runnable() {
                public void run() {
                    PropertyChangeSupport pcs = (PropertyChangeSupport)
                            AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY);
                    if (null != pcs) {
                        pcs.firePropertyChange(evt);
                    }
                }
            };
            final AppContext currentAppContext = AppContext.getAppContext();
            for (AppContext appContext : AppContext.getAppContexts()) {
View Full Code Here

    public void testPropertyChangePropertyChangeEvent() {
        BeanContextServicesSupport s = new BeanContextServicesSupport();
        PropertyChangeSupport p= new PropertyChangeSupport(new Object());

        p.addPropertyChangeListener(s);
        p.firePropertyChange(null, new Object(), new Object());
    }
   
    //Regression Test for HARMONY-3757
    public void testSelfSerializatoin() throws Exception {
        BeanContextSupport beanContextSupport = new BeanContextSupport();
View Full Code Here

                            String prop = ev.getPropertyName();
                            if (prop == null || prop.equals(ProjectProperties.INCLUDES) || prop.equals(ProjectProperties.EXCLUDES)) {
                                matcher = null;
                                PropertyChangeEvent ev2 = new PropertyChangeEvent(this, FilteringPathResourceImplementation.PROP_INCLUDES, null, null);
                                ev2.setPropagationId(ev);
                                pcs.firePropertyChange(ev2);
                            }
                        }
                    }
                    result.add(new PRI());
                }
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.