Package java.beans

Examples of java.beans.PropertyChangeSupport.addPropertyChangeListener()


        PropertyChangeListener l3 = new PropertyChangeListenerProxy("myProp",
                l2);
        MockPropertyChangeListener l4 = new MockPropertyChangeListener(src,
                "myProp", oldValue, newValue);
        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener(l3);
        sup.addPropertyChangeListener("myProp", l4);

        sup.firePropertyChange("myProp", oldValue.intValue(), newValue
                .intValue());
        l1.assertNotCalled();
View Full Code Here


                l2);
        MockPropertyChangeListener l4 = new MockPropertyChangeListener(src,
                "myProp", oldValue, newValue);
        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener(l3);
        sup.addPropertyChangeListener("myProp", l4);

        sup.firePropertyChange("myProp", oldValue.intValue(), newValue
                .intValue());
        l1.assertNotCalled();
        l2.assertNotCalled();
View Full Code Here

                null, oldValue, newValue);
        PropertyChangeListener l3 = new PropertyChangeListenerProxy("myProp",
                l2);
        MockPropertyChangeListener l4 = new MockPropertyChangeListener(src,
                null, oldValue, newValue);
        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener(l3);
        sup.addPropertyChangeListener("myProp", l4);

        sup.firePropertyChange(null, oldValue.intValue(), newValue.intValue());
        l1.assertCalled();
View Full Code Here

        PropertyChangeListener l3 = new PropertyChangeListenerProxy("myProp",
                l2);
        MockPropertyChangeListener l4 = new MockPropertyChangeListener(src,
                null, oldValue, newValue);
        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener(l3);
        sup.addPropertyChangeListener("myProp", l4);

        sup.firePropertyChange(null, oldValue.intValue(), newValue.intValue());
        l1.assertCalled();
        l2.assertNotCalled();
View Full Code Here

                l2);
        MockPropertyChangeListener l4 = new MockPropertyChangeListener(src,
                null, oldValue, newValue);
        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener(l3);
        sup.addPropertyChangeListener("myProp", l4);

        sup.firePropertyChange(null, oldValue.intValue(), newValue.intValue());
        l1.assertCalled();
        l2.assertNotCalled();
        l4.assertNotCalled();
View Full Code Here

     */
    public void testFirePropertyChange_Int_NullListener() {
        Object src = new Object();
        PropertyChangeSupport sup = new PropertyChangeSupport(src);

        sup.addPropertyChangeListener(null);
        sup.firePropertyChange("myProp", 1, 2);
    }

    /*
     * Test serialization/deserialization.
View Full Code Here

        MockPropertyChangeListener2 l2 = new MockPropertyChangeListener2();

        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener("myProp", l1);
        sup.addPropertyChangeListener("myProp", l2);
        sup2.addPropertyChangeListener(l1);
        sup2.addPropertyChangeListener("myProp", l1);

        PropertyChangeSupport deSup = (PropertyChangeSupport) SerializationTester
                .getDeserilizedObject(sup);
        assertEquals(sup2.getPropertyChangeListeners()[0], deSup
View Full Code Here

        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener("myProp", l1);
        sup.addPropertyChangeListener("myProp", l2);
        sup2.addPropertyChangeListener(l1);
        sup2.addPropertyChangeListener("myProp", l1);

        PropertyChangeSupport deSup = (PropertyChangeSupport) SerializationTester
                .getDeserilizedObject(sup);
        assertEquals(sup2.getPropertyChangeListeners()[0], deSup
                .getPropertyChangeListeners()[0]);
View Full Code Here

        MockPropertyChangeListener2 l2 = new MockPropertyChangeListener2();

        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener("myProp", l1);
        sup.addPropertyChangeListener("myProp", l2);
        sup2.addPropertyChangeListener(l1);
        sup2.addPropertyChangeListener("myProp", l1);
        SerializationTest.verifyGolden(this, sup2, new SerializableAssert() {
            public void assertDeserialized(Serializable initial,
                    Serializable deserialized) {
                PropertyChangeSupport sup2 = (PropertyChangeSupport) initial;
View Full Code Here

        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener("myProp", l1);
        sup.addPropertyChangeListener("myProp", l2);
        sup2.addPropertyChangeListener(l1);
        sup2.addPropertyChangeListener("myProp", l1);
        SerializationTest.verifyGolden(this, sup2, new SerializableAssert() {
            public void assertDeserialized(Serializable initial,
                    Serializable deserialized) {
                PropertyChangeSupport sup2 = (PropertyChangeSupport) initial;
                PropertyChangeSupport deSup = (PropertyChangeSupport) deserialized;
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.